soonspacejs 2.4.10 → 2.4.13
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 +16 -7
- package/dist/index.js +16 -7
- package/package.json +2 -2
- package/types/Loader/DatLoader/index.d.ts +16 -10
- package/types/Loader/DatLoader/parse-chunk/{dracoCompress.d.ts → dracoCompress.worker.d.ts} +4 -4
- package/types/Loader/DatLoader/parse-chunk/{gzipCompress.d.ts → gzipCompress.worker.d.ts} +0 -0
- package/types/Loader/DatLoader/parse-chunk/{noCompress.d.ts → noCompress.worker.d.ts} +0 -0
- package/types/Loader/DatLoader/parse-chunk/{index.d.ts → parseChunk.worker.d.ts} +2 -2
- package/types/Manager/SbmManage.d.ts +1 -0
- package/types/Viewport/Scener.d.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soonspacejs",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.13",
|
|
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": "
|
|
28
|
+
"gitHead": "2bf40c05acea4b0b8df5edd11bafa0cc3dfd89d5"
|
|
29
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BufferGeometry, Loader, Mesh } from 'three';
|
|
2
2
|
import { Material } from 'three';
|
|
3
3
|
import localforage from 'localforage';
|
|
4
4
|
export interface SubMesh {
|
|
@@ -7,12 +7,17 @@ export interface SubMesh {
|
|
|
7
7
|
uuid: string;
|
|
8
8
|
alphaMode: number;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
export interface TypedInfo {
|
|
11
|
+
byteOffset: number;
|
|
12
|
+
length: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ChunkInfo {
|
|
15
|
+
buffer: ArrayBuffer;
|
|
16
|
+
position: TypedInfo;
|
|
17
|
+
normal: TypedInfo;
|
|
18
|
+
color: TypedInfo;
|
|
19
|
+
texcoord: TypedInfo;
|
|
20
|
+
indice: TypedInfo;
|
|
16
21
|
sub_mesh: SubMesh[];
|
|
17
22
|
}
|
|
18
23
|
export interface TexturesIndexes {
|
|
@@ -34,11 +39,11 @@ export interface MaterialsMapValue {
|
|
|
34
39
|
material: Material;
|
|
35
40
|
materialIndex: number;
|
|
36
41
|
}
|
|
37
|
-
declare class DatLoader extends
|
|
42
|
+
declare class DatLoader extends Loader {
|
|
38
43
|
readonly store: typeof localforage;
|
|
39
44
|
loadedTextures: Map<string, Promise<any>>;
|
|
40
45
|
loadedMaterialsMap: Map<string, MaterialsMapValue>;
|
|
41
|
-
loadedMaterials:
|
|
46
|
+
loadedMaterials: Material[];
|
|
42
47
|
dracoDecoderPath: string | null;
|
|
43
48
|
workerPool: any;
|
|
44
49
|
workerSourceURL: string;
|
|
@@ -48,7 +53,7 @@ declare class DatLoader extends THREE.Loader {
|
|
|
48
53
|
* @param buffer
|
|
49
54
|
* @param url
|
|
50
55
|
*/
|
|
51
|
-
parseAsync(buffer: ArrayBuffer, url: string): Promise<
|
|
56
|
+
parseAsync(buffer: ArrayBuffer, url: string): Promise<Mesh<BufferGeometry, Material[]> | undefined>;
|
|
52
57
|
private _decodeBuffer;
|
|
53
58
|
private _initWorkerCreator;
|
|
54
59
|
private _createMesh;
|
|
@@ -58,5 +63,6 @@ declare class DatLoader extends THREE.Loader {
|
|
|
58
63
|
* @returns
|
|
59
64
|
*/
|
|
60
65
|
private _createMaterial;
|
|
66
|
+
dispose(): void;
|
|
61
67
|
}
|
|
62
68
|
export { DatLoader, };
|
|
@@ -4,10 +4,10 @@ declare global {
|
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
6
|
export declare const dracoCompress: (compressBuffer: ArrayBuffer) => Promise<{
|
|
7
|
-
position: Uint32Array | Float32Array | Int8Array |
|
|
8
|
-
normal: Uint32Array | Float32Array | Int8Array |
|
|
9
|
-
color: Uint32Array | Float32Array | Int8Array |
|
|
10
|
-
texcoord: Uint32Array | Float32Array | Int8Array |
|
|
7
|
+
position: Uint8Array | Uint32Array | Float32Array | Int8Array | Int16Array | Int32Array | Uint16Array;
|
|
8
|
+
normal: Uint8Array | Uint32Array | Float32Array | Int8Array | Int16Array | Int32Array | Uint16Array;
|
|
9
|
+
color: Uint8Array | Uint32Array | Float32Array | Int8Array | Int16Array | Int32Array | Uint16Array;
|
|
10
|
+
texcoord: Uint8Array | Uint32Array | Float32Array | Int8Array | Int16Array | Int32Array | Uint16Array;
|
|
11
11
|
indice: Uint32Array;
|
|
12
12
|
sub_mesh: {
|
|
13
13
|
start: number;
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { noCompressWorker } from './noCompress';
|
|
2
|
-
import { gzipCompressWorker } from './gzipCompress';
|
|
1
|
+
import { noCompressWorker } from './noCompress.worker';
|
|
2
|
+
import { gzipCompressWorker } from './gzipCompress.worker';
|
|
3
3
|
export { noCompressWorker, gzipCompressWorker, };
|
|
4
4
|
declare global {
|
|
5
5
|
interface Window {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Scene, Object3D } from 'three';
|
|
2
|
-
import { EdgeSelectOptions, StrokeSelectOptions, OpacitySelectOptions, HighlightSelectOptions, EmissiveSelectOptions, FogOptions, SignalsState } from '../Interface';
|
|
2
|
+
import { EdgeSelectOptions, StrokeSelectOptions, OpacitySelectOptions, HighlightSelectOptions, EmissiveSelectOptions, FogOptions, SignalsState, ViewportState } from '../Interface';
|
|
3
3
|
declare class Scener {
|
|
4
4
|
readonly signals: SignalsState;
|
|
5
|
+
readonly viewportState: ViewportState;
|
|
5
6
|
scene: Scene;
|
|
6
7
|
selectedObjects: {
|
|
7
8
|
edge: Object3D[];
|
|
@@ -16,7 +17,7 @@ declare class Scener {
|
|
|
16
17
|
otherObjList: Object3D[];
|
|
17
18
|
getAll: () => Object3D[];
|
|
18
19
|
};
|
|
19
|
-
constructor(signals: SignalsState);
|
|
20
|
+
constructor(signals: SignalsState, viewportState: ViewportState);
|
|
20
21
|
addObject(object: Object3D, parent?: Object3D): void;
|
|
21
22
|
removeObject(object: Object3D): void;
|
|
22
23
|
openSceneFog(options?: FogOptions): void;
|