belowjs 1.7.2 → 1.7.4
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/CHANGELOG.md +20 -0
- package/README.md +3 -3
- package/dist/belowjs.css +1 -1
- package/dist/belowjs.js +753 -699
- package/package.json +2 -1
package/dist/belowjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Controls as ir, Vector3 as
|
|
1
|
+
import * as f from "three";
|
|
2
|
+
import { Controls as ir, Vector3 as M, MOUSE as We, TOUCH as Ke, Quaternion as $e, Spherical as qs, Vector2 as k, Ray as is, Plane as Pn, MathUtils as st, TrianglesDrawMode as nr, TriangleFanDrawMode as zs, TriangleStripDrawMode as Gn, Loader as ai, LoaderUtils as mt, FileLoader as xe, MeshPhysicalMaterial as ue, Color as Ee, LinearSRGBColorSpace as le, SRGBColorSpace as Ce, SpotLight as or, PointLight as rr, DirectionalLight as ar, Matrix4 as P, InstancedMesh as li, InstancedBufferAttribute as lr, Object3D as ns, TextureLoader as cr, ImageBitmapLoader as Ar, BufferAttribute as ne, InterleavedBuffer as hr, InterleavedBufferAttribute as Fe, LinearMipmapLinearFilter as os, NearestMipmapLinearFilter as dr, LinearMipmapNearestFilter as ur, NearestMipmapNearestFilter as gr, LinearFilter as Ge, NearestFilter as Un, RepeatWrapping as js, MirroredRepeatWrapping as pr, ClampToEdgeWrapping as fr, PointsMaterial as Nn, Material as gs, LineBasicMaterial as mr, MeshStandardMaterial as ci, DoubleSide as br, MeshBasicMaterial as ke, PropertyBinding as Cr, BufferGeometry as rs, SkinnedMesh as Er, Mesh as as, LineSegments as yr, Line as Ir, LineLoop as Br, Points as Vn, Group as Xe, PerspectiveCamera as wr, OrthographicCamera as On, Skeleton as Sr, AnimationClip as vr, Bone as Mr, InterpolateDiscrete as xr, InterpolateLinear as Hn, Texture as yi, VectorKeyframeTrack as Ii, NumberKeyframeTrack as Bi, QuaternionKeyframeTrack as wi, ColorManagement as Ks, FrontSide as Qr, Interpolant as Tr, Box3 as it, Sphere as Et, CompressedCubeTexture as Rr, CompressedArrayTexture as Dr, CompressedTexture as qn, NoColorSpace as Si, RGBA_BPTC_Format as Ys, RGBA_S3TC_DXT5_Format as Js, RGBA_S3TC_DXT3_Format as vi, RGB_S3TC_DXT1_Format as Mi, RGBA_S3TC_DXT1_Format as Ws, RGBA_ASTC_6x6_Format as xi, RGBA_ASTC_4x4_Format as jt, RGBA_ETC2_EAC_Format as zn, RGB_ETC2_Format as jn, RedFormat as gt, RGFormat as pt, RGBAFormat as Ye, UnsignedByteType as re, HalfFloatType as Je, FloatType as bt, DataTexture as Kn, Data3DTexture as Lr, RGB_PVRTC_4BPPV1_Format as Fr, RGB_ETC1_Format as kr, RGBA_PVRTC_4BPPV1_Format as _r, RGB_BPTC_UNSIGNED_Format as Pr, Euler as Yn, TextureUtils as Gr, LoadingManager as Ur, EventDispatcher as vt, Frustum as Nr, DefaultLoadingManager as ls, Matrix3 as Jn, Float32BufferAttribute as Jt, WebGLRenderer as Vr, WebGLRenderTarget as Qi, ShaderMaterial as Wn, OneFactor as Or, ZeroFactor as Hr, CustomBlending as qr, Box2 as zr, Matrix2 as jr, Vector4 as nt, SphereGeometry as Xn, BoxGeometry as Kr, DynamicDrawUsage as Yr, InstancedBufferGeometry as Jr, InstancedInterleavedBuffer as Xs, WireframeGeometry as Wr, ShaderLib as Kt, UniformsUtils as Zn, UniformsLib as Yt, Line3 as Xr } from "three";
|
|
3
3
|
class yt {
|
|
4
4
|
/**
|
|
5
5
|
* Creates a new EventSystem instance
|
|
@@ -145,11 +145,11 @@ class cs {
|
|
|
145
145
|
}
|
|
146
146
|
class Zr {
|
|
147
147
|
constructor(e = {}) {
|
|
148
|
-
this.config = e, this.scene = new
|
|
148
|
+
this.config = e, this.scene = new f.Scene(), this.init();
|
|
149
149
|
}
|
|
150
150
|
init() {
|
|
151
151
|
let e = "#001122";
|
|
152
|
-
this.config.background && (typeof this.config.background == "object" && this.config.background.value ? e = this.config.background.value : typeof this.config.background == "string" && (e = this.config.background)), this.scene.background = new
|
|
152
|
+
this.config.background && (typeof this.config.background == "object" && this.config.background.value ? e = this.config.background.value : typeof this.config.background == "string" && (e = this.config.background)), this.scene.background = new f.Color(e);
|
|
153
153
|
}
|
|
154
154
|
add(e) {
|
|
155
155
|
this.scene.add(e);
|
|
@@ -164,7 +164,7 @@ class Zr {
|
|
|
164
164
|
this.scene.clear();
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
const Ti = { type: "change" }, Ai = { type: "start" }, $n = { type: "end" }, Mt = new is(), Ri = new Pn(), $r = Math.cos(70 * st.DEG2RAD),
|
|
167
|
+
const Ti = { type: "change" }, Ai = { type: "start" }, $n = { type: "end" }, Mt = new is(), Ri = new Pn(), $r = Math.cos(70 * st.DEG2RAD), V = new M(), W = 2 * Math.PI, _ = {
|
|
168
168
|
NONE: -1,
|
|
169
169
|
ROTATE: 0,
|
|
170
170
|
DOLLY: 1,
|
|
@@ -182,7 +182,7 @@ class ea extends ir {
|
|
|
182
182
|
* @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
|
|
183
183
|
*/
|
|
184
184
|
constructor(e, t = null) {
|
|
185
|
-
super(e, t), this.state = _.NONE, this.target = new
|
|
185
|
+
super(e, t), this.state = _.NONE, this.target = new M(), this.cursor = new M(), 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: We.ROTATE, MIDDLE: We.DOLLY, RIGHT: We.PAN }, this.touches = { ONE: Ke.ROTATE, TWO: Ke.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new M(), this._lastQuaternion = new $e(), this._lastTargetPosition = new M(), this._quat = new $e().setFromUnitVectors(e.up, new M(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new qs(), this._sphericalDelta = new qs(), this._scale = 1, this._panOffset = new M(), this._rotateStart = new k(), this._rotateEnd = new k(), this._rotateDelta = new k(), this._panStart = new k(), this._panEnd = new k(), this._panDelta = new k(), this._dollyStart = new k(), this._dollyEnd = new k(), this._dollyDelta = new k(), this._dollyDirection = new M(), this._mouse = new k(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = sa.bind(this), this._onPointerDown = ta.bind(this), this._onPointerUp = ia.bind(this), this._onContextMenu = Aa.bind(this), this._onMouseWheel = ra.bind(this), this._onKeyDown = aa.bind(this), this._onTouchStart = la.bind(this), this._onTouchMove = ca.bind(this), this._onMouseDown = na.bind(this), this._onMouseMove = oa.bind(this), this._interceptControlDown = ha.bind(this), this._interceptControlUp = da.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
186
186
|
}
|
|
187
187
|
connect(e) {
|
|
188
188
|
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";
|
|
@@ -247,9 +247,9 @@ class ea extends ir {
|
|
|
247
247
|
}
|
|
248
248
|
update(e = null) {
|
|
249
249
|
const t = this.object.position;
|
|
250
|
-
|
|
250
|
+
V.copy(t).sub(this.target), V.applyQuaternion(this._quat), this._spherical.setFromVector3(V), 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);
|
|
251
251
|
let s = this.minAzimuthAngle, i = this.maxAzimuthAngle;
|
|
252
|
-
isFinite(s) && isFinite(i) && (s < -Math.PI ? s +=
|
|
252
|
+
isFinite(s) && isFinite(i) && (s < -Math.PI ? s += W : s > Math.PI && (s -= W), i < -Math.PI ? i += W : i > Math.PI && (i -= W), s <= i ? this._spherical.theta = Math.max(s, Math.min(i, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + i) / 2 ? Math.max(s, this._spherical.theta) : Math.min(i, 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);
|
|
253
253
|
let n = !1;
|
|
254
254
|
if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
|
|
255
255
|
this._spherical.radius = this._clampDistance(this._spherical.radius);
|
|
@@ -257,20 +257,20 @@ class ea extends ir {
|
|
|
257
257
|
const o = this._spherical.radius;
|
|
258
258
|
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), n = o != this._spherical.radius;
|
|
259
259
|
}
|
|
260
|
-
if (
|
|
260
|
+
if (V.setFromSpherical(this._spherical), V.applyQuaternion(this._quatInverse), t.copy(this.target).add(V), 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) {
|
|
261
261
|
let o = null;
|
|
262
262
|
if (this.object.isPerspectiveCamera) {
|
|
263
|
-
const r =
|
|
263
|
+
const r = V.length();
|
|
264
264
|
o = this._clampDistance(r * this._scale);
|
|
265
265
|
const l = r - o;
|
|
266
266
|
this.object.position.addScaledVector(this._dollyDirection, l), this.object.updateMatrixWorld(), n = !!l;
|
|
267
267
|
} else if (this.object.isOrthographicCamera) {
|
|
268
|
-
const r = new
|
|
268
|
+
const r = new M(this._mouse.x, this._mouse.y, 0);
|
|
269
269
|
r.unproject(this.object);
|
|
270
270
|
const l = this.object.zoom;
|
|
271
271
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), n = l !== this.object.zoom;
|
|
272
|
-
const c = new
|
|
273
|
-
c.unproject(this.object), this.object.position.sub(c).add(r), this.object.updateMatrixWorld(), o =
|
|
272
|
+
const c = new M(this._mouse.x, this._mouse.y, 0);
|
|
273
|
+
c.unproject(this.object), this.object.position.sub(c).add(r), this.object.updateMatrixWorld(), o = V.length();
|
|
274
274
|
} else
|
|
275
275
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
276
276
|
o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (Mt.origin.copy(this.object.position), Mt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Mt.direction)) < $r ? this.object.lookAt(this.target) : (Ri.setFromNormalAndCoplanarPoint(this.object.up, this.target), Mt.intersectPlane(Ri, this.target))));
|
|
@@ -281,7 +281,7 @@ class ea extends ir {
|
|
|
281
281
|
return this._scale = 1, this._performCursorZoom = !1, n || this._lastPosition.distanceToSquared(this.object.position) > ps || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > ps || this._lastTargetPosition.distanceToSquared(this.target) > ps ? (this.dispatchEvent(Ti), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
282
282
|
}
|
|
283
283
|
_getAutoRotationAngle(e) {
|
|
284
|
-
return e !== null ?
|
|
284
|
+
return e !== null ? W / 60 * this.autoRotateSpeed * e : W / 60 / 60 * this.autoRotateSpeed;
|
|
285
285
|
}
|
|
286
286
|
_getZoomScale(e) {
|
|
287
287
|
const t = Math.abs(e * 0.01);
|
|
@@ -294,18 +294,18 @@ class ea extends ir {
|
|
|
294
294
|
this._sphericalDelta.phi -= e;
|
|
295
295
|
}
|
|
296
296
|
_panLeft(e, t) {
|
|
297
|
-
|
|
297
|
+
V.setFromMatrixColumn(t, 0), V.multiplyScalar(-e), this._panOffset.add(V);
|
|
298
298
|
}
|
|
299
299
|
_panUp(e, t) {
|
|
300
|
-
this.screenSpacePanning === !0 ?
|
|
300
|
+
this.screenSpacePanning === !0 ? V.setFromMatrixColumn(t, 1) : (V.setFromMatrixColumn(t, 0), V.crossVectors(this.object.up, V)), V.multiplyScalar(e), this._panOffset.add(V);
|
|
301
301
|
}
|
|
302
302
|
// deltaX and deltaY are in pixels; right and down are positive
|
|
303
303
|
_pan(e, t) {
|
|
304
304
|
const s = this.domElement;
|
|
305
305
|
if (this.object.isPerspectiveCamera) {
|
|
306
306
|
const i = this.object.position;
|
|
307
|
-
|
|
308
|
-
let n =
|
|
307
|
+
V.copy(i).sub(this.target);
|
|
308
|
+
let n = V.length();
|
|
309
309
|
n *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * n / s.clientHeight, this.object.matrix), this._panUp(2 * t * n / s.clientHeight, this.object.matrix);
|
|
310
310
|
} else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / s.clientWidth, this.object.matrix), this._panUp(t * (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);
|
|
311
311
|
}
|
|
@@ -340,7 +340,7 @@ class ea extends ir {
|
|
|
340
340
|
_handleMouseMoveRotate(e) {
|
|
341
341
|
this._rotateEnd.set(e.clientX, e.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
342
342
|
const t = this.domElement;
|
|
343
|
-
this._rotateLeft(
|
|
343
|
+
this._rotateLeft(W * this._rotateDelta.x / t.clientHeight), this._rotateUp(W * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
|
|
344
344
|
}
|
|
345
345
|
_handleMouseMoveDolly(e) {
|
|
346
346
|
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();
|
|
@@ -355,16 +355,16 @@ class ea extends ir {
|
|
|
355
355
|
let t = !1;
|
|
356
356
|
switch (e.code) {
|
|
357
357
|
case this.keys.UP:
|
|
358
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(
|
|
358
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(W * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), t = !0;
|
|
359
359
|
break;
|
|
360
360
|
case this.keys.BOTTOM:
|
|
361
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-
|
|
361
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-W * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), t = !0;
|
|
362
362
|
break;
|
|
363
363
|
case this.keys.LEFT:
|
|
364
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(
|
|
364
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(W * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), t = !0;
|
|
365
365
|
break;
|
|
366
366
|
case this.keys.RIGHT:
|
|
367
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-
|
|
367
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-W * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), t = !0;
|
|
368
368
|
break;
|
|
369
369
|
}
|
|
370
370
|
t && (e.preventDefault(), this.update());
|
|
@@ -404,7 +404,7 @@ class ea extends ir {
|
|
|
404
404
|
}
|
|
405
405
|
this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
406
406
|
const t = this.domElement;
|
|
407
|
-
this._rotateLeft(
|
|
407
|
+
this._rotateLeft(W * this._rotateDelta.x / t.clientHeight), this._rotateUp(W * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
|
|
408
408
|
}
|
|
409
409
|
_handleTouchMovePan(e) {
|
|
410
410
|
if (this._pointers.length === 1)
|
|
@@ -628,7 +628,7 @@ class ua extends yt {
|
|
|
628
628
|
super(), this.config = e, this.camera = null, this.controls = null, this.focusAnimation = null, this.init();
|
|
629
629
|
}
|
|
630
630
|
init() {
|
|
631
|
-
this.camera = new
|
|
631
|
+
this.camera = new f.PerspectiveCamera(
|
|
632
632
|
this.config.fov || 65,
|
|
633
633
|
window.innerWidth / window.innerHeight,
|
|
634
634
|
this.config.near || 0.05,
|
|
@@ -676,7 +676,7 @@ class ua extends yt {
|
|
|
676
676
|
* @since 1.0.0
|
|
677
677
|
*/
|
|
678
678
|
frameObject(e, t) {
|
|
679
|
-
const s = t && t.isVector3 ? t.clone() : new
|
|
679
|
+
const s = t && t.isVector3 ? t.clone() : new f.Vector3(t || 1, t || 1, t || 1), i = Math.max(s.x, 1e-3), n = Math.max(s.y, 1e-3), o = Math.max(s.z, 1e-3), r = f.MathUtils.degToRad(this.camera.fov), l = 2 * Math.atan(Math.tan(r / 2) * this.camera.aspect), c = n * 0.5 / Math.tan(r / 2), A = i * 0.5 / Math.tan(l / 2), d = Math.max(c, A) * 1.2 + o * 0.5, u = new f.Vector3(0.7, 0.5, 0.7).normalize(), g = e.clone().add(u.multiplyScalar(d));
|
|
680
680
|
this.camera.position.copy(g), this.camera.lookAt(e), this.controls && (this.controls.target.copy(e), this.controls.maxDistance = Math.max(this.controls.maxDistance, d * 4), this.controls.minDistance = Math.min(this.controls.minDistance, Math.max(d * 0.02, 0.05)), this.controls.update());
|
|
681
681
|
}
|
|
682
682
|
/**
|
|
@@ -912,12 +912,12 @@ class Ne extends ai {
|
|
|
912
912
|
else if (e instanceof ArrayBuffer)
|
|
913
913
|
if (l.decode(new Uint8Array(e, 0, 4)) === eo) {
|
|
914
914
|
try {
|
|
915
|
-
o[
|
|
915
|
+
o[L.KHR_BINARY_GLTF] = new Fa(e);
|
|
916
916
|
} catch (h) {
|
|
917
917
|
i && i(h);
|
|
918
918
|
return;
|
|
919
919
|
}
|
|
920
|
-
n = JSON.parse(o[
|
|
920
|
+
n = JSON.parse(o[L.KHR_BINARY_GLTF].content);
|
|
921
921
|
} else
|
|
922
922
|
n = JSON.parse(l.decode(e));
|
|
923
923
|
else
|
|
@@ -943,16 +943,16 @@ class Ne extends ai {
|
|
|
943
943
|
for (let A = 0; A < n.extensionsUsed.length; ++A) {
|
|
944
944
|
const h = n.extensionsUsed[A], d = n.extensionsRequired || [];
|
|
945
945
|
switch (h) {
|
|
946
|
-
case
|
|
946
|
+
case L.KHR_MATERIALS_UNLIT:
|
|
947
947
|
o[h] = new ma();
|
|
948
948
|
break;
|
|
949
|
-
case
|
|
949
|
+
case L.KHR_DRACO_MESH_COMPRESSION:
|
|
950
950
|
o[h] = new ka(n, this.dracoLoader);
|
|
951
951
|
break;
|
|
952
|
-
case
|
|
952
|
+
case L.KHR_TEXTURE_TRANSFORM:
|
|
953
953
|
o[h] = new _a();
|
|
954
954
|
break;
|
|
955
|
-
case
|
|
955
|
+
case L.KHR_MESH_QUANTIZATION:
|
|
956
956
|
o[h] = new Pa();
|
|
957
957
|
break;
|
|
958
958
|
default:
|
|
@@ -993,7 +993,7 @@ function pa() {
|
|
|
993
993
|
}
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
|
-
const
|
|
996
|
+
const L = {
|
|
997
997
|
KHR_BINARY_GLTF: "KHR_binary_glTF",
|
|
998
998
|
KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
|
|
999
999
|
KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
|
|
@@ -1019,7 +1019,7 @@ const D = {
|
|
|
1019
1019
|
};
|
|
1020
1020
|
class fa {
|
|
1021
1021
|
constructor(e) {
|
|
1022
|
-
this.parser = e, this.name =
|
|
1022
|
+
this.parser = e, this.name = L.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
|
|
1023
1023
|
}
|
|
1024
1024
|
_markDefs() {
|
|
1025
1025
|
const e = this.parser, t = this.parser.json.nodes || [];
|
|
@@ -1065,7 +1065,7 @@ class fa {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
class ma {
|
|
1067
1067
|
constructor() {
|
|
1068
|
-
this.name =
|
|
1068
|
+
this.name = L.KHR_MATERIALS_UNLIT;
|
|
1069
1069
|
}
|
|
1070
1070
|
getMaterialType() {
|
|
1071
1071
|
return ke;
|
|
@@ -1086,7 +1086,7 @@ class ma {
|
|
|
1086
1086
|
}
|
|
1087
1087
|
class ba {
|
|
1088
1088
|
constructor(e) {
|
|
1089
|
-
this.parser = e, this.name =
|
|
1089
|
+
this.parser = e, this.name = L.KHR_MATERIALS_EMISSIVE_STRENGTH;
|
|
1090
1090
|
}
|
|
1091
1091
|
extendMaterialParams(e, t) {
|
|
1092
1092
|
const i = this.parser.json.materials[e];
|
|
@@ -1098,7 +1098,7 @@ class ba {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
class Ca {
|
|
1100
1100
|
constructor(e) {
|
|
1101
|
-
this.parser = e, this.name =
|
|
1101
|
+
this.parser = e, this.name = L.KHR_MATERIALS_CLEARCOAT;
|
|
1102
1102
|
}
|
|
1103
1103
|
getMaterialType(e) {
|
|
1104
1104
|
const s = this.parser.json.materials[e];
|
|
@@ -1118,7 +1118,7 @@ class Ca {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
class Ea {
|
|
1120
1120
|
constructor(e) {
|
|
1121
|
-
this.parser = e, this.name =
|
|
1121
|
+
this.parser = e, this.name = L.KHR_MATERIALS_DISPERSION;
|
|
1122
1122
|
}
|
|
1123
1123
|
getMaterialType(e) {
|
|
1124
1124
|
const s = this.parser.json.materials[e];
|
|
@@ -1134,7 +1134,7 @@ class Ea {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
class ya {
|
|
1136
1136
|
constructor(e) {
|
|
1137
|
-
this.parser = e, this.name =
|
|
1137
|
+
this.parser = e, this.name = L.KHR_MATERIALS_IRIDESCENCE;
|
|
1138
1138
|
}
|
|
1139
1139
|
getMaterialType(e) {
|
|
1140
1140
|
const s = this.parser.json.materials[e];
|
|
@@ -1150,7 +1150,7 @@ class ya {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
class Ia {
|
|
1152
1152
|
constructor(e) {
|
|
1153
|
-
this.parser = e, this.name =
|
|
1153
|
+
this.parser = e, this.name = L.KHR_MATERIALS_SHEEN;
|
|
1154
1154
|
}
|
|
1155
1155
|
getMaterialType(e) {
|
|
1156
1156
|
const s = this.parser.json.materials[e];
|
|
@@ -1172,7 +1172,7 @@ class Ia {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
class Ba {
|
|
1174
1174
|
constructor(e) {
|
|
1175
|
-
this.parser = e, this.name =
|
|
1175
|
+
this.parser = e, this.name = L.KHR_MATERIALS_TRANSMISSION;
|
|
1176
1176
|
}
|
|
1177
1177
|
getMaterialType(e) {
|
|
1178
1178
|
const s = this.parser.json.materials[e];
|
|
@@ -1188,7 +1188,7 @@ class Ba {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
class wa {
|
|
1190
1190
|
constructor(e) {
|
|
1191
|
-
this.parser = e, this.name =
|
|
1191
|
+
this.parser = e, this.name = L.KHR_MATERIALS_VOLUME;
|
|
1192
1192
|
}
|
|
1193
1193
|
getMaterialType(e) {
|
|
1194
1194
|
const s = this.parser.json.materials[e];
|
|
@@ -1206,7 +1206,7 @@ class wa {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
class Sa {
|
|
1208
1208
|
constructor(e) {
|
|
1209
|
-
this.parser = e, this.name =
|
|
1209
|
+
this.parser = e, this.name = L.KHR_MATERIALS_IOR;
|
|
1210
1210
|
}
|
|
1211
1211
|
getMaterialType(e) {
|
|
1212
1212
|
const s = this.parser.json.materials[e];
|
|
@@ -1222,7 +1222,7 @@ class Sa {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
class va {
|
|
1224
1224
|
constructor(e) {
|
|
1225
|
-
this.parser = e, this.name =
|
|
1225
|
+
this.parser = e, this.name = L.KHR_MATERIALS_SPECULAR;
|
|
1226
1226
|
}
|
|
1227
1227
|
getMaterialType(e) {
|
|
1228
1228
|
const s = this.parser.json.materials[e];
|
|
@@ -1240,7 +1240,7 @@ class va {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
class Ma {
|
|
1242
1242
|
constructor(e) {
|
|
1243
|
-
this.parser = e, this.name =
|
|
1243
|
+
this.parser = e, this.name = L.EXT_MATERIALS_BUMP;
|
|
1244
1244
|
}
|
|
1245
1245
|
getMaterialType(e) {
|
|
1246
1246
|
const s = this.parser.json.materials[e];
|
|
@@ -1256,7 +1256,7 @@ class Ma {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
class xa {
|
|
1258
1258
|
constructor(e) {
|
|
1259
|
-
this.parser = e, this.name =
|
|
1259
|
+
this.parser = e, this.name = L.KHR_MATERIALS_ANISOTROPY;
|
|
1260
1260
|
}
|
|
1261
1261
|
getMaterialType(e) {
|
|
1262
1262
|
const s = this.parser.json.materials[e];
|
|
@@ -1272,7 +1272,7 @@ class xa {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
class Qa {
|
|
1274
1274
|
constructor(e) {
|
|
1275
|
-
this.parser = e, this.name =
|
|
1275
|
+
this.parser = e, this.name = L.KHR_TEXTURE_BASISU;
|
|
1276
1276
|
}
|
|
1277
1277
|
loadTexture(e) {
|
|
1278
1278
|
const t = this.parser, s = t.json, i = s.textures[e];
|
|
@@ -1289,7 +1289,7 @@ class Qa {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
class Ta {
|
|
1291
1291
|
constructor(e) {
|
|
1292
|
-
this.parser = e, this.name =
|
|
1292
|
+
this.parser = e, this.name = L.EXT_TEXTURE_WEBP;
|
|
1293
1293
|
}
|
|
1294
1294
|
loadTexture(e) {
|
|
1295
1295
|
const t = this.name, s = this.parser, i = s.json, n = i.textures[e];
|
|
@@ -1306,7 +1306,7 @@ class Ta {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
class Ra {
|
|
1308
1308
|
constructor(e) {
|
|
1309
|
-
this.parser = e, this.name =
|
|
1309
|
+
this.parser = e, this.name = L.EXT_TEXTURE_AVIF;
|
|
1310
1310
|
}
|
|
1311
1311
|
loadTexture(e) {
|
|
1312
1312
|
const t = this.name, s = this.parser, i = s.json, n = i.textures[e];
|
|
@@ -1323,7 +1323,7 @@ class Ra {
|
|
|
1323
1323
|
}
|
|
1324
1324
|
class Da {
|
|
1325
1325
|
constructor(e) {
|
|
1326
|
-
this.name =
|
|
1326
|
+
this.name = L.EXT_MESHOPT_COMPRESSION, this.parser = e;
|
|
1327
1327
|
}
|
|
1328
1328
|
loadBufferView(e) {
|
|
1329
1329
|
const t = this.parser.json, s = t.bufferViews[e];
|
|
@@ -1349,7 +1349,7 @@ class Da {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
class La {
|
|
1351
1351
|
constructor(e) {
|
|
1352
|
-
this.name =
|
|
1352
|
+
this.name = L.EXT_MESH_GPU_INSTANCING, this.parser = e;
|
|
1353
1353
|
}
|
|
1354
1354
|
createNodeMesh(e) {
|
|
1355
1355
|
const t = this.parser.json, s = t.nodes[e];
|
|
@@ -1365,14 +1365,14 @@ class La {
|
|
|
1365
1365
|
return r.length < 1 ? null : (r.push(this.parser.createNodeMesh(e)), Promise.all(r).then((c) => {
|
|
1366
1366
|
const A = c.pop(), h = A.isGroup ? A.children : [A], d = c[0].count, u = [];
|
|
1367
1367
|
for (const g of h) {
|
|
1368
|
-
const p = new P(), b = new
|
|
1369
|
-
for (let
|
|
1370
|
-
l.TRANSLATION && b.fromBufferAttribute(l.TRANSLATION,
|
|
1371
|
-
for (const
|
|
1372
|
-
if (
|
|
1373
|
-
const I = l[
|
|
1368
|
+
const p = new P(), b = new M(), C = new $e(), E = new M(1, 1, 1), y = new li(g.geometry, g.material, d);
|
|
1369
|
+
for (let m = 0; m < d; m++)
|
|
1370
|
+
l.TRANSLATION && b.fromBufferAttribute(l.TRANSLATION, m), l.ROTATION && C.fromBufferAttribute(l.ROTATION, m), l.SCALE && E.fromBufferAttribute(l.SCALE, m), y.setMatrixAt(m, p.compose(b, C, E));
|
|
1371
|
+
for (const m in l)
|
|
1372
|
+
if (m === "_COLOR_0") {
|
|
1373
|
+
const I = l[m];
|
|
1374
1374
|
y.instanceColor = new lr(I.array, I.itemSize, I.normalized);
|
|
1375
|
-
} else
|
|
1375
|
+
} else m !== "TRANSLATION" && m !== "ROTATION" && m !== "SCALE" && g.geometry.setAttribute(m, l[m]);
|
|
1376
1376
|
ns.prototype.copy.call(y, g), this.parser.assignFinalMaterial(y), u.push(y);
|
|
1377
1377
|
}
|
|
1378
1378
|
return A.isGroup ? (A.clear(), A.add(...u), A) : u[0];
|
|
@@ -1382,7 +1382,7 @@ class La {
|
|
|
1382
1382
|
const eo = "glTF", rt = 12, Li = { JSON: 1313821514, BIN: 5130562 };
|
|
1383
1383
|
class Fa {
|
|
1384
1384
|
constructor(e) {
|
|
1385
|
-
this.name =
|
|
1385
|
+
this.name = L.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
1386
1386
|
const t = new DataView(e, 0, rt), s = new TextDecoder();
|
|
1387
1387
|
if (this.header = {
|
|
1388
1388
|
magic: s.decode(new Uint8Array(e.slice(0, 4))),
|
|
@@ -1415,7 +1415,7 @@ class ka {
|
|
|
1415
1415
|
constructor(e, t) {
|
|
1416
1416
|
if (!t)
|
|
1417
1417
|
throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
|
|
1418
|
-
this.name =
|
|
1418
|
+
this.name = L.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = t, this.dracoLoader.preload();
|
|
1419
1419
|
}
|
|
1420
1420
|
decodePrimitive(e, t) {
|
|
1421
1421
|
const s = this.json, i = this.dracoLoader, n = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, r = {}, l = {}, c = {};
|
|
@@ -1445,7 +1445,7 @@ class ka {
|
|
|
1445
1445
|
}
|
|
1446
1446
|
class _a {
|
|
1447
1447
|
constructor() {
|
|
1448
|
-
this.name =
|
|
1448
|
+
this.name = L.KHR_TEXTURE_TRANSFORM;
|
|
1449
1449
|
}
|
|
1450
1450
|
extendTexture(e, t) {
|
|
1451
1451
|
return (t.texCoord === void 0 || t.texCoord === e.channel) && t.offset === void 0 && t.rotation === void 0 && t.scale === void 0 || (e = e.clone(), t.texCoord !== void 0 && (e.channel = t.texCoord), t.offset !== void 0 && e.offset.fromArray(t.offset), t.rotation !== void 0 && (e.rotation = t.rotation), t.scale !== void 0 && e.repeat.fromArray(t.scale), e.needsUpdate = !0), e;
|
|
@@ -1453,7 +1453,7 @@ class _a {
|
|
|
1453
1453
|
}
|
|
1454
1454
|
class Pa {
|
|
1455
1455
|
constructor() {
|
|
1456
|
-
this.name =
|
|
1456
|
+
this.name = L.KHR_MESH_QUANTIZATION;
|
|
1457
1457
|
}
|
|
1458
1458
|
}
|
|
1459
1459
|
class to extends Tr {
|
|
@@ -1467,10 +1467,10 @@ class to extends Tr {
|
|
|
1467
1467
|
return t;
|
|
1468
1468
|
}
|
|
1469
1469
|
interpolate_(e, t, s, i) {
|
|
1470
|
-
const n = this.resultBuffer, o = this.sampleValues, r = this.valueSize, l = r * 2, c = r * 3, A = i - t, h = (s - t) / A, d = h * h, u = d * h, g = e * c, p = g - c, b = -2 * u + 3 * d,
|
|
1471
|
-
for (let
|
|
1472
|
-
const I = o[p +
|
|
1473
|
-
n[
|
|
1470
|
+
const n = this.resultBuffer, o = this.sampleValues, r = this.valueSize, l = r * 2, c = r * 3, A = i - t, h = (s - t) / A, d = h * h, u = d * h, g = e * c, p = g - c, b = -2 * u + 3 * d, C = u - d, E = 1 - b, y = C - d + h;
|
|
1471
|
+
for (let m = 0; m !== r; m++) {
|
|
1472
|
+
const I = o[p + m + r], w = o[p + m + l] * A, B = o[g + m + r], x = o[g + m] * A;
|
|
1473
|
+
n[m] = E * I + y * w + b * B + C * x;
|
|
1474
1474
|
}
|
|
1475
1475
|
return n;
|
|
1476
1476
|
}
|
|
@@ -1609,7 +1609,7 @@ function Ha(a, e) {
|
|
|
1609
1609
|
}
|
|
1610
1610
|
function qa(a) {
|
|
1611
1611
|
let e;
|
|
1612
|
-
const t = a.extensions && a.extensions[
|
|
1612
|
+
const t = a.extensions && a.extensions[L.KHR_DRACO_MESH_COMPRESSION];
|
|
1613
1613
|
if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + bs(t.attributes) : e = a.indices + ":" + bs(a.attributes) + ":" + a.mode, a.targets !== void 0)
|
|
1614
1614
|
for (let s = 0, i = a.targets.length; s < i; s++)
|
|
1615
1615
|
e += ":" + bs(a.targets[s]);
|
|
@@ -1858,7 +1858,7 @@ class Ka {
|
|
|
1858
1858
|
if (t.type && t.type !== "arraybuffer")
|
|
1859
1859
|
throw new Error("THREE.GLTFLoader: " + t.type + " buffer type is not supported.");
|
|
1860
1860
|
if (t.uri === void 0 && e === 0)
|
|
1861
|
-
return Promise.resolve(this.extensions[
|
|
1861
|
+
return Promise.resolve(this.extensions[L.KHR_BINARY_GLTF].body);
|
|
1862
1862
|
const i = this.options;
|
|
1863
1863
|
return new Promise(function(n, o) {
|
|
1864
1864
|
s.load(mt.resolveURL(t.uri, i.path), n, void 0, function() {
|
|
@@ -1898,17 +1898,17 @@ class Ka {
|
|
|
1898
1898
|
const r = o[0], l = fs[i.type], c = Ze[i.componentType], A = c.BYTES_PER_ELEMENT, h = A * l, d = i.byteOffset || 0, u = i.bufferView !== void 0 ? s.bufferViews[i.bufferView].byteStride : void 0, g = i.normalized === !0;
|
|
1899
1899
|
let p, b;
|
|
1900
1900
|
if (u && u !== h) {
|
|
1901
|
-
const
|
|
1902
|
-
let y = t.cache.get(
|
|
1903
|
-
y || (p = new c(r,
|
|
1901
|
+
const C = Math.floor(d / u), E = "InterleavedBuffer:" + i.bufferView + ":" + i.componentType + ":" + C + ":" + i.count;
|
|
1902
|
+
let y = t.cache.get(E);
|
|
1903
|
+
y || (p = new c(r, C * u, i.count * u / A), y = new hr(p, u / A), t.cache.add(E, y)), b = new Fe(y, l, d % u / A, g);
|
|
1904
1904
|
} else
|
|
1905
1905
|
r === null ? p = new c(i.count * l) : p = new c(r, d, i.count * l), b = new ne(p, l, g);
|
|
1906
1906
|
if (i.sparse !== void 0) {
|
|
1907
|
-
const
|
|
1907
|
+
const C = fs.SCALAR, E = Ze[i.sparse.indices.componentType], y = i.sparse.indices.byteOffset || 0, m = i.sparse.values.byteOffset || 0, I = new E(o[1], y, i.sparse.count * C), w = new c(o[2], m, i.sparse.count * l);
|
|
1908
1908
|
r !== null && (b = new ne(b.array.slice(), b.itemSize, b.normalized)), b.normalized = !1;
|
|
1909
|
-
for (let B = 0,
|
|
1910
|
-
const
|
|
1911
|
-
if (b.setX(
|
|
1909
|
+
for (let B = 0, x = I.length; B < x; B++) {
|
|
1910
|
+
const v = I[B];
|
|
1911
|
+
if (b.setX(v, w[B * l]), l >= 2 && b.setY(v, w[B * l + 1]), l >= 3 && b.setZ(v, w[B * l + 2]), l >= 4 && b.setW(v, w[B * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
1912
1912
|
}
|
|
1913
1913
|
b.normalized = g;
|
|
1914
1914
|
}
|
|
@@ -1987,11 +1987,11 @@ class Ka {
|
|
|
1987
1987
|
const n = this;
|
|
1988
1988
|
return this.getDependency("texture", s.index).then(function(o) {
|
|
1989
1989
|
if (!o) return null;
|
|
1990
|
-
if (s.texCoord !== void 0 && s.texCoord > 0 && (o = o.clone(), o.channel = s.texCoord), n.extensions[
|
|
1991
|
-
const r = s.extensions !== void 0 ? s.extensions[
|
|
1990
|
+
if (s.texCoord !== void 0 && s.texCoord > 0 && (o = o.clone(), o.channel = s.texCoord), n.extensions[L.KHR_TEXTURE_TRANSFORM]) {
|
|
1991
|
+
const r = s.extensions !== void 0 ? s.extensions[L.KHR_TEXTURE_TRANSFORM] : void 0;
|
|
1992
1992
|
if (r) {
|
|
1993
1993
|
const l = n.associations.get(o);
|
|
1994
|
-
o = n.extensions[
|
|
1994
|
+
o = n.extensions[L.KHR_TEXTURE_TRANSFORM].extendTexture(o, r), n.associations.set(o, l);
|
|
1995
1995
|
}
|
|
1996
1996
|
}
|
|
1997
1997
|
return i !== void 0 && (o.colorSpace = i), e[t] = o, o;
|
|
@@ -2042,8 +2042,8 @@ class Ka {
|
|
|
2042
2042
|
const t = this, s = this.json, i = this.extensions, n = s.materials[e];
|
|
2043
2043
|
let o;
|
|
2044
2044
|
const r = {}, l = n.extensions || {}, c = [];
|
|
2045
|
-
if (l[
|
|
2046
|
-
const h = i[
|
|
2045
|
+
if (l[L.KHR_MATERIALS_UNLIT]) {
|
|
2046
|
+
const h = i[L.KHR_MATERIALS_UNLIT];
|
|
2047
2047
|
o = h.getMaterialType(), c.push(h.extendParams(r, n, t));
|
|
2048
2048
|
} else {
|
|
2049
2049
|
const h = n.pbrMetallicRoughness || {};
|
|
@@ -2095,7 +2095,7 @@ class Ka {
|
|
|
2095
2095
|
loadGeometries(e) {
|
|
2096
2096
|
const t = this, s = this.extensions, i = this.primitiveCache;
|
|
2097
2097
|
function n(r) {
|
|
2098
|
-
return s[
|
|
2098
|
+
return s[L.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(r, t).then(function(l) {
|
|
2099
2099
|
return _i(l, r, t);
|
|
2100
2100
|
});
|
|
2101
2101
|
}
|
|
@@ -2106,7 +2106,7 @@ class Ka {
|
|
|
2106
2106
|
o.push(h.promise);
|
|
2107
2107
|
else {
|
|
2108
2108
|
let d;
|
|
2109
|
-
c.extensions && c.extensions[
|
|
2109
|
+
c.extensions && c.extensions[L.KHR_DRACO_MESH_COMPRESSION] ? d = n(c) : d = _i(new rs(), c, t), i[A] = { primitive: c, promise: d }, o.push(d);
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
return Promise.all(o);
|
|
@@ -2128,21 +2128,21 @@ class Ka {
|
|
|
2128
2128
|
const c = l.slice(0, l.length - 1), A = l[l.length - 1], h = [];
|
|
2129
2129
|
for (let u = 0, g = A.length; u < g; u++) {
|
|
2130
2130
|
const p = A[u], b = o[u];
|
|
2131
|
-
let
|
|
2132
|
-
const
|
|
2131
|
+
let C;
|
|
2132
|
+
const E = c[u];
|
|
2133
2133
|
if (b.mode === ie.TRIANGLES || b.mode === ie.TRIANGLE_STRIP || b.mode === ie.TRIANGLE_FAN || b.mode === void 0)
|
|
2134
|
-
|
|
2134
|
+
C = n.isSkinnedMesh === !0 ? new Er(p, E) : new as(p, E), C.isSkinnedMesh === !0 && C.normalizeSkinWeights(), b.mode === ie.TRIANGLE_STRIP ? C.geometry = Di(C.geometry, Gn) : b.mode === ie.TRIANGLE_FAN && (C.geometry = Di(C.geometry, zs));
|
|
2135
2135
|
else if (b.mode === ie.LINES)
|
|
2136
|
-
|
|
2136
|
+
C = new yr(p, E);
|
|
2137
2137
|
else if (b.mode === ie.LINE_STRIP)
|
|
2138
|
-
|
|
2138
|
+
C = new Ir(p, E);
|
|
2139
2139
|
else if (b.mode === ie.LINE_LOOP)
|
|
2140
|
-
|
|
2140
|
+
C = new Br(p, E);
|
|
2141
2141
|
else if (b.mode === ie.POINTS)
|
|
2142
|
-
|
|
2142
|
+
C = new Vn(p, E);
|
|
2143
2143
|
else
|
|
2144
2144
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + b.mode);
|
|
2145
|
-
Object.keys(
|
|
2145
|
+
Object.keys(C.geometry.morphAttributes).length > 0 && Ha(C, n), C.name = t.createUniqueName(n.name || "mesh_" + e), be(C, n), b.extensions && Re(i, C, b), t.assignFinalMaterial(C), h.push(C);
|
|
2146
2146
|
}
|
|
2147
2147
|
for (let u = 0, g = h.length; u < g; u++)
|
|
2148
2148
|
t.associations.set(h[u], {
|
|
@@ -2209,8 +2209,8 @@ class Ka {
|
|
|
2209
2209
|
loadAnimation(e) {
|
|
2210
2210
|
const t = this.json, s = this, i = t.animations[e], n = i.name ? i.name : "animation_" + e, o = [], r = [], l = [], c = [], A = [];
|
|
2211
2211
|
for (let h = 0, d = i.channels.length; h < d; h++) {
|
|
2212
|
-
const u = i.channels[h], g = i.samplers[u.sampler], p = u.target, b = p.node,
|
|
2213
|
-
p.node !== void 0 && (o.push(this.getDependency("node", b)), r.push(this.getDependency("accessor",
|
|
2212
|
+
const u = i.channels[h], g = i.samplers[u.sampler], p = u.target, b = p.node, C = i.parameters !== void 0 ? i.parameters[g.input] : g.input, E = i.parameters !== void 0 ? i.parameters[g.output] : g.output;
|
|
2213
|
+
p.node !== void 0 && (o.push(this.getDependency("node", b)), r.push(this.getDependency("accessor", C)), l.push(this.getDependency("accessor", E)), c.push(g), A.push(p));
|
|
2214
2214
|
}
|
|
2215
2215
|
return Promise.all([
|
|
2216
2216
|
Promise.all(o),
|
|
@@ -2219,17 +2219,17 @@ class Ka {
|
|
|
2219
2219
|
Promise.all(c),
|
|
2220
2220
|
Promise.all(A)
|
|
2221
2221
|
]).then(function(h) {
|
|
2222
|
-
const d = h[0], u = h[1], g = h[2], p = h[3], b = h[4],
|
|
2223
|
-
for (let
|
|
2224
|
-
const
|
|
2225
|
-
if (
|
|
2226
|
-
|
|
2227
|
-
const
|
|
2228
|
-
if (
|
|
2229
|
-
for (let
|
|
2230
|
-
|
|
2231
|
-
}
|
|
2232
|
-
return new vr(n, void 0,
|
|
2222
|
+
const d = h[0], u = h[1], g = h[2], p = h[3], b = h[4], C = [];
|
|
2223
|
+
for (let E = 0, y = d.length; E < y; E++) {
|
|
2224
|
+
const m = d[E], I = u[E], w = g[E], B = p[E], x = b[E];
|
|
2225
|
+
if (m === void 0) continue;
|
|
2226
|
+
m.updateMatrix && m.updateMatrix();
|
|
2227
|
+
const v = s._createAnimationTracks(m, I, w, B, x);
|
|
2228
|
+
if (v)
|
|
2229
|
+
for (let S = 0; S < v.length; S++)
|
|
2230
|
+
C.push(v[S]);
|
|
2231
|
+
}
|
|
2232
|
+
return new vr(n, void 0, C);
|
|
2233
2233
|
});
|
|
2234
2234
|
}
|
|
2235
2235
|
createNodeMesh(e) {
|
|
@@ -2396,8 +2396,8 @@ function Ya(a, e, t) {
|
|
|
2396
2396
|
const r = t.json.accessors[s.POSITION], l = r.min, c = r.max;
|
|
2397
2397
|
if (l !== void 0 && c !== void 0) {
|
|
2398
2398
|
if (i.set(
|
|
2399
|
-
new
|
|
2400
|
-
new
|
|
2399
|
+
new M(l[0], l[1], l[2]),
|
|
2400
|
+
new M(c[0], c[1], c[2])
|
|
2401
2401
|
), r.normalized) {
|
|
2402
2402
|
const A = $s(Ze[r.componentType]);
|
|
2403
2403
|
i.min.multiplyScalar(A), i.max.multiplyScalar(A);
|
|
@@ -2410,7 +2410,7 @@ function Ya(a, e, t) {
|
|
|
2410
2410
|
return;
|
|
2411
2411
|
const n = e.targets;
|
|
2412
2412
|
if (n !== void 0) {
|
|
2413
|
-
const r = new
|
|
2413
|
+
const r = new M(), l = new M();
|
|
2414
2414
|
for (let c = 0, A = n.length; c < A; c++) {
|
|
2415
2415
|
const h = n[c];
|
|
2416
2416
|
if (h.POSITION !== void 0) {
|
|
@@ -2679,16 +2679,16 @@ function Ja() {
|
|
|
2679
2679
|
throw new Error("THREE.DRACOLoader: Decoding failed: " + u.error_msg());
|
|
2680
2680
|
const p = { index: null, attributes: [] };
|
|
2681
2681
|
for (const b in A) {
|
|
2682
|
-
const
|
|
2683
|
-
let
|
|
2682
|
+
const C = self[h[b]];
|
|
2683
|
+
let E, y;
|
|
2684
2684
|
if (c.useUniqueIDs)
|
|
2685
|
-
y = A[b],
|
|
2685
|
+
y = A[b], E = r.GetAttributeByUniqueId(d, y);
|
|
2686
2686
|
else {
|
|
2687
2687
|
if (y = r.GetAttributeId(d, o[A[b]]), y === -1) continue;
|
|
2688
|
-
|
|
2688
|
+
E = r.GetAttribute(d, y);
|
|
2689
2689
|
}
|
|
2690
|
-
const
|
|
2691
|
-
b === "color" && (
|
|
2690
|
+
const m = i(o, r, d, b, C, E);
|
|
2691
|
+
b === "color" && (m.vertexColorSpace = c.vertexColorSpace), p.attributes.push(m);
|
|
2692
2692
|
}
|
|
2693
2693
|
return g === o.TRIANGULAR_MESH && (p.index = s(o, r, d)), o.destroy(d), p;
|
|
2694
2694
|
}
|
|
@@ -2699,12 +2699,12 @@ function Ja() {
|
|
|
2699
2699
|
return o._free(d), { array: u, itemSize: 1 };
|
|
2700
2700
|
}
|
|
2701
2701
|
function i(o, r, l, c, A, h) {
|
|
2702
|
-
const d = h.num_components(), g = l.num_points() * d, p = g * A.BYTES_PER_ELEMENT, b = n(o, A),
|
|
2703
|
-
r.GetAttributeDataArrayForAllPoints(l, h, b, p,
|
|
2704
|
-
const
|
|
2705
|
-
return o._free(
|
|
2702
|
+
const d = h.num_components(), g = l.num_points() * d, p = g * A.BYTES_PER_ELEMENT, b = n(o, A), C = o._malloc(p);
|
|
2703
|
+
r.GetAttributeDataArrayForAllPoints(l, h, b, p, C);
|
|
2704
|
+
const E = new A(o.HEAPF32.buffer, C, g).slice();
|
|
2705
|
+
return o._free(C), {
|
|
2706
2706
|
name: c,
|
|
2707
|
-
array:
|
|
2707
|
+
array: E,
|
|
2708
2708
|
itemSize: d
|
|
2709
2709
|
};
|
|
2710
2710
|
}
|
|
@@ -2838,39 +2838,39 @@ class at {
|
|
|
2838
2838
|
return i < e && this._offset++, new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + s, i);
|
|
2839
2839
|
}
|
|
2840
2840
|
}
|
|
2841
|
-
const
|
|
2841
|
+
const Y = [171, 75, 84, 88, 32, 50, 48, 187, 13, 10, 26, 10];
|
|
2842
2842
|
function Ui(a) {
|
|
2843
2843
|
return new TextDecoder().decode(a);
|
|
2844
2844
|
}
|
|
2845
2845
|
function fl(a) {
|
|
2846
|
-
const e = new Uint8Array(a.buffer, a.byteOffset,
|
|
2847
|
-
if (e[0] !==
|
|
2848
|
-
const t = new pl(), s = 17 * Uint32Array.BYTES_PER_ELEMENT, i = new at(a,
|
|
2846
|
+
const e = new Uint8Array(a.buffer, a.byteOffset, Y.length);
|
|
2847
|
+
if (e[0] !== Y[0] || e[1] !== Y[1] || e[2] !== Y[2] || e[3] !== Y[3] || e[4] !== Y[4] || e[5] !== Y[5] || e[6] !== Y[6] || e[7] !== Y[7] || e[8] !== Y[8] || e[9] !== Y[9] || e[10] !== Y[10] || e[11] !== Y[11]) throw new Error("Missing KTX 2.0 identifier.");
|
|
2848
|
+
const t = new pl(), s = 17 * Uint32Array.BYTES_PER_ELEMENT, i = new at(a, Y.length, s, !0);
|
|
2849
2849
|
t.vkFormat = i._nextUint32(), t.typeSize = i._nextUint32(), t.pixelWidth = i._nextUint32(), t.pixelHeight = i._nextUint32(), t.pixelDepth = i._nextUint32(), t.layerCount = i._nextUint32(), t.faceCount = i._nextUint32();
|
|
2850
2850
|
const n = i._nextUint32();
|
|
2851
2851
|
t.supercompressionScheme = i._nextUint32();
|
|
2852
|
-
const o = i._nextUint32(), r = i._nextUint32(), l = i._nextUint32(), c = i._nextUint32(), A = i._nextUint64(), h = i._nextUint64(), d = new at(a,
|
|
2852
|
+
const o = i._nextUint32(), r = i._nextUint32(), l = i._nextUint32(), c = i._nextUint32(), A = i._nextUint64(), h = i._nextUint64(), d = new at(a, Y.length + s, 3 * n * 8, !0);
|
|
2853
2853
|
for (let F = 0; F < n; F++) t.levels.push({ levelData: new Uint8Array(a.buffer, a.byteOffset + d._nextUint64(), d._nextUint64()), uncompressedByteLength: d._nextUint64() });
|
|
2854
2854
|
const u = new at(a, o, r, !0), g = { vendorId: u._skip(4)._nextUint16(), descriptorType: u._nextUint16(), versionNumber: u._nextUint16(), descriptorBlockSize: u._nextUint16(), colorModel: u._nextUint8(), colorPrimaries: u._nextUint8(), transferFunction: u._nextUint8(), flags: u._nextUint8(), texelBlockDimension: [u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8()], bytesPlane: [u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8()], samples: [] }, p = (g.descriptorBlockSize / 4 - 6) / 4;
|
|
2855
2855
|
for (let F = 0; F < p; F++) {
|
|
2856
|
-
const
|
|
2857
|
-
64 &
|
|
2856
|
+
const O = { bitOffset: u._nextUint16(), bitLength: u._nextUint8(), channelType: u._nextUint8(), samplePosition: [u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8()], sampleLower: -1 / 0, sampleUpper: 1 / 0 };
|
|
2857
|
+
64 & O.channelType ? (O.sampleLower = u._nextInt32(), O.sampleUpper = u._nextInt32()) : (O.sampleLower = u._nextUint32(), O.sampleUpper = u._nextUint32()), g.samples[F] = O;
|
|
2858
2858
|
}
|
|
2859
2859
|
t.dataFormatDescriptor.length = 0, t.dataFormatDescriptor.push(g);
|
|
2860
2860
|
const b = new at(a, l, c, !0);
|
|
2861
2861
|
for (; b._offset < c; ) {
|
|
2862
|
-
const F = b._nextUint32(),
|
|
2863
|
-
if (t.keyValue[ye] = b._nextUint8Array(F -
|
|
2862
|
+
const F = b._nextUint32(), O = b._scan(F), ye = Ui(O);
|
|
2863
|
+
if (t.keyValue[ye] = b._nextUint8Array(F - O.byteLength - 1), ye.match(/^ktx/i)) {
|
|
2864
2864
|
const ot = Ui(t.keyValue[ye]);
|
|
2865
2865
|
t.keyValue[ye] = ot.substring(0, ot.lastIndexOf("\0"));
|
|
2866
2866
|
}
|
|
2867
2867
|
b._skip(F % 4 ? 4 - F % 4 : 0);
|
|
2868
2868
|
}
|
|
2869
2869
|
if (h <= 0) return t;
|
|
2870
|
-
const
|
|
2871
|
-
for (let F = 0; F < n; F++)
|
|
2872
|
-
const
|
|
2873
|
-
return t.globalData = { endpointCount:
|
|
2870
|
+
const C = new at(a, A, h, !0), E = C._nextUint16(), y = C._nextUint16(), m = C._nextUint32(), I = C._nextUint32(), w = C._nextUint32(), B = C._nextUint32(), x = [];
|
|
2871
|
+
for (let F = 0; F < n; F++) x.push({ imageFlags: C._nextUint32(), rgbSliceByteOffset: C._nextUint32(), rgbSliceByteLength: C._nextUint32(), alphaSliceByteOffset: C._nextUint32(), alphaSliceByteLength: C._nextUint32() });
|
|
2872
|
+
const v = A + C._offset, S = v + m, Q = S + I, D = Q + w, G = new Uint8Array(a.buffer, a.byteOffset + v, m), T = new Uint8Array(a.buffer, a.byteOffset + S, I), K = new Uint8Array(a.buffer, a.byteOffset + Q, w), U = new Uint8Array(a.buffer, a.byteOffset + D, B);
|
|
2873
|
+
return t.globalData = { endpointCount: E, selectorCount: y, imageDescs: x, endpointsData: G, selectorsData: T, tablesData: K, extendedData: U }, t;
|
|
2874
2874
|
}
|
|
2875
2875
|
let Es, me, ei;
|
|
2876
2876
|
const ys = { env: { emscripten_notify_memory_growth: function(a) {
|
|
@@ -2893,7 +2893,7 @@ let ml = class {
|
|
|
2893
2893
|
};
|
|
2894
2894
|
const Ni = "AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACAB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QXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2A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ohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDws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A/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ", bl = "display-p3", Cl = "display-p3-linear", Is = /* @__PURE__ */ new WeakMap();
|
|
2895
2895
|
let Bs = 0, ws;
|
|
2896
|
-
class
|
|
2896
|
+
class te extends ai {
|
|
2897
2897
|
/**
|
|
2898
2898
|
* Constructs a new KTX2 loader.
|
|
2899
2899
|
*
|
|
@@ -2979,12 +2979,12 @@ class ee extends ai {
|
|
|
2979
2979
|
s.setPath(this.transcoderPath), s.setResponseType("arraybuffer"), s.setWithCredentials(this.withCredentials);
|
|
2980
2980
|
const i = s.loadAsync("basis_transcoder.wasm");
|
|
2981
2981
|
this.transcoderPending = Promise.all([t, i]).then(([n, o]) => {
|
|
2982
|
-
const r =
|
|
2982
|
+
const r = te.BasisWorker.toString(), l = [
|
|
2983
2983
|
"/* constants */",
|
|
2984
|
-
"let _EngineFormat = " + JSON.stringify(
|
|
2985
|
-
"let _EngineType = " + JSON.stringify(
|
|
2986
|
-
"let _TranscoderFormat = " + JSON.stringify(
|
|
2987
|
-
"let _BasisFormat = " + JSON.stringify(
|
|
2984
|
+
"let _EngineFormat = " + JSON.stringify(te.EngineFormat),
|
|
2985
|
+
"let _EngineType = " + JSON.stringify(te.EngineType),
|
|
2986
|
+
"let _TranscoderFormat = " + JSON.stringify(te.TranscoderFormat),
|
|
2987
|
+
"let _BasisFormat = " + JSON.stringify(te.BasisFormat),
|
|
2988
2988
|
"/* basis_transcoder.js */",
|
|
2989
2989
|
n,
|
|
2990
2990
|
"/* worker */",
|
|
@@ -3066,12 +3066,12 @@ class ee extends ai {
|
|
|
3066
3066
|
this.workerPool.dispose(), this.workerSourceURL && URL.revokeObjectURL(this.workerSourceURL), Bs--;
|
|
3067
3067
|
}
|
|
3068
3068
|
}
|
|
3069
|
-
|
|
3069
|
+
te.BasisFormat = {
|
|
3070
3070
|
ETC1S: 0,
|
|
3071
3071
|
UASTC: 1,
|
|
3072
3072
|
UASTC_HDR: 2
|
|
3073
3073
|
};
|
|
3074
|
-
|
|
3074
|
+
te.TranscoderFormat = {
|
|
3075
3075
|
ETC1: 0,
|
|
3076
3076
|
ETC2: 1,
|
|
3077
3077
|
BC1: 2,
|
|
@@ -3093,7 +3093,7 @@ ee.TranscoderFormat = {
|
|
|
3093
3093
|
RGB_HALF: 24,
|
|
3094
3094
|
RGBA_HALF: 25
|
|
3095
3095
|
};
|
|
3096
|
-
|
|
3096
|
+
te.EngineFormat = {
|
|
3097
3097
|
RGBAFormat: Ye,
|
|
3098
3098
|
RGBA_ASTC_4x4_Format: jt,
|
|
3099
3099
|
RGB_BPTC_UNSIGNED_Format: Pr,
|
|
@@ -3106,12 +3106,12 @@ ee.EngineFormat = {
|
|
|
3106
3106
|
RGB_PVRTC_4BPPV1_Format: Fr,
|
|
3107
3107
|
RGBA_S3TC_DXT1_Format: Ws
|
|
3108
3108
|
};
|
|
3109
|
-
|
|
3109
|
+
te.EngineType = {
|
|
3110
3110
|
UnsignedByteType: re,
|
|
3111
3111
|
HalfFloatType: Je,
|
|
3112
3112
|
FloatType: bt
|
|
3113
3113
|
};
|
|
3114
|
-
|
|
3114
|
+
te.BasisWorker = function() {
|
|
3115
3115
|
let a, e, t;
|
|
3116
3116
|
const s = _EngineFormat, i = _EngineType, n = _TranscoderFormat, o = _BasisFormat;
|
|
3117
3117
|
self.addEventListener("message", function(g) {
|
|
@@ -3123,8 +3123,8 @@ ee.BasisWorker = function() {
|
|
|
3123
3123
|
case "transcode":
|
|
3124
3124
|
e.then(() => {
|
|
3125
3125
|
try {
|
|
3126
|
-
const { faces: b, buffers:
|
|
3127
|
-
self.postMessage({ type: "transcode", id: p.id, data: { faces: b, width:
|
|
3126
|
+
const { faces: b, buffers: C, width: E, height: y, hasAlpha: m, format: I, type: w, dfdFlags: B } = l(p.buffer);
|
|
3127
|
+
self.postMessage({ type: "transcode", id: p.id, data: { faces: b, width: E, height: y, hasAlpha: m, format: I, type: w, dfdFlags: B } }, C);
|
|
3128
3128
|
} catch (b) {
|
|
3129
3129
|
console.error(b), self.postMessage({ type: "error", id: p.id, error: b.message });
|
|
3130
3130
|
}
|
|
@@ -3146,41 +3146,41 @@ ee.BasisWorker = function() {
|
|
|
3146
3146
|
}
|
|
3147
3147
|
if (!p.isValid())
|
|
3148
3148
|
throw b(), new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");
|
|
3149
|
-
let
|
|
3149
|
+
let C;
|
|
3150
3150
|
if (p.isUASTC())
|
|
3151
|
-
|
|
3151
|
+
C = o.UASTC;
|
|
3152
3152
|
else if (p.isETC1S())
|
|
3153
|
-
|
|
3153
|
+
C = o.ETC1S;
|
|
3154
3154
|
else if (p.isHDR())
|
|
3155
|
-
|
|
3155
|
+
C = o.UASTC_HDR;
|
|
3156
3156
|
else
|
|
3157
3157
|
throw new Error("THREE.KTX2Loader: Unknown Basis encoding");
|
|
3158
|
-
const
|
|
3159
|
-
if (!
|
|
3158
|
+
const E = p.getWidth(), y = p.getHeight(), m = p.getLayers() || 1, I = p.getLevels(), w = p.getFaces(), B = p.getHasAlpha(), x = p.getDFDFlags(), { transcoderFormat: v, engineFormat: S, engineType: Q } = h(C, E, y, B);
|
|
3159
|
+
if (!E || !y || !I)
|
|
3160
3160
|
throw b(), new Error("THREE.KTX2Loader: Invalid texture");
|
|
3161
3161
|
if (!p.startTranscoding())
|
|
3162
3162
|
throw b(), new Error("THREE.KTX2Loader: .startTranscoding failed");
|
|
3163
|
-
const
|
|
3164
|
-
for (let
|
|
3165
|
-
const
|
|
3166
|
-
for (let
|
|
3163
|
+
const D = [], G = [];
|
|
3164
|
+
for (let T = 0; T < w; T++) {
|
|
3165
|
+
const K = [];
|
|
3166
|
+
for (let U = 0; U < I; U++) {
|
|
3167
3167
|
const F = [];
|
|
3168
|
-
let
|
|
3169
|
-
for (let Ve = 0; Ve <
|
|
3170
|
-
const Oe = p.getImageLevelInfo(
|
|
3171
|
-
|
|
3172
|
-
let He = new Uint8Array(p.getImageTranscodedSizeInBytes(
|
|
3173
|
-
const sr = p.transcodeImage(He,
|
|
3174
|
-
if (
|
|
3168
|
+
let O, ye;
|
|
3169
|
+
for (let Ve = 0; Ve < m; Ve++) {
|
|
3170
|
+
const Oe = p.getImageLevelInfo(U, Ve, T);
|
|
3171
|
+
T === 0 && U === 0 && Ve === 0 && (Oe.origWidth % 4 !== 0 || Oe.origHeight % 4 !== 0) && console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."), I > 1 ? (O = Oe.origWidth, ye = Oe.origHeight) : (O = Oe.width, ye = Oe.height);
|
|
3172
|
+
let He = new Uint8Array(p.getImageTranscodedSizeInBytes(U, Ve, 0, v));
|
|
3173
|
+
const sr = p.transcodeImage(He, U, Ve, T, v, 0, -1, -1);
|
|
3174
|
+
if (Q === i.HalfFloatType && (He = new Uint16Array(He.buffer, He.byteOffset, He.byteLength / Uint16Array.BYTES_PER_ELEMENT)), !sr)
|
|
3175
3175
|
throw b(), new Error("THREE.KTX2Loader: .transcodeImage failed.");
|
|
3176
3176
|
F.push(He);
|
|
3177
3177
|
}
|
|
3178
3178
|
const ot = u(F);
|
|
3179
|
-
|
|
3179
|
+
K.push({ data: ot, width: O, height: ye }), G.push(ot.buffer);
|
|
3180
3180
|
}
|
|
3181
|
-
|
|
3181
|
+
D.push({ mipmaps: K, width: E, height: y, format: S, type: Q });
|
|
3182
3182
|
}
|
|
3183
|
-
return b(), { faces:
|
|
3183
|
+
return b(), { faces: D, buffers: G, width: E, height: y, hasAlpha: B, dfdFlags: x, format: S, type: Q };
|
|
3184
3184
|
}
|
|
3185
3185
|
const c = [
|
|
3186
3186
|
{
|
|
@@ -3279,12 +3279,12 @@ ee.BasisWorker = function() {
|
|
|
3279
3279
|
[o.UASTC]: c.filter((g) => g.basisFormat.includes(o.UASTC)).sort((g, p) => g.priorityUASTC - p.priorityUASTC),
|
|
3280
3280
|
[o.UASTC_HDR]: c.filter((g) => g.basisFormat.includes(o.UASTC_HDR)).sort((g, p) => g.priorityHDR - p.priorityHDR)
|
|
3281
3281
|
};
|
|
3282
|
-
function h(g, p, b,
|
|
3283
|
-
const
|
|
3284
|
-
for (let y = 0; y <
|
|
3285
|
-
const
|
|
3286
|
-
if (
|
|
3287
|
-
const I =
|
|
3282
|
+
function h(g, p, b, C) {
|
|
3283
|
+
const E = A[g];
|
|
3284
|
+
for (let y = 0; y < E.length; y++) {
|
|
3285
|
+
const m = E[y];
|
|
3286
|
+
if (m.if && !a[m.if] || !m.basisFormat.includes(g) || C && m.transcoderFormat.length < 2 || m.needsPowerOfTwo && !(d(p) && d(b))) continue;
|
|
3287
|
+
const I = m.transcoderFormat[C ? 1 : 0], w = m.engineFormat[C ? 1 : 0], B = m.engineType[0];
|
|
3288
3288
|
return { transcoderFormat: I, engineFormat: w, engineType: B };
|
|
3289
3289
|
}
|
|
3290
3290
|
throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.");
|
|
@@ -3295,15 +3295,15 @@ ee.BasisWorker = function() {
|
|
|
3295
3295
|
function u(g) {
|
|
3296
3296
|
if (g.length === 1) return g[0];
|
|
3297
3297
|
let p = 0;
|
|
3298
|
-
for (let
|
|
3299
|
-
const y = g[
|
|
3298
|
+
for (let E = 0; E < g.length; E++) {
|
|
3299
|
+
const y = g[E];
|
|
3300
3300
|
p += y.byteLength;
|
|
3301
3301
|
}
|
|
3302
3302
|
const b = new Uint8Array(p);
|
|
3303
|
-
let
|
|
3304
|
-
for (let
|
|
3305
|
-
const y = g[
|
|
3306
|
-
b.set(y,
|
|
3303
|
+
let C = 0;
|
|
3304
|
+
for (let E = 0; E < g.length; E++) {
|
|
3305
|
+
const y = g[E];
|
|
3306
|
+
b.set(y, C), C += y.byteLength;
|
|
3307
3307
|
}
|
|
3308
3308
|
return b;
|
|
3309
3309
|
}
|
|
@@ -3524,24 +3524,24 @@ var Il = function() {
|
|
|
3524
3524
|
return {
|
|
3525
3525
|
supported: !1
|
|
3526
3526
|
};
|
|
3527
|
-
var i = WebAssembly.validate(t) ? r(e) : r(a), n, o = WebAssembly.instantiate(i, {}).then(function(
|
|
3528
|
-
n =
|
|
3527
|
+
var i = WebAssembly.validate(t) ? r(e) : r(a), n, o = WebAssembly.instantiate(i, {}).then(function(C) {
|
|
3528
|
+
n = C.instance, n.exports.__wasm_call_ctors();
|
|
3529
3529
|
});
|
|
3530
|
-
function r(
|
|
3531
|
-
for (var
|
|
3532
|
-
var
|
|
3533
|
-
|
|
3534
|
-
}
|
|
3535
|
-
for (var I = 0, y = 0; y <
|
|
3536
|
-
|
|
3537
|
-
return
|
|
3538
|
-
}
|
|
3539
|
-
function l(
|
|
3540
|
-
var
|
|
3541
|
-
|
|
3542
|
-
var
|
|
3543
|
-
if (
|
|
3544
|
-
throw new Error("Malformed buffer data: " +
|
|
3530
|
+
function r(C) {
|
|
3531
|
+
for (var E = new Uint8Array(C.length), y = 0; y < C.length; ++y) {
|
|
3532
|
+
var m = C.charCodeAt(y);
|
|
3533
|
+
E[y] = m > 96 ? m - 97 : m > 64 ? m - 39 : m + 4;
|
|
3534
|
+
}
|
|
3535
|
+
for (var I = 0, y = 0; y < C.length; ++y)
|
|
3536
|
+
E[I++] = E[y] < 60 ? s[E[y]] : (E[y] - 60) * 64 + E[++y];
|
|
3537
|
+
return E.buffer.slice(0, I);
|
|
3538
|
+
}
|
|
3539
|
+
function l(C, E, y, m, I, w, B) {
|
|
3540
|
+
var x = C.exports.sbrk, v = m + 3 & -4, S = x(v * I), Q = x(w.length), D = new Uint8Array(C.exports.memory.buffer);
|
|
3541
|
+
D.set(w, Q);
|
|
3542
|
+
var G = E(S, m, I, Q, w.length);
|
|
3543
|
+
if (G == 0 && B && B(S, v, I), y.set(D.subarray(S, S + m * I)), x(S - x(0)), G != 0)
|
|
3544
|
+
throw new Error("Malformed buffer data: " + G);
|
|
3545
3545
|
}
|
|
3546
3546
|
var c = {
|
|
3547
3547
|
NONE: "",
|
|
@@ -3553,67 +3553,67 @@ var Il = function() {
|
|
|
3553
3553
|
TRIANGLES: "meshopt_decodeIndexBuffer",
|
|
3554
3554
|
INDICES: "meshopt_decodeIndexSequence"
|
|
3555
3555
|
}, h = [], d = 0;
|
|
3556
|
-
function u(
|
|
3557
|
-
var
|
|
3558
|
-
object: new Worker(
|
|
3556
|
+
function u(C) {
|
|
3557
|
+
var E = {
|
|
3558
|
+
object: new Worker(C),
|
|
3559
3559
|
pending: 0,
|
|
3560
3560
|
requests: {}
|
|
3561
3561
|
};
|
|
3562
|
-
return
|
|
3563
|
-
var
|
|
3564
|
-
|
|
3565
|
-
},
|
|
3566
|
-
}
|
|
3567
|
-
function g(
|
|
3568
|
-
for (var
|
|
3569
|
-
h[I] = u(
|
|
3570
|
-
for (var I =
|
|
3562
|
+
return E.object.onmessage = function(y) {
|
|
3563
|
+
var m = y.data;
|
|
3564
|
+
E.pending -= m.count, E.requests[m.id][m.action](m.value), delete E.requests[m.id];
|
|
3565
|
+
}, E;
|
|
3566
|
+
}
|
|
3567
|
+
function g(C) {
|
|
3568
|
+
for (var E = "self.ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(i) + "]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = " + b.name + ";" + l.toString() + b.toString(), y = new Blob([E], { type: "text/javascript" }), m = URL.createObjectURL(y), I = h.length; I < C; ++I)
|
|
3569
|
+
h[I] = u(m);
|
|
3570
|
+
for (var I = C; I < h.length; ++I)
|
|
3571
3571
|
h[I].object.postMessage({});
|
|
3572
|
-
h.length =
|
|
3572
|
+
h.length = C, URL.revokeObjectURL(m);
|
|
3573
3573
|
}
|
|
3574
|
-
function p(
|
|
3574
|
+
function p(C, E, y, m, I) {
|
|
3575
3575
|
for (var w = h[0], B = 1; B < h.length; ++B)
|
|
3576
3576
|
h[B].pending < w.pending && (w = h[B]);
|
|
3577
|
-
return new Promise(function(
|
|
3578
|
-
var
|
|
3579
|
-
w.pending +=
|
|
3577
|
+
return new Promise(function(x, v) {
|
|
3578
|
+
var S = new Uint8Array(y), Q = ++d;
|
|
3579
|
+
w.pending += C, w.requests[Q] = { resolve: x, reject: v }, w.object.postMessage({ id: Q, count: C, size: E, source: S, mode: m, filter: I }, [S.buffer]);
|
|
3580
3580
|
});
|
|
3581
3581
|
}
|
|
3582
|
-
function b(
|
|
3583
|
-
var
|
|
3584
|
-
if (!
|
|
3582
|
+
function b(C) {
|
|
3583
|
+
var E = C.data;
|
|
3584
|
+
if (!E.id)
|
|
3585
3585
|
return self.close();
|
|
3586
3586
|
self.ready.then(function(y) {
|
|
3587
3587
|
try {
|
|
3588
|
-
var
|
|
3589
|
-
l(y, y.exports[
|
|
3588
|
+
var m = new Uint8Array(E.count * E.size);
|
|
3589
|
+
l(y, y.exports[E.mode], m, E.count, E.size, E.source, y.exports[E.filter]), self.postMessage({ id: E.id, count: E.count, action: "resolve", value: m }, [m.buffer]);
|
|
3590
3590
|
} catch (I) {
|
|
3591
|
-
self.postMessage({ id:
|
|
3591
|
+
self.postMessage({ id: E.id, count: E.count, action: "reject", value: I });
|
|
3592
3592
|
}
|
|
3593
3593
|
});
|
|
3594
3594
|
}
|
|
3595
3595
|
return {
|
|
3596
3596
|
ready: o,
|
|
3597
3597
|
supported: !0,
|
|
3598
|
-
useWorkers: function(
|
|
3599
|
-
g(
|
|
3598
|
+
useWorkers: function(C) {
|
|
3599
|
+
g(C);
|
|
3600
3600
|
},
|
|
3601
|
-
decodeVertexBuffer: function(
|
|
3602
|
-
l(n, n.exports.meshopt_decodeVertexBuffer,
|
|
3601
|
+
decodeVertexBuffer: function(C, E, y, m, I) {
|
|
3602
|
+
l(n, n.exports.meshopt_decodeVertexBuffer, C, E, y, m, n.exports[c[I]]);
|
|
3603
3603
|
},
|
|
3604
|
-
decodeIndexBuffer: function(
|
|
3605
|
-
l(n, n.exports.meshopt_decodeIndexBuffer,
|
|
3604
|
+
decodeIndexBuffer: function(C, E, y, m) {
|
|
3605
|
+
l(n, n.exports.meshopt_decodeIndexBuffer, C, E, y, m);
|
|
3606
3606
|
},
|
|
3607
|
-
decodeIndexSequence: function(
|
|
3608
|
-
l(n, n.exports.meshopt_decodeIndexSequence,
|
|
3607
|
+
decodeIndexSequence: function(C, E, y, m) {
|
|
3608
|
+
l(n, n.exports.meshopt_decodeIndexSequence, C, E, y, m);
|
|
3609
3609
|
},
|
|
3610
|
-
decodeGltfBuffer: function(
|
|
3611
|
-
l(n, n.exports[A[I]],
|
|
3610
|
+
decodeGltfBuffer: function(C, E, y, m, I, w) {
|
|
3611
|
+
l(n, n.exports[A[I]], C, E, y, m, n.exports[c[w]]);
|
|
3612
3612
|
},
|
|
3613
|
-
decodeGltfBufferAsync: function(
|
|
3614
|
-
return h.length > 0 ? p(
|
|
3615
|
-
var w = new Uint8Array(
|
|
3616
|
-
return l(n, n.exports[A[
|
|
3613
|
+
decodeGltfBufferAsync: function(C, E, y, m, I) {
|
|
3614
|
+
return h.length > 0 ? p(C, E, y, A[m], c[I]) : o.then(function() {
|
|
3615
|
+
var w = new Uint8Array(C * E);
|
|
3616
|
+
return l(n, n.exports[A[m]], w, C, E, y, n.exports[c[I]]), w;
|
|
3617
3617
|
});
|
|
3618
3618
|
}
|
|
3619
3619
|
};
|
|
@@ -3633,29 +3633,29 @@ function Ms(a) {
|
|
|
3633
3633
|
});
|
|
3634
3634
|
}
|
|
3635
3635
|
function wl() {
|
|
3636
|
-
|
|
3636
|
+
f.Cache && typeof f.Cache.clear == "function" && f.Cache.clear();
|
|
3637
3637
|
}
|
|
3638
|
-
class
|
|
3638
|
+
class ee {
|
|
3639
3639
|
constructor(e = null) {
|
|
3640
|
-
this.renderer = e, this.isIOSWebKit =
|
|
3640
|
+
this.renderer = e, this.isIOSWebKit = ee.isIOSWebKit(), this.platformKey = ee.getPlatformKey(), this.loader = new Ne(), this.dracoLoader = new so(), this.ktx2Loader = null, this.loadQueue = Promise.resolve(), this.activeIOSLoad = !1, this.dracoLoader.setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.5.6/"), this.isIOSWebKit && typeof this.dracoLoader.setWorkerLimit == "function" && this.dracoLoader.setWorkerLimit(1), this.loader.setDRACOLoader(this.dracoLoader), this.loader.setMeshoptDecoder(Il), this.loader.register((t) => ({
|
|
3641
3641
|
name: "KHR_materials_pbrSpecularGlossiness",
|
|
3642
3642
|
extendMaterialParams: async (s, i) => {
|
|
3643
3643
|
const n = t.json.materials[s];
|
|
3644
3644
|
if (!n.extensions || !n.extensions.KHR_materials_pbrSpecularGlossiness)
|
|
3645
3645
|
return Promise.resolve();
|
|
3646
3646
|
const o = n.extensions.KHR_materials_pbrSpecularGlossiness;
|
|
3647
|
-
return o.diffuseTexture !== void 0 && (i.map = await t.getDependency("texture", o.diffuseTexture.index)), o.diffuseFactor !== void 0 && (i.color = new
|
|
3647
|
+
return o.diffuseTexture !== void 0 && (i.map = await t.getDependency("texture", o.diffuseTexture.index)), o.diffuseFactor !== void 0 && (i.color = new f.Color().fromArray(o.diffuseFactor)), o.glossinessFactor !== void 0 && (i.roughness = 1 - o.glossinessFactor), i.metalness = 0, Promise.resolve();
|
|
3648
3648
|
}
|
|
3649
3649
|
})), this.cache = /* @__PURE__ */ new Map(), this.ktx2SetupComplete = !1, this.setupKTX2Loader();
|
|
3650
3650
|
}
|
|
3651
3651
|
setupKTX2Loader() {
|
|
3652
3652
|
const e = this.platformKey;
|
|
3653
3653
|
try {
|
|
3654
|
-
if (
|
|
3655
|
-
const t = new
|
|
3656
|
-
t.setTranscoderPath("https://cdn.jsdelivr.net/npm/three@0.177.0/examples/jsm/libs/basis/"), this.isIOSWebKit && typeof t.setWorkerLimit == "function" && t.setWorkerLimit(1),
|
|
3654
|
+
if (!ee.sharedKTX2Loaders.has(e)) {
|
|
3655
|
+
const t = new te();
|
|
3656
|
+
t.setTranscoderPath("https://cdn.jsdelivr.net/npm/three@0.177.0/examples/jsm/libs/basis/"), this.isIOSWebKit && typeof t.setWorkerLimit == "function" && t.setWorkerLimit(1), ee.sharedKTX2Loaders.set(e, t), ee.sharedKTX2SetupComplete.set(e, !1);
|
|
3657
3657
|
}
|
|
3658
|
-
this.ktx2Loader =
|
|
3658
|
+
this.ktx2Loader = ee.sharedKTX2Loaders.get(e), this.loader.setKTX2Loader(this.ktx2Loader), this.ktx2SetupComplete = ee.sharedKTX2SetupComplete.get(e) || !1, this.renderer && !this.ktx2SetupComplete && this.ensureKTX2Support();
|
|
3659
3659
|
} catch (t) {
|
|
3660
3660
|
console.warn("KTX2 loader setup failed, falling back to standard textures:", t), this.ktx2Loader = null;
|
|
3661
3661
|
}
|
|
@@ -3664,12 +3664,12 @@ class $ {
|
|
|
3664
3664
|
if (!this.ktx2Loader || !this.renderer)
|
|
3665
3665
|
return;
|
|
3666
3666
|
const e = this.platformKey;
|
|
3667
|
-
if (
|
|
3667
|
+
if (ee.sharedKTX2SetupComplete.get(e)) {
|
|
3668
3668
|
this.ktx2SetupComplete = !0;
|
|
3669
3669
|
return;
|
|
3670
3670
|
}
|
|
3671
3671
|
try {
|
|
3672
|
-
this.ktx2Loader.detectSupport(this.renderer),
|
|
3672
|
+
this.ktx2Loader.detectSupport(this.renderer), ee.sharedKTX2SetupComplete.set(e, !0), this.ktx2SetupComplete = !0;
|
|
3673
3673
|
} catch (t) {
|
|
3674
3674
|
console.warn("Failed to set up KTX2 loader with renderer:", t);
|
|
3675
3675
|
}
|
|
@@ -3730,10 +3730,10 @@ class $ {
|
|
|
3730
3730
|
const o = Array.isArray(n.material) ? n.material : [n.material];
|
|
3731
3731
|
o.forEach((r, l) => {
|
|
3732
3732
|
if (r.emissive && r.emissive.setHex(0), r.emissiveIntensity !== void 0 && (r.emissiveIntensity = 0), r.emissiveMap && (r.emissiveMap = null), r.lightMap && (r.lightMap = null), r.lightMapIntensity !== void 0 && (r.lightMapIntensity = 0), r.type === "MeshBasicMaterial" || r.type === "MeshPhongMaterial") {
|
|
3733
|
-
const A = new
|
|
3733
|
+
const A = new f.MeshStandardMaterial({
|
|
3734
3734
|
// Only include common, safe params; set specialized textures conditionally below
|
|
3735
|
-
color: r.color || new
|
|
3736
|
-
side: r.side !== void 0 ? r.side :
|
|
3735
|
+
color: r.color || new f.Color(16777215),
|
|
3736
|
+
side: r.side !== void 0 ? r.side : f.FrontSide,
|
|
3737
3737
|
wireframe: r.wireframe || !1,
|
|
3738
3738
|
vertexColors: r.vertexColors || !1,
|
|
3739
3739
|
fog: r.fog !== void 0 ? r.fog : !0,
|
|
@@ -3744,18 +3744,18 @@ class $ {
|
|
|
3744
3744
|
metalness: 0.3
|
|
3745
3745
|
// Mix of metal and non-metal
|
|
3746
3746
|
});
|
|
3747
|
-
r.map && (A.map = r.map), r.alphaMap && (A.alphaMap = r.alphaMap), r.aoMap && (A.aoMap = r.aoMap), typeof r.aoMapIntensity == "number" && (A.aoMapIntensity = r.aoMapIntensity), r.envMap && (A.envMap = r.envMap), r.roughnessMap && (A.roughnessMap = r.roughnessMap), r.metalnessMap && (A.metalnessMap = r.metalnessMap), r.transparent !== void 0 && (A.transparent = r.transparent), typeof r.opacity == "number" && (A.opacity = r.opacity), r.normalMap && (A.normalMap = r.normalMap, A.normalScale = r.normalScale || new
|
|
3748
|
-
A[d] && (A[d]
|
|
3747
|
+
r.map && (A.map = r.map), r.alphaMap && (A.alphaMap = r.alphaMap), r.aoMap && (A.aoMap = r.aoMap), typeof r.aoMapIntensity == "number" && (A.aoMapIntensity = r.aoMapIntensity), r.envMap && (A.envMap = r.envMap), r.roughnessMap && (A.roughnessMap = r.roughnessMap), r.metalnessMap && (A.metalnessMap = r.metalnessMap), r.transparent !== void 0 && (A.transparent = r.transparent), typeof r.opacity == "number" && (A.opacity = r.opacity), r.normalMap && (A.normalMap = r.normalMap, A.normalScale = r.normalScale || new f.Vector2(1, 1)), ["map", "normalMap", "roughnessMap", "metalnessMap", "aoMap"].forEach((d) => {
|
|
3748
|
+
A[d] && this.processTexture(A[d], s, { disableMipmaps: d === "map" });
|
|
3749
3749
|
}), A.needsUpdate = !0, Array.isArray(n.material) ? n.material[l] = A : n.material = A, r !== A && typeof r?.dispose == "function" && r.dispose();
|
|
3750
|
-
} else (r.type === "MeshStandardMaterial" || r.type === "MeshPhysicalMaterial") && (
|
|
3751
|
-
r[h] && (r[h]
|
|
3750
|
+
} else (r.type === "MeshStandardMaterial" || r.type === "MeshPhysicalMaterial") && (["map", "normalMap", "roughnessMap", "metalnessMap", "aoMap", "emissiveMap"].forEach((h) => {
|
|
3751
|
+
r[h] && this.processTexture(r[h], s, { disableMipmaps: h === "map" });
|
|
3752
3752
|
}), r.needsUpdate = !0);
|
|
3753
3753
|
const c = Array.isArray(n.material) ? n.material[l] : n.material;
|
|
3754
3754
|
c && c.needsUpdate !== void 0 && (c.needsUpdate = !0);
|
|
3755
|
-
}), n.geometry && (n.geometry.computeVertexNormals(), n.geometry.normalizeNormals(), o.some((l) => l.normalMap) && n.geometry.computeTangents());
|
|
3755
|
+
}), n.geometry && (n.geometry.attributes?.normal || n.geometry.computeVertexNormals(), n.geometry.normalizeNormals(), o.some((l) => l.normalMap) && this.canComputeTangents(n.geometry) && n.geometry.computeTangents());
|
|
3756
3756
|
}
|
|
3757
3757
|
});
|
|
3758
|
-
const i = new
|
|
3758
|
+
const i = new f.Box3().setFromObject(t);
|
|
3759
3759
|
return t.userData.boundingBox = i, t;
|
|
3760
3760
|
}
|
|
3761
3761
|
getMaxAnisotropy() {
|
|
@@ -3767,6 +3767,12 @@ class $ {
|
|
|
3767
3767
|
processMaterial(e) {
|
|
3768
3768
|
e && e.needsUpdate !== void 0 && (e.needsUpdate = !0);
|
|
3769
3769
|
}
|
|
3770
|
+
processTexture(e, t = null, { disableMipmaps: s = !1 } = {}) {
|
|
3771
|
+
e && (t !== null && (e.anisotropy = t), s && !e.isCompressedTexture && Array.isArray(e.mipmaps) && e.mipmaps.length === 0 && (e.generateMipmaps = !1, e.minFilter = f.LinearFilter), e.needsUpdate = !0);
|
|
3772
|
+
}
|
|
3773
|
+
canComputeTangents(e) {
|
|
3774
|
+
return !!(e?.index && e.attributes?.position && e.attributes?.normal && e.attributes?.uv);
|
|
3775
|
+
}
|
|
3770
3776
|
releaseFromCache(e) {
|
|
3771
3777
|
if (!this.cache.has(e))
|
|
3772
3778
|
return;
|
|
@@ -3833,11 +3839,11 @@ class $ {
|
|
|
3833
3839
|
return !!(/iPhone|iPad|iPod/.test(t) || t === "MacIntel" && navigator.maxTouchPoints > 1 || /AppleWebKit/.test(e) && /Mobile/.test(e) && !/Chrome|CriOS|FxiOS/.test(e));
|
|
3834
3840
|
}
|
|
3835
3841
|
static getPlatformKey() {
|
|
3836
|
-
return
|
|
3842
|
+
return ee.isIOSWebKit() ? "ios" : "default";
|
|
3837
3843
|
}
|
|
3838
3844
|
}
|
|
3839
|
-
|
|
3840
|
-
|
|
3845
|
+
ee.sharedKTX2Loaders = /* @__PURE__ */ new Map();
|
|
3846
|
+
ee.sharedKTX2SetupComplete = /* @__PURE__ */ new Map();
|
|
3841
3847
|
let Sl = class {
|
|
3842
3848
|
get unloadPriorityCallback() {
|
|
3843
3849
|
return this._unloadPriorityCallback;
|
|
@@ -3919,36 +3925,36 @@ let Sl = class {
|
|
|
3919
3925
|
minBytesSize: A,
|
|
3920
3926
|
maxBytesSize: h
|
|
3921
3927
|
} = this, d = i.length - o.size, u = i.length - r.size, g = Math.max(Math.min(i.length - t, d), 0), p = this.cachedBytes - A, b = this.unloadPriorityCallback || this.defaultPriorityCallback;
|
|
3922
|
-
let
|
|
3923
|
-
const
|
|
3924
|
-
if (d && this.cachedBytes > A || u && this.cachedBytes > h ||
|
|
3925
|
-
i.sort((
|
|
3926
|
-
const
|
|
3927
|
-
if (
|
|
3928
|
-
const
|
|
3929
|
-
return
|
|
3928
|
+
let C = !1;
|
|
3929
|
+
const E = g > 0 && d > 0 || u && i.length > s;
|
|
3930
|
+
if (d && this.cachedBytes > A || u && this.cachedBytes > h || E) {
|
|
3931
|
+
i.sort((v, S) => {
|
|
3932
|
+
const Q = o.has(v), D = o.has(S);
|
|
3933
|
+
if (Q === D) {
|
|
3934
|
+
const G = r.has(v), T = r.has(S);
|
|
3935
|
+
return G === T ? -b(v, S) : G ? 1 : -1;
|
|
3930
3936
|
} else
|
|
3931
|
-
return
|
|
3937
|
+
return Q ? 1 : -1;
|
|
3932
3938
|
});
|
|
3933
|
-
const y = Math.max(t * e, g * e),
|
|
3934
|
-
let B = 0,
|
|
3935
|
-
for (; this.cachedBytes -
|
|
3936
|
-
const
|
|
3937
|
-
if (o.has(
|
|
3939
|
+
const y = Math.max(t * e, g * e), m = Math.ceil(Math.min(y, d, g)), I = Math.max(e * p, e * A), w = Math.min(I, p);
|
|
3940
|
+
let B = 0, x = 0;
|
|
3941
|
+
for (; this.cachedBytes - x > h || i.length - B > s; ) {
|
|
3942
|
+
const v = i[B], S = c.get(v) || 0;
|
|
3943
|
+
if (o.has(v) && r.has(v) || this.cachedBytes - x - S < h && i.length - B <= s)
|
|
3938
3944
|
break;
|
|
3939
|
-
|
|
3945
|
+
x += S, B++;
|
|
3940
3946
|
}
|
|
3941
|
-
for (;
|
|
3942
|
-
const
|
|
3943
|
-
if (o.has(
|
|
3947
|
+
for (; x < w || B < m; ) {
|
|
3948
|
+
const v = i[B], S = c.get(v) || 0;
|
|
3949
|
+
if (o.has(v) || this.cachedBytes - x - S < A && B >= m)
|
|
3944
3950
|
break;
|
|
3945
|
-
|
|
3951
|
+
x += S, B++;
|
|
3946
3952
|
}
|
|
3947
|
-
i.splice(0, B).forEach((
|
|
3948
|
-
this.cachedBytes -= c.get(
|
|
3949
|
-
}),
|
|
3953
|
+
i.splice(0, B).forEach((v) => {
|
|
3954
|
+
this.cachedBytes -= c.get(v) || 0, l.get(v)(v), c.delete(v), n.delete(v), l.delete(v), r.delete(v), o.delete(v);
|
|
3955
|
+
}), C = B < g || x < p && B < d, C = C && B > 0;
|
|
3950
3956
|
}
|
|
3951
|
-
|
|
3957
|
+
C && (this.unloadingHandle = requestAnimationFrame(() => this.scheduleUnload()));
|
|
3952
3958
|
}
|
|
3953
3959
|
scheduleUnload() {
|
|
3954
3960
|
cancelAnimationFrame(this.unloadingHandle), this.scheduled || (this.scheduled = !0, queueMicrotask(() => {
|
|
@@ -4940,12 +4946,12 @@ let Gl = class extends It {
|
|
|
4940
4946
|
0,
|
|
4941
4947
|
l,
|
|
4942
4948
|
c
|
|
4943
|
-
), b = u + l + c,
|
|
4949
|
+
), b = u + l + c, C = new Uint8Array(e, b, n - b);
|
|
4944
4950
|
return {
|
|
4945
4951
|
version: i,
|
|
4946
4952
|
featureTable: d,
|
|
4947
4953
|
batchTable: p,
|
|
4948
|
-
glbBytes:
|
|
4954
|
+
glbBytes: C
|
|
4949
4955
|
};
|
|
4950
4956
|
}
|
|
4951
4957
|
}, Ul = class extends It {
|
|
@@ -4973,13 +4979,13 @@ let Gl = class extends It {
|
|
|
4973
4979
|
0,
|
|
4974
4980
|
l,
|
|
4975
4981
|
c
|
|
4976
|
-
),
|
|
4977
|
-
let y = null,
|
|
4982
|
+
), C = g + l + c, E = new Uint8Array(e, C, n - C);
|
|
4983
|
+
let y = null, m = null, I = null;
|
|
4978
4984
|
if (A)
|
|
4979
|
-
y =
|
|
4985
|
+
y = E, m = Promise.resolve();
|
|
4980
4986
|
else {
|
|
4981
|
-
const w = this.resolveExternalURL(di(
|
|
4982
|
-
I = ui(w),
|
|
4987
|
+
const w = this.resolveExternalURL(di(E));
|
|
4988
|
+
I = ui(w), m = fetch(w, this.fetchOptions).then((B) => {
|
|
4983
4989
|
if (!B.ok)
|
|
4984
4990
|
throw new Error(`I3DMLoaderBase : Failed to load file "${w}" with status ${B.status} : ${B.statusText}`);
|
|
4985
4991
|
return B.arrayBuffer();
|
|
@@ -4987,7 +4993,7 @@ let Gl = class extends It {
|
|
|
4987
4993
|
y = new Uint8Array(B);
|
|
4988
4994
|
});
|
|
4989
4995
|
}
|
|
4990
|
-
return
|
|
4996
|
+
return m.then(() => ({
|
|
4991
4997
|
version: i,
|
|
4992
4998
|
featureTable: u,
|
|
4993
4999
|
batchTable: b,
|
|
@@ -5058,10 +5064,10 @@ function Ol(a) {
|
|
|
5058
5064
|
function Hl(a) {
|
|
5059
5065
|
return -a + Math.PI / 2;
|
|
5060
5066
|
}
|
|
5061
|
-
const ji = /* @__PURE__ */ new qs(), Se = /* @__PURE__ */ new
|
|
5067
|
+
const ji = /* @__PURE__ */ new qs(), Se = /* @__PURE__ */ new M(), X = /* @__PURE__ */ new M(), Rs = /* @__PURE__ */ new M(), se = /* @__PURE__ */ new P(), ce = /* @__PURE__ */ new P(), Ki = /* @__PURE__ */ new P(), Ds = /* @__PURE__ */ new Et(), Z = /* @__PURE__ */ new Yn(), Yi = /* @__PURE__ */ new M(), Ji = /* @__PURE__ */ new M(), Wi = /* @__PURE__ */ new M(), De = /* @__PURE__ */ new M(), Dt = /* @__PURE__ */ new is(), ql = 1e-12, zl = 0.1, Lt = 0, Xi = 1, Ft = 2;
|
|
5062
5068
|
let Po = class {
|
|
5063
5069
|
constructor(e = 1, t = 1, s = 1) {
|
|
5064
|
-
this.name = "", this.radius = new
|
|
5070
|
+
this.name = "", this.radius = new M(e, t, s);
|
|
5065
5071
|
}
|
|
5066
5072
|
intersectRay(e, t) {
|
|
5067
5073
|
return se.makeScale(...this.radius).invert(), Ds.center.set(0, 0, 0), Ds.radius = 1, Dt.copy(e).applyMatrix4(se), Dt.intersectSphere(Ds, t) ? (se.makeScale(...this.radius), t.applyMatrix4(se), t) : null;
|
|
@@ -5081,10 +5087,10 @@ let Po = class {
|
|
|
5081
5087
|
// OBJECT_FRAME: oriented such that "+Y" is up and "+Z" is forward.
|
|
5082
5088
|
// CAMERA_FRAME: oriented such that "+Y" is up and "-Z" is forward.
|
|
5083
5089
|
getObjectFrame(e, t, s, i, n, o, r, l = Ft) {
|
|
5084
|
-
return this.getEastNorthUpFrame(e, t, s, se),
|
|
5090
|
+
return this.getEastNorthUpFrame(e, t, s, se), Z.set(n, o, -i, "ZXY"), r.makeRotationFromEuler(Z).premultiply(se), l === Xi ? (Z.set(Math.PI / 2, 0, 0, "XYZ"), ce.makeRotationFromEuler(Z), r.multiply(ce)) : l === Ft && (Z.set(-Math.PI / 2, 0, Math.PI, "XYZ"), ce.makeRotationFromEuler(Z), r.multiply(ce)), r;
|
|
5085
5091
|
}
|
|
5086
5092
|
getCartographicFromObjectFrame(e, t, s = Ft) {
|
|
5087
|
-
return s === Xi ? (
|
|
5093
|
+
return s === Xi ? (Z.set(-Math.PI / 2, 0, 0, "XYZ"), ce.makeRotationFromEuler(Z).premultiply(e)) : s === Ft ? (Z.set(-Math.PI / 2, 0, Math.PI, "XYZ"), ce.makeRotationFromEuler(Z).premultiply(e)) : ce.copy(e), De.setFromMatrixPosition(ce), this.getPositionToCartographic(De, t), this.getEastNorthUpFrame(t.lat, t.lon, 0, se).invert(), ce.premultiply(se), Z.setFromRotationMatrix(ce, "ZXY"), t.azimuth = -Z.z, t.elevation = Z.x, t.roll = Z.y, t;
|
|
5088
5094
|
}
|
|
5089
5095
|
getEastNorthUpAxes(e, t, s, i, n, o = De) {
|
|
5090
5096
|
this.getCartographicToPosition(e, t, 0, o), this.getCartographicToNormal(e, t, n), s.set(-o.y, o.x, 0).normalize(), i.crossVectors(n, s).normalize();
|
|
@@ -5104,13 +5110,13 @@ let Po = class {
|
|
|
5104
5110
|
getCartographicToPosition(e, t, s, i) {
|
|
5105
5111
|
this.getCartographicToNormal(e, t, Se);
|
|
5106
5112
|
const n = this.radius;
|
|
5107
|
-
|
|
5108
|
-
const o = Math.sqrt(Se.dot(
|
|
5109
|
-
return
|
|
5113
|
+
X.copy(Se), X.x *= n.x ** 2, X.y *= n.y ** 2, X.z *= n.z ** 2;
|
|
5114
|
+
const o = Math.sqrt(Se.dot(X));
|
|
5115
|
+
return X.divideScalar(o), i.copy(X).addScaledVector(Se, s);
|
|
5110
5116
|
}
|
|
5111
5117
|
getPositionToCartographic(e, t) {
|
|
5112
|
-
this.getPositionToSurfacePoint(e,
|
|
5113
|
-
const s = Rs.subVectors(e,
|
|
5118
|
+
this.getPositionToSurfacePoint(e, X), this.getPositionToNormal(e, Se);
|
|
5119
|
+
const s = Rs.subVectors(e, X);
|
|
5114
5120
|
return t.lon = Math.atan2(Se.y, Se.x), t.lat = Math.asin(Se.z), t.height = Math.sign(s.dot(e)) * s.length(), t;
|
|
5115
5121
|
}
|
|
5116
5122
|
getCartographicToNormal(e, t, s) {
|
|
@@ -5121,7 +5127,7 @@ let Po = class {
|
|
|
5121
5127
|
return t.copy(e), t.x /= s.x ** 2, t.y /= s.y ** 2, t.z /= s.z ** 2, t.normalize(), t;
|
|
5122
5128
|
}
|
|
5123
5129
|
getPositionToSurfacePoint(e, t) {
|
|
5124
|
-
const s = this.radius, i = 1 / s.x ** 2, n = 1 / s.y ** 2, o = 1 / s.z ** 2, r = e.x * e.x * i, l = e.y * e.y * n, c = e.z * e.z * o, A = r + l + c, h = Math.sqrt(1 / A), d =
|
|
5130
|
+
const s = this.radius, i = 1 / s.x ** 2, n = 1 / s.y ** 2, o = 1 / s.z ** 2, r = e.x * e.x * i, l = e.y * e.y * n, c = e.z * e.z * o, A = r + l + c, h = Math.sqrt(1 / A), d = X.copy(e).multiplyScalar(h);
|
|
5125
5131
|
if (A < zl)
|
|
5126
5132
|
return isFinite(h) ? t.copy(d) : null;
|
|
5127
5133
|
const u = Rs.set(
|
|
@@ -5129,16 +5135,16 @@ let Po = class {
|
|
|
5129
5135
|
d.y * n * 2,
|
|
5130
5136
|
d.z * o * 2
|
|
5131
5137
|
);
|
|
5132
|
-
let g = (1 - h) * e.length() / (0.5 * u.length()), p = 0, b,
|
|
5138
|
+
let g = (1 - h) * e.length() / (0.5 * u.length()), p = 0, b, C, E, y, m, I, w, B, x, v, S;
|
|
5133
5139
|
do {
|
|
5134
|
-
g -= p,
|
|
5135
|
-
const
|
|
5136
|
-
p = b /
|
|
5140
|
+
g -= p, E = 1 / (1 + g * i), y = 1 / (1 + g * n), m = 1 / (1 + g * o), I = E * E, w = y * y, B = m * m, x = I * E, v = w * y, S = B * m, b = r * I + l * w + c * B - 1, C = r * x * i + l * v * n + c * S * o;
|
|
5141
|
+
const Q = -2 * C;
|
|
5142
|
+
p = b / Q;
|
|
5137
5143
|
} while (Math.abs(b) > ql);
|
|
5138
5144
|
return t.set(
|
|
5139
|
-
e.x *
|
|
5145
|
+
e.x * E,
|
|
5140
5146
|
e.y * y,
|
|
5141
|
-
e.z *
|
|
5147
|
+
e.z * m
|
|
5142
5148
|
);
|
|
5143
5149
|
}
|
|
5144
5150
|
calculateHorizonDistance(e, t) {
|
|
@@ -5150,14 +5156,14 @@ let Po = class {
|
|
|
5150
5156
|
return t / Math.sqrt(1 - s * n);
|
|
5151
5157
|
}
|
|
5152
5158
|
getPositionElevation(e) {
|
|
5153
|
-
this.getPositionToSurfacePoint(e,
|
|
5154
|
-
const t = Rs.subVectors(e,
|
|
5159
|
+
this.getPositionToSurfacePoint(e, X);
|
|
5160
|
+
const t = Rs.subVectors(e, X);
|
|
5155
5161
|
return Math.sign(t.dot(e)) * t.length();
|
|
5156
5162
|
}
|
|
5157
5163
|
// Returns an estimate of the closest point on the ellipsoid to the ray. Returns
|
|
5158
5164
|
// the surface intersection if they collide.
|
|
5159
5165
|
closestPointToRayEstimate(e, t) {
|
|
5160
|
-
return this.intersectRay(e, t) ? t : (se.makeScale(...this.radius).invert(), Dt.copy(e).applyMatrix4(se),
|
|
5166
|
+
return this.intersectRay(e, t) ? t : (se.makeScale(...this.radius).invert(), Dt.copy(e).applyMatrix4(se), X.set(0, 0, 0), Dt.closestPointToPoint(X, t).normalize(), se.makeScale(...this.radius), t.applyMatrix4(se));
|
|
5161
5167
|
}
|
|
5162
5168
|
copy(e) {
|
|
5163
5169
|
return this.radius.copy(e.radius), this;
|
|
@@ -5168,10 +5174,10 @@ let Po = class {
|
|
|
5168
5174
|
};
|
|
5169
5175
|
const ds = new Po(Oi, Oi, vl);
|
|
5170
5176
|
ds.name = "WGS84 Earth";
|
|
5171
|
-
const kt = /* @__PURE__ */ new
|
|
5177
|
+
const kt = /* @__PURE__ */ new M(), _t = /* @__PURE__ */ new M(), $ = /* @__PURE__ */ new M(), Pt = /* @__PURE__ */ new is();
|
|
5172
5178
|
let Zi = class {
|
|
5173
5179
|
constructor(e = new it(), t = new P()) {
|
|
5174
|
-
this.box = e.clone(), this.transform = t.clone(), this.inverseTransform = new P(), this.points = new Array(8).fill().map(() => new
|
|
5180
|
+
this.box = e.clone(), this.transform = t.clone(), this.inverseTransform = new P(), this.points = new Array(8).fill().map(() => new M()), this.planes = new Array(6).fill().map(() => new Pn());
|
|
5175
5181
|
}
|
|
5176
5182
|
copy(e) {
|
|
5177
5183
|
return this.box.copy(e.box), this.transform.copy(e.transform), this.update(), this;
|
|
@@ -5195,10 +5201,10 @@ let Zi = class {
|
|
|
5195
5201
|
* @returns {number}
|
|
5196
5202
|
*/
|
|
5197
5203
|
distanceToPoint(e) {
|
|
5198
|
-
return this.clampPoint(e,
|
|
5204
|
+
return this.clampPoint(e, $).distanceTo(e);
|
|
5199
5205
|
}
|
|
5200
5206
|
containsPoint(e) {
|
|
5201
|
-
return
|
|
5207
|
+
return $.copy(e).applyMatrix4(this.inverseTransform), this.box.containsPoint($);
|
|
5202
5208
|
}
|
|
5203
5209
|
// returns boolean indicating whether the ray has intersected the obb
|
|
5204
5210
|
intersectsRay(e) {
|
|
@@ -5225,10 +5231,10 @@ let Zi = class {
|
|
|
5225
5231
|
this.updatePlanes();
|
|
5226
5232
|
}
|
|
5227
5233
|
updatePlanes() {
|
|
5228
|
-
kt.copy(this.box.min).applyMatrix4(this.transform), _t.copy(this.box.max).applyMatrix4(this.transform),
|
|
5234
|
+
kt.copy(this.box.min).applyMatrix4(this.transform), _t.copy(this.box.max).applyMatrix4(this.transform), $.set(0, 0, 1).transformDirection(this.transform), this.planes[0].setFromNormalAndCoplanarPoint($, kt), this.planes[1].setFromNormalAndCoplanarPoint($, _t).negate(), $.set(0, 1, 0).transformDirection(this.transform), this.planes[2].setFromNormalAndCoplanarPoint($, kt), this.planes[3].setFromNormalAndCoplanarPoint($, _t).negate(), $.set(1, 0, 0).transformDirection(this.transform), this.planes[4].setFromNormalAndCoplanarPoint($, kt), this.planes[5].setFromNormalAndCoplanarPoint($, _t).negate();
|
|
5229
5235
|
}
|
|
5230
5236
|
intersectsSphere(e) {
|
|
5231
|
-
return this.clampPoint(e.center,
|
|
5237
|
+
return this.clampPoint(e.center, $), $.distanceToSquared(e.center) <= e.radius * e.radius;
|
|
5232
5238
|
}
|
|
5233
5239
|
intersectsFrustum(e) {
|
|
5234
5240
|
return this._intersectsPlaneShape(e.planes, e.points);
|
|
@@ -5263,7 +5269,7 @@ let Zi = class {
|
|
|
5263
5269
|
return !0;
|
|
5264
5270
|
}
|
|
5265
5271
|
};
|
|
5266
|
-
const Ls = 1e-13, ft = Math.PI, Fs = ft / 2, lt = /* @__PURE__ */ new
|
|
5272
|
+
const Ls = 1e-13, ft = Math.PI, Fs = ft / 2, lt = /* @__PURE__ */ new M(), Le = /* @__PURE__ */ new M(), oe = /* @__PURE__ */ new M(), R = /* @__PURE__ */ new M(), J = /* @__PURE__ */ new P(), jl = /* @__PURE__ */ new it(), $i = /* @__PURE__ */ new P();
|
|
5267
5273
|
function ve(a, e) {
|
|
5268
5274
|
e.radius = Math.max(e.radius, a.distanceToSquared(e.center));
|
|
5269
5275
|
}
|
|
@@ -5287,7 +5293,7 @@ let Kl = class extends Po {
|
|
|
5287
5293
|
let u;
|
|
5288
5294
|
h ? u = s : d ? u = i : u = 0;
|
|
5289
5295
|
const { min: g, max: p } = e;
|
|
5290
|
-
g.setScalar(1 / 0), p.setScalar(-1 / 0), o - n <= ft ? (this.getCartographicToNormal(c, A, oe), Le.set(0, 0, 1), lt.crossVectors(Le, oe).normalize(), Le.crossVectors(oe, lt).normalize(), t.makeBasis(lt, Le, oe),
|
|
5296
|
+
g.setScalar(1 / 0), p.setScalar(-1 / 0), o - n <= ft ? (this.getCartographicToNormal(c, A, oe), Le.set(0, 0, 1), lt.crossVectors(Le, oe).normalize(), Le.crossVectors(oe, lt).normalize(), t.makeBasis(lt, Le, oe), J.copy(t).invert(), this.getCartographicToPosition(u, n, l, R).applyMatrix4(J), p.x = Math.abs(R.x), g.x = -p.x, this.getCartographicToPosition(i, n, l, R).applyMatrix4(J), p.y = R.y, this.getCartographicToPosition(i, A, l, R).applyMatrix4(J), p.y = Math.max(R.y, p.y), this.getCartographicToPosition(s, n, l, R).applyMatrix4(J), g.y = R.y, this.getCartographicToPosition(s, A, l, R).applyMatrix4(J), g.y = Math.min(R.y, g.y), this.getCartographicToPosition(c, A, l, R).applyMatrix4(J), p.z = R.z, this.getCartographicToPosition(s, n, r, R).applyMatrix4(J), g.z = R.z, this.getCartographicToPosition(i, n, r, R).applyMatrix4(J), g.z = Math.min(R.z, g.z)) : (this.getCartographicToPosition(u, A, l, oe), oe.z = 0, oe.length() < 1e-10 ? oe.set(1, 0, 0) : oe.normalize(), Le.set(0, 0, 1), lt.crossVectors(oe, Le).normalize(), t.makeBasis(lt, Le, oe), J.copy(t).invert(), this.getCartographicToPosition(u, A + Fs, l, R).applyMatrix4(J), p.x = Math.abs(R.x), g.x = -p.x, this.getCartographicToPosition(i, 0, d ? r : l, R).applyMatrix4(J), p.y = R.y, this.getCartographicToPosition(s, 0, h ? r : l, R).applyMatrix4(J), g.y = R.y, this.getCartographicToPosition(u, A, l, R).applyMatrix4(J), p.z = R.z, this.getCartographicToPosition(u, o, l, R).applyMatrix4(J), g.z = R.z), e.getCenter(R), e.min.sub(R).multiplyScalar(1 + Ls), e.max.sub(R).multiplyScalar(1 + Ls), R.applyMatrix4(t), t.setPosition(R);
|
|
5291
5297
|
}
|
|
5292
5298
|
getBoundingSphere(e) {
|
|
5293
5299
|
en(this.radius) && console.warn("EllipsoidRegion: Triaxial ellipsoids are not supported."), this.getBoundingBox(jl, $i), e.center.setFromMatrixPosition($i), e.radius = 0;
|
|
@@ -5300,7 +5306,7 @@ let Kl = class extends Po {
|
|
|
5300
5306
|
heightEnd: r
|
|
5301
5307
|
} = this, l = (t + s) * 0.5, c = (i + n) * 0.5, A = t > 0, h = s < 0;
|
|
5302
5308
|
let d;
|
|
5303
|
-
A ? d = t : h ? d = s : d = 0, this.getCartographicToPosition(d, i, r,
|
|
5309
|
+
A ? d = t : h ? d = s : d = 0, this.getCartographicToPosition(d, i, r, R), ve(R, e), this.getCartographicToPosition(s, i, r, R), ve(R, e), this.getCartographicToPosition(s, c, r, R), ve(R, e), this.getCartographicToPosition(t, i, r, R), ve(R, e), this.getCartographicToPosition(t, c, r, R), ve(R, e), this.getCartographicToPosition(l, c, r, R), ve(R, e), this.getCartographicToPosition(t, i, o, R), ve(R, e), n - i > ft && (this.getCartographicToPosition(d, c + ft, r, R), ve(R, e)), e.radius = Math.sqrt(e.radius) * (1 + Ls);
|
|
5304
5310
|
}
|
|
5305
5311
|
};
|
|
5306
5312
|
function Yl(a) {
|
|
@@ -5347,7 +5353,7 @@ function Wl(a) {
|
|
|
5347
5353
|
return [i, n, o];
|
|
5348
5354
|
}
|
|
5349
5355
|
const ct = /* @__PURE__ */ new k();
|
|
5350
|
-
function Xl(a, e, t = new
|
|
5356
|
+
function Xl(a, e, t = new M()) {
|
|
5351
5357
|
ct.set(a, e).divideScalar(256).multiplyScalar(2).subScalar(1), t.set(ct.x, ct.y, 1 - Math.abs(ct.x) - Math.abs(ct.y));
|
|
5352
5358
|
const s = st.clamp(-t.z, 0, 1);
|
|
5353
5359
|
return t.x >= 0 ? t.setX(t.x - s) : t.setX(t.x + s), t.y >= 0 ? t.setY(t.y - s) : t.setY(t.y + s), t.normalize(), t;
|
|
@@ -5362,17 +5368,17 @@ class Uo extends Nl {
|
|
|
5362
5368
|
}
|
|
5363
5369
|
parse(e) {
|
|
5364
5370
|
return super.parse(e).then(async (t) => {
|
|
5365
|
-
const { featureTable: s, batchTable: i } = t, n = new Nn(), o = s.header.extensions, r = new
|
|
5371
|
+
const { featureTable: s, batchTable: i } = t, n = new Nn(), o = s.header.extensions, r = new M();
|
|
5366
5372
|
let l;
|
|
5367
5373
|
if (o && o["3DTILES_draco_point_compression"]) {
|
|
5368
5374
|
const { byteOffset: h, byteLength: d, properties: u } = o["3DTILES_draco_point_compression"], g = this.manager.getHandler("draco.drc");
|
|
5369
5375
|
if (g == null)
|
|
5370
5376
|
throw new Error("PNTSLoader: dracoLoader not available.");
|
|
5371
5377
|
const p = {};
|
|
5372
|
-
for (const
|
|
5373
|
-
if (
|
|
5374
|
-
const y = tn[
|
|
5375
|
-
p[y] = u[
|
|
5378
|
+
for (const E in u)
|
|
5379
|
+
if (E in tn && E in u) {
|
|
5380
|
+
const y = tn[E];
|
|
5381
|
+
p[y] = u[E];
|
|
5376
5382
|
}
|
|
5377
5383
|
const b = {
|
|
5378
5384
|
attributeIDs: p,
|
|
@@ -5381,16 +5387,16 @@ class Uo extends Nl {
|
|
|
5381
5387
|
color: "Uint8Array"
|
|
5382
5388
|
},
|
|
5383
5389
|
useUniqueIDs: !0
|
|
5384
|
-
},
|
|
5385
|
-
l = await g.decodeGeometry(
|
|
5390
|
+
}, C = s.getBuffer(h, d);
|
|
5391
|
+
l = await g.decodeGeometry(C, b), l.attributes.color && (n.vertexColors = !0);
|
|
5386
5392
|
} else {
|
|
5387
|
-
const h = s.getData("POINTS_LENGTH"), d = s.getData("POSITION", h, "FLOAT", "VEC3"), u = s.getData("NORMAL", h, "FLOAT", "VEC3"), g = s.getData("NORMAL", h, "UNSIGNED_BYTE", "VEC2"), p = s.getData("RGB", h, "UNSIGNED_BYTE", "VEC3"), b = s.getData("RGBA", h, "UNSIGNED_BYTE", "VEC4"),
|
|
5393
|
+
const h = s.getData("POINTS_LENGTH"), d = s.getData("POSITION", h, "FLOAT", "VEC3"), u = s.getData("NORMAL", h, "FLOAT", "VEC3"), g = s.getData("NORMAL", h, "UNSIGNED_BYTE", "VEC2"), p = s.getData("RGB", h, "UNSIGNED_BYTE", "VEC3"), b = s.getData("RGBA", h, "UNSIGNED_BYTE", "VEC4"), C = s.getData("RGB565", h, "UNSIGNED_SHORT", "SCALAR"), E = s.getData("CONSTANT_RGBA", h, "UNSIGNED_BYTE", "VEC4"), y = s.getData("POSITION_QUANTIZED", h, "UNSIGNED_SHORT", "VEC3"), m = s.getData("QUANTIZED_VOLUME_SCALE", h, "FLOAT", "VEC3"), I = s.getData("QUANTIZED_VOLUME_OFFSET", h, "FLOAT", "VEC3");
|
|
5388
5394
|
if (l = new rs(), y) {
|
|
5389
5395
|
const w = new Float32Array(h * 3);
|
|
5390
5396
|
for (let B = 0; B < h; B++)
|
|
5391
|
-
for (let
|
|
5392
|
-
const
|
|
5393
|
-
w[
|
|
5397
|
+
for (let x = 0; x < 3; x++) {
|
|
5398
|
+
const v = 3 * B + x;
|
|
5399
|
+
w[v] = y[v] / 65535 * m[x];
|
|
5394
5400
|
}
|
|
5395
5401
|
r.x = I[0], r.y = I[1], r.z = I[2], l.setAttribute("position", new ne(w, 3, !1));
|
|
5396
5402
|
} else
|
|
@@ -5398,10 +5404,10 @@ class Uo extends Nl {
|
|
|
5398
5404
|
if (u !== null)
|
|
5399
5405
|
l.setAttribute("normal", new ne(u, 3, !1));
|
|
5400
5406
|
else if (g !== null) {
|
|
5401
|
-
const w = new Float32Array(h * 3), B = new
|
|
5402
|
-
for (let
|
|
5403
|
-
const
|
|
5404
|
-
w[
|
|
5407
|
+
const w = new Float32Array(h * 3), B = new M();
|
|
5408
|
+
for (let x = 0; x < h; x++) {
|
|
5409
|
+
const v = g[x * 2], S = g[x * 2 + 1], Q = Xl(v, S, B);
|
|
5410
|
+
w[x * 3] = Q.x, w[x * 3 + 1] = Q.y, w[x * 3 + 2] = Q.z;
|
|
5405
5411
|
}
|
|
5406
5412
|
l.setAttribute("normal", new ne(w, 3, !1));
|
|
5407
5413
|
}
|
|
@@ -5409,20 +5415,20 @@ class Uo extends Nl {
|
|
|
5409
5415
|
l.setAttribute("color", new ne(b, 4, !0)), n.vertexColors = !0, n.transparent = !0, n.depthWrite = !1;
|
|
5410
5416
|
else if (p !== null)
|
|
5411
5417
|
l.setAttribute("color", new ne(p, 3, !0)), n.vertexColors = !0;
|
|
5412
|
-
else if (
|
|
5418
|
+
else if (C !== null) {
|
|
5413
5419
|
const w = new Uint8Array(h * 3);
|
|
5414
5420
|
for (let B = 0; B < h; B++) {
|
|
5415
|
-
const
|
|
5416
|
-
for (let
|
|
5417
|
-
const
|
|
5418
|
-
w[
|
|
5421
|
+
const x = Wl(C[B]);
|
|
5422
|
+
for (let v = 0; v < 3; v++) {
|
|
5423
|
+
const S = 3 * B + v;
|
|
5424
|
+
w[S] = x[v];
|
|
5419
5425
|
}
|
|
5420
5426
|
}
|
|
5421
5427
|
l.setAttribute("color", new ne(w, 3, !0)), n.vertexColors = !0;
|
|
5422
|
-
} else if (
|
|
5423
|
-
const w = new Ee(
|
|
5428
|
+
} else if (E !== null) {
|
|
5429
|
+
const w = new Ee(E[0], E[1], E[2]);
|
|
5424
5430
|
n.color = w;
|
|
5425
|
-
const B =
|
|
5431
|
+
const B = E[3] / 255;
|
|
5426
5432
|
B < 1 && (n.opacity = B, n.transparent = !0, n.depthWrite = !1);
|
|
5427
5433
|
}
|
|
5428
5434
|
}
|
|
@@ -5433,7 +5439,7 @@ class Uo extends Nl {
|
|
|
5433
5439
|
});
|
|
5434
5440
|
}
|
|
5435
5441
|
}
|
|
5436
|
-
const Gt = /* @__PURE__ */ new
|
|
5442
|
+
const Gt = /* @__PURE__ */ new M(), qe = /* @__PURE__ */ new M(), ze = /* @__PURE__ */ new M(), ks = /* @__PURE__ */ new M(), Ut = /* @__PURE__ */ new $e(), Nt = /* @__PURE__ */ new M(), je = /* @__PURE__ */ new P(), sn = /* @__PURE__ */ new P(), nn = /* @__PURE__ */ new M(), on = /* @__PURE__ */ new P(), _s = /* @__PURE__ */ new $e(), Ps = {};
|
|
5437
5443
|
function rn(a, e, t, s) {
|
|
5438
5444
|
if (a = a / t * 2 - 1, e = e / t * 2 - 1, s.x = a, s.y = e, s.z = 1 - Math.abs(a) - Math.abs(e), s.z < 0) {
|
|
5439
5445
|
const i = s.x;
|
|
@@ -5460,48 +5466,48 @@ class No extends Ul {
|
|
|
5460
5466
|
A.parse(n, h, (u) => {
|
|
5461
5467
|
const g = s.getData("INSTANCES_LENGTH");
|
|
5462
5468
|
let p = s.getData("POSITION", g, "FLOAT", "VEC3");
|
|
5463
|
-
const b = s.getData("POSITION_QUANTIZED", g, "UNSIGNED_SHORT", "VEC3"),
|
|
5469
|
+
const b = s.getData("POSITION_QUANTIZED", g, "UNSIGNED_SHORT", "VEC3"), C = s.getData("QUANTIZED_VOLUME_OFFSET", 1, "FLOAT", "VEC3"), E = s.getData("QUANTIZED_VOLUME_SCALE", 1, "FLOAT", "VEC3"), y = s.getData("NORMAL_UP", g, "FLOAT", "VEC3"), m = s.getData("NORMAL_RIGHT", g, "FLOAT", "VEC3"), I = s.getData("NORMAL_UP_OCT32P", g, "UNSIGNED_SHORT", "VEC2"), w = s.getData("NORMAL_RIGHT_OCT32P", g, "UNSIGNED_SHORT", "VEC2"), B = s.getData("SCALE_NON_UNIFORM", g, "FLOAT", "VEC3"), x = s.getData("SCALE", g, "FLOAT", "SCALAR"), v = s.getData("RTC_CENTER", 1, "FLOAT", "VEC3"), S = s.getData("EAST_NORTH_UP");
|
|
5464
5470
|
if (!p && b) {
|
|
5465
5471
|
p = new Float32Array(g * 3);
|
|
5466
|
-
for (let
|
|
5467
|
-
p[
|
|
5472
|
+
for (let T = 0; T < g; T++)
|
|
5473
|
+
p[T * 3 + 0] = C[0] + b[T * 3 + 0] / 65535 * E[0], p[T * 3 + 1] = C[1] + b[T * 3 + 1] / 65535 * E[1], p[T * 3 + 2] = C[2] + b[T * 3 + 2] / 65535 * E[2];
|
|
5468
5474
|
}
|
|
5469
|
-
const
|
|
5470
|
-
for (let
|
|
5471
|
-
|
|
5472
|
-
const
|
|
5473
|
-
u.scene.updateMatrixWorld(), u.scene.traverse((
|
|
5474
|
-
if (
|
|
5475
|
-
|
|
5476
|
-
const { geometry:
|
|
5477
|
-
F.position.copy(
|
|
5475
|
+
const Q = new M();
|
|
5476
|
+
for (let T = 0; T < g; T++)
|
|
5477
|
+
Q.x += p[T * 3 + 0] / g, Q.y += p[T * 3 + 1] / g, Q.z += p[T * 3 + 2] / g;
|
|
5478
|
+
const D = [], G = [];
|
|
5479
|
+
u.scene.updateMatrixWorld(), u.scene.traverse((T) => {
|
|
5480
|
+
if (T.isMesh) {
|
|
5481
|
+
G.push(T);
|
|
5482
|
+
const { geometry: K, material: U } = T, F = new li(K, U, g);
|
|
5483
|
+
F.position.copy(Q), v && (F.position.x += v[0], F.position.y += v[1], F.position.z += v[2]), D.push(F);
|
|
5478
5484
|
}
|
|
5479
5485
|
});
|
|
5480
|
-
for (let
|
|
5486
|
+
for (let T = 0; T < g; T++) {
|
|
5481
5487
|
ks.set(
|
|
5482
|
-
p[
|
|
5483
|
-
p[
|
|
5484
|
-
p[
|
|
5485
|
-
), Ut.identity(), y &&
|
|
5486
|
-
y[
|
|
5487
|
-
y[
|
|
5488
|
-
y[
|
|
5488
|
+
p[T * 3 + 0] - Q.x,
|
|
5489
|
+
p[T * 3 + 1] - Q.y,
|
|
5490
|
+
p[T * 3 + 2] - Q.z
|
|
5491
|
+
), Ut.identity(), y && m ? (qe.set(
|
|
5492
|
+
y[T * 3 + 0],
|
|
5493
|
+
y[T * 3 + 1],
|
|
5494
|
+
y[T * 3 + 2]
|
|
5489
5495
|
), ze.set(
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5496
|
+
m[T * 3 + 0],
|
|
5497
|
+
m[T * 3 + 1],
|
|
5498
|
+
m[T * 3 + 2]
|
|
5493
5499
|
), Gt.crossVectors(ze, qe).normalize(), je.makeBasis(
|
|
5494
5500
|
ze,
|
|
5495
5501
|
qe,
|
|
5496
5502
|
Gt
|
|
5497
5503
|
), Ut.setFromRotationMatrix(je)) : I && w && (rn(
|
|
5498
|
-
I[
|
|
5499
|
-
I[
|
|
5504
|
+
I[T * 2 + 0],
|
|
5505
|
+
I[T * 2 + 1],
|
|
5500
5506
|
65535,
|
|
5501
5507
|
qe
|
|
5502
5508
|
), rn(
|
|
5503
|
-
w[
|
|
5504
|
-
w[
|
|
5509
|
+
w[T * 2 + 0],
|
|
5510
|
+
w[T * 2 + 1],
|
|
5505
5511
|
65535,
|
|
5506
5512
|
ze
|
|
5507
5513
|
), Gt.crossVectors(ze, qe).normalize(), je.makeBasis(
|
|
@@ -5509,18 +5515,18 @@ class No extends Ul {
|
|
|
5509
5515
|
qe,
|
|
5510
5516
|
Gt
|
|
5511
5517
|
), Ut.setFromRotationMatrix(je)), Nt.set(1, 1, 1), B && Nt.set(
|
|
5512
|
-
B[
|
|
5513
|
-
B[
|
|
5514
|
-
B[
|
|
5515
|
-
),
|
|
5516
|
-
for (let
|
|
5517
|
-
const F =
|
|
5518
|
-
_s.copy(Ut),
|
|
5519
|
-
const
|
|
5520
|
-
sn.multiplyMatrices(je,
|
|
5518
|
+
B[T * 3 + 0],
|
|
5519
|
+
B[T * 3 + 1],
|
|
5520
|
+
B[T * 3 + 2]
|
|
5521
|
+
), x && Nt.multiplyScalar(x[T]);
|
|
5522
|
+
for (let K = 0, U = D.length; K < U; K++) {
|
|
5523
|
+
const F = D[K];
|
|
5524
|
+
_s.copy(Ut), S && (F.updateMatrixWorld(), nn.copy(ks).applyMatrix4(F.matrixWorld), this.ellipsoid.getPositionToCartographic(nn, Ps), this.ellipsoid.getEastNorthUpFrame(Ps.lat, Ps.lon, on), _s.setFromRotationMatrix(on)), je.compose(ks, _s, Nt).multiply(d);
|
|
5525
|
+
const O = G[K];
|
|
5526
|
+
sn.multiplyMatrices(je, O.matrixWorld), F.setMatrixAt(T, sn);
|
|
5521
5527
|
}
|
|
5522
5528
|
}
|
|
5523
|
-
u.scene.clear(), u.scene.add(...
|
|
5529
|
+
u.scene.clear(), u.scene.add(...D), u.batchTable = i, u.featureTable = s, u.scene.batchTable = i, u.scene.featureTable = s, o(u);
|
|
5524
5530
|
}, r);
|
|
5525
5531
|
});
|
|
5526
5532
|
});
|
|
@@ -5601,7 +5607,7 @@ class $l extends Xe {
|
|
|
5601
5607
|
this.parent && e && this.parent.updateWorldMatrix(e, !1), this.updateMatrixWorld(!0);
|
|
5602
5608
|
}
|
|
5603
5609
|
}
|
|
5604
|
-
const Vo = /* @__PURE__ */ new is(), Gs = /* @__PURE__ */ new
|
|
5610
|
+
const Vo = /* @__PURE__ */ new is(), Gs = /* @__PURE__ */ new M(), Vt = [];
|
|
5605
5611
|
function Oo(a, e) {
|
|
5606
5612
|
return a.distance - e.distance;
|
|
5607
5613
|
}
|
|
@@ -5657,7 +5663,7 @@ function jo(a, e, t, s, i = null) {
|
|
|
5657
5663
|
for (let c = 0, A = l.length; c < A; c++)
|
|
5658
5664
|
jo(a, l[c], t, s, i);
|
|
5659
5665
|
}
|
|
5660
|
-
const ge = /* @__PURE__ */ new
|
|
5666
|
+
const ge = /* @__PURE__ */ new M(), pe = /* @__PURE__ */ new M(), fe = /* @__PURE__ */ new M(), an = /* @__PURE__ */ new M(), ln = /* @__PURE__ */ new M();
|
|
5661
5667
|
class tc {
|
|
5662
5668
|
constructor() {
|
|
5663
5669
|
this.sphere = null, this.obb = null, this.region = null, this.regionObb = null;
|
|
@@ -5769,7 +5775,7 @@ function ic(a, e, t, s) {
|
|
|
5769
5775
|
}
|
|
5770
5776
|
class nc extends Nr {
|
|
5771
5777
|
constructor() {
|
|
5772
|
-
super(), this.points = Array(8).fill().map(() => new
|
|
5778
|
+
super(), this.points = Array(8).fill().map(() => new M());
|
|
5773
5779
|
}
|
|
5774
5780
|
setFromProjectionMatrix(e, t) {
|
|
5775
5781
|
return super.setFromProjectionMatrix(e, t), this.calculateFrustumPoints(), this;
|
|
@@ -5798,7 +5804,7 @@ class nc extends Nr {
|
|
|
5798
5804
|
});
|
|
5799
5805
|
}
|
|
5800
5806
|
}
|
|
5801
|
-
const cn = /* @__PURE__ */ new P(), An = /* @__PURE__ */ new Yn(), Ko = Symbol("INITIAL_FRUSTUM_CULLED"), Ot = /* @__PURE__ */ new P(), ht = /* @__PURE__ */ new
|
|
5807
|
+
const cn = /* @__PURE__ */ new P(), An = /* @__PURE__ */ new Yn(), Ko = Symbol("INITIAL_FRUSTUM_CULLED"), Ot = /* @__PURE__ */ new P(), ht = /* @__PURE__ */ new M(), Us = /* @__PURE__ */ new k(), oc = /* @__PURE__ */ new M(1, 0, 0), rc = /* @__PURE__ */ new M(0, 1, 0);
|
|
5802
5808
|
function hn(a, e) {
|
|
5803
5809
|
a.traverse((t) => {
|
|
5804
5810
|
t.frustumCulled = t[Ko] && e;
|
|
@@ -5927,7 +5933,7 @@ let ac = class extends _l {
|
|
|
5927
5933
|
isOrthographic: !1,
|
|
5928
5934
|
sseDenominator: -1,
|
|
5929
5935
|
// used if isOrthographic:false
|
|
5930
|
-
position: new
|
|
5936
|
+
position: new M(),
|
|
5931
5937
|
invScale: -1,
|
|
5932
5938
|
pixelSize: 0
|
|
5933
5939
|
// used if isOrthographic:true
|
|
@@ -5969,32 +5975,32 @@ let ac = class extends _l {
|
|
|
5969
5975
|
const h = o.transform, d = this._upRotationMatrix, u = (Ue(e) || s).toLowerCase();
|
|
5970
5976
|
switch (u) {
|
|
5971
5977
|
case "b3dm": {
|
|
5972
|
-
const
|
|
5973
|
-
|
|
5978
|
+
const m = new Go(c);
|
|
5979
|
+
m.workingPath = r, m.fetchOptions = l, m.adjustmentTransform.copy(d), A = m.parse(e);
|
|
5974
5980
|
break;
|
|
5975
5981
|
}
|
|
5976
5982
|
case "pnts": {
|
|
5977
|
-
const
|
|
5978
|
-
|
|
5983
|
+
const m = new Uo(c);
|
|
5984
|
+
m.workingPath = r, m.fetchOptions = l, A = m.parse(e);
|
|
5979
5985
|
break;
|
|
5980
5986
|
}
|
|
5981
5987
|
case "i3dm": {
|
|
5982
|
-
const
|
|
5983
|
-
|
|
5988
|
+
const m = new No(c);
|
|
5989
|
+
m.workingPath = r, m.fetchOptions = l, m.adjustmentTransform.copy(d), m.ellipsoid.copy(this.ellipsoid), A = m.parse(e);
|
|
5984
5990
|
break;
|
|
5985
5991
|
}
|
|
5986
5992
|
case "cmpt": {
|
|
5987
|
-
const
|
|
5988
|
-
|
|
5993
|
+
const m = new Zl(c);
|
|
5994
|
+
m.workingPath = r, m.fetchOptions = l, m.adjustmentTransform.copy(d), m.ellipsoid.copy(this.ellipsoid), A = m.parse(e).then((I) => I.scene);
|
|
5989
5995
|
break;
|
|
5990
5996
|
}
|
|
5991
5997
|
// 3DTILES_content_gltf
|
|
5992
5998
|
case "gltf":
|
|
5993
5999
|
case "glb": {
|
|
5994
|
-
const
|
|
5995
|
-
|
|
5996
|
-
let I =
|
|
5997
|
-
!/[\\/]$/.test(I) && I.length && (I += "/"), A =
|
|
6000
|
+
const m = c.getHandler("path.gltf") || c.getHandler("path.glb") || new Ne(c);
|
|
6001
|
+
m.setWithCredentials(l.credentials === "include"), m.setRequestHeader(l.headers || {}), l.credentials === "include" && l.mode === "cors" && m.setCrossOrigin("use-credentials");
|
|
6002
|
+
let I = m.resourcePath || m.path || r;
|
|
6003
|
+
!/[\\/]$/.test(I) && I.length && (I += "/"), A = m.parseAsync(e, I).then((w) => {
|
|
5998
6004
|
w.scene = w.scene || new Xe();
|
|
5999
6005
|
const { scene: B } = w;
|
|
6000
6006
|
return B.updateMatrix(), B.matrix.multiply(d).decompose(B.position, B.quaternion, B.scale), w;
|
|
@@ -6002,7 +6008,7 @@ let ac = class extends _l {
|
|
|
6002
6008
|
break;
|
|
6003
6009
|
}
|
|
6004
6010
|
default: {
|
|
6005
|
-
A = this.invokeOnePlugin((
|
|
6011
|
+
A = this.invokeOnePlugin((m) => m.parseToMesh && m.parseToMesh(e, t, s, i, n));
|
|
6006
6012
|
break;
|
|
6007
6013
|
}
|
|
6008
6014
|
}
|
|
@@ -6010,27 +6016,27 @@ let ac = class extends _l {
|
|
|
6010
6016
|
if (g === null)
|
|
6011
6017
|
throw new Error(`TilesRenderer: Content type "${u}" not supported.`);
|
|
6012
6018
|
let p, b;
|
|
6013
|
-
g.isObject3D ? (p = g, b = null) : (p = g.scene, b = g), p.updateMatrix(), p.matrix.premultiply(h), p.matrix.decompose(p.position, p.quaternion, p.scale), await this.invokeAllPlugins((
|
|
6014
|
-
|
|
6019
|
+
g.isObject3D ? (p = g, b = null) : (p = g.scene, b = g), p.updateMatrix(), p.matrix.premultiply(h), p.matrix.decompose(p.position, p.quaternion, p.scale), await this.invokeAllPlugins((m) => m.processTileModel && m.processTileModel(p, t)), p.traverse((m) => {
|
|
6020
|
+
m[Ko] = m.frustumCulled;
|
|
6015
6021
|
}), hn(p, !this.autoDisableRendererCulling);
|
|
6016
|
-
const
|
|
6017
|
-
if (p.traverse((
|
|
6018
|
-
if (
|
|
6019
|
-
const I =
|
|
6020
|
-
|
|
6022
|
+
const C = [], E = [], y = [];
|
|
6023
|
+
if (p.traverse((m) => {
|
|
6024
|
+
if (m.geometry && E.push(m.geometry), m.material) {
|
|
6025
|
+
const I = m.material;
|
|
6026
|
+
C.push(m.material);
|
|
6021
6027
|
for (const w in I) {
|
|
6022
6028
|
const B = I[w];
|
|
6023
6029
|
B && B.isTexture && y.push(B);
|
|
6024
6030
|
}
|
|
6025
6031
|
}
|
|
6026
6032
|
}), n.aborted) {
|
|
6027
|
-
for (let
|
|
6028
|
-
const w = y[
|
|
6033
|
+
for (let m = 0, I = y.length; m < I; m++) {
|
|
6034
|
+
const w = y[m];
|
|
6029
6035
|
w.image instanceof ImageBitmap && w.image.close(), w.dispose();
|
|
6030
6036
|
}
|
|
6031
6037
|
return;
|
|
6032
6038
|
}
|
|
6033
|
-
o.materials =
|
|
6039
|
+
o.materials = C, o.geometry = E, o.textures = y, o.scene = p, o.metadata = b;
|
|
6034
6040
|
}
|
|
6035
6041
|
disposeTile(e) {
|
|
6036
6042
|
super.disposeTile(e);
|
|
@@ -6066,14 +6072,14 @@ let ac = class extends _l {
|
|
|
6066
6072
|
const g = n[d];
|
|
6067
6073
|
let p, b;
|
|
6068
6074
|
if (g.isOrthographic) {
|
|
6069
|
-
const
|
|
6070
|
-
p = e.geometricError /
|
|
6075
|
+
const E = g.pixelSize;
|
|
6076
|
+
p = e.geometricError / E, b = 1 / 0;
|
|
6071
6077
|
} else {
|
|
6072
|
-
const
|
|
6073
|
-
b = o.distanceToPoint(g.position), p = b === 0 ? 1 / 0 : e.geometricError / (b *
|
|
6078
|
+
const E = g.sseDenominator;
|
|
6079
|
+
b = o.distanceToPoint(g.position), p = b === 0 ? 1 / 0 : e.geometricError / (b * E);
|
|
6074
6080
|
}
|
|
6075
|
-
const
|
|
6076
|
-
o.intersectsFrustum(
|
|
6081
|
+
const C = n[d].frustum;
|
|
6082
|
+
o.intersectsFrustum(C) && (r = !0, l = Math.max(l, p), c = Math.min(c, b)), A = Math.max(A, p), h = Math.min(h, b);
|
|
6077
6083
|
}
|
|
6078
6084
|
r ? (t.inView = !0, t.error = l, t.distanceFromCamera = c) : (t.inView = !1, t.error = A, t.distanceFromCamera = h);
|
|
6079
6085
|
}
|
|
@@ -6667,7 +6673,7 @@ class Yo {
|
|
|
6667
6673
|
this._mesh.material = e;
|
|
6668
6674
|
}
|
|
6669
6675
|
}
|
|
6670
|
-
function
|
|
6676
|
+
function H(a, e, t) {
|
|
6671
6677
|
return a && e in a ? a[e] : t;
|
|
6672
6678
|
}
|
|
6673
6679
|
function Jo(a) {
|
|
@@ -6693,7 +6699,7 @@ function ni(a) {
|
|
|
6693
6699
|
case "VEC2":
|
|
6694
6700
|
return new k();
|
|
6695
6701
|
case "VEC3":
|
|
6696
|
-
return new
|
|
6702
|
+
return new M();
|
|
6697
6703
|
case "VEC4":
|
|
6698
6704
|
return new nt();
|
|
6699
6705
|
case "MAT2":
|
|
@@ -6938,7 +6944,7 @@ function Cc(a) {
|
|
|
6938
6944
|
}
|
|
6939
6945
|
class us {
|
|
6940
6946
|
constructor(e, t, s = null) {
|
|
6941
|
-
this.name = t.name || null, this.description = t.description || null, this.type = t.type, this.componentType = t.componentType || null, this.enumType = t.enumType || null, this.array = t.array || !1, this.count = t.count || 0, this.normalized = t.normalized || !1, this.offset = t.offset || 0, this.scale =
|
|
6947
|
+
this.name = t.name || null, this.description = t.description || null, this.type = t.type, this.componentType = t.componentType || null, this.enumType = t.enumType || null, this.array = t.array || !1, this.count = t.count || 0, this.normalized = t.normalized || !1, this.offset = t.offset || 0, this.scale = H(t, "scale", 1), this.max = H(t, "max", 1 / 0), this.min = H(t, "min", -1 / 0), this.required = t.required || !1, this.noData = H(t, "noData", null), this.default = H(t, "default", null), this.semantic = H(t, "semantic", null), this.enumSet = null, this.accessorProperty = s, s && (this.offset = H(s, "offset", this.offset), this.scale = H(s, "scale", this.scale), this.max = H(s, "max", this.max), this.min = H(s, "min", this.min)), t.type === "ENUM" && (this.enumSet = e[this.enumType], this.componentType === null && (this.componentType = H(this.enumSet, "valueType", "UINT16")));
|
|
6942
6948
|
}
|
|
6943
6949
|
// shape the given target to match the data type of the property
|
|
6944
6950
|
// enums are set to their integer value
|
|
@@ -7039,7 +7045,7 @@ class yc extends Ci {
|
|
|
7039
7045
|
}
|
|
7040
7046
|
class Ic extends us {
|
|
7041
7047
|
constructor(e, t, s = null) {
|
|
7042
|
-
super(e, t, s), this.values = s?.values ?? null, this.valueLength = Cc(this.type), this.arrayOffsets =
|
|
7048
|
+
super(e, t, s), this.values = s?.values ?? null, this.valueLength = Cc(this.type), this.arrayOffsets = H(s, "arrayOffsets", null), this.stringOffsets = H(s, "stringOffsets", null), this.arrayOffsetType = H(s, "arrayOffsetType", "UINT32"), this.stringOffsetType = H(s, "stringOffsetType", "UINT32");
|
|
7043
7049
|
}
|
|
7044
7050
|
// returns the necessary array length based on the array offsets if present
|
|
7045
7051
|
getArrayLengthFromId(e, t) {
|
|
@@ -7080,7 +7086,7 @@ class Bc extends Ci {
|
|
|
7080
7086
|
if (r === "STRING") {
|
|
7081
7087
|
let u = d + s, g = 0;
|
|
7082
7088
|
if (n.stringOffsets !== null) {
|
|
7083
|
-
const { stringOffsets: b, stringOffsetType:
|
|
7089
|
+
const { stringOffsets: b, stringOffsetType: C } = n, E = Ct(C), y = new E(l[b]);
|
|
7084
7090
|
g = y[u + 1] - y[u], u = y[u];
|
|
7085
7091
|
}
|
|
7086
7092
|
const p = new Uint8Array(h.buffer, u, g);
|
|
@@ -7192,7 +7198,7 @@ function $o(a, e, t, s) {
|
|
|
7192
7198
|
const bn = /* @__PURE__ */ new k(), Cn = /* @__PURE__ */ new k(), En = /* @__PURE__ */ new k();
|
|
7193
7199
|
class Sc extends us {
|
|
7194
7200
|
constructor(e, t, s = null) {
|
|
7195
|
-
super(e, t, s), this.channels =
|
|
7201
|
+
super(e, t, s), this.channels = H(s, "channels", [0]), this.index = H(s, "index", null), this.texCoord = H(s, "texCoord", null), this.valueLength = parseInt(this.type.replace(/[^0-9]/g, "")) || 1;
|
|
7196
7202
|
}
|
|
7197
7203
|
// takes the buffer to read from and the value index to read
|
|
7198
7204
|
readDataFromBuffer(e, t, s = null) {
|
|
@@ -7251,10 +7257,10 @@ class vc extends Ci {
|
|
|
7251
7257
|
continue;
|
|
7252
7258
|
}
|
|
7253
7259
|
} else throw new Error("PropertyTextureAccessor: Requested property does not exist.");
|
|
7254
|
-
const
|
|
7255
|
-
if (new Uint8Array(I.buffer).set(
|
|
7260
|
+
const C = p.valueLength * (p.count || 1), E = p.channels.map((w) => A[4 * d + w]), y = p.componentType, m = Ct(y, b), I = new m(C);
|
|
7261
|
+
if (new Uint8Array(I.buffer).set(E), p.array) {
|
|
7256
7262
|
const w = n[d];
|
|
7257
|
-
for (let B = 0,
|
|
7263
|
+
for (let B = 0, x = w.length; B < x; B++)
|
|
7258
7264
|
w[B] = p.readDataFromBuffer(I, B, w[B]);
|
|
7259
7265
|
} else
|
|
7260
7266
|
n[d] = p.readDataFromBuffer(I, 0, n[d]);
|
|
@@ -7472,8 +7478,8 @@ class Rc {
|
|
|
7472
7478
|
for (let u = 0, g = n.length; u < g; u++) {
|
|
7473
7479
|
const p = n[u], b = "nullFeatureId" in p ? p.nullFeatureId : null;
|
|
7474
7480
|
if ("texture" in p) {
|
|
7475
|
-
const { channels:
|
|
7476
|
-
new Uint8Array(d.buffer).set(
|
|
7481
|
+
const { channels: C } = p.texture, E = C.map((m) => A[4 * u + m]);
|
|
7482
|
+
new Uint8Array(d.buffer).set(E);
|
|
7477
7483
|
const y = d[0];
|
|
7478
7484
|
y !== b && (o[u] = y);
|
|
7479
7485
|
}
|
|
@@ -7571,7 +7577,7 @@ class Gc extends ac {
|
|
|
7571
7577
|
}
|
|
7572
7578
|
class Uc {
|
|
7573
7579
|
constructor(e = null, t = null) {
|
|
7574
|
-
this.renderer = e, this.camera = t, this.activeTilesets = /* @__PURE__ */ new Set(), this.tilesetStates = /* @__PURE__ */ new Map(), this.pendingQueueTasks = [], this._resolutionVec2 = new
|
|
7580
|
+
this.renderer = e, this.camera = t, this.activeTilesets = /* @__PURE__ */ new Set(), this.tilesetStates = /* @__PURE__ */ new Map(), this.pendingQueueTasks = [], this._resolutionVec2 = new f.Vector2();
|
|
7575
7581
|
}
|
|
7576
7582
|
clamp(e, t, s) {
|
|
7577
7583
|
return Math.min(s, Math.max(t, e));
|
|
@@ -7662,7 +7668,7 @@ class Uc {
|
|
|
7662
7668
|
}
|
|
7663
7669
|
}
|
|
7664
7670
|
isValidBox3(e) {
|
|
7665
|
-
return !e || !(e instanceof
|
|
7671
|
+
return !e || !(e instanceof f.Box3) || e.isEmpty() ? !1 : Number.isFinite(e.min.x) && Number.isFinite(e.min.y) && Number.isFinite(e.min.z) && Number.isFinite(e.max.x) && Number.isFinite(e.max.y) && Number.isFinite(e.max.z);
|
|
7666
7672
|
}
|
|
7667
7673
|
normalizeUpAxis(e = "+Y") {
|
|
7668
7674
|
const t = String(e || "+Y").trim().toUpperCase();
|
|
@@ -7694,7 +7700,7 @@ class Uc {
|
|
|
7694
7700
|
getRootTransformUpVector(e) {
|
|
7695
7701
|
const t = this.getRootTransformArray(e);
|
|
7696
7702
|
if (!t) return null;
|
|
7697
|
-
const s = new
|
|
7703
|
+
const s = new f.Vector3(t[8], t[9], t[10]);
|
|
7698
7704
|
return s.lengthSq() <= 1e-12 ? null : s.normalize();
|
|
7699
7705
|
}
|
|
7700
7706
|
isLikelyGeospatialTileset(e) {
|
|
@@ -7727,7 +7733,7 @@ class Uc {
|
|
|
7727
7733
|
if (n.lengthSq() <= 1e-12)
|
|
7728
7734
|
return !1;
|
|
7729
7735
|
n.normalize();
|
|
7730
|
-
const o = new
|
|
7736
|
+
const o = new f.Vector3(0, 1, 0), r = new f.Quaternion().setFromUnitVectors(n, o);
|
|
7731
7737
|
return e.geoGroup.quaternion.copy(r), e.geoGroup.updateMatrixWorld(!0), e.hasGeospatialReoriented = !0, !0;
|
|
7732
7738
|
}
|
|
7733
7739
|
setUpAxis(e, t = "+Y") {
|
|
@@ -7756,7 +7762,7 @@ class Uc {
|
|
|
7756
7762
|
return null;
|
|
7757
7763
|
const s = new so();
|
|
7758
7764
|
s.setDecoderPath(t.dracoDecoderPath || _c);
|
|
7759
|
-
const i = new
|
|
7765
|
+
const i = new te();
|
|
7760
7766
|
i.setTranscoderPath(t.ktx2TranscoderPath || Pc), this.renderer && i.detectSupport(this.renderer);
|
|
7761
7767
|
const n = new Fc({
|
|
7762
7768
|
rtc: !0,
|
|
@@ -7768,8 +7774,8 @@ class Uc {
|
|
|
7768
7774
|
convertBasicMaterial(e) {
|
|
7769
7775
|
if (!e?.isMeshBasicMaterial)
|
|
7770
7776
|
return e;
|
|
7771
|
-
const t = new
|
|
7772
|
-
color: e.color ? e.color.clone() : new
|
|
7777
|
+
const t = new f.MeshStandardMaterial({
|
|
7778
|
+
color: e.color ? e.color.clone() : new f.Color(16777215),
|
|
7773
7779
|
map: e.map || null,
|
|
7774
7780
|
alphaMap: e.alphaMap || null,
|
|
7775
7781
|
transparent: e.transparent,
|
|
@@ -7798,24 +7804,24 @@ class Uc {
|
|
|
7798
7804
|
const i = (n, o = -1) => {
|
|
7799
7805
|
if (!n) return;
|
|
7800
7806
|
let r = n;
|
|
7801
|
-
n.isMeshBasicMaterial && (t.has(n) ? r = t.get(n) : (r = this.convertBasicMaterial(n), t.set(n, r))), r.map && (r.map.colorSpace =
|
|
7807
|
+
n.isMeshBasicMaterial && (t.has(n) ? r = t.get(n) : (r = this.convertBasicMaterial(n), t.set(n, r))), r.map && (r.map.colorSpace = f.SRGBColorSpace, r.map.needsUpdate = !0), r.needsUpdate = !0, o >= 0 && Array.isArray(s.material) ? s.material[o] = r : s.material = r;
|
|
7802
7808
|
};
|
|
7803
7809
|
Array.isArray(s.material) ? s.material.forEach((n, o) => i(n, o)) : i(s.material);
|
|
7804
7810
|
});
|
|
7805
7811
|
}
|
|
7806
7812
|
updateBoundsAndCenter(e) {
|
|
7807
7813
|
if (!e) return !1;
|
|
7808
|
-
const { tileset: t, tilesGroup: s, upGroup: i, geoGroup: n, modelGroup: o, autoCenter: r } = e, l = new
|
|
7814
|
+
const { tileset: t, tilesGroup: s, upGroup: i, geoGroup: n, modelGroup: o, autoCenter: r } = e, l = new f.Box3(), c = t.getBoundingBox(l) && this.isValidBox3(l);
|
|
7809
7815
|
if (r && c && !e.hasAutoCentered) {
|
|
7810
|
-
const h = l.getCenter(new
|
|
7816
|
+
const h = l.getCenter(new f.Vector3());
|
|
7811
7817
|
s.position.set(-h.x, -h.y, -h.z), s.updateMatrixWorld(!0), e.hasAutoCentered = !0;
|
|
7812
7818
|
}
|
|
7813
7819
|
o.updateMatrixWorld(!0);
|
|
7814
|
-
const A = new
|
|
7820
|
+
const A = new f.Box3().setFromObject(o);
|
|
7815
7821
|
if (this.isValidBox3(A))
|
|
7816
7822
|
return o.userData.boundingBox = A, !0;
|
|
7817
7823
|
if (c) {
|
|
7818
|
-
const h = l.clone(), d = new
|
|
7824
|
+
const h = l.clone(), d = new f.Matrix4().multiplyMatrices(n.matrix, i.matrix).multiply(s.matrix);
|
|
7819
7825
|
if (h.applyMatrix4(d), this.isValidBox3(h))
|
|
7820
7826
|
return o.userData.boundingBox = h, !0;
|
|
7821
7827
|
}
|
|
@@ -7889,10 +7895,10 @@ class Uc {
|
|
|
7889
7895
|
stillTilesProcessed: d,
|
|
7890
7896
|
lastSampleTimeMs: 0,
|
|
7891
7897
|
lastMovementTimeMs: 0,
|
|
7892
|
-
lastPosition: new
|
|
7893
|
-
lastQuaternion: new
|
|
7894
|
-
samplePosition: new
|
|
7895
|
-
sampleQuaternion: new
|
|
7898
|
+
lastPosition: new f.Vector3(),
|
|
7899
|
+
lastQuaternion: new f.Quaternion(),
|
|
7900
|
+
samplePosition: new f.Vector3(),
|
|
7901
|
+
sampleQuaternion: new f.Quaternion(),
|
|
7896
7902
|
initialized: !1
|
|
7897
7903
|
};
|
|
7898
7904
|
}
|
|
@@ -7906,22 +7912,22 @@ class Uc {
|
|
|
7906
7912
|
}
|
|
7907
7913
|
const l = Math.max((r - s.lastSampleTimeMs) / 1e3, 1e-6), c = s.samplePosition.distanceTo(s.lastPosition), A = this.clamp(Math.abs(s.sampleQuaternion.dot(s.lastQuaternion)), -1, 1), h = 2 * Math.acos(A), d = c / l, u = h / l, g = d > s.linearSpeedThreshold, p = u > s.angularSpeedThreshold, b = d > s.fastLinearSpeedThreshold;
|
|
7908
7914
|
(g || p) && (s.lastMovementTimeMs = r);
|
|
7909
|
-
const
|
|
7910
|
-
let y = s.stillErrorTarget,
|
|
7911
|
-
if (
|
|
7915
|
+
const E = r - s.lastMovementTimeMs >= s.settleDelayMs;
|
|
7916
|
+
let y = s.stillErrorTarget, m = s.stillTilesProcessed;
|
|
7917
|
+
if (E || (b ? (y = s.fastMovingErrorTarget, m = s.fastMovingTilesProcessed) : (y = s.movingErrorTarget, m = s.movingTilesProcessed)), e.maxTriangles && this.renderer?.info?.render) {
|
|
7912
7918
|
const w = this.renderer.info.render.triangles;
|
|
7913
7919
|
if (Number.isFinite(w) && w > 0) {
|
|
7914
|
-
const B = e.maxTriangles * 1.08,
|
|
7915
|
-
w > B ? (y = Math.max(y, y * 1.2 + 0.5),
|
|
7920
|
+
const B = e.maxTriangles * 1.08, x = e.maxTriangles * 0.75;
|
|
7921
|
+
w > B ? (y = Math.max(y, y * 1.2 + 0.5), m = Math.max(s.minTilesProcessed, Math.round(m * 0.85))) : w < x && E && (y *= 0.92, m = Math.min(s.maxTilesProcessed, Math.round(m * 1.08)));
|
|
7916
7922
|
}
|
|
7917
7923
|
}
|
|
7918
|
-
y = this.clamp(y, n, o),
|
|
7919
|
-
Math.round(
|
|
7924
|
+
y = this.clamp(y, n, o), m = this.clamp(
|
|
7925
|
+
Math.round(m),
|
|
7920
7926
|
s.minTilesProcessed,
|
|
7921
7927
|
s.maxTilesProcessed
|
|
7922
7928
|
);
|
|
7923
7929
|
const I = i.errorTarget + (y - i.errorTarget) * s.errorLerp;
|
|
7924
|
-
Math.abs(I - i.errorTarget) > 0.04 && (i.errorTarget = I), typeof i.maxTilesProcessed == "number" && Math.abs(i.maxTilesProcessed -
|
|
7930
|
+
Math.abs(I - i.errorTarget) > 0.04 && (i.errorTarget = I), typeof i.maxTilesProcessed == "number" && Math.abs(i.maxTilesProcessed - m) >= 1 && (i.maxTilesProcessed = m), s.lastSampleTimeMs = r, s.lastPosition.copy(s.samplePosition), s.lastQuaternion.copy(s.sampleQuaternion);
|
|
7925
7931
|
}
|
|
7926
7932
|
applyOptions(e, t) {
|
|
7927
7933
|
if (!t)
|
|
@@ -7940,7 +7946,7 @@ class Uc {
|
|
|
7940
7946
|
return new Promise((s, i) => {
|
|
7941
7947
|
const n = new Gc(e);
|
|
7942
7948
|
n.registerPlugin(new Ac()), this.configureScheduling(n), this.applyOptions(n, t), this.configureGltfExtensions(n, t);
|
|
7943
|
-
const o = new
|
|
7949
|
+
const o = new f.Group(), r = new f.Group(), l = new f.Group();
|
|
7944
7950
|
o.add(r), r.add(l);
|
|
7945
7951
|
const c = n.group;
|
|
7946
7952
|
l.add(c), this.setUpAxis(l, t.up || "+Y");
|
|
@@ -8250,7 +8256,7 @@ class Nc {
|
|
|
8250
8256
|
this.vrButton && this.vrButton.parentNode && this.vrButton.parentNode.removeChild(this.vrButton), this.isQuest2 = !1, this.isQuest3 = !1, this.isVRSupported = !1, this.isVRPresenting = !1;
|
|
8251
8257
|
}
|
|
8252
8258
|
}
|
|
8253
|
-
const
|
|
8259
|
+
const N = {
|
|
8254
8260
|
ComponentState: Object.freeze({
|
|
8255
8261
|
DEFAULT: "default",
|
|
8256
8262
|
TOUCHED: "touched",
|
|
@@ -8329,7 +8335,7 @@ const Hc = {
|
|
|
8329
8335
|
xAxis: 0,
|
|
8330
8336
|
yAxis: 0,
|
|
8331
8337
|
button: 0,
|
|
8332
|
-
state:
|
|
8338
|
+
state: N.ComponentState.DEFAULT
|
|
8333
8339
|
};
|
|
8334
8340
|
function qc(a = 0, e = 0) {
|
|
8335
8341
|
let t = a, s = e;
|
|
@@ -8344,7 +8350,7 @@ function qc(a = 0, e = 0) {
|
|
|
8344
8350
|
}
|
|
8345
8351
|
class zc {
|
|
8346
8352
|
constructor(e) {
|
|
8347
|
-
this.componentProperty = e.componentProperty, this.states = e.states, this.valueNodeName = e.valueNodeName, this.valueNodeProperty = e.valueNodeProperty, this.valueNodeProperty ===
|
|
8353
|
+
this.componentProperty = e.componentProperty, this.states = e.states, this.valueNodeName = e.valueNodeName, this.valueNodeProperty = e.valueNodeProperty, this.valueNodeProperty === N.VisualResponseProperty.TRANSFORM && (this.minNodeName = e.minNodeName, this.maxNodeName = e.maxNodeName), this.value = 0, this.updateFromComponent(Hc);
|
|
8348
8354
|
}
|
|
8349
8355
|
/**
|
|
8350
8356
|
* Computes the visual response's interpolation weight based on component state
|
|
@@ -8362,17 +8368,17 @@ class zc {
|
|
|
8362
8368
|
}) {
|
|
8363
8369
|
const { normalizedXAxis: n, normalizedYAxis: o } = qc(e, t);
|
|
8364
8370
|
switch (this.componentProperty) {
|
|
8365
|
-
case
|
|
8371
|
+
case N.ComponentProperty.X_AXIS:
|
|
8366
8372
|
this.value = this.states.includes(i) ? n : 0.5;
|
|
8367
8373
|
break;
|
|
8368
|
-
case
|
|
8374
|
+
case N.ComponentProperty.Y_AXIS:
|
|
8369
8375
|
this.value = this.states.includes(i) ? o : 0.5;
|
|
8370
8376
|
break;
|
|
8371
|
-
case
|
|
8377
|
+
case N.ComponentProperty.BUTTON:
|
|
8372
8378
|
this.value = this.states.includes(i) ? s : 0;
|
|
8373
8379
|
break;
|
|
8374
|
-
case
|
|
8375
|
-
this.valueNodeProperty ===
|
|
8380
|
+
case N.ComponentProperty.STATE:
|
|
8381
|
+
this.valueNodeProperty === N.VisualResponseProperty.VISIBILITY ? this.value = this.states.includes(i) : this.value = this.states.includes(i) ? 1 : 0;
|
|
8376
8382
|
break;
|
|
8377
8383
|
default:
|
|
8378
8384
|
throw new Error(`Unexpected visualResponse componentProperty ${this.componentProperty}`);
|
|
@@ -8391,7 +8397,7 @@ class jc {
|
|
|
8391
8397
|
const i = new zc(t.visualResponses[s]);
|
|
8392
8398
|
this.visualResponses[s] = i;
|
|
8393
8399
|
}), this.gamepadIndices = Object.assign({}, t.gamepadIndices), this.values = {
|
|
8394
|
-
state:
|
|
8400
|
+
state: N.ComponentState.DEFAULT,
|
|
8395
8401
|
button: this.gamepadIndices.button !== void 0 ? 0 : void 0,
|
|
8396
8402
|
xAxis: this.gamepadIndices.xAxis !== void 0 ? 0 : void 0,
|
|
8397
8403
|
yAxis: this.gamepadIndices.yAxis !== void 0 ? 0 : void 0
|
|
@@ -8405,11 +8411,11 @@ class jc {
|
|
|
8405
8411
|
* @param {Object} gamepad - The gamepad object from which the component data should be polled
|
|
8406
8412
|
*/
|
|
8407
8413
|
updateFromGamepad(e) {
|
|
8408
|
-
if (this.values.state =
|
|
8414
|
+
if (this.values.state = N.ComponentState.DEFAULT, this.gamepadIndices.button !== void 0 && e.buttons.length > this.gamepadIndices.button) {
|
|
8409
8415
|
const t = e.buttons[this.gamepadIndices.button];
|
|
8410
|
-
this.values.button = t.value, this.values.button = this.values.button < 0 ? 0 : this.values.button, this.values.button = this.values.button > 1 ? 1 : this.values.button, t.pressed || this.values.button === 1 ? this.values.state =
|
|
8416
|
+
this.values.button = t.value, this.values.button = this.values.button < 0 ? 0 : this.values.button, this.values.button = this.values.button > 1 ? 1 : this.values.button, t.pressed || this.values.button === 1 ? this.values.state = N.ComponentState.PRESSED : (t.touched || this.values.button > N.ButtonTouchThreshold) && (this.values.state = N.ComponentState.TOUCHED);
|
|
8411
8417
|
}
|
|
8412
|
-
this.gamepadIndices.xAxis !== void 0 && e.axes.length > this.gamepadIndices.xAxis && (this.values.xAxis = e.axes[this.gamepadIndices.xAxis], this.values.xAxis = this.values.xAxis < -1 ? -1 : this.values.xAxis, this.values.xAxis = this.values.xAxis > 1 ? 1 : this.values.xAxis, this.values.state ===
|
|
8418
|
+
this.gamepadIndices.xAxis !== void 0 && e.axes.length > this.gamepadIndices.xAxis && (this.values.xAxis = e.axes[this.gamepadIndices.xAxis], this.values.xAxis = this.values.xAxis < -1 ? -1 : this.values.xAxis, this.values.xAxis = this.values.xAxis > 1 ? 1 : this.values.xAxis, this.values.state === N.ComponentState.DEFAULT && Math.abs(this.values.xAxis) > N.AxisTouchThreshold && (this.values.state = N.ComponentState.TOUCHED)), this.gamepadIndices.yAxis !== void 0 && e.axes.length > this.gamepadIndices.yAxis && (this.values.yAxis = e.axes[this.gamepadIndices.yAxis], this.values.yAxis = this.values.yAxis < -1 ? -1 : this.values.yAxis, this.values.yAxis = this.values.yAxis > 1 ? 1 : this.values.yAxis, this.values.state === N.ComponentState.DEFAULT && Math.abs(this.values.yAxis) > N.AxisTouchThreshold && (this.values.state = N.ComponentState.TOUCHED)), Object.values(this.visualResponses).forEach((t) => {
|
|
8413
8419
|
t.updateFromComponent(this.values);
|
|
8414
8420
|
});
|
|
8415
8421
|
}
|
|
@@ -8484,7 +8490,7 @@ class Wc extends ns {
|
|
|
8484
8490
|
super.updateMatrixWorld(e), this.motionController && (this.motionController.updateFromGamepad(), Object.values(this.motionController.components).forEach((t) => {
|
|
8485
8491
|
Object.values(t.visualResponses).forEach((s) => {
|
|
8486
8492
|
const { valueNode: i, minNode: n, maxNode: o, value: r, valueNodeProperty: l } = s;
|
|
8487
|
-
i && (l ===
|
|
8493
|
+
i && (l === N.VisualResponseProperty.VISIBILITY ? i.visible = r : l === N.VisualResponseProperty.TRANSFORM && (i.quaternion.slerpQuaternions(
|
|
8488
8494
|
n.quaternion,
|
|
8489
8495
|
o.quaternion,
|
|
8490
8496
|
r
|
|
@@ -8500,7 +8506,7 @@ class Wc extends ns {
|
|
|
8500
8506
|
function Xc(a, e) {
|
|
8501
8507
|
Object.values(a.components).forEach((t) => {
|
|
8502
8508
|
const { type: s, touchPointNodeName: i, visualResponses: n } = t;
|
|
8503
|
-
if (s ===
|
|
8509
|
+
if (s === N.ComponentType.TOUCHPAD)
|
|
8504
8510
|
if (t.touchPointNode = e.getObjectByName(i), t.touchPointNode) {
|
|
8505
8511
|
const o = new Xn(1e-3), r = new ke({ color: 255 }), l = new as(o, r);
|
|
8506
8512
|
t.touchPointNode.add(l);
|
|
@@ -8508,7 +8514,7 @@ function Xc(a, e) {
|
|
|
8508
8514
|
console.warn(`Could not find touch dot, ${t.touchPointNodeName}, in touchpad component ${t.id}`);
|
|
8509
8515
|
Object.values(n).forEach((o) => {
|
|
8510
8516
|
const { valueNodeName: r, minNodeName: l, maxNodeName: c, valueNodeProperty: A } = o;
|
|
8511
|
-
if (A ===
|
|
8517
|
+
if (A === N.VisualResponseProperty.TRANSFORM) {
|
|
8512
8518
|
if (o.minNode = e.getObjectByName(l), o.maxNode = e.getObjectByName(c), !o.minNode) {
|
|
8513
8519
|
console.warn(`Could not find ${l} in the model`);
|
|
8514
8520
|
return;
|
|
@@ -8591,8 +8597,8 @@ class Zc {
|
|
|
8591
8597
|
class $c {
|
|
8592
8598
|
constructor(e, t) {
|
|
8593
8599
|
this.renderer = e, this.camera = t, this.controller1 = null, this.controller2 = null, this.controllerGrip1 = null, this.controllerGrip2 = null, this.controllers = [], this.controllerGrips = [], this.buttonStates = /* @__PURE__ */ new Map(), this.inputDeadzone = 0.15, this.turnSmoothingFactor = 0.1, this.lastTurnInput = 0, this.onSelectStart = null, this.onSelectEnd = null, this.onSqueezeStart = null, this.onSqueezeEnd = null, this.onModeToggle = null, this.onMovementStart = null, this.onMovementStop = null, this.handsActive = !1, this.handStates = {
|
|
8594
|
-
left: { pinch: !1, fist: !1, direction: new
|
|
8595
|
-
right: { pinch: !1, fist: !1, direction: new
|
|
8600
|
+
left: { pinch: !1, fist: !1, direction: new f.Vector3() },
|
|
8601
|
+
right: { pinch: !1, fist: !1, direction: new f.Vector3() }
|
|
8596
8602
|
}, this._fallbackHandedness = /* @__PURE__ */ new Map();
|
|
8597
8603
|
}
|
|
8598
8604
|
init() {
|
|
@@ -8621,26 +8627,26 @@ class $c {
|
|
|
8621
8627
|
if (!i || !n || !i.transform || !n.transform)
|
|
8622
8628
|
this.handStates[s].pinch = !1;
|
|
8623
8629
|
else {
|
|
8624
|
-
const l = new
|
|
8630
|
+
const l = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(i.transform.matrix)), c = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(n.transform.matrix)), A = l.distanceTo(c);
|
|
8625
8631
|
this.handStates[s].pinch = A < 0.025;
|
|
8626
8632
|
}
|
|
8627
8633
|
let o = !0;
|
|
8628
8634
|
const r = t.hand.get("wrist");
|
|
8629
8635
|
if (r && r.transform) {
|
|
8630
|
-
const l = new
|
|
8636
|
+
const l = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(r.transform.matrix));
|
|
8631
8637
|
for (const c of ["index-finger-tip", "middle-finger-tip", "ring-finger-tip", "pinky-finger-tip"]) {
|
|
8632
8638
|
const A = t.hand.get(c);
|
|
8633
8639
|
if (!A || !A.transform) {
|
|
8634
8640
|
o = !1;
|
|
8635
8641
|
continue;
|
|
8636
8642
|
}
|
|
8637
|
-
new
|
|
8643
|
+
new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(A.transform.matrix)).distanceTo(l) > 0.045 && (o = !1);
|
|
8638
8644
|
}
|
|
8639
8645
|
} else
|
|
8640
8646
|
o = !1;
|
|
8641
8647
|
if (this.handStates[s].fist = o, n && r && n.transform && r.transform) {
|
|
8642
|
-
const l = new
|
|
8643
|
-
this.handStates[s].direction = new
|
|
8648
|
+
const l = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(r.transform.matrix)), c = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(n.transform.matrix));
|
|
8649
|
+
this.handStates[s].direction = new f.Vector3().subVectors(c, l).normalize();
|
|
8644
8650
|
}
|
|
8645
8651
|
}
|
|
8646
8652
|
}
|
|
@@ -8776,7 +8782,7 @@ class eA {
|
|
|
8776
8782
|
neutralColor: 14870768,
|
|
8777
8783
|
accentColor: 9741240,
|
|
8778
8784
|
floorColor: 6583435
|
|
8779
|
-
}, this.teleportController = null, this.teleportMarker = null, this.teleportCurve = null, this.teleportFloor = null, this.validTeleportPosition = null, this.teleportThreshold = 0.7, this.teleportReleaseThreshold = 0.3, this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.
|
|
8785
|
+
}, this.teleportController = null, this.teleportMarker = null, this.teleportArch = null, this.teleportCurve = null, this.teleportFloor = null, this.validTeleportPosition = null, this.currentTeleportTarget = null, this.teleportThreshold = 0.7, this.teleportReleaseThreshold = 0.3, this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportMaxDistance = 20, this.teleportFloorHeight = null, this.teleportFloorMin = -10, this.teleportFloorMax = 10, this.lastSnapTurnTime = 0, this.onTeleport = null, this.onTeleportStart = null, this.onTeleportEnd = null;
|
|
8780
8786
|
}
|
|
8781
8787
|
init() {
|
|
8782
8788
|
this.setupTeleportation();
|
|
@@ -8786,39 +8792,51 @@ class eA {
|
|
|
8786
8792
|
}
|
|
8787
8793
|
createTeleportArc() {
|
|
8788
8794
|
const e = [
|
|
8789
|
-
new
|
|
8790
|
-
new
|
|
8791
|
-
], t = new
|
|
8795
|
+
new f.Vector3(0, 0, 0),
|
|
8796
|
+
new f.Vector3(0, 1, -5)
|
|
8797
|
+
], t = new f.CatmullRomCurve3(e), s = new f.TubeGeometry(t, 20, 0.03, 8, !1), i = new f.MeshBasicMaterial({
|
|
8792
8798
|
color: this.style.accentColor,
|
|
8793
8799
|
transparent: !0,
|
|
8794
8800
|
opacity: 0.62,
|
|
8795
|
-
side:
|
|
8801
|
+
side: f.DoubleSide
|
|
8796
8802
|
});
|
|
8797
|
-
if (this.teleportCurve = new
|
|
8798
|
-
const n = new
|
|
8803
|
+
if (this.teleportCurve = new f.Mesh(s, i), this.teleportCurve.visible = !1, this.scene.add(this.teleportCurve), !this.teleportMarker) {
|
|
8804
|
+
const n = new f.RingGeometry(0.34, 0.5, 28), o = new f.MeshBasicMaterial({
|
|
8799
8805
|
color: this.style.neutralColor,
|
|
8800
8806
|
transparent: !0,
|
|
8801
8807
|
opacity: 0.78,
|
|
8802
|
-
side:
|
|
8808
|
+
side: f.DoubleSide
|
|
8803
8809
|
});
|
|
8804
|
-
this.teleportMarker = new
|
|
8805
|
-
|
|
8810
|
+
this.teleportMarker = new f.Mesh(n, o), this.teleportMarker.rotation.x = -Math.PI / 2, this.teleportMarker.visible = !1, this.scene.add(this.teleportMarker);
|
|
8811
|
+
}
|
|
8812
|
+
if (!this.teleportArch) {
|
|
8813
|
+
const r = 0.07999999999999999, l = 0.34 + r, c = [];
|
|
8814
|
+
for (let u = 0; u <= 24; u++) {
|
|
8815
|
+
const g = u / 24 * Math.PI;
|
|
8816
|
+
c.push(new f.Vector3(
|
|
8817
|
+
Math.cos(g) * l,
|
|
8818
|
+
Math.sin(g) * l,
|
|
8819
|
+
0
|
|
8820
|
+
));
|
|
8821
|
+
}
|
|
8822
|
+
const A = new f.CatmullRomCurve3(c), h = new f.TubeGeometry(A, 24, r, 8, !1), d = new f.MeshBasicMaterial({
|
|
8806
8823
|
color: this.style.accentColor,
|
|
8807
8824
|
transparent: !0,
|
|
8808
|
-
opacity: 0.
|
|
8809
|
-
side:
|
|
8810
|
-
|
|
8811
|
-
|
|
8825
|
+
opacity: 0.24,
|
|
8826
|
+
side: f.DoubleSide,
|
|
8827
|
+
depthWrite: !1
|
|
8828
|
+
});
|
|
8829
|
+
this.teleportArch = new f.Mesh(h, d), this.teleportArch.visible = !1, this.scene.add(this.teleportArch);
|
|
8812
8830
|
}
|
|
8813
8831
|
if (!this.teleportFloor) {
|
|
8814
|
-
const n = new
|
|
8832
|
+
const n = new f.PlaneGeometry(14, 14), o = new f.MeshBasicMaterial({
|
|
8815
8833
|
color: this.style.floorColor,
|
|
8816
8834
|
transparent: !0,
|
|
8817
8835
|
opacity: 0.06,
|
|
8818
|
-
side:
|
|
8836
|
+
side: f.DoubleSide,
|
|
8819
8837
|
visible: !1
|
|
8820
8838
|
});
|
|
8821
|
-
this.teleportFloor = new
|
|
8839
|
+
this.teleportFloor = new f.Mesh(n, o), this.teleportFloor.rotation.x = -Math.PI / 2, this.teleportFloor.visible = !1, this.scene.add(this.teleportFloor);
|
|
8822
8840
|
}
|
|
8823
8841
|
}
|
|
8824
8842
|
executeTeleport() {
|
|
@@ -8837,6 +8855,7 @@ class eA {
|
|
|
8837
8855
|
o();
|
|
8838
8856
|
}
|
|
8839
8857
|
processSnapTurn(e, t = 30) {
|
|
8858
|
+
if (this.teleportPressed) return;
|
|
8840
8859
|
this.lastSnapTurnTime || (this.lastSnapTurnTime = 0);
|
|
8841
8860
|
const s = Date.now();
|
|
8842
8861
|
if (!(s - this.lastSnapTurnTime < 500) && Math.abs(e) > 0.7) {
|
|
@@ -8849,91 +8868,124 @@ class eA {
|
|
|
8849
8868
|
for (; e < -Math.PI; ) e += 2 * Math.PI;
|
|
8850
8869
|
return e;
|
|
8851
8870
|
}
|
|
8852
|
-
processTeleportation(e, t
|
|
8853
|
-
const
|
|
8854
|
-
if (
|
|
8855
|
-
this.teleportPressed = !0, this.teleportMaxMagnitude =
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
this.teleportFloorHeight += o * r, this.teleportFloorHeight = Math.max(this.teleportFloorMin, Math.min(this.teleportFloorMax, this.teleportFloorHeight)), this.updateTeleportFloor();
|
|
8860
|
-
}
|
|
8861
|
-
this.updateTeleportArc(), i < this.teleportReleaseThreshold && (this.calculateAndExecuteTeleport(), this.hideTeleportArc(), this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportController = null, this.onTeleportEnd && this.onTeleportEnd());
|
|
8862
|
-
}
|
|
8871
|
+
processTeleportation(e, t) {
|
|
8872
|
+
const s = Math.abs(t);
|
|
8873
|
+
if (s > this.teleportThreshold && !this.teleportPressed) {
|
|
8874
|
+
this.teleportPressed = !0, this.teleportMaxMagnitude = s, this.teleportController = e;
|
|
8875
|
+
const i = this.camera.parent.position.y;
|
|
8876
|
+
this.teleportFloorHeight = i, this.teleportFloorMin = i - 10, this.teleportFloorMax = i + 10, this.showTeleportArc(), this.onTeleportStart && this.onTeleportStart();
|
|
8877
|
+
} else this.teleportPressed && (this.teleportMaxMagnitude = Math.max(this.teleportMaxMagnitude, s), this.updateTeleportArc(), s < this.teleportReleaseThreshold && (this.calculateAndExecuteTeleport(), this.hideTeleportArc(), this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportController = null, this.onTeleportEnd && this.onTeleportEnd()));
|
|
8863
8878
|
}
|
|
8864
8879
|
showTeleportArc() {
|
|
8865
|
-
this.teleportCurve || this.createTeleportArc(), this.teleportCurve.visible = !0, this.teleportMarker && (this.teleportMarker.visible = !
|
|
8880
|
+
this.teleportCurve || this.createTeleportArc(), this.teleportCurve.visible = !0, this.teleportMarker && (this.teleportMarker.visible = !1), this.teleportArch && (this.teleportArch.visible = !1), this.updateTeleportFloor();
|
|
8866
8881
|
}
|
|
8867
8882
|
hideTeleportArc() {
|
|
8868
|
-
this.teleportCurve && (this.teleportCurve.visible = !1), this.teleportMarker && (this.teleportMarker.visible = !1, this.
|
|
8883
|
+
this.teleportCurve && (this.teleportCurve.visible = !1), this.teleportMarker && (this.teleportMarker.visible = !1), this.teleportArch && (this.teleportArch.visible = !1), this.teleportFloor && (this.teleportFloor.visible = !1), this.currentTeleportTarget = null;
|
|
8869
8884
|
}
|
|
8870
8885
|
updateTeleportArc() {
|
|
8871
8886
|
if (!this.teleportController || !this.teleportCurve) return;
|
|
8872
|
-
const e = new
|
|
8873
|
-
this.teleportController.
|
|
8874
|
-
const t = new
|
|
8875
|
-
|
|
8876
|
-
const s = new
|
|
8877
|
-
s.
|
|
8878
|
-
const i =
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
|
|
8887
|
+
const e = new f.Quaternion();
|
|
8888
|
+
this.teleportController.getWorldQuaternion(e);
|
|
8889
|
+
const t = new f.Vector3(0, 0, -1);
|
|
8890
|
+
t.applyQuaternion(e);
|
|
8891
|
+
const s = new f.Vector3();
|
|
8892
|
+
this.teleportController.getWorldPosition(s), s.addScaledVector(t, 0.07);
|
|
8893
|
+
const i = Math.sqrt(t.x * t.x + t.z * t.z);
|
|
8894
|
+
if (i < 0.12 && t.y > 0) {
|
|
8895
|
+
const S = new f.Vector3();
|
|
8896
|
+
if (this.camera.getWorldDirection(S), S.y = 0, S.lengthSq() > 0) {
|
|
8897
|
+
S.normalize();
|
|
8898
|
+
const Q = 0.12 - i;
|
|
8899
|
+
t.x += S.x * Q, t.z += S.z * Q, t.normalize();
|
|
8900
|
+
}
|
|
8901
|
+
}
|
|
8902
|
+
const n = this.teleportMaxDistance, o = Math.min(this.teleportMaxMagnitude / this.teleportThreshold, 1), r = Math.pow(o, 0.78), l = n * r, c = [], A = 32, h = -9.8, d = this.teleportFloorHeight, u = d - s.y;
|
|
8903
|
+
let g = Math.sqrt(l * Math.abs(h) / 2);
|
|
8904
|
+
t.y < 0 && (g *= Math.max(0.25, 1 - Math.abs(t.y) * 0.75));
|
|
8905
|
+
const p = t.x * g, b = t.z * g;
|
|
8906
|
+
let C = (t.y + 0.15) * g;
|
|
8907
|
+
if (u > 0.5) {
|
|
8908
|
+
const S = Math.sqrt(2 * Math.abs(h) * u) * 1.2;
|
|
8909
|
+
C = Math.max(C, S);
|
|
8910
|
+
}
|
|
8911
|
+
const E = C / Math.abs(h), y = 0.4 + (1 - Math.max(0, -t.y)) * 1.1, m = Math.max(E * 2.2, y);
|
|
8912
|
+
let I = null, w = !1, B = s.y, x = 0;
|
|
8913
|
+
const v = Math.max(8, Math.abs(u) * 1.5 + 2);
|
|
8914
|
+
for (let S = 0; S <= A; S++) {
|
|
8915
|
+
const Q = S / A * m, D = new f.Vector3(
|
|
8916
|
+
s.x + p * Q,
|
|
8917
|
+
s.y + C * Q + 0.5 * h * Q * Q,
|
|
8918
|
+
s.z + b * Q
|
|
8892
8919
|
);
|
|
8893
|
-
Math.abs(
|
|
8894
|
-
const
|
|
8895
|
-
if (!I &&
|
|
8896
|
-
if (
|
|
8897
|
-
const
|
|
8898
|
-
I = new
|
|
8920
|
+
Math.abs(D.y - s.y) > v && (D.y = s.y + Math.sign(D.y - s.y) * v), !w && D.y < B && (w = !0, x = Q), c.push(D);
|
|
8921
|
+
const G = w ? Q - x : 0, T = w && G > 0.1;
|
|
8922
|
+
if (!I && T && D.y <= d) {
|
|
8923
|
+
if (S > 0) {
|
|
8924
|
+
const U = c[S - 1], F = (d - U.y) / (D.y - U.y);
|
|
8925
|
+
I = new f.Vector3().lerpVectors(U, D, F), I.y = d;
|
|
8899
8926
|
} else
|
|
8900
|
-
I =
|
|
8901
|
-
|
|
8927
|
+
I = D.clone(), I.y = d;
|
|
8928
|
+
c[S] = I, c.length = S + 1;
|
|
8902
8929
|
break;
|
|
8903
8930
|
}
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8931
|
+
B = D.y;
|
|
8932
|
+
const K = Math.sqrt(
|
|
8933
|
+
Math.pow(D.x - s.x, 2) + Math.pow(D.z - s.z, 2)
|
|
8934
|
+
);
|
|
8935
|
+
if (T && K > n) {
|
|
8936
|
+
if (S > 0) {
|
|
8937
|
+
const U = c[S - 1], F = Math.sqrt(
|
|
8938
|
+
Math.pow(U.x - s.x, 2) + Math.pow(U.z - s.z, 2)
|
|
8939
|
+
), O = K > F ? (n - F) / (K - F) : 0.5;
|
|
8940
|
+
I = new f.Vector3(
|
|
8941
|
+
U.x + (D.x - U.x) * O,
|
|
8942
|
+
d,
|
|
8943
|
+
U.z + (D.z - U.z) * O
|
|
8944
|
+
), c[S] = I, c.length = S + 1;
|
|
8945
|
+
}
|
|
8908
8946
|
break;
|
|
8909
8947
|
}
|
|
8910
8948
|
}
|
|
8911
|
-
if (!I &&
|
|
8912
|
-
let
|
|
8913
|
-
for (let
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
}
|
|
8917
|
-
if (
|
|
8918
|
-
const
|
|
8919
|
-
this.teleportCurve.geometry && this.teleportCurve.geometry.dispose(), this.teleportCurve.geometry =
|
|
8920
|
-
}
|
|
8921
|
-
this.teleportMarker && I
|
|
8949
|
+
if (!I && c.length > 0) {
|
|
8950
|
+
let S = c[0], Q = 0;
|
|
8951
|
+
for (let D = 1; D < c.length; D++)
|
|
8952
|
+
c[D].y < S.y && (S = c[D], Q = D);
|
|
8953
|
+
Q > c.length / 3 && (I = new f.Vector3(S.x, d, S.z), c.length = Q + 1, c[Q] = I);
|
|
8954
|
+
}
|
|
8955
|
+
if (c.length > 1) {
|
|
8956
|
+
const S = new f.CatmullRomCurve3(c, !1, "centripetal"), Q = new f.TubeGeometry(S, 20, 0.012, 6, !1);
|
|
8957
|
+
this.teleportCurve.geometry && this.teleportCurve.geometry.dispose(), this.teleportCurve.geometry = Q;
|
|
8958
|
+
}
|
|
8959
|
+
if (this.currentTeleportTarget = I ? I.clone() : null, this.teleportMarker && (I ? (this.teleportMarker.position.copy(I), this.teleportMarker.rotation.set(-Math.PI / 2, 0, 0), this.teleportMarker.material.opacity = 0.78, this.teleportMarker.material.color.setHex(this.style.neutralColor), this.teleportMarker.visible = !0) : this.teleportMarker.visible = !1), this.teleportArch)
|
|
8960
|
+
if (I) {
|
|
8961
|
+
this.teleportArch.position.copy(I);
|
|
8962
|
+
const S = new f.Vector3();
|
|
8963
|
+
this.camera.getWorldPosition(S);
|
|
8964
|
+
const Q = new f.Vector3(
|
|
8965
|
+
S.x,
|
|
8966
|
+
I.y,
|
|
8967
|
+
S.z
|
|
8968
|
+
);
|
|
8969
|
+
this.teleportArch.lookAt(Q);
|
|
8970
|
+
const D = S.distanceTo(I), G = f.MathUtils.clamp((D - 2.5) / 7.5, 0, 1);
|
|
8971
|
+
this.teleportArch.material.opacity = 0.24 * G, this.teleportArch.visible = G > 0.01;
|
|
8972
|
+
} else
|
|
8973
|
+
this.teleportArch.visible = !1;
|
|
8922
8974
|
}
|
|
8923
8975
|
updateTeleportFloor() {
|
|
8924
|
-
this.
|
|
8976
|
+
this.teleportFloorHeight !== null && (this.teleportFloor && (this.teleportFloor.position.y = this.teleportFloorHeight), this.updateTeleportArc());
|
|
8925
8977
|
}
|
|
8926
8978
|
updateTeleportArcHeight() {
|
|
8927
8979
|
this.updateTeleportFloor();
|
|
8928
8980
|
}
|
|
8929
8981
|
calculateAndExecuteTeleport() {
|
|
8930
|
-
if (!(!this.teleportController || this.teleportMaxMagnitude < this.teleportThreshold) && this.
|
|
8931
|
-
const e = this.
|
|
8982
|
+
if (!(!this.teleportController || this.teleportMaxMagnitude < this.teleportThreshold) && this.currentTeleportTarget) {
|
|
8983
|
+
const e = this.currentTeleportTarget.clone(), t = this.camera.parent.position;
|
|
8984
|
+
if (Math.sqrt(
|
|
8932
8985
|
Math.pow(e.x - t.x, 2) + Math.pow(e.z - t.z, 2)
|
|
8933
|
-
)
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
this.validTeleportPosition = i, this.executeTeleport(), this.teleportFloorHeight = null;
|
|
8986
|
+
) <= this.teleportMaxDistance) {
|
|
8987
|
+
const i = new f.Vector3(e.x, this.teleportFloorHeight, e.z);
|
|
8988
|
+
this.validTeleportPosition = i, this.executeTeleport(), this.teleportFloorHeight = null, this.currentTeleportTarget = null;
|
|
8937
8989
|
}
|
|
8938
8990
|
}
|
|
8939
8991
|
}
|
|
@@ -8953,7 +9005,7 @@ class eA {
|
|
|
8953
9005
|
this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportController = null, this.validTeleportPosition = null, this.hideTeleportArc();
|
|
8954
9006
|
}
|
|
8955
9007
|
dispose() {
|
|
8956
|
-
this.teleportCurve && (this.teleportCurve.geometry && this.teleportCurve.geometry.dispose(), this.teleportCurve.material && this.teleportCurve.material.dispose(), this.scene.remove(this.teleportCurve)), this.teleportMarker && (this.teleportMarker.geometry && this.teleportMarker.geometry.dispose(), this.teleportMarker.material && this.teleportMarker.material.dispose(), this.scene.remove(this.teleportMarker)), this.teleportFloor && (this.teleportFloor.geometry && this.teleportFloor.geometry.dispose(), this.teleportFloor.material && this.teleportFloor.material.dispose(), this.scene.remove(this.teleportFloor)), this.resetTeleportState();
|
|
9008
|
+
this.teleportCurve && (this.teleportCurve.geometry && this.teleportCurve.geometry.dispose(), this.teleportCurve.material && this.teleportCurve.material.dispose(), this.scene.remove(this.teleportCurve)), this.teleportMarker && (this.teleportMarker.geometry && this.teleportMarker.geometry.dispose(), this.teleportMarker.material && this.teleportMarker.material.dispose(), this.scene.remove(this.teleportMarker)), this.teleportArch && (this.teleportArch.geometry && this.teleportArch.geometry.dispose(), this.teleportArch.material && this.teleportArch.material.dispose(), this.scene.remove(this.teleportArch)), this.teleportFloor && (this.teleportFloor.geometry && this.teleportFloor.geometry.dispose(), this.teleportFloor.material && this.teleportFloor.material.dispose(), this.scene.remove(this.teleportFloor)), this.resetTeleportState();
|
|
8957
9009
|
}
|
|
8958
9010
|
resetSnapTurnState() {
|
|
8959
9011
|
this.lastSnapTurnTime = 0;
|
|
@@ -8961,7 +9013,7 @@ class eA {
|
|
|
8961
9013
|
}
|
|
8962
9014
|
class tA {
|
|
8963
9015
|
constructor(e, t) {
|
|
8964
|
-
this.camera = e, this.renderer = t, this.MOVE_SPEED = 2, this.TURN_SPEED = 1.5, this.FLY_SPEED = 1, this.currentSpeed = 0, this.targetSpeed = 0, this.currentBoostLevel = 0, this.targetBoostLevel = 0, this.SPEED_RAMP_RATE = 3, this.BOOST_RAMP_RATE = 6, this.handMoveActive = !1, this.handMoveBoost = !1, this.handMoveDirection = new
|
|
9016
|
+
this.camera = e, this.renderer = t, this.MOVE_SPEED = 2, this.TURN_SPEED = 1.5, this.FLY_SPEED = 1, this.currentSpeed = 0, this.targetSpeed = 0, this.currentBoostLevel = 0, this.targetBoostLevel = 0, this.SPEED_RAMP_RATE = 3, this.BOOST_RAMP_RATE = 6, this.handMoveActive = !1, this.handMoveBoost = !1, this.handMoveDirection = new f.Vector3(), this.isMoving = !1, this.inputDeadzone = 0.15, this.turnSmoothingFactor = 0.1, this.lastTurnInput = 0, this.comfortSettings = {
|
|
8965
9017
|
locomotionMode: "smooth",
|
|
8966
9018
|
// 'smooth', 'teleport'
|
|
8967
9019
|
turningMode: "smooth",
|
|
@@ -8998,7 +9050,7 @@ class tA {
|
|
|
8998
9050
|
if (s && t.updateHandGestures && t.handsActive) {
|
|
8999
9051
|
t.updateHandGestures();
|
|
9000
9052
|
let u = null;
|
|
9001
|
-
const g = new
|
|
9053
|
+
const g = new f.Vector3();
|
|
9002
9054
|
let p = !1;
|
|
9003
9055
|
for (const b of ["left", "right"])
|
|
9004
9056
|
if (t.handStates[b].pinch) {
|
|
@@ -9007,8 +9059,8 @@ class tA {
|
|
|
9007
9059
|
}
|
|
9008
9060
|
if (u) {
|
|
9009
9061
|
this.handMoveActive = !0, this.handMoveBoost = p, this.handMoveDirection.copy(g);
|
|
9010
|
-
const b = this.camera.parent || this.camera,
|
|
9011
|
-
b.position.addScaledVector(g,
|
|
9062
|
+
const b = this.camera.parent || this.camera, C = this.MOVE_SPEED * (p ? 3 : 1) * e;
|
|
9063
|
+
b.position.addScaledVector(g, C), this.isMoving = !0, this.onMovementStart && !this._wasMoving && this.onMovementStart(), this.onMovementUpdate && this.onMovementUpdate({
|
|
9012
9064
|
isMoving: !0,
|
|
9013
9065
|
currentSpeed: this.MOVE_SPEED,
|
|
9014
9066
|
isBoosted: p,
|
|
@@ -9024,49 +9076,51 @@ class tA {
|
|
|
9024
9076
|
const g = i[u];
|
|
9025
9077
|
if (!g || !g.gamepad || !g.gamepad.buttons || !g.gamepad.axes || g.gamepad.axes.length < 4)
|
|
9026
9078
|
continue;
|
|
9027
|
-
const p = g.gamepad,
|
|
9028
|
-
if (!
|
|
9029
|
-
const
|
|
9079
|
+
const p = g.gamepad, C = g.handedness === "left" ? t.controller1 : t.controller2;
|
|
9080
|
+
if (!C) continue;
|
|
9081
|
+
const E = p.axes[2] || 0, y = p.axes[3] || 0, m = this.comfortSettings.locomotionMode === "teleport" && this.teleportSystem && C, I = this.teleportSystem && this.teleportSystem.teleportPressed, w = I && this.teleportSystem.teleportController === C, B = I && !w;
|
|
9030
9082
|
if (g.handedness === "left") {
|
|
9031
|
-
const
|
|
9032
|
-
if (
|
|
9033
|
-
this.teleportSystem.processTeleportation(
|
|
9083
|
+
const x = p.buttons[1], v = x && x.pressed ? 3 : 1, S = this.comfortSettings.reducedMotion ? this.comfortSettings.comfortSpeed : 1;
|
|
9084
|
+
if (x && x.pressed && (r = !0), m && (w || !I)) {
|
|
9085
|
+
this.teleportSystem.processTeleportation(C, y), this.comfortSettings.turningMode === "snap" && this.teleportSystem.processSnapTurn(E, this.comfortSettings.snapTurnAngle);
|
|
9034
9086
|
continue;
|
|
9035
|
-
} else
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
const
|
|
9087
|
+
} else if (B)
|
|
9088
|
+
Math.abs(y) > 0.1 && this.teleportSystem.adjustFloorHeight(-y * (4 * e));
|
|
9089
|
+
else {
|
|
9090
|
+
const Q = new f.Vector3();
|
|
9091
|
+
this.camera.getWorldDirection(Q), Q.y = 0, Q.normalize();
|
|
9092
|
+
const D = new f.Vector3().crossVectors(Q, this.camera.up).normalize();
|
|
9039
9093
|
if (Math.abs(y) > 0.1) {
|
|
9040
|
-
const
|
|
9041
|
-
n.position.addScaledVector(
|
|
9094
|
+
const G = this.MOVE_SPEED * v * S * this.currentSpeed * e;
|
|
9095
|
+
n.position.addScaledVector(Q, -y * G), o = !0;
|
|
9042
9096
|
}
|
|
9043
|
-
if (Math.abs(
|
|
9044
|
-
const
|
|
9045
|
-
n.position.addScaledVector(
|
|
9097
|
+
if (Math.abs(E) > 0.1) {
|
|
9098
|
+
const G = this.MOVE_SPEED * v * S * this.currentSpeed * e;
|
|
9099
|
+
n.position.addScaledVector(D, E * G), o = !0;
|
|
9046
9100
|
}
|
|
9047
9101
|
}
|
|
9048
9102
|
}
|
|
9049
9103
|
if (g.handedness === "right") {
|
|
9050
|
-
const
|
|
9051
|
-
if (
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9104
|
+
const x = p.buttons[1], v = x && x.pressed ? 3 : 1, S = this.comfortSettings.reducedMotion ? this.comfortSettings.comfortSpeed : 1;
|
|
9105
|
+
if (x && x.pressed && Math.abs(y) > 0.1 && (r = !0), m && (w || !I)) {
|
|
9106
|
+
this.teleportSystem.processTeleportation(C, y), this.comfortSettings.turningMode === "snap" && this.teleportSystem.processSnapTurn(E, this.comfortSettings.snapTurnAngle);
|
|
9107
|
+
continue;
|
|
9108
|
+
} else if (B)
|
|
9109
|
+
Math.abs(y) > 0.1 && this.teleportSystem.adjustFloorHeight(-y * (4 * e));
|
|
9110
|
+
else {
|
|
9057
9111
|
if (this.comfortSettings.turningMode === "snap" && this.teleportSystem)
|
|
9058
|
-
this.teleportSystem.processSnapTurn(
|
|
9059
|
-
else if (Math.abs(
|
|
9060
|
-
const
|
|
9061
|
-
if (this.lastTurnInput =
|
|
9062
|
-
const
|
|
9063
|
-
n.rotation.y -=
|
|
9112
|
+
this.teleportSystem.processSnapTurn(E, this.comfortSettings.snapTurnAngle);
|
|
9113
|
+
else if (Math.abs(E) > this.inputDeadzone) {
|
|
9114
|
+
const Q = this.lastTurnInput * this.turnSmoothingFactor + E * (1 - this.turnSmoothingFactor);
|
|
9115
|
+
if (this.lastTurnInput = Q, Math.abs(Q) > this.inputDeadzone) {
|
|
9116
|
+
const D = this.comfortSettings.reducedMotion ? this.TURN_SPEED * 0.5 : this.TURN_SPEED, G = Q * D * Math.min(e, 1 / 30);
|
|
9117
|
+
n.rotation.y -= G, n.rotation.y = this.normalizeAngle(n.rotation.y);
|
|
9064
9118
|
}
|
|
9065
9119
|
} else
|
|
9066
9120
|
this.lastTurnInput *= 0.9;
|
|
9067
|
-
if (Math.abs(y) > 0.1) {
|
|
9068
|
-
const
|
|
9069
|
-
n.position.y -= y *
|
|
9121
|
+
if (Math.abs(y) > 0.1 && this.comfortSettings.locomotionMode !== "teleport") {
|
|
9122
|
+
const Q = this.FLY_SPEED * v * S * this.currentSpeed * e;
|
|
9123
|
+
n.position.y -= y * Q, o = !0;
|
|
9070
9124
|
}
|
|
9071
9125
|
}
|
|
9072
9126
|
}
|
|
@@ -9745,7 +9799,7 @@ class oA {
|
|
|
9745
9799
|
this.buttonObserver && (this.buttonObserver.disconnect(), this.buttonObserver = null), this.arButton && this.arButton.parentNode && this.arButton.parentNode.removeChild(this.arButton), this.isQuest2 = !1, this.isQuest3 = !1, this.isARSupported = !1, this.isARPresenting = !1;
|
|
9746
9800
|
}
|
|
9747
9801
|
}
|
|
9748
|
-
const Mn = new P(), xn = new
|
|
9802
|
+
const Mn = new P(), xn = new M();
|
|
9749
9803
|
class Qn {
|
|
9750
9804
|
/**
|
|
9751
9805
|
* Constructs a new XR hand primitive model.
|
|
@@ -9925,11 +9979,11 @@ class cA {
|
|
|
9925
9979
|
}
|
|
9926
9980
|
class AA {
|
|
9927
9981
|
constructor(e) {
|
|
9928
|
-
this.renderer = e, this.handModelFactory = new cA(), this.hand1 = null, this.hand2 = null, this.interactionEnabled = !0, this.dragging = !1, this.scaling = !1, this.rotating = !1, this.dragStartPos = new
|
|
9982
|
+
this.renderer = e, this.handModelFactory = new cA(), this.hand1 = null, this.hand2 = null, this.interactionEnabled = !0, this.dragging = !1, this.scaling = !1, this.rotating = !1, this.dragStartPos = new f.Vector3(), this.scaleStartDistance = 0, this.rotateStartAngle = 0, this.pinchIntent = {
|
|
9929
9983
|
hand1Start: 0,
|
|
9930
9984
|
hand2Start: 0,
|
|
9931
9985
|
delay: 100
|
|
9932
|
-
}, this.inertiaActive = !1, this.posVelocity = new
|
|
9986
|
+
}, this.inertiaActive = !1, this.posVelocity = new f.Vector3(), this.rotVelocity = 0, this.scaleVelocity = 0, this.POSITION_DAMPING = 100, this.ROTATION_DAMPING = 8, this.SCALE_DAMPING = 8, this.MAX_ROT_VELOCITY = Math.PI, this.MAX_SCALE_VELOCITY = 0.5, this.MIN_SCALE = 0.01, this.MAX_SCALE = 1, this.VELOCITY_DEAD_ZONE = 1e-3, this.DISTANCE_GAIN_THRESHOLD = 5, this.MAX_DISTANCE_GAIN = 3, this.MAX_DELTA_PER_FRAME = 0.5, this.VELOCITY_SMOOTHING = 0.3, this.tempVec1 = new f.Vector3(), this.tempVec2 = new f.Vector3(), this.onGestureStart = null, this.onGestureEnd = null;
|
|
9933
9987
|
}
|
|
9934
9988
|
init(e) {
|
|
9935
9989
|
this.hand1 = this.setupHand(e, 0, "hand1Start"), this.hand2 = this.setupHand(e, 1, "hand2Start");
|
|
@@ -9948,7 +10002,7 @@ class AA {
|
|
|
9948
10002
|
}
|
|
9949
10003
|
styleHandModel(e, t, s) {
|
|
9950
10004
|
e.traverse((i) => {
|
|
9951
|
-
i.isMesh && (i.material = new
|
|
10005
|
+
i.isMesh && (i.material = new f.MeshStandardMaterial({
|
|
9952
10006
|
color: t,
|
|
9953
10007
|
roughness: 0.8,
|
|
9954
10008
|
metalness: 0.2,
|
|
@@ -9999,17 +10053,17 @@ class AA {
|
|
|
9999
10053
|
} else {
|
|
10000
10054
|
const c = this.tempVec1.distanceTo(this.tempVec2), A = c / this.scaleStartDistance, h = Math.log(t.scale.x), d = Math.log(A), u = h + d, g = Math.max(this.MIN_SCALE, Math.min(this.MAX_SCALE, Math.exp(u)));
|
|
10001
10055
|
if (t.scale.setScalar(g), e > 0) {
|
|
10002
|
-
const y = d / e,
|
|
10003
|
-
this.scaleVelocity = this.scaleVelocity * (1 - this.VELOCITY_SMOOTHING) +
|
|
10056
|
+
const y = d / e, m = Math.max(-this.MAX_SCALE_VELOCITY, Math.min(this.MAX_SCALE_VELOCITY, y));
|
|
10057
|
+
this.scaleVelocity = this.scaleVelocity * (1 - this.VELOCITY_SMOOTHING) + m * this.VELOCITY_SMOOTHING;
|
|
10004
10058
|
}
|
|
10005
10059
|
this.scaleStartDistance = c;
|
|
10006
|
-
const p = this.tempVec2.x - this.tempVec1.x, b = this.tempVec2.z - this.tempVec1.z,
|
|
10007
|
-
let
|
|
10008
|
-
if (
|
|
10009
|
-
const y = -
|
|
10010
|
-
this.rotVelocity = this.rotVelocity * (1 - this.VELOCITY_SMOOTHING) +
|
|
10060
|
+
const p = this.tempVec2.x - this.tempVec1.x, b = this.tempVec2.z - this.tempVec1.z, C = Math.atan2(b, p);
|
|
10061
|
+
let E = C - this.rotateStartAngle;
|
|
10062
|
+
if (E > Math.PI && (E -= 2 * Math.PI), E < -Math.PI && (E += 2 * Math.PI), t.rotation.y -= E, e > 0) {
|
|
10063
|
+
const y = -E / e, m = Math.max(-this.MAX_ROT_VELOCITY, Math.min(this.MAX_ROT_VELOCITY, y));
|
|
10064
|
+
this.rotVelocity = this.rotVelocity * (1 - this.VELOCITY_SMOOTHING) + m * this.VELOCITY_SMOOTHING;
|
|
10011
10065
|
}
|
|
10012
|
-
this.rotateStartAngle =
|
|
10066
|
+
this.rotateStartAngle = C;
|
|
10013
10067
|
}
|
|
10014
10068
|
}
|
|
10015
10069
|
onPinchEnd() {
|
|
@@ -10048,7 +10102,7 @@ class hA extends yt {
|
|
|
10048
10102
|
worldCubeSize: 1e3,
|
|
10049
10103
|
worldCubeOpacity: 0.1,
|
|
10050
10104
|
...i
|
|
10051
|
-
}, this.container = n, this.arCore = new oA(e, t, s, n), this.handTracking = this.config.enableHandTracking ? new AA(e) : null, this.modelGroup = new
|
|
10105
|
+
}, this.container = n, this.arCore = new oA(e, t, s, n), this.handTracking = this.config.enableHandTracking ? new AA(e) : null, this.modelGroup = new f.Group(), this.modelGroup.name = "AR Model Group", this.scene.add(this.modelGroup), this.currentModel = null, this.pendingModel = null, this.pendingModelConfig = null, this.currentModelScale = this.config.defaultScale, this.worldCube = null, this.config.enableWorldCube && this.createWorldCube(), this.isARPresenting = !1, this.previousGestureType = null, this.init();
|
|
10052
10106
|
}
|
|
10053
10107
|
init() {
|
|
10054
10108
|
this.arCore.init(), this.handTracking && (this.handTracking.init(this.scene), this.handTracking.onGestureStart = (e) => {
|
|
@@ -10086,14 +10140,14 @@ class hA extends yt {
|
|
|
10086
10140
|
this.handTracking && this.handTracking.update(t, this.modelGroup, this.camera);
|
|
10087
10141
|
}
|
|
10088
10142
|
createWorldCube() {
|
|
10089
|
-
const e = this.config.worldCubeSize, t = new
|
|
10143
|
+
const e = this.config.worldCubeSize, t = new f.BoxGeometry(e, e, e), s = new f.MeshBasicMaterial({
|
|
10090
10144
|
color: 0,
|
|
10091
10145
|
transparent: !0,
|
|
10092
10146
|
opacity: this.config.worldCubeOpacity,
|
|
10093
|
-
side:
|
|
10147
|
+
side: f.BackSide,
|
|
10094
10148
|
depthWrite: !1
|
|
10095
10149
|
});
|
|
10096
|
-
this.worldCube = new
|
|
10150
|
+
this.worldCube = new f.Mesh(t, s), this.worldCube.name = "AR World Cube", this.worldCube.visible = !1, this.scene.add(this.worldCube);
|
|
10097
10151
|
}
|
|
10098
10152
|
setWorldCubeOpacity(e) {
|
|
10099
10153
|
this.worldCube && (this.worldCube.material.opacity = Math.max(0, Math.min(1, e)));
|
|
@@ -10416,33 +10470,33 @@ class dA extends yt {
|
|
|
10416
10470
|
}
|
|
10417
10471
|
init() {
|
|
10418
10472
|
try {
|
|
10419
|
-
this.initRenderer(), this.sceneManager = new Zr(this.config.scene), this.cameraManager = new ua(this.config.camera), this.modelLoader = new
|
|
10473
|
+
this.initRenderer(), this.sceneManager = new Zr(this.config.scene), this.cameraManager = new ua(this.config.camera), this.modelLoader = new ee(this.renderer), this.tilesetLoader = new Uc(this.renderer, this.cameraManager.camera), this.isConstrainedSafari = this.modelLoader?.isIOSWebKit || !1, this.initStereo(), this.renderer?.getPixelRatio ? this.originalPixelRatio = this.renderer.getPixelRatio() : typeof window < "u" && (this.originalPixelRatio = window.devicePixelRatio || 1), this.pixelRatioBeforeThrottle = this.originalPixelRatio, this.isVREnabled && this.initVR(), this.isAREnabled && this.initAR(), this.cameraManager.initControls(this.renderer.domElement), this.setupEventListeners(), this.startRenderLoop(), this.isInitialized = !0, typeof window < "u" && Tn.init(this), this.emit("initialized");
|
|
10420
10474
|
} catch (e) {
|
|
10421
10475
|
console.error("Failed to initialize BelowViewer:", e), this.emit("error", e);
|
|
10422
10476
|
}
|
|
10423
10477
|
}
|
|
10424
10478
|
initRenderer() {
|
|
10425
|
-
this.renderer = new
|
|
10479
|
+
this.renderer = new f.WebGLRenderer({
|
|
10426
10480
|
antialias: this.config.renderer.antialias,
|
|
10427
10481
|
alpha: this.config.renderer.alpha,
|
|
10428
10482
|
powerPreference: this.config.renderer.powerPreference,
|
|
10429
10483
|
logarithmicDepthBuffer: this.config.renderer.logarithmicDepthBuffer,
|
|
10430
10484
|
preserveDrawingBuffer: !0
|
|
10431
|
-
}), this.renderer.setSize(this.container.clientWidth, this.container.clientHeight), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type =
|
|
10485
|
+
}), this.renderer.setSize(this.container.clientWidth, this.container.clientHeight), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = f.PCFSoftShadowMap, this.renderer.outputColorSpace = f.SRGBColorSpace;
|
|
10432
10486
|
const e = {
|
|
10433
|
-
none:
|
|
10434
|
-
linear:
|
|
10435
|
-
reinhard:
|
|
10436
|
-
cineon:
|
|
10437
|
-
"aces-filmic":
|
|
10487
|
+
none: f.NoToneMapping,
|
|
10488
|
+
linear: f.LinearToneMapping,
|
|
10489
|
+
reinhard: f.ReinhardToneMapping,
|
|
10490
|
+
cineon: f.CineonToneMapping,
|
|
10491
|
+
"aces-filmic": f.ACESFilmicToneMapping
|
|
10438
10492
|
};
|
|
10439
10493
|
this.config.renderer.toneMapping && e[this.config.renderer.toneMapping] && (this.renderer.toneMapping = e[this.config.renderer.toneMapping]), this.renderer.toneMappingExposure = this.config.renderer.toneMappingExposure, this.container.appendChild(this.renderer.domElement);
|
|
10440
10494
|
}
|
|
10441
10495
|
initStereo() {
|
|
10442
|
-
this.stereoCamera || (this.stereoCamera = new
|
|
10496
|
+
this.stereoCamera || (this.stereoCamera = new f.StereoCamera()), this.stereoCamera.eyeSep = this.stereoEyeSeparation;
|
|
10443
10497
|
}
|
|
10444
10498
|
initVR() {
|
|
10445
|
-
this.dolly = new
|
|
10499
|
+
this.dolly = new f.Group(), this.dolly.add(this.cameraManager.camera), this.sceneManager.scene.add(this.dolly);
|
|
10446
10500
|
const e = this.config.audioPath || "./sound/", t = this.config.enableVRAudio === !0;
|
|
10447
10501
|
this.vrManager = new iA(this.renderer, this.cameraManager.camera, this.sceneManager.scene, e, t, this.container), this.vrManager.setControls(this.cameraManager.controls), this.config.initialPositions && this.vrManager.setInitialPositions(this.config.initialPositions), this.vrManager.onModeToggle = () => {
|
|
10448
10502
|
this.emit("vr-mode-toggle");
|
|
@@ -10592,16 +10646,16 @@ class dA extends yt {
|
|
|
10592
10646
|
const t = this.getValidModelBoundingBox(e);
|
|
10593
10647
|
if (!t)
|
|
10594
10648
|
return;
|
|
10595
|
-
const s = t.getSize(new
|
|
10649
|
+
const s = t.getSize(new f.Vector3()), i = t.getCenter(new f.Vector3());
|
|
10596
10650
|
this.cameraManager.frameObject(i, s);
|
|
10597
10651
|
}
|
|
10598
10652
|
isValidBox3(e) {
|
|
10599
|
-
return !e || !(e instanceof
|
|
10653
|
+
return !e || !(e instanceof f.Box3) || e.isEmpty() ? !1 : Number.isFinite(e.min.x) && Number.isFinite(e.min.y) && Number.isFinite(e.min.z) && Number.isFinite(e.max.x) && Number.isFinite(e.max.y) && Number.isFinite(e.max.z);
|
|
10600
10654
|
}
|
|
10601
10655
|
getValidModelBoundingBox(e) {
|
|
10602
10656
|
if (this.isValidBox3(e?.userData?.boundingBox))
|
|
10603
10657
|
return e.userData.boundingBox;
|
|
10604
|
-
const t = new
|
|
10658
|
+
const t = new f.Box3().setFromObject(e);
|
|
10605
10659
|
return this.isValidBox3(t) ? (e.userData.boundingBox = t, t) : null;
|
|
10606
10660
|
}
|
|
10607
10661
|
/**
|
|
@@ -10614,10 +10668,10 @@ class dA extends yt {
|
|
|
10614
10668
|
centerModelAndRecalculateBounds(e) {
|
|
10615
10669
|
const t = this.getValidModelBoundingBox(e);
|
|
10616
10670
|
if (!t)
|
|
10617
|
-
return new
|
|
10618
|
-
const s = t.getCenter(new
|
|
10671
|
+
return new f.Vector3();
|
|
10672
|
+
const s = t.getCenter(new f.Vector3());
|
|
10619
10673
|
e.position.sub(s);
|
|
10620
|
-
const i = new
|
|
10674
|
+
const i = new f.Box3().setFromObject(e);
|
|
10621
10675
|
return this.isValidBox3(i) ? e.userData.boundingBox = i : e.userData.boundingBox = t.clone().translate(s.clone().multiplyScalar(-1)), s;
|
|
10622
10676
|
}
|
|
10623
10677
|
startRenderLoop() {
|
|
@@ -10657,7 +10711,7 @@ class dA extends yt {
|
|
|
10657
10711
|
renderSbsStereo() {
|
|
10658
10712
|
if (!this.stereoCamera || !this.renderer || !this.sceneManager || !this.cameraManager)
|
|
10659
10713
|
return;
|
|
10660
|
-
const e = this.renderer.getSize(new
|
|
10714
|
+
const e = this.renderer.getSize(new f.Vector2()), t = e.width, s = e.height, i = Math.floor(t / 2), n = t - i;
|
|
10661
10715
|
this.stereoCamera.aspect = s > 0 ? i / s : 1, this.stereoCamera.update(this.cameraManager.camera), this.renderer.setScissorTest(!0), this.renderer.setViewport(0, 0, i, s), this.renderer.setScissor(0, 0, i, s), this.renderer.render(this.sceneManager.scene, this.stereoCamera.cameraL), this.renderer.setViewport(i, 0, n, s), this.renderer.setScissor(i, 0, n, s), this.renderer.render(this.sceneManager.scene, this.stereoCamera.cameraR), this.renderer.setScissorTest(!1), this.renderer.setViewport(0, 0, t, s);
|
|
10662
10716
|
}
|
|
10663
10717
|
/**
|
|
@@ -10933,7 +10987,7 @@ class dA extends yt {
|
|
|
10933
10987
|
t && e.vr && this.vrManager ? this.vrManager.applyVRPositions(e) : !t && e.desktop && this.applyDesktopPositions(e.desktop);
|
|
10934
10988
|
}
|
|
10935
10989
|
}
|
|
10936
|
-
const Rn = new it(), Ht = new
|
|
10990
|
+
const Rn = new it(), Ht = new M();
|
|
10937
10991
|
class tr extends Jr {
|
|
10938
10992
|
/**
|
|
10939
10993
|
* Constructs a new line segments geometry.
|
|
@@ -11586,7 +11640,7 @@ class ss extends Wn {
|
|
|
11586
11640
|
this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
|
|
11587
11641
|
}
|
|
11588
11642
|
}
|
|
11589
|
-
const Vs = new nt(), Dn = new
|
|
11643
|
+
const Vs = new nt(), Dn = new M(), Ln = new M(), q = new nt(), z = new nt(), Ae = new nt(), Os = new M(), Hs = new P(), j = new Xr(), Fn = new M(), qt = new it(), zt = new Et(), he = new nt();
|
|
11590
11644
|
let de, Pe;
|
|
11591
11645
|
function kn(a, e, t) {
|
|
11592
11646
|
return he.set(0, 0, -e, 1).applyMatrix4(a.projectionMatrix), he.multiplyScalar(1 / he.w), he.x = Pe / t.width, he.y = Pe / t.height, he.applyMatrix4(a.projectionMatrixInverse), he.multiplyScalar(1 / he.w), Math.abs(Math.max(he.x, he.y));
|
|
@@ -11594,9 +11648,9 @@ function kn(a, e, t) {
|
|
|
11594
11648
|
function uA(a, e) {
|
|
11595
11649
|
const t = a.matrixWorld, s = a.geometry, i = s.attributes.instanceStart, n = s.attributes.instanceEnd, o = Math.min(s.instanceCount, i.count);
|
|
11596
11650
|
for (let r = 0, l = o; r < l; r++) {
|
|
11597
|
-
|
|
11598
|
-
const c = new
|
|
11599
|
-
de.distanceSqToSegment(
|
|
11651
|
+
j.start.fromBufferAttribute(i, r), j.end.fromBufferAttribute(n, r), j.applyMatrix4(t);
|
|
11652
|
+
const c = new M(), A = new M();
|
|
11653
|
+
de.distanceSqToSegment(j.start, j.end, A, c), A.distanceTo(c) < Pe * 0.5 && e.push({
|
|
11600
11654
|
point: A,
|
|
11601
11655
|
pointOnLine: c,
|
|
11602
11656
|
distance: de.origin.distanceTo(A),
|
|
@@ -11612,26 +11666,26 @@ function gA(a, e, t) {
|
|
|
11612
11666
|
const s = e.projectionMatrix, n = a.material.resolution, o = a.matrixWorld, r = a.geometry, l = r.attributes.instanceStart, c = r.attributes.instanceEnd, A = Math.min(r.instanceCount, l.count), h = -e.near;
|
|
11613
11667
|
de.at(1, Ae), Ae.w = 1, Ae.applyMatrix4(e.matrixWorldInverse), Ae.applyMatrix4(s), Ae.multiplyScalar(1 / Ae.w), Ae.x *= n.x / 2, Ae.y *= n.y / 2, Ae.z = 0, Os.copy(Ae), Hs.multiplyMatrices(e.matrixWorldInverse, o);
|
|
11614
11668
|
for (let d = 0, u = A; d < u; d++) {
|
|
11615
|
-
if (
|
|
11669
|
+
if (q.fromBufferAttribute(l, d), z.fromBufferAttribute(c, d), q.w = 1, z.w = 1, q.applyMatrix4(Hs), z.applyMatrix4(Hs), q.z > h && z.z > h)
|
|
11616
11670
|
continue;
|
|
11617
|
-
if (
|
|
11618
|
-
const y =
|
|
11619
|
-
|
|
11620
|
-
} else if (
|
|
11621
|
-
const y =
|
|
11622
|
-
|
|
11623
|
-
}
|
|
11624
|
-
|
|
11625
|
-
const p =
|
|
11626
|
-
|
|
11627
|
-
const b = st.lerp(
|
|
11628
|
-
if (
|
|
11629
|
-
|
|
11630
|
-
const y = new
|
|
11631
|
-
de.distanceSqToSegment(
|
|
11632
|
-
point:
|
|
11671
|
+
if (q.z > h) {
|
|
11672
|
+
const y = q.z - z.z, m = (q.z - h) / y;
|
|
11673
|
+
q.lerp(z, m);
|
|
11674
|
+
} else if (z.z > h) {
|
|
11675
|
+
const y = z.z - q.z, m = (z.z - h) / y;
|
|
11676
|
+
z.lerp(q, m);
|
|
11677
|
+
}
|
|
11678
|
+
q.applyMatrix4(s), z.applyMatrix4(s), q.multiplyScalar(1 / q.w), z.multiplyScalar(1 / z.w), q.x *= n.x / 2, q.y *= n.y / 2, z.x *= n.x / 2, z.y *= n.y / 2, j.start.copy(q), j.start.z = 0, j.end.copy(z), j.end.z = 0;
|
|
11679
|
+
const p = j.closestPointToPointParameter(Os, !0);
|
|
11680
|
+
j.at(p, Fn);
|
|
11681
|
+
const b = st.lerp(q.z, z.z, p), C = b >= -1 && b <= 1, E = Os.distanceTo(Fn) < Pe * 0.5;
|
|
11682
|
+
if (C && E) {
|
|
11683
|
+
j.start.fromBufferAttribute(l, d), j.end.fromBufferAttribute(c, d), j.start.applyMatrix4(o), j.end.applyMatrix4(o);
|
|
11684
|
+
const y = new M(), m = new M();
|
|
11685
|
+
de.distanceSqToSegment(j.start, j.end, m, y), t.push({
|
|
11686
|
+
point: m,
|
|
11633
11687
|
pointOnLine: y,
|
|
11634
|
-
distance: de.origin.distanceTo(
|
|
11688
|
+
distance: de.origin.distanceTo(m),
|
|
11635
11689
|
object: a,
|
|
11636
11690
|
face: null,
|
|
11637
11691
|
faceIndex: d,
|
|
@@ -11819,7 +11873,7 @@ class fA {
|
|
|
11819
11873
|
this.ghostSpheres = {
|
|
11820
11874
|
left: null,
|
|
11821
11875
|
right: null
|
|
11822
|
-
}, this.MAX_SPHERES = 2, this.measurementSpheres = [], this.measurementLine = null, this.measurementLabel = null, this.previousTriggerState = {}, this.unifiedMeasurementPoints = [], this.unifiedMeasurementLine = null, this.desktopMeasurementPoints = [], this.desktopMeasurementLine = null, typeof window < "u" && (window.measurementSystem = this), this.scene = e, this.camera = t, this.renderer = s, this.uiParent = o || null, this.getRaycastInfo = typeof r == "function" ? r : null, this.controls = i, this.dolly = n, this.config = l, this.theme = c, this.showMeasurementLabels = A, this._raycastTargets = e && e.children ? e.children : [], this.enabled = !0, this.isVR = !1, this.measurementPanel = null, this.desktopMeasurementMode = !1, this.measurementSystemEnabled = !0, this.measurementAvailable = !0, this.desktopMeasurementPoints = [], this.connectionLine = null, this.desktopMeasurementLine = null, this.measurementSprite = null, this.measurementCanvas = null, this.measurementTexture = null, this.lastClickTime = 0, this.lastTriggerTime = 0, this._wasInVR = !1, this.focusAnimation = null, this._cancelFocusOnUserInput = null, this.mouse = new
|
|
11876
|
+
}, this.MAX_SPHERES = 2, this.measurementSpheres = [], this.measurementLine = null, this.measurementLabel = null, this.previousTriggerState = {}, this.unifiedMeasurementPoints = [], this.unifiedMeasurementLine = null, this.desktopMeasurementPoints = [], this.desktopMeasurementLine = null, typeof window < "u" && (window.measurementSystem = this), this.scene = e, this.camera = t, this.renderer = s, this.uiParent = o || null, this.getRaycastInfo = typeof r == "function" ? r : null, this.controls = i, this.dolly = n, this.config = l, this.theme = c, this.showMeasurementLabels = A, this._raycastTargets = e && e.children ? e.children : [], this.enabled = !0, this.isVR = !1, this.measurementPanel = null, this.desktopMeasurementMode = !1, this.measurementSystemEnabled = !0, this.measurementAvailable = !0, this.desktopMeasurementPoints = [], this.connectionLine = null, this.desktopMeasurementLine = null, this.measurementSprite = null, this.measurementCanvas = null, this.measurementTexture = null, this.lastClickTime = 0, this.lastTriggerTime = 0, this._wasInVR = !1, this.focusAnimation = null, this._cancelFocusOnUserInput = null, this.mouse = new f.Vector2(), this.raycaster = new f.Raycaster();
|
|
11823
11877
|
const h = () => {
|
|
11824
11878
|
let d = null, u = null;
|
|
11825
11879
|
const g = null, p = null;
|
|
@@ -11832,7 +11886,7 @@ class fA {
|
|
|
11832
11886
|
}
|
|
11833
11887
|
d && u ? (this.attachVR({ controller1: d, controller2: u, controllerGrip1: g, controllerGrip2: p }), this.ghostSpheres && this.ghostSpheres.left && this.ghostSpheres.right && (this.ghostSpheres.left.visible = !0, this.ghostSpheres.right.visible = !0)) : (this._ghostSphereAttachRetries || (this._ghostSphereAttachRetries = 0), this._ghostSphereAttachRetries < 40 ? (this._ghostSphereAttachRetries++, setTimeout(h, 250)) : typeof window < "u" && window.console && console.warn("[MeasurementSystem] Could not find VR controllers to attach ghost spheres after multiple attempts."));
|
|
11834
11888
|
};
|
|
11835
|
-
if (h(), s && s.xr && s.xr.addEventListener && s.xr.addEventListener("sessionstart", h), this.sphereGeometry = new
|
|
11889
|
+
if (h(), s && s.xr && s.xr.addEventListener && s.xr.addEventListener("sessionstart", h), this.sphereGeometry = new f.SphereGeometry(0.02, 8, 6), this.placedMaterial = new f.MeshBasicMaterial({ color: 16777215 }), this.vrLineMaterial = new ss({
|
|
11836
11890
|
color: 16777215,
|
|
11837
11891
|
linewidth: 3,
|
|
11838
11892
|
transparent: !0,
|
|
@@ -11937,14 +11991,14 @@ class fA {
|
|
|
11937
11991
|
syncToVR() {
|
|
11938
11992
|
if (this.desktopMeasurementPoints.length === 2) {
|
|
11939
11993
|
if (this.clearVRMeasurement(), this.desktopMeasurementPoints.forEach((e) => {
|
|
11940
|
-
const t = new
|
|
11994
|
+
const t = new f.Mesh(this.sphereGeometry, this.placedMaterial);
|
|
11941
11995
|
t.position.copy(e.position), this.scene.add(t), this.measurementSpheres.push(t);
|
|
11942
11996
|
}), this.measurementSpheres.length === 2) {
|
|
11943
|
-
const e = new
|
|
11997
|
+
const e = new f.BufferGeometry().setFromPoints([
|
|
11944
11998
|
this.measurementSpheres[0].position,
|
|
11945
11999
|
this.measurementSpheres[1].position
|
|
11946
|
-
]), t = this.vrLineMaterial || new
|
|
11947
|
-
this.connectionLine = new
|
|
12000
|
+
]), t = this.vrLineMaterial || new f.LineBasicMaterial({ color: 16777215, transparent: !0, opacity: 0.8, depthTest: !1 });
|
|
12001
|
+
this.connectionLine = new f.Line(e, t), this.scene.add(this.connectionLine), this.createMeasurementDisplay(this.measurementSpheres[0].position.distanceTo(this.measurementSpheres[1].position)), this.measurementSprite && !this.scene.children.includes(this.measurementSprite) && this.scene.add(this.measurementSprite);
|
|
11948
12002
|
}
|
|
11949
12003
|
this.measurementSystemEnabled = this.measurementAvailable, this.updateMeasurementPanel();
|
|
11950
12004
|
}
|
|
@@ -11956,10 +12010,10 @@ class fA {
|
|
|
11956
12010
|
const t = this.measurementSpheres[e].position.clone();
|
|
11957
12011
|
let s = t;
|
|
11958
12012
|
if (this._raycastTargets && this._raycastTargets.length > 0 && this.camera) {
|
|
11959
|
-
const n = t.clone().sub(this.camera.position).normalize(), o = new
|
|
12013
|
+
const n = t.clone().sub(this.camera.position).normalize(), o = new f.Raycaster(this.camera.position, n), r = this.getValidIntersections(o);
|
|
11960
12014
|
r.length > 0 && (s = r[0].point);
|
|
11961
12015
|
}
|
|
11962
|
-
const i = new
|
|
12016
|
+
const i = new f.Mesh(this.sphereGeometry, this.placedMaterial);
|
|
11963
12017
|
i.position.copy(s), this.scene.add(i), this.desktopMeasurementPoints.push(i);
|
|
11964
12018
|
}
|
|
11965
12019
|
if (this.desktopMeasurementPoints.length === 2) {
|
|
@@ -11974,7 +12028,7 @@ class fA {
|
|
|
11974
12028
|
]), this.desktopMeasurementLine = new _n(e, this.desktopLineMaterial), this.desktopMeasurementLine.computeLineDistances(), this.scene.add(this.desktopMeasurementLine);
|
|
11975
12029
|
const t = this.desktopMeasurementPoints[0].position.distanceTo(this.desktopMeasurementPoints[1].position);
|
|
11976
12030
|
if (this.createMeasurementDisplay(t), this.measurementSprite) {
|
|
11977
|
-
const s = new
|
|
12031
|
+
const s = new f.Vector3();
|
|
11978
12032
|
s.addVectors(this.desktopMeasurementPoints[0].position, this.desktopMeasurementPoints[1].position), s.multiplyScalar(0.5);
|
|
11979
12033
|
const i = Math.max(0.05, Math.min(0.2, t * 0.03));
|
|
11980
12034
|
s.y += i, this.measurementSprite.position.copy(s), this.measurementSprite.visible = !1, this.scene.children.includes(this.measurementSprite) || this.scene.add(this.measurementSprite);
|
|
@@ -11997,14 +12051,14 @@ class fA {
|
|
|
11997
12051
|
e <= 2 ? c = 0.4 + e / 2 * 0.3 : e <= 4 ? c = 0.7 + (e - 2) / 2 * 0.2 : c = 0.9 + Math.min((e - 4) / 16, 1) * 0.5;
|
|
11998
12052
|
const A = Math.round(l * c);
|
|
11999
12053
|
r.font = `600 ${A}px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif`;
|
|
12000
|
-
const h = this.formatDistance(e), u = r.measureText(h).width, g = A, p = Math.max(6, A * 0.3), b = u + p * 2,
|
|
12001
|
-
if (r.fillStyle = "rgba(0, 0, 0, 0.8)", r.beginPath(), r.roundRect(
|
|
12002
|
-
const B = new
|
|
12054
|
+
const h = this.formatDistance(e), u = r.measureText(h).width, g = A, p = Math.max(6, A * 0.3), b = u + p * 2, C = g + p * 2, E = (s - b) / 2, y = (i - C) / 2;
|
|
12055
|
+
if (r.fillStyle = "rgba(0, 0, 0, 0.8)", r.beginPath(), r.roundRect(E, y, b, C, Math.max(4, A * 0.2)), r.fill(), r.fillStyle = "white", r.textAlign = "center", r.textBaseline = "middle", r.fillText(h, s / 2, i / 2), r.restore(), this.measurementTexture ? this.measurementTexture.needsUpdate = !0 : (this.measurementTexture = new f.CanvasTexture(this.measurementCanvas), this.measurementTexture.minFilter = f.LinearFilter, this.measurementTexture.magFilter = f.LinearFilter), !this.measurementSprite) {
|
|
12056
|
+
const B = new f.SpriteMaterial({
|
|
12003
12057
|
map: this.measurementTexture,
|
|
12004
12058
|
depthTest: !1,
|
|
12005
12059
|
depthWrite: !1
|
|
12006
12060
|
});
|
|
12007
|
-
this.measurementSprite = new
|
|
12061
|
+
this.measurementSprite = new f.Sprite(B);
|
|
12008
12062
|
}
|
|
12009
12063
|
const I = 0.3 * c, w = s / i;
|
|
12010
12064
|
return this.measurementSprite.scale.set(I * w, I, 1), this.measurementSprite;
|
|
@@ -12036,7 +12090,7 @@ class fA {
|
|
|
12036
12090
|
*/
|
|
12037
12091
|
attachVR({ controller1: e, controller2: t, controllerGrip1: s, controllerGrip2: i }) {
|
|
12038
12092
|
this.controller1 = e, this.controller2 = t, this.controllerGrip1 = s, this.controllerGrip2 = i;
|
|
12039
|
-
const n = new
|
|
12093
|
+
const n = new f.MeshBasicMaterial({
|
|
12040
12094
|
color: 8947848,
|
|
12041
12095
|
// ghostly grey
|
|
12042
12096
|
transparent: !0,
|
|
@@ -12044,7 +12098,7 @@ class fA {
|
|
|
12044
12098
|
depthTest: !1,
|
|
12045
12099
|
depthWrite: !1
|
|
12046
12100
|
});
|
|
12047
|
-
this.ghostSpheres.left && this.ghostSpheres.left.parent && this.ghostSpheres.left.parent.remove(this.ghostSpheres.left), this.ghostSpheres.right && this.ghostSpheres.right.parent && this.ghostSpheres.right.parent.remove(this.ghostSpheres.right), this.ghostSpheres.left = new
|
|
12101
|
+
this.ghostSpheres.left && this.ghostSpheres.left.parent && this.ghostSpheres.left.parent.remove(this.ghostSpheres.left), this.ghostSpheres.right && this.ghostSpheres.right.parent && this.ghostSpheres.right.parent.remove(this.ghostSpheres.right), this.ghostSpheres.left = new f.Mesh(this.sphereGeometry, n.clone()), this.ghostSpheres.right = new f.Mesh(this.sphereGeometry, n.clone()), this.ghostSpheres.left.scale.set(0.5, 0.5, 0.5), this.ghostSpheres.right.scale.set(0.5, 0.5, 0.5), this.ghostSpheres.left.position.set(0, 0, -0.07), this.ghostSpheres.right.position.set(0, 0, -0.07), this.ghostSpheres.left.visible = !0, this.ghostSpheres.right.visible = !0, this.controller1 && this.controller1.add(this.ghostSpheres.left), this.controller2 && this.controller2.add(this.ghostSpheres.right), this.yButtonPressed = !1, this.MAX_SPHERES = 2, this.triggerState = {
|
|
12048
12102
|
left: !1,
|
|
12049
12103
|
right: !1
|
|
12050
12104
|
}, this._onVRTriggerDown = this._onVRTriggerDown.bind(this), this._onVRTriggerUp = this._onVRTriggerUp.bind(this), this._onVRYButtonDown = this._onVRYButtonDown.bind(this), this._onVRYButtonUp = this._onVRYButtonUp.bind(this), this.controller1 && this.controller2 && (this.controller1.addEventListener("selectstart", this._onVRTriggerDown), this.controller1.addEventListener("selectend", this._onVRTriggerUp), this.controller2.addEventListener("selectstart", this._onVRTriggerDown), this.controller2.addEventListener("selectend", this._onVRTriggerUp), this.controller1.addEventListener("ybuttondown", this._onVRYButtonDown), this.controller1.addEventListener("ybuttonup", this._onVRYButtonUp), this.controller2.addEventListener("ybuttondown", this._onVRYButtonDown), this.controller2.addEventListener("ybuttonup", this._onVRYButtonUp)), this.isVR = !0, this.refreshMeasurementDisplayForVR();
|
|
@@ -12055,13 +12109,13 @@ class fA {
|
|
|
12055
12109
|
if (!this.measurementAvailable) return;
|
|
12056
12110
|
const t = e.target, s = performance.now();
|
|
12057
12111
|
if (!(this.lastTriggerTime && s - this.lastTriggerTime < 200) && (this.lastTriggerTime = s, this.measurementSystemEnabled)) {
|
|
12058
|
-
const i = new
|
|
12112
|
+
const i = new f.Vector3();
|
|
12059
12113
|
let n = null;
|
|
12060
12114
|
if (t === this.controller1 && this.ghostSpheres.left ? n = this.ghostSpheres.left : t === this.controller2 && this.ghostSpheres.right && (n = this.ghostSpheres.right), n)
|
|
12061
12115
|
n.getWorldPosition(i);
|
|
12062
12116
|
else {
|
|
12063
12117
|
t.getWorldPosition(i);
|
|
12064
|
-
const o = new
|
|
12118
|
+
const o = new f.Vector3(0, 0, -0.05);
|
|
12065
12119
|
o.applyQuaternion(t.quaternion), i.add(o);
|
|
12066
12120
|
}
|
|
12067
12121
|
this._placeVRMeasurementPoint(i);
|
|
@@ -12073,11 +12127,11 @@ class fA {
|
|
|
12073
12127
|
_onVRYButtonUp() {
|
|
12074
12128
|
}
|
|
12075
12129
|
_getVRControllerIntersection(e) {
|
|
12076
|
-
const t = new
|
|
12130
|
+
const t = new f.Matrix4();
|
|
12077
12131
|
t.identity().extractRotation(e.matrixWorld);
|
|
12078
|
-
const s = new
|
|
12132
|
+
const s = new f.Vector3(), i = new f.Vector3(0, 0, -1).applyMatrix4(t);
|
|
12079
12133
|
e.getWorldPosition(s);
|
|
12080
|
-
const n = new
|
|
12134
|
+
const n = new f.Raycaster(s, i.normalize()), o = this.scene && this.scene.children ? this.scene.children : [], r = this.getValidIntersections(n, o);
|
|
12081
12135
|
return r.length > 0 ? r[0] : null;
|
|
12082
12136
|
}
|
|
12083
12137
|
_placeVRMeasurementPoint(e) {
|
|
@@ -12101,7 +12155,7 @@ class fA {
|
|
|
12101
12155
|
const i = this.unifiedMeasurementPoints.shift();
|
|
12102
12156
|
i.sphere && this.scene.remove(i.sphere);
|
|
12103
12157
|
}
|
|
12104
|
-
const s = new
|
|
12158
|
+
const s = new f.Mesh(this.sphereGeometry, this.placedMaterial);
|
|
12105
12159
|
s.position.copy(e), s.scale.setScalar(0.5), s.userData.isMeasurementSphere = !0, this.scene.add(s), this.unifiedMeasurementPoints.push({
|
|
12106
12160
|
position: e.clone(),
|
|
12107
12161
|
sphere: s,
|
|
@@ -12128,7 +12182,7 @@ class fA {
|
|
|
12128
12182
|
if (this.unifiedMeasurementPoints.forEach((o) => {
|
|
12129
12183
|
o.sphere && o.sphere.scale.setScalar(n);
|
|
12130
12184
|
}), this.measurementSprite) {
|
|
12131
|
-
const o = new
|
|
12185
|
+
const o = new f.Vector3();
|
|
12132
12186
|
o.addVectors(e, t), o.multiplyScalar(0.5);
|
|
12133
12187
|
const r = Math.max(0.05, Math.min(0.2, i * 0.03));
|
|
12134
12188
|
o.y += r, this.measurementSprite.position.copy(o), this.scene.children.includes(this.measurementSprite) || this.scene.add(this.measurementSprite);
|
|
@@ -12143,7 +12197,7 @@ class fA {
|
|
|
12143
12197
|
* Useful when VR coordinate systems get corrupted (e.g., returning from Quest browser)
|
|
12144
12198
|
*/
|
|
12145
12199
|
resetGhostSpherePositions() {
|
|
12146
|
-
this.isVR && this.ghostSpheres && (this.ghostSpheres.left && this.controller1 && this.ghostSpheres.left.parent === this.controller1 && (this.ghostSpheres.left.position.set(0, 0, -0.07), this.ghostSpheres.left.rotation.set(0, 0, 0), this.ghostSpheres.left.scale.set(
|
|
12200
|
+
this.isVR && this.ghostSpheres && (this.ghostSpheres.left && this.controller1 && this.ghostSpheres.left.parent === this.controller1 && (this.ghostSpheres.left.position.set(0, 0, -0.07), this.ghostSpheres.left.rotation.set(0, 0, 0), this.ghostSpheres.left.scale.set(0.5, 0.5, 0.5)), this.ghostSpheres.right && this.controller2 && this.ghostSpheres.right.parent === this.controller2 && (this.ghostSpheres.right.position.set(0, 0, -0.07), this.ghostSpheres.right.rotation.set(0, 0, 0), this.ghostSpheres.right.scale.set(0.5, 0.5, 0.5)));
|
|
12147
12201
|
}
|
|
12148
12202
|
/**
|
|
12149
12203
|
* Update method called each frame by the render loop
|
|
@@ -12299,7 +12353,7 @@ class fA {
|
|
|
12299
12353
|
if (this.unifiedMeasurementPoints && this.unifiedMeasurementPoints.length === 2) {
|
|
12300
12354
|
const e = this.unifiedMeasurementPoints[0].position, t = this.unifiedMeasurementPoints[1].position, s = e.distanceTo(t);
|
|
12301
12355
|
if (this.createMeasurementDisplay(s), this.measurementSprite) {
|
|
12302
|
-
const i = new
|
|
12356
|
+
const i = new f.Vector3();
|
|
12303
12357
|
i.addVectors(e, t), i.multiplyScalar(0.5);
|
|
12304
12358
|
const n = Math.max(0.05, Math.min(0.2, s * 0.03));
|
|
12305
12359
|
i.y += n, this.measurementSprite.position.copy(i), this.scene.children.includes(this.measurementSprite) || this.scene.add(this.measurementSprite);
|
|
@@ -12609,12 +12663,12 @@ class Ei {
|
|
|
12609
12663
|
class mA {
|
|
12610
12664
|
constructor(e) {
|
|
12611
12665
|
this.scene = e, this.particleBounds = {
|
|
12612
|
-
min: new
|
|
12613
|
-
max: new
|
|
12666
|
+
min: new f.Vector3(-50, -25, -50),
|
|
12667
|
+
max: new f.Vector3(50, 25, 50)
|
|
12614
12668
|
}, this.particleCount = 1750, this.densityMultiplier = 1, this.createParticleSystem();
|
|
12615
12669
|
}
|
|
12616
12670
|
calculateParticleCount(e) {
|
|
12617
|
-
const t = new
|
|
12671
|
+
const t = new f.Vector3();
|
|
12618
12672
|
e.getSize(t);
|
|
12619
12673
|
const i = t.clone().multiplyScalar(2.5), n = i.x * i.y * i.z, o = Math.round(n * 0.01 * this.densityMultiplier);
|
|
12620
12674
|
return Math.max(100, Math.min(16e3, o));
|
|
@@ -12627,16 +12681,16 @@ class mA {
|
|
|
12627
12681
|
this.disable();
|
|
12628
12682
|
return;
|
|
12629
12683
|
}
|
|
12630
|
-
const t = new
|
|
12684
|
+
const t = new f.Box3(this.particleBounds.min, this.particleBounds.max), s = this.calculateParticleCount(t);
|
|
12631
12685
|
this.particles && (this.scene.remove(this.particles), this.particles.geometry && this.particles.geometry.dispose(), this.particles.material && this.particles.material.dispose(), this.particles = null), this.particleCount = s, this.createParticleSystem(), this.enable();
|
|
12632
12686
|
}
|
|
12633
12687
|
createParticleSystem() {
|
|
12634
12688
|
const e = new Float32Array(this.particleCount * 3), t = new Float32Array(this.particleCount * 3), s = new Float32Array(this.particleCount);
|
|
12635
12689
|
this.initializeParticleData(e, t, s);
|
|
12636
|
-
const i = new
|
|
12690
|
+
const i = new f.BufferGeometry(), n = new Float32Array(this.particleCount);
|
|
12637
12691
|
for (let o = 0; o < this.particleCount; o++)
|
|
12638
12692
|
n[o] = o;
|
|
12639
|
-
i.setAttribute("position", new
|
|
12693
|
+
i.setAttribute("position", new f.BufferAttribute(e, 3)), i.setAttribute("originalSize", new f.BufferAttribute(s, 1)), i.setAttribute("velocity", new f.BufferAttribute(t, 3)), i.setAttribute("particleIndex", new f.BufferAttribute(n, 1)), this.originalMaterial = this.createParticleMaterial(), this.particles = new f.Points(i, this.originalMaterial), this.particles.visible = !1, this.scene.add(this.particles);
|
|
12640
12694
|
}
|
|
12641
12695
|
/**
|
|
12642
12696
|
* Initialize particle data arrays
|
|
@@ -12659,17 +12713,17 @@ class mA {
|
|
|
12659
12713
|
e.width = e.height = 32;
|
|
12660
12714
|
const t = e.getContext("2d"), s = t.createRadialGradient(16, 16, 0, 16, 16, 16);
|
|
12661
12715
|
s.addColorStop(0, "rgba(255, 255, 255, 1)"), s.addColorStop(0.7, "rgba(255, 255, 255, 0.8)"), s.addColorStop(1, "rgba(255, 255, 255, 0)"), t.fillStyle = s, t.fillRect(0, 0, 32, 32);
|
|
12662
|
-
const i = new
|
|
12663
|
-
return i.needsUpdate = !0, new
|
|
12716
|
+
const i = new f.CanvasTexture(e);
|
|
12717
|
+
return i.needsUpdate = !0, new f.ShaderMaterial({
|
|
12664
12718
|
uniforms: {
|
|
12665
12719
|
time: { value: 0 },
|
|
12666
12720
|
pointTexture: { value: i },
|
|
12667
|
-
color: { value: new
|
|
12721
|
+
color: { value: new f.Color(16777215) },
|
|
12668
12722
|
opacity: { value: 1 },
|
|
12669
12723
|
size: { value: 2 },
|
|
12670
12724
|
boundsMin: { value: this.particleBounds.min.clone() },
|
|
12671
12725
|
boundsMax: { value: this.particleBounds.max.clone() },
|
|
12672
|
-
fogColor: { value: new
|
|
12726
|
+
fogColor: { value: new f.Color(268073) },
|
|
12673
12727
|
fogDensity: { value: 0 }
|
|
12674
12728
|
},
|
|
12675
12729
|
vertexShader: `
|
|
@@ -12751,7 +12805,7 @@ class mA {
|
|
|
12751
12805
|
`,
|
|
12752
12806
|
transparent: !0,
|
|
12753
12807
|
depthWrite: !1,
|
|
12754
|
-
blending:
|
|
12808
|
+
blending: f.NormalBlending,
|
|
12755
12809
|
fog: !1
|
|
12756
12810
|
});
|
|
12757
12811
|
}
|
|
@@ -12778,9 +12832,9 @@ class mA {
|
|
|
12778
12832
|
*/
|
|
12779
12833
|
updateBounds(e) {
|
|
12780
12834
|
if (!e) return;
|
|
12781
|
-
const t = new
|
|
12835
|
+
const t = new f.Box3().setFromObject(e), s = t.getSize(new f.Vector3()), i = t.getCenter(new f.Vector3()), o = s.clone().multiplyScalar(2.5 * 0.5);
|
|
12782
12836
|
this.particleBounds.min.copy(i).sub(o), this.particleBounds.max.copy(i).add(o);
|
|
12783
|
-
const r = this.calculateParticleCount(new
|
|
12837
|
+
const r = this.calculateParticleCount(new f.Box3(this.particleBounds.min, this.particleBounds.max));
|
|
12784
12838
|
Math.abs(r - this.particleCount) > this.particleCount * 0.2 ? (this.particles && (this.scene.remove(this.particles), this.particles.geometry && this.particles.geometry.dispose(), this.particles.material && this.particles.material.dispose(), this.particles = null), this.particleCount = r, this.createParticleSystem()) : this.redistributeParticles();
|
|
12785
12839
|
}
|
|
12786
12840
|
/**
|
|
@@ -12826,7 +12880,7 @@ class bA {
|
|
|
12826
12880
|
createSpotlight(e = 25) {
|
|
12827
12881
|
this.controllerSpotlight && (this.scene.remove(this.controllerSpotlight), this.scene.remove(this.spotlightTarget));
|
|
12828
12882
|
const t = e * Math.PI / 180, s = (this.isQuest2, 15);
|
|
12829
|
-
this.controllerSpotlight = new
|
|
12883
|
+
this.controllerSpotlight = new f.SpotLight(
|
|
12830
12884
|
16777215,
|
|
12831
12885
|
// Pure white light
|
|
12832
12886
|
2.5,
|
|
@@ -12841,7 +12895,7 @@ class bA {
|
|
|
12841
12895
|
// Higher decay for realistic underwater attenuation
|
|
12842
12896
|
), this.controllerSpotlight.position.set(0, 0, 0), this.controllerSpotlight.visible = !0, this.controllerSpotlight.castShadow = !0;
|
|
12843
12897
|
const i = this.isQuest2 ? 512 : 1024;
|
|
12844
|
-
this.controllerSpotlight.shadow.mapSize.width = i, this.controllerSpotlight.shadow.mapSize.height = i, this.controllerSpotlight.shadow.camera.near = 0.1, this.controllerSpotlight.shadow.camera.far = s, this.controllerSpotlight.shadow.camera.fov = e, this.controllerSpotlight.shadow.bias = -5e-4, this.controllerSpotlight.shadow.normalBias = 0.02, this.controllerSpotlight.shadow.radius = 4, this.controllerSpotlight.shadow.blurSamples = 10, this.scene.add(this.controllerSpotlight), this.spotlightTarget = new
|
|
12898
|
+
this.controllerSpotlight.shadow.mapSize.width = i, this.controllerSpotlight.shadow.mapSize.height = i, this.controllerSpotlight.shadow.camera.near = 0.1, this.controllerSpotlight.shadow.camera.far = s, this.controllerSpotlight.shadow.camera.fov = e, this.controllerSpotlight.shadow.bias = -5e-4, this.controllerSpotlight.shadow.normalBias = 0.02, this.controllerSpotlight.shadow.radius = 4, this.controllerSpotlight.shadow.blurSamples = 10, this.scene.add(this.controllerSpotlight), this.spotlightTarget = new f.Object3D(), this.scene.add(this.spotlightTarget), this.controllerSpotlight.target = this.spotlightTarget;
|
|
12845
12899
|
}
|
|
12846
12900
|
enableTorch() {
|
|
12847
12901
|
this.controllerSpotlight ? this.controllerSpotlight.visible = !0 : console.error("Cannot enable torch - controllerSpotlight is null");
|
|
@@ -12860,9 +12914,9 @@ class bA {
|
|
|
12860
12914
|
e || console.warn("updatePosition called with null controller");
|
|
12861
12915
|
return;
|
|
12862
12916
|
}
|
|
12863
|
-
const t = new
|
|
12917
|
+
const t = new f.Vector3(), s = new f.Quaternion();
|
|
12864
12918
|
e.getWorldPosition(t), e.getWorldQuaternion(s), this.controllerSpotlight.position.copy(t);
|
|
12865
|
-
const i = new
|
|
12919
|
+
const i = new f.Vector3(0, 0, -1);
|
|
12866
12920
|
i.applyQuaternion(s);
|
|
12867
12921
|
const n = t.clone().add(i.multiplyScalar(2));
|
|
12868
12922
|
this.spotlightTarget.position.copy(n);
|
|
@@ -12870,7 +12924,7 @@ class bA {
|
|
|
12870
12924
|
updateCameraPosition(e) {
|
|
12871
12925
|
if (!this.controllerSpotlight || !this.spotlightTarget) return;
|
|
12872
12926
|
this.controllerSpotlight.position.copy(e.position);
|
|
12873
|
-
const t = new
|
|
12927
|
+
const t = new f.Vector3(0, 0, -1);
|
|
12874
12928
|
t.applyQuaternion(e.quaternion);
|
|
12875
12929
|
const s = e.position.clone().add(t.multiplyScalar(8));
|
|
12876
12930
|
this.spotlightTarget.position.copy(s);
|
|
@@ -12925,7 +12979,7 @@ class CA {
|
|
|
12925
12979
|
return;
|
|
12926
12980
|
}
|
|
12927
12981
|
try {
|
|
12928
|
-
this.overheadLight = new
|
|
12982
|
+
this.overheadLight = new f.AmbientLight(16777215, 0.5), this.currentMode = null;
|
|
12929
12983
|
} catch (e) {
|
|
12930
12984
|
console.error("Failed to initialize lighting system:", e);
|
|
12931
12985
|
}
|
|
@@ -12933,7 +12987,7 @@ class CA {
|
|
|
12933
12987
|
createSurveyModeLights() {
|
|
12934
12988
|
if (!(this.isDisposed || !this.scene))
|
|
12935
12989
|
try {
|
|
12936
|
-
this.clearModeDirectionalLight || (this.clearModeDirectionalLight = new
|
|
12990
|
+
this.clearModeDirectionalLight || (this.clearModeDirectionalLight = new f.DirectionalLight(16777215, 1.32), this.clearModeDirectionalLight.position.set(50, 100, 50), this.clearModeDirectionalLight.castShadow = !0, this.clearModeDirectionalLight.shadow.mapSize.width = 2048, this.clearModeDirectionalLight.shadow.mapSize.height = 2048, this.clearModeDirectionalLight.shadow.bias = -1e-4, this.clearModeDirectionalLight.shadow.normalBias = 0.03, this.clearModeDirectionalLight.shadow.camera.near = 0.5, this.clearModeDirectionalLight.shadow.camera.far = 500, this.clearModeDirectionalLight.shadow.camera.left = -150, this.clearModeDirectionalLight.shadow.camera.right = 150, this.clearModeDirectionalLight.shadow.camera.top = 150, this.clearModeDirectionalLight.shadow.camera.bottom = -150, this.scene.add(this.clearModeDirectionalLight)), this.clearModeHemisphereLight || (this.clearModeHemisphereLight = new f.HemisphereLight(16777215, 4473924, 0.77), this.scene.add(this.clearModeHemisphereLight)), this.fillLight || (this.fillLight = new f.DirectionalLight(16777215, 0.88), this.fillLight.position.set(-10, 10, -10), this.scene.add(this.fillLight)), this.bottomLight || (this.bottomLight = new f.DirectionalLight(16777215, 0.33), this.bottomLight.position.set(0, -10, 0), this.scene.add(this.bottomLight));
|
|
12937
12991
|
} catch (e) {
|
|
12938
12992
|
console.error("Failed to create survey mode lights:", e);
|
|
12939
12993
|
}
|
|
@@ -12959,19 +13013,19 @@ class CA {
|
|
|
12959
13013
|
this.pendingAnimations.add(l);
|
|
12960
13014
|
const c = performance.now(), A = s - t;
|
|
12961
13015
|
let h, d;
|
|
12962
|
-
i !== void 0 && n !== void 0 && (h = new
|
|
13016
|
+
i !== void 0 && n !== void 0 && (h = new f.Color(i), d = new f.Color(n));
|
|
12963
13017
|
const u = (g) => {
|
|
12964
13018
|
if (!this.pendingAnimations.has(l) || this.isDisposed) {
|
|
12965
13019
|
r && r();
|
|
12966
13020
|
return;
|
|
12967
13021
|
}
|
|
12968
13022
|
try {
|
|
12969
|
-
const p = g - c, b = Math.min(p / o, 1),
|
|
13023
|
+
const p = g - c, b = Math.min(p / o, 1), C = 1 - Math.pow(1 - b, 3);
|
|
12970
13024
|
if (!e || this.scene && !this.scene.children.includes(e)) {
|
|
12971
13025
|
this.pendingAnimations.delete(l), r && r();
|
|
12972
13026
|
return;
|
|
12973
13027
|
}
|
|
12974
|
-
e.intensity = t + A *
|
|
13028
|
+
e.intensity = t + A * C, h && d && e.color && e.color.lerpColors(h, d, C), b < 1 ? requestAnimationFrame(u) : (this.pendingAnimations.delete(l), r && r());
|
|
12975
13029
|
} catch (p) {
|
|
12976
13030
|
console.error("Error in lighting animation:", p), this.pendingAnimations.delete(l), r && r();
|
|
12977
13031
|
}
|
|
@@ -13041,7 +13095,7 @@ class EA {
|
|
|
13041
13095
|
* Apply Quest-specific optimizations
|
|
13042
13096
|
*/
|
|
13043
13097
|
applyQuestOptimizations() {
|
|
13044
|
-
this.isQuest2 ? (this.camera.far = 20, this.camera.updateProjectionMatrix(), this.isDiveModeEnabled && (this.scene.fog = new
|
|
13098
|
+
this.isQuest2 ? (this.camera.far = 20, this.camera.updateProjectionMatrix(), this.isDiveModeEnabled && (this.scene.fog = new f.FogExp2(268073, 0.084))) : (this.camera.far = 2e3, this.camera.updateProjectionMatrix(), this.isDiveModeEnabled && (this.scene.fog = new f.FogExp2(268073, 0.056)));
|
|
13045
13099
|
}
|
|
13046
13100
|
/**
|
|
13047
13101
|
* Apply mode-specific settings for VR vs Desktop
|
|
@@ -13053,7 +13107,7 @@ class EA {
|
|
|
13053
13107
|
this.scene.fog = null;
|
|
13054
13108
|
return;
|
|
13055
13109
|
}
|
|
13056
|
-
e ? (this.scene.fog = new
|
|
13110
|
+
e ? (this.scene.fog = new f.FogExp2(268073, 0.056), this.lighting.setVRDiveMode(), this.isDiveModeEnabled && this.torch.enableTorch()) : (this.scene.fog = new f.FogExp2(268073, 5e-3), this.lighting.setDesktopDiveMode()), this.particles.updateFog(this.scene.fog);
|
|
13057
13111
|
}
|
|
13058
13112
|
}
|
|
13059
13113
|
/**
|
|
@@ -13250,9 +13304,9 @@ class yA extends yt {
|
|
|
13250
13304
|
}
|
|
13251
13305
|
setModelSizeFromObject(e) {
|
|
13252
13306
|
if (!e) return;
|
|
13253
|
-
const t = new
|
|
13307
|
+
const t = new f.Box3().setFromObject(e);
|
|
13254
13308
|
if (t.isEmpty()) return;
|
|
13255
|
-
const s = t.getSize(new
|
|
13309
|
+
const s = t.getSize(new f.Vector3()), i = Math.max(s.x, s.y, s.z);
|
|
13256
13310
|
i > 0 && Number.isFinite(i) && (this.modelSize = Math.max(1, Math.min(1e4, i)));
|
|
13257
13311
|
}
|
|
13258
13312
|
update(e) {
|
|
@@ -13262,12 +13316,12 @@ class yA extends yt {
|
|
|
13262
13316
|
return;
|
|
13263
13317
|
}
|
|
13264
13318
|
if (!this.camera) return;
|
|
13265
|
-
const t = this.modelSize / this.speedScale, i = (this.keys.shift ? this.boostSpeed : this.baseSpeed) * t, n = new
|
|
13319
|
+
const t = this.modelSize / this.speedScale, i = (this.keys.shift ? this.boostSpeed : this.baseSpeed) * t, n = new f.Vector3();
|
|
13266
13320
|
this.keys.w && (n.z -= 1), this.keys.s && (n.z += 1), this.keys.a && (n.x -= 1), this.keys.d && (n.x += 1), this.keys.q && (n.y -= 1), this.keys.e && (n.y += 1), n.lengthSq() > 0 && (n.normalize(), n.applyQuaternion(this.camera.quaternion), this.camera.position.addScaledVector(n, i * e), this._syncControlsTarget());
|
|
13267
13321
|
}
|
|
13268
13322
|
_syncControlsTarget() {
|
|
13269
13323
|
if (!this.controls || !this.camera) return;
|
|
13270
|
-
const e = new
|
|
13324
|
+
const e = new f.Vector3(0, 0, -5).applyQuaternion(this.camera.quaternion);
|
|
13271
13325
|
this.controls.target.copy(this.camera.position).add(e);
|
|
13272
13326
|
}
|
|
13273
13327
|
_onKeyDown(e) {
|
|
@@ -13295,13 +13349,13 @@ class yA extends yt {
|
|
|
13295
13349
|
-Math.PI / 2 + 0.01,
|
|
13296
13350
|
Math.min(Math.PI / 2 - 0.01, this.cameraPitch)
|
|
13297
13351
|
);
|
|
13298
|
-
const t = new
|
|
13352
|
+
const t = new f.Euler(this.cameraPitch, this.cameraYaw, 0, "YXZ");
|
|
13299
13353
|
this.camera.quaternion.setFromEuler(t), this._syncControlsTarget();
|
|
13300
13354
|
}
|
|
13301
13355
|
_onPointerLockChange() {
|
|
13302
13356
|
const e = this.pointerLocked;
|
|
13303
13357
|
if (this.pointerLocked = document.pointerLockElement === this.domElement, this.pointerLocked && !e && this.camera) {
|
|
13304
|
-
const t = new
|
|
13358
|
+
const t = new f.Euler().setFromQuaternion(this.camera.quaternion, "YXZ");
|
|
13305
13359
|
this.cameraYaw = t.y, this.cameraPitch = t.x;
|
|
13306
13360
|
}
|
|
13307
13361
|
this.controls && (this.pointerLocked ? (this._controlsEnabledBefore = this.controls.enabled, this.controls.enabled = !1) : this.controls.enabled = this._controlsEnabledBefore), this.emit("fly-mode-change", { active: this.pointerLocked });
|
|
@@ -13757,7 +13811,7 @@ class ri extends yt {
|
|
|
13757
13811
|
const t = this.getPointerRaycastInfo(e), s = t?.mouse, i = t?.camera;
|
|
13758
13812
|
if (!s || !i)
|
|
13759
13813
|
return;
|
|
13760
|
-
const n = new
|
|
13814
|
+
const n = new f.Raycaster();
|
|
13761
13815
|
n.setFromCamera(s, i);
|
|
13762
13816
|
let o = [];
|
|
13763
13817
|
if (this.measurementSystem && this.measurementSystem._raycastTargets && this.measurementSystem._raycastTargets.length > 0)
|
|
@@ -13933,14 +13987,14 @@ class ri extends yt {
|
|
|
13933
13987
|
const g = s / 100 * Math.PI * 2;
|
|
13934
13988
|
c.strokeStyle = "#ffffff", c.lineWidth = 3, c.beginPath(), c.arc(A, u, d, -Math.PI / 2, -Math.PI / 2 + g), c.stroke();
|
|
13935
13989
|
}
|
|
13936
|
-
if (c.fillStyle = "white", c.font = '600 16px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.textAlign = "center", c.textBaseline = "middle", c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 2, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(`${Math.round(s)}%`, A, u), t && (c.fillStyle = "white", c.font = '600 28px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.textAlign = "center", c.textBaseline = "middle", c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 4, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(t, A, h + 20)), c.fillStyle = "rgba(255, 255, 255, 0.9)", c.font = '400 20px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 3, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(e, A, h + 50), c.restore(), this.vrLoadingTexture ? this.vrLoadingTexture.needsUpdate = !0 : (this.vrLoadingTexture = new
|
|
13937
|
-
const g = new
|
|
13990
|
+
if (c.fillStyle = "white", c.font = '600 16px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.textAlign = "center", c.textBaseline = "middle", c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 2, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(`${Math.round(s)}%`, A, u), t && (c.fillStyle = "white", c.font = '600 28px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.textAlign = "center", c.textBaseline = "middle", c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 4, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(t, A, h + 20)), c.fillStyle = "rgba(255, 255, 255, 0.9)", c.font = '400 20px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 3, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(e, A, h + 50), c.restore(), this.vrLoadingTexture ? this.vrLoadingTexture.needsUpdate = !0 : (this.vrLoadingTexture = new f.CanvasTexture(this.vrLoadingCanvas), this.vrLoadingTexture.minFilter = f.LinearFilter, this.vrLoadingTexture.magFilter = f.LinearFilter), !this.vrLoadingSprite) {
|
|
13991
|
+
const g = new f.SpriteMaterial({
|
|
13938
13992
|
map: this.vrLoadingTexture,
|
|
13939
13993
|
depthTest: !1,
|
|
13940
13994
|
depthWrite: !1,
|
|
13941
13995
|
transparent: !0
|
|
13942
13996
|
});
|
|
13943
|
-
this.vrLoadingSprite = new
|
|
13997
|
+
this.vrLoadingSprite = new f.Sprite(g);
|
|
13944
13998
|
const p = 0.7, b = n / o;
|
|
13945
13999
|
this.vrLoadingSprite.scale.set(p * b, p, 1);
|
|
13946
14000
|
}
|
|
@@ -14108,11 +14162,11 @@ class ri extends yt {
|
|
|
14108
14162
|
positionVRLoadingSprite() {
|
|
14109
14163
|
if (!this.vrLoadingSprite || !this.belowViewer || !this.belowViewer.cameraManager)
|
|
14110
14164
|
return;
|
|
14111
|
-
const e = this.belowViewer.cameraManager.camera, t = 2, s = new
|
|
14165
|
+
const e = this.belowViewer.cameraManager.camera, t = 2, s = new f.Vector3();
|
|
14112
14166
|
e.getWorldDirection(s);
|
|
14113
|
-
const i = new
|
|
14167
|
+
const i = new f.Vector3();
|
|
14114
14168
|
e.getWorldPosition(i);
|
|
14115
|
-
const n = new
|
|
14169
|
+
const n = new f.Vector3();
|
|
14116
14170
|
n.copy(i), n.add(s.multiplyScalar(t)), this.vrLoadingSprite.position.copy(n), this.vrLoadingSprite.lookAt(i);
|
|
14117
14171
|
}
|
|
14118
14172
|
updateStatus(e) {
|
|
@@ -14438,7 +14492,7 @@ export {
|
|
|
14438
14492
|
_n as Line2,
|
|
14439
14493
|
oi as LineGeometry,
|
|
14440
14494
|
ss as LineMaterial,
|
|
14441
|
-
|
|
14495
|
+
ee as ModelLoader,
|
|
14442
14496
|
ri as ModelViewer,
|
|
14443
14497
|
Zr as Scene,
|
|
14444
14498
|
iA as VRManager
|