viral-viewer-2 6.3.3 → 6.3.5
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.mjs
CHANGED
|
@@ -25288,6 +25288,9 @@ class w2 {
|
|
|
25288
25288
|
this.viralViewerApi.viralCamera.camera
|
|
25289
25289
|
), this.renderer.autoClear = !0));
|
|
25290
25290
|
}
|
|
25291
|
+
screenshot() {
|
|
25292
|
+
return this.renderer.domElement.toDataURL("image/png");
|
|
25293
|
+
}
|
|
25291
25294
|
}
|
|
25292
25295
|
class _2 {
|
|
25293
25296
|
constructor(e) {
|
|
@@ -36644,11 +36647,20 @@ class Q2 {
|
|
|
36644
36647
|
-(2 * T) / 2,
|
|
36645
36648
|
2 * T / 2,
|
|
36646
36649
|
-(2 * T) / 2
|
|
36647
|
-
)), await ((u = this.viralViewerApi.viralCamera.cameraControls) == null ? void 0 : u.fitToBox(
|
|
36650
|
+
)), await ((u = this.viralViewerApi.viralCamera.cameraControls) == null ? void 0 : u.fitToBox(
|
|
36651
|
+
new Ai(x, w),
|
|
36652
|
+
!1
|
|
36653
|
+
));
|
|
36648
36654
|
let S = new Y();
|
|
36649
|
-
(f = this.viralViewerApi.viralCamera.cameraControls) == null || f.getPosition(
|
|
36655
|
+
(f = this.viralViewerApi.viralCamera.cameraControls) == null || f.getPosition(
|
|
36656
|
+
S
|
|
36657
|
+
);
|
|
36650
36658
|
var o = S.distanceTo(E);
|
|
36651
|
-
if (await ((g = this.viralViewerApi.viralCamera.cameraControls) == null ? void 0 : g.setPosition(
|
|
36659
|
+
if (await ((g = this.viralViewerApi.viralCamera.cameraControls) == null ? void 0 : g.setPosition(
|
|
36660
|
+
S.x,
|
|
36661
|
+
S.y + o,
|
|
36662
|
+
S.z
|
|
36663
|
+
)), m) {
|
|
36652
36664
|
let O = m.Data[0][0];
|
|
36653
36665
|
if (O) {
|
|
36654
36666
|
let k = await this.getMaterials(
|
|
@@ -36660,12 +36672,9 @@ class Q2 {
|
|
|
36660
36672
|
t,
|
|
36661
36673
|
m.Data[1],
|
|
36662
36674
|
(F, W) => {
|
|
36663
|
-
F.length > 0 && this._loadElementStandaloneWorker.loadElement(
|
|
36664
|
-
|
|
36665
|
-
|
|
36666
|
-
W == m.Data[1].length - 1 && s();
|
|
36667
|
-
}
|
|
36668
|
-
);
|
|
36675
|
+
W == m.Data[1].length - 1 && F.length == 0 && s(), F.length > 0 && this._loadElementStandaloneWorker.loadElement(F, () => {
|
|
36676
|
+
W == m.Data[1].length - 1 && s();
|
|
36677
|
+
});
|
|
36669
36678
|
}
|
|
36670
36679
|
));
|
|
36671
36680
|
}
|
|
@@ -41132,6 +41141,8 @@ class _3 {
|
|
|
41132
41141
|
this.lifeCycleEvent,
|
|
41133
41142
|
this.options
|
|
41134
41143
|
), this.targetElement = e.container, FC("QUICK_SAND"), XC(this.targetElement, "QUICK_SAND"), this.options.enableNavigationCube && (this.viralNavigationCube = new o3(this)), this.options.enableTools && (this.viralTools = new t3(this)), this.viralSpinner = new qC(this), this.viralDraggableModal = new ZC(this), this.viralContextMenu = new A2(this), this.viralScene = new i2(this), this.viralMaterialManager = new zC(this), this.viralRenderer = new w2(this), this.viralCamera = new GE(this), this.viralMouse = new WE(this), this.viralKeyboard = new S2(this), this.viralAnimation = new _2(this), this.viralVisibilityManager = new VC(this), this.viralCentralizedEventHandler = new T2(this), this.viralLoader = new PP(this), this.viralBVH = new BC(), this.viralDataManager = new QC(this), this.options.isDev && (this.viralStats = new CP(this)), this.options.isDev ? this.viralAnimation.devAnimation() : this.viralAnimation.animation();
|
|
41144
|
+
let t = window;
|
|
41145
|
+
t.VIRAL_VIEWER = this;
|
|
41135
41146
|
}
|
|
41136
41147
|
}
|
|
41137
41148
|
export {
|