viral-viewer-2 6.5.2 → 6.5.4
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 +5 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -23270,7 +23270,7 @@ class O2 {
|
|
|
23270
23270
|
worldToClient(e) {
|
|
23271
23271
|
if (this.camera) {
|
|
23272
23272
|
let t = new G(e.x, e.y, e.z);
|
|
23273
|
-
this.camera.updateMatrixWorld(!0);
|
|
23273
|
+
this.camera.updateMatrixWorld(!0), this.camera.updateProjectionMatrix();
|
|
23274
23274
|
let i = t.project(this.camera);
|
|
23275
23275
|
return i.x = (i.x + 1) * this.targetElement.offsetWidth / 2, i.y = -(i.y - 1) * this.targetElement.offsetHeight / 2, i.z = 0, i;
|
|
23276
23276
|
}
|
|
@@ -23278,13 +23278,10 @@ class O2 {
|
|
|
23278
23278
|
}
|
|
23279
23279
|
worldToClient2(e) {
|
|
23280
23280
|
if (this.camera) {
|
|
23281
|
-
this.camera.updateMatrixWorld(!0), e.project(this.camera);
|
|
23282
|
-
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
(0.5 - e.y / 2) * (this.viralViewerApi.viralRenderer.renderer.domElement.height / window.devicePixelRatio)
|
|
23286
|
-
);
|
|
23287
|
-
return new G(t, i, 0);
|
|
23281
|
+
this.camera.updateMatrixWorld(!0), this.camera.updateProjectionMatrix(), e.project(this.camera);
|
|
23282
|
+
let t = this.viralViewerApi.viralRenderer.renderer.domElement.clientWidth / 2, i = this.viralViewerApi.viralRenderer.renderer.domElement.clientHeight / 2;
|
|
23283
|
+
const s = e.x * t + t, r = -(e.y * i) + i;
|
|
23284
|
+
return new G(s, r, 0);
|
|
23288
23285
|
}
|
|
23289
23286
|
return null;
|
|
23290
23287
|
}
|