soonspacejs 2.3.17 → 2.3.18
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 +4 -4
- package/types/Interface/base.d.ts +6 -0
- package/types/Library/BaseMesh.d.ts +5 -4
- package/types/Library/BaseObject3D.d.ts +4 -4
- package/types/Library/Model.d.ts +2 -2
- package/types/Library/Poi.d.ts +2 -2
- package/types/Library/Sbm.d.ts +2 -2
- package/types/Viewport/CameraManager.d.ts +1 -1
- package/types/Viewport/index.d.ts +1 -1
- package/types/index.d.ts +3 -2
- package/types/environments/RoomEnvironment.d.ts +0 -8
- package/types/environments/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soonspacejs",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.18",
|
|
4
4
|
"description": "soonspacejs 2.x",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@robotlegsjs/signals": "1.1.0",
|
|
18
18
|
"@soonspacejs/xml2json": "0.0.2",
|
|
19
19
|
"@tweenjs/tween.js": "18.6.4",
|
|
20
|
-
"@types/three": "
|
|
20
|
+
"@types/three": "0.139.0",
|
|
21
21
|
"localforage": "1.9.0",
|
|
22
|
-
"three": "
|
|
22
|
+
"three": "0.139.0"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "7d5d1b7b9ff6b61df850c92b1f65c921437138ea"
|
|
25
25
|
}
|
|
@@ -38,4 +38,10 @@ interface ObjectEvents<ObjectType> {
|
|
|
38
38
|
onDblClick?: ((object: ObjectType) => void) | null;
|
|
39
39
|
onRightClick?: ((object: ObjectType) => void) | null;
|
|
40
40
|
}
|
|
41
|
+
export interface ObjectEventsListener {
|
|
42
|
+
type: 'click' | 'rightClick' | 'dblClick';
|
|
43
|
+
}
|
|
44
|
+
export interface Interpolate {
|
|
45
|
+
t: number;
|
|
46
|
+
}
|
|
41
47
|
export { IVector2, IVector3, Position, Rotation, Scale, IColor, PlaneIVector2, Level, OffsetPoint, FlyToViewpoint, AxisType, SceneEventType, PoiNodeType, BaseSelectOptions, ObjectEvents, };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Box3, Vector3, Euler, Mesh, BufferGeometry, Material } from 'three';
|
|
2
|
-
import {
|
|
2
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
3
|
+
import { Position, Rotation, Scale, Level, AnimationOptions, Interpolate } from '../Interface';
|
|
3
4
|
import { BaseObject3DInfo } from './BaseObject3D';
|
|
4
5
|
declare type BaseMeshInfo = BaseObject3DInfo;
|
|
5
6
|
declare class BaseMesh extends Mesh {
|
|
@@ -12,9 +13,9 @@ declare class BaseMesh extends Mesh {
|
|
|
12
13
|
constructor(geometry: BufferGeometry, material: Material | Material[], param: BaseMeshInfo, type?: string);
|
|
13
14
|
show(): void;
|
|
14
15
|
hide(): void;
|
|
15
|
-
setMove(position: Position | Vector3, options?: AnimationOptions): Promise<void>;
|
|
16
|
-
setRotate(rotation: Rotation | Euler, options?: AnimationOptions): Promise<void>;
|
|
17
|
-
setScale(scale: Scale | Vector3, options?: AnimationOptions): Promise<void>;
|
|
16
|
+
setMove(position: Position | Vector3, options?: AnimationOptions, onUpdate?: (source: Position, tween: Tween<Position>) => void, onStart?: (tween: Tween<Position>) => void): Promise<void>;
|
|
17
|
+
setRotate(rotation: Rotation | Euler, options?: AnimationOptions, onUpdate?: (source: Rotation, tween: Tween<Interpolate>) => void, onStart?: (tween: Tween<Interpolate>) => void): Promise<void>;
|
|
18
|
+
setScale(scale: Scale | Vector3, options?: AnimationOptions, onUpdate?: (source: Scale, tween: Tween<Scale>) => void, onStart?: (tween: Tween<Scale>) => void): Promise<void>;
|
|
18
19
|
getBoundingBox(): Box3;
|
|
19
20
|
eventPropagation(): void;
|
|
20
21
|
sClone(recursive?: boolean): BaseMesh;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Object3D, Vector3, Euler } from 'three';
|
|
1
|
+
import { Object3D, Vector3, Euler, BaseEvent, Event } from 'three';
|
|
2
2
|
import { Tween } from '@tweenjs/tween.js';
|
|
3
|
-
import { Position, Rotation, Scale, Level, AnimationOptions } from '../Interface';
|
|
3
|
+
import { Position, Rotation, Scale, Level, AnimationOptions, Interpolate } from '../Interface';
|
|
4
4
|
interface BaseObject3DInfo {
|
|
5
5
|
id: string | number;
|
|
6
6
|
name?: string;
|
|
@@ -11,7 +11,7 @@ interface BaseObject3DInfo {
|
|
|
11
11
|
scale?: Scale;
|
|
12
12
|
userData?: any;
|
|
13
13
|
}
|
|
14
|
-
declare class BaseObject3D extends Object3D {
|
|
14
|
+
declare class BaseObject3D<E extends BaseEvent = Event> extends Object3D<E> {
|
|
15
15
|
sid: string | number;
|
|
16
16
|
stype: string;
|
|
17
17
|
handleHide: boolean;
|
|
@@ -21,7 +21,7 @@ declare class BaseObject3D extends Object3D {
|
|
|
21
21
|
show(): void;
|
|
22
22
|
hide(): void;
|
|
23
23
|
setMove(position: Position | Vector3, options?: AnimationOptions, onUpdate?: (source: Position, tween: Tween<Position>) => void, onStart?: (tween: Tween<Position>) => void): Promise<void>;
|
|
24
|
-
setRotate(rotation: Rotation | Euler, options?: AnimationOptions, onUpdate?: (source: Rotation, tween: Tween<
|
|
24
|
+
setRotate(rotation: Rotation | Euler, options?: AnimationOptions, onUpdate?: (source: Rotation, tween: Tween<Interpolate>) => void, onStart?: (tween: Tween<Interpolate>) => void): Promise<void>;
|
|
25
25
|
setScale(scale: Scale | Vector3, options?: AnimationOptions, onUpdate?: (source: Scale, tween: Tween<Scale>) => void, onStart?: (tween: Tween<Scale>) => void): Promise<void>;
|
|
26
26
|
sClone<T extends BaseObject3D>(recursive?: boolean): T;
|
|
27
27
|
sCopy<T extends BaseObject3D>(source: BaseObject3D, recursive?: boolean): T;
|
package/types/Library/Model.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Box3 } from 'three';
|
|
2
2
|
import { BaseObject3D, BaseObject3DInfo } from './BaseObject3D';
|
|
3
|
-
import { ObjectEvents } from '../Interface';
|
|
3
|
+
import { ObjectEvents, ObjectEventsListener } from '../Interface';
|
|
4
4
|
interface ModelInfo extends BaseObject3DInfo, ObjectEvents<Model> {
|
|
5
5
|
url: string;
|
|
6
6
|
}
|
|
7
7
|
interface ModelInnerInfo extends ModelInfo {
|
|
8
8
|
format: string;
|
|
9
9
|
}
|
|
10
|
-
declare class Model extends BaseObject3D implements ObjectEvents<Model> {
|
|
10
|
+
declare class Model extends BaseObject3D<ObjectEventsListener> implements ObjectEvents<Model> {
|
|
11
11
|
readonly formatType: string;
|
|
12
12
|
isEventPropagation: boolean;
|
|
13
13
|
onLoad: ((object: Model) => void) | null;
|
package/types/Library/Poi.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseObject3D, BaseObject3DInfo } from './BaseObject3D';
|
|
2
2
|
import { Icon, IconInfo } from './Icon';
|
|
3
3
|
import { SpriteMaterial, Box3 } from 'three';
|
|
4
|
-
import { ObjectEvents, Scale } from '../Interface';
|
|
4
|
+
import { ObjectEvents, ObjectEventsListener, Scale } from '../Interface';
|
|
5
5
|
interface PoiInfo extends BaseObject3DInfo, ObjectEvents<Poi> {
|
|
6
6
|
url: string;
|
|
7
7
|
nameScale?: Scale;
|
|
@@ -13,7 +13,7 @@ interface CanvasTextInfo {
|
|
|
13
13
|
textAlign?: CanvasTextAlign;
|
|
14
14
|
textBaseline?: CanvasTextBaseline;
|
|
15
15
|
}
|
|
16
|
-
declare class Poi extends BaseObject3D implements ObjectEvents<Poi> {
|
|
16
|
+
declare class Poi extends BaseObject3D<ObjectEventsListener> implements ObjectEvents<Poi> {
|
|
17
17
|
icon: Icon;
|
|
18
18
|
text: Icon | null;
|
|
19
19
|
isEventPropagation: boolean;
|
package/types/Library/Sbm.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Box3 } from 'three';
|
|
2
2
|
import { BaseObject3D, BaseObject3DInfo } from './BaseObject3D';
|
|
3
|
-
import { ObjectEvents } from '../Interface';
|
|
3
|
+
import { ObjectEvents, ObjectEventsListener } from '../Interface';
|
|
4
4
|
interface SbmInfo extends BaseObject3DInfo, ObjectEvents<Sbm> {
|
|
5
5
|
url: string;
|
|
6
6
|
isPlatform?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare class Sbm extends BaseObject3D implements ObjectEvents<Sbm> {
|
|
8
|
+
declare class Sbm extends BaseObject3D<ObjectEventsListener> implements ObjectEvents<Sbm> {
|
|
9
9
|
isEventPropagation: boolean;
|
|
10
10
|
onLoad: ((object: Sbm) => void) | null;
|
|
11
11
|
onClick: ((object: Sbm) => void) | null;
|
|
@@ -16,7 +16,7 @@ declare class cameraManager {
|
|
|
16
16
|
getMainCamera(): PerspectiveCamera;
|
|
17
17
|
getCameraViewpoint(): CameraViewpointData;
|
|
18
18
|
setCameraViewpoint(data: CameraViewpointData): void;
|
|
19
|
-
rotateTo(rotation:
|
|
19
|
+
rotateTo(rotation: Euler, options?: AnimationOptions): Promise<void>;
|
|
20
20
|
moveTo(position: Position, options?: AnimationOptions): Promise<void>;
|
|
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>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Scene, PerspectiveCamera, WebGLRenderer, PMREMGenerator, Vector3, AnimationMixer, Intersection, Object3D, AnimationAction, AnimationClip } from 'three';
|
|
2
|
+
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
|
|
2
3
|
import Stats from 'three/examples/jsm/libs/stats.module.js';
|
|
3
4
|
import { Sky } from 'three/examples/jsm/objects/Sky.js';
|
|
4
5
|
import Scener from './Scener';
|
|
5
6
|
import { CSS2DRenderer, CSS2DHalfRenderer, CSS3DRenderer } from '../Renderer';
|
|
6
|
-
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
|
|
7
7
|
import RendererManager, { PassObj } from './RendererManager';
|
|
8
8
|
import CameraManager from './CameraManager';
|
|
9
9
|
import { FullFreeControls } from '../Controls';
|
package/types/index.d.ts
CHANGED
|
@@ -31,14 +31,15 @@ declare global {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
export default class SoonSpace {
|
|
34
|
-
readonly THREE: typeof THREE;
|
|
35
|
-
readonly THREE_PLUGINS: {
|
|
34
|
+
static readonly THREE: typeof THREE;
|
|
35
|
+
static readonly THREE_PLUGINS: {
|
|
36
36
|
TransformControls: typeof TransformControls;
|
|
37
37
|
Lensflare: {
|
|
38
38
|
Lensflare: typeof Lensflare;
|
|
39
39
|
LensflareElement: typeof LensflareElement;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
+
readonly THREE: typeof THREE;
|
|
42
43
|
readonly version: string;
|
|
43
44
|
readonly options: InitOptions;
|
|
44
45
|
readonly domElement: HTMLElement | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { RoomEnvironment, } from './RoomEnvironment';
|