soonspacejs 2.5.59 → 2.6.0

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.5.59",
3
+ "version": "2.6.0",
4
4
  "homepage": "http://www.xwbuilders.com:8800/",
5
5
  "description": "soonspacejs 2.x",
6
6
  "module": "./dist/index.esm.js",
@@ -22,8 +22,10 @@
22
22
  "license": "UNLICENSED",
23
23
  "dependencies": {
24
24
  "@robotlegsjs/signals": "^1.1.0",
25
- "@tweenjs/tween.js": "^18.6.4",
26
- "@types/three": "0.141.0"
25
+ "@tweenjs/tween.js": "^18.6.4"
27
26
  },
28
- "gitHead": "f5f6ce6c41eedf2a3ff0953895ed5c7e603516fa"
27
+ "peerDependencies": {
28
+ "three": ">=0.148.0"
29
+ },
30
+ "gitHead": "d0dc74ef0ec37c5792bc8063fba0adadcdf39852"
29
31
  }
@@ -1,5 +1,5 @@
1
- declare type AnimationModeType = 'Linear.None' | 'Quadratic.In' | 'Quadratic.Out' | 'Quadratic.InOut' | 'Cubic.In' | 'Cubic.Out' | 'Cubic.InOut' | 'Quartic.In' | 'Quartic.Out' | 'Quartic.InOut' | 'Quintic.In' | 'Quintic.Out' | 'Quintic.InOut' | 'Sinusoidal.In' | 'Sinusoidal.Out' | 'Sinusoidal.InOut' | 'Exponential.In' | 'Exponential.Out' | 'Exponential.InOut' | 'Circular.In' | 'Circular.Out' | 'Circular.InOut' | 'Elastic.In' | 'Elastic.Out' | 'Elastic.InOut' | 'Back.In' | 'Back.Out' | 'Back.InOut' | 'Bounce.In' | 'Bounce.Out' | 'Bounce.InOut';
2
- declare type AnimationModeValueType = (amount: number) => number;
1
+ type AnimationModeType = 'Linear.None' | 'Quadratic.In' | 'Quadratic.Out' | 'Quadratic.InOut' | 'Cubic.In' | 'Cubic.Out' | 'Cubic.InOut' | 'Quartic.In' | 'Quartic.Out' | 'Quartic.InOut' | 'Quintic.In' | 'Quintic.Out' | 'Quintic.InOut' | 'Sinusoidal.In' | 'Sinusoidal.Out' | 'Sinusoidal.InOut' | 'Exponential.In' | 'Exponential.Out' | 'Exponential.InOut' | 'Circular.In' | 'Circular.Out' | 'Circular.InOut' | 'Elastic.In' | 'Elastic.Out' | 'Elastic.InOut' | 'Back.In' | 'Back.Out' | 'Back.InOut' | 'Bounce.In' | 'Bounce.Out' | 'Bounce.InOut';
2
+ type AnimationModeValueType = (amount: number) => number;
3
3
  interface AnimationOptions {
4
4
  duration?: number;
5
5
  delay?: number;
@@ -16,10 +16,10 @@ interface IVector3 extends IVector2 {
16
16
  interface IVector3 extends IVector2 {
17
17
  z: number;
18
18
  }
19
- declare type Position = IVector3;
20
- declare type Rotation = IVector3;
21
- declare type Scale = IVector3;
22
- declare type IColor = string | number | Color;
19
+ type Position = IVector3;
20
+ type Rotation = IVector3;
21
+ type Scale = IVector3;
22
+ type IColor = string | number | Color;
23
23
  interface Level {
24
24
  max: number | null;
25
25
  min: number | null;
@@ -28,11 +28,11 @@ interface OffsetPoint {
28
28
  offsetX: number;
29
29
  offsetY: number;
30
30
  }
31
- declare type FlyToViewpoint = 'current' | 'top' | 'bottom' | 'front' | 'back' | 'left' | 'right' | 'frontTop' | 'backTop' | 'leftTop' | 'rightTop' | 'leftFrontTop' | 'rightFrontTop' | 'leftBackTop' | 'rightBackTop';
32
- declare type AxisType = 'x' | 'y' | 'z';
33
- declare type SceneEventType = 'hover' | 'click' | 'rightClick' | 'dblClick';
34
- declare type PoiType = '2d' | '2D' | '2.5d' | '2.5D';
35
- declare type PoiNodeType = PoiType | '3d' | '3D';
31
+ type FlyToViewpoint = 'current' | 'top' | 'bottom' | 'front' | 'back' | 'left' | 'right' | 'frontTop' | 'backTop' | 'leftTop' | 'rightTop' | 'leftFrontTop' | 'rightFrontTop' | 'leftBackTop' | 'rightBackTop';
32
+ type AxisType = 'x' | 'y' | 'z';
33
+ type SceneEventType = 'hover' | 'click' | 'rightClick' | 'dblClick';
34
+ type PoiType = '2d' | '2D' | '2.5d' | '2.5D';
35
+ type PoiNodeType = PoiType | '3d' | '3D';
36
36
  interface BaseSelectOptions {
37
37
  color?: IColor;
38
38
  opacity?: number;
@@ -1,7 +1,7 @@
1
1
  import { Vector3 } from 'three';
2
- export declare type FreeControlsType = 'free';
3
- export declare type OrbitControlsType = 'orbit';
4
- export declare type ControlsType = FreeControlsType | OrbitControlsType;
2
+ export type FreeControlsType = 'free';
3
+ export type OrbitControlsType = 'orbit';
4
+ export type ControlsType = FreeControlsType | OrbitControlsType;
5
5
  export interface FreeControlsOptions {
6
6
  type: FreeControlsType;
7
7
  enabled?: boolean;
@@ -34,7 +34,7 @@ export interface FreeControlsOptions {
34
34
  enablePanAxisZ?: boolean;
35
35
  panSpeed?: number;
36
36
  }
37
- export declare type FreeControlsProperties = Required<Omit<FreeControlsOptions, 'type'>>;
37
+ export type FreeControlsProperties = Required<Omit<FreeControlsOptions, 'type'>>;
38
38
  export interface OrbitControlsOptions {
39
39
  type: OrbitControlsType;
40
40
  enableAutoRotate?: boolean;
@@ -59,5 +59,5 @@ export interface OrbitControlsOptions {
59
59
  target?: Vector3;
60
60
  zoomSpeed?: number;
61
61
  }
62
- export declare type OrbitControlsProperties = Required<Omit<OrbitControlsOptions, 'type'>>;
63
- export declare type ControlsOptions = FreeControlsOptions | OrbitControlsOptions;
62
+ export type OrbitControlsProperties = Required<Omit<OrbitControlsOptions, 'type'>>;
63
+ export type ControlsOptions = FreeControlsOptions | OrbitControlsOptions;
@@ -10,7 +10,7 @@ interface BaseLightInfo {
10
10
  color?: IColor;
11
11
  intensity?: number;
12
12
  }
13
- declare type AmbientLightOptions = BaseLightInfo;
13
+ type AmbientLightOptions = BaseLightInfo;
14
14
  export interface ShadowOptions {
15
15
  openShadow?: boolean;
16
16
  shadowAutoUpdate?: boolean;
@@ -55,8 +55,8 @@ interface GroupProgress {
55
55
  interface GroupProgressCallback {
56
56
  (groupProgress: GroupProgress): void;
57
57
  }
58
- declare type CloneModelInfo = Omit<ModelInfo, 'url'>;
59
- declare type ClonePoiInfo = Omit<PoiInfo, 'url'>;
58
+ type CloneModelInfo = Omit<ModelInfo, 'url'>;
59
+ type ClonePoiInfo = Omit<PoiInfo, 'url'>;
60
60
  interface TopologyInfoForGml extends BaseObject3DInfo {
61
61
  url: string;
62
62
  linkWidth?: number;
@@ -103,7 +103,7 @@ interface TopologyNodeInfo {
103
103
  position: Position;
104
104
  graphs?: TopologyNodeGraph[];
105
105
  }
106
- declare type TopologyInnerNodeInfo = Omit<TopologyNodeInfo, 'graphs'> & {
106
+ type TopologyInnerNodeInfo = Omit<TopologyNodeInfo, 'graphs'> & {
107
107
  graphs: TopologyNodeGraph[];
108
108
  };
109
109
  interface TwoWaysLink {
@@ -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 IColorSpace = 'Linear' | 'sRGB';
6
+ export type IColorSpace = 'Linear' | 'sRGB';
7
7
  interface CameraViewpointData {
8
8
  position: Position;
9
9
  rotation: Rotation;
@@ -44,8 +44,8 @@ interface StrokeSelectOptions extends BaseSelectOptions {
44
44
  edgeColor?: IColor;
45
45
  edgeOpacity?: number;
46
46
  }
47
- declare type OpacitySelectOptions = BaseSelectOptions;
48
- declare type HighlightSelectOptions = BaseSelectOptions;
47
+ type OpacitySelectOptions = BaseSelectOptions;
48
+ type HighlightSelectOptions = BaseSelectOptions;
49
49
  interface EmissiveSelectOptions extends BaseSelectOptions {
50
50
  minOpacity?: number;
51
51
  maxOpacity?: number;
@@ -1,7 +1,7 @@
1
1
  import { Box3, Vector3, Euler, Mesh, BufferGeometry, Material } from 'three';
2
2
  import { Tween } from '@tweenjs/tween.js';
3
3
  import { Position, Rotation, Scale, Level, BaseObjectInfo, AnimationOptions, Interpolate } from '../Interface';
4
- declare type BaseMeshInfo = BaseObjectInfo<BaseMesh>;
4
+ type BaseMeshInfo = BaseObjectInfo<BaseMesh>;
5
5
  declare class BaseMesh extends Mesh {
6
6
  sid: string | number;
7
7
  stype: string;
@@ -1,7 +1,7 @@
1
1
  import { Object3D, Vector3, Euler, BaseEvent, Box3 } from 'three';
2
2
  import { Tween } from '@tweenjs/tween.js';
3
3
  import { Position, Rotation, Scale, Level, BaseObjectEvents, BaseObjectInfo, BaseObjectEventsListener, AnimationOptions, Interpolate } from '../Interface';
4
- declare type BaseObject3DInfo = BaseObjectInfo<BaseObject3D>;
4
+ type BaseObject3DInfo = BaseObjectInfo<BaseObject3D>;
5
5
  declare class BaseObject3D<Event extends BaseEvent = BaseObjectEventsListener> extends Object3D<Event> implements BaseObjectEvents<BaseObject3D> {
6
6
  sid: string | number;
7
7
  stype: string;
@@ -7,7 +7,7 @@ interface CircleInfo extends BaseMeshInfo {
7
7
  opacity?: number;
8
8
  gradient?: GradientTextureOptions;
9
9
  }
10
- declare type SetOptionsCircleInfo = Omit<CircleInfo, 'id'>;
10
+ type SetOptionsCircleInfo = Omit<CircleInfo, 'id'>;
11
11
  declare class Circle extends BaseMesh {
12
12
  constructor(param: CircleInfo);
13
13
  setOptions(params: SetOptionsCircleInfo): void;
@@ -1,6 +1,6 @@
1
1
  import { BaseMesh, BaseMeshInfo } from './BaseMesh';
2
2
  import { BufferGeometry, Material } from 'three';
3
- declare type GroundInfo = BaseMeshInfo;
3
+ type GroundInfo = BaseMeshInfo;
4
4
  declare class Ground extends BaseMesh {
5
5
  constructor(geometry: BufferGeometry, material: Material, param: GroundInfo);
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import { BaseObject3D, BaseObject3DInfo } from './BaseObject3D';
2
- declare type GroupInfo = BaseObject3DInfo;
2
+ type GroupInfo = BaseObject3DInfo;
3
3
  declare class Group extends BaseObject3D {
4
4
  constructor(param: GroupInfo);
5
5
  showAllChild(): void;
@@ -8,7 +8,7 @@ interface LineInfo extends BaseMeshInfo {
8
8
  opacity?: number;
9
9
  gradient?: GradientTextureOptions;
10
10
  }
11
- declare type SetOptionsLineInfo = Omit<LineInfo, 'id'>;
11
+ type SetOptionsLineInfo = Omit<LineInfo, 'id'>;
12
12
  declare class Line extends BaseMesh {
13
13
  points: Position[];
14
14
  params: LineInfo;
@@ -1,5 +1,5 @@
1
1
  import { BaseObject3D, BaseObject3DInfo } from './BaseObject3D';
2
- declare type PluginObjectInfo = BaseObject3DInfo;
2
+ type PluginObjectInfo = BaseObject3DInfo;
3
3
  declare class PluginObject extends BaseObject3D {
4
4
  constructor(param: PluginObjectInfo);
5
5
  }
@@ -7,7 +7,7 @@ interface PointInfo extends BaseMeshInfo {
7
7
  opacity?: number;
8
8
  gradient?: GradientTextureOptions;
9
9
  }
10
- declare type SetOptionsPointInfo = Omit<PointInfo, 'id'>;
10
+ type SetOptionsPointInfo = Omit<PointInfo, 'id'>;
11
11
  declare class Point extends BaseMesh {
12
12
  constructor(param: PointInfo, type?: string);
13
13
  setOptions(param: SetOptionsPointInfo): void;
@@ -8,7 +8,7 @@ interface PolygonInfo extends BaseMeshInfo {
8
8
  opacity?: number;
9
9
  gradient?: GradientTextureOptions;
10
10
  }
11
- declare type SetOptionsPolygonInfo = Omit<PolygonInfo, 'id'>;
11
+ type SetOptionsPolygonInfo = Omit<PolygonInfo, 'id'>;
12
12
  declare class Polygon extends BaseMesh {
13
13
  points: PlaneIVector2[];
14
14
  constructor(param: PolygonInfo, type?: string);
@@ -3,7 +3,7 @@ import { Node, NodeInfo } from './Node';
3
3
  import { Circle, CircleInfo } from './Circle';
4
4
  import { Link, LinkInfo } from './Link';
5
5
  import { TopologyNodeInfo, TopologyEffectInfo, TopologyInnerNodeInfo } from '../Interface';
6
- declare type TopologyType = 'line' | 'network';
6
+ type TopologyType = 'line' | 'network';
7
7
  interface TopologyInfo extends BaseObject3DInfo, TopologyEffectInfo {
8
8
  nodes: TopologyNodeInfo[];
9
9
  type: TopologyType;
@@ -1,8 +1,8 @@
1
+ /**
2
+ * 动态注入
3
+ */
1
4
  declare const _default: {
2
5
  serialNums: never[];
3
6
  key: string;
4
7
  };
5
- /**
6
- * 动态注入
7
- */
8
8
  export default _default;
@@ -35,7 +35,7 @@ export interface TexturesIndexes {
35
35
  alphamode: number;
36
36
  use_list: string[];
37
37
  }
38
- export declare type TexturesIndexesJson = Record<string, TexturesIndexes>;
38
+ export type TexturesIndexesJson = Record<string, TexturesIndexes>;
39
39
  export interface MaterialsMapValue {
40
40
  material: Material;
41
41
  materialIndex: number;
@@ -4,7 +4,7 @@ import { Texture, MeshStandardMaterial } from 'three';
4
4
  * @param textureUrl
5
5
  * @returns
6
6
  */
7
- export declare const isPNG: (textureUrl?: string | undefined) => boolean;
7
+ export declare const isPNG: (textureUrl?: string) => boolean;
8
8
  /**
9
9
  * 生成 sbm 纹理
10
10
  * @param url
@@ -22,7 +22,7 @@ interface ManagerStore {
22
22
  helperManager: HelperManage;
23
23
  pluginObjectManager: PluginObjectManage;
24
24
  }
25
- declare type ManageCache = {
25
+ type ManageCache = {
26
26
  objects: Map<BaseObject3D['sid'], Object3D>;
27
27
  };
28
28
  declare class Manager {
@@ -19,9 +19,9 @@ import { MinHeap } from '../../Shared';
19
19
  * const path = d.getPath('A', 'D');
20
20
  *
21
21
  */
22
- declare type BaseId = BaseObject3DInfo['id'];
23
- declare type Graph = Map<BaseId, Map<BaseId, number>>;
24
- declare type InputGraph = [BaseId, [BaseId, number][]][];
22
+ type BaseId = BaseObject3DInfo['id'];
23
+ type Graph = Map<BaseId, Map<BaseId, number>>;
24
+ type InputGraph = [BaseId, [BaseId, number][]][];
25
25
  declare class Dijkstras {
26
26
  graph: Graph;
27
27
  queue: MinHeap | null;
@@ -1,5 +1,5 @@
1
1
  import { BaseObject3DInfo } from '../Library';
2
- declare type BaseId = BaseObject3DInfo['id'];
2
+ type BaseId = BaseObject3DInfo['id'];
3
3
  interface MinHeapNode {
4
4
  nodeIndex: BaseId;
5
5
  distance: number;
@@ -0,0 +1,16 @@
1
+ /// <reference types="node" />
2
+ import Viewport from '.';
3
+ export type ModelsBoundsTreeOptions = {
4
+ type?: 'block' | 'slice';
5
+ force?: boolean;
6
+ frameSliceCount?: number;
7
+ };
8
+ declare class Bvh {
9
+ readonly viewport: Viewport;
10
+ cameraChanging: boolean;
11
+ timer: NodeJS.Timeout | null;
12
+ computedGeometriesUuid: Map<string, string>;
13
+ constructor(viewport: Viewport);
14
+ computeModelsBoundsTree(options?: ModelsBoundsTreeOptions): Promise<void>;
15
+ }
16
+ export default Bvh;
@@ -1,4 +1,4 @@
1
- import { Scene, Object3D } from 'three';
1
+ import { Scene, Mesh, Object3D } from 'three';
2
2
  import { EdgeSelectOptions, StrokeSelectOptions, OpacitySelectOptions, HighlightSelectOptions, EmissiveSelectOptions, FogOptions, SignalsState, ViewportState } from '../Interface';
3
3
  declare class Scener {
4
4
  readonly signals: SignalsState;
@@ -12,7 +12,7 @@ declare class Scener {
12
12
  emissive: Object3D[];
13
13
  };
14
14
  intersectsList: {
15
- meshOfModelList: Object3D[];
15
+ meshOfModelList: Mesh[];
16
16
  poiIconList: Object3D[];
17
17
  otherObjList: Object3D[];
18
18
  getAll: () => Object3D[];
@@ -1,13 +1,13 @@
1
- import { Clock, Scene, PerspectiveCamera, WebGLRenderer, PMREMGenerator, Vector3, AnimationMixer, Intersection, Object3D, AnimationAction, AnimationClip, Texture } from 'three';
1
+ import { Mesh, BufferGeometry, Clock, Scene, PerspectiveCamera, WebGLRenderer, PMREMGenerator, Vector3, AnimationMixer, Intersection, Object3D, AnimationAction, AnimationClip, Texture } from 'three';
2
2
  import { EffectComposer } from 'postprocessing';
3
3
  import Stats from 'three/examples/jsm/libs/stats.module.js';
4
4
  import { Sky } from 'three/examples/jsm/objects/Sky.js';
5
- import { GenerateMeshBVHWorker } from '../Math/bvh/GenerateMeshBVHWorker';
6
5
  import Scener from './Scener';
7
6
  import { CSS2DRenderer, CSS2DHalfRenderer, CSS3DRenderer } from '../Renderer';
8
7
  import RendererManager from './RendererManager';
9
8
  import CameraManager from './CameraManager';
10
9
  import EffectManager from './EffectManager';
10
+ import Bvh from './Bvh';
11
11
  import { Controls } from '../Controls';
12
12
  import { Model } from '../Library';
13
13
  import { IColorSpace, SkyOptions, IColor, OffsetPoint, SceneEventType, Position, ViewportOptions, ViewportState, ModelAnimationFindFunc, SignalsState, ToneMappingOptions, SSAOOptions, SSROptions, BloomOptions, IntersectsOptions } from '../Interface';
@@ -22,7 +22,6 @@ declare class Viewport {
22
22
  clock: Clock;
23
23
  options: ViewportOptions;
24
24
  state: ViewportState;
25
- bvhWorker: GenerateMeshBVHWorker;
26
25
  signals: SignalsState;
27
26
  scener: Scener;
28
27
  scene: Scene;
@@ -42,6 +41,7 @@ declare class Viewport {
42
41
  controls: Controls;
43
42
  effectManager: EffectManager;
44
43
  effectComposer: EffectComposer;
44
+ bvh: Bvh;
45
45
  mixer: AnimationMixer;
46
46
  clipsSet: Set<AnimationClip>;
47
47
  viewHelper: ViewHelper;
@@ -123,7 +123,7 @@ declare class Viewport {
123
123
  };
124
124
  getPositionByOffset(offset: OffsetPoint, z?: number): Vector3;
125
125
  getIntersects(event: MouseEvent | TouchEvent | OffsetPoint, objects?: Object3D<import("three").Event>[], options?: IntersectsOptions): Intersection<Object3D<import("three").Event>>[];
126
- rayClash(startPoint?: Vector3, dir?: Vector3, objects?: Object3D<import("three").Event>[]): Intersection<Object3D<import("three").Event>>[];
126
+ rayClash(startPoint?: Vector3, dir?: Vector3, objects?: Mesh<BufferGeometry, import("three").Material | import("three").Material[]>[]): Intersection<Object3D<import("three").Event>>[];
127
127
  setHoverEnabled(enabled: boolean): void;
128
128
  clearSignals(): void;
129
129
  dispose(): void;
package/types/index.d.ts CHANGED
@@ -7,9 +7,6 @@
7
7
  |_| |__/
8
8
  */
9
9
  import * as THREE from 'three';
10
- import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js';
11
- import { Reflector } from 'three/examples/jsm/objects/Reflector.js';
12
- import { mergeBufferGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils.js';
13
10
  import { Object3D, Vector3, Euler, Box3, AnimationClip, AnimationAction, Light, Texture, Mesh } from 'three';
14
11
  import * as shared from './Shared';
15
12
  import Animation from './Animation';
@@ -20,8 +17,9 @@ import Viewport from './Viewport';
20
17
  import Manager from './Manager';
21
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, IColorSpace, ToneMappingOptions, SSROptions, SSAOOptions, BloomOptions, IVector3 } from './Interface';
22
19
  import { BoxSpace, FindObjectsNearPosition, FindNearbyObjects, CreatePoiMeshOptions, CreatePolygonPoiMeshOptions, SetTextureOptions } from './tools';
23
- export declare type InitOptions = ViewportOptions;
24
- export declare type InitEvents = SceneGlobalEvents;
20
+ import { ModelsBoundsTreeOptions } from './Viewport/Bvh';
21
+ export type InitOptions = ViewportOptions;
22
+ export type InitEvents = SceneGlobalEvents;
25
23
  export interface SoonSpaceConstructor {
26
24
  el: string;
27
25
  options?: InitOptions;
@@ -193,11 +191,6 @@ export declare class SoonSpace {
193
191
  };
194
192
  static readonly utils: typeof shared;
195
193
  readonly utils: typeof shared;
196
- readonly THREE_PLUGINS: {
197
- TransformControls: typeof TransformControls;
198
- Reflector: typeof Reflector;
199
- mergeBufferGeometries: typeof mergeBufferGeometries;
200
- };
201
194
  readonly version: string;
202
195
  readonly options: InitOptions;
203
196
  readonly domElement: HTMLElement | null;
@@ -787,12 +780,16 @@ export declare class SoonSpace {
787
780
  * 隐藏所有 Model 模型
788
781
  */
789
782
  hideAllModel(): void;
783
+ /**
784
+ * 计算 model bvh
785
+ */
786
+ computeModelsBoundsTree(options?: ModelsBoundsTreeOptions): Promise<void>;
790
787
  /**
791
788
  * 清空本地模型缓存数据
792
789
  */
793
790
  clearIdb(): Promise<void>;
794
791
  /**
795
- * 获取 Model 模型缓冲
792
+ * 获取 Model 模型缓存
796
793
  */
797
794
  getModelsMap(): Map<string, library.Model>;
798
795
  /**
@@ -984,11 +981,11 @@ export declare class SoonSpace {
984
981
  /**
985
982
  * 给 mesh 设置纹理贴图
986
983
  * @param mesh - 需要设置的 Mesh 对象
987
- * @param image - 图片 url ,或 图片元素、Canvas元素、Video 元素
988
- * @param cache - 是否使用缓存中的材质
984
+ * @param image - 图片 url ,或 图片元素、Canvas元素、Video 元素、null
985
+ * @param options - 选项
989
986
  * @returns 返回设置的纹理对象
990
987
  */
991
- setTexture(mesh: Mesh, image: string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, options?: SetTextureOptions): THREE.Texture | THREE.CanvasTexture | THREE.VideoTexture;
988
+ setTexture(mesh: Mesh, image: string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | null, options?: SetTextureOptions): THREE.Texture | THREE.CanvasTexture | THREE.VideoTexture | null;
992
989
  /******/
993
990
  /******/
994
991
  /******* Canvas3D methods */
@@ -16,12 +16,12 @@ export interface BoxSpace {
16
16
  * @param position - 指定查找的位置
17
17
  * @returns 所有包含在指定空间的对象
18
18
  */
19
- export declare type FindObjectsNearPosition = (position: Vector3) => Object3D[];
19
+ export type FindObjectsNearPosition = (position: Vector3) => Object3D[];
20
20
  /**
21
21
  * 查找附近的对象
22
22
  * @param objs - 所有需要被查找的对象
23
23
  */
24
- export declare type FindNearbyObjects = (objs: Object3D[]) => Object3D[];
24
+ export type FindNearbyObjects = (objs: Object3D[]) => Object3D[];
25
25
  /**
26
26
  * 创建 查找位置附近的 box 空间范围内的物体
27
27
  * @param boxSpace - 描述查找空间的信息对象
@@ -1,7 +1,7 @@
1
1
  import { MeshPhongMaterialParameters, MeshBasicMaterialParameters, Texture } from 'three';
2
2
  import { IVector3, Level } from '../Interface';
3
3
  import { BaseMesh } from '../Library';
4
- export declare type TextureImage = string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
4
+ export type TextureImage = string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
5
5
  export interface PoiMeshOptions extends MeshBasicMaterialParameters, MeshPhongMaterialParameters {
6
6
  /**
7
7
  * 图片的url 或者是 HTMLImageElement | HTMLCanvasElement | HTMLVideoElement
@@ -1,12 +0,0 @@
1
- /**
2
- * GPU Instancing Extension
3
- *
4
- * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_mesh_gpu_instancing
5
- *
6
- */
7
- export default class GLTFMeshGpuInstancingExtension {
8
- constructor(parser: any);
9
- name: string;
10
- parser: any;
11
- createNodeMesh(nodeIndex: any): Promise<any> | null;
12
- }