@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.
@@ -47,6 +47,7 @@ export declare class FivePuppet {
47
47
  private cancelRequestAnimationFrameId;
48
48
  private camera;
49
49
  private domInited;
50
+ private canvasWrapper?;
50
51
  private params?;
51
52
  private _rendererCache;
52
53
  private _cameraCache;
@@ -19,7 +19,7 @@ let b = class {
19
19
  /**
20
20
  * @realsee/dnalogel 版本号
21
21
  */
22
- i(this, "VERSION", "3.53.0");
22
+ i(this, "VERSION", "3.53.1");
23
23
  i(this, "NAME");
24
24
  i(this, "five");
25
25
  i(this, "workUtil");
@@ -47,6 +47,7 @@ export declare class FivePuppet {
47
47
  private cancelRequestAnimationFrameId;
48
48
  private camera;
49
49
  private domInited;
50
+ private canvasWrapper?;
50
51
  private params?;
51
52
  private _rendererCache;
52
53
  private _cameraCache;
@@ -1,41 +1,40 @@
1
- var h = Object.defineProperty;
2
- var p = (a, e, r) => e in a ? h(a, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[e] = r;
3
- var t = (a, e, r) => (p(a, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { InternalWebGLRenderer as l } from "@realsee/five";
5
- import * as n from "three";
6
- const f = new n.Vector2();
7
- class _ {
8
- constructor(e, r) {
9
- t(this, "scene", new n.Scene());
10
- t(this, "five");
11
- t(this, "renderer");
12
- t(this, "cancelRequestAnimationFrameId");
13
- t(this, "camera", new n.Camera());
14
- t(this, "domInited", !1);
15
- t(this, "params");
16
- t(this, "_rendererCache");
17
- t(this, "_cameraCache");
18
- t(this, "animate", () => {
19
- var o, c, m;
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(f), r = e.toArray().join(",");
22
- r !== this._rendererCache && (this._rendererCache = r, this.renderer.setSize(e.x, e.y));
23
- const s = this.five.camera.projectionMatrix.toArray().join(",") + this.five.camera.matrixWorld.toArray().join(",");
24
- if (s !== this._cameraCache && (this._cameraCache = s, this.camera.copy(this.five.camera)), this.renderer.render(this.scene, this.camera), !this.domInited) {
25
- const d = (o = this.five.getElement()) == null ? void 0 : o.parentElement;
26
- if (d) {
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
- t(this, "stopAnimate", () => {
30
+ r(this, "stopAnimate", () => {
33
31
  this.cancelRequestAnimationFrameId && cancelAnimationFrame(this.cancelRequestAnimationFrameId);
34
32
  });
35
- t(this, "destory", () => {
36
- this.stopAnimate(), this.renderer.dispose(), this.renderer.domElement.remove();
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 = r, this.renderer = new l({
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
- _ as FivePuppet
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.0",
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/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
6
6
  "background-repeat: no-repeat",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.53.0",
3
+ "version": "3.53.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",