@quick-threejs/reactive 0.1.40 → 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/{FontLoader-Cp39O036.mjs → FontLoader-Dz0z8aMc.mjs} +41 -8
- package/dist/common/blueprints/props.blueprint.d.ts +9 -1
- package/dist/common/interfaces/core.interface.d.ts +2 -1
- package/dist/core/app/app.module.d.ts +2 -2
- package/dist/core/app/app.service.d.ts +2 -2
- package/dist/core/app/sizes/sizes.module.d.ts +1 -1
- package/dist/core/app/sizes/sizes.service.d.ts +1 -1
- package/dist/core/register/register.module.d.ts +7 -5
- package/dist/core/register/register.service.d.ts +2 -2
- package/dist/main.js +4 -4
- package/dist/main.mjs +823 -671
- package/dist/worker.js +1 -1
- package/dist/worker.mjs +351 -302
- package/package.json +4 -4
package/dist/worker.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var a = (t, e, i) =>
|
|
4
|
-
import { w as
|
|
5
|
-
import { Ray as
|
|
6
|
-
var
|
|
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
|
|
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,
|
|
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,
|
|
30
|
+
return cancelAnimationFrame.apply(void 0, ve([], be(t)));
|
|
31
31
|
},
|
|
32
32
|
delegate: void 0
|
|
33
33
|
};
|
|
34
|
-
function
|
|
35
|
-
return t ?
|
|
34
|
+
function vt(t) {
|
|
35
|
+
return t ? Ye(t) : bt;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return new
|
|
39
|
-
var i = t ||
|
|
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
|
|
55
|
-
function
|
|
56
|
-
return e === void 0 && (e = !1),
|
|
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(
|
|
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
|
|
65
|
-
var s =
|
|
66
|
-
return s ?
|
|
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(
|
|
71
|
-
var
|
|
72
|
-
(
|
|
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, (
|
|
76
|
-
}, function(
|
|
77
|
-
var
|
|
78
|
-
c = !1, (
|
|
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
|
|
81
|
-
c && ((
|
|
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
|
-
}) :
|
|
83
|
+
}) : Be;
|
|
84
84
|
}
|
|
85
|
-
const
|
|
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
|
|
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 =
|
|
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(
|
|
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
|
-
|
|
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 (
|
|
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 =
|
|
181
|
+
const c = m.length();
|
|
145
182
|
o = this._clampDistance(c * this._scale);
|
|
146
|
-
const
|
|
147
|
-
this.object.position.addScaledVector(this._dollyDirection,
|
|
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
|
|
152
|
-
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), n =
|
|
153
|
-
const
|
|
154
|
-
|
|
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)) <
|
|
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(
|
|
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
|
-
|
|
215
|
+
m.setFromMatrixColumn(i, 0), m.multiplyScalar(-e), this._panOffset.add(m);
|
|
179
216
|
}
|
|
180
217
|
_panUp(e, i) {
|
|
181
|
-
this.screenSpacePanning === !0 ?
|
|
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
|
-
|
|
189
|
-
let n =
|
|
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
|
|
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
|
|
394
|
+
function wt(t) {
|
|
358
395
|
this.enabled !== !1 && (t.pointerType === "touch" ? this._onTouchMove(t) : this._onMouseMove(t));
|
|
359
396
|
}
|
|
360
|
-
function
|
|
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(
|
|
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
|
|
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 =
|
|
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 =
|
|
431
|
+
this._handleMouseDownPan(t), this.state = _.PAN;
|
|
395
432
|
} else {
|
|
396
433
|
if (this.enableRotate === !1) return;
|
|
397
|
-
this._handleMouseDownRotate(t), this.state =
|
|
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 =
|
|
440
|
+
this._handleMouseDownRotate(t), this.state = _.ROTATE;
|
|
404
441
|
} else {
|
|
405
442
|
if (this.enablePan === !1) return;
|
|
406
|
-
this._handleMouseDownPan(t), this.state =
|
|
443
|
+
this._handleMouseDownPan(t), this.state = _.PAN;
|
|
407
444
|
}
|
|
408
445
|
break;
|
|
409
446
|
default:
|
|
410
|
-
this.state =
|
|
447
|
+
this.state = _.NONE;
|
|
411
448
|
}
|
|
412
|
-
this.state !==
|
|
449
|
+
this.state !== _.NONE && this.dispatchEvent(le);
|
|
413
450
|
}
|
|
414
|
-
function
|
|
451
|
+
function Dt(t) {
|
|
415
452
|
switch (this.state) {
|
|
416
|
-
case
|
|
453
|
+
case _.ROTATE:
|
|
417
454
|
if (this.enableRotate === !1) return;
|
|
418
455
|
this._handleMouseMoveRotate(t);
|
|
419
456
|
break;
|
|
420
|
-
case
|
|
457
|
+
case _.DOLLY:
|
|
421
458
|
if (this.enableZoom === !1) return;
|
|
422
459
|
this._handleMouseMoveDolly(t);
|
|
423
460
|
break;
|
|
424
|
-
case
|
|
461
|
+
case _.PAN:
|
|
425
462
|
if (this.enablePan === !1) return;
|
|
426
463
|
this._handleMouseMovePan(t);
|
|
427
464
|
break;
|
|
428
465
|
}
|
|
429
466
|
}
|
|
430
|
-
function
|
|
431
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !==
|
|
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
|
|
470
|
+
function $t(t) {
|
|
434
471
|
this.enabled !== !1 && this._handleKeyDown(t);
|
|
435
472
|
}
|
|
436
|
-
function
|
|
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 =
|
|
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 =
|
|
483
|
+
this._handleTouchStartPan(t), this.state = _.TOUCH_PAN;
|
|
447
484
|
break;
|
|
448
485
|
default:
|
|
449
|
-
this.state =
|
|
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 =
|
|
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 =
|
|
497
|
+
this._handleTouchStartDollyRotate(t), this.state = _.TOUCH_DOLLY_ROTATE;
|
|
461
498
|
break;
|
|
462
499
|
default:
|
|
463
|
-
this.state =
|
|
500
|
+
this.state = _.NONE;
|
|
464
501
|
}
|
|
465
502
|
break;
|
|
466
503
|
default:
|
|
467
|
-
this.state =
|
|
504
|
+
this.state = _.NONE;
|
|
468
505
|
}
|
|
469
|
-
this.state !==
|
|
506
|
+
this.state !== _.NONE && this.dispatchEvent(le);
|
|
470
507
|
}
|
|
471
|
-
function
|
|
508
|
+
function Tt(t) {
|
|
472
509
|
switch (this._trackPointer(t), this.state) {
|
|
473
|
-
case
|
|
510
|
+
case _.TOUCH_ROTATE:
|
|
474
511
|
if (this.enableRotate === !1) return;
|
|
475
512
|
this._handleTouchMoveRotate(t), this.update();
|
|
476
513
|
break;
|
|
477
|
-
case
|
|
514
|
+
case _.TOUCH_PAN:
|
|
478
515
|
if (this.enablePan === !1) return;
|
|
479
516
|
this._handleTouchMovePan(t), this.update();
|
|
480
517
|
break;
|
|
481
|
-
case
|
|
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
|
|
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 =
|
|
527
|
+
this.state = _.NONE;
|
|
491
528
|
}
|
|
492
529
|
}
|
|
493
|
-
function
|
|
530
|
+
function Mt(t) {
|
|
494
531
|
this.enabled !== !1 && t.preventDefault();
|
|
495
532
|
}
|
|
496
|
-
function
|
|
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
|
|
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
|
|
503
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
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
|
|
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 =
|
|
560
|
+
A = Lt([
|
|
524
561
|
p(d.ContainerScoped)
|
|
525
562
|
], A);
|
|
526
|
-
var
|
|
527
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
530
|
-
},
|
|
531
|
-
let H = class extends
|
|
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 =
|
|
580
|
+
H = Ht([
|
|
544
581
|
p(d.ContainerScoped),
|
|
545
|
-
|
|
582
|
+
Ft(0, h(A))
|
|
546
583
|
], H);
|
|
547
|
-
var
|
|
548
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
587
|
+
return s && r && Yt(e, i, r), r;
|
|
551
588
|
};
|
|
552
|
-
let
|
|
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
|
-
|
|
604
|
+
F = Zt([
|
|
568
605
|
p(d.ContainerScoped)
|
|
569
|
-
],
|
|
570
|
-
var
|
|
571
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
574
|
-
},
|
|
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$",
|
|
581
|
-
|
|
617
|
+
a(this, "step$", vt().pipe(
|
|
618
|
+
gt(({ elapsed: t }) => {
|
|
582
619
|
var e;
|
|
583
|
-
this._oldElapsed !== t && ((e = this._beforeStep$$) == null || e.next(
|
|
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
|
-
|
|
587
|
-
q(() =>
|
|
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 =
|
|
630
|
+
R = Xt([
|
|
594
631
|
p(d.ContainerScoped),
|
|
595
|
-
|
|
632
|
+
qt(0, h(F))
|
|
596
633
|
], R);
|
|
597
|
-
var
|
|
598
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
601
|
-
},
|
|
602
|
-
let
|
|
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
|
-
|
|
672
|
+
V = Gt([
|
|
636
673
|
p(d.ContainerScoped),
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
],
|
|
640
|
-
var
|
|
641
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
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(
|
|
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 =
|
|
699
|
+
S = kt([
|
|
659
700
|
p(d.ContainerScoped)
|
|
660
701
|
], S);
|
|
661
|
-
var
|
|
662
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
665
|
-
},
|
|
666
|
-
let
|
|
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 ===
|
|
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 ===
|
|
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
|
-
|
|
752
|
+
w = ii([
|
|
712
753
|
p(d.ContainerScoped),
|
|
713
|
-
|
|
714
|
-
],
|
|
715
|
-
var
|
|
716
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
719
|
-
},
|
|
720
|
-
let
|
|
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
|
-
|
|
769
|
+
G = oi([
|
|
729
770
|
p(d.ContainerScoped),
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
],
|
|
733
|
-
var
|
|
734
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
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 =
|
|
811
|
+
Q = ci([
|
|
771
812
|
p(d.ContainerScoped),
|
|
772
813
|
K(0, h(S)),
|
|
773
|
-
K(1, h(
|
|
774
|
-
K(2, h(
|
|
814
|
+
K(1, h(G)),
|
|
815
|
+
K(2, h(w))
|
|
775
816
|
], Q);
|
|
776
|
-
var
|
|
777
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
820
|
+
return s && r && li(e, i, r), r;
|
|
780
821
|
};
|
|
781
822
|
let T = class {
|
|
782
823
|
constructor() {
|
|
783
|
-
a(this, "scene", new
|
|
824
|
+
a(this, "scene", new Fe());
|
|
784
825
|
a(this, "enabled", !0);
|
|
785
826
|
}
|
|
786
827
|
};
|
|
787
|
-
T =
|
|
828
|
+
T = pi([
|
|
788
829
|
p(d.ContainerScoped)
|
|
789
830
|
], T);
|
|
790
|
-
var
|
|
791
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
794
|
-
}, W = (t, e) => (i, s) => e(i, s, t),
|
|
795
|
-
let
|
|
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
|
|
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(
|
|
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
|
|
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
|
-
|
|
830
|
-
|
|
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(
|
|
874
|
+
W(1, h(w)),
|
|
834
875
|
W(2, h(S))
|
|
835
|
-
],
|
|
836
|
-
var
|
|
837
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
840
|
-
},
|
|
841
|
-
let
|
|
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
|
-
|
|
890
|
+
Y = Pi([
|
|
850
891
|
p(d.ContainerScoped),
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
],
|
|
854
|
-
var
|
|
855
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
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 =
|
|
911
|
+
J = Si([
|
|
871
912
|
p(d.ContainerScoped),
|
|
872
|
-
X(0, h(
|
|
913
|
+
X(0, h(y)),
|
|
873
914
|
X(1, h(R)),
|
|
874
|
-
X(2, h(
|
|
915
|
+
X(2, h(Y))
|
|
875
916
|
], J);
|
|
876
|
-
var
|
|
877
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
880
|
-
},
|
|
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 =
|
|
948
|
+
k = Oi([
|
|
908
949
|
p(d.ContainerScoped),
|
|
909
|
-
|
|
910
|
-
|
|
950
|
+
je(0, h(J)),
|
|
951
|
+
je(1, h(y))
|
|
911
952
|
], k);
|
|
912
|
-
var
|
|
913
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
916
|
-
},
|
|
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 =
|
|
991
|
+
ee = $i([
|
|
951
992
|
p(d.ContainerScoped),
|
|
952
|
-
|
|
953
|
-
|
|
993
|
+
xe(0, h(Y)),
|
|
994
|
+
xe(1, h(S))
|
|
954
995
|
], ee);
|
|
955
|
-
var
|
|
956
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
959
|
-
},
|
|
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 =
|
|
1010
|
+
te = Mi([
|
|
970
1011
|
p(d.ContainerScoped),
|
|
971
|
-
|
|
1012
|
+
ji(0, h(T))
|
|
972
1013
|
], te);
|
|
973
|
-
var
|
|
974
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
977
|
-
},
|
|
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
|
|
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 =
|
|
1040
|
+
ie = zi([
|
|
1000
1041
|
p(d.ContainerScoped),
|
|
1001
|
-
|
|
1002
|
-
|
|
1042
|
+
Ae(0, h(T)),
|
|
1043
|
+
Ae(1, h(te))
|
|
1003
1044
|
], ie);
|
|
1004
|
-
var
|
|
1005
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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 &&
|
|
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,26 +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
|
|
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
|
|
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
|
-
|
|
1059
|
-
const e = new lt(t);
|
|
1060
|
-
this._worldService.scene.add(e);
|
|
1099
|
+
this.enabled && (this.axesHelper = new dt(t), this._worldService.scene.add(this.axesHelper));
|
|
1061
1100
|
}
|
|
1062
1101
|
initGridHelper(t) {
|
|
1063
|
-
|
|
1064
|
-
const e = new _t(t, t);
|
|
1065
|
-
this._worldService.scene.add(e);
|
|
1102
|
+
this.gridHelper && this._worldService.scene.remove(this.gridHelper), this.enabled && (this.gridHelper = new ut(t, t), this._worldService.scene.add(this.gridHelper));
|
|
1066
1103
|
}
|
|
1067
1104
|
disposeMiniCamera() {
|
|
1068
1105
|
this.miniCamera instanceof j && (this.miniCamera.clearViewOffset(), this.miniCamera.clear(), this.miniCamera = void 0);
|
|
@@ -1076,19 +1113,19 @@ let se = class {
|
|
|
1076
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;
|
|
1077
1114
|
}
|
|
1078
1115
|
};
|
|
1079
|
-
se =
|
|
1116
|
+
se = Ni([
|
|
1080
1117
|
p(d.ContainerScoped),
|
|
1081
1118
|
M(0, h(A)),
|
|
1082
1119
|
M(1, h(S)),
|
|
1083
|
-
M(2, h(
|
|
1084
|
-
M(3, h(
|
|
1120
|
+
M(2, h(y)),
|
|
1121
|
+
M(3, h(w)),
|
|
1085
1122
|
M(4, h(T))
|
|
1086
1123
|
], se);
|
|
1087
|
-
var
|
|
1088
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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--)
|
|
1089
1126
|
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1090
|
-
return s && r &&
|
|
1091
|
-
},
|
|
1127
|
+
return s && r && Hi(e, i, r), r;
|
|
1128
|
+
}, ze = (t, e) => (i, s) => e(i, s, t);
|
|
1092
1129
|
let re = class {
|
|
1093
1130
|
constructor(t, e) {
|
|
1094
1131
|
a(this, "step$");
|
|
@@ -1097,16 +1134,16 @@ let re = class {
|
|
|
1097
1134
|
);
|
|
1098
1135
|
}
|
|
1099
1136
|
};
|
|
1100
|
-
re =
|
|
1137
|
+
re = Yi([
|
|
1101
1138
|
p(d.ContainerScoped),
|
|
1102
|
-
|
|
1103
|
-
|
|
1139
|
+
ze(0, h(R)),
|
|
1140
|
+
ze(1, h(w))
|
|
1104
1141
|
], re);
|
|
1105
|
-
var
|
|
1106
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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--)
|
|
1107
1144
|
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1108
|
-
return s && r &&
|
|
1109
|
-
},
|
|
1145
|
+
return s && r && Ui(e, i, r), r;
|
|
1146
|
+
}, Le = (t, e) => (i, s) => e(i, s, t);
|
|
1110
1147
|
let ne = class {
|
|
1111
1148
|
constructor(t, e) {
|
|
1112
1149
|
a(this, "_subscriptions", []);
|
|
@@ -1144,15 +1181,15 @@ let ne = class {
|
|
|
1144
1181
|
this._service.dispose(), this._subscriptions.forEach((t) => t.unsubscribe());
|
|
1145
1182
|
}
|
|
1146
1183
|
};
|
|
1147
|
-
ne =
|
|
1184
|
+
ne = Ki([
|
|
1148
1185
|
p(d.ContainerScoped),
|
|
1149
|
-
|
|
1150
|
-
|
|
1186
|
+
Le(0, h(se)),
|
|
1187
|
+
Le(1, h(re))
|
|
1151
1188
|
], ne);
|
|
1152
|
-
var
|
|
1153
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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--)
|
|
1154
1191
|
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1155
|
-
return s && r &&
|
|
1192
|
+
return s && r && Wi(e, i, r), r;
|
|
1156
1193
|
};
|
|
1157
1194
|
let U = class {
|
|
1158
1195
|
constructor() {
|
|
@@ -1165,42 +1202,42 @@ let U = class {
|
|
|
1165
1202
|
i && (this.loadedResources[e.name] = i, this.toLoadCount = s, this.loadedCount = r);
|
|
1166
1203
|
}
|
|
1167
1204
|
};
|
|
1168
|
-
U =
|
|
1205
|
+
U = qi([
|
|
1169
1206
|
p(d.ResolutionScoped)
|
|
1170
1207
|
], U);
|
|
1171
|
-
var
|
|
1172
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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--)
|
|
1173
1210
|
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1174
|
-
return s && r &&
|
|
1175
|
-
},
|
|
1211
|
+
return s && r && Bi(e, i, r), r;
|
|
1212
|
+
}, Qi = (t, e) => (i, s) => e(i, s, t);
|
|
1176
1213
|
let oe = class {
|
|
1177
1214
|
constructor(t) {
|
|
1178
|
-
a(this, "load$",
|
|
1215
|
+
a(this, "load$", Je(self, "message").pipe(
|
|
1179
1216
|
C(
|
|
1180
1217
|
(t) => {
|
|
1181
1218
|
var e, i, s;
|
|
1182
|
-
return ((e = t.data) == null ? void 0 : e.token) ===
|
|
1219
|
+
return ((e = t.data) == null ? void 0 : e.token) === ke && !!((s = (i = t.data) == null ? void 0 : i.payload) != null && s.resource);
|
|
1183
1220
|
}
|
|
1184
1221
|
),
|
|
1185
1222
|
q((t) => {
|
|
1186
1223
|
var i, s, r, n, o;
|
|
1187
1224
|
const { payload: e } = t.data || {};
|
|
1188
1225
|
if (((i = e == null ? void 0 : e.source) == null ? void 0 : i.type) === "gltf") {
|
|
1189
|
-
const c = e.resource,
|
|
1190
|
-
(g) =>
|
|
1191
|
-
),
|
|
1192
|
-
(g) =>
|
|
1193
|
-
),
|
|
1194
|
-
(g) =>
|
|
1195
|
-
), z =
|
|
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];
|
|
1196
1233
|
return {
|
|
1197
1234
|
...e,
|
|
1198
|
-
resource: { ...c, animations:
|
|
1235
|
+
resource: { ...c, animations: l, cameras: u, scene: z, scenes: O }
|
|
1199
1236
|
};
|
|
1200
1237
|
}
|
|
1201
1238
|
return ((o = e == null ? void 0 : e.source) == null ? void 0 : o.type) === "font" ? {
|
|
1202
1239
|
...e,
|
|
1203
|
-
resource: new
|
|
1240
|
+
resource: new et(e.resource.data)
|
|
1204
1241
|
} : e;
|
|
1205
1242
|
}),
|
|
1206
1243
|
x()
|
|
@@ -1210,7 +1247,7 @@ let oe = class {
|
|
|
1210
1247
|
(t) => !!t && t.toLoadCount === t.loadedCount
|
|
1211
1248
|
),
|
|
1212
1249
|
q(
|
|
1213
|
-
() =>
|
|
1250
|
+
() => tt(this._service, [
|
|
1214
1251
|
"loadedCount",
|
|
1215
1252
|
"loadedResources",
|
|
1216
1253
|
"toLoadCount"
|
|
@@ -1221,15 +1258,15 @@ let oe = class {
|
|
|
1221
1258
|
this._service = t;
|
|
1222
1259
|
}
|
|
1223
1260
|
};
|
|
1224
|
-
oe =
|
|
1261
|
+
oe = Gi([
|
|
1225
1262
|
p(d.ContainerScoped),
|
|
1226
|
-
|
|
1263
|
+
Qi(0, h(U))
|
|
1227
1264
|
], oe);
|
|
1228
|
-
var
|
|
1229
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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--)
|
|
1230
1267
|
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1231
|
-
return s && r &&
|
|
1232
|
-
},
|
|
1268
|
+
return s && r && Ji(e, i, r), r;
|
|
1269
|
+
}, Ie = (t, e) => (i, s) => e(i, s, t);
|
|
1233
1270
|
let ae = class {
|
|
1234
1271
|
constructor(t, e) {
|
|
1235
1272
|
a(this, "_subscriptions", []);
|
|
@@ -1261,19 +1298,19 @@ let ae = class {
|
|
|
1261
1298
|
this._subscriptions.forEach((t) => t.unsubscribe());
|
|
1262
1299
|
}
|
|
1263
1300
|
};
|
|
1264
|
-
ae =
|
|
1301
|
+
ae = es([
|
|
1265
1302
|
p(d.ContainerScoped),
|
|
1266
|
-
|
|
1267
|
-
|
|
1303
|
+
Ie(0, h(oe)),
|
|
1304
|
+
Ie(1, h(U))
|
|
1268
1305
|
], ae);
|
|
1269
|
-
var
|
|
1270
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
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--)
|
|
1271
1308
|
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1272
|
-
return s && r &&
|
|
1309
|
+
return s && r && ts(e, i, r), r;
|
|
1273
1310
|
}, P = (t, e) => (i, s) => e(i, s, t);
|
|
1274
|
-
let he = class extends
|
|
1275
|
-
constructor(t, e, i, s, r, n, o, c,
|
|
1276
|
-
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 =
|
|
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();
|
|
1277
1314
|
}
|
|
1278
1315
|
_initProxyEvents() {
|
|
1279
1316
|
ce.forEach((t) => {
|
|
@@ -1308,17 +1345,17 @@ let he = class extends Je {
|
|
|
1308
1345
|
return this.world.getAfterRender$();
|
|
1309
1346
|
}
|
|
1310
1347
|
init(t) {
|
|
1311
|
-
this._service.
|
|
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));
|
|
1312
1349
|
}
|
|
1313
1350
|
dispose() {
|
|
1314
1351
|
this.sizes.dispose(), this.camera.dispose(), this.world.dispose(), this.renderer.dispose(), this.timer.dispose(), this.loader.dispose(), this.debug.dispose();
|
|
1315
1352
|
}
|
|
1316
1353
|
};
|
|
1317
|
-
he =
|
|
1354
|
+
he = ss([
|
|
1318
1355
|
p(d.ContainerScoped),
|
|
1319
1356
|
P(0, h(H)),
|
|
1320
1357
|
P(1, h(A)),
|
|
1321
|
-
P(2, h(
|
|
1358
|
+
P(2, h(V)),
|
|
1322
1359
|
P(3, h(ee)),
|
|
1323
1360
|
P(4, h(Q)),
|
|
1324
1361
|
P(5, h(ie)),
|
|
@@ -1326,26 +1363,31 @@ he = es([
|
|
|
1326
1363
|
P(7, h(ae)),
|
|
1327
1364
|
P(8, h(ne))
|
|
1328
1365
|
], he);
|
|
1329
|
-
var
|
|
1330
|
-
const _e = /* @__PURE__ */
|
|
1366
|
+
var rs = st();
|
|
1367
|
+
const _e = /* @__PURE__ */ rt(rs), ns = _e.expose;
|
|
1331
1368
|
_e.registerSerializer;
|
|
1332
1369
|
_e.Transfer;
|
|
1333
|
-
const
|
|
1334
|
-
const e =
|
|
1335
|
-
var
|
|
1336
|
-
if (!((
|
|
1337
|
-
|
|
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);
|
|
1338
1376
|
i.init({
|
|
1339
|
-
...
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
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);
|
|
1344
1385
|
};
|
|
1345
|
-
|
|
1346
|
-
var
|
|
1347
|
-
r[
|
|
1348
|
-
}), self == null || self.addEventListener("message", n)
|
|
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 = {
|
|
1349
1391
|
...r,
|
|
1350
1392
|
getProxyReceiver: i.getProxyReceiver.bind(i),
|
|
1351
1393
|
getIsInitialized: i.getIsInitialized.bind(i),
|
|
@@ -1354,9 +1396,16 @@ const os = (t) => {
|
|
|
1354
1396
|
getStep$: i.getStep$.bind(i),
|
|
1355
1397
|
getAfterRender$: i.getAfterRender$.bind(i),
|
|
1356
1398
|
dispose: i.dispose.bind(i)
|
|
1357
|
-
}
|
|
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;
|
|
1358
1407
|
};
|
|
1359
1408
|
export {
|
|
1360
1409
|
he as AppModule,
|
|
1361
|
-
|
|
1410
|
+
cs as launchApp
|
|
1362
1411
|
};
|