@soonspacejs/plugin-cps-soonmanager 2.9.5 → 2.9.6

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.
@@ -10,6 +10,10 @@ export declare const SIGN_PATH = "/db/sign";
10
10
  * 模型树
11
11
  */
12
12
  export declare const TREE_DATA_FILE_PATH = "/db/tree_models.json";
13
+ /**
14
+ * poi
15
+ */
16
+ export declare const POI_DATA_FILE_PATH = "/db/pois.json";
13
17
  /**
14
18
  * 拓扑路径
15
19
  */
@@ -30,3 +34,7 @@ export declare const MODEL_VISIONS_DATA_FILE_PATH = "/db/model_visions.json";
30
34
  * 自定义属性 key
31
35
  */
32
36
  export declare const PROPERTIES_KEY = "properties";
37
+ /**
38
+ * 自定义属性 key
39
+ */
40
+ export declare const POI_PLUGIN_NAME = "poiRenderer";
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import SoonSpace, { AnimationOptions, TopologyNodeInfo } from 'soonspacejs';
2
2
  import type { BaseObject3D, TopologyInfo } from 'soonspacejs/types/Library';
3
3
  import { Tween } from '@tweenjs/tween.js';
4
- import { IMetadata, ITreeData, ITopologyPath, ILoadSceneOptions, TPropertiesMap, TAnimationsMap, IPlayAnimationByIdOptions, TModelVisionsMap, IPresetEffectsOptions, Options } from './types';
4
+ import { PoiNodeData } from '@soonspacejs/plugin-poi-renderer';
5
+ import { IMetadata, ITreeData, IPoiData, ITopologyPath, ILoadSceneOptions, TPropertiesMap, TAnimationsMap, IPlayAnimationByIdOptions, TModelVisionsMap, IPresetEffectsOptions, ConstructorOptions } from './types';
5
6
  declare class CpsSoonmanagerPlugin {
6
7
  #private;
7
8
  readonly ssp: SoonSpace;
@@ -16,6 +17,10 @@ declare class CpsSoonmanagerPlugin {
16
17
  * 模型树
17
18
  */
18
19
  treeData: ITreeData[] | null;
20
+ /**
21
+ * poi 数据
22
+ */
23
+ poiData: any[] | null;
19
24
  /**
20
25
  * 拓扑路径
21
26
  */
@@ -33,14 +38,12 @@ declare class CpsSoonmanagerPlugin {
33
38
  */
34
39
  modelVisionsData: TModelVisionsMap | null;
35
40
  _objectsAnimations: Map<string, Set<Tween<any>>>;
36
- constructor(ssp: SoonSpace, option?: Options);
41
+ constructor(ssp: SoonSpace, option?: ConstructorOptions);
37
42
  /**
38
43
  * 设置 key
39
44
  * @param key
40
45
  */
41
46
  setKey(key: string): void;
42
- private _resolvePath;
43
- private _fetchData;
44
47
  /**
45
48
  * 获取场景元数据
46
49
  */
@@ -50,6 +53,11 @@ declare class CpsSoonmanagerPlugin {
50
53
  * @returns
51
54
  */
52
55
  fetchTreeData(): Promise<ITreeData[]>;
56
+ /**
57
+ * 获取 Poi 数据
58
+ * @returns
59
+ */
60
+ fetchPoiData(): Promise<IPoiData[]>;
53
61
  /**
54
62
  * 获取拓扑路径
55
63
  * @returns
@@ -70,25 +78,6 @@ declare class CpsSoonmanagerPlugin {
70
78
  * @returns
71
79
  */
72
80
  fetchModelVisionsData(): Promise<TModelVisionsMap>;
73
- /**
74
- * 加载单个树节点
75
- * @param node
76
- * @param options
77
- * @returns
78
- */
79
- private loadNode;
80
- /**
81
- * 根据 id 获取树节点
82
- */
83
- private getTreeNodeById;
84
- /**
85
- * 加载场景树中的对象 (深度优先遍历)
86
- */
87
- private loadObjects;
88
- /**
89
- * 加载场景树中的对象 (广度优先遍历)
90
- */
91
- private loadObjectsBFS;
92
81
  /**
93
82
  * 设置 path
94
83
  * @param path
@@ -98,6 +87,14 @@ declare class CpsSoonmanagerPlugin {
98
87
  * 加载整个场景
99
88
  */
100
89
  loadScene(options?: ILoadSceneOptions): Promise<void>;
90
+ /**
91
+ * 格式化 Poi 数据完成 Poi Renderer 插件使用
92
+ */
93
+ formatPoiData: (poiData: IPoiData) => PoiNodeData;
94
+ /**
95
+ * 加载 Poi
96
+ */
97
+ loadPoi(): Promise<void>;
101
98
  /**
102
99
  * 预设效果
103
100
  */