soonspacejs 2.13.7 → 2.13.9
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.
- package/README.md +8 -8
- package/dist/index.esm.js +2 -2
- package/package.json +2 -2
- package/types/Viewport/index.d.ts +1 -0
- package/types/index.d.ts +0 -3
- package/dist/src/Animation/createPathAnimation.d.ts +0 -61
- package/dist/src/Animation/index.d.ts +0 -4
- package/dist/src/Animation/path-animation.d.ts +0 -108
- package/dist/src/Cache/ObjectsCache.d.ts +0 -19
- package/dist/src/Cache/index.d.ts +0 -1
- package/dist/src/Constants/headers.d.ts +0 -1
- package/dist/src/Constants/index.d.ts +0 -22
- package/dist/src/Constants/viewpoints.d.ts +0 -7
- package/dist/src/Controls/index.d.ts +0 -14
- package/dist/src/Interface/animation.d.ts +0 -10
- package/dist/src/Interface/base.d.ts +0 -63
- package/dist/src/Interface/controls.d.ts +0 -94
- package/dist/src/Interface/events.d.ts +0 -40
- package/dist/src/Interface/gmlToJson.d.ts +0 -189
- package/dist/src/Interface/index.d.ts +0 -13
- package/dist/src/Interface/manager.d.ts +0 -177
- package/dist/src/Interface/modelAnimation.d.ts +0 -5
- package/dist/src/Interface/plugin.d.ts +0 -7
- package/dist/src/Interface/poiMesh.d.ts +0 -23
- package/dist/src/Interface/sbmCache.d.ts +0 -19
- package/dist/src/Interface/sbmXmlToJson.d.ts +0 -131
- package/dist/src/Interface/signals.d.ts +0 -47
- package/dist/src/Interface/viewport.d.ts +0 -208
- package/dist/src/Library/BaseMesh.d.ts +0 -19
- package/dist/src/Library/BaseObject3D.d.ts +0 -37
- package/dist/src/Library/Canvas3D.d.ts +0 -31
- package/dist/src/Library/Circle.d.ts +0 -21
- package/dist/src/Library/Decal.d.ts +0 -30
- package/dist/src/Library/Ground.d.ts +0 -8
- package/dist/src/Library/Group.d.ts +0 -9
- package/dist/src/Library/Icon.d.ts +0 -12
- package/dist/src/Library/Line.d.ts +0 -22
- package/dist/src/Library/Link.d.ts +0 -24
- package/dist/src/Library/Model.d.ts +0 -19
- package/dist/src/Library/Node.d.ts +0 -10
- package/dist/src/Library/PluginObject.d.ts +0 -7
- package/dist/src/Library/Poi.d.ts +0 -38
- package/dist/src/Library/PoiMesh.d.ts +0 -16
- package/dist/src/Library/PoiNode.d.ts +0 -31
- package/dist/src/Library/Point.d.ts +0 -21
- package/dist/src/Library/Polygon.d.ts +0 -23
- package/dist/src/Library/PolygonPoiMesh.d.ts +0 -13
- package/dist/src/Library/Topology.d.ts +0 -37
- package/dist/src/Library/index.d.ts +0 -20
- package/dist/src/Loader/SbmLoader/SDataView.d.ts +0 -11
- package/dist/src/Loader/SbmLoader/SbkDecoder.d.ts +0 -1
- package/dist/src/Loader/SbmLoader/SbmLoader.d.ts +0 -15
- package/dist/src/Loader/SbmLoader/SbmObjectLoader.d.ts +0 -25
- package/dist/src/Loader/SbmLoader/SbmPrivateLoader.d.ts +0 -39
- package/dist/src/Loader/SbmLoader/SbmPublicLoader.d.ts +0 -38
- package/dist/src/Loader/SbmLoader/index.d.ts +0 -2
- package/dist/src/Loader/SbmLoader/utils/generateSbm.d.ts +0 -26
- package/dist/src/Manager/Canvas3DManage.d.ts +0 -14
- package/dist/src/Manager/DecalManage.d.ts +0 -22
- package/dist/src/Manager/DefaultManage.d.ts +0 -19
- package/dist/src/Manager/GroupManage.d.ts +0 -9
- package/dist/src/Manager/HelperManage.d.ts +0 -23
- package/dist/src/Manager/LightManage.d.ts +0 -25
- package/dist/src/Manager/ModelManage.d.ts +0 -106
- package/dist/src/Manager/PluginObjectManage.d.ts +0 -13
- package/dist/src/Manager/PoiManage.d.ts +0 -25
- package/dist/src/Manager/PoiNodeManage.d.ts +0 -14
- package/dist/src/Manager/TopologyManage.d.ts +0 -68
- package/dist/src/Manager/index.d.ts +0 -83
- package/dist/src/Math/dijkstra/DijkstraWorker.d.ts +0 -13
- package/dist/src/Math/dijkstra/dijkstra.worker.d.ts +0 -2
- package/dist/src/Math/dijkstra/index.d.ts +0 -54
- package/dist/src/Math/index.d.ts +0 -2
- package/dist/src/Renderer/CSS2DRenderer.d.ts +0 -25
- package/dist/src/Renderer/CSS3DRenderer.d.ts +0 -28
- package/dist/src/Renderer/index.d.ts +0 -2
- package/dist/src/Shared/MinHeap.d.ts +0 -22
- package/dist/src/Shared/buffer.d.ts +0 -2
- package/dist/src/Shared/cloneDeep.d.ts +0 -2
- package/dist/src/Shared/ctx.d.ts +0 -5
- package/dist/src/Shared/index.d.ts +0 -47
- package/dist/src/Shared/log.d.ts +0 -4
- package/dist/src/Shared/map.d.ts +0 -11
- package/dist/src/Shared/material.d.ts +0 -3
- package/dist/src/Shared/network.d.ts +0 -7
- package/dist/src/Shared/occlude.d.ts +0 -5
- package/dist/src/Shared/path.d.ts +0 -1
- package/dist/src/Shared/task.d.ts +0 -1
- package/dist/src/Shared/viewport.d.ts +0 -40
- package/dist/src/Shared/xml.d.ts +0 -2
- package/dist/src/Signals/index.d.ts +0 -3
- package/dist/src/Viewport/Bvh/GenerateMeshBVHWorker.d.ts +0 -11
- package/dist/src/Viewport/Bvh/generateBVH.worker.d.ts +0 -1
- package/dist/src/Viewport/Bvh/index.d.ts +0 -18
- package/dist/src/Viewport/CameraManager.d.ts +0 -34
- package/dist/src/Viewport/EffectManager.d.ts +0 -45
- package/dist/src/Viewport/EventHandler.d.ts +0 -50
- package/dist/src/Viewport/Info.d.ts +0 -17
- package/dist/src/Viewport/RendererManager.d.ts +0 -26
- package/dist/src/Viewport/Scener.d.ts +0 -43
- package/dist/src/Viewport/ViewHelper.d.ts +0 -15
- package/dist/src/Viewport/index.d.ts +0 -131
- package/dist/src/exporters/index.d.ts +0 -6
- package/dist/src/index.d.ts +0 -1286
- package/dist/src/three-patches.d.ts +0 -1
- package/dist/src/tools/find-objects.d.ts +0 -47
- package/dist/src/tools/index.d.ts +0 -2
- package/dist/src/tools/units.d.ts +0 -48
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import Viewport from '../Viewport';
|
|
2
|
-
import DefaultManage from './DefaultManage';
|
|
3
|
-
import { GridHelper, AxesHelper, Box3Helper, DirectionalLightHelper, HemisphereLightHelper, SpotLightHelper, PointLightHelper } from 'three';
|
|
4
|
-
import { RectAreaLightHelper } from 'three/examples/jsm/helpers/RectAreaLightHelper.js';
|
|
5
|
-
import { GridHelperOptions, AxesHelperOptions, BoxHelperOptions, PlaneHelperOptions, GroundHelperOptions, DirectionalLightHelperOptions, HemisphereLightHelperOptions, SpotLightHelperOptions, PointLightHelperOptions, RectAreaLightHelperOptions } from '../Interface';
|
|
6
|
-
import { BaseMesh, Ground } from '../Library';
|
|
7
|
-
import { ObjectsCache } from '../Cache';
|
|
8
|
-
declare class HelperManage extends DefaultManage {
|
|
9
|
-
readonly viewport: Viewport;
|
|
10
|
-
readonly cache: ObjectsCache;
|
|
11
|
-
constructor(viewport: Viewport, cache: ObjectsCache);
|
|
12
|
-
addGridHelper(options: GridHelperOptions): GridHelper;
|
|
13
|
-
addAxesHelper(options: AxesHelperOptions): AxesHelper;
|
|
14
|
-
addBoxHelper(options: BoxHelperOptions): Box3Helper;
|
|
15
|
-
addPlaneHelper(options: PlaneHelperOptions): BaseMesh;
|
|
16
|
-
addGroundHelper(options: GroundHelperOptions): Promise<Ground>;
|
|
17
|
-
addDirectionalLightHelper(options: DirectionalLightHelperOptions): DirectionalLightHelper;
|
|
18
|
-
addHemisphereLightHelper(options: HemisphereLightHelperOptions): HemisphereLightHelper;
|
|
19
|
-
addSpotLightHelper(options: SpotLightHelperOptions): SpotLightHelper;
|
|
20
|
-
addPointLightHelper(options: PointLightHelperOptions): PointLightHelper;
|
|
21
|
-
addRectAreaLightHelper(options: RectAreaLightHelperOptions): RectAreaLightHelper;
|
|
22
|
-
}
|
|
23
|
-
export default HelperManage;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { AmbientLight, DirectionalLight, HemisphereLight, SpotLight, PointLight, RectAreaLight } from 'three';
|
|
2
|
-
import DefaultManage from './DefaultManage';
|
|
3
|
-
import Viewport from '../Viewport';
|
|
4
|
-
import { AmbientLightOptions, DirectionalLightOptions, HemisphereLightOptions, SpotLightOptions, PointLightOptions, RectAreaLightOptions } from '../Interface';
|
|
5
|
-
import { ObjectsCache } from '../Cache';
|
|
6
|
-
declare class LightManage extends DefaultManage {
|
|
7
|
-
readonly viewport: Viewport;
|
|
8
|
-
readonly cache: ObjectsCache;
|
|
9
|
-
constructor(viewport: Viewport, cache: ObjectsCache);
|
|
10
|
-
createAmbientLight(options: AmbientLightOptions): AmbientLight;
|
|
11
|
-
setAmbientLight(light: AmbientLight | null, options: AmbientLightOptions): boolean;
|
|
12
|
-
createDirectionalLight(options: DirectionalLightOptions): DirectionalLight;
|
|
13
|
-
setDirectionalLight(light: DirectionalLight | null, options: DirectionalLightOptions): boolean;
|
|
14
|
-
createHemisphereLight(options: HemisphereLightOptions): HemisphereLight;
|
|
15
|
-
setHemisphereLight(light: HemisphereLight | null, options: HemisphereLightOptions): boolean;
|
|
16
|
-
createSpotLight(options: SpotLightOptions): SpotLight;
|
|
17
|
-
setSpotLight(light: SpotLight | null, options: SpotLightOptions): boolean;
|
|
18
|
-
createPointLight(options: PointLightOptions): PointLight;
|
|
19
|
-
setPointLight(light: PointLight | null, options: PointLightOptions): boolean;
|
|
20
|
-
createRectAreaLight(options: RectAreaLightOptions): RectAreaLight;
|
|
21
|
-
setRectAreaLight(light: RectAreaLight | null, options: RectAreaLightOptions): boolean;
|
|
22
|
-
updateAllShadow(): void;
|
|
23
|
-
dispose(): void;
|
|
24
|
-
}
|
|
25
|
-
export default LightManage;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { LoadingManager, Object3D } from 'three';
|
|
2
|
-
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
3
|
-
import { STLLoader } from 'three/examples/jsm/loaders/STLLoader.js';
|
|
4
|
-
import localforage from 'localforage';
|
|
5
|
-
import { FBXLoader } from '../Loader/FBXLoader.js';
|
|
6
|
-
import { OBJLoader } from '../Loader/OBJLoader.js';
|
|
7
|
-
import Viewport from '../Viewport';
|
|
8
|
-
import { Group, GroupInfo, Model, ModelInfo } from '../Library';
|
|
9
|
-
import { CloneModelInfo } from '../Interface';
|
|
10
|
-
import { ObjectsCache } from '../Cache';
|
|
11
|
-
import DefaultManage from './DefaultManage';
|
|
12
|
-
declare class ModelManage extends DefaultManage {
|
|
13
|
-
readonly viewport: Viewport;
|
|
14
|
-
readonly cache: ObjectsCache;
|
|
15
|
-
/**
|
|
16
|
-
* 场景是否卸载
|
|
17
|
-
*/
|
|
18
|
-
isDisposed: boolean;
|
|
19
|
-
modelsPromiseMap: Map<string, Promise<Model | null>>;
|
|
20
|
-
modelsMap: Map<string, Model>;
|
|
21
|
-
_dbReady: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* workaround for types
|
|
24
|
-
*/
|
|
25
|
-
store: typeof localforage;
|
|
26
|
-
cacheStore: typeof localforage;
|
|
27
|
-
loadingManager: LoadingManager;
|
|
28
|
-
gltfLoader: GLTFLoader;
|
|
29
|
-
fbxLoader: FBXLoader;
|
|
30
|
-
objLoader: OBJLoader;
|
|
31
|
-
stlLoader: STLLoader;
|
|
32
|
-
constructor(viewport: Viewport, cache: ObjectsCache);
|
|
33
|
-
/**
|
|
34
|
-
* 设置 draco path
|
|
35
|
-
* @param path
|
|
36
|
-
*/
|
|
37
|
-
setDracoDecoderPath(path: string): void;
|
|
38
|
-
setKtx2DecoderPath(path: string): void;
|
|
39
|
-
/**
|
|
40
|
-
* 加载模型
|
|
41
|
-
* @param modelInfo
|
|
42
|
-
* @returns
|
|
43
|
-
*/
|
|
44
|
-
load(modelInfo: ModelInfo, parent?: Object3D | null): Promise<Model | null>;
|
|
45
|
-
/**
|
|
46
|
-
* 模型解析
|
|
47
|
-
* @param format
|
|
48
|
-
* @param buffer
|
|
49
|
-
* @param modelInfo
|
|
50
|
-
* @returns
|
|
51
|
-
*/
|
|
52
|
-
parse(modelInfo: ModelInfo): Promise<Model | null>;
|
|
53
|
-
clone(model: Model, info: CloneModelInfo, parent?: Object3D | null): Promise<Model>;
|
|
54
|
-
loadToGroup(groupInfo: GroupInfo, modelInfo: ModelInfo[]): Promise<Group>;
|
|
55
|
-
addForGroup(group: Group | null, modelInfo: ModelInfo[]): Promise<Group | null>;
|
|
56
|
-
/**
|
|
57
|
-
* 清空本地模型缓存数据
|
|
58
|
-
*/
|
|
59
|
-
clearIdb(): Promise<void>;
|
|
60
|
-
dispose(): void;
|
|
61
|
-
_checkDbReady(): Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
* private methods
|
|
64
|
-
*/
|
|
65
|
-
private _initLoadingManager;
|
|
66
|
-
private _setModelsMap;
|
|
67
|
-
/**
|
|
68
|
-
* 解析 sbm 格式
|
|
69
|
-
* @param modelInfo
|
|
70
|
-
* @returns
|
|
71
|
-
*/
|
|
72
|
-
private _parseSbm;
|
|
73
|
-
/**
|
|
74
|
-
* 解析 sbmx 格式
|
|
75
|
-
* @param modelInfo
|
|
76
|
-
* @returns
|
|
77
|
-
*/
|
|
78
|
-
private _parseSbmx;
|
|
79
|
-
/**
|
|
80
|
-
* 解析 gltf、glb 格式
|
|
81
|
-
* @param modelInfo
|
|
82
|
-
* @param _buffer
|
|
83
|
-
* @returns
|
|
84
|
-
*/
|
|
85
|
-
private _parseGltf;
|
|
86
|
-
/**
|
|
87
|
-
* 解析 fbx 格式
|
|
88
|
-
* @param modelInfo
|
|
89
|
-
* @returns
|
|
90
|
-
*/
|
|
91
|
-
private _parseFbx;
|
|
92
|
-
/**
|
|
93
|
-
* 解析 obj 格式
|
|
94
|
-
* @param modelInfo
|
|
95
|
-
*/
|
|
96
|
-
private _parseObj;
|
|
97
|
-
/**
|
|
98
|
-
* 解析 stl 格式
|
|
99
|
-
* @param modelInfo
|
|
100
|
-
*/
|
|
101
|
-
private _parseStl;
|
|
102
|
-
private _innerLoad;
|
|
103
|
-
private _fetchBuffer;
|
|
104
|
-
private _getBuffer;
|
|
105
|
-
}
|
|
106
|
-
export default ModelManage;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Object3D } from 'three';
|
|
2
|
-
import DefaultManage from './DefaultManage';
|
|
3
|
-
import { PluginObject, PluginObjectInfo } from '../Library';
|
|
4
|
-
import Viewport from '../Viewport';
|
|
5
|
-
import { ObjectsCache } from '../Cache';
|
|
6
|
-
declare class PluginManage extends DefaultManage {
|
|
7
|
-
readonly viewport: Viewport;
|
|
8
|
-
readonly cache: ObjectsCache;
|
|
9
|
-
constructor(viewport: Viewport, cache: ObjectsCache);
|
|
10
|
-
createObject(info: PluginObjectInfo, object?: Object3D): PluginObject;
|
|
11
|
-
addToObject(pluginObject: PluginObject | null, object: Object3D): PluginObject | null;
|
|
12
|
-
}
|
|
13
|
-
export default PluginManage;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { SpriteMaterial, Texture, CanvasTexture, Object3D, MeshBasicMaterial, Mesh } from 'three';
|
|
2
|
-
import DefaultManage from './DefaultManage';
|
|
3
|
-
import { Poi, PoiInfo, Group, GroupInfo, Icon, NameCanvasInfo } from '../Library';
|
|
4
|
-
import { ClonePoiInfo, PoiType } from '../Interface';
|
|
5
|
-
import Viewport from '../Viewport';
|
|
6
|
-
import { ObjectsCache } from '../Cache';
|
|
7
|
-
declare class PoiManage extends DefaultManage {
|
|
8
|
-
readonly viewport: Viewport;
|
|
9
|
-
readonly cache: ObjectsCache;
|
|
10
|
-
textures: Map<string, Texture>;
|
|
11
|
-
constructor(viewport: Viewport, cache: ObjectsCache);
|
|
12
|
-
_createIcon(info: PoiInfo): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap> | Icon;
|
|
13
|
-
_createIconMaterial({ url, type, }: PoiInfo): MeshBasicMaterial | SpriteMaterial | undefined;
|
|
14
|
-
_createText(info: PoiInfo): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap> | Icon;
|
|
15
|
-
_createTextMaterial(info: PoiInfo): MeshBasicMaterial | SpriteMaterial;
|
|
16
|
-
_createTextTexture(info: ClonePoiInfo): CanvasTexture;
|
|
17
|
-
_createTextCanvas(text: string, info?: NameCanvasInfo): HTMLCanvasElement;
|
|
18
|
-
_computeMaterialSizeAttenuation(material: SpriteMaterial, iconType?: PoiType): SpriteMaterial;
|
|
19
|
-
protected _create(info: PoiInfo): Poi;
|
|
20
|
-
create(info: PoiInfo): Poi;
|
|
21
|
-
clone(poi: Poi, poiInfo: ClonePoiInfo, parent?: Object3D | null): Poi | void;
|
|
22
|
-
createToGroup(groupInfo: GroupInfo, poiInfo: PoiInfo[]): Group;
|
|
23
|
-
addForGroup(group: Group | null, poiInfo: PoiInfo[]): Group | null;
|
|
24
|
-
}
|
|
25
|
-
export default PoiManage;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import DefaultManage from './DefaultManage';
|
|
2
|
-
import Viewport from '../Viewport';
|
|
3
|
-
import { PoiNode, PoiNodeInfo, Group, GroupInfo } from '../Library';
|
|
4
|
-
import { ObjectsCache } from '../Cache';
|
|
5
|
-
declare class PoiNodeManage extends DefaultManage {
|
|
6
|
-
readonly viewport: Viewport;
|
|
7
|
-
readonly cache: ObjectsCache;
|
|
8
|
-
constructor(viewport: Viewport, cache: ObjectsCache);
|
|
9
|
-
create(info: PoiNodeInfo): PoiNode;
|
|
10
|
-
createToGroup(groupInfo: GroupInfo, poiNodeInfo: PoiNodeInfo[]): Group;
|
|
11
|
-
addForGroup(group: Group | null, poiNodeInfo: PoiNodeInfo[]): Group | null;
|
|
12
|
-
_openEnableRenderCss(info: PoiNodeInfo): void;
|
|
13
|
-
}
|
|
14
|
-
export default PoiNodeManage;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import DefaultManage from './DefaultManage';
|
|
2
|
-
import { Group, GroupInfo, Topology, Node, TopologyInfo } from '../Library';
|
|
3
|
-
import { TopologyInfoForGml, ShortestPathInfo, ShortestPathByMultipleStartPoints, ShortestPathByMultipleEndPoints, TopologyNodeInfo, TopologyInnerNodeInfo, Position, TopologyPassableInfo } from '../Interface';
|
|
4
|
-
import Viewport from '../Viewport';
|
|
5
|
-
import { Dijkstras } from '../Math/dijkstra';
|
|
6
|
-
import { DijkstraWorker } from '../Math/dijkstra/DijkstraWorker';
|
|
7
|
-
import { ObjectsCache } from '../Cache';
|
|
8
|
-
declare class TopologyManage extends DefaultManage {
|
|
9
|
-
readonly viewport: Viewport;
|
|
10
|
-
readonly cache: ObjectsCache;
|
|
11
|
-
dijkstra: Dijkstras;
|
|
12
|
-
dijkstraWorker: DijkstraWorker;
|
|
13
|
-
constructor(viewport: Viewport, cache: ObjectsCache);
|
|
14
|
-
createFromGml(topologyInfoForGml: TopologyInfoForGml): Promise<Topology>;
|
|
15
|
-
create(topologyInfo: TopologyInfo): Topology;
|
|
16
|
-
/**
|
|
17
|
-
* 设置路径 passable
|
|
18
|
-
*/
|
|
19
|
-
setPassable(topology: Topology, info: TopologyPassableInfo[]): void;
|
|
20
|
-
resetNodes(topology: Topology, nodes: TopologyNodeInfo[]): Topology;
|
|
21
|
-
createToGroup(groupInfo: GroupInfo, topologyInfos: TopologyInfo[]): Group;
|
|
22
|
-
addForGroup(group: Group | null, topologyInfos: TopologyInfo[]): Group | null;
|
|
23
|
-
/**
|
|
24
|
-
* 计算路径
|
|
25
|
-
* @param topology
|
|
26
|
-
* @param info
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
protected _getPath(topology: Topology, info: Pick<ShortestPathInfo, 'start' | 'end'>): Node[] | null;
|
|
30
|
-
/**
|
|
31
|
-
* @todo getPath 重复代码优化
|
|
32
|
-
*/
|
|
33
|
-
protected _getPathAsync(topology: Topology, info: Pick<ShortestPathInfo, 'start' | 'end'>): Promise<Node[] | null>;
|
|
34
|
-
protected _generateNodesInfo(nodes: Node[]): TopologyInnerNodeInfo[];
|
|
35
|
-
/**
|
|
36
|
-
* 根据两点获取最短路径
|
|
37
|
-
* @param topology
|
|
38
|
-
* @param info
|
|
39
|
-
* @returns
|
|
40
|
-
*/
|
|
41
|
-
getShortestPath(topology: Topology, info: ShortestPathInfo): Topology | null;
|
|
42
|
-
/**
|
|
43
|
-
* @todo getShortestPathAsync 重复代码优化
|
|
44
|
-
*/
|
|
45
|
-
getShortestPathAsync(topology: Topology, info: ShortestPathInfo): Promise<Topology | null>;
|
|
46
|
-
/**
|
|
47
|
-
* 多起点或多终点最短路径
|
|
48
|
-
* @param topology
|
|
49
|
-
* @param info
|
|
50
|
-
* @param points
|
|
51
|
-
* @param point
|
|
52
|
-
* @param pointsType
|
|
53
|
-
* @returns
|
|
54
|
-
*/
|
|
55
|
-
protected _getShortestPathByMultiplePoints(topology: Topology, info: ShortestPathByMultipleStartPoints | ShortestPathByMultipleEndPoints, points: Position[], point: Position, pointsType: 'start' | 'end'): Topology | null;
|
|
56
|
-
/**
|
|
57
|
-
* @todo getShortestPathByMultiplePointsAsync 重复代码优化
|
|
58
|
-
*/
|
|
59
|
-
protected _getShortestPathByMultiplePointsAsync(topology: Topology, info: ShortestPathByMultipleStartPoints | ShortestPathByMultipleEndPoints, points: Position[], point: Position, pointsType: 'start' | 'end'): Promise<Topology | null>;
|
|
60
|
-
getShortestPathByMultipleStartPoints(topology: Topology, info: ShortestPathByMultipleStartPoints): Topology | null;
|
|
61
|
-
getShortestPathByMultipleEndPoints(topology: Topology, info: ShortestPathByMultipleEndPoints): Topology | null;
|
|
62
|
-
getShortestPathByMultipleStartPointsAsync(topology: Topology, info: ShortestPathByMultipleStartPoints): Promise<Topology | null>;
|
|
63
|
-
getShortestPathByMultipleEndPointsAsync(topology: Topology, info: ShortestPathByMultipleEndPoints): Promise<Topology | null>;
|
|
64
|
-
private setDijkstraGraph;
|
|
65
|
-
private generateLineTopologyInfoNodeGraphs;
|
|
66
|
-
dispose(): void;
|
|
67
|
-
}
|
|
68
|
-
export default TopologyManage;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { Object3D } from 'three';
|
|
2
|
-
import Viewport from '../Viewport';
|
|
3
|
-
import { BaseObject3D } from '../Library';
|
|
4
|
-
import LightManage from './LightManage';
|
|
5
|
-
import ModelManage from './ModelManage';
|
|
6
|
-
import PoiManage from './PoiManage';
|
|
7
|
-
import PoiNodeManage from './PoiNodeManage';
|
|
8
|
-
import Canvas3DManage from './Canvas3DManage';
|
|
9
|
-
import TopologyManage from './TopologyManage';
|
|
10
|
-
import HelperManage from './HelperManage';
|
|
11
|
-
import PluginObjectManage from './PluginObjectManage';
|
|
12
|
-
import GroupManage from './GroupManage';
|
|
13
|
-
import DecalManage from './DecalManage';
|
|
14
|
-
import { UserDataPropertyFindFunc } from '../Interface';
|
|
15
|
-
import { ObjectsCache } from '../Cache';
|
|
16
|
-
interface ManagerStore {
|
|
17
|
-
groupManager: GroupManage;
|
|
18
|
-
lightManager: LightManage;
|
|
19
|
-
modelManager: ModelManage;
|
|
20
|
-
poiManager: PoiManage;
|
|
21
|
-
poiNodeManager: PoiNodeManage;
|
|
22
|
-
canvas3DManager: Canvas3DManage;
|
|
23
|
-
topologyManager: TopologyManage;
|
|
24
|
-
helperManager: HelperManage;
|
|
25
|
-
decalManager: DecalManage;
|
|
26
|
-
pluginObjectManager: PluginObjectManage;
|
|
27
|
-
}
|
|
28
|
-
declare class Manager {
|
|
29
|
-
readonly viewport: Viewport;
|
|
30
|
-
readonly cache: ObjectsCache;
|
|
31
|
-
readonly scene: import("three").Scene;
|
|
32
|
-
readonly store: ManagerStore;
|
|
33
|
-
constructor(viewport: Viewport, cache: ObjectsCache);
|
|
34
|
-
/**
|
|
35
|
-
* level update
|
|
36
|
-
* @returns
|
|
37
|
-
*/
|
|
38
|
-
levelUpdate(): void;
|
|
39
|
-
/**
|
|
40
|
-
* scale fixed
|
|
41
|
-
*/
|
|
42
|
-
scaleFixedUpdate(): void;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* frame update
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
update(): void;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* objects
|
|
52
|
-
*
|
|
53
|
-
*/
|
|
54
|
-
/**
|
|
55
|
-
* 检查是否存在于场景
|
|
56
|
-
* @param object
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
private isObjectInScene;
|
|
60
|
-
getObjectById<T extends Object3D>(id: BaseObject3D['sid']): T | null;
|
|
61
|
-
getObjectByName<T extends Object3D>(name: string): T[];
|
|
62
|
-
getObjectByUserDataProperty<T extends Object3D>(propNameOrFindFunc: string | UserDataPropertyFindFunc, propValue?: any): T[];
|
|
63
|
-
removeObjectById(id: BaseObject3D['sid']): boolean;
|
|
64
|
-
_getObjectByProps<T extends Object3D>(key: 'sid' | 'name', value: any): T[];
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* cache
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
getObjectCache<T extends Object3D>(sid: BaseObject3D['sid']): T | undefined;
|
|
71
|
-
setObjectCache<T extends Object3D>(object?: T): void;
|
|
72
|
-
deleteObjectCache<T extends Object3D>(object?: T): void;
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
* clear object
|
|
76
|
-
*
|
|
77
|
-
*/
|
|
78
|
-
clearObject(): void;
|
|
79
|
-
clear(): void;
|
|
80
|
-
dispose(): void;
|
|
81
|
-
}
|
|
82
|
-
export { ManagerStore, };
|
|
83
|
-
export default Manager;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { WorkerPool } from 'three/examples/jsm/utils/WorkerPool.js';
|
|
2
|
-
import { BaseId, Dijkstras, InputGraph } from './index';
|
|
3
|
-
declare class DijkstraWorker {
|
|
4
|
-
readonly dijkstra: Dijkstras;
|
|
5
|
-
workerPool: WorkerPool;
|
|
6
|
-
workerSourceURL: string | null;
|
|
7
|
-
_mainThreadGraph: InputGraph;
|
|
8
|
-
_needsUpdateGraph: boolean;
|
|
9
|
-
constructor(dijkstra: Dijkstras);
|
|
10
|
-
getPath(source: BaseId, target: BaseId): Promise<BaseId[]>;
|
|
11
|
-
dispose(): void;
|
|
12
|
-
}
|
|
13
|
-
export { DijkstraWorker, };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { BaseObjectInfo } from '../../Interface';
|
|
2
|
-
import { MinHeap } from '../../Shared';
|
|
3
|
-
/**
|
|
4
|
-
* Javascript implementation of Dijkstra's algorithm
|
|
5
|
-
* Based on: http://en.wikipedia.org/wiki/Dijkstra's_algorithm
|
|
6
|
-
* Author: James Jackson (www.jamesdavidjackson.com)
|
|
7
|
-
* Source: https://github.com/nojacko/dijkstras-js
|
|
8
|
-
*
|
|
9
|
-
* Useage:
|
|
10
|
-
* const d = new Dijkstras();
|
|
11
|
-
* d.setGraph(
|
|
12
|
-
* [
|
|
13
|
-
* ['A', [['B', 20], ['C', 20]] ],
|
|
14
|
-
* ['B', [['A', 30], ['C', 100]] ],
|
|
15
|
-
* ['C', [['D', 10], ['A', 20]] ],
|
|
16
|
-
* ['D', [['C', 10], ['B', 20]] ]
|
|
17
|
-
* ]
|
|
18
|
-
* );
|
|
19
|
-
* const path = d.getPath('A', 'D');
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
export type BaseId = BaseObjectInfo['id'];
|
|
23
|
-
type Graph = Map<BaseId, Map<BaseId, number>>;
|
|
24
|
-
type InputGraph = [BaseId, [BaseId, number][]][];
|
|
25
|
-
declare class Dijkstras {
|
|
26
|
-
graph: Graph;
|
|
27
|
-
queue: MinHeap | null;
|
|
28
|
-
previous: Map<BaseId, BaseId | null>;
|
|
29
|
-
constructor();
|
|
30
|
-
/**
|
|
31
|
-
* Creates a graph from array.
|
|
32
|
-
* Each element in the array should be in the format:
|
|
33
|
-
* [NODE NAME, [[NODE NAME, COST], ...] ]
|
|
34
|
-
*
|
|
35
|
-
* For example: [
|
|
36
|
-
* ['A', [['B', 20], ['C', 20]] ],
|
|
37
|
-
* ['B', [['A', 30], ['C', 100]] ],
|
|
38
|
-
* ['C', [['D', 10], ['A', 20]] ],
|
|
39
|
-
* ['D', [['C', 10], ['B', 20]] ]
|
|
40
|
-
* ]
|
|
41
|
-
*
|
|
42
|
-
* @param graphy Array of nodes and vertices.
|
|
43
|
-
**/
|
|
44
|
-
setGraph(graph: InputGraph): void;
|
|
45
|
-
/**
|
|
46
|
-
* Find shortest path
|
|
47
|
-
*
|
|
48
|
-
* @param source The starting node.
|
|
49
|
-
* @param target The target node.
|
|
50
|
-
* @return array Path to target, or empty array if unable to find path.
|
|
51
|
-
*/
|
|
52
|
-
getPath(source: BaseId, target: BaseId): BaseId[];
|
|
53
|
-
}
|
|
54
|
-
export { Graph, InputGraph, Dijkstras, };
|
package/dist/src/Math/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Camera, Object3D } from 'three';
|
|
2
|
-
import { ObjectsCache } from '../Cache';
|
|
3
|
-
import Viewport from '../Viewport';
|
|
4
|
-
type PoiNodeSet = ObjectsCache['classified']['PoiNode'];
|
|
5
|
-
declare class CSS2DObject extends Object3D {
|
|
6
|
-
isCSS2DObject: boolean;
|
|
7
|
-
element: HTMLElement;
|
|
8
|
-
constructor(element?: HTMLElement);
|
|
9
|
-
copy(source: this, recursive: boolean): this;
|
|
10
|
-
}
|
|
11
|
-
export type CSS2DRendererParameters = {
|
|
12
|
-
element?: HTMLElement;
|
|
13
|
-
};
|
|
14
|
-
declare class CSS2DRenderer {
|
|
15
|
-
readonly viewport: Viewport;
|
|
16
|
-
domElement: HTMLElement;
|
|
17
|
-
getSize: () => {
|
|
18
|
-
width: number;
|
|
19
|
-
height: number;
|
|
20
|
-
};
|
|
21
|
-
render: (poiNodeSet: PoiNodeSet, camera: Camera) => void;
|
|
22
|
-
setSize: (width: number, height: number) => void;
|
|
23
|
-
constructor(viewport: Viewport);
|
|
24
|
-
}
|
|
25
|
-
export { CSS2DObject, CSS2DRenderer, };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Object3D, OrthographicCamera, PerspectiveCamera } from 'three';
|
|
2
|
-
import { ObjectsCache } from '../Cache';
|
|
3
|
-
import Viewport from '../Viewport';
|
|
4
|
-
type PoiNodeSet = ObjectsCache['classified']['PoiNode'];
|
|
5
|
-
declare class CSS3DObject extends Object3D {
|
|
6
|
-
isCSS3DObject: boolean;
|
|
7
|
-
element: HTMLElement;
|
|
8
|
-
constructor(element?: HTMLElement);
|
|
9
|
-
copy(source: this, recursive: boolean): this;
|
|
10
|
-
}
|
|
11
|
-
declare class CSS3DSprite extends CSS3DObject {
|
|
12
|
-
isCSS3DSprite: boolean;
|
|
13
|
-
rotation2D: number;
|
|
14
|
-
constructor(element: HTMLElement);
|
|
15
|
-
copy(source: this, recursive: boolean): this;
|
|
16
|
-
}
|
|
17
|
-
declare class CSS3DRenderer {
|
|
18
|
-
readonly viewport: Viewport;
|
|
19
|
-
domElement: HTMLElement;
|
|
20
|
-
getSize: () => {
|
|
21
|
-
width: number;
|
|
22
|
-
height: number;
|
|
23
|
-
};
|
|
24
|
-
render: (poiNodeSet: PoiNodeSet, camera: PerspectiveCamera | OrthographicCamera) => void;
|
|
25
|
-
setSize: (width: number, height: number) => void;
|
|
26
|
-
constructor(viewport: Viewport);
|
|
27
|
-
}
|
|
28
|
-
export { CSS3DObject, CSS3DSprite, CSS3DRenderer, };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BaseObjectInfo } from '../Interface';
|
|
2
|
-
type BaseId = BaseObjectInfo['id'];
|
|
3
|
-
interface MinHeapNode {
|
|
4
|
-
nodeIndex: BaseId;
|
|
5
|
-
distance: number;
|
|
6
|
-
depth: number;
|
|
7
|
-
parent: null | BaseId;
|
|
8
|
-
children: BaseId[];
|
|
9
|
-
}
|
|
10
|
-
declare class MinHeap {
|
|
11
|
-
min: BaseId | null;
|
|
12
|
-
roots: BaseId[];
|
|
13
|
-
nodes: Map<BaseId, MinHeapNode>;
|
|
14
|
-
constructor();
|
|
15
|
-
shift(): string | null;
|
|
16
|
-
consolidate(): void;
|
|
17
|
-
add(nodeIndex: BaseId, distance: number): void;
|
|
18
|
-
update(nodeIndex: BaseId, distance: number): void;
|
|
19
|
-
remove(nodeIndex: BaseId): void;
|
|
20
|
-
getDistance(nodeIndex: BaseId): number;
|
|
21
|
-
}
|
|
22
|
-
export { MinHeapNode, MinHeap, };
|
package/dist/src/Shared/ctx.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
declare const hasOwn: (val: object, key: string | symbol) => key is never;
|
|
2
|
-
declare const isString: (val: unknown) => val is string;
|
|
3
|
-
declare const isBoolean: (val: unknown) => val is boolean;
|
|
4
|
-
declare const isNumber: (val: unknown) => val is number;
|
|
5
|
-
declare const isNull: (val: unknown) => val is null;
|
|
6
|
-
declare const isUndefined: (val: unknown) => val is null;
|
|
7
|
-
declare const isSymbol: (val: unknown) => val is symbol;
|
|
8
|
-
declare const isDate: (val: unknown) => val is Date;
|
|
9
|
-
declare const isArray: (arg: any) => arg is any[];
|
|
10
|
-
declare const isObject: <T = Record<any, any>>(val: unknown) => val is T;
|
|
11
|
-
declare const isFunction: (val: unknown) => val is () => void;
|
|
12
|
-
declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
|
|
13
|
-
declare const getValueType: (val: any) => string;
|
|
14
|
-
declare const sleep: (time: number) => Promise<void>;
|
|
15
|
-
declare const getAsciiString: (buf: ArrayBufferLike) => string;
|
|
16
|
-
declare const randomString: () => string;
|
|
17
|
-
declare const getExtension: (url: string) => string | undefined;
|
|
18
|
-
export declare const EPSILON = 0.00001;
|
|
19
|
-
export declare function approxZero(number: number, error?: number): boolean;
|
|
20
|
-
export declare function approxEquals(a: number, b: number, error?: number): boolean;
|
|
21
|
-
export declare function debounce(f: any, delay?: number): (...args: any) => void;
|
|
22
|
-
/**
|
|
23
|
-
* 分组
|
|
24
|
-
* @param list
|
|
25
|
-
* @param key
|
|
26
|
-
* @returns Map
|
|
27
|
-
*/
|
|
28
|
-
export declare function groupBy<T extends Record<string, any>, V = string>(list: T[], key: keyof T): Map<V, T[]>;
|
|
29
|
-
export declare const objectHandle: <T, R = any>(object: T | T[], handler: (m: T) => R) => R | R[];
|
|
30
|
-
export * from './log';
|
|
31
|
-
export * from './viewport';
|
|
32
|
-
export * from './MinHeap';
|
|
33
|
-
export * from './map';
|
|
34
|
-
export * from './path';
|
|
35
|
-
export * from './cloneDeep';
|
|
36
|
-
export * from './material';
|
|
37
|
-
export * from './network';
|
|
38
|
-
export * from './occlude';
|
|
39
|
-
export * from './task';
|
|
40
|
-
export * from './xml';
|
|
41
|
-
export * from './buffer';
|
|
42
|
-
export * from './ctx';
|
|
43
|
-
export { hasOwn, };
|
|
44
|
-
export { isString, isBoolean, isNumber, isNull, isUndefined, isSymbol, };
|
|
45
|
-
export { isDate, isArray, isObject, isFunction, isPromise, };
|
|
46
|
-
export { getValueType, sleep, getAsciiString, randomString, getExtension, };
|
|
47
|
-
export { exportGltf, } from '../exporters';
|
package/dist/src/Shared/log.d.ts
DELETED
package/dist/src/Shared/map.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Texture, CubeTexture, DataTexture } from 'three';
|
|
2
|
-
import { GetTextureOptions, IColor } from '../Interface';
|
|
3
|
-
declare function getTexture({ path, file, }: GetTextureOptions): Promise<CubeTexture | DataTexture | Texture>;
|
|
4
|
-
export { getTexture, };
|
|
5
|
-
interface GradientTextureOptions {
|
|
6
|
-
colors: IColor[];
|
|
7
|
-
stops?: number[];
|
|
8
|
-
size?: number;
|
|
9
|
-
}
|
|
10
|
-
declare function gradientTexture(options?: GradientTextureOptions): Texture | null;
|
|
11
|
-
export { GradientTextureOptions, gradientTexture, };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ImageLoader, TextureLoader } from 'three';
|
|
2
|
-
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';
|
|
3
|
-
export type FileResponseType = 'json' | 'arraybuffer' | 'blob' | 'document' | 'text';
|
|
4
|
-
export declare const fetchFile: <T = any>(url: string, responseType: FileResponseType) => Promise<T>;
|
|
5
|
-
export declare const imageLoader: ImageLoader;
|
|
6
|
-
export declare const textureLoader: TextureLoader;
|
|
7
|
-
export declare const rgbeLoader: RGBELoader;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Vector3, Object3D, Camera, Raycaster } from 'three';
|
|
2
|
-
import Viewport from '../Viewport';
|
|
3
|
-
export declare function isObjectBehindCamera(dir: Vector3, camera: Camera): boolean;
|
|
4
|
-
export declare function isObjectOccludeVisible(el: Object3D, camera: Camera, raycaster: Raycaster, occlude: Object3D[]): boolean;
|
|
5
|
-
export declare function poiNodeOccludeHandler(object: Object3D, viewport: Viewport): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const parseFilePath: (url: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const idleTask: (callback: () => void) => void;
|