@realsee/dnalogel 2.29.0 → 2.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,102 @@
1
+ import type { Five } from '@realsee/five';
2
+ import * as BasePlugin from '../base/BasePlugin';
3
+ import type * as PluginType from './typings';
4
+ export declare class CurrentPanoImagePluginController extends BasePlugin.Controller<PluginType.State, PluginType.EventMap> {
5
+ /** 插件当前状态 */
6
+ state: PluginType.State;
7
+ /** 插件配置项 */
8
+ get config(): {
9
+ width: number;
10
+ yOffset: number;
11
+ yRotate: number;
12
+ imageURL: string;
13
+ staticPrefix?: string;
14
+ i18n?: (key: string) => string;
15
+ };
16
+ /** 是否已经被销毁 */
17
+ get disposed(): boolean;
18
+ /** 查询问题使用的调试对象 */
19
+ checkMsg: {
20
+ /** mesh 隐藏的原因 */
21
+ meshHidden: string;
22
+ /** 插件 enabled 校验信息 */
23
+ pluginDisabled: string;
24
+ /** 插件 visible 校验信息 */
25
+ pluginHidden: string;
26
+ };
27
+ private group;
28
+ private mesh;
29
+ private textureLoadingPromise?;
30
+ private opacityAnimeTween?;
31
+ /** 是否正在走点动画中 */
32
+ private isInPanoMoveAnime;
33
+ /** 上一次走点的全景图索引 */
34
+ private lastArrivedPanoIndex;
35
+ /** config 的原始值 */
36
+ private _config;
37
+ /** disposed 的原始值 */
38
+ private _disposed;
39
+ constructor(five: Five, params?: PluginType.Params);
40
+ /**
41
+ * 启用插件,响应用户操作并展示UI
42
+ * @param options
43
+ */
44
+ enable(options?: BasePlugin.BaseOptions): void;
45
+ /** 禁用插件
46
+ * @param `options` `<Option> | <undefined>`
47
+ * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
48
+ */
49
+ disable(options?: BasePlugin.BaseOptions): void;
50
+ /** 插件内容整体展示
51
+ * @param `options` `<Partial<BaseOptions>> | <undefined>`
52
+ * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
53
+ */
54
+ show(options?: Partial<PluginType.ShowHideOptions>): Promise<void>;
55
+ /** 插件内容整体隐藏
56
+ * @param `options` `<Partial<BaseOptions>> | <undefined>`
57
+ * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
58
+ */
59
+ hide(options?: Partial<PluginType.ShowHideOptions>): Promise<void>;
60
+ /** 更改插件 State
61
+ * @param `state` `<Partial<Plugin.State>>` 插件属性 `state` 的子集。
62
+ * @param `options` `<Option> | <undefined>`
63
+ * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
64
+ */
65
+ setState(state: Partial<PluginType.State>, options?: BasePlugin.BaseOptions): void;
66
+ /** 更改插件 Config
67
+ * @param `config` `<Partial<Plugin.Config>>` 插件属性 `config` 的子集。
68
+ * @param `options` `<Option> | <undefined>`
69
+ */
70
+ updateConfig(config: Partial<PluginType.Config>, options?: BasePlugin.BaseOptions): void;
71
+ /**
72
+ * 销毁插件
73
+ * @todo 销毁贴图时,最好还是直接销毁贴图吧,this.mesh?.material.map 这种都是很深层的引用了。THREE 的建议我看也是自己去管理和销毁公共贴图。
74
+ */
75
+ dispose: () => void;
76
+ /** 问什么看不到模型 */
77
+ __whyCantSeeMesh(): string;
78
+ private updateState;
79
+ /** 根据各种条件更新 Mesh 的可见性 */
80
+ private updateMeshVisible;
81
+ /** 根据点位更新 Mesh 坐标 */
82
+ private updateMeshPosition;
83
+ /** 重新加载贴图,调用时会先清除已有的贴图 */
84
+ private reloadTexture;
85
+ /** north_rad 变化时,需要更新模型的旋转角度 */
86
+ private updateMeshQuaternion;
87
+ private checkMeshVisible;
88
+ private _enable;
89
+ private _disable;
90
+ private _show;
91
+ private _hide;
92
+ /** 贴图加载完成的回调 */
93
+ private onTextureLoaded;
94
+ /** Five load Work 后 */
95
+ private onFiveWillLoad;
96
+ /** 走点前 */
97
+ private onFivePanoWillArrive;
98
+ /** 走点后 */
99
+ private onFivePanoArrived;
100
+ private onMeshVisibleChange;
101
+ private onFiveModeChange;
102
+ }
@@ -0,0 +1,7 @@
1
+ import type { FivePlugin } from '@realsee/five';
2
+ import type * as CurrentPanoImagePluginType from './typings';
3
+ import { CurrentPanoImagePluginController } from './Controller';
4
+ export declare const CurrentPanoImagePlugin: FivePlugin<CurrentPanoImagePluginType.Params, CurrentPanoImagePluginController>;
5
+ export default CurrentPanoImagePlugin;
6
+ export type CurrentPanoImagePluginExportType = CurrentPanoImagePluginController;
7
+ export type { CurrentPanoImagePluginType };
@@ -0,0 +1,58 @@
1
+ import type * as BasePlugin from '../base/BasePlugin';
2
+ export interface Config extends BasePlugin.Config {
3
+ /** 贴图宽度,单位:米 */
4
+ width: number;
5
+ /** 高度偏移量,单位:米 */
6
+ yOffset: number;
7
+ /** 沿着 Y 轴正方向旋转角度,单位:弧度 */
8
+ yRotate: number;
9
+ /** 贴图 URL */
10
+ imageURL: string;
11
+ }
12
+ export interface State extends BasePlugin.State {
13
+ visible: boolean;
14
+ }
15
+ export interface ShowHideOptions extends BasePlugin.BaseOptions {
16
+ userAction: boolean;
17
+ }
18
+ export interface EventMap extends BasePlugin.EventMap<State> {
19
+ /** visible 从 false 到 true 的回调
20
+ * @param event.userAction 是否是用户操作
21
+ */
22
+ show: (event: {
23
+ userAction: boolean;
24
+ }) => void;
25
+ /** visible 从 true 到 false 的回调
26
+ * @param event.userAction 是否是用户操作
27
+ */
28
+ hide: (event: {
29
+ userAction: boolean;
30
+ }) => void;
31
+ /** enabled 从 false 到 true 的回调
32
+ * @param event.userAction 是否是用户操作
33
+ */
34
+ enable: (event: {
35
+ userAction: boolean;
36
+ }) => void;
37
+ /** enabled 从 true 到 false 的回调
38
+ * @param event.userAction 是否是用户操作
39
+ */
40
+ disable: (event: {
41
+ userAction: boolean;
42
+ }) => void;
43
+ /** config 变更的回调
44
+ * @param event.prevConfig 变更前的 config
45
+ * @param event.config 变更后的 config
46
+ * @param event.userAction 是否是用户操作
47
+ */
48
+ configChange: (event: {
49
+ prevConfig: Config;
50
+ config: Config;
51
+ userAction: boolean;
52
+ }) => void;
53
+ }
54
+ /** 插件初始化参数 */
55
+ export interface Params {
56
+ config?: Partial<Config>;
57
+ initialState?: Partial<State>;
58
+ }