soonspacejs 2.5.2 → 2.5.3
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 +6 -6
- package/dist/index.js +6 -6
- package/package.json +2 -2
- package/types/Interface/viewport.d.ts +1 -1
- package/types/Viewport/index.d.ts +2 -2
- package/types/index.d.ts +25 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soonspacejs",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"homepage": "http://www.xwbuilders.com:8800/",
|
|
5
5
|
"description": "soonspacejs 2.x",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"@tweenjs/tween.js": "^18.6.4",
|
|
26
26
|
"@types/three": "0.141.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "2a5623644a00cc610219341317a92a0427d850b0"
|
|
29
29
|
}
|
|
@@ -3,7 +3,7 @@ import { IColor, Position, Rotation, BaseSelectOptions } from './base';
|
|
|
3
3
|
import { AnimationOptions } from './animation';
|
|
4
4
|
import { GridHelperOptions } from './manager';
|
|
5
5
|
import { ControlsOptions } from './controls';
|
|
6
|
-
export declare type
|
|
6
|
+
export declare type IColorSpace = 'Linear' | 'sRGB';
|
|
7
7
|
interface CameraViewpointData {
|
|
8
8
|
position: Position;
|
|
9
9
|
rotation: Rotation;
|
|
@@ -9,7 +9,7 @@ import CameraManager from './CameraManager';
|
|
|
9
9
|
import EffectManager from './EffectManager';
|
|
10
10
|
import { Controls } from '../Controls';
|
|
11
11
|
import { Model } from '../Library';
|
|
12
|
-
import {
|
|
12
|
+
import { IColorSpace, SkyOptions, IColor, OffsetPoint, SceneEventType, Position, ViewportOptions, ViewportState, ModelAnimationFindFunc, SignalsState, ToneMappingOptions, SSAOOptions, IntersectsOptions } from '../Interface';
|
|
13
13
|
import Info from './Info';
|
|
14
14
|
import { ViewHelper } from './ViewHelper';
|
|
15
15
|
export declare const innerRenderState: {
|
|
@@ -63,7 +63,7 @@ declare class Viewport {
|
|
|
63
63
|
/**
|
|
64
64
|
***************************** renderer ***************************
|
|
65
65
|
*/
|
|
66
|
-
setColorSpace(colorSpace:
|
|
66
|
+
setColorSpace(colorSpace: IColorSpace): void;
|
|
67
67
|
setToneMapping(options?: ToneMappingOptions): void;
|
|
68
68
|
/**
|
|
69
69
|
***************************** background ***************************
|
package/types/index.d.ts
CHANGED
|
@@ -6,16 +6,15 @@
|
|
|
6
6
|
|____/ \___/ \___/|_| |_|____/| .__/ \__,_|\___\___(_)/ |___/
|
|
7
7
|
|_| |__/
|
|
8
8
|
*/
|
|
9
|
-
import * as THREE from 'three';
|
|
10
9
|
import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js';
|
|
11
|
-
import { Object3D, Vector3, Euler, Box3, AnimationClip, AnimationAction, Light } from 'three';
|
|
10
|
+
import { Object3D, Vector3, Euler, Box3, AnimationClip, AnimationAction, Light, AmbientLight, DirectionalLight, HemisphereLight, SpotLight, PointLight, RectAreaLight } from 'three';
|
|
12
11
|
import * as shared from './Shared';
|
|
13
12
|
import Animation from './Animation';
|
|
14
13
|
import * as library from './Library';
|
|
15
14
|
import { BaseObject3D, BaseObject3DInfo, Model, ModelInfo, Poi, PoiInfo, PoiNode, PoiNodeInfo, Topology, TopologyInfo, Group, GroupInfo, Canvas3D, Canvas3DInfo, PluginObject, PluginObjectInfo } from './Library';
|
|
16
15
|
import Viewport from './Viewport';
|
|
17
16
|
import Manager from './Manager';
|
|
18
|
-
import { ViewportOptions, SceneGlobalEvents, PluginsConstructor, IColor, Position, Rotation, OffsetPoint, AnimationOptions, ModelAnimationFindFunc, TopologyNodeInfo, CameraViewpointData, CameraTargetViewData, FlyToViewpoint, FlyToObjOptions, SurroundOptions, LabelOptions, EdgeSelectOptions, StrokeSelectOptions, OpacitySelectOptions, HighlightSelectOptions, EmissiveSelectOptions, FogOptions, UserDataPropertyFindFunc, AmbientLightOptions, DirectionalLightOptions, HemisphereLightOptions, SpotLightOptions, PointLightOptions, CloneModelInfo, ClonePoiInfo, ShortestPathInfo, ShortestPathByMultipleStartPoints, ShortestPathByMultipleEndPoints, TopologyInfoForGml, GridHelperOptions, AxesHelperOptions, BoxHelperOptions, PlaneHelperOptions, GroundHelperOptions, DirectionalLightHelperOptions, HemisphereLightHelperOptions, SpotLightHelperOptions, PointLightHelperOptions, SignalsState, ControlsOptions, RectAreaLightOptions, RectAreaLightHelperOptions, SkyOptions,
|
|
17
|
+
import { ViewportOptions, SceneGlobalEvents, PluginsConstructor, IColor, Position, Rotation, OffsetPoint, AnimationOptions, ModelAnimationFindFunc, TopologyNodeInfo, CameraViewpointData, CameraTargetViewData, FlyToViewpoint, FlyToObjOptions, SurroundOptions, LabelOptions, EdgeSelectOptions, StrokeSelectOptions, OpacitySelectOptions, HighlightSelectOptions, EmissiveSelectOptions, FogOptions, UserDataPropertyFindFunc, AmbientLightOptions, DirectionalLightOptions, HemisphereLightOptions, SpotLightOptions, PointLightOptions, CloneModelInfo, ClonePoiInfo, ShortestPathInfo, ShortestPathByMultipleStartPoints, ShortestPathByMultipleEndPoints, TopologyInfoForGml, GridHelperOptions, AxesHelperOptions, BoxHelperOptions, PlaneHelperOptions, GroundHelperOptions, DirectionalLightHelperOptions, HemisphereLightHelperOptions, SpotLightHelperOptions, PointLightHelperOptions, SignalsState, ControlsOptions, RectAreaLightOptions, RectAreaLightHelperOptions, SkyOptions, IColorSpace, ToneMappingOptions, SSAOOptions } from './Interface';
|
|
19
18
|
export declare type InitOptions = ViewportOptions;
|
|
20
19
|
export declare type InitEvents = SceneGlobalEvents;
|
|
21
20
|
export interface SoonSpaceConstructor {
|
|
@@ -23,14 +22,19 @@ export interface SoonSpaceConstructor {
|
|
|
23
22
|
options?: InitOptions;
|
|
24
23
|
events?: InitEvents;
|
|
25
24
|
}
|
|
25
|
+
export * from 'three';
|
|
26
26
|
export * from './Interface';
|
|
27
27
|
declare global {
|
|
28
28
|
interface Window {
|
|
29
29
|
THREE: typeof THREE;
|
|
30
30
|
}
|
|
31
|
+
interface GlobalThis {
|
|
32
|
+
THREE: typeof THREE;
|
|
33
|
+
}
|
|
31
34
|
}
|
|
32
|
-
export
|
|
33
|
-
static readonly THREE: typeof
|
|
35
|
+
export declare class SoonSpace {
|
|
36
|
+
static readonly THREE: typeof import("three");
|
|
37
|
+
readonly THREE: typeof import("three");
|
|
34
38
|
static readonly TWEEN: {
|
|
35
39
|
Easing: {
|
|
36
40
|
Linear: {
|
|
@@ -111,7 +115,6 @@ export default class SoonSpace {
|
|
|
111
115
|
update: (time?: number | undefined, preserve?: boolean | undefined) => boolean;
|
|
112
116
|
};
|
|
113
117
|
static readonly utils: typeof shared;
|
|
114
|
-
readonly THREE: typeof THREE;
|
|
115
118
|
readonly THREE_PLUGINS: {
|
|
116
119
|
TransformControls: typeof TransformControls;
|
|
117
120
|
};
|
|
@@ -198,7 +201,7 @@ export default class SoonSpace {
|
|
|
198
201
|
* 设置场景的颜色空间
|
|
199
202
|
* @param colorSpace
|
|
200
203
|
*/
|
|
201
|
-
setColorSpace(colorSpace:
|
|
204
|
+
setColorSpace(colorSpace: IColorSpace): void;
|
|
202
205
|
setToneMapping(options?: ToneMappingOptions): void;
|
|
203
206
|
/**
|
|
204
207
|
* 设置开启鼠标悬浮
|
|
@@ -230,7 +233,7 @@ export default class SoonSpace {
|
|
|
230
233
|
* 设置场景环境
|
|
231
234
|
* @returns
|
|
232
235
|
*/
|
|
233
|
-
setEnvironment():
|
|
236
|
+
setEnvironment(): import("three").Texture;
|
|
234
237
|
/**
|
|
235
238
|
* 播放模型动画
|
|
236
239
|
* @param model
|
|
@@ -449,7 +452,7 @@ export default class SoonSpace {
|
|
|
449
452
|
* 创建环境关
|
|
450
453
|
* @param options
|
|
451
454
|
*/
|
|
452
|
-
createAmbientLight(options: AmbientLightOptions):
|
|
455
|
+
createAmbientLight(options: AmbientLightOptions): AmbientLight;
|
|
453
456
|
/**
|
|
454
457
|
* 设置环境关
|
|
455
458
|
* @param options
|
|
@@ -459,7 +462,7 @@ export default class SoonSpace {
|
|
|
459
462
|
* 创建平行光
|
|
460
463
|
* @param options
|
|
461
464
|
*/
|
|
462
|
-
createDirectionalLight(options: DirectionalLightOptions):
|
|
465
|
+
createDirectionalLight(options: DirectionalLightOptions): DirectionalLight;
|
|
463
466
|
/**
|
|
464
467
|
* 设置平行光
|
|
465
468
|
* @param options
|
|
@@ -469,7 +472,7 @@ export default class SoonSpace {
|
|
|
469
472
|
* 创建半球光
|
|
470
473
|
* @param options
|
|
471
474
|
*/
|
|
472
|
-
createHemisphereLight(options: HemisphereLightOptions):
|
|
475
|
+
createHemisphereLight(options: HemisphereLightOptions): HemisphereLight;
|
|
473
476
|
/**
|
|
474
477
|
* 设置半球光
|
|
475
478
|
* @param options
|
|
@@ -479,7 +482,7 @@ export default class SoonSpace {
|
|
|
479
482
|
* 创建聚光灯
|
|
480
483
|
* @param options
|
|
481
484
|
*/
|
|
482
|
-
createSpotLight(options: SpotLightOptions):
|
|
485
|
+
createSpotLight(options: SpotLightOptions): SpotLight;
|
|
483
486
|
/**
|
|
484
487
|
* 设置聚光灯
|
|
485
488
|
* @param options
|
|
@@ -489,7 +492,7 @@ export default class SoonSpace {
|
|
|
489
492
|
* 创建点光源
|
|
490
493
|
* @param options
|
|
491
494
|
*/
|
|
492
|
-
createPointLight(options: PointLightOptions):
|
|
495
|
+
createPointLight(options: PointLightOptions): PointLight;
|
|
493
496
|
/**
|
|
494
497
|
* 设置点光源
|
|
495
498
|
* @param options
|
|
@@ -500,7 +503,7 @@ export default class SoonSpace {
|
|
|
500
503
|
* @param options
|
|
501
504
|
* @returns
|
|
502
505
|
*/
|
|
503
|
-
createRectAreaLight(options: RectAreaLightOptions):
|
|
506
|
+
createRectAreaLight(options: RectAreaLightOptions): RectAreaLight;
|
|
504
507
|
/**
|
|
505
508
|
* 设置矩形区域光源
|
|
506
509
|
* @param options
|
|
@@ -1064,17 +1067,17 @@ export default class SoonSpace {
|
|
|
1064
1067
|
* 添加网格辅助器
|
|
1065
1068
|
* @param options
|
|
1066
1069
|
*/
|
|
1067
|
-
addGridHelper(options: GridHelperOptions):
|
|
1070
|
+
addGridHelper(options: GridHelperOptions): import("three").GridHelper;
|
|
1068
1071
|
/**
|
|
1069
1072
|
* 添加轴线辅助器
|
|
1070
1073
|
* @param options
|
|
1071
1074
|
*/
|
|
1072
|
-
addAxesHelper(options: AxesHelperOptions):
|
|
1075
|
+
addAxesHelper(options: AxesHelperOptions): import("three").AxesHelper;
|
|
1073
1076
|
/**
|
|
1074
1077
|
* 添加包围盒辅助器
|
|
1075
1078
|
* @param options
|
|
1076
1079
|
*/
|
|
1077
|
-
addBoxHelper(options: BoxHelperOptions):
|
|
1080
|
+
addBoxHelper(options: BoxHelperOptions): import("three").Box3Helper;
|
|
1078
1081
|
/**
|
|
1079
1082
|
* 添加面辅助器
|
|
1080
1083
|
* @param options
|
|
@@ -1094,22 +1097,22 @@ export default class SoonSpace {
|
|
|
1094
1097
|
* 添加平行光辅助器
|
|
1095
1098
|
* @param options
|
|
1096
1099
|
*/
|
|
1097
|
-
addDirectionalLightHelper(options: DirectionalLightHelperOptions):
|
|
1100
|
+
addDirectionalLightHelper(options: DirectionalLightHelperOptions): import("three").DirectionalLightHelper;
|
|
1098
1101
|
/**
|
|
1099
1102
|
* 添加半球光辅助器
|
|
1100
1103
|
* @param options
|
|
1101
1104
|
*/
|
|
1102
|
-
addHemisphereLightHelper(options: HemisphereLightHelperOptions):
|
|
1105
|
+
addHemisphereLightHelper(options: HemisphereLightHelperOptions): import("three").HemisphereLightHelper;
|
|
1103
1106
|
/**
|
|
1104
1107
|
* 添加聚光灯辅助器
|
|
1105
1108
|
* @param options
|
|
1106
1109
|
*/
|
|
1107
|
-
addSpotLightHelper(options: SpotLightHelperOptions):
|
|
1110
|
+
addSpotLightHelper(options: SpotLightHelperOptions): import("three").SpotLightHelper;
|
|
1108
1111
|
/**
|
|
1109
1112
|
* 添加点光辅助器
|
|
1110
1113
|
* @param options
|
|
1111
1114
|
*/
|
|
1112
|
-
addPointLightHelper(options: PointLightHelperOptions):
|
|
1115
|
+
addPointLightHelper(options: PointLightHelperOptions): import("three").PointLightHelper;
|
|
1113
1116
|
/**
|
|
1114
1117
|
* 添加矩形区域光辅助器
|
|
1115
1118
|
* @param options
|
|
@@ -1139,3 +1142,4 @@ export default class SoonSpace {
|
|
|
1139
1142
|
*/
|
|
1140
1143
|
hideAllHelper(): void;
|
|
1141
1144
|
}
|
|
1145
|
+
export default SoonSpace;
|