@realsee/dnalogel 3.53.0 → 3.53.1
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/CHANGELOG.md +3 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.js +6 -7
- package/dist/index.umd.js +3 -3
- package/dist/shared-utils/five/FivePuppet.d.ts +1 -0
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/five/FivePuppet.d.ts +1 -0
- package/libs/shared-utils/five/FivePuppet.js +32 -33
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { InternalWebGLRenderer as
|
|
5
|
-
import * as
|
|
6
|
-
const
|
|
7
|
-
class
|
|
8
|
-
constructor(e,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var m = (t, e, a) => e in t ? p(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
|
|
3
|
+
var r = (t, e, a) => (m(t, typeof e != "symbol" ? e + "" : e, a), a);
|
|
4
|
+
import { InternalWebGLRenderer as d } from "@realsee/five";
|
|
5
|
+
import * as i from "three";
|
|
6
|
+
const l = new i.Vector2();
|
|
7
|
+
class u {
|
|
8
|
+
constructor(e, a) {
|
|
9
|
+
r(this, "scene", new i.Scene());
|
|
10
|
+
r(this, "five");
|
|
11
|
+
r(this, "renderer");
|
|
12
|
+
r(this, "cancelRequestAnimationFrameId");
|
|
13
|
+
r(this, "camera", new i.Camera());
|
|
14
|
+
r(this, "domInited", !1);
|
|
15
|
+
r(this, "canvasWrapper");
|
|
16
|
+
r(this, "params");
|
|
17
|
+
r(this, "_rendererCache");
|
|
18
|
+
r(this, "_cameraCache");
|
|
19
|
+
r(this, "animate", () => {
|
|
20
|
+
var s, c, o;
|
|
20
21
|
this.cancelRequestAnimationFrameId = requestAnimationFrame(this.animate);
|
|
21
|
-
const e = this.five.renderer.getSize(
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const i = document.createElement("div");
|
|
28
|
-
i.classList.add("five-puppet"), i.style.position = "absolute", i.style.pointerEvents = "none", i.style.left = "0", i.style.top = "0", i.style.zIndex = `${(m = (c = this.params) == null ? void 0 : c.zIndex) != null ? m : 1}`, i.appendChild(this.renderer.domElement), d.appendChild(i), this.domInited = !0;
|
|
29
|
-
}
|
|
22
|
+
const e = this.five.renderer.getSize(l), a = e.toArray().join(",");
|
|
23
|
+
a !== this._rendererCache && (this._rendererCache = a, this.renderer.setSize(e.x, e.y));
|
|
24
|
+
const n = this.five.camera.projectionMatrix.toArray().join(",") + this.five.camera.matrixWorld.toArray().join(",");
|
|
25
|
+
if (n !== this._cameraCache && (this._cameraCache = n, this.camera.copy(this.five.camera)), this.renderer.render(this.scene, this.camera), !this.domInited) {
|
|
26
|
+
const h = (s = this.five.getElement()) == null ? void 0 : s.parentElement;
|
|
27
|
+
h && (this.canvasWrapper = document.createElement("div"), this.canvasWrapper.classList.add("five-puppet"), this.canvasWrapper.style.position = "absolute", this.canvasWrapper.style.pointerEvents = "none", this.canvasWrapper.style.left = "0", this.canvasWrapper.style.top = "0", this.canvasWrapper.style.zIndex = `${(o = (c = this.params) == null ? void 0 : c.zIndex) != null ? o : 1}`, this.canvasWrapper.appendChild(this.renderer.domElement), h.appendChild(this.canvasWrapper), this.domInited = !0);
|
|
30
28
|
}
|
|
31
29
|
});
|
|
32
|
-
|
|
30
|
+
r(this, "stopAnimate", () => {
|
|
33
31
|
this.cancelRequestAnimationFrameId && cancelAnimationFrame(this.cancelRequestAnimationFrameId);
|
|
34
32
|
});
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
r(this, "destory", () => {
|
|
34
|
+
var e;
|
|
35
|
+
this.stopAnimate(), this.renderer.dispose(), this.renderer.domElement.remove(), (e = this.canvasWrapper) == null || e.remove();
|
|
37
36
|
});
|
|
38
|
-
this.five = e, this.params =
|
|
37
|
+
this.five = e, this.params = a, this.renderer = new d({
|
|
39
38
|
webgl2: !0,
|
|
40
39
|
pixelRatio: window.devicePixelRatio,
|
|
41
40
|
backgroundAlpha: 0,
|
|
@@ -44,5 +43,5 @@ class _ {
|
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
export {
|
|
47
|
-
|
|
46
|
+
u as FivePuppet
|
|
48
47
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.53.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.53.1",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/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