@quick-threejs/reactive 0.1.41 → 0.1.43

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/worker.mjs CHANGED
@@ -1,9 +1,9 @@
1
- var Ye = Object.defineProperty;
2
- var Fe = (t, e, i) => e in t ? Ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
3
- var a = (t, e, i) => Fe(t, typeof e != "symbol" ? e + "" : e, i);
4
- import { w as Ue, _ as ue, y as me, O as Ze, z as Ae, B as ze, G as Ke, H as We, s as p, L as d, I as Xe, i as h, P as qe, h as ce, S as N, k as C, m as q, l as x, E as fe, D as ve, j as Be, p as Ge, J as be, M as Ve, R as Qe, A as Je, d as ke, f as et, q as tt, C as it } from "./FontLoader-Cp39O036.mjs";
5
- import { Ray as st, Plane as rt, MathUtils as nt, Vector3 as b, Controls as ot, MOUSE as $, TOUCH as D, Quaternion as Pe, Spherical as ge, Vector2 as v, PerspectiveCamera as E, OrthographicCamera as I, Camera as j, Scene as Le, WebGLRenderer as Ce, PCFSoftShadowMap as at, SRGBColorSpace as ht, CineonToneMapping as ct, AxesHelper as lt, GridHelper as _t, AnimationClip as pt } from "three";
6
- var dt = {
1
+ var Ke = Object.defineProperty;
2
+ var We = (t, e, i) => e in t ? Ke(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
3
+ var a = (t, e, i) => We(t, typeof e != "symbol" ? e + "" : e, i);
4
+ import { w as Xe, _ as ve, y as be, O as qe, z as Ne, B as He, G as Be, H as Ve, s as p, L as d, I as Ge, i as h, P as Qe, j as ce, S as N, l as C, m as q, n as x, E as Pe, D as ge, k as Je, q as ke, J as Ce, M as et, R as tt, A as it, d as st, f as rt, h as Se, C as nt } from "./FontLoader-Dz0z8aMc.mjs";
5
+ import { Ray as ot, Plane as at, MathUtils as ht, Vector3 as b, Controls as ct, MOUSE as $, TOUCH as D, Quaternion as we, Spherical as ye, Vector2 as v, PerspectiveCamera as E, OrthographicCamera as I, Camera as j, Scene as Fe, WebGLRenderer as Oe, PCFSoftShadowMap as lt, SRGBColorSpace as _t, CineonToneMapping as pt, AxesHelper as dt, GridHelper as ut, AnimationClip as mt } from "three";
6
+ var ft = {
7
7
  now: function() {
8
8
  return performance.now();
9
9
  },
@@ -15,28 +15,28 @@ var dt = {
15
15
  var r = e(function(n) {
16
16
  i = void 0, t(n);
17
17
  });
18
- return new Ue(function() {
18
+ return new Xe(function() {
19
19
  return i == null ? void 0 : i(r);
20
20
  });
21
21
  },
22
22
  requestAnimationFrame: function() {
23
23
  for (var t = [], e = 0; e < arguments.length; e++)
24
24
  t[e] = arguments[e];
25
- return requestAnimationFrame.apply(void 0, ue([], me(t)));
25
+ return requestAnimationFrame.apply(void 0, ve([], be(t)));
26
26
  },
27
27
  cancelAnimationFrame: function() {
28
28
  for (var t = [], e = 0; e < arguments.length; e++)
29
29
  t[e] = arguments[e];
30
- return cancelAnimationFrame.apply(void 0, ue([], me(t)));
30
+ return cancelAnimationFrame.apply(void 0, ve([], be(t)));
31
31
  },
32
32
  delegate: void 0
33
33
  };
34
- function ut(t) {
35
- return t ? Ie(t) : mt;
34
+ function vt(t) {
35
+ return t ? Ye(t) : bt;
36
36
  }
37
- function Ie(t) {
38
- return new Ze(function(e) {
39
- var i = t || dt, s = i.now(), r = 0, n = function() {
37
+ function Ye(t) {
38
+ return new qe(function(e) {
39
+ var i = t || ft, s = i.now(), r = 0, n = function() {
40
40
  e.closed || (r = B.requestAnimationFrame(function(o) {
41
41
  r = 0;
42
42
  var c = i.now();
@@ -51,38 +51,38 @@ function Ie(t) {
51
51
  };
52
52
  });
53
53
  }
54
- var mt = Ie();
55
- function ft(t, e) {
56
- return e === void 0 && (e = !1), Ae(function(i, s) {
54
+ var bt = Ye();
55
+ function Pt(t, e) {
56
+ return e === void 0 && (e = !1), Ne(function(i, s) {
57
57
  var r = 0;
58
- i.subscribe(ze(s, function(n) {
58
+ i.subscribe(He(s, function(n) {
59
59
  var o = t(n, r++);
60
60
  (o || e) && s.next(n), !o && s.complete();
61
61
  }));
62
62
  });
63
63
  }
64
- function vt(t, e, i) {
65
- var s = We(t) || e || i ? { next: t, error: e, complete: i } : t;
66
- return s ? Ae(function(r, n) {
64
+ function gt(t, e, i) {
65
+ var s = Ve(t) || e || i ? { next: t, error: e, complete: i } : t;
66
+ return s ? Ne(function(r, n) {
67
67
  var o;
68
68
  (o = s.subscribe) === null || o === void 0 || o.call(s);
69
69
  var c = !0;
70
- r.subscribe(ze(n, function(_) {
71
- var m;
72
- (m = s.next) === null || m === void 0 || m.call(s, _), n.next(_);
70
+ r.subscribe(He(n, function(l) {
71
+ var u;
72
+ (u = s.next) === null || u === void 0 || u.call(s, l), n.next(l);
73
73
  }, function() {
74
- var _;
75
- c = !1, (_ = s.complete) === null || _ === void 0 || _.call(s), n.complete();
76
- }, function(_) {
77
- var m;
78
- c = !1, (m = s.error) === null || m === void 0 || m.call(s, _), n.error(_);
74
+ var l;
75
+ c = !1, (l = s.complete) === null || l === void 0 || l.call(s), n.complete();
76
+ }, function(l) {
77
+ var u;
78
+ c = !1, (u = s.error) === null || u === void 0 || u.call(s, l), n.error(l);
79
79
  }, function() {
80
- var _, m;
81
- c && ((_ = s.unsubscribe) === null || _ === void 0 || _.call(s)), (m = s.finalize) === null || m === void 0 || m.call(s);
80
+ var l, u;
81
+ c && ((l = s.unsubscribe) === null || l === void 0 || l.call(s)), (u = s.finalize) === null || u === void 0 || u.call(s);
82
82
  }));
83
- }) : Ke;
83
+ }) : Be;
84
84
  }
85
- const Se = { type: "change" }, le = { type: "start" }, Ne = { type: "end" }, L = new st(), we = new rt(), bt = Math.cos(70 * nt.DEG2RAD), u = new b(), f = 2 * Math.PI, l = {
85
+ const De = { type: "change" }, le = { type: "start" }, Ue = { type: "end" }, L = new ot(), Ee = new at(), Ct = Math.cos(70 * ht.DEG2RAD), m = new b(), f = 2 * Math.PI, _ = {
86
86
  NONE: -1,
87
87
  ROTATE: 0,
88
88
  DOLLY: 1,
@@ -92,12 +92,18 @@ const Se = { type: "change" }, le = { type: "start" }, Ne = { type: "end" }, L =
92
92
  TOUCH_DOLLY_PAN: 5,
93
93
  TOUCH_DOLLY_ROTATE: 6
94
94
  }, Z = 1e-6;
95
- class ye extends ot {
95
+ class $e extends ct {
96
+ /**
97
+ * Constructs a new controls instance.
98
+ *
99
+ * @param {Object3D} object - The object that is managed by the controls.
100
+ * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
101
+ */
96
102
  constructor(e, i = null) {
97
- super(e, i), this.state = l.NONE, this.enabled = !0, this.target = new b(), this.cursor = new b(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: $.ROTATE, MIDDLE: $.DOLLY, RIGHT: $.PAN }, this.touches = { ONE: D.ROTATE, TWO: D.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new b(), this._lastQuaternion = new Pe(), this._lastTargetPosition = new b(), this._quat = new Pe().setFromUnitVectors(e.up, new b(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new ge(), this._sphericalDelta = new ge(), this._scale = 1, this._panOffset = new b(), this._rotateStart = new v(), this._rotateEnd = new v(), this._rotateDelta = new v(), this._panStart = new v(), this._panEnd = new v(), this._panDelta = new v(), this._dollyStart = new v(), this._dollyEnd = new v(), this._dollyDelta = new v(), this._dollyDirection = new b(), this._mouse = new v(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = gt.bind(this), this._onPointerDown = Pt.bind(this), this._onPointerUp = Ct.bind(this), this._onContextMenu = $t.bind(this), this._onMouseWheel = yt.bind(this), this._onKeyDown = Ot.bind(this), this._onTouchStart = Dt.bind(this), this._onTouchMove = Et.bind(this), this._onMouseDown = St.bind(this), this._onMouseMove = wt.bind(this), this._interceptControlDown = Rt.bind(this), this._interceptControlUp = Tt.bind(this), this.domElement !== null && this.connect(), this.update();
103
+ super(e, i), this.state = _.NONE, this.target = new b(), this.cursor = new b(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: $.ROTATE, MIDDLE: $.DOLLY, RIGHT: $.PAN }, this.touches = { ONE: D.ROTATE, TWO: D.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new b(), this._lastQuaternion = new we(), this._lastTargetPosition = new b(), this._quat = new we().setFromUnitVectors(e.up, new b(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new ye(), this._sphericalDelta = new ye(), this._scale = 1, this._panOffset = new b(), this._rotateStart = new v(), this._rotateEnd = new v(), this._rotateDelta = new v(), this._panStart = new v(), this._panEnd = new v(), this._panDelta = new v(), this._dollyStart = new v(), this._dollyEnd = new v(), this._dollyDelta = new v(), this._dollyDirection = new b(), this._mouse = new v(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = wt.bind(this), this._onPointerDown = St.bind(this), this._onPointerUp = yt.bind(this), this._onContextMenu = Mt.bind(this), this._onMouseWheel = Et.bind(this), this._onKeyDown = $t.bind(this), this._onTouchStart = Rt.bind(this), this._onTouchMove = Tt.bind(this), this._onMouseDown = Ot.bind(this), this._onMouseMove = Dt.bind(this), this._interceptControlDown = jt.bind(this), this._interceptControlUp = xt.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
98
104
  }
99
- connect() {
100
- this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
105
+ connect(e) {
106
+ super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
101
107
  }
102
108
  disconnect() {
103
109
  this.domElement.removeEventListener("pointerdown", this._onPointerDown), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.domElement.removeEventListener("pointercancel", this._onPointerUp), this.domElement.removeEventListener("wheel", this._onMouseWheel), this.domElement.removeEventListener("contextmenu", this._onContextMenu), this.stopListenToKeyEvents(), this.domElement.getRootNode().removeEventListener("keydown", this._interceptControlDown, { capture: !0 }), this.domElement.style.touchAction = "auto";
@@ -105,30 +111,61 @@ class ye extends ot {
105
111
  dispose() {
106
112
  this.disconnect();
107
113
  }
114
+ /**
115
+ * Get the current vertical rotation, in radians.
116
+ *
117
+ * @return {number} The current vertical rotation, in radians.
118
+ */
108
119
  getPolarAngle() {
109
120
  return this._spherical.phi;
110
121
  }
122
+ /**
123
+ * Get the current horizontal rotation, in radians.
124
+ *
125
+ * @return {number} The current horizontal rotation, in radians.
126
+ */
111
127
  getAzimuthalAngle() {
112
128
  return this._spherical.theta;
113
129
  }
130
+ /**
131
+ * Returns the distance from the camera to the target.
132
+ *
133
+ * @return {number} The distance from the camera to the target.
134
+ */
114
135
  getDistance() {
115
136
  return this.object.position.distanceTo(this.target);
116
137
  }
138
+ /**
139
+ * Adds key event listeners to the given DOM element.
140
+ * `window` is a recommended argument for using this method.
141
+ *
142
+ * @param {HTMLDOMElement} domElement - The DOM element
143
+ */
117
144
  listenToKeyEvents(e) {
118
145
  e.addEventListener("keydown", this._onKeyDown), this._domElementKeyEvents = e;
119
146
  }
147
+ /**
148
+ * Removes the key event listener previously defined with `listenToKeyEvents()`.
149
+ */
120
150
  stopListenToKeyEvents() {
121
151
  this._domElementKeyEvents !== null && (this._domElementKeyEvents.removeEventListener("keydown", this._onKeyDown), this._domElementKeyEvents = null);
122
152
  }
153
+ /**
154
+ * Save the current state of the controls. This can later be recovered with `reset()`.
155
+ */
123
156
  saveState() {
124
157
  this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
125
158
  }
159
+ /**
160
+ * Reset the controls to their state from either the last time the `saveState()`
161
+ * was called, or the initial state.
162
+ */
126
163
  reset() {
127
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Se), this.update(), this.state = l.NONE;
164
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(De), this.update(), this.state = _.NONE;
128
165
  }
129
166
  update(e = null) {
130
167
  const i = this.object.position;
131
- u.copy(i).sub(this.target), u.applyQuaternion(this._quat), this._spherical.setFromVector3(u), this.autoRotate && this.state === l.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
168
+ m.copy(i).sub(this.target), m.applyQuaternion(this._quat), this._spherical.setFromVector3(m), this.autoRotate && this.state === _.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
132
169
  let s = this.minAzimuthAngle, r = this.maxAzimuthAngle;
133
170
  isFinite(s) && isFinite(r) && (s < -Math.PI ? s += f : s > Math.PI && (s -= f), r < -Math.PI ? r += f : r > Math.PI && (r -= f), s <= r ? this._spherical.theta = Math.max(s, Math.min(r, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + r) / 2 ? Math.max(s, this._spherical.theta) : Math.min(r, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
134
171
  let n = !1;
@@ -138,28 +175,28 @@ class ye extends ot {
138
175
  const o = this._spherical.radius;
139
176
  this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), n = o != this._spherical.radius;
140
177
  }
141
- if (u.setFromSpherical(this._spherical), u.applyQuaternion(this._quatInverse), i.copy(this.target).add(u), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
178
+ if (m.setFromSpherical(this._spherical), m.applyQuaternion(this._quatInverse), i.copy(this.target).add(m), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
142
179
  let o = null;
143
180
  if (this.object.isPerspectiveCamera) {
144
- const c = u.length();
181
+ const c = m.length();
145
182
  o = this._clampDistance(c * this._scale);
146
- const _ = c - o;
147
- this.object.position.addScaledVector(this._dollyDirection, _), this.object.updateMatrixWorld(), n = !!_;
183
+ const l = c - o;
184
+ this.object.position.addScaledVector(this._dollyDirection, l), this.object.updateMatrixWorld(), n = !!l;
148
185
  } else if (this.object.isOrthographicCamera) {
149
186
  const c = new b(this._mouse.x, this._mouse.y, 0);
150
187
  c.unproject(this.object);
151
- const _ = this.object.zoom;
152
- this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), n = _ !== this.object.zoom;
153
- const m = new b(this._mouse.x, this._mouse.y, 0);
154
- m.unproject(this.object), this.object.position.sub(m).add(c), this.object.updateMatrixWorld(), o = u.length();
188
+ const l = this.object.zoom;
189
+ this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), n = l !== this.object.zoom;
190
+ const u = new b(this._mouse.x, this._mouse.y, 0);
191
+ u.unproject(this.object), this.object.position.sub(u).add(c), this.object.updateMatrixWorld(), o = m.length();
155
192
  } else
156
193
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
157
- o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (L.origin.copy(this.object.position), L.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(L.direction)) < bt ? this.object.lookAt(this.target) : (we.setFromNormalAndCoplanarPoint(this.object.up, this.target), L.intersectPlane(we, this.target))));
194
+ o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (L.origin.copy(this.object.position), L.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(L.direction)) < Ct ? this.object.lookAt(this.target) : (Ee.setFromNormalAndCoplanarPoint(this.object.up, this.target), L.intersectPlane(Ee, this.target))));
158
195
  } else if (this.object.isOrthographicCamera) {
159
196
  const o = this.object.zoom;
160
197
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), o !== this.object.zoom && (this.object.updateProjectionMatrix(), n = !0);
161
198
  }
162
- return this._scale = 1, this._performCursorZoom = !1, n || this._lastPosition.distanceToSquared(this.object.position) > Z || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Z || this._lastTargetPosition.distanceToSquared(this.target) > Z ? (this.dispatchEvent(Se), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
199
+ return this._scale = 1, this._performCursorZoom = !1, n || this._lastPosition.distanceToSquared(this.object.position) > Z || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Z || this._lastTargetPosition.distanceToSquared(this.target) > Z ? (this.dispatchEvent(De), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
163
200
  }
164
201
  _getAutoRotationAngle(e) {
165
202
  return e !== null ? f / 60 * this.autoRotateSpeed * e : f / 60 / 60 * this.autoRotateSpeed;
@@ -175,18 +212,18 @@ class ye extends ot {
175
212
  this._sphericalDelta.phi -= e;
176
213
  }
177
214
  _panLeft(e, i) {
178
- u.setFromMatrixColumn(i, 0), u.multiplyScalar(-e), this._panOffset.add(u);
215
+ m.setFromMatrixColumn(i, 0), m.multiplyScalar(-e), this._panOffset.add(m);
179
216
  }
180
217
  _panUp(e, i) {
181
- this.screenSpacePanning === !0 ? u.setFromMatrixColumn(i, 1) : (u.setFromMatrixColumn(i, 0), u.crossVectors(this.object.up, u)), u.multiplyScalar(e), this._panOffset.add(u);
218
+ this.screenSpacePanning === !0 ? m.setFromMatrixColumn(i, 1) : (m.setFromMatrixColumn(i, 0), m.crossVectors(this.object.up, m)), m.multiplyScalar(e), this._panOffset.add(m);
182
219
  }
183
220
  // deltaX and deltaY are in pixels; right and down are positive
184
221
  _pan(e, i) {
185
222
  const s = this.domElement;
186
223
  if (this.object.isPerspectiveCamera) {
187
224
  const r = this.object.position;
188
- u.copy(r).sub(this.target);
189
- let n = u.length();
225
+ m.copy(r).sub(this.target);
226
+ let n = m.length();
190
227
  n *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * n / s.clientHeight, this.object.matrix), this._panUp(2 * i * n / s.clientHeight, this.object.matrix);
191
228
  } else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / s.clientWidth, this.object.matrix), this._panUp(i * (this.object.top - this.object.bottom) / this.object.zoom / s.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
192
229
  }
@@ -351,16 +388,16 @@ class ye extends ot {
351
388
  return e.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
352
389
  }
353
390
  }
354
- function Pt(t) {
391
+ function St(t) {
355
392
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(t.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(t) && (this._addPointer(t), t.pointerType === "touch" ? this._onTouchStart(t) : this._onMouseDown(t)));
356
393
  }
357
- function gt(t) {
394
+ function wt(t) {
358
395
  this.enabled !== !1 && (t.pointerType === "touch" ? this._onTouchMove(t) : this._onMouseMove(t));
359
396
  }
360
- function Ct(t) {
397
+ function yt(t) {
361
398
  switch (this._removePointer(t), this._pointers.length) {
362
399
  case 0:
363
- this.domElement.releasePointerCapture(t.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Ne), this.state = l.NONE;
400
+ this.domElement.releasePointerCapture(t.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Ue), this.state = _.NONE;
364
401
  break;
365
402
  case 1:
366
403
  const e = this._pointers[0], i = this._pointerPositions[e];
@@ -368,7 +405,7 @@ function Ct(t) {
368
405
  break;
369
406
  }
370
407
  }
371
- function St(t) {
408
+ function Ot(t) {
372
409
  let e;
373
410
  switch (t.button) {
374
411
  case 0:
@@ -386,128 +423,128 @@ function St(t) {
386
423
  switch (e) {
387
424
  case $.DOLLY:
388
425
  if (this.enableZoom === !1) return;
389
- this._handleMouseDownDolly(t), this.state = l.DOLLY;
426
+ this._handleMouseDownDolly(t), this.state = _.DOLLY;
390
427
  break;
391
428
  case $.ROTATE:
392
429
  if (t.ctrlKey || t.metaKey || t.shiftKey) {
393
430
  if (this.enablePan === !1) return;
394
- this._handleMouseDownPan(t), this.state = l.PAN;
431
+ this._handleMouseDownPan(t), this.state = _.PAN;
395
432
  } else {
396
433
  if (this.enableRotate === !1) return;
397
- this._handleMouseDownRotate(t), this.state = l.ROTATE;
434
+ this._handleMouseDownRotate(t), this.state = _.ROTATE;
398
435
  }
399
436
  break;
400
437
  case $.PAN:
401
438
  if (t.ctrlKey || t.metaKey || t.shiftKey) {
402
439
  if (this.enableRotate === !1) return;
403
- this._handleMouseDownRotate(t), this.state = l.ROTATE;
440
+ this._handleMouseDownRotate(t), this.state = _.ROTATE;
404
441
  } else {
405
442
  if (this.enablePan === !1) return;
406
- this._handleMouseDownPan(t), this.state = l.PAN;
443
+ this._handleMouseDownPan(t), this.state = _.PAN;
407
444
  }
408
445
  break;
409
446
  default:
410
- this.state = l.NONE;
447
+ this.state = _.NONE;
411
448
  }
412
- this.state !== l.NONE && this.dispatchEvent(le);
449
+ this.state !== _.NONE && this.dispatchEvent(le);
413
450
  }
414
- function wt(t) {
451
+ function Dt(t) {
415
452
  switch (this.state) {
416
- case l.ROTATE:
453
+ case _.ROTATE:
417
454
  if (this.enableRotate === !1) return;
418
455
  this._handleMouseMoveRotate(t);
419
456
  break;
420
- case l.DOLLY:
457
+ case _.DOLLY:
421
458
  if (this.enableZoom === !1) return;
422
459
  this._handleMouseMoveDolly(t);
423
460
  break;
424
- case l.PAN:
461
+ case _.PAN:
425
462
  if (this.enablePan === !1) return;
426
463
  this._handleMouseMovePan(t);
427
464
  break;
428
465
  }
429
466
  }
430
- function yt(t) {
431
- this.enabled === !1 || this.enableZoom === !1 || this.state !== l.NONE || (t.preventDefault(), this.dispatchEvent(le), this._handleMouseWheel(this._customWheelEvent(t)), this.dispatchEvent(Ne));
467
+ function Et(t) {
468
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== _.NONE || (t.preventDefault(), this.dispatchEvent(le), this._handleMouseWheel(this._customWheelEvent(t)), this.dispatchEvent(Ue));
432
469
  }
433
- function Ot(t) {
470
+ function $t(t) {
434
471
  this.enabled !== !1 && this._handleKeyDown(t);
435
472
  }
436
- function Dt(t) {
473
+ function Rt(t) {
437
474
  switch (this._trackPointer(t), this._pointers.length) {
438
475
  case 1:
439
476
  switch (this.touches.ONE) {
440
477
  case D.ROTATE:
441
478
  if (this.enableRotate === !1) return;
442
- this._handleTouchStartRotate(t), this.state = l.TOUCH_ROTATE;
479
+ this._handleTouchStartRotate(t), this.state = _.TOUCH_ROTATE;
443
480
  break;
444
481
  case D.PAN:
445
482
  if (this.enablePan === !1) return;
446
- this._handleTouchStartPan(t), this.state = l.TOUCH_PAN;
483
+ this._handleTouchStartPan(t), this.state = _.TOUCH_PAN;
447
484
  break;
448
485
  default:
449
- this.state = l.NONE;
486
+ this.state = _.NONE;
450
487
  }
451
488
  break;
452
489
  case 2:
453
490
  switch (this.touches.TWO) {
454
491
  case D.DOLLY_PAN:
455
492
  if (this.enableZoom === !1 && this.enablePan === !1) return;
456
- this._handleTouchStartDollyPan(t), this.state = l.TOUCH_DOLLY_PAN;
493
+ this._handleTouchStartDollyPan(t), this.state = _.TOUCH_DOLLY_PAN;
457
494
  break;
458
495
  case D.DOLLY_ROTATE:
459
496
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
460
- this._handleTouchStartDollyRotate(t), this.state = l.TOUCH_DOLLY_ROTATE;
497
+ this._handleTouchStartDollyRotate(t), this.state = _.TOUCH_DOLLY_ROTATE;
461
498
  break;
462
499
  default:
463
- this.state = l.NONE;
500
+ this.state = _.NONE;
464
501
  }
465
502
  break;
466
503
  default:
467
- this.state = l.NONE;
504
+ this.state = _.NONE;
468
505
  }
469
- this.state !== l.NONE && this.dispatchEvent(le);
506
+ this.state !== _.NONE && this.dispatchEvent(le);
470
507
  }
471
- function Et(t) {
508
+ function Tt(t) {
472
509
  switch (this._trackPointer(t), this.state) {
473
- case l.TOUCH_ROTATE:
510
+ case _.TOUCH_ROTATE:
474
511
  if (this.enableRotate === !1) return;
475
512
  this._handleTouchMoveRotate(t), this.update();
476
513
  break;
477
- case l.TOUCH_PAN:
514
+ case _.TOUCH_PAN:
478
515
  if (this.enablePan === !1) return;
479
516
  this._handleTouchMovePan(t), this.update();
480
517
  break;
481
- case l.TOUCH_DOLLY_PAN:
518
+ case _.TOUCH_DOLLY_PAN:
482
519
  if (this.enableZoom === !1 && this.enablePan === !1) return;
483
520
  this._handleTouchMoveDollyPan(t), this.update();
484
521
  break;
485
- case l.TOUCH_DOLLY_ROTATE:
522
+ case _.TOUCH_DOLLY_ROTATE:
486
523
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
487
524
  this._handleTouchMoveDollyRotate(t), this.update();
488
525
  break;
489
526
  default:
490
- this.state = l.NONE;
527
+ this.state = _.NONE;
491
528
  }
492
529
  }
493
- function $t(t) {
530
+ function Mt(t) {
494
531
  this.enabled !== !1 && t.preventDefault();
495
532
  }
496
- function Rt(t) {
533
+ function jt(t) {
497
534
  t.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
498
535
  }
499
- function Tt(t) {
536
+ function xt(t) {
500
537
  t.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
501
538
  }
502
- var Mt = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, xt = (t, e, i, s) => {
503
- for (var r = s > 1 ? void 0 : s ? jt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
539
+ var At = Object.defineProperty, zt = Object.getOwnPropertyDescriptor, Lt = (t, e, i, s) => {
540
+ for (var r = s > 1 ? void 0 : s ? zt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
504
541
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
505
- return s && r && Mt(e, i, r), r;
542
+ return s && r && At(e, i, r), r;
506
543
  };
507
544
  let A = class {
508
545
  constructor() {
509
546
  a(this, "_canvas");
510
- a(this, "proxyReceiver", new Xe());
547
+ a(this, "proxyReceiver", new Ge());
511
548
  a(this, "isInitialized", !1);
512
549
  }
513
550
  get canvas() {
@@ -520,15 +557,15 @@ let A = class {
520
557
  }, this._canvas = t;
521
558
  }
522
559
  };
523
- A = xt([
560
+ A = Lt([
524
561
  p(d.ContainerScoped)
525
562
  ], A);
526
- var At = Object.defineProperty, zt = Object.getOwnPropertyDescriptor, Lt = (t, e, i, s) => {
527
- for (var r = s > 1 ? void 0 : s ? zt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
563
+ var It = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, Ht = (t, e, i, s) => {
564
+ for (var r = s > 1 ? void 0 : s ? Nt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
528
565
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
529
- return s && r && At(e, i, r), r;
530
- }, It = (t, e) => (i, s) => e(i, s, t);
531
- let H = class extends qe {
566
+ return s && r && It(e, i, r), r;
567
+ }, Ft = (t, e) => (i, s) => e(i, s, t);
568
+ let H = class extends Qe {
532
569
  constructor(t) {
533
570
  super(), this._service = t;
534
571
  for (const e of ce)
@@ -540,16 +577,16 @@ let H = class extends qe {
540
577
  };
541
578
  }
542
579
  };
543
- H = Lt([
580
+ H = Ht([
544
581
  p(d.ContainerScoped),
545
- It(0, h(A))
582
+ Ft(0, h(A))
546
583
  ], H);
547
- var Nt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, Yt = (t, e, i, s) => {
548
- for (var r = s > 1 ? void 0 : s ? Ht(e, i) : e, n = t.length - 1, o; n >= 0; n--)
584
+ var Yt = Object.defineProperty, Ut = Object.getOwnPropertyDescriptor, Zt = (t, e, i, s) => {
585
+ for (var r = s > 1 ? void 0 : s ? Ut(e, i) : e, n = t.length - 1, o; n >= 0; n--)
549
586
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
550
- return s && r && Nt(e, i, r), r;
587
+ return s && r && Yt(e, i, r), r;
551
588
  };
552
- let Y = class {
589
+ let F = class {
553
590
  constructor() {
554
591
  a(this, "frame", 1e3 / 60);
555
592
  a(this, "initialTime", Date.now());
@@ -564,42 +601,42 @@ let Y = class {
564
601
  this.deltaTime = t - this.currentTime, this.currentTime = t, this.elapsedTime = t - this.initialTime, this.deltaRatio = this.deltaTime / this.frame;
565
602
  }
566
603
  };
567
- Y = Yt([
604
+ F = Zt([
568
605
  p(d.ContainerScoped)
569
- ], Y);
570
- var Ft = Object.defineProperty, Ut = Object.getOwnPropertyDescriptor, Zt = (t, e, i, s) => {
571
- for (var r = s > 1 ? void 0 : s ? Ut(e, i) : e, n = t.length - 1, o; n >= 0; n--)
606
+ ], F);
607
+ var Kt = Object.defineProperty, Wt = Object.getOwnPropertyDescriptor, Xt = (t, e, i, s) => {
608
+ for (var r = s > 1 ? void 0 : s ? Wt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
572
609
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
573
- return s && r && Ft(e, i, r), r;
574
- }, Kt = (t, e) => (i, s) => e(i, s, t);
610
+ return s && r && Kt(e, i, r), r;
611
+ }, qt = (t, e) => (i, s) => e(i, s, t);
575
612
  let R = class {
576
613
  constructor(t) {
577
614
  a(this, "_beforeStep$$", new N());
578
615
  a(this, "_oldElapsed", 0);
579
616
  a(this, "beforeStep$", this._beforeStep$$.asObservable());
580
- a(this, "step$", ut().pipe(
581
- vt(({ elapsed: t }) => {
617
+ a(this, "step$", vt().pipe(
618
+ gt(({ elapsed: t }) => {
582
619
  var e;
583
- this._oldElapsed !== t && ((e = this._beforeStep$$) == null || e.next(fe(this._service, [])), this._oldElapsed = t);
620
+ this._oldElapsed !== t && ((e = this._beforeStep$$) == null || e.next(Pe(this._service, [])), this._oldElapsed = t);
584
621
  }),
585
622
  C(() => this._service.enabled),
586
- ft(() => this._service.enabled),
587
- q(() => fe(this._service, [])),
623
+ Pt(() => this._service.enabled),
624
+ q(() => Pe(this._service, [])),
588
625
  x()
589
626
  ));
590
627
  this._service = t;
591
628
  }
592
629
  };
593
- R = Zt([
630
+ R = Xt([
594
631
  p(d.ContainerScoped),
595
- Kt(0, h(Y))
632
+ qt(0, h(F))
596
633
  ], R);
597
- var Wt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, qt = (t, e, i, s) => {
598
- for (var r = s > 1 ? void 0 : s ? Xt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
634
+ var Bt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, Gt = (t, e, i, s) => {
635
+ for (var r = s > 1 ? void 0 : s ? Vt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
599
636
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
600
- return s && r && Wt(e, i, r), r;
601
- }, Oe = (t, e) => (i, s) => e(i, s, t);
602
- let G = class {
637
+ return s && r && Bt(e, i, r), r;
638
+ }, Re = (t, e) => (i, s) => e(i, s, t);
639
+ let V = class {
603
640
  constructor(t, e) {
604
641
  a(this, "_initialAnimationFrameId");
605
642
  a(this, "_subscriptions", []);
@@ -632,15 +669,15 @@ let G = class {
632
669
  return this._controller.step$;
633
670
  }
634
671
  };
635
- G = qt([
672
+ V = Gt([
636
673
  p(d.ContainerScoped),
637
- Oe(0, h(R)),
638
- Oe(1, h(Y))
639
- ], G);
640
- var Bt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, Vt = (t, e, i, s) => {
641
- for (var r = s > 1 ? void 0 : s ? Gt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
674
+ Re(0, h(R)),
675
+ Re(1, h(F))
676
+ ], V);
677
+ var Qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, kt = (t, e, i, s) => {
678
+ for (var r = s > 1 ? void 0 : s ? Jt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
642
679
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
643
- return s && r && Bt(e, i, r), r;
680
+ return s && r && Qt(e, i, r), r;
644
681
  };
645
682
  let S = class {
646
683
  constructor() {
@@ -655,15 +692,15 @@ let S = class {
655
692
  this.height = Number(t.height ?? this.height), this.width = Number(t.width ?? this.width), this.aspect = this.width / this.height, this.enabled = e === void 0 ? !0 : !!e;
656
693
  }
657
694
  };
658
- S = Vt([
695
+ S = kt([
659
696
  p(d.ContainerScoped)
660
697
  ], S);
661
- var Qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, kt = (t, e, i, s) => {
662
- for (var r = s > 1 ? void 0 : s ? Jt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
698
+ var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ii = (t, e, i, s) => {
699
+ for (var r = s > 1 ? void 0 : s ? ti(e, i) : e, n = t.length - 1, o; n >= 0; n--)
663
700
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
664
- return s && r && Qt(e, i, r), r;
665
- }, ei = (t, e) => (i, s) => e(i, s, t);
666
- let y = class {
701
+ return s && r && ei(e, i, r), r;
702
+ }, si = (t, e) => (i, s) => e(i, s, t);
703
+ let w = class {
667
704
  constructor(t) {
668
705
  a(this, "instance");
669
706
  a(this, "enabled", !0);
@@ -686,16 +723,16 @@ let y = class {
686
723
  (e = this.instance) == null || e.rotation.copy(t);
687
724
  }
688
725
  init(t) {
689
- if (this.dispose(), t === ve.PERSPECTIVE || t === void 0) {
726
+ if (this.dispose(), t === ge.PERSPECTIVE || t === void 0) {
690
727
  this.instance = new E(
691
728
  70,
692
729
  this._sizesService.width / this._sizesService.height,
693
- 1e-4,
730
+ 0.1,
694
731
  100
695
732
  ), this.instance.position.z = 8;
696
733
  return;
697
734
  }
698
- t === ve.ORTHOGRAPHIC && (this.instance = new I(
735
+ t === ge.ORTHOGRAPHIC && (this.instance = new I(
699
736
  -this._sizesService.aspect * this._sizesService.frustrum / 2,
700
737
  this._sizesService.aspect * this._sizesService.frustrum / 2,
701
738
  this._sizesService.frustrum / 2,
@@ -708,16 +745,16 @@ let y = class {
708
745
  this.instance instanceof j && ((this.instance instanceof E || this.instance instanceof I) && this.instance.clearViewOffset(), this.instance.clear(), this.instance = void 0);
709
746
  }
710
747
  };
711
- y = kt([
748
+ w = ii([
712
749
  p(d.ContainerScoped),
713
- ei(0, h(S))
714
- ], y);
715
- var ti = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, si = (t, e, i, s) => {
716
- for (var r = s > 1 ? void 0 : s ? ii(e, i) : e, n = t.length - 1, o; n >= 0; n--)
750
+ si(0, h(S))
751
+ ], w);
752
+ var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, oi = (t, e, i, s) => {
753
+ for (var r = s > 1 ? void 0 : s ? ni(e, i) : e, n = t.length - 1, o; n >= 0; n--)
717
754
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
718
- return s && r && ti(e, i, r), r;
719
- }, De = (t, e) => (i, s) => e(i, s, t);
720
- let V = class {
755
+ return s && r && ri(e, i, r), r;
756
+ }, Te = (t, e) => (i, s) => e(i, s, t);
757
+ let G = class {
721
758
  constructor(t, e) {
722
759
  a(this, "step$");
723
760
  this.timerController = t, this._service = e, this.step$ = this.timerController.step$.pipe(
@@ -725,15 +762,15 @@ let V = class {
725
762
  );
726
763
  }
727
764
  };
728
- V = si([
765
+ G = oi([
729
766
  p(d.ContainerScoped),
730
- De(0, h(R)),
731
- De(1, h(y))
732
- ], V);
733
- var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, oi = (t, e, i, s) => {
734
- for (var r = s > 1 ? void 0 : s ? ni(e, i) : e, n = t.length - 1, o; n >= 0; n--)
767
+ Te(0, h(R)),
768
+ Te(1, h(w))
769
+ ], G);
770
+ var ai = Object.defineProperty, hi = Object.getOwnPropertyDescriptor, ci = (t, e, i, s) => {
771
+ for (var r = s > 1 ? void 0 : s ? hi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
735
772
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
736
- return s && r && ri(e, i, r), r;
773
+ return s && r && ai(e, i, r), r;
737
774
  }, K = (t, e) => (i, s) => e(i, s, t);
738
775
  let Q = class {
739
776
  constructor(t, e, i) {
@@ -767,39 +804,39 @@ let Q = class {
767
804
  this._subscriptions.forEach((t) => t.unsubscribe()), this._service.dispose();
768
805
  }
769
806
  };
770
- Q = oi([
807
+ Q = ci([
771
808
  p(d.ContainerScoped),
772
809
  K(0, h(S)),
773
- K(1, h(V)),
774
- K(2, h(y))
810
+ K(1, h(G)),
811
+ K(2, h(w))
775
812
  ], Q);
776
- var ai = Object.defineProperty, hi = Object.getOwnPropertyDescriptor, ci = (t, e, i, s) => {
777
- for (var r = s > 1 ? void 0 : s ? hi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
813
+ var li = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, pi = (t, e, i, s) => {
814
+ for (var r = s > 1 ? void 0 : s ? _i(e, i) : e, n = t.length - 1, o; n >= 0; n--)
778
815
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
779
- return s && r && ai(e, i, r), r;
816
+ return s && r && li(e, i, r), r;
780
817
  };
781
818
  let T = class {
782
819
  constructor() {
783
- a(this, "scene", new Le());
820
+ a(this, "scene", new Fe());
784
821
  a(this, "enabled", !0);
785
822
  }
786
823
  };
787
- T = ci([
824
+ T = pi([
788
825
  p(d.ContainerScoped)
789
826
  ], T);
790
- var He = Object.defineProperty, li = Object.getOwnPropertyDescriptor, _i = (t, e, i) => e in t ? He(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, pi = (t, e, i, s) => {
791
- for (var r = s > 1 ? void 0 : s ? li(e, i) : e, n = t.length - 1, o; n >= 0; n--)
827
+ var Ze = Object.defineProperty, di = Object.getOwnPropertyDescriptor, ui = (t, e, i) => e in t ? Ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, mi = (t, e, i, s) => {
828
+ for (var r = s > 1 ? void 0 : s ? di(e, i) : e, n = t.length - 1, o; n >= 0; n--)
792
829
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
793
- return s && r && He(e, i, r), r;
794
- }, W = (t, e) => (i, s) => e(i, s, t), di = (t, e, i) => _i(t, e + "", i);
795
- let O = class {
830
+ return s && r && Ze(e, i, r), r;
831
+ }, W = (t, e) => (i, s) => e(i, s, t), fi = (t, e, i) => ui(t, e + "", i);
832
+ let y = class {
796
833
  constructor(t, e, i) {
797
834
  a(this, "enabled", !0);
798
835
  a(this, "instance");
799
836
  this._worldService = t, this._cameraService = e, this._sizesService = i;
800
837
  }
801
838
  setWebGLRenderer(t) {
802
- this.instance = new Ce({
839
+ this.instance = new Oe({
803
840
  canvas: t,
804
841
  context: t.getContext("webgl2", {
805
842
  stencil: !0,
@@ -808,14 +845,14 @@ let O = class {
808
845
  powerPreference: "high-performance",
809
846
  depth: !0,
810
847
  antialias: !0
811
- }), this.instance.autoClear = !1, this.instance.setPixelRatio(O.RENDERER_PIXEL_RATIO), this.instance.setClearColor(0, 0), this.instance.shadowMap.enabled = !0, this.instance.shadowMap.type = at, this.instance.outputColorSpace = ht, this.instance.toneMapping = ct, this.instance.toneMappingExposure = 1.75;
848
+ }), this.instance.autoClear = !1, this.instance.setPixelRatio(y.RENDERER_PIXEL_RATIO), this.instance.setClearColor(0, 0), this.instance.shadowMap.enabled = !0, this.instance.shadowMap.type = lt, this.instance.outputColorSpace = _t, this.instance.toneMapping = pt, this.instance.toneMappingExposure = 1.75;
812
849
  }
813
850
  setSize(t, e) {
814
851
  var i;
815
852
  (i = this.instance) == null || i.setSize(t, e);
816
853
  }
817
854
  render() {
818
- this.enabled && this._cameraService.instance instanceof j && this.instance instanceof Ce && (this.instance.setViewport(
855
+ this.enabled && this._cameraService.instance instanceof j && this.instance instanceof Oe && (this.instance.setViewport(
819
856
  0,
820
857
  0,
821
858
  this._sizesService.width,
@@ -826,19 +863,19 @@ let O = class {
826
863
  ));
827
864
  }
828
865
  };
829
- di(O, "RENDERER_PIXEL_RATIO", 1);
830
- O = pi([
866
+ fi(y, "RENDERER_PIXEL_RATIO", 1);
867
+ y = mi([
831
868
  p(d.ContainerScoped),
832
869
  W(0, h(T)),
833
- W(1, h(y)),
870
+ W(1, h(w)),
834
871
  W(2, h(S))
835
- ], O);
836
- var ui = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, fi = (t, e, i, s) => {
837
- for (var r = s > 1 ? void 0 : s ? mi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
872
+ ], y);
873
+ var vi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Pi = (t, e, i, s) => {
874
+ for (var r = s > 1 ? void 0 : s ? bi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
838
875
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
839
- return s && r && ui(e, i, r), r;
840
- }, Ee = (t, e) => (i, s) => e(i, s, t);
841
- let F = class {
876
+ return s && r && vi(e, i, r), r;
877
+ }, Me = (t, e) => (i, s) => e(i, s, t);
878
+ let Y = class {
842
879
  constructor(t, e) {
843
880
  a(this, "resize$");
844
881
  this._appController = t, this._service = e, this.resize$ = this._appController.resize$$.pipe(
@@ -846,15 +883,15 @@ let F = class {
846
883
  );
847
884
  }
848
885
  };
849
- F = fi([
886
+ Y = Pi([
850
887
  p(d.ContainerScoped),
851
- Ee(0, h(H)),
852
- Ee(1, h(S))
853
- ], F);
854
- var vi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Pi = (t, e, i, s) => {
855
- for (var r = s > 1 ? void 0 : s ? bi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
888
+ Me(0, h(H)),
889
+ Me(1, h(S))
890
+ ], Y);
891
+ var gi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Si = (t, e, i, s) => {
892
+ for (var r = s > 1 ? void 0 : s ? Ci(e, i) : e, n = t.length - 1, o; n >= 0; n--)
856
893
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
857
- return s && r && vi(e, i, r), r;
894
+ return s && r && gi(e, i, r), r;
858
895
  }, X = (t, e) => (i, s) => e(i, s, t);
859
896
  let J = class {
860
897
  constructor(t, e, i) {
@@ -867,17 +904,17 @@ let J = class {
867
904
  );
868
905
  }
869
906
  };
870
- J = Pi([
907
+ J = Si([
871
908
  p(d.ContainerScoped),
872
- X(0, h(O)),
909
+ X(0, h(y)),
873
910
  X(1, h(R)),
874
- X(2, h(F))
911
+ X(2, h(Y))
875
912
  ], J);
876
- var gi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Si = (t, e, i, s) => {
877
- for (var r = s > 1 ? void 0 : s ? Ci(e, i) : e, n = t.length - 1, o; n >= 0; n--)
913
+ var wi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Oi = (t, e, i, s) => {
914
+ for (var r = s > 1 ? void 0 : s ? yi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
878
915
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
879
- return s && r && gi(e, i, r), r;
880
- }, $e = (t, e) => (i, s) => e(i, s, t);
916
+ return s && r && wi(e, i, r), r;
917
+ }, je = (t, e) => (i, s) => e(i, s, t);
881
918
  let k = class {
882
919
  constructor(t, e) {
883
920
  this._controller = t, this._service = e;
@@ -904,16 +941,16 @@ let k = class {
904
941
  (t = this._service.instance) == null || t.dispose(), this._service.instance = void 0;
905
942
  }
906
943
  };
907
- k = Si([
944
+ k = Oi([
908
945
  p(d.ContainerScoped),
909
- $e(0, h(J)),
910
- $e(1, h(O))
946
+ je(0, h(J)),
947
+ je(1, h(y))
911
948
  ], k);
912
- var wi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Oi = (t, e, i, s) => {
913
- for (var r = s > 1 ? void 0 : s ? yi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
949
+ var Di = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, $i = (t, e, i, s) => {
950
+ for (var r = s > 1 ? void 0 : s ? Ei(e, i) : e, n = t.length - 1, o; n >= 0; n--)
914
951
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
915
- return s && r && wi(e, i, r), r;
916
- }, Re = (t, e) => (i, s) => e(i, s, t);
952
+ return s && r && Di(e, i, r), r;
953
+ }, xe = (t, e) => (i, s) => e(i, s, t);
917
954
  let ee = class {
918
955
  constructor(t, e) {
919
956
  this._controller = t, this._service = e;
@@ -947,16 +984,16 @@ let ee = class {
947
984
  return this._controller.resize$;
948
985
  }
949
986
  };
950
- ee = Oi([
987
+ ee = $i([
951
988
  p(d.ContainerScoped),
952
- Re(0, h(F)),
953
- Re(1, h(S))
989
+ xe(0, h(Y)),
990
+ xe(1, h(S))
954
991
  ], ee);
955
- var Di = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, $i = (t, e, i, s) => {
956
- for (var r = s > 1 ? void 0 : s ? Ei(e, i) : e, n = t.length - 1, o; n >= 0; n--)
992
+ var Ri = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, Mi = (t, e, i, s) => {
993
+ for (var r = s > 1 ? void 0 : s ? Ti(e, i) : e, n = t.length - 1, o; n >= 0; n--)
957
994
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
958
- return s && r && Di(e, i, r), r;
959
- }, Ri = (t, e) => (i, s) => e(i, s, t);
995
+ return s && r && Ri(e, i, r), r;
996
+ }, ji = (t, e) => (i, s) => e(i, s, t);
960
997
  let te = class {
961
998
  constructor(t) {
962
999
  a(this, "_beforeRender$$", new N());
@@ -966,15 +1003,15 @@ let te = class {
966
1003
  this._worldService = t, this._worldService.scene.onBeforeRender = () => this._beforeRender$$.next({}), this._worldService.scene.onAfterRender = () => this._afterRender$$.next({});
967
1004
  }
968
1005
  };
969
- te = $i([
1006
+ te = Mi([
970
1007
  p(d.ContainerScoped),
971
- Ri(0, h(T))
1008
+ ji(0, h(T))
972
1009
  ], te);
973
- var Ti = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, ji = (t, e, i, s) => {
974
- for (var r = s > 1 ? void 0 : s ? Mi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1010
+ var xi = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, zi = (t, e, i, s) => {
1011
+ for (var r = s > 1 ? void 0 : s ? Ai(e, i) : e, n = t.length - 1, o; n >= 0; n--)
975
1012
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
976
- return s && r && Ti(e, i, r), r;
977
- }, Te = (t, e) => (i, s) => e(i, s, t);
1013
+ return s && r && xi(e, i, r), r;
1014
+ }, Ae = (t, e) => (i, s) => e(i, s, t);
978
1015
  let ie = class {
979
1016
  constructor(t, e) {
980
1017
  this._service = t, this._controller = e;
@@ -984,7 +1021,7 @@ let ie = class {
984
1021
  dispose() {
985
1022
  }
986
1023
  scene(t) {
987
- return t instanceof Le && (this._service.scene = t), this._service.scene;
1024
+ return t instanceof Fe && (this._service.scene = t), this._service.scene;
988
1025
  }
989
1026
  enabled(t) {
990
1027
  return typeof t == "boolean" && (this._service.enabled = t), this._service.enabled;
@@ -996,15 +1033,15 @@ let ie = class {
996
1033
  return this._controller.afterRender$;
997
1034
  }
998
1035
  };
999
- ie = ji([
1036
+ ie = zi([
1000
1037
  p(d.ContainerScoped),
1001
- Te(0, h(T)),
1002
- Te(1, h(te))
1038
+ Ae(0, h(T)),
1039
+ Ae(1, h(te))
1003
1040
  ], ie);
1004
- var xi = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, zi = (t, e, i, s) => {
1005
- for (var r = s > 1 ? void 0 : s ? Ai(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1041
+ var Li = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ni = (t, e, i, s) => {
1042
+ for (var r = s > 1 ? void 0 : s ? Ii(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1006
1043
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1007
- return s && r && xi(e, i, r), r;
1044
+ return s && r && Li(e, i, r), r;
1008
1045
  }, M = (t, e) => (i, s) => e(i, s, t);
1009
1046
  let se = class {
1010
1047
  constructor(t, e, i, s, r) {
@@ -1043,22 +1080,22 @@ let se = class {
1043
1080
  }
1044
1081
  initOrbitControl() {
1045
1082
  var t;
1046
- this.cameraControls && ((t = this.cameraControls) == null || t.dispose()), !(!this.enabled || !(this._cameraService.instance instanceof j)) && this._cameraService.instance instanceof j && (this.cameraControls = new ye(
1083
+ this.cameraControls && ((t = this.cameraControls) == null || t.dispose()), !(!this.enabled || !(this._cameraService.instance instanceof j)) && this._cameraService.instance instanceof j && (this.cameraControls = new $e(
1047
1084
  this._cameraService.instance,
1048
1085
  this._appService.proxyReceiver
1049
1086
  ), this.cameraControls.rotateSpeed = 0.1, this.cameraControls.enableDamping = !0);
1050
1087
  }
1051
1088
  initMiniCameraOrbitControls() {
1052
- this.miniCameraControls && this.miniCameraControls.dispose(), !(!this.enabled || !this.miniCamera) && (this.miniCameraControls = new ye(
1089
+ this.miniCameraControls && this.miniCameraControls.dispose(), !(!this.enabled || !this.miniCamera) && (this.miniCameraControls = new $e(
1053
1090
  this.miniCamera,
1054
1091
  this._appService.proxyReceiver
1055
1092
  ), this.miniCameraControls.rotateSpeed = 0.15, this.miniCameraControls.enableDamping = !0);
1056
1093
  }
1057
1094
  initAxesHelper(t) {
1058
- this.enabled && (this.axesHelper = new lt(t), this._worldService.scene.add(this.axesHelper));
1095
+ this.enabled && (this.axesHelper = new dt(t), this._worldService.scene.add(this.axesHelper));
1059
1096
  }
1060
1097
  initGridHelper(t) {
1061
- this.gridHelper && this._worldService.scene.remove(this.gridHelper), this.enabled && (this.gridHelper = new _t(t, t), this._worldService.scene.add(this.gridHelper));
1098
+ this.gridHelper && this._worldService.scene.remove(this.gridHelper), this.enabled && (this.gridHelper = new ut(t, t), this._worldService.scene.add(this.gridHelper));
1062
1099
  }
1063
1100
  disposeMiniCamera() {
1064
1101
  this.miniCamera instanceof j && (this.miniCamera.clearViewOffset(), this.miniCamera.clear(), this.miniCamera = void 0);
@@ -1072,19 +1109,19 @@ let se = class {
1072
1109
  this.disposeMiniCamera(), (t = this.cameraControls) == null || t.dispose(), this.cameraControls = void 0, (e = this.miniCameraControls) == null || e.dispose(), this.miniCameraControls = void 0, this.axesHelper && this._worldService.scene.remove(this.axesHelper), (i = this.axesHelper) == null || i.dispose(), this.axesHelper = void 0, this.gridHelper && this._worldService.scene.remove(this.gridHelper), (s = this.gridHelper) == null || s.dispose(), this.gridHelper = void 0;
1073
1110
  }
1074
1111
  };
1075
- se = zi([
1112
+ se = Ni([
1076
1113
  p(d.ContainerScoped),
1077
1114
  M(0, h(A)),
1078
1115
  M(1, h(S)),
1079
- M(2, h(O)),
1080
- M(3, h(y)),
1116
+ M(2, h(y)),
1117
+ M(3, h(w)),
1081
1118
  M(4, h(T))
1082
1119
  ], se);
1083
- var Li = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ni = (t, e, i, s) => {
1084
- for (var r = s > 1 ? void 0 : s ? Ii(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1120
+ var Hi = Object.defineProperty, Fi = Object.getOwnPropertyDescriptor, Yi = (t, e, i, s) => {
1121
+ for (var r = s > 1 ? void 0 : s ? Fi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1085
1122
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1086
- return s && r && Li(e, i, r), r;
1087
- }, Me = (t, e) => (i, s) => e(i, s, t);
1123
+ return s && r && Hi(e, i, r), r;
1124
+ }, ze = (t, e) => (i, s) => e(i, s, t);
1088
1125
  let re = class {
1089
1126
  constructor(t, e) {
1090
1127
  a(this, "step$");
@@ -1093,16 +1130,16 @@ let re = class {
1093
1130
  );
1094
1131
  }
1095
1132
  };
1096
- re = Ni([
1133
+ re = Yi([
1097
1134
  p(d.ContainerScoped),
1098
- Me(0, h(R)),
1099
- Me(1, h(y))
1135
+ ze(0, h(R)),
1136
+ ze(1, h(w))
1100
1137
  ], re);
1101
- var Hi = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, Fi = (t, e, i, s) => {
1102
- for (var r = s > 1 ? void 0 : s ? Yi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1138
+ var Ui = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, Ki = (t, e, i, s) => {
1139
+ for (var r = s > 1 ? void 0 : s ? Zi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1103
1140
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1104
- return s && r && Hi(e, i, r), r;
1105
- }, je = (t, e) => (i, s) => e(i, s, t);
1141
+ return s && r && Ui(e, i, r), r;
1142
+ }, Le = (t, e) => (i, s) => e(i, s, t);
1106
1143
  let ne = class {
1107
1144
  constructor(t, e) {
1108
1145
  a(this, "_subscriptions", []);
@@ -1140,15 +1177,15 @@ let ne = class {
1140
1177
  this._service.dispose(), this._subscriptions.forEach((t) => t.unsubscribe());
1141
1178
  }
1142
1179
  };
1143
- ne = Fi([
1180
+ ne = Ki([
1144
1181
  p(d.ContainerScoped),
1145
- je(0, h(se)),
1146
- je(1, h(re))
1182
+ Le(0, h(se)),
1183
+ Le(1, h(re))
1147
1184
  ], ne);
1148
- var Ui = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, Ki = (t, e, i, s) => {
1149
- for (var r = s > 1 ? void 0 : s ? Zi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1185
+ var Wi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, qi = (t, e, i, s) => {
1186
+ for (var r = s > 1 ? void 0 : s ? Xi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1150
1187
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1151
- return s && r && Ui(e, i, r), r;
1188
+ return s && r && Wi(e, i, r), r;
1152
1189
  };
1153
1190
  let U = class {
1154
1191
  constructor() {
@@ -1161,42 +1198,42 @@ let U = class {
1161
1198
  i && (this.loadedResources[e.name] = i, this.toLoadCount = s, this.loadedCount = r);
1162
1199
  }
1163
1200
  };
1164
- U = Ki([
1201
+ U = qi([
1165
1202
  p(d.ResolutionScoped)
1166
1203
  ], U);
1167
- var Wi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, qi = (t, e, i, s) => {
1168
- for (var r = s > 1 ? void 0 : s ? Xi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1204
+ var Bi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, Gi = (t, e, i, s) => {
1205
+ for (var r = s > 1 ? void 0 : s ? Vi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1169
1206
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1170
- return s && r && Wi(e, i, r), r;
1171
- }, Bi = (t, e) => (i, s) => e(i, s, t);
1207
+ return s && r && Bi(e, i, r), r;
1208
+ }, Qi = (t, e) => (i, s) => e(i, s, t);
1172
1209
  let oe = class {
1173
1210
  constructor(t) {
1174
- a(this, "load$", Be(self, "message").pipe(
1211
+ a(this, "load$", Je(self, "message").pipe(
1175
1212
  C(
1176
1213
  (t) => {
1177
1214
  var e, i, s;
1178
- return ((e = t.data) == null ? void 0 : e.token) === Ge && !!((s = (i = t.data) == null ? void 0 : i.payload) != null && s.resource);
1215
+ return ((e = t.data) == null ? void 0 : e.token) === ke && !!((s = (i = t.data) == null ? void 0 : i.payload) != null && s.resource);
1179
1216
  }
1180
1217
  ),
1181
1218
  q((t) => {
1182
1219
  var i, s, r, n, o;
1183
1220
  const { payload: e } = t.data || {};
1184
1221
  if (((i = e == null ? void 0 : e.source) == null ? void 0 : i.type) === "gltf") {
1185
- const c = e.resource, _ = (s = c.animations) == null ? void 0 : s.map(
1186
- (g) => pt.parse(g)
1187
- ), m = (r = c.cameras) == null ? void 0 : r.map(
1188
- (g) => be(g)
1189
- ), w = (n = c.scenes) == null ? void 0 : n.map(
1190
- (g) => be(g)
1191
- ), z = w == null ? void 0 : w[0];
1222
+ const c = e.resource, l = (s = c.animations) == null ? void 0 : s.map(
1223
+ (g) => mt.parse(g)
1224
+ ), u = (r = c.cameras) == null ? void 0 : r.map(
1225
+ (g) => Ce(g)
1226
+ ), O = (n = c.scenes) == null ? void 0 : n.map(
1227
+ (g) => Ce(g)
1228
+ ), z = O == null ? void 0 : O[0];
1192
1229
  return {
1193
1230
  ...e,
1194
- resource: { ...c, animations: _, cameras: m, scene: z, scenes: w }
1231
+ resource: { ...c, animations: l, cameras: u, scene: z, scenes: O }
1195
1232
  };
1196
1233
  }
1197
1234
  return ((o = e == null ? void 0 : e.source) == null ? void 0 : o.type) === "font" ? {
1198
1235
  ...e,
1199
- resource: new Ve(e.resource.data)
1236
+ resource: new et(e.resource.data)
1200
1237
  } : e;
1201
1238
  }),
1202
1239
  x()
@@ -1206,7 +1243,7 @@ let oe = class {
1206
1243
  (t) => !!t && t.toLoadCount === t.loadedCount
1207
1244
  ),
1208
1245
  q(
1209
- () => Qe(this._service, [
1246
+ () => tt(this._service, [
1210
1247
  "loadedCount",
1211
1248
  "loadedResources",
1212
1249
  "toLoadCount"
@@ -1217,15 +1254,15 @@ let oe = class {
1217
1254
  this._service = t;
1218
1255
  }
1219
1256
  };
1220
- oe = qi([
1257
+ oe = Gi([
1221
1258
  p(d.ContainerScoped),
1222
- Bi(0, h(U))
1259
+ Qi(0, h(U))
1223
1260
  ], oe);
1224
- var Gi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, Qi = (t, e, i, s) => {
1225
- for (var r = s > 1 ? void 0 : s ? Vi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1261
+ var Ji = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, es = (t, e, i, s) => {
1262
+ for (var r = s > 1 ? void 0 : s ? ki(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1226
1263
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1227
- return s && r && Gi(e, i, r), r;
1228
- }, xe = (t, e) => (i, s) => e(i, s, t);
1264
+ return s && r && Ji(e, i, r), r;
1265
+ }, Ie = (t, e) => (i, s) => e(i, s, t);
1229
1266
  let ae = class {
1230
1267
  constructor(t, e) {
1231
1268
  a(this, "_subscriptions", []);
@@ -1257,19 +1294,19 @@ let ae = class {
1257
1294
  this._subscriptions.forEach((t) => t.unsubscribe());
1258
1295
  }
1259
1296
  };
1260
- ae = Qi([
1297
+ ae = es([
1261
1298
  p(d.ContainerScoped),
1262
- xe(0, h(oe)),
1263
- xe(1, h(U))
1299
+ Ie(0, h(oe)),
1300
+ Ie(1, h(U))
1264
1301
  ], ae);
1265
- var Ji = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, es = (t, e, i, s) => {
1266
- for (var r = s > 1 ? void 0 : s ? ki(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1302
+ var ts = Object.defineProperty, is = Object.getOwnPropertyDescriptor, ss = (t, e, i, s) => {
1303
+ for (var r = s > 1 ? void 0 : s ? is(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1267
1304
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1268
- return s && r && Ji(e, i, r), r;
1305
+ return s && r && ts(e, i, r), r;
1269
1306
  }, P = (t, e) => (i, s) => e(i, s, t);
1270
- let he = class extends Je {
1271
- constructor(t, e, i, s, r, n, o, c, _) {
1272
- super(), this._controller = t, this._service = e, this.timer = i, this.sizes = s, this.camera = r, this.world = n, this.renderer = o, this.loader = c, this.debug = _, this._initProxyEvents();
1307
+ let he = class extends it {
1308
+ constructor(t, e, i, s, r, n, o, c, l) {
1309
+ super(), this._controller = t, this._service = e, this.timer = i, this.sizes = s, this.camera = r, this.world = n, this.renderer = o, this.loader = c, this.debug = l, this._initProxyEvents();
1273
1310
  }
1274
1311
  _initProxyEvents() {
1275
1312
  ce.forEach((t) => {
@@ -1304,17 +1341,17 @@ let he = class extends Je {
1304
1341
  return this.world.getAfterRender$();
1305
1342
  }
1306
1343
  init(t) {
1307
- this._service.isInitialized || !(t != null && t.canvas) || !(this._service.canvas = t.canvas) || (this._service.isInitialized = !0, this.sizes.init(this._service.canvas), this.camera.init(), this.world.init(), this.renderer.init(this._service.canvas), this.timer.init(t.startTimer), this.loader.init(), this.debug.init(t));
1344
+ this._service.canvas = t.canvas, !(this._service.isInitialized || !this._service.canvas) && (this._service.isInitialized = !0, this.sizes.init(this._service.canvas), this.camera.init(), this.world.init(), this.renderer.init(this._service.canvas), this.timer.init(t.startTimer), this.loader.init(), this.debug.init(t));
1308
1345
  }
1309
1346
  dispose() {
1310
1347
  this.sizes.dispose(), this.camera.dispose(), this.world.dispose(), this.renderer.dispose(), this.timer.dispose(), this.loader.dispose(), this.debug.dispose();
1311
1348
  }
1312
1349
  };
1313
- he = es([
1350
+ he = ss([
1314
1351
  p(d.ContainerScoped),
1315
1352
  P(0, h(H)),
1316
1353
  P(1, h(A)),
1317
- P(2, h(G)),
1354
+ P(2, h(V)),
1318
1355
  P(3, h(ee)),
1319
1356
  P(4, h(Q)),
1320
1357
  P(5, h(ie)),
@@ -1322,26 +1359,31 @@ he = es([
1322
1359
  P(7, h(ae)),
1323
1360
  P(8, h(ne))
1324
1361
  ], he);
1325
- var ts = ke();
1326
- const _e = /* @__PURE__ */ et(ts), is = _e.expose;
1362
+ var rs = st();
1363
+ const _e = /* @__PURE__ */ rt(rs), ns = _e.expose;
1327
1364
  _e.registerSerializer;
1328
1365
  _e.Transfer;
1329
- const os = (t) => {
1330
- const e = tt.createChildContainer(), i = e.resolve(he), s = { container: e, module: i }, r = {}, n = (o) => {
1331
- var w, z, g, pe, de;
1332
- if (!((w = o.data) != null && w.canvas) || i.getIsInitialized()) return;
1333
- const c = !!((z = o.data) != null && z.startTimer), _ = !!((g = o.data) != null && g.withMiniCamera), m = !!((pe = o.data) != null && pe.fullScreen);
1366
+ const cs = (t) => {
1367
+ const e = Se.createChildContainer(), i = e.resolve(he), s = { container: e, module: i }, r = {}, n = (c) => {
1368
+ var z, g, pe, de, ue, me, fe;
1369
+ if (!((z = c.data) != null && z.canvas) && !((g = c.data) != null && g.mainThread) || i.getIsInitialized())
1370
+ return;
1371
+ const l = !!((pe = c.data) != null && pe.startTimer), u = !!((de = c.data) != null && de.withMiniCamera), O = !!((ue = c.data) != null && ue.fullScreen);
1334
1372
  i.init({
1335
- ...o.data,
1336
- startTimer: c,
1337
- withMiniCamera: _,
1338
- fullScreen: m
1339
- }), (de = t == null ? void 0 : t.onReady) == null || de.call(t, s), self == null || self.removeEventListener("message", n);
1373
+ ...c.data,
1374
+ canvas: (t == null ? void 0 : t.canvas) || c.data.canvas || (c.data.mainThread ? (me = self == null ? void 0 : self.document) == null ? void 0 : me.getElementsByTagName(
1375
+ "canvas"
1376
+ )[0] : void 0),
1377
+ startTimer: l,
1378
+ withMiniCamera: u,
1379
+ fullScreen: O
1380
+ }), (fe = t == null ? void 0 : t.onReady) == null || fe.call(t, s), self == null || self.removeEventListener("message", n);
1340
1381
  };
1341
- return e.register(it, { useValue: e }), ce.forEach((o) => {
1342
- var c, _;
1343
- r[o] = (_ = (c = i[o]) == null ? void 0 : c.bind) == null ? void 0 : _.call(c, i);
1344
- }), self == null || self.addEventListener("message", n), is({
1382
+ e.register(nt, { useValue: e }), ce.forEach((c) => {
1383
+ var l, u;
1384
+ r[c] = (u = (l = i[c]) == null ? void 0 : l.bind) == null ? void 0 : u.call(l, i);
1385
+ }), self == null || self.addEventListener("message", n);
1386
+ const o = {
1345
1387
  ...r,
1346
1388
  getProxyReceiver: i.getProxyReceiver.bind(i),
1347
1389
  getIsInitialized: i.getIsInitialized.bind(i),
@@ -1350,9 +1392,16 @@ const os = (t) => {
1350
1392
  getStep$: i.getStep$.bind(i),
1351
1393
  getAfterRender$: i.getAfterRender$.bind(i),
1352
1394
  dispose: i.dispose.bind(i)
1353
- }), s;
1395
+ };
1396
+ Se.register("MAIN_THREAD_APP", { useValue: o });
1397
+ try {
1398
+ ns(o);
1399
+ } catch (c) {
1400
+ console.warn("Failed to expose the app module.", c.message);
1401
+ }
1402
+ return s;
1354
1403
  };
1355
1404
  export {
1356
1405
  he as AppModule,
1357
- os as launchApp
1406
+ cs as launchApp
1358
1407
  };