soonspacejs 2.8.15 → 2.9.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.
- package/dist/generateBVH.worker.js +1 -1
- package/dist/index.esm.js +3 -3
- package/package.json +6 -6
- package/types/Interface/viewport.d.ts +10 -4
- package/types/Loader/SbmLoader/utils/generateSbm.d.ts +2 -2
- package/types/Viewport/CameraManager.d.ts +3 -3
- package/types/Viewport/EffectManager.d.ts +2 -0
- package/types/Viewport/Info.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soonspacejs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"homepage": "http://www.xwbuilders.com:8800/",
|
|
5
5
|
"description": "soonspacejs 2.x",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"author": "xunwei",
|
|
22
22
|
"license": "UNLICENSED",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@three3d/animation": "^2.1
|
|
25
|
-
"@three3d/tools": "^1.
|
|
26
|
-
"three-mesh-bvh": "0.6.
|
|
24
|
+
"@three3d/animation": "^2.2.1",
|
|
25
|
+
"@three3d/tools": "^1.6.0",
|
|
26
|
+
"three-mesh-bvh": "0.6.3"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"three": ">=0.
|
|
29
|
+
"three": ">=0.155.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "d9f1cd366372acc10a60c4085023275fcebfdbda"
|
|
32
32
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
2
3
|
import { IColor, Position, Rotation, BaseSelectOptions } from './base';
|
|
3
4
|
import { AnimationOptions } from './animation';
|
|
4
5
|
import { GridHelperOptions } from './manager';
|
|
@@ -16,9 +17,13 @@ interface FlyToObjOptions extends AnimationOptions {
|
|
|
16
17
|
padding?: number | string;
|
|
17
18
|
}
|
|
18
19
|
interface SurroundOptions {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
duration?: number;
|
|
21
|
+
startAngle?: number;
|
|
22
|
+
endAngle?: number;
|
|
23
|
+
end?: number;
|
|
24
|
+
onStart?: (tween: Tween<{
|
|
25
|
+
radian: number;
|
|
26
|
+
}>) => void;
|
|
22
27
|
}
|
|
23
28
|
interface LabelOptions {
|
|
24
29
|
mode?: 'scene' | 'screen';
|
|
@@ -51,6 +56,7 @@ interface EmissiveSelectOptions extends Omit<BaseSelectOptions, 'opacity'> {
|
|
|
51
56
|
minOpacity?: number;
|
|
52
57
|
maxOpacity?: number;
|
|
53
58
|
duration?: number;
|
|
59
|
+
yoyo?: boolean;
|
|
54
60
|
}
|
|
55
61
|
interface FogOptions {
|
|
56
62
|
color?: IColor;
|
|
@@ -191,7 +197,7 @@ export interface SSROptions {
|
|
|
191
197
|
velocityResolutionScale?: number;
|
|
192
198
|
}
|
|
193
199
|
export interface ToneMappingOptions {
|
|
194
|
-
type?: '
|
|
200
|
+
type?: 'Reinhard' | 'Cineon' | 'ACESFilmic';
|
|
195
201
|
exposure?: number;
|
|
196
202
|
}
|
|
197
203
|
export { CameraViewpointData, CameraTargetViewData, FlyToObjOptions, SurroundOptions, LabelOptions, InternalOptions, SelectModelOptions, EdgeSelectOptions, StrokeSelectOptions, OpacitySelectOptions, HighlightSelectOptions, EmissiveSelectOptions, FogOptions, SkyOptions, ViewportOptions, ViewportState, IntersectsOptions, };
|
|
@@ -21,6 +21,6 @@ export declare const generateSbmTexture: (material: MeshStandardMaterial, textur
|
|
|
21
21
|
* 生成 sbm 材质
|
|
22
22
|
* @param materialId
|
|
23
23
|
* @param arr
|
|
24
|
-
* @param
|
|
24
|
+
* @param png
|
|
25
25
|
*/
|
|
26
|
-
export declare const generateSbmMaterial: (materialId: string, arr: number[],
|
|
26
|
+
export declare const generateSbmMaterial: (materialId: string, arr: number[], png: boolean) => MeshStandardMaterial;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
|
-
import { BaseObject3D
|
|
3
|
+
import { BaseObject3D } from '../Library';
|
|
4
4
|
import Viewport from '.';
|
|
5
5
|
declare class CameraManager {
|
|
6
6
|
viewport: Viewport;
|
|
@@ -21,8 +21,8 @@ declare class CameraManager {
|
|
|
21
21
|
flyTo(position: Position, rotation?: FlyToViewpoint | Rotation | Euler, options?: AnimationOptions): Promise<void>;
|
|
22
22
|
flyToBoundingBox(bbox: Box3, rotation?: FlyToViewpoint | Rotation | Euler, options?: AnimationOptions): Promise<void>;
|
|
23
23
|
flyToObj(object: Object3D, rotation?: FlyToViewpoint | Rotation | Euler, options?: FlyToObjOptions): Promise<void>;
|
|
24
|
-
surroundOnTarget(target:
|
|
25
|
-
surroundOnObject(object:
|
|
24
|
+
surroundOnTarget(target: Position, options?: SurroundOptions): Promise<void>;
|
|
25
|
+
surroundOnObject(object: Object3D, options?: SurroundOptions): Promise<void>;
|
|
26
26
|
getMovePosByBBox(bbox: Box3): Vector3;
|
|
27
27
|
getObjectLabelPos(bbox: Box3 | BaseObject3D, rotation?: FlyToViewpoint | Rotation | Euler, options?: LabelOptions): Vector3;
|
|
28
28
|
}
|
|
@@ -17,6 +17,7 @@ declare class EffectManager {
|
|
|
17
17
|
outlineEffect: string;
|
|
18
18
|
ssrEffect: string;
|
|
19
19
|
bloomEffect: string;
|
|
20
|
+
toneMappingEffect: string;
|
|
20
21
|
};
|
|
21
22
|
effectComposer: EffectComposer;
|
|
22
23
|
passesMap: Map<string, Pass>;
|
|
@@ -39,6 +40,7 @@ declare class EffectManager {
|
|
|
39
40
|
private _initEffectPass;
|
|
40
41
|
private _initEffects;
|
|
41
42
|
private _initSMAAEffect;
|
|
43
|
+
private _initToneMappingEffect;
|
|
42
44
|
private _initSSREffect;
|
|
43
45
|
private _initBloomEffect;
|
|
44
46
|
private _initOutlineEffect;
|