viral-viewer-2 6.8.7 → 6.8.8

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.
@@ -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
- private static parseBuffer;
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 '../types';
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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viral-viewer-2",
3
- "version": "6.8.7",
3
+ "version": "6.8.8",
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.9.3",
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.6.7"
39
+ "three-mesh-bvh": "^0.9.1"
40
40
  }
41
41
  }