viral-viewer-2 4.1.5 → 4.1.7
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/worker/viral-viewer-4.worker.d.ts +13 -0
- package/dist/components/worker/viral-viewer-4.worker.js +60 -0
- package/dist/components/worker/viral-viewer-4.worker.js.map +1 -0
- package/dist/components/worker-script/load-model-worker-3.script.d.ts +1 -0
- package/dist/components/worker-script/load-model-worker-3.script.js +34109 -0
- package/dist/components/worker-script/load-model-worker-3.script.js.map +1 -0
- package/dist/types.d.ts +22 -1
- package/dist/types.js +43 -3
- package/dist/types.js.map +1 -1
- package/dist/viral-viewer-api.d.ts +2 -0
- package/dist/viral-viewer-api.js +2 -0
- package/dist/viral-viewer-api.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare class ViralViewerRevitGeometry {
|
|
|
35
35
|
Indices: number[];
|
|
36
36
|
Transform: RevitTransform | null;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export declare class ViralPoint {
|
|
39
39
|
X: number;
|
|
40
40
|
Y: number;
|
|
41
41
|
Z: number;
|
|
@@ -45,6 +45,7 @@ export interface RevitTransform {
|
|
|
45
45
|
BasisY: ViralPoint;
|
|
46
46
|
BasisZ: ViralPoint;
|
|
47
47
|
Offset: ViralPoint;
|
|
48
|
+
Id: string;
|
|
48
49
|
}
|
|
49
50
|
export interface ViralViewerState {
|
|
50
51
|
CameraPoint: ViralPoint;
|
|
@@ -80,3 +81,23 @@ export declare class Dictionary<TKey, TValue> {
|
|
|
80
81
|
values(): TValue[];
|
|
81
82
|
count(): number;
|
|
82
83
|
}
|
|
84
|
+
export declare class ViralutionElement {
|
|
85
|
+
Solids: ViralutionSolid[];
|
|
86
|
+
Id: string;
|
|
87
|
+
Instances: RevitTransform[];
|
|
88
|
+
}
|
|
89
|
+
export declare class ViralutionSolid {
|
|
90
|
+
MaterialIndex: number;
|
|
91
|
+
Vertices: ViralPoint[];
|
|
92
|
+
Indices: number[];
|
|
93
|
+
}
|
|
94
|
+
export declare class ViralutionCamera {
|
|
95
|
+
scale: number;
|
|
96
|
+
eyePosition: ViralPoint;
|
|
97
|
+
upDirection: ViralPoint;
|
|
98
|
+
forwardDirection: ViralPoint;
|
|
99
|
+
}
|
|
100
|
+
export declare class ViralutionTrackingModel {
|
|
101
|
+
Data: Dictionary<number, number[][]>;
|
|
102
|
+
CameraData: ViralutionCamera;
|
|
103
|
+
}
|
package/dist/types.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Dictionary = exports.ViralKeyboardEventType = exports.ViralCameraEventType = exports.ViralMouseEventType = exports.ViralViewerRevitGeometry = exports.ViralViewerRevitNoneStructuralGeometry = void 0;
|
|
3
|
+
exports.ViralutionTrackingModel = exports.ViralutionCamera = exports.ViralutionSolid = exports.ViralutionElement = exports.Dictionary = exports.ViralKeyboardEventType = exports.ViralCameraEventType = exports.ViralMouseEventType = exports.ViralPoint = exports.ViralViewerRevitGeometry = exports.ViralViewerRevitNoneStructuralGeometry = void 0;
|
|
4
4
|
class ViralViewerRevitNoneStructuralGeometry {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.MaterialIndex = 0;
|
|
7
7
|
this.Vertices = [];
|
|
8
8
|
this.Indices = [];
|
|
9
|
-
this.Name =
|
|
9
|
+
this.Name = "";
|
|
10
10
|
this.Instances = [];
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -19,6 +19,14 @@ class ViralViewerRevitGeometry {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.ViralViewerRevitGeometry = ViralViewerRevitGeometry;
|
|
22
|
+
class ViralPoint {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.X = 0;
|
|
25
|
+
this.Y = 0;
|
|
26
|
+
this.Z = 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ViralPoint = ViralPoint;
|
|
22
30
|
var ViralMouseEventType;
|
|
23
31
|
(function (ViralMouseEventType) {
|
|
24
32
|
ViralMouseEventType[ViralMouseEventType["ON_MOUSE_MOVE"] = 0] = "ON_MOUSE_MOVE";
|
|
@@ -62,7 +70,7 @@ class Dictionary {
|
|
|
62
70
|
}
|
|
63
71
|
// Get all keys in the dictionary
|
|
64
72
|
keys() {
|
|
65
|
-
return Object.keys(this.items).map(key => key);
|
|
73
|
+
return Object.keys(this.items).map((key) => key);
|
|
66
74
|
}
|
|
67
75
|
// Get all values in the dictionary
|
|
68
76
|
values() {
|
|
@@ -74,4 +82,36 @@ class Dictionary {
|
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
84
|
exports.Dictionary = Dictionary;
|
|
85
|
+
class ViralutionElement {
|
|
86
|
+
constructor() {
|
|
87
|
+
this.Solids = [];
|
|
88
|
+
this.Id = "";
|
|
89
|
+
this.Instances = [];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.ViralutionElement = ViralutionElement;
|
|
93
|
+
class ViralutionSolid {
|
|
94
|
+
constructor() {
|
|
95
|
+
this.MaterialIndex = 0;
|
|
96
|
+
this.Vertices = [];
|
|
97
|
+
this.Indices = [];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.ViralutionSolid = ViralutionSolid;
|
|
101
|
+
class ViralutionCamera {
|
|
102
|
+
constructor() {
|
|
103
|
+
this.scale = 0;
|
|
104
|
+
this.eyePosition = new ViralPoint();
|
|
105
|
+
this.upDirection = new ViralPoint();
|
|
106
|
+
this.forwardDirection = new ViralPoint();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.ViralutionCamera = ViralutionCamera;
|
|
110
|
+
class ViralutionTrackingModel {
|
|
111
|
+
constructor() {
|
|
112
|
+
this.Data = new Dictionary();
|
|
113
|
+
this.CameraData = new ViralutionCamera();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
exports.ViralutionTrackingModel = ViralutionTrackingModel;
|
|
77
117
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AA0BA,MAAa,sCAAsC;IAAnD;QACE,kBAAa,GAAW,CAAC,CAAC;QAC1B,aAAQ,GAAiB,EAAE,CAAC;QAC5B,YAAO,GAAa,EAAE,CAAC;QACvB,SAAI,GAAW,EAAE,CAAC;QAClB,cAAS,GAAqB,EAAE,CAAC;IACnC,CAAC;CAAA;AAND,wFAMC;AACD,MAAa,wBAAwB;IAArC;QACE,aAAQ,GAAiB,EAAE,CAAC;QAC5B,YAAO,GAAa,EAAE,CAAC;QACvB,cAAS,GAA0B,IAAI,CAAC;IAC1C,CAAC;CAAA;AAJD,4DAIC;AACD,MAAa,UAAU;IAAvB;QACE,MAAC,GAAW,CAAC,CAAC;QACd,MAAC,GAAW,CAAC,CAAC;QACd,MAAC,GAAW,CAAC,CAAC;IAChB,CAAC;CAAA;AAJD,gCAIC;AAoBD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,+EAAa,CAAA;IACb,yFAAkB,CAAA;IAClB,qFAAgB,CAAA;IAChB,2FAAmB,CAAA;IACnB,uFAAiB,CAAA;AACnB,CAAC,EANW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAM9B;AACD,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,qEAAO,CAAA;IACP,uEAAQ,CAAA;AACV,CAAC,EAHW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAG/B;AACD,IAAY,sBAEX;AAFD,WAAY,sBAAsB;IAChC,yEAAO,CAAA;AACT,CAAC,EAFW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB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,kBAAa,GAAW,CAAC,CAAC;QAC1B,aAAQ,GAAiB,EAAE,CAAC;QAC5B,YAAO,GAAa,EAAE,CAAC;IACzB,CAAC;CAAA;AAJD,0CAIC;AACD,MAAa,gBAAgB;IAA7B;QACE,UAAK,GAAW,CAAC,CAAC;QAClB,gBAAW,GAAe,IAAI,UAAU,EAAE,CAAC;QAC3C,gBAAW,GAAe,IAAI,UAAU,EAAE,CAAC;QAC3C,qBAAgB,GAAe,IAAI,UAAU,EAAE,CAAC;IAClD,CAAC;CAAA;AALD,4CAKC;AACD,MAAa,uBAAuB;IAApC;QACE,SAAI,GAAmC,IAAI,UAAU,EAAE,CAAC;QACxD,eAAU,GAAqB,IAAI,gBAAgB,EAAE,CAAC;IACxD,CAAC;CAAA;AAHD,0DAGC"}
|
|
@@ -16,6 +16,7 @@ import { ViralCentralizedEventHandler } from "./components/centralized-event-han
|
|
|
16
16
|
import { ViralLoader } from "./components/loader/viral.loader";
|
|
17
17
|
import { ViralStats } from "./components/stats/viral-stats";
|
|
18
18
|
import { ViralBVH } from "./components/bvh/viral-bvh";
|
|
19
|
+
import { ViralViewerWorker4 } from "./components/worker/viral-viewer-4.worker";
|
|
19
20
|
export declare class ViralViewerApi {
|
|
20
21
|
options: ViewerOptions;
|
|
21
22
|
targetElement: HTMLElement;
|
|
@@ -34,6 +35,7 @@ export declare class ViralViewerApi {
|
|
|
34
35
|
viralCompressProcessor: ViralCompressProcessor;
|
|
35
36
|
viralBVH: ViralBVH;
|
|
36
37
|
worker3: ViralViewerWorker3;
|
|
38
|
+
worker4: ViralViewerWorker4;
|
|
37
39
|
localStorageService: LocalStorageService;
|
|
38
40
|
viralStats: ViralStats | null;
|
|
39
41
|
constructor(options?: ViewerOptions);
|
package/dist/viral-viewer-api.js
CHANGED
|
@@ -18,6 +18,7 @@ const viral_centralized_event_handler_1 = require("./components/centralized-even
|
|
|
18
18
|
const viral_loader_1 = require("./components/loader/viral.loader");
|
|
19
19
|
const viral_stats_1 = require("./components/stats/viral-stats");
|
|
20
20
|
const viral_bvh_1 = require("./components/bvh/viral-bvh");
|
|
21
|
+
const viral_viewer_4_worker_1 = require("./components/worker/viral-viewer-4.worker");
|
|
21
22
|
class ViralViewerApi {
|
|
22
23
|
constructor(options = {
|
|
23
24
|
isDev: false,
|
|
@@ -44,6 +45,7 @@ class ViralViewerApi {
|
|
|
44
45
|
this.viralLoader = new viral_loader_1.ViralLoader(this);
|
|
45
46
|
this.viralBVH = new viral_bvh_1.ViralBVH();
|
|
46
47
|
this.worker3 = new viral_viewer_3_worker_1.ViralViewerWorker3(this);
|
|
48
|
+
this.worker4 = new viral_viewer_4_worker_1.ViralViewerWorker4(this);
|
|
47
49
|
if (this.options.isDev) {
|
|
48
50
|
this.viralStats = new viral_stats_1.ViralStats(this);
|
|
49
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viral-viewer-api.js","sourceRoot":"","sources":["../src/viral-viewer-api.ts"],"names":[],"mappings":";;;AACA,6FAAwF;AACxF,mEAA+D;AAC/D,gEAA4D;AAC5D,gEAA4D;AAC5D,yEAAqE;AACrE,8FAAyF;AACzF,4EAAwE;AACxE,gEAA4D;AAC5D,sEAAkE;AAClE,4EAAuE;AACvE,yEAAqE;AACrE,qFAA+E;AAC/E,qFAAgF;AAChF,4HAAsH;AACtH,mEAA+D;AAC/D,gEAA4D;AAC5D,0DAAsD;
|
|
1
|
+
{"version":3,"file":"viral-viewer-api.js","sourceRoot":"","sources":["../src/viral-viewer-api.ts"],"names":[],"mappings":";;;AACA,6FAAwF;AACxF,mEAA+D;AAC/D,gEAA4D;AAC5D,gEAA4D;AAC5D,yEAAqE;AACrE,8FAAyF;AACzF,4EAAwE;AACxE,gEAA4D;AAC5D,sEAAkE;AAClE,4EAAuE;AACvE,yEAAqE;AACrE,qFAA+E;AAC/E,qFAAgF;AAChF,4HAAsH;AACtH,mEAA+D;AAC/D,gEAA4D;AAC5D,0DAAsD;AAEtD,qFAA+E;AAE/E,MAA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