soonspacejs 2.6.9 → 2.6.10
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soonspacejs",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.10",
|
|
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.150.1"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "7ea34202f269224509f8da784a857c8b91011e6a"
|
|
32
32
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CreateCurveAnimationClipOptions, BonePathAnimationOptions, AnimationOperate, BonePathAnimationInfo as CreateBonePathAnimationResult } from '@three3d/animation';
|
|
2
|
+
import type { AnimationMixer, Camera, Curve, Object3D } from 'three';
|
|
3
|
+
import { Vector3 } from 'three';
|
|
4
|
+
import type { IVector3 } from '../Interface';
|
|
5
|
+
import { Topology } from '../Library';
|
|
6
|
+
/**
|
|
7
|
+
* 动画的路径
|
|
8
|
+
*/
|
|
9
|
+
export type AnimationPath = IVector3[] | Curve<Vector3> | Topology;
|
|
10
|
+
/**
|
|
11
|
+
* 格式化动画路径信息
|
|
12
|
+
* @param path
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatAnimationPath(path: AnimationPath): {
|
|
16
|
+
curve?: Curve<Vector3> | undefined;
|
|
17
|
+
points?: Vector3[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
export type CreatePathAnimationOptions = Omit<CreateCurveAnimationClipOptions, 'target' | 'curve' | 'points'>;
|
|
20
|
+
export declare function createPathAnimation(target: Object3D, path: AnimationPath, mixer: AnimationMixer, options?: CreatePathAnimationOptions): AnimationOperate;
|
|
21
|
+
export interface CreatePathAnimationActionForCameraOptions_Base {
|
|
22
|
+
/**
|
|
23
|
+
* 眼睛高度
|
|
24
|
+
*/
|
|
25
|
+
eyeHeight?: number;
|
|
26
|
+
}
|
|
27
|
+
export type CreatePathAnimationActionForCameraOptions = CreatePathAnimationActionForCameraOptions_Base & CreatePathAnimationOptions;
|
|
28
|
+
export declare function createPathAnimationActionForCamera(camera: Camera, path: IVector3[] | Curve<Vector3> | Topology, mixer: AnimationMixer, options?: CreatePathAnimationActionForCameraOptions): AnimationOperate;
|
|
29
|
+
export type CreateBonePathAnimationOptions = Omit<BonePathAnimationOptions, 'mixer' | 'model'>;
|
|
30
|
+
export type BonePathAnimationInfo = Omit<CreateBonePathAnimationResult, 'action'> & {
|
|
31
|
+
action: AnimationOperate;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* 创建骨骼路径动画
|
|
35
|
+
* @param options
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
export declare function createBonePathAnimation(model: Object3D, path: AnimationPath, mixer: AnimationMixer, options: CreateBonePathAnimationOptions): BonePathAnimationInfo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventDispatcher,
|
|
1
|
+
import { EventDispatcher, OrthographicCamera, PerspectiveCamera, Vector3 } from 'three';
|
|
2
2
|
import { OrbitControlsProperties } from '../Interface';
|
|
3
3
|
declare class OrbitControls extends EventDispatcher implements OrbitControlsProperties {
|
|
4
4
|
object: PerspectiveCamera | OrthographicCamera;
|
|
@@ -40,13 +40,13 @@ declare class OrbitControls extends EventDispatcher implements OrbitControlsProp
|
|
|
40
40
|
BOTTOM: string;
|
|
41
41
|
};
|
|
42
42
|
mouseButtons: {
|
|
43
|
-
LEFT:
|
|
44
|
-
MIDDLE:
|
|
45
|
-
RIGHT:
|
|
43
|
+
LEFT: 0;
|
|
44
|
+
MIDDLE: 1;
|
|
45
|
+
RIGHT: 2;
|
|
46
46
|
};
|
|
47
47
|
touches: {
|
|
48
|
-
ONE:
|
|
49
|
-
TWO:
|
|
48
|
+
ONE: 0 | 1;
|
|
49
|
+
TWO: 2 | 3;
|
|
50
50
|
};
|
|
51
51
|
target0: Vector3;
|
|
52
52
|
position0: Vector3;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorRepresentation } from 'three';
|
|
2
2
|
interface Interpolate {
|
|
3
3
|
t: number;
|
|
4
4
|
}
|
|
@@ -19,7 +19,7 @@ interface IVector3 extends IVector2 {
|
|
|
19
19
|
type Position = IVector3;
|
|
20
20
|
type Rotation = IVector3;
|
|
21
21
|
type Scale = IVector3;
|
|
22
|
-
type IColor =
|
|
22
|
+
type IColor = ColorRepresentation;
|
|
23
23
|
interface Level {
|
|
24
24
|
max: number | null;
|
|
25
25
|
min: number | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="stats.js" />
|
|
1
2
|
import { Mesh, Clock, Scene, PerspectiveCamera, WebGLRenderer, PMREMGenerator, Vector3, AnimationMixer, Raycaster, Intersection, Object3D, AnimationAction, AnimationClip, Texture } from 'three';
|
|
2
3
|
import { EffectComposer } from 'postprocessing';
|
|
3
4
|
import Stats from 'three/examples/jsm/libs/stats.module.js';
|
package/types/index.d.ts
CHANGED
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import * as THREE from 'three';
|
|
10
10
|
import { Object3D, Vector3, Euler, Box3, AnimationClip, AnimationAction, Light, Texture, Mesh } from 'three';
|
|
11
|
+
import type { Camera } from 'three';
|
|
11
12
|
import * as shared from './Shared';
|
|
12
13
|
import Animation from './Animation';
|
|
13
14
|
import { PathAnimation, PathAnimationOptions } from './Animation/path-animation';
|
|
15
|
+
import { CreatePathAnimationOptions, CreatePathAnimationActionForCameraOptions, CreateBonePathAnimationOptions, AnimationPath } from './Animation/createPathAnimation';
|
|
14
16
|
import * as library from './Library';
|
|
15
17
|
import { BaseObject3D, BaseObject3DInfo, Model, ModelInfo, Poi, PoiInfo, PoiNode, PoiNodeInfo, Topology, TopologyInfo, Group, GroupInfo, Canvas3D, Canvas3DInfo, PluginObject, PluginObjectInfo } from './Library';
|
|
16
18
|
import Viewport from './Viewport';
|
|
@@ -477,12 +479,12 @@ export declare class SoonSpace {
|
|
|
477
479
|
* @param object
|
|
478
480
|
* @param options
|
|
479
481
|
*/
|
|
480
|
-
edgeShow(object:
|
|
482
|
+
edgeShow(object: Object3D | Object3D[], options?: EdgeSelectOptions): Promise<void>;
|
|
481
483
|
/**
|
|
482
484
|
* 取消轮廓显示模型
|
|
483
485
|
* @param objects
|
|
484
486
|
*/
|
|
485
|
-
unEdgeShow(objects?:
|
|
487
|
+
unEdgeShow(objects?: Object3D | Object3D[]): Promise<void | void[]>;
|
|
486
488
|
/**
|
|
487
489
|
* 描边显示模型
|
|
488
490
|
* @param object
|
|
@@ -1302,5 +1304,30 @@ export declare class SoonSpace {
|
|
|
1302
1304
|
* @returns
|
|
1303
1305
|
*/
|
|
1304
1306
|
createTopologyAnimation(target: Object3D, topology: Topology, options?: PathAnimationOptions): PathAnimation;
|
|
1307
|
+
/**
|
|
1308
|
+
* 创建沿路径运动的动画 action
|
|
1309
|
+
*
|
|
1310
|
+
* @param target
|
|
1311
|
+
* @param path
|
|
1312
|
+
* @param options
|
|
1313
|
+
* @returns 返回 AnimationOperate,它是对 AnimationAction 的扩展
|
|
1314
|
+
*/
|
|
1315
|
+
createPathAnimationAction(target: Object3D, path: AnimationPath, options: CreatePathAnimationOptions): import("@three3d/animation").AnimationOperate;
|
|
1316
|
+
/**
|
|
1317
|
+
* 创建相机动画
|
|
1318
|
+
* @param path
|
|
1319
|
+
* @param mixer
|
|
1320
|
+
* @param options
|
|
1321
|
+
* @returns
|
|
1322
|
+
*/
|
|
1323
|
+
createPathAnimationActionForCamera(path: AnimationPath, options?: CreatePathAnimationActionForCameraOptions & {
|
|
1324
|
+
camera?: Camera;
|
|
1325
|
+
}): import("@three3d/animation").AnimationOperate;
|
|
1326
|
+
/**
|
|
1327
|
+
* 创建骨骼路径动画
|
|
1328
|
+
* @param options
|
|
1329
|
+
* @returns
|
|
1330
|
+
*/
|
|
1331
|
+
createBonePathAnimation(model: Object3D, path: AnimationPath, options: CreateBonePathAnimationOptions): import("./Animation/createPathAnimation").BonePathAnimationInfo;
|
|
1305
1332
|
}
|
|
1306
1333
|
export default SoonSpace;
|