@quick-threejs/reactive 0.1.41 → 0.1.42

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() {
@@ -652,18 +689,22 @@ let S = class {
652
689
  a(this, "enabled", !0);
653
690
  }
654
691
  init(t, e) {
655
- 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;
692
+ this.height = Number(
693
+ t.height ?? this.height
694
+ ), this.width = Number(
695
+ t.width ?? this.width
696
+ ), this.aspect = this.width / this.height, this.enabled = e === void 0 ? !0 : !!e;
656
697
  }
657
698
  };
658
- S = Vt([
699
+ S = kt([
659
700
  p(d.ContainerScoped)
660
701
  ], 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--)
702
+ var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ii = (t, e, i, s) => {
703
+ for (var r = s > 1 ? void 0 : s ? ti(e, i) : e, n = t.length - 1, o; n >= 0; n--)
663
704
  (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 {
705
+ return s && r && ei(e, i, r), r;
706
+ }, si = (t, e) => (i, s) => e(i, s, t);
707
+ let w = class {
667
708
  constructor(t) {
668
709
  a(this, "instance");
669
710
  a(this, "enabled", !0);
@@ -686,7 +727,7 @@ let y = class {
686
727
  (e = this.instance) == null || e.rotation.copy(t);
687
728
  }
688
729
  init(t) {
689
- if (this.dispose(), t === ve.PERSPECTIVE || t === void 0) {
730
+ if (this.dispose(), t === ge.PERSPECTIVE || t === void 0) {
690
731
  this.instance = new E(
691
732
  70,
692
733
  this._sizesService.width / this._sizesService.height,
@@ -695,7 +736,7 @@ let y = class {
695
736
  ), this.instance.position.z = 8;
696
737
  return;
697
738
  }
698
- t === ve.ORTHOGRAPHIC && (this.instance = new I(
739
+ t === ge.ORTHOGRAPHIC && (this.instance = new I(
699
740
  -this._sizesService.aspect * this._sizesService.frustrum / 2,
700
741
  this._sizesService.aspect * this._sizesService.frustrum / 2,
701
742
  this._sizesService.frustrum / 2,
@@ -708,16 +749,16 @@ let y = class {
708
749
  this.instance instanceof j && ((this.instance instanceof E || this.instance instanceof I) && this.instance.clearViewOffset(), this.instance.clear(), this.instance = void 0);
709
750
  }
710
751
  };
711
- y = kt([
752
+ w = ii([
712
753
  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--)
754
+ si(0, h(S))
755
+ ], w);
756
+ var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, oi = (t, e, i, s) => {
757
+ for (var r = s > 1 ? void 0 : s ? ni(e, i) : e, n = t.length - 1, o; n >= 0; n--)
717
758
  (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 {
759
+ return s && r && ri(e, i, r), r;
760
+ }, Te = (t, e) => (i, s) => e(i, s, t);
761
+ let G = class {
721
762
  constructor(t, e) {
722
763
  a(this, "step$");
723
764
  this.timerController = t, this._service = e, this.step$ = this.timerController.step$.pipe(
@@ -725,15 +766,15 @@ let V = class {
725
766
  );
726
767
  }
727
768
  };
728
- V = si([
769
+ G = oi([
729
770
  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--)
771
+ Te(0, h(R)),
772
+ Te(1, h(w))
773
+ ], G);
774
+ var ai = Object.defineProperty, hi = Object.getOwnPropertyDescriptor, ci = (t, e, i, s) => {
775
+ for (var r = s > 1 ? void 0 : s ? hi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
735
776
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
736
- return s && r && ri(e, i, r), r;
777
+ return s && r && ai(e, i, r), r;
737
778
  }, K = (t, e) => (i, s) => e(i, s, t);
738
779
  let Q = class {
739
780
  constructor(t, e, i) {
@@ -767,39 +808,39 @@ let Q = class {
767
808
  this._subscriptions.forEach((t) => t.unsubscribe()), this._service.dispose();
768
809
  }
769
810
  };
770
- Q = oi([
811
+ Q = ci([
771
812
  p(d.ContainerScoped),
772
813
  K(0, h(S)),
773
- K(1, h(V)),
774
- K(2, h(y))
814
+ K(1, h(G)),
815
+ K(2, h(w))
775
816
  ], 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--)
817
+ var li = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, pi = (t, e, i, s) => {
818
+ for (var r = s > 1 ? void 0 : s ? _i(e, i) : e, n = t.length - 1, o; n >= 0; n--)
778
819
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
779
- return s && r && ai(e, i, r), r;
820
+ return s && r && li(e, i, r), r;
780
821
  };
781
822
  let T = class {
782
823
  constructor() {
783
- a(this, "scene", new Le());
824
+ a(this, "scene", new Fe());
784
825
  a(this, "enabled", !0);
785
826
  }
786
827
  };
787
- T = ci([
828
+ T = pi([
788
829
  p(d.ContainerScoped)
789
830
  ], 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--)
831
+ 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) => {
832
+ for (var r = s > 1 ? void 0 : s ? di(e, i) : e, n = t.length - 1, o; n >= 0; n--)
792
833
  (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 {
834
+ return s && r && Ze(e, i, r), r;
835
+ }, W = (t, e) => (i, s) => e(i, s, t), fi = (t, e, i) => ui(t, e + "", i);
836
+ let y = class {
796
837
  constructor(t, e, i) {
797
838
  a(this, "enabled", !0);
798
839
  a(this, "instance");
799
840
  this._worldService = t, this._cameraService = e, this._sizesService = i;
800
841
  }
801
842
  setWebGLRenderer(t) {
802
- this.instance = new Ce({
843
+ this.instance = new Oe({
803
844
  canvas: t,
804
845
  context: t.getContext("webgl2", {
805
846
  stencil: !0,
@@ -808,14 +849,14 @@ let O = class {
808
849
  powerPreference: "high-performance",
809
850
  depth: !0,
810
851
  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;
852
+ }), 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
853
  }
813
854
  setSize(t, e) {
814
855
  var i;
815
856
  (i = this.instance) == null || i.setSize(t, e);
816
857
  }
817
858
  render() {
818
- this.enabled && this._cameraService.instance instanceof j && this.instance instanceof Ce && (this.instance.setViewport(
859
+ this.enabled && this._cameraService.instance instanceof j && this.instance instanceof Oe && (this.instance.setViewport(
819
860
  0,
820
861
  0,
821
862
  this._sizesService.width,
@@ -826,19 +867,19 @@ let O = class {
826
867
  ));
827
868
  }
828
869
  };
829
- di(O, "RENDERER_PIXEL_RATIO", 1);
830
- O = pi([
870
+ fi(y, "RENDERER_PIXEL_RATIO", 1);
871
+ y = mi([
831
872
  p(d.ContainerScoped),
832
873
  W(0, h(T)),
833
- W(1, h(y)),
874
+ W(1, h(w)),
834
875
  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--)
876
+ ], y);
877
+ var vi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Pi = (t, e, i, s) => {
878
+ for (var r = s > 1 ? void 0 : s ? bi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
838
879
  (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 {
880
+ return s && r && vi(e, i, r), r;
881
+ }, Me = (t, e) => (i, s) => e(i, s, t);
882
+ let Y = class {
842
883
  constructor(t, e) {
843
884
  a(this, "resize$");
844
885
  this._appController = t, this._service = e, this.resize$ = this._appController.resize$$.pipe(
@@ -846,15 +887,15 @@ let F = class {
846
887
  );
847
888
  }
848
889
  };
849
- F = fi([
890
+ Y = Pi([
850
891
  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--)
892
+ Me(0, h(H)),
893
+ Me(1, h(S))
894
+ ], Y);
895
+ var gi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Si = (t, e, i, s) => {
896
+ for (var r = s > 1 ? void 0 : s ? Ci(e, i) : e, n = t.length - 1, o; n >= 0; n--)
856
897
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
857
- return s && r && vi(e, i, r), r;
898
+ return s && r && gi(e, i, r), r;
858
899
  }, X = (t, e) => (i, s) => e(i, s, t);
859
900
  let J = class {
860
901
  constructor(t, e, i) {
@@ -867,17 +908,17 @@ let J = class {
867
908
  );
868
909
  }
869
910
  };
870
- J = Pi([
911
+ J = Si([
871
912
  p(d.ContainerScoped),
872
- X(0, h(O)),
913
+ X(0, h(y)),
873
914
  X(1, h(R)),
874
- X(2, h(F))
915
+ X(2, h(Y))
875
916
  ], 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--)
917
+ var wi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Oi = (t, e, i, s) => {
918
+ for (var r = s > 1 ? void 0 : s ? yi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
878
919
  (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);
920
+ return s && r && wi(e, i, r), r;
921
+ }, je = (t, e) => (i, s) => e(i, s, t);
881
922
  let k = class {
882
923
  constructor(t, e) {
883
924
  this._controller = t, this._service = e;
@@ -904,16 +945,16 @@ let k = class {
904
945
  (t = this._service.instance) == null || t.dispose(), this._service.instance = void 0;
905
946
  }
906
947
  };
907
- k = Si([
948
+ k = Oi([
908
949
  p(d.ContainerScoped),
909
- $e(0, h(J)),
910
- $e(1, h(O))
950
+ je(0, h(J)),
951
+ je(1, h(y))
911
952
  ], 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--)
953
+ var Di = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, $i = (t, e, i, s) => {
954
+ for (var r = s > 1 ? void 0 : s ? Ei(e, i) : e, n = t.length - 1, o; n >= 0; n--)
914
955
  (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);
956
+ return s && r && Di(e, i, r), r;
957
+ }, xe = (t, e) => (i, s) => e(i, s, t);
917
958
  let ee = class {
918
959
  constructor(t, e) {
919
960
  this._controller = t, this._service = e;
@@ -947,16 +988,16 @@ let ee = class {
947
988
  return this._controller.resize$;
948
989
  }
949
990
  };
950
- ee = Oi([
991
+ ee = $i([
951
992
  p(d.ContainerScoped),
952
- Re(0, h(F)),
953
- Re(1, h(S))
993
+ xe(0, h(Y)),
994
+ xe(1, h(S))
954
995
  ], 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--)
996
+ var Ri = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, Mi = (t, e, i, s) => {
997
+ for (var r = s > 1 ? void 0 : s ? Ti(e, i) : e, n = t.length - 1, o; n >= 0; n--)
957
998
  (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);
999
+ return s && r && Ri(e, i, r), r;
1000
+ }, ji = (t, e) => (i, s) => e(i, s, t);
960
1001
  let te = class {
961
1002
  constructor(t) {
962
1003
  a(this, "_beforeRender$$", new N());
@@ -966,15 +1007,15 @@ let te = class {
966
1007
  this._worldService = t, this._worldService.scene.onBeforeRender = () => this._beforeRender$$.next({}), this._worldService.scene.onAfterRender = () => this._afterRender$$.next({});
967
1008
  }
968
1009
  };
969
- te = $i([
1010
+ te = Mi([
970
1011
  p(d.ContainerScoped),
971
- Ri(0, h(T))
1012
+ ji(0, h(T))
972
1013
  ], 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--)
1014
+ var xi = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, zi = (t, e, i, s) => {
1015
+ for (var r = s > 1 ? void 0 : s ? Ai(e, i) : e, n = t.length - 1, o; n >= 0; n--)
975
1016
  (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);
1017
+ return s && r && xi(e, i, r), r;
1018
+ }, Ae = (t, e) => (i, s) => e(i, s, t);
978
1019
  let ie = class {
979
1020
  constructor(t, e) {
980
1021
  this._service = t, this._controller = e;
@@ -984,7 +1025,7 @@ let ie = class {
984
1025
  dispose() {
985
1026
  }
986
1027
  scene(t) {
987
- return t instanceof Le && (this._service.scene = t), this._service.scene;
1028
+ return t instanceof Fe && (this._service.scene = t), this._service.scene;
988
1029
  }
989
1030
  enabled(t) {
990
1031
  return typeof t == "boolean" && (this._service.enabled = t), this._service.enabled;
@@ -996,15 +1037,15 @@ let ie = class {
996
1037
  return this._controller.afterRender$;
997
1038
  }
998
1039
  };
999
- ie = ji([
1040
+ ie = zi([
1000
1041
  p(d.ContainerScoped),
1001
- Te(0, h(T)),
1002
- Te(1, h(te))
1042
+ Ae(0, h(T)),
1043
+ Ae(1, h(te))
1003
1044
  ], 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--)
1045
+ var Li = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ni = (t, e, i, s) => {
1046
+ for (var r = s > 1 ? void 0 : s ? Ii(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1006
1047
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1007
- return s && r && xi(e, i, r), r;
1048
+ return s && r && Li(e, i, r), r;
1008
1049
  }, M = (t, e) => (i, s) => e(i, s, t);
1009
1050
  let se = class {
1010
1051
  constructor(t, e, i, s, r) {
@@ -1043,22 +1084,22 @@ let se = class {
1043
1084
  }
1044
1085
  initOrbitControl() {
1045
1086
  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(
1087
+ 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
1088
  this._cameraService.instance,
1048
1089
  this._appService.proxyReceiver
1049
1090
  ), this.cameraControls.rotateSpeed = 0.1, this.cameraControls.enableDamping = !0);
1050
1091
  }
1051
1092
  initMiniCameraOrbitControls() {
1052
- this.miniCameraControls && this.miniCameraControls.dispose(), !(!this.enabled || !this.miniCamera) && (this.miniCameraControls = new ye(
1093
+ this.miniCameraControls && this.miniCameraControls.dispose(), !(!this.enabled || !this.miniCamera) && (this.miniCameraControls = new $e(
1053
1094
  this.miniCamera,
1054
1095
  this._appService.proxyReceiver
1055
1096
  ), this.miniCameraControls.rotateSpeed = 0.15, this.miniCameraControls.enableDamping = !0);
1056
1097
  }
1057
1098
  initAxesHelper(t) {
1058
- this.enabled && (this.axesHelper = new lt(t), this._worldService.scene.add(this.axesHelper));
1099
+ this.enabled && (this.axesHelper = new dt(t), this._worldService.scene.add(this.axesHelper));
1059
1100
  }
1060
1101
  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));
1102
+ this.gridHelper && this._worldService.scene.remove(this.gridHelper), this.enabled && (this.gridHelper = new ut(t, t), this._worldService.scene.add(this.gridHelper));
1062
1103
  }
1063
1104
  disposeMiniCamera() {
1064
1105
  this.miniCamera instanceof j && (this.miniCamera.clearViewOffset(), this.miniCamera.clear(), this.miniCamera = void 0);
@@ -1072,19 +1113,19 @@ let se = class {
1072
1113
  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
1114
  }
1074
1115
  };
1075
- se = zi([
1116
+ se = Ni([
1076
1117
  p(d.ContainerScoped),
1077
1118
  M(0, h(A)),
1078
1119
  M(1, h(S)),
1079
- M(2, h(O)),
1080
- M(3, h(y)),
1120
+ M(2, h(y)),
1121
+ M(3, h(w)),
1081
1122
  M(4, h(T))
1082
1123
  ], 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--)
1124
+ var Hi = Object.defineProperty, Fi = Object.getOwnPropertyDescriptor, Yi = (t, e, i, s) => {
1125
+ for (var r = s > 1 ? void 0 : s ? Fi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1085
1126
  (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);
1127
+ return s && r && Hi(e, i, r), r;
1128
+ }, ze = (t, e) => (i, s) => e(i, s, t);
1088
1129
  let re = class {
1089
1130
  constructor(t, e) {
1090
1131
  a(this, "step$");
@@ -1093,16 +1134,16 @@ let re = class {
1093
1134
  );
1094
1135
  }
1095
1136
  };
1096
- re = Ni([
1137
+ re = Yi([
1097
1138
  p(d.ContainerScoped),
1098
- Me(0, h(R)),
1099
- Me(1, h(y))
1139
+ ze(0, h(R)),
1140
+ ze(1, h(w))
1100
1141
  ], 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--)
1142
+ var Ui = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, Ki = (t, e, i, s) => {
1143
+ for (var r = s > 1 ? void 0 : s ? Zi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1103
1144
  (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);
1145
+ return s && r && Ui(e, i, r), r;
1146
+ }, Le = (t, e) => (i, s) => e(i, s, t);
1106
1147
  let ne = class {
1107
1148
  constructor(t, e) {
1108
1149
  a(this, "_subscriptions", []);
@@ -1140,15 +1181,15 @@ let ne = class {
1140
1181
  this._service.dispose(), this._subscriptions.forEach((t) => t.unsubscribe());
1141
1182
  }
1142
1183
  };
1143
- ne = Fi([
1184
+ ne = Ki([
1144
1185
  p(d.ContainerScoped),
1145
- je(0, h(se)),
1146
- je(1, h(re))
1186
+ Le(0, h(se)),
1187
+ Le(1, h(re))
1147
1188
  ], 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--)
1189
+ var Wi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, qi = (t, e, i, s) => {
1190
+ for (var r = s > 1 ? void 0 : s ? Xi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1150
1191
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1151
- return s && r && Ui(e, i, r), r;
1192
+ return s && r && Wi(e, i, r), r;
1152
1193
  };
1153
1194
  let U = class {
1154
1195
  constructor() {
@@ -1161,42 +1202,42 @@ let U = class {
1161
1202
  i && (this.loadedResources[e.name] = i, this.toLoadCount = s, this.loadedCount = r);
1162
1203
  }
1163
1204
  };
1164
- U = Ki([
1205
+ U = qi([
1165
1206
  p(d.ResolutionScoped)
1166
1207
  ], 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--)
1208
+ var Bi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, Gi = (t, e, i, s) => {
1209
+ for (var r = s > 1 ? void 0 : s ? Vi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1169
1210
  (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);
1211
+ return s && r && Bi(e, i, r), r;
1212
+ }, Qi = (t, e) => (i, s) => e(i, s, t);
1172
1213
  let oe = class {
1173
1214
  constructor(t) {
1174
- a(this, "load$", Be(self, "message").pipe(
1215
+ a(this, "load$", Je(self, "message").pipe(
1175
1216
  C(
1176
1217
  (t) => {
1177
1218
  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);
1219
+ return ((e = t.data) == null ? void 0 : e.token) === ke && !!((s = (i = t.data) == null ? void 0 : i.payload) != null && s.resource);
1179
1220
  }
1180
1221
  ),
1181
1222
  q((t) => {
1182
1223
  var i, s, r, n, o;
1183
1224
  const { payload: e } = t.data || {};
1184
1225
  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];
1226
+ const c = e.resource, l = (s = c.animations) == null ? void 0 : s.map(
1227
+ (g) => mt.parse(g)
1228
+ ), u = (r = c.cameras) == null ? void 0 : r.map(
1229
+ (g) => Ce(g)
1230
+ ), O = (n = c.scenes) == null ? void 0 : n.map(
1231
+ (g) => Ce(g)
1232
+ ), z = O == null ? void 0 : O[0];
1192
1233
  return {
1193
1234
  ...e,
1194
- resource: { ...c, animations: _, cameras: m, scene: z, scenes: w }
1235
+ resource: { ...c, animations: l, cameras: u, scene: z, scenes: O }
1195
1236
  };
1196
1237
  }
1197
1238
  return ((o = e == null ? void 0 : e.source) == null ? void 0 : o.type) === "font" ? {
1198
1239
  ...e,
1199
- resource: new Ve(e.resource.data)
1240
+ resource: new et(e.resource.data)
1200
1241
  } : e;
1201
1242
  }),
1202
1243
  x()
@@ -1206,7 +1247,7 @@ let oe = class {
1206
1247
  (t) => !!t && t.toLoadCount === t.loadedCount
1207
1248
  ),
1208
1249
  q(
1209
- () => Qe(this._service, [
1250
+ () => tt(this._service, [
1210
1251
  "loadedCount",
1211
1252
  "loadedResources",
1212
1253
  "toLoadCount"
@@ -1217,15 +1258,15 @@ let oe = class {
1217
1258
  this._service = t;
1218
1259
  }
1219
1260
  };
1220
- oe = qi([
1261
+ oe = Gi([
1221
1262
  p(d.ContainerScoped),
1222
- Bi(0, h(U))
1263
+ Qi(0, h(U))
1223
1264
  ], 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--)
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--)
1226
1267
  (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);
1268
+ return s && r && Ji(e, i, r), r;
1269
+ }, Ie = (t, e) => (i, s) => e(i, s, t);
1229
1270
  let ae = class {
1230
1271
  constructor(t, e) {
1231
1272
  a(this, "_subscriptions", []);
@@ -1257,19 +1298,19 @@ let ae = class {
1257
1298
  this._subscriptions.forEach((t) => t.unsubscribe());
1258
1299
  }
1259
1300
  };
1260
- ae = Qi([
1301
+ ae = es([
1261
1302
  p(d.ContainerScoped),
1262
- xe(0, h(oe)),
1263
- xe(1, h(U))
1303
+ Ie(0, h(oe)),
1304
+ Ie(1, h(U))
1264
1305
  ], 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--)
1306
+ var ts = Object.defineProperty, is = Object.getOwnPropertyDescriptor, ss = (t, e, i, s) => {
1307
+ for (var r = s > 1 ? void 0 : s ? is(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1267
1308
  (o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
1268
- return s && r && Ji(e, i, r), r;
1309
+ return s && r && ts(e, i, r), r;
1269
1310
  }, 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();
1311
+ let he = class extends it {
1312
+ constructor(t, e, i, s, r, n, o, c, l) {
1313
+ 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
1314
  }
1274
1315
  _initProxyEvents() {
1275
1316
  ce.forEach((t) => {
@@ -1304,17 +1345,17 @@ let he = class extends Je {
1304
1345
  return this.world.getAfterRender$();
1305
1346
  }
1306
1347
  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));
1348
+ 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
1349
  }
1309
1350
  dispose() {
1310
1351
  this.sizes.dispose(), this.camera.dispose(), this.world.dispose(), this.renderer.dispose(), this.timer.dispose(), this.loader.dispose(), this.debug.dispose();
1311
1352
  }
1312
1353
  };
1313
- he = es([
1354
+ he = ss([
1314
1355
  p(d.ContainerScoped),
1315
1356
  P(0, h(H)),
1316
1357
  P(1, h(A)),
1317
- P(2, h(G)),
1358
+ P(2, h(V)),
1318
1359
  P(3, h(ee)),
1319
1360
  P(4, h(Q)),
1320
1361
  P(5, h(ie)),
@@ -1322,26 +1363,31 @@ he = es([
1322
1363
  P(7, h(ae)),
1323
1364
  P(8, h(ne))
1324
1365
  ], he);
1325
- var ts = ke();
1326
- const _e = /* @__PURE__ */ et(ts), is = _e.expose;
1366
+ var rs = st();
1367
+ const _e = /* @__PURE__ */ rt(rs), ns = _e.expose;
1327
1368
  _e.registerSerializer;
1328
1369
  _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);
1370
+ const cs = (t) => {
1371
+ const e = Se.createChildContainer(), i = e.resolve(he), s = { container: e, module: i }, r = {}, n = (c) => {
1372
+ var z, g, pe, de, ue, me, fe;
1373
+ if (!((z = c.data) != null && z.canvas) && !((g = c.data) != null && g.mainThread) || i.getIsInitialized())
1374
+ return;
1375
+ const l = !!((pe = c.data) != null && pe.startTimer), u = !!((de = c.data) != null && de.withMiniCamera), O = !!((ue = c.data) != null && ue.fullScreen);
1334
1376
  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);
1377
+ ...c.data,
1378
+ 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(
1379
+ "canvas"
1380
+ )[0] : void 0),
1381
+ startTimer: l,
1382
+ withMiniCamera: u,
1383
+ fullScreen: O
1384
+ }), (fe = t == null ? void 0 : t.onReady) == null || fe.call(t, s), self == null || self.removeEventListener("message", n);
1340
1385
  };
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({
1386
+ e.register(nt, { useValue: e }), ce.forEach((c) => {
1387
+ var l, u;
1388
+ r[c] = (u = (l = i[c]) == null ? void 0 : l.bind) == null ? void 0 : u.call(l, i);
1389
+ }), self == null || self.addEventListener("message", n);
1390
+ const o = {
1345
1391
  ...r,
1346
1392
  getProxyReceiver: i.getProxyReceiver.bind(i),
1347
1393
  getIsInitialized: i.getIsInitialized.bind(i),
@@ -1350,9 +1396,16 @@ const os = (t) => {
1350
1396
  getStep$: i.getStep$.bind(i),
1351
1397
  getAfterRender$: i.getAfterRender$.bind(i),
1352
1398
  dispose: i.dispose.bind(i)
1353
- }), s;
1399
+ };
1400
+ Se.register("MAIN_THREAD_APP", { useValue: o });
1401
+ try {
1402
+ ns(o);
1403
+ } catch (c) {
1404
+ console.warn("Failed to expose the app module.", c.message);
1405
+ }
1406
+ return s;
1354
1407
  };
1355
1408
  export {
1356
1409
  he as AppModule,
1357
- os as launchApp
1410
+ cs as launchApp
1358
1411
  };