viral-viewer-2 6.8.7 → 6.8.9
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/components/camera/viral-camera.d.ts +2 -17
- package/dist/components/custom-objects/viral-batched-mesh.d.ts +35 -8
- package/dist/components/custom-objects/viral-edge-mesh.d.ts +133 -0
- package/dist/components/custom-objects/viral-instanced-mesh-v2.d.ts +142 -0
- package/dist/components/custom-objects/viral-instanced-mesh-v3.d.ts +123 -0
- package/dist/components/custom-objects/viral-merged-model.d.ts +46 -6
- package/dist/components/data-manager/viral-data-manager.d.ts +1 -0
- package/dist/components/duplication-analyzer/viral-duplication-analyzer.d.ts +74 -0
- package/dist/components/loader/viral-flatbuffer.loader.d.ts +13 -0
- package/dist/components/loader/viral.loader.d.ts +2 -0
- package/dist/components/lod-generator/viral-lod-generator.d.ts +116 -0
- package/dist/components/worker/base/worker-pool.d.ts +1 -0
- package/dist/components/worker/load-element-patch.worker.d.ts +5 -26
- package/dist/components/worker-script/load-instanced-element.script.d.ts +1 -0
- package/dist/index.mjs +17999 -24447
- package/dist/serializers/viralution-flatbuffer.serializer.d.ts +7 -1
- package/dist/serializers/viralution-standalone.serializer.d.ts +3 -1
- package/dist/types.d.ts +14 -0
- package/package.json +3 -3
|
@@ -64,7 +64,13 @@ export declare class ViralutionFlatBufferSerializer {
|
|
|
64
64
|
* @param data - Uint8Array containing the FlatBuffer data
|
|
65
65
|
* @returns Parsed data in the format: { [key: number]: { [key: string]: { [key: string]: string } } }
|
|
66
66
|
*/
|
|
67
|
-
|
|
67
|
+
static parseBuffer(data: Uint8Array): {
|
|
68
|
+
[key: number]: {
|
|
69
|
+
[key: string]: {
|
|
70
|
+
[key: string]: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
68
74
|
/**
|
|
69
75
|
* Core parsing logic with flattened structure - stores properties as individual entries
|
|
70
76
|
* @param data - Uint8Array containing the FlatBuffer data
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViralutionStandaloneModel } from
|
|
1
|
+
import { ViralutionElement, ViralutionStandaloneModel, type RenderMaterial } from "../types";
|
|
2
2
|
export declare class ViralutionStandaloneSerializer {
|
|
3
3
|
/** Load from URL (browser or Node fetch) and parse */
|
|
4
4
|
static fetchAndParse(url: string): Promise<ViralutionStandaloneModel>;
|
|
@@ -10,5 +10,7 @@ export declare class ViralutionStandaloneSerializer {
|
|
|
10
10
|
static load(pathOrUrl: string): Promise<ViralutionStandaloneModel>;
|
|
11
11
|
/** Parse Uint8Array FlatBuffer → ViralutionStandaloneModel */
|
|
12
12
|
static parseBuffer(data: Uint8Array): ViralutionStandaloneModel;
|
|
13
|
+
static parseMaterials(data: Uint8Array): RenderMaterial[];
|
|
14
|
+
static parseElements(data: Uint8Array): ViralutionElement[];
|
|
13
15
|
private static _toViralPoint;
|
|
14
16
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -144,6 +144,7 @@ export declare class ViralutionTrackingModel {
|
|
|
144
144
|
[key: number]: number[][];
|
|
145
145
|
};
|
|
146
146
|
CameraData: ViralutionCamera;
|
|
147
|
+
Translation: number[];
|
|
147
148
|
}
|
|
148
149
|
export declare class IFCTrackingModel {
|
|
149
150
|
Data: {
|
|
@@ -158,13 +159,26 @@ export declare class DebouncedEventHandler<T> {
|
|
|
158
159
|
handleEvent: (event: T) => void;
|
|
159
160
|
}
|
|
160
161
|
export declare class BufferElement {
|
|
162
|
+
/**
|
|
163
|
+
* In case this buffer element is instanced mesh this buffer is original geometry
|
|
164
|
+
*/
|
|
161
165
|
buffer: Float32Array | null;
|
|
166
|
+
/**
|
|
167
|
+
* In case this buffer element is instanced mesh this field is null
|
|
168
|
+
*/
|
|
162
169
|
elementId: string;
|
|
163
170
|
modelId: number;
|
|
164
171
|
localMaterialIndex?: number;
|
|
165
172
|
globalMaterialIndex?: number;
|
|
166
173
|
minPoint?: ViralPoint;
|
|
167
174
|
maxPoint?: ViralPoint;
|
|
175
|
+
/**
|
|
176
|
+
* In case this buffer element is instanced mesh
|
|
177
|
+
*/
|
|
178
|
+
instances: {
|
|
179
|
+
elementId: string;
|
|
180
|
+
transform: number[];
|
|
181
|
+
}[];
|
|
168
182
|
}
|
|
169
183
|
export interface LightConfiguration {
|
|
170
184
|
enabled?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viral-viewer-2",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"camera-controls": "^2.9.0",
|
|
35
|
-
"n8ao": "^1.
|
|
35
|
+
"n8ao": "^1.10.1",
|
|
36
36
|
"pako": "^2.1.0",
|
|
37
37
|
"potree-core-viral": "^0.3.0",
|
|
38
38
|
"three": "^0.171.0",
|
|
39
|
-
"three-mesh-bvh": "^0.
|
|
39
|
+
"three-mesh-bvh": "^0.9.1"
|
|
40
40
|
}
|
|
41
41
|
}
|