@quick-threejs/reactive 0.1.46 → 0.1.47
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-D3WA1QGd.js → FontLoader-76d20F_i.js} +6 -6
- package/dist/{FontLoader-ejhD_xZ1.mjs → FontLoader-YhZm0TOQ.mjs} +31 -30
- package/dist/common/blueprints/props.blueprint.d.ts +72 -43
- package/dist/common/interfaces/core.interface.d.ts +19 -1
- package/dist/common/interfaces/proxy-event.interface.d.ts +2 -0
- package/dist/core/app/app.module.d.ts +2 -2
- package/dist/core/app/app.service.d.ts +2 -1
- package/dist/core/app/app.worker.d.ts +1 -1
- package/dist/core/app/camera/camera.module.d.ts +2 -4
- package/dist/core/app/camera/camera.service.d.ts +3 -2
- package/dist/core/app/debug/debug.module.d.ts +1 -1
- package/dist/core/app/debug/debug.service.d.ts +2 -2
- package/dist/core/app/loader/loader.module.d.ts +1 -1
- package/dist/core/app/renderer/renderer.module.d.ts +4 -4
- package/dist/core/app/renderer/renderer.service.d.ts +5 -5
- package/dist/core/app/sizes/sizes.module.d.ts +13 -4
- package/dist/core/app/sizes/sizes.service.d.ts +13 -2
- package/dist/core/register/register.module.d.ts +4 -7
- package/dist/core/register/register.service.d.ts +18 -7
- package/dist/main.js +4 -4
- package/dist/main.mjs +836 -846
- package/dist/worker.js +1 -1
- package/dist/worker.mjs +551 -510
- package/package.json +3 -3
package/dist/worker.mjs
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
var
|
|
2
|
-
var We = (t, e, i) => e in t ?
|
|
1
|
+
var Ne = Object.defineProperty;
|
|
2
|
+
var We = (t, e, i) => e in t ? Ne(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
|
3
3
|
var a = (t, e, i) => We(t, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
-
import {
|
|
5
|
-
import { Ray as
|
|
6
|
-
var
|
|
4
|
+
import { w as Ue, _ as de, x as ue, O as Ye, y as xe, z as ze, B as Fe, G as Ze, s as _, L as d, H as Ke, i as h, P as Ve, j as ce, S as I, l as P, m as X, n as j, J as fe, q as me, k as Xe, p as qe, I as be, M as Be, U as Ge, A as Qe, d as Je, f as ke, h as ve, C as et } from "./FontLoader-YhZm0TOQ.mjs";
|
|
5
|
+
import { Ray as tt, Plane as it, MathUtils as st, Vector3 as v, Controls as rt, MOUSE as E, TOUCH as D, Quaternion as ge, Spherical as we, Vector2 as b, Timer as nt, PerspectiveCamera as O, OrthographicCamera as L, Camera as M, Scene as Le, WebGLRenderer as F, PCFSoftShadowMap as ot, SRGBColorSpace as at, CineonToneMapping as ht, AxesHelper as ct, GridHelper as lt, AnimationClip as pt } from "three";
|
|
6
|
+
var _t = {
|
|
7
7
|
now: function() {
|
|
8
8
|
return performance.now();
|
|
9
9
|
},
|
|
10
10
|
delegate: void 0
|
|
11
|
-
},
|
|
11
|
+
}, q = {
|
|
12
12
|
schedule: function(t) {
|
|
13
|
-
var e = requestAnimationFrame, i = cancelAnimationFrame, s =
|
|
13
|
+
var e = requestAnimationFrame, i = cancelAnimationFrame, s = q.delegate;
|
|
14
14
|
s && (e = s.requestAnimationFrame, i = s.cancelAnimationFrame);
|
|
15
|
-
var r = e(function(
|
|
16
|
-
i = void 0, t(
|
|
15
|
+
var r = e(function(n) {
|
|
16
|
+
i = void 0, t(n);
|
|
17
17
|
});
|
|
18
|
-
return new
|
|
18
|
+
return new Ue(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, de([], ue(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, de([], ue(t)));
|
|
31
31
|
},
|
|
32
32
|
delegate: void 0
|
|
33
33
|
};
|
|
34
|
-
function
|
|
35
|
-
return t ?
|
|
34
|
+
function dt(t) {
|
|
35
|
+
return t ? He(t) : ut;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return new
|
|
39
|
-
var i = t ||
|
|
40
|
-
e.closed || (r =
|
|
37
|
+
function He(t) {
|
|
38
|
+
return new Ye(function(e) {
|
|
39
|
+
var i = t || _t, s = i.now(), r = 0, n = function() {
|
|
40
|
+
e.closed || (r = q.requestAnimationFrame(function(o) {
|
|
41
41
|
r = 0;
|
|
42
42
|
var c = i.now();
|
|
43
43
|
e.next({
|
|
44
|
-
timestamp: t ? c :
|
|
44
|
+
timestamp: t ? c : o,
|
|
45
45
|
elapsed: c - s
|
|
46
|
-
}),
|
|
46
|
+
}), n();
|
|
47
47
|
}));
|
|
48
48
|
};
|
|
49
|
-
return
|
|
50
|
-
r &&
|
|
49
|
+
return n(), function() {
|
|
50
|
+
r && q.cancelAnimationFrame(r);
|
|
51
51
|
};
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
var
|
|
55
|
-
function
|
|
56
|
-
return e === void 0 && (e = !1),
|
|
54
|
+
var ut = He();
|
|
55
|
+
function ft(t, e) {
|
|
56
|
+
return e === void 0 && (e = !1), xe(function(i, s) {
|
|
57
57
|
var r = 0;
|
|
58
|
-
i.subscribe(
|
|
59
|
-
var
|
|
60
|
-
(
|
|
58
|
+
i.subscribe(ze(s, function(n) {
|
|
59
|
+
var o = t(n, r++);
|
|
60
|
+
(o || e) && s.next(n), !o && s.complete();
|
|
61
61
|
}));
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
var s =
|
|
66
|
-
return s ?
|
|
67
|
-
var
|
|
68
|
-
(
|
|
64
|
+
function mt(t, e, i) {
|
|
65
|
+
var s = Ze(t) || e || i ? { next: t, error: e, complete: i } : t;
|
|
66
|
+
return s ? xe(function(r, n) {
|
|
67
|
+
var o;
|
|
68
|
+
(o = s.subscribe) === null || o === void 0 || o.call(s);
|
|
69
69
|
var c = !0;
|
|
70
|
-
r.subscribe(
|
|
70
|
+
r.subscribe(ze(n, function(l) {
|
|
71
71
|
var u;
|
|
72
|
-
(u = s.next) === null || u === void 0 || u.call(s, l),
|
|
72
|
+
(u = s.next) === null || u === void 0 || u.call(s, l), n.next(l);
|
|
73
73
|
}, function() {
|
|
74
74
|
var l;
|
|
75
|
-
c = !1, (l = s.complete) === null || l === void 0 || l.call(s),
|
|
75
|
+
c = !1, (l = s.complete) === null || l === void 0 || l.call(s), n.complete();
|
|
76
76
|
}, function(l) {
|
|
77
77
|
var u;
|
|
78
|
-
c = !1, (u = s.error) === null || u === void 0 || u.call(s, l),
|
|
78
|
+
c = !1, (u = s.error) === null || u === void 0 || u.call(s, l), n.error(l);
|
|
79
79
|
}, function() {
|
|
80
80
|
var l, u;
|
|
81
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
|
+
}) : Fe;
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const Pe = { type: "change" }, le = { type: "start" }, Ie = { type: "end" }, H = new tt(), ye = new it(), bt = Math.cos(70 * st.DEG2RAD), f = new v(), m = 2 * Math.PI, p = {
|
|
86
86
|
NONE: -1,
|
|
87
87
|
ROTATE: 0,
|
|
88
88
|
DOLLY: 1,
|
|
@@ -92,7 +92,7 @@ const De = { type: "change" }, le = { type: "start" }, Ue = { type: "end" }, z =
|
|
|
92
92
|
TOUCH_DOLLY_PAN: 5,
|
|
93
93
|
TOUCH_DOLLY_ROTATE: 6
|
|
94
94
|
}, Z = 1e-6;
|
|
95
|
-
class
|
|
95
|
+
class Ce extends rt {
|
|
96
96
|
/**
|
|
97
97
|
* Constructs a new controls instance.
|
|
98
98
|
*
|
|
@@ -100,7 +100,7 @@ class $e extends ct {
|
|
|
100
100
|
* @param {?HTMLElement} domElement - The HTML element used for event listeners.
|
|
101
101
|
*/
|
|
102
102
|
constructor(e, i = null) {
|
|
103
|
-
super(e, i), this.state =
|
|
103
|
+
super(e, i), this.state = p.NONE, this.target = new v(), this.cursor = new v(), 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: E.ROTATE, MIDDLE: E.DOLLY, RIGHT: E.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._cursorStyle = "auto", this._domElementKeyEvents = null, this._lastPosition = new v(), this._lastQuaternion = new ge(), this._lastTargetPosition = new v(), this._quat = new ge().setFromUnitVectors(e.up, new v(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new we(), this._sphericalDelta = new we(), this._scale = 1, this._panOffset = new v(), this._rotateStart = new b(), this._rotateEnd = new b(), this._rotateDelta = new b(), this._panStart = new b(), this._panEnd = new b(), this._panDelta = new b(), this._dollyStart = new b(), this._dollyEnd = new b(), this._dollyDelta = new b(), this._dollyDirection = new v(), this._mouse = new b(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = gt.bind(this), this._onPointerDown = vt.bind(this), this._onPointerUp = wt.bind(this), this._onContextMenu = Et.bind(this), this._onMouseWheel = Ct.bind(this), this._onKeyDown = St.bind(this), this._onTouchStart = Ot.bind(this), this._onTouchMove = Dt.bind(this), this._onMouseDown = Pt.bind(this), this._onMouseMove = yt.bind(this), this._interceptControlDown = $t.bind(this), this._interceptControlUp = Rt.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Defines the visual representation of the cursor.
|
|
@@ -173,7 +173,7 @@ class $e extends ct {
|
|
|
173
173
|
* was called, or the initial state.
|
|
174
174
|
*/
|
|
175
175
|
reset() {
|
|
176
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(
|
|
176
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Pe), this.update(), this.state = p.NONE;
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
179
|
* Programmatically pan the camera.
|
|
@@ -218,41 +218,41 @@ class $e extends ct {
|
|
|
218
218
|
}
|
|
219
219
|
update(e = null) {
|
|
220
220
|
const i = this.object.position;
|
|
221
|
-
|
|
221
|
+
f.copy(i).sub(this.target), f.applyQuaternion(this._quat), this._spherical.setFromVector3(f), this.autoRotate && this.state === p.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);
|
|
222
222
|
let s = this.minAzimuthAngle, r = this.maxAzimuthAngle;
|
|
223
|
-
isFinite(s) && isFinite(r) && (s < -Math.PI ? s +=
|
|
224
|
-
let
|
|
223
|
+
isFinite(s) && isFinite(r) && (s < -Math.PI ? s += m : s > Math.PI && (s -= m), r < -Math.PI ? r += m : r > Math.PI && (r -= m), 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);
|
|
224
|
+
let n = !1;
|
|
225
225
|
if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
|
|
226
226
|
this._spherical.radius = this._clampDistance(this._spherical.radius);
|
|
227
227
|
else {
|
|
228
|
-
const
|
|
229
|
-
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale),
|
|
228
|
+
const o = this._spherical.radius;
|
|
229
|
+
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), n = o != this._spherical.radius;
|
|
230
230
|
}
|
|
231
|
-
if (
|
|
232
|
-
let
|
|
231
|
+
if (f.setFromSpherical(this._spherical), f.applyQuaternion(this._quatInverse), i.copy(this.target).add(f), 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) {
|
|
232
|
+
let o = null;
|
|
233
233
|
if (this.object.isPerspectiveCamera) {
|
|
234
|
-
const c =
|
|
235
|
-
|
|
236
|
-
const l = c -
|
|
237
|
-
this.object.position.addScaledVector(this._dollyDirection, l), this.object.updateMatrixWorld(),
|
|
234
|
+
const c = f.length();
|
|
235
|
+
o = this._clampDistance(c * this._scale);
|
|
236
|
+
const l = c - o;
|
|
237
|
+
this.object.position.addScaledVector(this._dollyDirection, l), this.object.updateMatrixWorld(), n = !!l;
|
|
238
238
|
} else if (this.object.isOrthographicCamera) {
|
|
239
|
-
const c = new
|
|
239
|
+
const c = new v(this._mouse.x, this._mouse.y, 0);
|
|
240
240
|
c.unproject(this.object);
|
|
241
241
|
const l = this.object.zoom;
|
|
242
|
-
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(),
|
|
243
|
-
const u = new
|
|
244
|
-
u.unproject(this.object), this.object.position.sub(u).add(c), this.object.updateMatrixWorld(),
|
|
242
|
+
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), n = l !== this.object.zoom;
|
|
243
|
+
const u = new v(this._mouse.x, this._mouse.y, 0);
|
|
244
|
+
u.unproject(this.object), this.object.position.sub(u).add(c), this.object.updateMatrixWorld(), o = f.length();
|
|
245
245
|
} else
|
|
246
246
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
247
|
-
|
|
247
|
+
o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (H.origin.copy(this.object.position), H.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(H.direction)) < bt ? this.object.lookAt(this.target) : (ye.setFromNormalAndCoplanarPoint(this.object.up, this.target), H.intersectPlane(ye, this.target))));
|
|
248
248
|
} else if (this.object.isOrthographicCamera) {
|
|
249
|
-
const
|
|
250
|
-
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)),
|
|
249
|
+
const o = this.object.zoom;
|
|
250
|
+
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);
|
|
251
251
|
}
|
|
252
|
-
return this._scale = 1, this._performCursorZoom = !1,
|
|
252
|
+
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(Pe), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
253
253
|
}
|
|
254
254
|
_getAutoRotationAngle(e) {
|
|
255
|
-
return e !== null ?
|
|
255
|
+
return e !== null ? m / 60 * this.autoRotateSpeed * e : m / 60 / 60 * this.autoRotateSpeed;
|
|
256
256
|
}
|
|
257
257
|
_getZoomScale(e) {
|
|
258
258
|
const i = Math.abs(e * 0.01);
|
|
@@ -265,19 +265,19 @@ class $e extends ct {
|
|
|
265
265
|
this._sphericalDelta.phi -= e;
|
|
266
266
|
}
|
|
267
267
|
_panLeft(e, i) {
|
|
268
|
-
|
|
268
|
+
f.setFromMatrixColumn(i, 0), f.multiplyScalar(-e), this._panOffset.add(f);
|
|
269
269
|
}
|
|
270
270
|
_panUp(e, i) {
|
|
271
|
-
this.screenSpacePanning === !0 ?
|
|
271
|
+
this.screenSpacePanning === !0 ? f.setFromMatrixColumn(i, 1) : (f.setFromMatrixColumn(i, 0), f.crossVectors(this.object.up, f)), f.multiplyScalar(e), this._panOffset.add(f);
|
|
272
272
|
}
|
|
273
273
|
// deltaX and deltaY are in pixels; right and down are positive
|
|
274
274
|
_pan(e, i) {
|
|
275
275
|
const s = this.domElement;
|
|
276
276
|
if (this.object.isPerspectiveCamera) {
|
|
277
277
|
const r = this.object.position;
|
|
278
|
-
|
|
279
|
-
let
|
|
280
|
-
|
|
278
|
+
f.copy(r).sub(this.target);
|
|
279
|
+
let n = f.length();
|
|
280
|
+
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);
|
|
281
281
|
} 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);
|
|
282
282
|
}
|
|
283
283
|
_dollyOut(e) {
|
|
@@ -290,8 +290,8 @@ class $e extends ct {
|
|
|
290
290
|
if (!this.zoomToCursor)
|
|
291
291
|
return;
|
|
292
292
|
this._performCursorZoom = !0;
|
|
293
|
-
const s = this.domElement.getBoundingClientRect(), r = e - s.left,
|
|
294
|
-
this._mouse.x = r /
|
|
293
|
+
const s = this.domElement.getBoundingClientRect(), r = e - s.left, n = i - s.top, o = s.width, c = s.height;
|
|
294
|
+
this._mouse.x = r / o * 2 - 1, this._mouse.y = -(n / c) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
|
|
295
295
|
}
|
|
296
296
|
_clampDistance(e) {
|
|
297
297
|
return Math.max(this.minDistance, Math.min(this.maxDistance, e));
|
|
@@ -311,7 +311,7 @@ class $e extends ct {
|
|
|
311
311
|
_handleMouseMoveRotate(e) {
|
|
312
312
|
this._rotateEnd.set(e.clientX, e.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
313
313
|
const i = this.domElement;
|
|
314
|
-
this._rotateLeft(
|
|
314
|
+
this._rotateLeft(m * this._rotateDelta.x / i.clientHeight), this._rotateUp(m * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
|
|
315
315
|
}
|
|
316
316
|
_handleMouseMoveDolly(e) {
|
|
317
317
|
this._dollyEnd.set(e.clientX, e.clientY), this._dollyDelta.subVectors(this._dollyEnd, this._dollyStart), this._dollyDelta.y > 0 ? this._dollyOut(this._getZoomScale(this._dollyDelta.y)) : this._dollyDelta.y < 0 && this._dollyIn(this._getZoomScale(this._dollyDelta.y)), this._dollyStart.copy(this._dollyEnd), this.update();
|
|
@@ -326,16 +326,16 @@ class $e extends ct {
|
|
|
326
326
|
let i = !1;
|
|
327
327
|
switch (e.code) {
|
|
328
328
|
case this.keys.UP:
|
|
329
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(
|
|
329
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(m * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), i = !0;
|
|
330
330
|
break;
|
|
331
331
|
case this.keys.BOTTOM:
|
|
332
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-
|
|
332
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-m * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), i = !0;
|
|
333
333
|
break;
|
|
334
334
|
case this.keys.LEFT:
|
|
335
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(
|
|
335
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(m * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), i = !0;
|
|
336
336
|
break;
|
|
337
337
|
case this.keys.RIGHT:
|
|
338
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-
|
|
338
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-m * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), i = !0;
|
|
339
339
|
break;
|
|
340
340
|
}
|
|
341
341
|
i && (e.preventDefault(), this.update());
|
|
@@ -357,8 +357,8 @@ class $e extends ct {
|
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
_handleTouchStartDolly(e) {
|
|
360
|
-
const i = this._getSecondPointerPosition(e), s = e.pageX - i.x, r = e.pageY - i.y,
|
|
361
|
-
this._dollyStart.set(0,
|
|
360
|
+
const i = this._getSecondPointerPosition(e), s = e.pageX - i.x, r = e.pageY - i.y, n = Math.sqrt(s * s + r * r);
|
|
361
|
+
this._dollyStart.set(0, n);
|
|
362
362
|
}
|
|
363
363
|
_handleTouchStartDollyPan(e) {
|
|
364
364
|
this.enableZoom && this._handleTouchStartDolly(e), this.enablePan && this._handleTouchStartPan(e);
|
|
@@ -370,12 +370,12 @@ class $e extends ct {
|
|
|
370
370
|
if (this._pointers.length == 1)
|
|
371
371
|
this._rotateEnd.set(e.pageX, e.pageY);
|
|
372
372
|
else {
|
|
373
|
-
const s = this._getSecondPointerPosition(e), r = 0.5 * (e.pageX + s.x),
|
|
374
|
-
this._rotateEnd.set(r,
|
|
373
|
+
const s = this._getSecondPointerPosition(e), r = 0.5 * (e.pageX + s.x), n = 0.5 * (e.pageY + s.y);
|
|
374
|
+
this._rotateEnd.set(r, n);
|
|
375
375
|
}
|
|
376
376
|
this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
377
377
|
const i = this.domElement;
|
|
378
|
-
this._rotateLeft(
|
|
378
|
+
this._rotateLeft(m * this._rotateDelta.x / i.clientHeight), this._rotateUp(m * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd);
|
|
379
379
|
}
|
|
380
380
|
_handleTouchMovePan(e) {
|
|
381
381
|
if (this._pointers.length === 1)
|
|
@@ -387,10 +387,10 @@ class $e extends ct {
|
|
|
387
387
|
this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd);
|
|
388
388
|
}
|
|
389
389
|
_handleTouchMoveDolly(e) {
|
|
390
|
-
const i = this._getSecondPointerPosition(e), s = e.pageX - i.x, r = e.pageY - i.y,
|
|
391
|
-
this._dollyEnd.set(0,
|
|
392
|
-
const
|
|
393
|
-
this._updateZoomParameters(
|
|
390
|
+
const i = this._getSecondPointerPosition(e), s = e.pageX - i.x, r = e.pageY - i.y, n = Math.sqrt(s * s + r * r);
|
|
391
|
+
this._dollyEnd.set(0, n), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
|
|
392
|
+
const o = (e.pageX + i.x) * 0.5, c = (e.pageY + i.y) * 0.5;
|
|
393
|
+
this._updateZoomParameters(o, c);
|
|
394
394
|
}
|
|
395
395
|
_handleTouchMoveDollyPan(e) {
|
|
396
396
|
this.enableZoom && this._handleTouchMoveDolly(e), this.enablePan && this._handleTouchMovePan(e);
|
|
@@ -417,7 +417,7 @@ class $e extends ct {
|
|
|
417
417
|
}
|
|
418
418
|
_trackPointer(e) {
|
|
419
419
|
let i = this._pointerPositions[e.pointerId];
|
|
420
|
-
i === void 0 && (i = new
|
|
420
|
+
i === void 0 && (i = new b(), this._pointerPositions[e.pointerId] = i), i.set(e.pageX, e.pageY);
|
|
421
421
|
}
|
|
422
422
|
_getSecondPointerPosition(e) {
|
|
423
423
|
const i = e.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
|
|
@@ -441,16 +441,16 @@ class $e extends ct {
|
|
|
441
441
|
return e.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function vt(t) {
|
|
445
445
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(t.pointerId), this.domElement.ownerDocument.addEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(t) && (this._addPointer(t), t.pointerType === "touch" ? this._onTouchStart(t) : this._onMouseDown(t), this._cursorStyle === "grab" && (this.domElement.style.cursor = "grabbing")));
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function gt(t) {
|
|
448
448
|
this.enabled !== !1 && (t.pointerType === "touch" ? this._onTouchMove(t) : this._onMouseMove(t));
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function wt(t) {
|
|
451
451
|
switch (this._removePointer(t), this._pointers.length) {
|
|
452
452
|
case 0:
|
|
453
|
-
this.domElement.releasePointerCapture(t.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(
|
|
453
|
+
this.domElement.releasePointerCapture(t.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Ie), this.state = p.NONE, this._cursorStyle === "grab" && (this.domElement.style.cursor = "grab");
|
|
454
454
|
break;
|
|
455
455
|
case 1:
|
|
456
456
|
const e = this._pointers[0], i = this._pointerPositions[e];
|
|
@@ -458,7 +458,7 @@ function Ot(t) {
|
|
|
458
458
|
break;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Pt(t) {
|
|
462
462
|
let e;
|
|
463
463
|
switch (t.button) {
|
|
464
464
|
case 0:
|
|
@@ -474,132 +474,136 @@ function Dt(t) {
|
|
|
474
474
|
e = -1;
|
|
475
475
|
}
|
|
476
476
|
switch (e) {
|
|
477
|
-
case
|
|
477
|
+
case E.DOLLY:
|
|
478
478
|
if (this.enableZoom === !1) return;
|
|
479
|
-
this._handleMouseDownDolly(t), this.state =
|
|
479
|
+
this._handleMouseDownDolly(t), this.state = p.DOLLY;
|
|
480
480
|
break;
|
|
481
|
-
case
|
|
481
|
+
case E.ROTATE:
|
|
482
482
|
if (t.ctrlKey || t.metaKey || t.shiftKey) {
|
|
483
483
|
if (this.enablePan === !1) return;
|
|
484
|
-
this._handleMouseDownPan(t), this.state =
|
|
484
|
+
this._handleMouseDownPan(t), this.state = p.PAN;
|
|
485
485
|
} else {
|
|
486
486
|
if (this.enableRotate === !1) return;
|
|
487
|
-
this._handleMouseDownRotate(t), this.state =
|
|
487
|
+
this._handleMouseDownRotate(t), this.state = p.ROTATE;
|
|
488
488
|
}
|
|
489
489
|
break;
|
|
490
|
-
case
|
|
490
|
+
case E.PAN:
|
|
491
491
|
if (t.ctrlKey || t.metaKey || t.shiftKey) {
|
|
492
492
|
if (this.enableRotate === !1) return;
|
|
493
|
-
this._handleMouseDownRotate(t), this.state =
|
|
493
|
+
this._handleMouseDownRotate(t), this.state = p.ROTATE;
|
|
494
494
|
} else {
|
|
495
495
|
if (this.enablePan === !1) return;
|
|
496
|
-
this._handleMouseDownPan(t), this.state =
|
|
496
|
+
this._handleMouseDownPan(t), this.state = p.PAN;
|
|
497
497
|
}
|
|
498
498
|
break;
|
|
499
499
|
default:
|
|
500
|
-
this.state =
|
|
500
|
+
this.state = p.NONE;
|
|
501
501
|
}
|
|
502
|
-
this.state !==
|
|
502
|
+
this.state !== p.NONE && this.dispatchEvent(le);
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function yt(t) {
|
|
505
505
|
switch (this.state) {
|
|
506
|
-
case
|
|
506
|
+
case p.ROTATE:
|
|
507
507
|
if (this.enableRotate === !1) return;
|
|
508
508
|
this._handleMouseMoveRotate(t);
|
|
509
509
|
break;
|
|
510
|
-
case
|
|
510
|
+
case p.DOLLY:
|
|
511
511
|
if (this.enableZoom === !1) return;
|
|
512
512
|
this._handleMouseMoveDolly(t);
|
|
513
513
|
break;
|
|
514
|
-
case
|
|
514
|
+
case p.PAN:
|
|
515
515
|
if (this.enablePan === !1) return;
|
|
516
516
|
this._handleMouseMovePan(t);
|
|
517
517
|
break;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
function
|
|
521
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !==
|
|
520
|
+
function Ct(t) {
|
|
521
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== p.NONE || (t.preventDefault(), this.dispatchEvent(le), this._handleMouseWheel(this._customWheelEvent(t)), this.dispatchEvent(Ie));
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function St(t) {
|
|
524
524
|
this.enabled !== !1 && this._handleKeyDown(t);
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Ot(t) {
|
|
527
527
|
switch (this._trackPointer(t), this._pointers.length) {
|
|
528
528
|
case 1:
|
|
529
529
|
switch (this.touches.ONE) {
|
|
530
530
|
case D.ROTATE:
|
|
531
531
|
if (this.enableRotate === !1) return;
|
|
532
|
-
this._handleTouchStartRotate(t), this.state =
|
|
532
|
+
this._handleTouchStartRotate(t), this.state = p.TOUCH_ROTATE;
|
|
533
533
|
break;
|
|
534
534
|
case D.PAN:
|
|
535
535
|
if (this.enablePan === !1) return;
|
|
536
|
-
this._handleTouchStartPan(t), this.state =
|
|
536
|
+
this._handleTouchStartPan(t), this.state = p.TOUCH_PAN;
|
|
537
537
|
break;
|
|
538
538
|
default:
|
|
539
|
-
this.state =
|
|
539
|
+
this.state = p.NONE;
|
|
540
540
|
}
|
|
541
541
|
break;
|
|
542
542
|
case 2:
|
|
543
543
|
switch (this.touches.TWO) {
|
|
544
544
|
case D.DOLLY_PAN:
|
|
545
545
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
546
|
-
this._handleTouchStartDollyPan(t), this.state =
|
|
546
|
+
this._handleTouchStartDollyPan(t), this.state = p.TOUCH_DOLLY_PAN;
|
|
547
547
|
break;
|
|
548
548
|
case D.DOLLY_ROTATE:
|
|
549
549
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
550
|
-
this._handleTouchStartDollyRotate(t), this.state =
|
|
550
|
+
this._handleTouchStartDollyRotate(t), this.state = p.TOUCH_DOLLY_ROTATE;
|
|
551
551
|
break;
|
|
552
552
|
default:
|
|
553
|
-
this.state =
|
|
553
|
+
this.state = p.NONE;
|
|
554
554
|
}
|
|
555
555
|
break;
|
|
556
556
|
default:
|
|
557
|
-
this.state =
|
|
557
|
+
this.state = p.NONE;
|
|
558
558
|
}
|
|
559
|
-
this.state !==
|
|
559
|
+
this.state !== p.NONE && this.dispatchEvent(le);
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function Dt(t) {
|
|
562
562
|
switch (this._trackPointer(t), this.state) {
|
|
563
|
-
case
|
|
563
|
+
case p.TOUCH_ROTATE:
|
|
564
564
|
if (this.enableRotate === !1) return;
|
|
565
565
|
this._handleTouchMoveRotate(t), this.update();
|
|
566
566
|
break;
|
|
567
|
-
case
|
|
567
|
+
case p.TOUCH_PAN:
|
|
568
568
|
if (this.enablePan === !1) return;
|
|
569
569
|
this._handleTouchMovePan(t), this.update();
|
|
570
570
|
break;
|
|
571
|
-
case
|
|
571
|
+
case p.TOUCH_DOLLY_PAN:
|
|
572
572
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
573
573
|
this._handleTouchMoveDollyPan(t), this.update();
|
|
574
574
|
break;
|
|
575
|
-
case
|
|
575
|
+
case p.TOUCH_DOLLY_ROTATE:
|
|
576
576
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
577
577
|
this._handleTouchMoveDollyRotate(t), this.update();
|
|
578
578
|
break;
|
|
579
579
|
default:
|
|
580
|
-
this.state =
|
|
580
|
+
this.state = p.NONE;
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function Et(t) {
|
|
584
584
|
this.enabled !== !1 && t.preventDefault();
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function $t(t) {
|
|
587
587
|
t.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function Rt(t) {
|
|
590
590
|
t.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
591
591
|
}
|
|
592
|
-
var
|
|
593
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
594
|
-
(
|
|
595
|
-
return s && r &&
|
|
592
|
+
var Tt = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, jt = (t, e, i, s) => {
|
|
593
|
+
for (var r = s > 1 ? void 0 : s ? Mt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
594
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
595
|
+
return s && r && Tt(e, i, r), r;
|
|
596
596
|
};
|
|
597
597
|
let A = class {
|
|
598
598
|
constructor() {
|
|
599
599
|
a(this, "_canvas");
|
|
600
|
-
a(this, "proxyReceiver", new
|
|
600
|
+
a(this, "proxyReceiver", new Ke());
|
|
601
601
|
a(this, "isInitialized", !1);
|
|
602
602
|
}
|
|
603
|
+
init(t) {
|
|
604
|
+
if (!t) throw new Error("Core App Canvas is not initialized.");
|
|
605
|
+
this.canvas = t, this.isInitialized = !0;
|
|
606
|
+
}
|
|
603
607
|
get canvas() {
|
|
604
608
|
return this._canvas;
|
|
605
609
|
}
|
|
@@ -610,19 +614,19 @@ let A = class {
|
|
|
610
614
|
}, this._canvas = t;
|
|
611
615
|
}
|
|
612
616
|
};
|
|
613
|
-
A =
|
|
614
|
-
|
|
617
|
+
A = jt([
|
|
618
|
+
_(d.ContainerScoped)
|
|
615
619
|
], A);
|
|
616
|
-
var
|
|
617
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
618
|
-
(
|
|
619
|
-
return s && r &&
|
|
620
|
-
},
|
|
621
|
-
let
|
|
620
|
+
var At = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, zt = (t, e, i, s) => {
|
|
621
|
+
for (var r = s > 1 ? void 0 : s ? xt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
622
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
623
|
+
return s && r && At(e, i, r), r;
|
|
624
|
+
}, Lt = (t, e) => (i, s) => e(i, s, t);
|
|
625
|
+
let N = class extends Ve {
|
|
622
626
|
constructor(t) {
|
|
623
627
|
super(), this._service = t;
|
|
624
628
|
for (const e of ce)
|
|
625
|
-
this[`${e}$$`] = new
|
|
629
|
+
this[`${e}$$`] = new I(), this[`${e}$`] = this[`${e}$$`].pipe(), this[e] = (i) => {
|
|
626
630
|
const s = {
|
|
627
631
|
...i,
|
|
628
632
|
type: i.type || e
|
|
@@ -631,20 +635,20 @@ let H = class extends Qe {
|
|
|
631
635
|
};
|
|
632
636
|
}
|
|
633
637
|
};
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
],
|
|
638
|
-
var
|
|
639
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
640
|
-
(
|
|
641
|
-
return s && r &&
|
|
638
|
+
N = zt([
|
|
639
|
+
_(d.ContainerScoped),
|
|
640
|
+
Lt(0, h(A))
|
|
641
|
+
], N);
|
|
642
|
+
var Ht = Object.defineProperty, It = Object.getOwnPropertyDescriptor, Nt = (t, e, i, s) => {
|
|
643
|
+
for (var r = s > 1 ? void 0 : s ? It(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
644
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
645
|
+
return s && r && Ht(e, i, r), r;
|
|
642
646
|
};
|
|
643
|
-
let
|
|
647
|
+
let W = class {
|
|
644
648
|
constructor() {
|
|
645
649
|
a(this, "fps", 60);
|
|
646
650
|
a(this, "frame", 1e3 / this.fps);
|
|
647
|
-
a(this, "timer", new
|
|
651
|
+
a(this, "timer", new nt());
|
|
648
652
|
a(this, "initialTime", Date.now());
|
|
649
653
|
a(this, "elapsed", 0);
|
|
650
654
|
a(this, "previousDelta", 0);
|
|
@@ -659,42 +663,42 @@ let F = class {
|
|
|
659
663
|
this.timer.update(), this.elapsed = this.timer.getElapsed(), this.delta = this.elapsed - this.previousDelta, this.previousDelta = this.elapsed, this.deltaRatio = this.delta / this.frame;
|
|
660
664
|
}
|
|
661
665
|
};
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
],
|
|
665
|
-
var Wt = Object.defineProperty,
|
|
666
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
667
|
-
(
|
|
666
|
+
W = Nt([
|
|
667
|
+
_(d.ContainerScoped)
|
|
668
|
+
], W);
|
|
669
|
+
var Wt = Object.defineProperty, Ut = Object.getOwnPropertyDescriptor, Yt = (t, e, i, s) => {
|
|
670
|
+
for (var r = s > 1 ? void 0 : s ? Ut(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
671
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
668
672
|
return s && r && Wt(e, i, r), r;
|
|
669
|
-
},
|
|
670
|
-
let
|
|
673
|
+
}, Ft = (t, e) => (i, s) => e(i, s, t);
|
|
674
|
+
let $ = class {
|
|
671
675
|
constructor(t) {
|
|
672
|
-
a(this, "_beforeStep$$", new
|
|
676
|
+
a(this, "_beforeStep$$", new I());
|
|
673
677
|
a(this, "_oldElapsed", 0);
|
|
674
678
|
a(this, "beforeStep$", this._beforeStep$$.asObservable());
|
|
675
|
-
a(this, "step$",
|
|
676
|
-
|
|
679
|
+
a(this, "step$", dt().pipe(
|
|
680
|
+
mt(({ elapsed: t }) => {
|
|
677
681
|
var e;
|
|
678
|
-
this._oldElapsed !== t && ((e = this._beforeStep$$) == null || e.next(
|
|
682
|
+
this._oldElapsed !== t && ((e = this._beforeStep$$) == null || e.next(fe(this._service, [])), this._oldElapsed = t);
|
|
679
683
|
}),
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
+
P(() => this._service.enabled),
|
|
685
|
+
ft(() => this._service.enabled),
|
|
686
|
+
X(() => fe(this._service, [])),
|
|
687
|
+
j()
|
|
684
688
|
));
|
|
685
689
|
this._service = t;
|
|
686
690
|
}
|
|
687
691
|
};
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
],
|
|
692
|
-
var
|
|
693
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
694
|
-
(
|
|
695
|
-
return s && r &&
|
|
696
|
-
},
|
|
697
|
-
let
|
|
692
|
+
$ = Yt([
|
|
693
|
+
_(d.ContainerScoped),
|
|
694
|
+
Ft(0, h(W))
|
|
695
|
+
], $);
|
|
696
|
+
var Zt = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, Vt = (t, e, i, s) => {
|
|
697
|
+
for (var r = s > 1 ? void 0 : s ? Kt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
698
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
699
|
+
return s && r && Zt(e, i, r), r;
|
|
700
|
+
}, Se = (t, e) => (i, s) => e(i, s, t);
|
|
701
|
+
let B = class {
|
|
698
702
|
constructor(t, e) {
|
|
699
703
|
a(this, "_initialAnimationFrameId");
|
|
700
704
|
a(this, "_subscriptions", []);
|
|
@@ -718,7 +722,7 @@ let V = class {
|
|
|
718
722
|
return typeof t == "boolean" && (this._service.enabled = t), this._service.enabled;
|
|
719
723
|
}
|
|
720
724
|
dispose() {
|
|
721
|
-
this._initialAnimationFrameId !== void 0 && cancelAnimationFrame(this._initialAnimationFrameId), this._service.enabled = !1;
|
|
725
|
+
this._initialAnimationFrameId !== void 0 && cancelAnimationFrame(this._initialAnimationFrameId), this._service.enabled = !1, this._subscriptions.forEach((t) => t.unsubscribe()), this._subscriptions = [];
|
|
722
726
|
}
|
|
723
727
|
beforeStep$() {
|
|
724
728
|
return this._controller.beforeStep$;
|
|
@@ -727,46 +731,61 @@ let V = class {
|
|
|
727
731
|
return this._controller.step$;
|
|
728
732
|
}
|
|
729
733
|
};
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
],
|
|
735
|
-
var
|
|
736
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
737
|
-
(
|
|
738
|
-
return s && r &&
|
|
734
|
+
B = Vt([
|
|
735
|
+
_(d.ContainerScoped),
|
|
736
|
+
Se(0, h($)),
|
|
737
|
+
Se(1, h(W))
|
|
738
|
+
], B);
|
|
739
|
+
var Xt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Bt = (t, e, i, s) => {
|
|
740
|
+
for (var r = s > 1 ? void 0 : s ? qt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
741
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
742
|
+
return s && r && Xt(e, i, r), r;
|
|
739
743
|
};
|
|
740
|
-
let
|
|
744
|
+
let C = class {
|
|
741
745
|
constructor() {
|
|
742
746
|
a(this, "width", 0);
|
|
743
747
|
a(this, "height", 0);
|
|
748
|
+
a(this, "wrapperWidth", 0);
|
|
749
|
+
a(this, "wrapperHeight", 0);
|
|
750
|
+
a(this, "windowWidth", 0);
|
|
751
|
+
a(this, "windowHeight", 0);
|
|
744
752
|
a(this, "aspect", 0);
|
|
745
|
-
a(this, "pixelRatio",
|
|
753
|
+
a(this, "pixelRatio", 1);
|
|
746
754
|
a(this, "frustrum", 5);
|
|
747
755
|
a(this, "enabled", !0);
|
|
756
|
+
a(this, "fullscreen", !1);
|
|
757
|
+
a(this, "hasCanvasWrapper", !1);
|
|
758
|
+
}
|
|
759
|
+
init(t, e = 1, i = !0, s = !1, r = !0) {
|
|
760
|
+
this.height = Number(t.height ?? this.height), this.width = Number(t.width ?? this.width), this.aspect = this.width / this.height, this.pixelRatio = typeof e == "number" ? e : 1, this.fullscreen = i, this.hasCanvasWrapper = s, this.enabled = r;
|
|
748
761
|
}
|
|
749
|
-
|
|
750
|
-
this.
|
|
762
|
+
handleResize(t) {
|
|
763
|
+
this.width = t.width, this.height = t.height, this.wrapperWidth = t.wrapperWidth, this.wrapperHeight = t.wrapperHeight, this.windowWidth = t.windowWidth, this.windowHeight = t.windowHeight, this.aspect = this.fullscreen ? t.windowWidth / t.windowHeight : this.hasCanvasWrapper ? t.wrapperWidth / t.wrapperHeight : t.width / t.height, console.log("size", this);
|
|
764
|
+
}
|
|
765
|
+
getViewPortSizes() {
|
|
766
|
+
return {
|
|
767
|
+
width: this.fullscreen ? this.windowWidth : this.hasCanvasWrapper ? this.wrapperWidth : this.width,
|
|
768
|
+
height: this.fullscreen ? this.windowHeight : this.hasCanvasWrapper ? this.wrapperHeight : this.height
|
|
769
|
+
};
|
|
751
770
|
}
|
|
752
771
|
};
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
],
|
|
756
|
-
var
|
|
757
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
758
|
-
(
|
|
759
|
-
return s && r &&
|
|
760
|
-
},
|
|
761
|
-
let
|
|
772
|
+
C = Bt([
|
|
773
|
+
_(d.ContainerScoped)
|
|
774
|
+
], C);
|
|
775
|
+
var Gt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, Jt = (t, e, i, s) => {
|
|
776
|
+
for (var r = s > 1 ? void 0 : s ? Qt(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
777
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
778
|
+
return s && r && Gt(e, i, r), r;
|
|
779
|
+
}, kt = (t, e) => (i, s) => e(i, s, t);
|
|
780
|
+
let S = class {
|
|
762
781
|
constructor(t) {
|
|
763
782
|
a(this, "instance");
|
|
764
783
|
a(this, "enabled", !0);
|
|
765
|
-
this.
|
|
784
|
+
this._sizes = t;
|
|
766
785
|
}
|
|
767
786
|
set aspectRatio(t) {
|
|
768
787
|
var e;
|
|
769
|
-
this.instance instanceof
|
|
788
|
+
this.instance instanceof O && (this.instance.aspect = t), (this.instance instanceof O || this.instance instanceof L) && ((e = this.instance) == null || e.updateProjectionMatrix());
|
|
770
789
|
}
|
|
771
790
|
set quaternion(t) {
|
|
772
791
|
var e;
|
|
@@ -781,66 +800,64 @@ let y = class {
|
|
|
781
800
|
(e = this.instance) == null || e.rotation.copy(t);
|
|
782
801
|
}
|
|
783
802
|
init(t) {
|
|
784
|
-
if (this.dispose(), t ===
|
|
785
|
-
this.instance = new
|
|
786
|
-
70,
|
|
787
|
-
this._sizesService.width / this._sizesService.height,
|
|
788
|
-
0.1,
|
|
789
|
-
100
|
|
790
|
-
), this.instance.position.z = 8;
|
|
803
|
+
if (this.dispose(), t === me.PERSPECTIVE || t === void 0) {
|
|
804
|
+
this.instance = new O(70, this._sizes.aspect, 0.1, 100), this.instance.position.z = 8;
|
|
791
805
|
return;
|
|
792
806
|
}
|
|
793
|
-
t ===
|
|
794
|
-
-this.
|
|
795
|
-
this.
|
|
796
|
-
this.
|
|
797
|
-
-this.
|
|
807
|
+
t === me.ORTHOGRAPHIC && (this.instance = new L(
|
|
808
|
+
-this._sizes.aspect * this._sizes.frustrum / 2,
|
|
809
|
+
this._sizes.aspect * this._sizes.frustrum / 2,
|
|
810
|
+
this._sizes.frustrum / 2,
|
|
811
|
+
-this._sizes.frustrum / 2,
|
|
798
812
|
-50,
|
|
799
813
|
50
|
|
800
814
|
));
|
|
801
815
|
}
|
|
816
|
+
handleStep() {
|
|
817
|
+
var t;
|
|
818
|
+
this.aspectRatio = this._sizes.aspect, (this.instance instanceof O || this.instance instanceof L) && ((t = this.instance) == null || t.updateProjectionMatrix());
|
|
819
|
+
}
|
|
802
820
|
dispose() {
|
|
803
|
-
this.instance instanceof
|
|
821
|
+
this.instance instanceof M && ((this.instance instanceof O || this.instance instanceof L) && this.instance.clearViewOffset(), this.instance.clear(), this.instance = void 0);
|
|
804
822
|
}
|
|
805
823
|
};
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
],
|
|
810
|
-
var
|
|
811
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
812
|
-
(
|
|
813
|
-
return s && r &&
|
|
814
|
-
},
|
|
824
|
+
S = Jt([
|
|
825
|
+
_(d.ContainerScoped),
|
|
826
|
+
kt(0, h(C))
|
|
827
|
+
], S);
|
|
828
|
+
var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ii = (t, e, i, s) => {
|
|
829
|
+
for (var r = s > 1 ? void 0 : s ? ti(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
830
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
831
|
+
return s && r && ei(e, i, r), r;
|
|
832
|
+
}, Oe = (t, e) => (i, s) => e(i, s, t);
|
|
815
833
|
let G = class {
|
|
816
834
|
constructor(t, e) {
|
|
817
835
|
a(this, "step$");
|
|
818
836
|
this.timerController = t, this._service = e, this.step$ = this.timerController.step$.pipe(
|
|
819
|
-
|
|
837
|
+
P(() => this._service.enabled)
|
|
820
838
|
);
|
|
821
839
|
}
|
|
822
840
|
};
|
|
823
|
-
G =
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
841
|
+
G = ii([
|
|
842
|
+
_(d.ContainerScoped),
|
|
843
|
+
Oe(0, h($)),
|
|
844
|
+
Oe(1, h(S))
|
|
827
845
|
], G);
|
|
828
|
-
var
|
|
829
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
830
|
-
(
|
|
831
|
-
return s && r &&
|
|
832
|
-
},
|
|
846
|
+
var si = Object.defineProperty, ri = Object.getOwnPropertyDescriptor, ni = (t, e, i, s) => {
|
|
847
|
+
for (var r = s > 1 ? void 0 : s ? ri(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
848
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
849
|
+
return s && r && si(e, i, r), r;
|
|
850
|
+
}, De = (t, e) => (i, s) => e(i, s, t);
|
|
833
851
|
let Q = class {
|
|
834
|
-
constructor(t, e
|
|
852
|
+
constructor(t, e) {
|
|
835
853
|
a(this, "_subscriptions", []);
|
|
836
|
-
this.
|
|
854
|
+
this._controller = t, this._service = e;
|
|
837
855
|
}
|
|
838
856
|
init() {
|
|
839
857
|
this._service.init(), this._subscriptions.push(
|
|
840
|
-
this._controller.step$.subscribe(
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
})
|
|
858
|
+
this._controller.step$.subscribe(
|
|
859
|
+
this._service.handleStep.bind(this._service)
|
|
860
|
+
)
|
|
844
861
|
);
|
|
845
862
|
}
|
|
846
863
|
enabled(t) {
|
|
@@ -859,42 +876,42 @@ let Q = class {
|
|
|
859
876
|
return t && (this._service.quaternion = t), this._service.quaternion;
|
|
860
877
|
}
|
|
861
878
|
dispose() {
|
|
862
|
-
this._subscriptions.forEach((t) => t.unsubscribe()), this._service.dispose();
|
|
879
|
+
this._subscriptions.forEach((t) => t.unsubscribe()), this._subscriptions = [], this._service.dispose();
|
|
863
880
|
}
|
|
864
881
|
};
|
|
865
|
-
Q =
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
K(2, h(y))
|
|
882
|
+
Q = ni([
|
|
883
|
+
_(d.ContainerScoped),
|
|
884
|
+
De(0, h(G)),
|
|
885
|
+
De(1, h(S))
|
|
870
886
|
], Q);
|
|
871
|
-
var
|
|
872
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
873
|
-
(
|
|
874
|
-
return s && r &&
|
|
887
|
+
var oi = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, hi = (t, e, i, s) => {
|
|
888
|
+
for (var r = s > 1 ? void 0 : s ? ai(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
889
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
890
|
+
return s && r && oi(e, i, r), r;
|
|
875
891
|
};
|
|
876
|
-
let
|
|
892
|
+
let R = class {
|
|
877
893
|
constructor() {
|
|
878
|
-
a(this, "scene", new
|
|
894
|
+
a(this, "scene", new Le());
|
|
879
895
|
a(this, "enabled", !0);
|
|
880
896
|
}
|
|
881
897
|
};
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
],
|
|
885
|
-
var
|
|
886
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
887
|
-
(
|
|
888
|
-
return s && r &&
|
|
889
|
-
},
|
|
890
|
-
let
|
|
898
|
+
R = hi([
|
|
899
|
+
_(d.ContainerScoped)
|
|
900
|
+
], R);
|
|
901
|
+
var ci = Object.defineProperty, li = Object.getOwnPropertyDescriptor, pi = (t, e, i, s) => {
|
|
902
|
+
for (var r = s > 1 ? void 0 : s ? li(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
903
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
904
|
+
return s && r && ci(e, i, r), r;
|
|
905
|
+
}, K = (t, e) => (i, s) => e(i, s, t);
|
|
906
|
+
let x = class {
|
|
891
907
|
constructor(t, e, i) {
|
|
892
908
|
a(this, "enabled", !0);
|
|
909
|
+
a(this, "enabledAutoResize", !0);
|
|
893
910
|
a(this, "instance");
|
|
894
|
-
this._worldService = t, this._cameraService = e, this.
|
|
911
|
+
this._worldService = t, this._cameraService = e, this._sizes = i;
|
|
895
912
|
}
|
|
896
|
-
|
|
897
|
-
this.instance = new
|
|
913
|
+
init(t) {
|
|
914
|
+
this.instance = new F({
|
|
898
915
|
canvas: t,
|
|
899
916
|
context: t.getContext("webgl2", {
|
|
900
917
|
stencil: !0,
|
|
@@ -903,125 +920,137 @@ let C = class {
|
|
|
903
920
|
powerPreference: "high-performance",
|
|
904
921
|
depth: !0,
|
|
905
922
|
antialias: !0
|
|
906
|
-
}), this.instance.autoClear = !1, this.instance.setPixelRatio(
|
|
923
|
+
}), this.instance.autoClear = !1, this.instance.setPixelRatio(this._sizes.pixelRatio), this.instance.setClearColor(0, 0), this.instance.shadowMap.enabled = !0, this.instance.shadowMap.type = ot, this.instance.outputColorSpace = at, this.instance.toneMapping = ht, this.instance.toneMappingExposure = 1.75;
|
|
907
924
|
}
|
|
908
|
-
|
|
925
|
+
handleAutoResize() {
|
|
909
926
|
var i;
|
|
927
|
+
if (!this.enabledAutoResize || !(this.instance instanceof F))
|
|
928
|
+
return;
|
|
929
|
+
const { width: t, height: e } = this._sizes.getViewPortSizes();
|
|
910
930
|
(i = this.instance) == null || i.setSize(t, e);
|
|
911
931
|
}
|
|
912
932
|
render() {
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
this._sizesService.height
|
|
918
|
-
), this.instance.render(
|
|
933
|
+
if (!(this._cameraService.instance instanceof M) || !(this.instance instanceof F))
|
|
934
|
+
return;
|
|
935
|
+
const t = this._sizes.fullscreen ? this._sizes.windowWidth : this._sizes.hasCanvasWrapper ? this._sizes.wrapperWidth : this._sizes.width, e = this._sizes.fullscreen ? this._sizes.windowHeight : this._sizes.hasCanvasWrapper ? this._sizes.wrapperHeight : this._sizes.height;
|
|
936
|
+
this.instance.setViewport(0, 0, t, e), this.instance.render(
|
|
919
937
|
this._worldService.scene,
|
|
920
938
|
this._cameraService.instance
|
|
921
|
-
)
|
|
939
|
+
);
|
|
922
940
|
}
|
|
923
941
|
};
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
var
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
let Y = class {
|
|
942
|
+
x = pi([
|
|
943
|
+
_(d.ContainerScoped),
|
|
944
|
+
K(0, h(R)),
|
|
945
|
+
K(1, h(S)),
|
|
946
|
+
K(2, h(C))
|
|
947
|
+
], x);
|
|
948
|
+
var _i = Object.defineProperty, di = Object.getOwnPropertyDescriptor, ui = (t, e, i, s) => {
|
|
949
|
+
for (var r = s > 1 ? void 0 : s ? di(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
950
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
951
|
+
return s && r && _i(e, i, r), r;
|
|
952
|
+
}, Ee = (t, e) => (i, s) => e(i, s, t);
|
|
953
|
+
let U = class {
|
|
937
954
|
constructor(t, e) {
|
|
938
955
|
a(this, "resize$");
|
|
939
956
|
this._appController = t, this._service = e, this.resize$ = this._appController.resize$$.pipe(
|
|
940
|
-
|
|
957
|
+
P(() => this._service.enabled)
|
|
941
958
|
);
|
|
942
959
|
}
|
|
943
960
|
};
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
],
|
|
949
|
-
var
|
|
950
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
951
|
-
(
|
|
952
|
-
return s && r &&
|
|
953
|
-
},
|
|
961
|
+
U = ui([
|
|
962
|
+
_(d.ContainerScoped),
|
|
963
|
+
Ee(0, h(N)),
|
|
964
|
+
Ee(1, h(C))
|
|
965
|
+
], U);
|
|
966
|
+
var fi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, bi = (t, e, i, s) => {
|
|
967
|
+
for (var r = s > 1 ? void 0 : s ? mi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
968
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
969
|
+
return s && r && fi(e, i, r), r;
|
|
970
|
+
}, V = (t, e) => (i, s) => e(i, s, t);
|
|
954
971
|
let J = class {
|
|
955
972
|
constructor(t, e, i) {
|
|
956
973
|
a(this, "step$");
|
|
957
974
|
a(this, "resize$");
|
|
958
975
|
this._service = t, this._timerController = e, this._sizesController = i, this.step$ = this._timerController.step$.pipe(
|
|
959
|
-
|
|
976
|
+
P(() => this._service.enabled)
|
|
960
977
|
), this.resize$ = this._sizesController.resize$.pipe(
|
|
961
|
-
|
|
978
|
+
P(() => this._service.enabled)
|
|
962
979
|
);
|
|
963
980
|
}
|
|
964
981
|
};
|
|
965
|
-
J =
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
982
|
+
J = bi([
|
|
983
|
+
_(d.ContainerScoped),
|
|
984
|
+
V(0, h(x)),
|
|
985
|
+
V(1, h($)),
|
|
986
|
+
V(2, h(U))
|
|
970
987
|
], J);
|
|
971
|
-
var
|
|
972
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
973
|
-
(
|
|
974
|
-
return s && r &&
|
|
975
|
-
},
|
|
988
|
+
var vi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, wi = (t, e, i, s) => {
|
|
989
|
+
for (var r = s > 1 ? void 0 : s ? gi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
990
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
991
|
+
return s && r && vi(e, i, r), r;
|
|
992
|
+
}, $e = (t, e) => (i, s) => e(i, s, t);
|
|
976
993
|
let k = class {
|
|
977
994
|
constructor(t, e) {
|
|
995
|
+
a(this, "_subscriptions", []);
|
|
978
996
|
this._controller = t, this._service = e;
|
|
979
997
|
}
|
|
980
|
-
init(t) {
|
|
981
|
-
this.
|
|
982
|
-
|
|
983
|
-
|
|
998
|
+
init({ canvas: t }) {
|
|
999
|
+
this._subscriptions.push(
|
|
1000
|
+
this._controller.step$.subscribe(
|
|
1001
|
+
this._service.render.bind(this._service)
|
|
1002
|
+
),
|
|
1003
|
+
this._controller.resize$.subscribe(
|
|
1004
|
+
this._service.handleAutoResize.bind(this._service)
|
|
1005
|
+
)
|
|
1006
|
+
), this._service.init(t);
|
|
984
1007
|
}
|
|
985
1008
|
enabled(t) {
|
|
986
1009
|
return typeof t == "boolean" && (this._service.enabled = t), this._service.enabled;
|
|
987
1010
|
}
|
|
1011
|
+
enabledAutoResize(t) {
|
|
1012
|
+
return typeof t == "boolean" && (this._service.enabledAutoResize = t), this._service.enabledAutoResize;
|
|
1013
|
+
}
|
|
988
1014
|
instance() {
|
|
989
1015
|
return this._service.instance;
|
|
990
1016
|
}
|
|
991
|
-
setSize(t) {
|
|
992
|
-
return this._service.setSize(t.x, t.y);
|
|
993
|
-
}
|
|
994
1017
|
render() {
|
|
995
1018
|
return this._service.render();
|
|
996
1019
|
}
|
|
997
1020
|
dispose() {
|
|
998
1021
|
var t;
|
|
999
|
-
(t = this._service.instance) == null || t.dispose(), this._service.instance = void 0;
|
|
1022
|
+
this._subscriptions.forEach((e) => e.unsubscribe()), this._subscriptions = [], (t = this._service.instance) == null || t.dispose(), this._service.instance = void 0;
|
|
1000
1023
|
}
|
|
1001
1024
|
};
|
|
1002
|
-
k =
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1025
|
+
k = wi([
|
|
1026
|
+
_(d.ContainerScoped),
|
|
1027
|
+
$e(0, h(J)),
|
|
1028
|
+
$e(1, h(x))
|
|
1006
1029
|
], k);
|
|
1007
|
-
var
|
|
1008
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1009
|
-
(
|
|
1010
|
-
return s && r &&
|
|
1011
|
-
},
|
|
1030
|
+
var Pi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Ci = (t, e, i, s) => {
|
|
1031
|
+
for (var r = s > 1 ? void 0 : s ? yi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1032
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1033
|
+
return s && r && Pi(e, i, r), r;
|
|
1034
|
+
}, Re = (t, e) => (i, s) => e(i, s, t);
|
|
1012
1035
|
let ee = class {
|
|
1013
1036
|
constructor(t, e) {
|
|
1037
|
+
a(this, "_subscriptions", []);
|
|
1014
1038
|
this._controller = t, this._service = e;
|
|
1015
1039
|
}
|
|
1016
|
-
init(
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1040
|
+
init({
|
|
1041
|
+
canvas: t,
|
|
1042
|
+
pixelRatio: e,
|
|
1043
|
+
fullScreen: i,
|
|
1044
|
+
hasCanvasWrapper: s
|
|
1045
|
+
}) {
|
|
1046
|
+
this._subscriptions.push(
|
|
1047
|
+
this._controller.resize$.subscribe(
|
|
1048
|
+
this._service.handleResize.bind(this._service)
|
|
1049
|
+
)
|
|
1050
|
+
), this._service.init(t, e, i, s);
|
|
1020
1051
|
}
|
|
1021
1052
|
dispose() {
|
|
1022
|
-
|
|
1023
|
-
aspect(t) {
|
|
1024
|
-
return typeof t == "number" && (this._service.aspect = t), this._service.aspect;
|
|
1053
|
+
this._subscriptions.forEach((t) => t.unsubscribe()), this._subscriptions = [];
|
|
1025
1054
|
}
|
|
1026
1055
|
enabled(t) {
|
|
1027
1056
|
return typeof t == "boolean" && (this._service.enabled = t), this._service.enabled;
|
|
@@ -1032,44 +1061,62 @@ let ee = class {
|
|
|
1032
1061
|
height(t) {
|
|
1033
1062
|
return typeof t == "number" && (this._service.height = t), this._service.height;
|
|
1034
1063
|
}
|
|
1064
|
+
width(t) {
|
|
1065
|
+
return typeof t == "number" && (this._service.width = t), this._service.width;
|
|
1066
|
+
}
|
|
1067
|
+
wrapperHeight(t) {
|
|
1068
|
+
return typeof t == "number" && (this._service.wrapperHeight = t), this._service.wrapperHeight;
|
|
1069
|
+
}
|
|
1070
|
+
wrapperWidth(t) {
|
|
1071
|
+
return typeof t == "number" && (this._service.wrapperWidth = t), this._service.wrapperWidth;
|
|
1072
|
+
}
|
|
1073
|
+
windowHeight(t) {
|
|
1074
|
+
return typeof t == "number" && (this._service.windowHeight = t), this._service.windowHeight;
|
|
1075
|
+
}
|
|
1076
|
+
windowWidth(t) {
|
|
1077
|
+
return typeof t == "number" && (this._service.windowWidth = t), this._service.windowWidth;
|
|
1078
|
+
}
|
|
1079
|
+
aspect(t) {
|
|
1080
|
+
return typeof t == "number" && (this._service.aspect = t), this._service.aspect;
|
|
1081
|
+
}
|
|
1035
1082
|
pixelRatio(t) {
|
|
1036
1083
|
return typeof t == "number" && (this._service.pixelRatio = t), this._service.pixelRatio;
|
|
1037
1084
|
}
|
|
1038
|
-
|
|
1039
|
-
return
|
|
1085
|
+
getViewPortSizes() {
|
|
1086
|
+
return this._service.getViewPortSizes();
|
|
1040
1087
|
}
|
|
1041
1088
|
resize$() {
|
|
1042
1089
|
return this._controller.resize$;
|
|
1043
1090
|
}
|
|
1044
1091
|
};
|
|
1045
|
-
ee =
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1092
|
+
ee = Ci([
|
|
1093
|
+
_(d.ContainerScoped),
|
|
1094
|
+
Re(0, h(U)),
|
|
1095
|
+
Re(1, h(C))
|
|
1049
1096
|
], ee);
|
|
1050
|
-
var
|
|
1051
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1052
|
-
(
|
|
1053
|
-
return s && r &&
|
|
1054
|
-
},
|
|
1097
|
+
var Si = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, Di = (t, e, i, s) => {
|
|
1098
|
+
for (var r = s > 1 ? void 0 : s ? Oi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1099
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1100
|
+
return s && r && Si(e, i, r), r;
|
|
1101
|
+
}, Ei = (t, e) => (i, s) => e(i, s, t);
|
|
1055
1102
|
let te = class {
|
|
1056
1103
|
constructor(t) {
|
|
1057
|
-
a(this, "_beforeRender$$", new
|
|
1058
|
-
a(this, "_afterRender$$", new
|
|
1059
|
-
a(this, "beforeRender$", this._beforeRender$$.pipe(
|
|
1060
|
-
a(this, "afterRender$", this._afterRender$$.pipe(
|
|
1104
|
+
a(this, "_beforeRender$$", new I());
|
|
1105
|
+
a(this, "_afterRender$$", new I());
|
|
1106
|
+
a(this, "beforeRender$", this._beforeRender$$.pipe(j()));
|
|
1107
|
+
a(this, "afterRender$", this._afterRender$$.pipe(j()));
|
|
1061
1108
|
this._worldService = t, this._worldService.scene.onBeforeRender = () => this._beforeRender$$.next({}), this._worldService.scene.onAfterRender = () => this._afterRender$$.next({});
|
|
1062
1109
|
}
|
|
1063
1110
|
};
|
|
1064
|
-
te =
|
|
1065
|
-
|
|
1066
|
-
|
|
1111
|
+
te = Di([
|
|
1112
|
+
_(d.ContainerScoped),
|
|
1113
|
+
Ei(0, h(R))
|
|
1067
1114
|
], te);
|
|
1068
|
-
var
|
|
1069
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1070
|
-
(
|
|
1071
|
-
return s && r &&
|
|
1072
|
-
},
|
|
1115
|
+
var $i = Object.defineProperty, Ri = Object.getOwnPropertyDescriptor, Ti = (t, e, i, s) => {
|
|
1116
|
+
for (var r = s > 1 ? void 0 : s ? Ri(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1117
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1118
|
+
return s && r && $i(e, i, r), r;
|
|
1119
|
+
}, Te = (t, e) => (i, s) => e(i, s, t);
|
|
1073
1120
|
let ie = class {
|
|
1074
1121
|
constructor(t, e) {
|
|
1075
1122
|
this._service = t, this._controller = e;
|
|
@@ -1079,7 +1126,7 @@ let ie = class {
|
|
|
1079
1126
|
dispose() {
|
|
1080
1127
|
}
|
|
1081
1128
|
scene(t) {
|
|
1082
|
-
return t instanceof
|
|
1129
|
+
return t instanceof Le && (this._service.scene = t), this._service.scene;
|
|
1083
1130
|
}
|
|
1084
1131
|
enabled(t) {
|
|
1085
1132
|
return typeof t == "boolean" && (this._service.enabled = t), this._service.enabled;
|
|
@@ -1091,16 +1138,16 @@ let ie = class {
|
|
|
1091
1138
|
return this._controller.afterRender$;
|
|
1092
1139
|
}
|
|
1093
1140
|
};
|
|
1094
|
-
ie =
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1141
|
+
ie = Ti([
|
|
1142
|
+
_(d.ContainerScoped),
|
|
1143
|
+
Te(0, h(R)),
|
|
1144
|
+
Te(1, h(te))
|
|
1098
1145
|
], ie);
|
|
1099
|
-
var
|
|
1100
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1101
|
-
(
|
|
1102
|
-
return s && r &&
|
|
1103
|
-
},
|
|
1146
|
+
var Mi = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Ai = (t, e, i, s) => {
|
|
1147
|
+
for (var r = s > 1 ? void 0 : s ? ji(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1148
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1149
|
+
return s && r && Mi(e, i, r), r;
|
|
1150
|
+
}, T = (t, e) => (i, s) => e(i, s, t);
|
|
1104
1151
|
let se = class {
|
|
1105
1152
|
constructor(t, e, i, s, r) {
|
|
1106
1153
|
a(this, "enabled", !1);
|
|
@@ -1109,54 +1156,51 @@ let se = class {
|
|
|
1109
1156
|
a(this, "miniCameraControls");
|
|
1110
1157
|
a(this, "axesHelper");
|
|
1111
1158
|
a(this, "gridHelper");
|
|
1112
|
-
this._appService = t, this.
|
|
1159
|
+
this._appService = t, this._sizes = e, this._rendererService = i, this._cameraService = s, this._worldService = r;
|
|
1113
1160
|
}
|
|
1114
1161
|
_renderMiniCamera() {
|
|
1115
|
-
var
|
|
1116
|
-
!this.enabled || !this.miniCamera
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1162
|
+
var i, s, r, n, o;
|
|
1163
|
+
if (!this.enabled || !this.miniCamera) return;
|
|
1164
|
+
const { width: t, height: e } = this._sizes.getViewPortSizes();
|
|
1165
|
+
(i = this._rendererService.instance) == null || i.setScissorTest(!0), (s = this._rendererService.instance) == null || s.setViewport(
|
|
1166
|
+
t - t / 3,
|
|
1167
|
+
e - e / 3,
|
|
1168
|
+
t / 3,
|
|
1169
|
+
e / 3
|
|
1170
|
+
), (r = this._rendererService.instance) == null || r.setScissor(
|
|
1171
|
+
t - t / 3,
|
|
1172
|
+
e - e / 3,
|
|
1173
|
+
t / 3,
|
|
1174
|
+
e / 3
|
|
1175
|
+
), (n = this._rendererService.instance) == null || n.render(
|
|
1127
1176
|
this._worldService.scene,
|
|
1128
1177
|
this.miniCamera
|
|
1129
|
-
), (
|
|
1178
|
+
), (o = this._rendererService.instance) == null || o.setScissorTest(!1);
|
|
1130
1179
|
}
|
|
1131
1180
|
initMiniCamera() {
|
|
1132
|
-
this.disposeMiniCamera(), this.enabled && (this.miniCamera = new
|
|
1133
|
-
75,
|
|
1134
|
-
this._sizesService.width / this._sizesService.height,
|
|
1135
|
-
0.1,
|
|
1136
|
-
500
|
|
1137
|
-
), this.miniCamera.position.z = 10, this.miniCamera.position.x = -5);
|
|
1181
|
+
this.disposeMiniCamera(), this.enabled && (this.miniCamera = new O(75, this._sizes.aspect, 0.1, 500), this.miniCamera.position.z = 10, this.miniCamera.position.x = -5);
|
|
1138
1182
|
}
|
|
1139
1183
|
initOrbitControl() {
|
|
1140
1184
|
var t;
|
|
1141
|
-
this.cameraControls && ((t = this.cameraControls) == null || t.dispose()), !(!this.enabled || !(this._cameraService.instance instanceof
|
|
1185
|
+
this.cameraControls && ((t = this.cameraControls) == null || t.dispose()), !(!this.enabled || !(this._cameraService.instance instanceof M)) && this._cameraService.instance instanceof M && (this.cameraControls = new Ce(
|
|
1142
1186
|
this._cameraService.instance,
|
|
1143
1187
|
this._appService.proxyReceiver
|
|
1144
1188
|
), this.cameraControls.rotateSpeed = 0.1, this.cameraControls.enableDamping = !0);
|
|
1145
1189
|
}
|
|
1146
1190
|
initMiniCameraOrbitControls() {
|
|
1147
|
-
this.miniCameraControls && this.miniCameraControls.dispose(), !(!this.enabled || !this.miniCamera) && (this.miniCameraControls = new
|
|
1191
|
+
this.miniCameraControls && this.miniCameraControls.dispose(), !(!this.enabled || !this.miniCamera) && (this.miniCameraControls = new Ce(
|
|
1148
1192
|
this.miniCamera,
|
|
1149
1193
|
this._appService.proxyReceiver
|
|
1150
1194
|
), this.miniCameraControls.rotateSpeed = 0.15, this.miniCameraControls.enableDamping = !0);
|
|
1151
1195
|
}
|
|
1152
1196
|
initAxesHelper(t) {
|
|
1153
|
-
this.enabled && (this.axesHelper = new
|
|
1197
|
+
this.enabled && (this.axesHelper = new ct(t), this._worldService.scene.add(this.axesHelper));
|
|
1154
1198
|
}
|
|
1155
1199
|
initGridHelper(t) {
|
|
1156
|
-
this.gridHelper && this._worldService.scene.remove(this.gridHelper), this.enabled && (this.gridHelper = new
|
|
1200
|
+
this.gridHelper && this._worldService.scene.remove(this.gridHelper), this.enabled && (this.gridHelper = new lt(t, t), this._worldService.scene.add(this.gridHelper));
|
|
1157
1201
|
}
|
|
1158
1202
|
disposeMiniCamera() {
|
|
1159
|
-
this.miniCamera instanceof
|
|
1203
|
+
this.miniCamera instanceof M && (this.miniCamera.clearViewOffset(), this.miniCamera.clear(), this.miniCamera = void 0);
|
|
1160
1204
|
}
|
|
1161
1205
|
update() {
|
|
1162
1206
|
var t, e;
|
|
@@ -1167,47 +1211,46 @@ let se = class {
|
|
|
1167
1211
|
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;
|
|
1168
1212
|
}
|
|
1169
1213
|
};
|
|
1170
|
-
se =
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1214
|
+
se = Ai([
|
|
1215
|
+
_(d.ContainerScoped),
|
|
1216
|
+
T(0, h(A)),
|
|
1217
|
+
T(1, h(C)),
|
|
1218
|
+
T(2, h(x)),
|
|
1219
|
+
T(3, h(S)),
|
|
1220
|
+
T(4, h(R))
|
|
1177
1221
|
], se);
|
|
1178
|
-
var
|
|
1179
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1180
|
-
(
|
|
1181
|
-
return s && r &&
|
|
1182
|
-
},
|
|
1222
|
+
var xi = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, Li = (t, e, i, s) => {
|
|
1223
|
+
for (var r = s > 1 ? void 0 : s ? zi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1224
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1225
|
+
return s && r && xi(e, i, r), r;
|
|
1226
|
+
}, Me = (t, e) => (i, s) => e(i, s, t);
|
|
1183
1227
|
let re = class {
|
|
1184
1228
|
constructor(t, e) {
|
|
1185
1229
|
a(this, "step$");
|
|
1186
1230
|
this.timerController = t, this._service = e, this.step$ = this.timerController.step$.pipe(
|
|
1187
|
-
|
|
1231
|
+
P(() => this._service.enabled)
|
|
1188
1232
|
);
|
|
1189
1233
|
}
|
|
1190
1234
|
};
|
|
1191
|
-
re =
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1235
|
+
re = Li([
|
|
1236
|
+
_(d.ContainerScoped),
|
|
1237
|
+
Me(0, h($)),
|
|
1238
|
+
Me(1, h(S))
|
|
1195
1239
|
], re);
|
|
1196
|
-
var
|
|
1197
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1198
|
-
(
|
|
1199
|
-
return s && r &&
|
|
1200
|
-
},
|
|
1201
|
-
let
|
|
1240
|
+
var Hi = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ni = (t, e, i, s) => {
|
|
1241
|
+
for (var r = s > 1 ? void 0 : s ? Ii(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1242
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1243
|
+
return s && r && Hi(e, i, r), r;
|
|
1244
|
+
}, je = (t, e) => (i, s) => e(i, s, t);
|
|
1245
|
+
let ne = class {
|
|
1202
1246
|
constructor(t, e) {
|
|
1203
1247
|
a(this, "_subscriptions", []);
|
|
1204
1248
|
this._service = t, this._controller = e;
|
|
1205
1249
|
}
|
|
1206
1250
|
init(t) {
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
})
|
|
1251
|
+
var e, i, s, r, n;
|
|
1252
|
+
this._service.enabled = !!((e = t.debug) != null && e.enabled), this._service.enabled && ((i = t.debug) != null && i.withMiniCamera && this._service.initMiniCamera(), (s = t.debug) != null && s.enableControls && (this._service.initOrbitControl(), this._service.initMiniCameraOrbitControls()), typeof ((r = t.debug) == null ? void 0 : r.axesSizes) == "number" && this._service.initAxesHelper(t.debug.axesSizes), typeof ((n = t.debug) == null ? void 0 : n.gridSizes) == "number" && this._service.initGridHelper(t.debug.gridSizes), this._subscriptions.push(
|
|
1253
|
+
this._controller.step$.subscribe(this._service.update.bind(this._service))
|
|
1211
1254
|
));
|
|
1212
1255
|
}
|
|
1213
1256
|
enabled(t) {
|
|
@@ -1232,20 +1275,20 @@ let oe = class {
|
|
|
1232
1275
|
return this._controller.step$;
|
|
1233
1276
|
}
|
|
1234
1277
|
dispose() {
|
|
1235
|
-
this._service.dispose(), this._subscriptions.forEach((t) => t.unsubscribe());
|
|
1278
|
+
this._service.dispose(), this._subscriptions.forEach((t) => t.unsubscribe()), this._subscriptions = [];
|
|
1236
1279
|
}
|
|
1237
1280
|
};
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
],
|
|
1243
|
-
var
|
|
1244
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1245
|
-
(
|
|
1246
|
-
return s && r &&
|
|
1281
|
+
ne = Ni([
|
|
1282
|
+
_(d.ContainerScoped),
|
|
1283
|
+
je(0, h(se)),
|
|
1284
|
+
je(1, h(re))
|
|
1285
|
+
], ne);
|
|
1286
|
+
var Wi = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, Yi = (t, e, i, s) => {
|
|
1287
|
+
for (var r = s > 1 ? void 0 : s ? Ui(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1288
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1289
|
+
return s && r && Wi(e, i, r), r;
|
|
1247
1290
|
};
|
|
1248
|
-
let
|
|
1291
|
+
let Y = class {
|
|
1249
1292
|
constructor() {
|
|
1250
1293
|
a(this, "loadedResources", {});
|
|
1251
1294
|
a(this, "toLoadCount", 0);
|
|
@@ -1256,71 +1299,71 @@ let U = class {
|
|
|
1256
1299
|
i && (this.loadedResources[e.name] = i, this.toLoadCount = s, this.loadedCount = r);
|
|
1257
1300
|
}
|
|
1258
1301
|
};
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
],
|
|
1262
|
-
var
|
|
1263
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1264
|
-
(
|
|
1265
|
-
return s && r &&
|
|
1266
|
-
},
|
|
1267
|
-
let
|
|
1302
|
+
Y = Yi([
|
|
1303
|
+
_(d.ResolutionScoped)
|
|
1304
|
+
], Y);
|
|
1305
|
+
var Fi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, Ki = (t, e, i, s) => {
|
|
1306
|
+
for (var r = s > 1 ? void 0 : s ? Zi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1307
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1308
|
+
return s && r && Fi(e, i, r), r;
|
|
1309
|
+
}, Vi = (t, e) => (i, s) => e(i, s, t);
|
|
1310
|
+
let oe = class {
|
|
1268
1311
|
constructor(t) {
|
|
1269
|
-
a(this, "load$",
|
|
1270
|
-
|
|
1312
|
+
a(this, "load$", Xe(self, "message").pipe(
|
|
1313
|
+
P(
|
|
1271
1314
|
(t) => {
|
|
1272
1315
|
var e, i, s;
|
|
1273
|
-
return ((e = t.data) == null ? void 0 : e.token) ===
|
|
1316
|
+
return ((e = t.data) == null ? void 0 : e.token) === qe && !!((s = (i = t.data) == null ? void 0 : i.payload) != null && s.resource);
|
|
1274
1317
|
}
|
|
1275
1318
|
),
|
|
1276
|
-
|
|
1277
|
-
var i, s, r,
|
|
1319
|
+
X((t) => {
|
|
1320
|
+
var i, s, r, n, o;
|
|
1278
1321
|
const { payload: e } = t.data || {};
|
|
1279
1322
|
if (((i = e == null ? void 0 : e.source) == null ? void 0 : i.type) === "gltf") {
|
|
1280
1323
|
const c = e.resource, l = (s = c.animations) == null ? void 0 : s.map(
|
|
1281
|
-
(
|
|
1324
|
+
(w) => pt.parse(w)
|
|
1282
1325
|
), u = (r = c.cameras) == null ? void 0 : r.map(
|
|
1283
|
-
(
|
|
1284
|
-
),
|
|
1285
|
-
(
|
|
1286
|
-
),
|
|
1326
|
+
(w) => be(w)
|
|
1327
|
+
), y = (n = c.scenes) == null ? void 0 : n.map(
|
|
1328
|
+
(w) => be(w)
|
|
1329
|
+
), z = y == null ? void 0 : y[0];
|
|
1287
1330
|
return {
|
|
1288
1331
|
...e,
|
|
1289
|
-
resource: { ...c, animations: l, cameras: u, scene:
|
|
1332
|
+
resource: { ...c, animations: l, cameras: u, scene: z, scenes: y }
|
|
1290
1333
|
};
|
|
1291
1334
|
}
|
|
1292
|
-
return ((
|
|
1335
|
+
return ((o = e == null ? void 0 : e.source) == null ? void 0 : o.type) === "font" ? {
|
|
1293
1336
|
...e,
|
|
1294
|
-
resource: new
|
|
1337
|
+
resource: new Be(e.resource.data)
|
|
1295
1338
|
} : e;
|
|
1296
1339
|
}),
|
|
1297
|
-
|
|
1340
|
+
j()
|
|
1298
1341
|
));
|
|
1299
1342
|
a(this, "loadCompleted$", this.load$.pipe(
|
|
1300
|
-
|
|
1343
|
+
P(
|
|
1301
1344
|
(t) => !!t && t.toLoadCount === t.loadedCount
|
|
1302
1345
|
),
|
|
1303
|
-
|
|
1304
|
-
() =>
|
|
1346
|
+
X(
|
|
1347
|
+
() => Ge(this._service, [
|
|
1305
1348
|
"loadedCount",
|
|
1306
1349
|
"loadedResources",
|
|
1307
1350
|
"toLoadCount"
|
|
1308
1351
|
])
|
|
1309
1352
|
),
|
|
1310
|
-
|
|
1353
|
+
j()
|
|
1311
1354
|
));
|
|
1312
1355
|
this._service = t;
|
|
1313
1356
|
}
|
|
1314
1357
|
};
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
],
|
|
1319
|
-
var
|
|
1320
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1321
|
-
(
|
|
1322
|
-
return s && r &&
|
|
1323
|
-
},
|
|
1358
|
+
oe = Ki([
|
|
1359
|
+
_(d.ContainerScoped),
|
|
1360
|
+
Vi(0, h(Y))
|
|
1361
|
+
], oe);
|
|
1362
|
+
var Xi = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, Bi = (t, e, i, s) => {
|
|
1363
|
+
for (var r = s > 1 ? void 0 : s ? qi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1364
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1365
|
+
return s && r && Xi(e, i, r), r;
|
|
1366
|
+
}, Ae = (t, e) => (i, s) => e(i, s, t);
|
|
1324
1367
|
let ae = class {
|
|
1325
1368
|
constructor(t, e) {
|
|
1326
1369
|
a(this, "_subscriptions", []);
|
|
@@ -1349,22 +1392,22 @@ let ae = class {
|
|
|
1349
1392
|
return this._controller.loadCompleted$;
|
|
1350
1393
|
}
|
|
1351
1394
|
dispose() {
|
|
1352
|
-
this._subscriptions.forEach((t) => t.unsubscribe());
|
|
1395
|
+
this._subscriptions.forEach((t) => t.unsubscribe()), this._subscriptions = [];
|
|
1353
1396
|
}
|
|
1354
1397
|
};
|
|
1355
|
-
ae =
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1398
|
+
ae = Bi([
|
|
1399
|
+
_(d.ContainerScoped),
|
|
1400
|
+
Ae(0, h(oe)),
|
|
1401
|
+
Ae(1, h(Y))
|
|
1359
1402
|
], ae);
|
|
1360
|
-
var
|
|
1361
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1362
|
-
(
|
|
1363
|
-
return s && r &&
|
|
1364
|
-
},
|
|
1365
|
-
let he = class extends
|
|
1366
|
-
constructor(t, e, i, s, r,
|
|
1367
|
-
super(), this._controller = t, this._service = e, this.timer = i, this.sizes = s, this.camera = r, this.world =
|
|
1403
|
+
var Gi = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, Ji = (t, e, i, s) => {
|
|
1404
|
+
for (var r = s > 1 ? void 0 : s ? Qi(e, i) : e, n = t.length - 1, o; n >= 0; n--)
|
|
1405
|
+
(o = t[n]) && (r = (s ? o(e, i, r) : o(r)) || r);
|
|
1406
|
+
return s && r && Gi(e, i, r), r;
|
|
1407
|
+
}, g = (t, e) => (i, s) => e(i, s, t);
|
|
1408
|
+
let he = class extends Qe {
|
|
1409
|
+
constructor(t, e, i, s, r, n, o, c, l) {
|
|
1410
|
+
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();
|
|
1368
1411
|
}
|
|
1369
1412
|
_initProxyEvents() {
|
|
1370
1413
|
ce.forEach((t) => {
|
|
@@ -1399,49 +1442,46 @@ let he = class extends it {
|
|
|
1399
1442
|
return this.world.getAfterRender$();
|
|
1400
1443
|
}
|
|
1401
1444
|
init(t) {
|
|
1402
|
-
this._service.
|
|
1445
|
+
this._service.init(t.canvas), this.sizes.init(t), this.camera.init(), this.world.init(), this.renderer.init(t), this.timer.init(t.startTimer), this.loader.init(), this.debug.init(t);
|
|
1403
1446
|
}
|
|
1404
1447
|
dispose() {
|
|
1405
1448
|
this.sizes.dispose(), this.camera.dispose(), this.world.dispose(), this.renderer.dispose(), this.timer.dispose(), this.loader.dispose(), this.debug.dispose();
|
|
1406
1449
|
}
|
|
1407
1450
|
};
|
|
1408
|
-
he =
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1451
|
+
he = Ji([
|
|
1452
|
+
_(d.ContainerScoped),
|
|
1453
|
+
g(0, h(N)),
|
|
1454
|
+
g(1, h(A)),
|
|
1455
|
+
g(2, h(B)),
|
|
1456
|
+
g(3, h(ee)),
|
|
1457
|
+
g(4, h(Q)),
|
|
1458
|
+
g(5, h(ie)),
|
|
1459
|
+
g(6, h(k)),
|
|
1460
|
+
g(7, h(ae)),
|
|
1461
|
+
g(8, h(ne))
|
|
1419
1462
|
], he);
|
|
1420
|
-
var
|
|
1421
|
-
const
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
const
|
|
1425
|
-
const e =
|
|
1426
|
-
var
|
|
1427
|
-
if (!((
|
|
1463
|
+
var ki = Je();
|
|
1464
|
+
const pe = /* @__PURE__ */ ke(ki), es = pe.expose;
|
|
1465
|
+
pe.registerSerializer;
|
|
1466
|
+
pe.Transfer;
|
|
1467
|
+
const rs = async (t) => {
|
|
1468
|
+
const e = ve.createChildContainer(), i = e.resolve(he), s = { container: e, module: i }, r = {}, n = (c) => {
|
|
1469
|
+
var u, y, z, w, _e;
|
|
1470
|
+
if (!((u = c.data) != null && u.initApp) || !((y = c.data) != null && y.canvas) && !((z = c.data) != null && z.mainThread) || i.getIsInitialized())
|
|
1428
1471
|
return;
|
|
1429
|
-
const l =
|
|
1472
|
+
const l = c.data.canvas || (t == null ? void 0 : t.canvas) || (c.data.mainThread ? (w = self == null ? void 0 : self.document) == null ? void 0 : w.getElementsByTagName(
|
|
1473
|
+
"canvas"
|
|
1474
|
+
)[0] : void 0);
|
|
1430
1475
|
i.init({
|
|
1431
1476
|
...c.data,
|
|
1432
|
-
canvas:
|
|
1433
|
-
|
|
1434
|
-
)[0] : void 0),
|
|
1435
|
-
startTimer: l,
|
|
1436
|
-
withMiniCamera: u,
|
|
1437
|
-
fullScreen: O
|
|
1438
|
-
}), (fe = t == null ? void 0 : t.onReady) == null || fe.call(t, s), self == null || self.removeEventListener("message", o);
|
|
1477
|
+
canvas: l
|
|
1478
|
+
}), (_e = t == null ? void 0 : t.onReady) == null || _e.call(t, s), self == null || self.removeEventListener("message", n);
|
|
1439
1479
|
};
|
|
1440
|
-
e.register(
|
|
1480
|
+
e.register(et, { useValue: e }), ce.forEach((c) => {
|
|
1441
1481
|
var l, u;
|
|
1442
1482
|
r[c] = (u = (l = i[c]) == null ? void 0 : l.bind) == null ? void 0 : u.call(l, i);
|
|
1443
|
-
}), self == null || self.addEventListener("message",
|
|
1444
|
-
const
|
|
1483
|
+
}), self == null || self.addEventListener("message", n);
|
|
1484
|
+
const o = {
|
|
1445
1485
|
...r,
|
|
1446
1486
|
getProxyReceiver: i.getProxyReceiver.bind(i),
|
|
1447
1487
|
getIsInitialized: i.getIsInitialized.bind(i),
|
|
@@ -1451,15 +1491,16 @@ const ls = (t) => {
|
|
|
1451
1491
|
getAfterRender$: i.getAfterRender$.bind(i),
|
|
1452
1492
|
dispose: i.dispose.bind(i)
|
|
1453
1493
|
};
|
|
1454
|
-
|
|
1494
|
+
ve.register("MAIN_THREAD_APP", { useValue: o });
|
|
1455
1495
|
try {
|
|
1456
|
-
|
|
1496
|
+
es(o);
|
|
1457
1497
|
} catch (c) {
|
|
1458
|
-
|
|
1498
|
+
const l = c instanceof Error ? c.message : "Unknown error";
|
|
1499
|
+
console.warn("Unable to expose the App Module.", l);
|
|
1459
1500
|
}
|
|
1460
1501
|
return s;
|
|
1461
1502
|
};
|
|
1462
1503
|
export {
|
|
1463
1504
|
he as AppModule,
|
|
1464
|
-
|
|
1505
|
+
rs as launchApp
|
|
1465
1506
|
};
|