soonspacejs 2.8.6 → 2.8.8
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/dist/index.esm.js +2 -2
- package/package.json +2 -2
- package/types/Interface/manager.d.ts +0 -2
- package/types/Library/Link.d.ts +1 -3
- package/types/Manager/TopologyManage.d.ts +30 -2
- package/types/Viewport/CameraManager.d.ts +2 -2
- package/types/Viewport/EffectManager.d.ts +1 -1
- package/types/Viewport/ViewHelper.d.ts +1 -0
- package/types/Viewport/index.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soonspacejs",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.8",
|
|
4
4
|
"homepage": "http://www.xwbuilders.com:8800/",
|
|
5
5
|
"description": "soonspacejs 2.x",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"three": ">=0.152.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "f359f899e53f50f4ed86161539026ebfc8fe3e6f"
|
|
32
32
|
}
|
package/types/Library/Link.d.ts
CHANGED
|
@@ -3,11 +3,10 @@ import { Position, IColor } from '../Interface';
|
|
|
3
3
|
import { BaseMesh, BaseMeshInfo } from './BaseMesh';
|
|
4
4
|
interface LinkInfo extends BaseMeshInfo {
|
|
5
5
|
passable?: number;
|
|
6
|
-
restrict?: number;
|
|
7
6
|
start: Position;
|
|
8
7
|
end: Position;
|
|
9
8
|
width: number;
|
|
10
|
-
color
|
|
9
|
+
color?: IColor;
|
|
11
10
|
transparent?: boolean;
|
|
12
11
|
imgUrl?: string;
|
|
13
12
|
}
|
|
@@ -16,7 +15,6 @@ declare class Link extends BaseMesh {
|
|
|
16
15
|
geometry: BufferGeometry<import("three").NormalBufferAttributes>;
|
|
17
16
|
material: MeshStandardMaterial;
|
|
18
17
|
passable: number;
|
|
19
|
-
restrict: number;
|
|
20
18
|
constructor(params: LinkInfo);
|
|
21
19
|
updateGeometry(params: Pick<LinkInfo, 'start' | 'end'>): void;
|
|
22
20
|
computeVertex(up?: Vector3): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import DefaultManage from './DefaultManage';
|
|
2
|
-
import { Group, GroupInfo, Topology, TopologyInfo } from '../Library';
|
|
3
|
-
import { TopologyInfoForGml, ShortestPathInfo, ShortestPathByMultipleStartPoints, ShortestPathByMultipleEndPoints, TopologyNodeInfo } from '../Interface';
|
|
2
|
+
import { Group, GroupInfo, Topology, Node, TopologyInfo } from '../Library';
|
|
3
|
+
import { TopologyInfoForGml, ShortestPathInfo, ShortestPathByMultipleStartPoints, ShortestPathByMultipleEndPoints, TopologyNodeInfo, TopologyInnerNodeInfo, Position } from '../Interface';
|
|
4
4
|
import Viewport from '../Viewport';
|
|
5
5
|
import { Dijkstras } from '../Math/dijkstra';
|
|
6
6
|
import { Scene } from 'three';
|
|
@@ -9,10 +9,38 @@ declare class TopologyManage extends DefaultManage {
|
|
|
9
9
|
constructor(viewport: Viewport, scene: Scene);
|
|
10
10
|
createFromGml(topologyInfoForGml: TopologyInfoForGml): Promise<Topology>;
|
|
11
11
|
create(topologyInfo: TopologyInfo): Topology;
|
|
12
|
+
/**
|
|
13
|
+
* 更新路径 passable
|
|
14
|
+
*/
|
|
15
|
+
updatePassable(): void;
|
|
12
16
|
resetNodes(topology: Topology, nodes: TopologyNodeInfo[]): Topology;
|
|
13
17
|
createToGroup(groupInfo: GroupInfo, topologyInfos: TopologyInfo[]): Group;
|
|
14
18
|
addForGroup(group: Group | null, topologyInfos: TopologyInfo[]): Group | null;
|
|
19
|
+
/**
|
|
20
|
+
* 计算路径
|
|
21
|
+
* @param topology
|
|
22
|
+
* @param info
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
protected _getPath(topology: Topology, info: Pick<ShortestPathInfo, 'start' | 'end'>): Node[] | null;
|
|
26
|
+
protected _generateNodesInfo(nodes: Node[]): TopologyInnerNodeInfo[];
|
|
27
|
+
/**
|
|
28
|
+
* 根据两点获取最短路径
|
|
29
|
+
* @param topology
|
|
30
|
+
* @param info
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
15
33
|
getShortestPath(topology: Topology, info: ShortestPathInfo): Topology | null;
|
|
34
|
+
/**
|
|
35
|
+
* 多起点或多终点最短路径
|
|
36
|
+
* @param topology
|
|
37
|
+
* @param info
|
|
38
|
+
* @param points
|
|
39
|
+
* @param point
|
|
40
|
+
* @param pointsType
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
protected _getShortestPathByMultiplePoints(topology: Topology, info: ShortestPathByMultipleStartPoints | ShortestPathByMultipleEndPoints, points: Position[], point: Position, pointsType: 'start' | 'end'): Topology | null;
|
|
16
44
|
getShortestPathByMultipleStartPoints(topology: Topology, info: ShortestPathByMultipleStartPoints): Topology | null;
|
|
17
45
|
getShortestPathByMultipleEndPoints(topology: Topology, info: ShortestPathByMultipleEndPoints): Topology | null;
|
|
18
46
|
private setDijkstraGraph;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Box3, PerspectiveCamera, Vector3, Euler, Object3D } from 'three';
|
|
1
|
+
import { Box3, PerspectiveCamera, Vector3, Euler, Object3D, OrthographicCamera } from 'three';
|
|
2
2
|
import { Rotation, Position, AnimationOptions, FlyToViewpoint, CameraViewpointData, FlyToObjOptions, SurroundOptions, LabelOptions, CameraTargetViewData } from '../Interface';
|
|
3
3
|
import { BaseObject3D, BaseMesh } from '../Library';
|
|
4
4
|
import Viewport from '.';
|
|
5
5
|
declare class CameraManager {
|
|
6
6
|
viewport: Viewport;
|
|
7
7
|
mainCamera: PerspectiveCamera;
|
|
8
|
-
currentCamera: PerspectiveCamera;
|
|
8
|
+
currentCamera: PerspectiveCamera | OrthographicCamera;
|
|
9
9
|
cameras: {
|
|
10
10
|
[x: string]: PerspectiveCamera;
|
|
11
11
|
};
|
|
@@ -21,7 +21,7 @@ declare class EffectManager {
|
|
|
21
21
|
effectComposer: EffectComposer;
|
|
22
22
|
passesMap: Map<string, Pass>;
|
|
23
23
|
effectsMap: Map<string, EffectState>;
|
|
24
|
-
|
|
24
|
+
effectsNeedsUpdate: boolean;
|
|
25
25
|
constructor(renderer: WebGLRenderer, scene: Scene, camera: Camera);
|
|
26
26
|
/**
|
|
27
27
|
* 更新 Effect pass
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { Camera, WebGLRenderer } from 'three';
|
|
3
3
|
declare class ViewHelper extends THREE.Object3D {
|
|
4
|
+
camera: Camera;
|
|
4
5
|
render: (renderer: WebGLRenderer) => void;
|
|
5
6
|
handleClick: (event: MouseEvent) => void;
|
|
6
7
|
update: (delta: number) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="stats.js" />
|
|
2
|
-
import { Mesh, Clock, Scene, PerspectiveCamera, WebGLRenderer, PMREMGenerator, Vector3, AnimationMixer, Raycaster, Intersection, Object3D, AnimationClip, Texture, Material } from 'three';
|
|
2
|
+
import { Mesh, Clock, Scene, PerspectiveCamera, WebGLRenderer, PMREMGenerator, Vector3, AnimationMixer, Raycaster, Intersection, Object3D, AnimationClip, Texture, Material, OrthographicCamera } from 'three';
|
|
3
3
|
import { EffectComposer } from 'postprocessing';
|
|
4
4
|
import Stats from 'three/examples/jsm/libs/stats.module.js';
|
|
5
5
|
import { Sky } from 'three/examples/jsm/objects/Sky.js';
|
|
@@ -37,7 +37,7 @@ declare class Viewport {
|
|
|
37
37
|
info: Info;
|
|
38
38
|
stats: Stats;
|
|
39
39
|
cameraManager: CameraManager;
|
|
40
|
-
camera: PerspectiveCamera;
|
|
40
|
+
camera: PerspectiveCamera | OrthographicCamera;
|
|
41
41
|
controls: Controls;
|
|
42
42
|
effectManager: EffectManager;
|
|
43
43
|
effectComposer: EffectComposer;
|