soonspacejs 2.5.0-alpha.0 → 2.5.0-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soonspacejs",
3
- "version": "2.5.0-alpha.0",
3
+ "version": "2.5.0-rc.1",
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": "b8187989f9105b6b235cc22a8e093b4ecab698fb"
28
+ "gitHead": "50b1248bbdb82c6600be04fcbe35e6f1f3d1e8d3"
29
29
  }
@@ -0,0 +1 @@
1
+ export declare const INNER_ID = "[soonspacejs]: ";
@@ -1,4 +1,4 @@
1
- import { BufferGeometry, Loader, Mesh, MeshStandardMaterial } from 'three';
1
+ import { Group, Loader, MeshStandardMaterial } from 'three';
2
2
  import { Material } from 'three';
3
3
  import localforage from 'localforage';
4
4
  export interface SubMesh {
@@ -55,7 +55,7 @@ declare class DatLoader extends Loader {
55
55
  * @param buffer
56
56
  * @param url
57
57
  */
58
- parseAsync(buffer: ArrayBuffer, url: string): Promise<Mesh<BufferGeometry, MeshStandardMaterial[]> | undefined>;
58
+ parseAsync(buffer: ArrayBuffer, url: string): Promise<Group | undefined>;
59
59
  private _decodeBuffer;
60
60
  private _initWorkerCreator;
61
61
  private _createMesh;
@@ -4,10 +4,10 @@ declare global {
4
4
  }
5
5
  }
6
6
  export declare const dracoCompress: (compressBuffer: ArrayBuffer) => Promise<{
7
- position: Uint8Array | Float32Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array;
8
- normal: Uint8Array | Float32Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array;
9
- color: Uint8Array | Float32Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array;
10
- texcoord: Uint8Array | Float32Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array;
7
+ position: Float32Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array;
8
+ normal: Float32Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array;
9
+ color: Float32Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array;
10
+ texcoord: Float32Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array;
11
11
  indice: Uint32Array;
12
12
  sub_mesh: {
13
13
  start: number;
@@ -1,7 +1,7 @@
1
1
  import { Model, ModelInfo } from '../../Library';
2
- import SDataView from './SDataView';
3
2
  import { ModelLoadingProgressCallback } from '../../Interface';
4
3
  import { SbmCache } from '../../Interface/sbmCache';
4
+ import SDataView from './SDataView';
5
5
  declare class SbkLoader {
6
6
  materials: Map<string, any>;
7
7
  sbmInfo: ModelInfo | null;
@@ -10,7 +10,7 @@ import DefaultManage from './DefaultManage';
10
10
  declare class ModelManage extends DefaultManage {
11
11
  readonly viewport: Viewport;
12
12
  modelsPromiseMap: Map<string, Promise<Model | null>>;
13
- modelMaps: Map<string, Model>;
13
+ modelsMap: Map<string, Model>;
14
14
  /**
15
15
  * workaround for types
16
16
  */
@@ -53,7 +53,7 @@ declare class ModelManage extends DefaultManage {
53
53
  * private methods
54
54
  */
55
55
  private _initLoadingManager;
56
- private _setModelMpas;
56
+ private _setModelsMap;
57
57
  private _parseSbm;
58
58
  private _parseSbmx;
59
59
  private _parseDat;
@@ -0,0 +1,11 @@
1
+ import { BufferGeometry } from 'three';
2
+ import { MeshBVH } from 'three-mesh-bvh';
3
+ declare class GenerateMeshBVHWorker {
4
+ workerPool: any;
5
+ constructor();
6
+ generate(geometry: BufferGeometry, options?: any): Promise<MeshBVH>;
7
+ dispose(): void;
8
+ terminate(): void;
9
+ }
10
+ declare const generateMeshBVHWorker: GenerateMeshBVHWorker;
11
+ export { generateMeshBVHWorker, };
@@ -0,0 +1 @@
1
+ export {};
@@ -13,6 +13,7 @@ declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
13
13
  declare const getValueType: (val: any) => string;
14
14
  declare const sleep: (time: number) => Promise<void>;
15
15
  declare const getAsciiString: (buf: ArrayBufferLike, offset: number, len: number) => string;
16
+ declare const randomString: () => string;
16
17
  export * from './log';
17
18
  export * from './viewport';
18
19
  export * from './MinHeap';
@@ -25,5 +26,5 @@ export * from './task';
25
26
  export { hasOwn, };
26
27
  export { isString, isBoolean, isNumber, isNull, isUndefined, isSymbol, };
27
28
  export { isDate, isArray, isObject, isFunction, isPromise, };
28
- export { getValueType, sleep, getAsciiString, };
29
+ export { getValueType, sleep, getAsciiString, randomString, };
29
30
  export { exportGltf, } from '../exporters';
@@ -25,4 +25,5 @@ declare function getSpaceAttributeFromObject(object: Object3D, isFromWorld?: boo
25
25
  * @param isFromWorld
26
26
  */
27
27
  declare function syncSpaceAttributeToObject(target: Object3D, source: Object3D, isFromWorld?: boolean): void;
28
- export { IVector3ToVector3, IVector3ToEuler, getBoundingBox, rotationAxisFix, rotationAFix, deg2Euler, euler2Deg, getSpaceAttributeFromObject, syncSpaceAttributeToObject, };
28
+ declare function isHideObject(object: Object3D): boolean;
29
+ export { IVector3ToVector3, IVector3ToEuler, getBoundingBox, rotationAxisFix, rotationAFix, deg2Euler, euler2Deg, getSpaceAttributeFromObject, syncSpaceAttributeToObject, isHideObject, };
package/types/index.d.ts CHANGED
@@ -685,11 +685,11 @@ export default class SoonSpace {
685
685
  /**
686
686
  * 获取 Model 模型缓冲
687
687
  */
688
- getModelMaps(): Map<string, library.Model>;
688
+ getModelsMap(): Map<string, library.Model>;
689
689
  /**
690
690
  * 设置 Model 模型缓冲
691
691
  */
692
- setModelMaps(maps: Map<string, Model>): void;
692
+ setModelsMap(map: Map<string, Model>): void;
693
693
  /******/
694
694
  /******/
695
695
  /******* Poi methods */