viral-viewer-2 6.8.6 → 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.
- package/dist/components/camera/viral-camera.d.ts +2 -17
- package/dist/components/data-manager/viral-data-manager.d.ts +1 -0
- package/dist/components/loader/viral-flatbuffer.loader.d.ts +13 -0
- package/dist/components/loader/viral.loader.d.ts +2 -0
- package/dist/index.mjs +22166 -21754
- 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 +1 -0
- package/dist/viral-viewer-api.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import CameraControls from "camera-controls";
|
|
2
2
|
import { ViralCameraEventType, ViralViewerState } from "../../types";
|
|
3
3
|
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
4
|
-
import { Vector3,
|
|
4
|
+
import { Vector3, Raycaster, PerspectiveCamera, Object3D, OrthographicCamera } from "three";
|
|
5
5
|
export declare class ViralCamera {
|
|
6
6
|
viralViewerApi: ViralViewerApi;
|
|
7
7
|
raycaster: Raycaster;
|
|
@@ -40,6 +40,7 @@ export declare class ViralCamera {
|
|
|
40
40
|
worldToClient2(point: Vector3): Vector3 | null;
|
|
41
41
|
private castRay;
|
|
42
42
|
updateMainCamera(): void;
|
|
43
|
+
adjustCameraFarFromScene(margin?: number): void;
|
|
43
44
|
private cameraWakeQueuedEvents;
|
|
44
45
|
private cameraSleepQueuedEvents;
|
|
45
46
|
private cameraUpdateQueuedEvents;
|
|
@@ -52,20 +53,4 @@ export declare class ViralCamera {
|
|
|
52
53
|
addEventListener(type: ViralCameraEventType, key: string, resolve: () => void): void;
|
|
53
54
|
removeEventListener(type: ViralCameraEventType, key: string): void;
|
|
54
55
|
getAllEventListener(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Calculate optimal spatial grid size based on camera far plane
|
|
57
|
-
*/
|
|
58
|
-
getOptimalSpatialGridSize(worldBounds: Box3): Vector3;
|
|
59
|
-
taa: {
|
|
60
|
-
enabled: boolean;
|
|
61
|
-
samples: number;
|
|
62
|
-
index: number;
|
|
63
|
-
offsets: [number, number][];
|
|
64
|
-
};
|
|
65
|
-
private halton;
|
|
66
|
-
private buildJitterOffsets;
|
|
67
|
-
enableTAA(samples?: number): void;
|
|
68
|
-
disableTAA(): void;
|
|
69
|
-
applyJitter(): void;
|
|
70
|
-
clearJitter(): void;
|
|
71
56
|
}
|
|
@@ -9,6 +9,7 @@ export declare class ViralDataManager {
|
|
|
9
9
|
private _checkClashWorker;
|
|
10
10
|
constructor(viralViewerApi: ViralViewerApi);
|
|
11
11
|
normalFetch(url: string, byteRangeStart?: number, byteRangeEnd?: number): Promise<Response>;
|
|
12
|
+
gzipFetch(url: string): Promise<Response>;
|
|
12
13
|
/**
|
|
13
14
|
* worker fetch can only return json or arraybuffer value
|
|
14
15
|
* @param url
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ViralutionElement } from "../../types";
|
|
2
|
+
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
3
|
+
export declare class ViralFlatbufferLoader {
|
|
4
|
+
viralViewerApi: ViralViewerApi;
|
|
5
|
+
elements: ViralutionElement[];
|
|
6
|
+
private _loadElementPatchWorker;
|
|
7
|
+
constructor(viralViewerApi: ViralViewerApi);
|
|
8
|
+
load(trackingUrl: string, informationUrl: string, materialsUrl: string, elementsUrls: string[], callbackOnFinish?: () => void): Promise<void>;
|
|
9
|
+
private getInformations;
|
|
10
|
+
private getTracking;
|
|
11
|
+
private getMaterials;
|
|
12
|
+
private getElements;
|
|
13
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
2
|
+
import { ViralFlatbufferLoader } from "./viral-flatbuffer.loader";
|
|
2
3
|
import { ViralPointCloudLoader } from "./viral-point-cloud.loader";
|
|
3
4
|
import { ViralRevitLoader } from "./viral-revit.loader";
|
|
4
5
|
import { ViralThreeLoader } from "./viral-three.loader";
|
|
@@ -7,5 +8,6 @@ export declare class ViralLoader {
|
|
|
7
8
|
revitLoader: ViralRevitLoader;
|
|
8
9
|
pointCloudLoader: ViralPointCloudLoader;
|
|
9
10
|
threeLoader: ViralThreeLoader;
|
|
11
|
+
flatbufferLoader: ViralFlatbufferLoader;
|
|
10
12
|
constructor(viralViewerApi: ViralViewerApi);
|
|
11
13
|
}
|