@needle-tools/engine 4.12.4-next.46bee95 → 4.12.5-next.1be4457
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 +5 -0
- package/README.md +2 -1
- package/dist/{needle-engine.bundle-CvasmiEO.min.js → needle-engine.bundle-BNb-Ipns.min.js} +17 -16
- package/dist/{needle-engine.bundle-CojFvJHR.umd.cjs → needle-engine.bundle-Cf9xdXZc.umd.cjs} +45 -44
- package/dist/{needle-engine.bundle-DGjkYJDl.js → needle-engine.bundle-DMiFIvRW.js} +540 -519
- package/dist/needle-engine.js +2 -2
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/lib/engine/debug/debug_overlay.js +1 -1
- package/lib/engine/debug/debug_overlay.js.map +1 -1
- package/lib/engine/engine_animation.js.map +1 -1
- package/lib/engine/webcomponents/WebXRButtons.js +1 -1
- package/lib/engine/webcomponents/WebXRButtons.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.d.ts +5 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.js +84 -50
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.ar-overlay.js +1 -0
- package/lib/engine/webcomponents/needle-engine.ar-overlay.js.map +1 -1
- package/lib/engine-components/Animation.js.map +1 -1
- package/lib/engine-components/utils/OpenURL.js +1 -3
- package/lib/engine-components/utils/OpenURL.js.map +1 -1
- package/lib/engine-components/webxr/WebXR.js +6 -8
- package/lib/engine-components/webxr/WebXR.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/debug/debug_overlay.ts +1 -1
- package/src/engine/engine_animation.ts +1 -1
- package/src/engine/webcomponents/WebXRButtons.ts +1 -1
- package/src/engine/webcomponents/needle menu/needle-menu.ts +88 -50
- package/src/engine/webcomponents/needle-engine.ar-overlay.ts +1 -0
- package/src/engine-components/Animation.ts +1 -1
- package/src/engine-components/utils/OpenURL.ts +0 -2
- package/src/engine-components/webxr/WebXR.ts +6 -9
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Vector2 as ee, Vector3 as y, Vector4 as me, Quaternion as V, PlaneGeometry as Sn, WebGLRenderer as Ir, PerspectiveCamera as ce, OrthographicCamera as au, Scene as Mi, Mesh as H, Texture as Fe, Uniform$1 as Gi, Color as re, ShaderMaterial as Xn, Box3 as Pi, ShadowMaterial as e0, Euler as lt, MeshStandardMaterial as pt, Box3Helper as qx, GridHelper as t0, Object3D as M, Material as be, Matrix3 as i0, Matrix4 as J, Layers as wo, Ray as Es, MathUtils as Ps, AxesHelper as Oi, MeshBasicMaterial as we, DoubleSide as Ri, BufferGeometry as _n, Group as Os, CylinderGeometry as n0, SphereGeometry as lu, BoxGeometry as Aa, SpriteMaterial as Xx, Sprite as Qx, Shape as Yx, ExtrudeGeometry as Kx, Fog as s0, DirectionalLight as Fp, PointLight as Vm, TextureLoader as Ia, EdgesGeometry as Zx, LineSegments as o0, LineBasicMaterial as Hm, Line as La, BufferAttribute as mt, Raycaster as cu, Sphere as hu, ArrayCamera as Jx, Plane as Sr, SkinnedMesh as mo, InterleavedBufferAttribute as r0, Skeleton as eS, Bone as tS, WebGLCubeRenderTarget as iS, CubeCamera as nS, AnimationClip as ki, FileLoader as Gm, PropertyBinding as Da, KeyframeTrack as sS, LinearSRGBColorSpace as Ts, ShaderChunk as Zt, UniformsLib as oS, DataTexture as qm, RGBAFormat as du, EquirectangularReflectionMapping as Hn, SRGBColorSpace as As, Clock as rS, NeutralToneMapping as ja, AgXToneMapping as uu, ACESFilmicToneMapping as fu, NoToneMapping as Cd, PCFSoftShadowMap$1 as aS, BasicNodeLibrary as lS, WebGLRenderTarget as Qn, DepthTexture as a0, NearestFilter as Pd, LoopRepeat as cS, LoopOnce as Up, AnimationMixer as Xm, CompressedTexture as hS, FrontSide as xo, Camera as dS, Frustum as Ay, AudioListener as uS, PositionalAudio as fS, AudioLoader as zp, EventDispatcher as Qm, BackSide as pu, MeshDepthMaterial as pS, CustomBlending as mS, MaxEquation as gS, AlwaysStencilFunc as yS, GreaterEqualStencilFunc as _S, NotEqualStencilFunc as bS, GreaterStencilFunc as vS, LessEqualStencilFunc as wS, EqualStencilFunc as xS, LessStencilFunc as SS, NeverStencilFunc as Iy, InvertStencilOp as CS, DecrementWrapStencilOp as PS, IncrementWrapStencilOp as OS, DecrementStencilOp as kS, IncrementStencilOp as MS, ReplaceStencilOp as RS, ZeroStencilOp as ES, KeepStencilOp as TS, CubeTexture as l0, AmbientLight as AS, HemisphereLight as IS, RawShaderMaterial as c0, GLSL3 as LS, AlwaysDepth as DS, GreaterEqualDepth as jS, GreaterDepth as BS, LessEqualDepth as FS, LessDepth as US, NotEqualDepth as zS, EqualDepth as NS, BatchedMesh as Ly, MeshPhysicalMaterial as Np, LinearFilter as Od, UnsignedByteType as $S, RingGeometry as WS, Line3 as VS, AdditiveBlending as h0, BoxHelper as HS, SpotLight as GS, DirectionalLightHelper as qS, CameraHelper as XS, LOD as QS, Triangle as YS, NormalBlending as KS, ReinhardToneMapping as Ym, LinearToneMapping as Km, HalfFloatType as Sf, VideoTexture as ZS, CubeUVReflectionMapping as d0, CompressedCubeTexture as JS, EquirectangularRefractionMapping as
|
|
2
|
-
import { createLoaders as Zm, getRaycastMesh as f0, LODsManager as Xo, NEEDLE_progressive as We, addDracoAndKTX2Loaders as
|
|
3
|
-
import { GroundedSkybox as Ba, Font as
|
|
4
|
-
import { fetchProfile as
|
|
5
|
-
import { __webpack_exports__default as Ce, __webpack_exports__Text as w0, __webpack_exports__Block as x0, __webpack_exports__update as
|
|
6
|
-
import { EffectAttribute as
|
|
1
|
+
import { Vector2 as ee, Vector3 as y, Vector4 as me, Quaternion as V, PlaneGeometry as Sn, WebGLRenderer as Ir, PerspectiveCamera as ce, OrthographicCamera as au, Scene as Mi, Mesh as H, Texture as Fe, Uniform$1 as Gi, Color as re, ShaderMaterial as Xn, Box3 as Pi, ShadowMaterial as e0, Euler as lt, MeshStandardMaterial as pt, Box3Helper as qx, GridHelper as t0, Object3D as M, Material as be, Matrix3 as i0, Matrix4 as J, Layers as wo, Ray as Es, MathUtils as Ps, AxesHelper as Oi, MeshBasicMaterial as we, DoubleSide as Ri, BufferGeometry as _n, Group as Os, CylinderGeometry as n0, SphereGeometry as lu, BoxGeometry as Aa, SpriteMaterial as Xx, Sprite as Qx, Shape as Yx, ExtrudeGeometry as Kx, Fog as s0, DirectionalLight as Fp, PointLight as Vm, TextureLoader as Ia, EdgesGeometry as Zx, LineSegments as o0, LineBasicMaterial as Hm, Line as La, BufferAttribute as mt, Raycaster as cu, Sphere as hu, ArrayCamera as Jx, Plane as Sr, SkinnedMesh as mo, InterleavedBufferAttribute as r0, Skeleton as eS, Bone as tS, WebGLCubeRenderTarget as iS, CubeCamera as nS, AnimationClip as ki, FileLoader as Gm, PropertyBinding as Da, KeyframeTrack as sS, LinearSRGBColorSpace as Ts, ShaderChunk as Zt, UniformsLib as oS, DataTexture as qm, RGBAFormat as du, EquirectangularReflectionMapping as Hn, SRGBColorSpace as As, Clock as rS, NeutralToneMapping as ja, AgXToneMapping as uu, ACESFilmicToneMapping as fu, NoToneMapping as Cd, PCFSoftShadowMap$1 as aS, BasicNodeLibrary as lS, WebGLRenderTarget as Qn, DepthTexture as a0, NearestFilter as Pd, LoopRepeat as cS, LoopOnce as Up, AnimationMixer as Xm, CompressedTexture as hS, FrontSide as xo, Camera as dS, Frustum as Ay, AudioListener as uS, PositionalAudio as fS, AudioLoader as zp, EventDispatcher as Qm, BackSide as pu, MeshDepthMaterial as pS, CustomBlending as mS, MaxEquation as gS, AlwaysStencilFunc as yS, GreaterEqualStencilFunc as _S, NotEqualStencilFunc as bS, GreaterStencilFunc as vS, LessEqualStencilFunc as wS, EqualStencilFunc as xS, LessStencilFunc as SS, NeverStencilFunc as Iy, InvertStencilOp as CS, DecrementWrapStencilOp as PS, IncrementWrapStencilOp as OS, DecrementStencilOp as kS, IncrementStencilOp as MS, ReplaceStencilOp as RS, ZeroStencilOp as ES, KeepStencilOp as TS, CubeTexture as l0, AmbientLight as AS, HemisphereLight as IS, RawShaderMaterial as c0, GLSL3 as LS, AlwaysDepth as DS, GreaterEqualDepth as jS, GreaterDepth as BS, LessEqualDepth as FS, LessDepth as US, NotEqualDepth as zS, EqualDepth as NS, BatchedMesh as Ly, MeshPhysicalMaterial as Np, LinearFilter as Od, UnsignedByteType as $S, RingGeometry as WS, Line3 as VS, AdditiveBlending as h0, BoxHelper as HS, SpotLight as GS, DirectionalLightHelper as qS, CameraHelper as XS, LOD as QS, Triangle as YS, NormalBlending as KS, ReinhardToneMapping as Ym, LinearToneMapping as Km, HalfFloatType as Sf, VideoTexture as ZS, CubeUVReflectionMapping as d0, CompressedCubeTexture as JS, EquirectangularRefractionMapping as eC, CatmullRomCurve3 as tC, VectorKeyframeTrack as iC, QuaternionKeyframeTrack as nC, Audio as sC, ShaderLib as kd, UniformsUtils as u0, MirroredRepeatWrapping as Dy, MeshNormalMaterial as oC, AudioContext as rC, PMREMGenerator$1 as aC } from "./three-D9pcFbxc.js";
|
|
2
|
+
import { createLoaders as Zm, getRaycastMesh as f0, LODsManager as Xo, NEEDLE_progressive as We, addDracoAndKTX2Loaders as lC, configureLoader as cC, setKTX2TranscoderLocation as hC, setDracoDecoderLocation as dC } from "./gltf-progressive-ChnIhDXx.js";
|
|
3
|
+
import { GroundedSkybox as Ba, Font as uC, TextGeometry as fC, FontLoader as pC, GLTFLoader as Is, TransformControlsGizmo as p0, EXRLoader as Jm, RGBELoader as m0, Stats as mC, nodeFrame as jy, OrbitControls as g0, PositionalAudioHelper as gC, HorizontalBlurShader as yC, VerticalBlurShader as _C, GLTFExporter as y0, strToU8 as _0, zipSync as bC, XRControllerModelFactory as vC, XRHandMeshModel as wC, Line2 as xC, LineGeometry as SC, LineMaterial as CC, TransformControls as PC, InteractiveGroup as OC, HTMLMesh as kC, VertexNormalsHelper as MC, OBJLoader as eg, FBXLoader as b0, mergeVertices as RC } from "./three-examples-F0MJj0vr.js";
|
|
4
|
+
import { fetchProfile as EC, MotionController as TC, $70d766613f57b014$export$2e2bcd8739ae039 as By, ByteBuffer as AC, v5 as Fy, md5 as Uy, SIZE_PREFIX_LENGTH as v0, Builder as tg, createNoise4D as IC, Matrix4 as Cf, BatchedParticleRenderer as LC, ParticleSystem as DC, RenderMode as gs, ConstantColor as jC, Vector4 as BC, ConstantValue as FC, TrailParticle as zy, WorkerBase as UC, MeshBVH as zC } from "./vendor-BIFy-gRe.js";
|
|
5
|
+
import { __webpack_exports__default as Ce, __webpack_exports__Text as w0, __webpack_exports__Block as x0, __webpack_exports__update as NC, SimpleStateBehavior as $C, __webpack_exports__Inline as Pf, __webpack_exports__FontLibrary as Ny, ThreeMeshUI as $y } from "./three-mesh-ui-DYyiRn5Y.js";
|
|
6
|
+
import { EffectAttribute as WC } from "./postprocessing-R535krvT.js";
|
|
7
7
|
const Of = /* @__PURE__ */ new Map();
|
|
8
8
|
function Qi(s = globalThis.location?.hostname) {
|
|
9
9
|
if (Of.has(s)) return Of.get(s);
|
|
10
10
|
const e = /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|localhost/.test(s);
|
|
11
11
|
return Of.set(s, e), e === !0;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function VC() {
|
|
14
14
|
return window.location.hostname.includes("glitch.me");
|
|
15
15
|
}
|
|
16
16
|
const Wy = typeof window !== void 0 ? window.location.search.includes("debugcontext") : !1;
|
|
@@ -78,9 +78,9 @@ class pe {
|
|
|
78
78
|
this.registerCallback("ContextDestroyed", e);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const HC = () => (s) => s;
|
|
82
82
|
function zL(s) {
|
|
83
|
-
return
|
|
83
|
+
return HC()(s);
|
|
84
84
|
}
|
|
85
85
|
function NL() {
|
|
86
86
|
return !!x("debug");
|
|
@@ -143,12 +143,12 @@ function $L(s, e) {
|
|
|
143
143
|
}
|
|
144
144
|
function Md(s, e, t = !0) {
|
|
145
145
|
const i = mu();
|
|
146
|
-
i.has(s) ? e === null ? i.delete(s) : i.set(s, e) : e !== null && i.append(s, e), t ?
|
|
146
|
+
i.has(s) ? e === null ? i.delete(s) : i.set(s, e) : e !== null && i.append(s, e), t ? GC(s, i) : S0(s, i);
|
|
147
147
|
}
|
|
148
148
|
function Vy(s, e, t) {
|
|
149
149
|
s.has(e) ? s.set(e, t.toString()) : s.append(e, t.toString());
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function GC(s, e, t) {
|
|
152
152
|
window.history.pushState(t, s, "?" + e.toString());
|
|
153
153
|
}
|
|
154
154
|
function S0(s, e, t) {
|
|
@@ -163,11 +163,11 @@ function VL(s, e) {
|
|
|
163
163
|
return Math.floor(Math.random() * (e - s + 1)) + s;
|
|
164
164
|
}
|
|
165
165
|
const Hy = ["smol", "tiny", "giant", "interesting", "smart", "bright", "dull", "extreme", "beautiful", "pretty", "dark", "epic", "salty", "silly", "funny", "lame", "lazy", "loud", "lucky", "mad", "mean", "mighty", "mysterious", "nasty", "odd", "old", "powerful", "quiet", "rapid", "scary", "shiny", "shy", "silly", "smooth", "sour", "spicy", "stupid", "sweet", "tasty", "terrible", "ugly", "unusual", "vast", "wet", "wild", "witty", "wrong", "zany", "zealous", "zippy", "zombie", "zorro"], Gy = ["cat", "dog", "mouse", "pig", "cow", "horse", "sheep", "chicken", "duck", "goat", "panda", "tiger", "lion", "elephant", "monkey", "bird", "fish", "snake", "frog", "turtle", "hamster", "penguin", "kangaroo", "whale", "dolphin", "crocodile", "snail", "ant", "bee", "beetle", "butterfly", "dragon", "eagle", "fish", "giraffe", "lizard", "panda", "penguin", "rabbit", "snake", "spider", "tiger", "zebra"];
|
|
166
|
-
function
|
|
166
|
+
function qC() {
|
|
167
167
|
const s = Hy[Math.floor(Math.random() * Hy.length)], e = Gy[Math.floor(Math.random() * Gy.length)];
|
|
168
168
|
return s + "_" + e;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function XC(s) {
|
|
171
171
|
return s = s.replace(/[^a-z0-9áéíóúñü \.,_-]/gim, ""), s.trim();
|
|
172
172
|
}
|
|
173
173
|
function kc(s, e, t = !0, i = !1) {
|
|
@@ -220,7 +220,7 @@ function yu(s, e) {
|
|
|
220
220
|
e.pre_update_callbacks.push(o);
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
const Sh = x("debugresolveurl"),
|
|
223
|
+
const Sh = x("debugresolveurl"), QC = "rel:";
|
|
224
224
|
function HL(s, e) {
|
|
225
225
|
return Lr(s, e);
|
|
226
226
|
}
|
|
@@ -233,7 +233,7 @@ function Lr(s, e) {
|
|
|
233
233
|
return Sh && console.warn("getPath: uri is absolute, returning uri", e), e;
|
|
234
234
|
if (s === void 0)
|
|
235
235
|
return Sh && console.warn("getPath: source is undefined, returning uri", e), e;
|
|
236
|
-
e.startsWith(
|
|
236
|
+
e.startsWith(QC) && (e = e.substring(4));
|
|
237
237
|
const t = s.lastIndexOf("/");
|
|
238
238
|
if (t >= 0) {
|
|
239
239
|
const i = s.substring(0, t + 1);
|
|
@@ -246,11 +246,11 @@ basePath: ` + i), n;
|
|
|
246
246
|
}
|
|
247
247
|
return e;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function YC(s) {
|
|
250
250
|
if (s)
|
|
251
251
|
return s = s.trim(), s = s.split("?")[0]?.split("#")[0], s;
|
|
252
252
|
}
|
|
253
|
-
class
|
|
253
|
+
class KC {
|
|
254
254
|
subscribeWrite(e) {
|
|
255
255
|
this.writeCallbacks.push(e);
|
|
256
256
|
}
|
|
@@ -300,7 +300,7 @@ class go {
|
|
|
300
300
|
for (const i of t)
|
|
301
301
|
this._watches.push(new go(e, i));
|
|
302
302
|
else
|
|
303
|
-
this._watches.push(new
|
|
303
|
+
this._watches.push(new KC(e, t));
|
|
304
304
|
}
|
|
305
305
|
subscribeWrite(e) {
|
|
306
306
|
for (const t of this._watches)
|
|
@@ -406,9 +406,9 @@ var D;
|
|
|
406
406
|
return O !== void 0 || (O = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), O;
|
|
407
407
|
}
|
|
408
408
|
s.isSafari = R;
|
|
409
|
-
let
|
|
409
|
+
let I;
|
|
410
410
|
function j() {
|
|
411
|
-
return
|
|
411
|
+
return I !== void 0 ? I : I = navigator.userAgent.includes("OculusBrowser");
|
|
412
412
|
}
|
|
413
413
|
s.isQuest = j;
|
|
414
414
|
let B;
|
|
@@ -487,7 +487,7 @@ const ho = /* @__PURE__ */ new WeakMap();
|
|
|
487
487
|
function P0(s, e, t) {
|
|
488
488
|
if (!ho.get(s)) {
|
|
489
489
|
const n = new MutationObserver((o) => {
|
|
490
|
-
|
|
490
|
+
ZC(s, o);
|
|
491
491
|
});
|
|
492
492
|
ho.set(s, {
|
|
493
493
|
observer: n,
|
|
@@ -506,7 +506,7 @@ function O0(s, e, t) {
|
|
|
506
506
|
const n = i.get(e), o = n.indexOf(t);
|
|
507
507
|
o !== -1 && (n.splice(o, 1), n.length <= 0 && (i.delete(e), ho.get(s)?.observer.disconnect(), ho.delete(s)));
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function ZC(s, e) {
|
|
510
510
|
const t = ho.get(s).attributeChangedListeners;
|
|
511
511
|
for (const i of e)
|
|
512
512
|
if (i.type === "attributes") {
|
|
@@ -533,7 +533,7 @@ async function k0(s) {
|
|
|
533
533
|
results: i
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
const
|
|
536
|
+
const JC = x("debugdebug");
|
|
537
537
|
let ng = !1;
|
|
538
538
|
(x("noerrors") || x("nooverlaymessages")) && (ng = !0);
|
|
539
539
|
const kf = "needle_engine_global_error_container";
|
|
@@ -542,11 +542,11 @@ function M0() {
|
|
|
542
542
|
return E0;
|
|
543
543
|
}
|
|
544
544
|
const Wp = new Array();
|
|
545
|
-
function
|
|
545
|
+
function e1(s) {
|
|
546
546
|
Wp.push(s);
|
|
547
547
|
}
|
|
548
548
|
let Mf = !1;
|
|
549
|
-
function
|
|
549
|
+
function t1(...s) {
|
|
550
550
|
if (!Mf) {
|
|
551
551
|
Mf = !0;
|
|
552
552
|
try {
|
|
@@ -558,20 +558,20 @@ function tC(...s) {
|
|
|
558
558
|
Mf = !1;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
const R0 = console.error,
|
|
562
|
-
R0.apply(console, s),
|
|
561
|
+
const R0 = console.error, i1 = function(...s) {
|
|
562
|
+
R0.apply(console, s), o1(s), dr(2, s), s1(...s);
|
|
563
563
|
};
|
|
564
|
-
function
|
|
565
|
-
ng = !s, s ? console.error =
|
|
564
|
+
function n1(s) {
|
|
565
|
+
ng = !s, s ? console.error = i1 : console.error = R0;
|
|
566
566
|
}
|
|
567
567
|
function n2(s) {
|
|
568
|
-
return
|
|
568
|
+
return n1(s);
|
|
569
569
|
}
|
|
570
570
|
let E0 = 0;
|
|
571
|
-
function
|
|
572
|
-
E0 += 1,
|
|
571
|
+
function s1(...s) {
|
|
572
|
+
E0 += 1, t1(...s);
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function o1(s) {
|
|
575
575
|
if (Array.isArray(s))
|
|
576
576
|
for (let e = 0; e < s.length; e++) {
|
|
577
577
|
const t = s[e];
|
|
@@ -582,7 +582,7 @@ function dr(s, e, t, i) {
|
|
|
582
582
|
if (ng) return;
|
|
583
583
|
const n = pe.Current;
|
|
584
584
|
let o = n?.domElement ?? document.querySelector("needle-engine");
|
|
585
|
-
if (n
|
|
585
|
+
if (n?.isInAR && (o = n.arOverlayElement), !!o) {
|
|
586
586
|
if (Array.isArray(e)) {
|
|
587
587
|
let r = "";
|
|
588
588
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -591,13 +591,13 @@ function dr(s, e, t, i) {
|
|
|
591
591
|
}
|
|
592
592
|
e = r;
|
|
593
593
|
}
|
|
594
|
-
!e || e.length <= 0 ||
|
|
594
|
+
!e || e.length <= 0 || r1(s, o, e);
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
const ac = /* @__PURE__ */ new Map();
|
|
598
|
-
function
|
|
598
|
+
function r1(s, e, t) {
|
|
599
599
|
if (t == null) return;
|
|
600
|
-
const i =
|
|
600
|
+
const i = l1(e);
|
|
601
601
|
if (i.childElementCount >= 20) {
|
|
602
602
|
const a = i.lastElementChild;
|
|
603
603
|
Xy(a);
|
|
@@ -606,7 +606,7 @@ function rC(s, e, t) {
|
|
|
606
606
|
const n = t;
|
|
607
607
|
if (ac.has(n))
|
|
608
608
|
return;
|
|
609
|
-
const o =
|
|
609
|
+
const o = c1(s, t);
|
|
610
610
|
i.prepend(o);
|
|
611
611
|
const r = () => {
|
|
612
612
|
ac.delete(n), Xy(o);
|
|
@@ -614,12 +614,12 @@ function rC(s, e, t) {
|
|
|
614
614
|
ac.set(n, r), setTimeout(r, 1e4);
|
|
615
615
|
}
|
|
616
616
|
function s2() {
|
|
617
|
-
|
|
617
|
+
JC && console.log("Clearing messages");
|
|
618
618
|
for (const s of ac.values())
|
|
619
619
|
s?.call(s);
|
|
620
620
|
ac.clear();
|
|
621
621
|
}
|
|
622
|
-
const
|
|
622
|
+
const a1 = `
|
|
623
623
|
|
|
624
624
|
@import url('https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap');
|
|
625
625
|
|
|
@@ -656,7 +656,7 @@ div[data-needle_engine_debug_overlay] .error strong {
|
|
|
656
656
|
color: rgba(255,100,120, 1);
|
|
657
657
|
}
|
|
658
658
|
`;
|
|
659
|
-
function
|
|
659
|
+
function l1(s) {
|
|
660
660
|
globalThis[kf] || (globalThis[kf] = /* @__PURE__ */ new Map());
|
|
661
661
|
const e = globalThis[kf];
|
|
662
662
|
if (e.has(s))
|
|
@@ -682,7 +682,7 @@ function lC(s) {
|
|
|
682
682
|
const i = document.querySelector('meta[name="viewport"]');
|
|
683
683
|
i && !i.getAttribute("content")?.includes("viewport-fit=") && i.setAttribute("content", i.getAttribute("content") + ",viewport-fit=cover"), s.shadowRoot ? s.shadowRoot.appendChild(t) : s.appendChild(t);
|
|
684
684
|
const n = document.createElement("style");
|
|
685
|
-
return n.innerHTML =
|
|
685
|
+
return n.innerHTML = a1, t.appendChild(n), t;
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
const T0 = /* @__PURE__ */ Symbol("logtype"), Rd = /* @__PURE__ */ new Map();
|
|
@@ -691,7 +691,7 @@ function Xy(s) {
|
|
|
691
691
|
const e = s[T0], t = Rd.get(e) ?? [];
|
|
692
692
|
t.push(s), Rd.set(e, t);
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function c1(s, e) {
|
|
695
695
|
if (Rd.has(s)) {
|
|
696
696
|
const i = Rd.get(s);
|
|
697
697
|
if (i.length > 0) {
|
|
@@ -713,7 +713,7 @@ function cC(s, e) {
|
|
|
713
713
|
}
|
|
714
714
|
return t.title = "Open the browser console (F12) for more information", t.innerHTML = e, t;
|
|
715
715
|
}
|
|
716
|
-
class
|
|
716
|
+
class h1 {
|
|
717
717
|
random(e, t) {
|
|
718
718
|
return Array.isArray(e) ? e.length <= 0 ? null : e[Math.floor(Math.random() * e.length)] : e !== void 0 && t !== void 0 ? Math.random() * (t - e) + e : Math.random();
|
|
719
719
|
}
|
|
@@ -777,7 +777,7 @@ class hC {
|
|
|
777
777
|
return Math.pow(e, 1 / 2.2);
|
|
778
778
|
}
|
|
779
779
|
approximately(e, t, i = Number.EPSILON) {
|
|
780
|
-
for (const n of
|
|
780
|
+
for (const n of d1) {
|
|
781
781
|
const o = e[n], r = t[n];
|
|
782
782
|
if (o === void 0 || r === void 0) break;
|
|
783
783
|
if (Math.abs(o - r) > i)
|
|
@@ -789,7 +789,7 @@ class hC {
|
|
|
789
789
|
return e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2;
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
|
-
const
|
|
792
|
+
const d1 = ["x", "y", "z", "w"], F = new h1();
|
|
793
793
|
class Qy {
|
|
794
794
|
y;
|
|
795
795
|
s;
|
|
@@ -889,24 +889,24 @@ class A0 {
|
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
const od = "needle:cameraController";
|
|
892
|
-
function
|
|
892
|
+
function u1(s) {
|
|
893
893
|
return s[od];
|
|
894
894
|
}
|
|
895
895
|
function Yy(s, e, t) {
|
|
896
896
|
t ? s[od] = e : s[od] === e && (s[od] = null);
|
|
897
897
|
}
|
|
898
898
|
const Vp = "needle:autofit";
|
|
899
|
-
function
|
|
899
|
+
function f1(s) {
|
|
900
900
|
return s[Vp] === void 0 ? !0 : s[Vp] !== !1;
|
|
901
901
|
}
|
|
902
902
|
function Hp(s, e) {
|
|
903
903
|
s[Vp] = e;
|
|
904
904
|
}
|
|
905
905
|
let an;
|
|
906
|
-
const
|
|
907
|
-
function
|
|
908
|
-
s instanceof Element && (
|
|
909
|
-
const o =
|
|
906
|
+
const p1 = { x: 0, y: 0, width: 0, height: 0 }, m1 = x("debugfocusrect");
|
|
907
|
+
function g1(s, e, t, i, n) {
|
|
908
|
+
s instanceof Element && (m1 && s instanceof HTMLElement && (s.style.outline = "2px dashed rgba(255, 150, 0, .8)"), s = s.getBoundingClientRect()), an = n.domElement.getBoundingClientRect();
|
|
909
|
+
const o = p1;
|
|
910
910
|
o.x = s.x, o.y = s.y, o.width = s.width, o.height = s.height, o.x -= an.x, o.y -= an.y;
|
|
911
911
|
const r = an.width, a = an.height, l = i.view, c = e.zoom;
|
|
912
912
|
let h = l?.offsetX || 0, d = l?.offsetY || 0, f = an.width, p = an.height;
|
|
@@ -915,8 +915,8 @@ function gC(s, e, t, i, n) {
|
|
|
915
915
|
h -= b / c, d -= v / c, e.offsetX !== void 0 && (h += e.offsetX * (an.width * 0.5)), e.offsetY !== void 0 && (d -= e.offsetY * (an.height * 0.5));
|
|
916
916
|
const A = l?.offsetX || h, O = l?.offsetY || d;
|
|
917
917
|
h = F.lerp(A, h, t), d = F.lerp(O, d, t);
|
|
918
|
-
const R = l?.width || r,
|
|
919
|
-
f = F.lerp(R, f, t), p = F.lerp(
|
|
918
|
+
const R = l?.width || r, I = l?.height || a;
|
|
919
|
+
f = F.lerp(R, f, t), p = F.lerp(I, p, t), i.setViewOffset(r, a, h, d, f, p), i.updateProjectionMatrix(), e.damping > 0 && (e.damping *= 1 - t, e.damping < 0.01 && (e.damping = 0), e.damping = Math.max(0, e.damping));
|
|
920
920
|
}
|
|
921
921
|
function o2(s, e, t) {
|
|
922
922
|
const i = s.length(), n = e.length(), o = F.lerp(i, n, t);
|
|
@@ -932,7 +932,7 @@ function _u(s, e, t = !0, i = !1) {
|
|
|
932
932
|
const n = te(e), o = te(s);
|
|
933
933
|
if (i) {
|
|
934
934
|
if (Yn(s, ve(e)), t) {
|
|
935
|
-
const r = o.y, a = o.sub(
|
|
935
|
+
const r = o.y, a = o.sub(P1(s));
|
|
936
936
|
a.y = r, s.lookAt(a), s.quaternion.multiply(I0);
|
|
937
937
|
}
|
|
938
938
|
Number.isNaN(s.quaternion.x) && s.quaternion.copy(Ef);
|
|
@@ -955,19 +955,19 @@ function a2(s, e, t, i = 1) {
|
|
|
955
955
|
}
|
|
956
956
|
return null;
|
|
957
957
|
}
|
|
958
|
-
const
|
|
958
|
+
const y1 = new Yi(() => new y(), 100);
|
|
959
959
|
function z(s, e, t) {
|
|
960
|
-
const i =
|
|
960
|
+
const i = y1.get();
|
|
961
961
|
return i.set(0, 0, 0), s instanceof y ? i.copy(s) : Array.isArray(s) ? i.set(s[0], s[1], s[2]) : s instanceof DOMPointReadOnly ? i.set(s.x, s.y, s.z) : typeof s == "number" ? (i.x = s, i.y = e !== void 0 ? e : i.x, i.z = t !== void 0 ? t : i.x) : typeof s == "object" && (i.x = s.x, i.y = s.y, i.z = s.z), i;
|
|
962
962
|
}
|
|
963
|
-
const
|
|
964
|
-
function
|
|
965
|
-
const e =
|
|
963
|
+
const _1 = new Yi(() => new re(), 30);
|
|
964
|
+
function b1(s) {
|
|
965
|
+
const e = _1.get();
|
|
966
966
|
return s ? e.copy(s) : e.set(0, 0, 0), e;
|
|
967
967
|
}
|
|
968
|
-
const
|
|
968
|
+
const v1 = new Yi(() => new V(), 100);
|
|
969
969
|
function bi(s, e, t, i) {
|
|
970
|
-
const n =
|
|
970
|
+
const n = v1.get();
|
|
971
971
|
return n.identity(), s instanceof V ? n.copy(s) : s instanceof DOMPointReadOnly ? n.set(s.x, s.y, s.z, s.w) : typeof s == "number" && e !== void 0 && t !== void 0 && i !== void 0 ? n.set(s, e, t, i) : typeof s == "object" && "x" in s && "y" in s && "z" in s && "w" in s && n.set(s.x, s.y, s.z, s.w), n;
|
|
972
972
|
}
|
|
973
973
|
const sg = new Yi(() => new y(), 100), Ky = /* @__PURE__ */ Symbol("lastMatrixWorldUpdateKey");
|
|
@@ -1001,9 +1001,9 @@ function Yn(s, e) {
|
|
|
1001
1001
|
function L0(s, e, t, i, n) {
|
|
1002
1002
|
mr.set(e, t, i, n), Yn(s, mr);
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1004
|
+
const w1 = new Yi(() => new y(), 100), x1 = new y();
|
|
1005
1005
|
function qe(s, e = null) {
|
|
1006
|
-
return e || (e =
|
|
1006
|
+
return e || (e = w1.get()), s ? s.parent ? (s.getWorldScale(e), e) : e.copy(s.scale) : e.set(0, 0, 0);
|
|
1007
1007
|
}
|
|
1008
1008
|
function Mc(s, e) {
|
|
1009
1009
|
if (!s) return;
|
|
@@ -1011,18 +1011,18 @@ function Mc(s, e) {
|
|
|
1011
1011
|
s.scale.copy(e);
|
|
1012
1012
|
return;
|
|
1013
1013
|
}
|
|
1014
|
-
const t =
|
|
1014
|
+
const t = x1;
|
|
1015
1015
|
s.parent.getWorldScale(t), s.scale.copy(e), s.scale.divide(t);
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1017
|
+
const S1 = new y(), Zy = new V();
|
|
1018
1018
|
function l2(s) {
|
|
1019
|
-
return ve(s, Zy),
|
|
1019
|
+
return ve(s, Zy), S1.set(0, 0, 1).applyQuaternion(Zy);
|
|
1020
1020
|
}
|
|
1021
|
-
const
|
|
1022
|
-
function
|
|
1023
|
-
return e || (e =
|
|
1021
|
+
const C1 = new Yi(() => new y(), 100), Jy = new V();
|
|
1022
|
+
function P1(s, e) {
|
|
1023
|
+
return e || (e = C1.get().set(0, 0, 1)), ve(s, Jy), e.applyQuaternion(Jy);
|
|
1024
1024
|
}
|
|
1025
|
-
const e_ = new lt(), t_ = new lt(),
|
|
1025
|
+
const e_ = new lt(), t_ = new lt(), O1 = new y();
|
|
1026
1026
|
function D0(s) {
|
|
1027
1027
|
const e = Ed.get();
|
|
1028
1028
|
return s.getWorldQuaternion(e), t_.setFromQuaternion(e), t_;
|
|
@@ -1032,10 +1032,10 @@ function j0(s, e) {
|
|
|
1032
1032
|
Yn(s, t.setFromEuler(e));
|
|
1033
1033
|
}
|
|
1034
1034
|
function og(s) {
|
|
1035
|
-
const e = D0(s), t =
|
|
1035
|
+
const e = D0(s), t = O1;
|
|
1036
1036
|
return t.set(e.x, e.y, e.z), t.x = F.toDegrees(t.x), t.y = F.toDegrees(t.y), t.z = F.toDegrees(t.z), t;
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function k1(s, e) {
|
|
1039
1039
|
bu(s, e.x, e.y, e.z, !0);
|
|
1040
1040
|
}
|
|
1041
1041
|
function bu(s, e, t, i, n = !0) {
|
|
@@ -1058,7 +1058,7 @@ function c2(s) {
|
|
|
1058
1058
|
e = t.name + "/" + e, t = t.parent;
|
|
1059
1059
|
return e;
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function M1(s) {
|
|
1062
1062
|
if (s) {
|
|
1063
1063
|
const e = s;
|
|
1064
1064
|
return e.blendMode !== void 0 && e.clampWhenFinished !== void 0 && e.enabled !== void 0 && e.fadeIn !== void 0 && e.getClip !== void 0;
|
|
@@ -1159,9 +1159,9 @@ class Cr {
|
|
|
1159
1159
|
static textureToCanvas(e, t = !1) {
|
|
1160
1160
|
if (!e)
|
|
1161
1161
|
return null;
|
|
1162
|
-
(t === !0 || e.isCompressedTexture === !0) && (e =
|
|
1162
|
+
(t === !0 || e.isCompressedTexture === !0) && (e = R1(e));
|
|
1163
1163
|
const i = e.image;
|
|
1164
|
-
if (
|
|
1164
|
+
if (E1(i)) {
|
|
1165
1165
|
const n = document.createElement("canvas");
|
|
1166
1166
|
n.width = i.width, n.height = i.height;
|
|
1167
1167
|
const o = n.getContext("2d");
|
|
@@ -1170,23 +1170,23 @@ class Cr {
|
|
|
1170
1170
|
return null;
|
|
1171
1171
|
}
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function R1(s) {
|
|
1174
1174
|
return Cr.copyTexture(s);
|
|
1175
1175
|
}
|
|
1176
1176
|
function h2(s, e = !1) {
|
|
1177
1177
|
return Cr.textureToCanvas(s, e);
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function E1(s) {
|
|
1180
1180
|
return typeof HTMLImageElement < "u" && s instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && s instanceof HTMLCanvasElement || typeof OffscreenCanvas < "u" && s instanceof OffscreenCanvas || typeof ImageBitmap < "u" && s instanceof ImageBitmap;
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function T1(s) {
|
|
1183
1183
|
const e = s.type;
|
|
1184
1184
|
return e === "Mesh" || e === "SkinnedMesh";
|
|
1185
1185
|
}
|
|
1186
1186
|
function B0(s, e) {
|
|
1187
1187
|
e ? s["needle:rendercustomshadow"] = !0 : s["needle:rendercustomshadow"] = !1;
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function A1(s) {
|
|
1190
1190
|
if (s) {
|
|
1191
1191
|
if (s["needle:rendercustomshadow"] === !0)
|
|
1192
1192
|
return !0;
|
|
@@ -1201,8 +1201,8 @@ function di(s, e = void 0, t = void 0, i = void 0) {
|
|
|
1201
1201
|
const o = [];
|
|
1202
1202
|
function r(l) {
|
|
1203
1203
|
let c = !0;
|
|
1204
|
-
if (l.visible &&
|
|
1205
|
-
if (l instanceof qx && (c = !1), l instanceof t0 && (c = !1), l instanceof Ba && (c = !1), l.isGizmo === !0 && (c = !1), l.material instanceof e0 && (c = !1),
|
|
1204
|
+
if (l.visible && f1(l) !== !1 && !(l.type === "TransformControlsGizmo" || l.type === "TransformControlsPlane")) {
|
|
1205
|
+
if (l instanceof qx && (c = !1), l instanceof t0 && (c = !1), l instanceof Ba && (c = !1), l.isGizmo === !0 && (c = !1), l.material instanceof e0 && (c = !1), T1(l) || (c = !1), t && l.layers.test(t) === !1 && (c = !1), c) {
|
|
1206
1206
|
if (e && Array.isArray(e) && e?.includes(l)) return;
|
|
1207
1207
|
if (typeof e == "function" && e(l) === !0)
|
|
1208
1208
|
return;
|
|
@@ -1229,7 +1229,7 @@ function di(s, e = void 0, t = void 0, i = void 0) {
|
|
|
1229
1229
|
l && (a = !0, l.updateMatrixWorld(), r(l));
|
|
1230
1230
|
return a || console.warn("No objects to fit camera to..."), n;
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function I1(s, e, t) {
|
|
1233
1233
|
const i = di([s], t?.ignore), n = new y();
|
|
1234
1234
|
i.getSize(n);
|
|
1235
1235
|
const o = new y();
|
|
@@ -1254,7 +1254,7 @@ function IC(s, e, t) {
|
|
|
1254
1254
|
scale: l
|
|
1255
1255
|
};
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function L1(s, e) {
|
|
1258
1258
|
const t = di([s]), i = new y();
|
|
1259
1259
|
t.getCenter(i), i.y = t.min.y;
|
|
1260
1260
|
const n = e.clone().sub(i), o = te(s);
|
|
@@ -1280,16 +1280,16 @@ function F0(s, e, t, i) {
|
|
|
1280
1280
|
return o && (o.map ? n.color.set(1, 1, 1) : n.color.copyLinearToSRGB(o.color), n.emissive.copyLinearToSRGB(o.emissive), n.emissiveIntensity = o.emissiveIntensity, n.opacity = o.opacity, n.displacementScale = o.displacementScale, n.transparent = o.transparent, n.bumpMap = o.bumpMap, n.aoMap = o.aoMap, n.map = o.map, n.displacementMap = o.displacementMap, n.emissiveMap = o.emissiveMap, n.normalMap = o.normalMap, n.envMap = o.envMap, n.alphaMap = o.alphaMap, n.metalness = o.reflectivity, n.vertexColors = o.vertexColors, o.shininess && (n.roughness = 1 - Math.sqrt(o.shininess) / 10), n.needsUpdate = !0), t === void 0 ? s.material = n : i[t] = n, !0;
|
|
1281
1281
|
}
|
|
1282
1282
|
let Ch = !1;
|
|
1283
|
-
|
|
1284
|
-
|
|
1283
|
+
e1((...s) => {
|
|
1284
|
+
L() && pe.Current?.isInXR && (lc(!0), U0("error", ...s));
|
|
1285
1285
|
});
|
|
1286
1286
|
function lc(s) {
|
|
1287
1287
|
if (s) {
|
|
1288
1288
|
if (Ch) return;
|
|
1289
|
-
Ch = !0,
|
|
1289
|
+
Ch = !0, j1();
|
|
1290
1290
|
} else {
|
|
1291
1291
|
if (!Ch) return;
|
|
1292
|
-
Ch = !1,
|
|
1292
|
+
Ch = !1, B1();
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
1295
|
const cc = {
|
|
@@ -1297,7 +1297,7 @@ const cc = {
|
|
|
1297
1297
|
warn: void 0,
|
|
1298
1298
|
error: void 0
|
|
1299
1299
|
};
|
|
1300
|
-
class
|
|
1300
|
+
class D1 {
|
|
1301
1301
|
familyName = "needle-xr";
|
|
1302
1302
|
root = null;
|
|
1303
1303
|
context = null;
|
|
@@ -1420,8 +1420,8 @@ class DC {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
1422
|
let gr = null;
|
|
1423
|
-
function
|
|
1424
|
-
gr || (gr = new
|
|
1423
|
+
function j1() {
|
|
1424
|
+
gr || (gr = new D1()), gr.onEnable();
|
|
1425
1425
|
for (const s in cc) {
|
|
1426
1426
|
cc[s] = console[s];
|
|
1427
1427
|
let e = !1;
|
|
@@ -1435,7 +1435,7 @@ function jC() {
|
|
|
1435
1435
|
};
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1438
|
+
function B1() {
|
|
1439
1439
|
gr?.onDisable();
|
|
1440
1440
|
for (const s in cc)
|
|
1441
1441
|
console[s] = cc[s];
|
|
@@ -1529,19 +1529,19 @@ function U0(s, ...e) {
|
|
|
1529
1529
|
return r;
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
|
-
const
|
|
1533
|
-
function
|
|
1532
|
+
const F1 = x("nodevlogs");
|
|
1533
|
+
function Ae(s, e = qi.Log) {
|
|
1534
1534
|
dr(e, s);
|
|
1535
1535
|
}
|
|
1536
1536
|
function _e(s) {
|
|
1537
|
-
|
|
1537
|
+
Ae(s, qi.Warn);
|
|
1538
1538
|
}
|
|
1539
1539
|
function vu(s) {
|
|
1540
|
-
|
|
1540
|
+
Ae(s, qi.Error);
|
|
1541
1541
|
}
|
|
1542
1542
|
let qp, Af;
|
|
1543
|
-
function
|
|
1544
|
-
if (
|
|
1543
|
+
function L() {
|
|
1544
|
+
if (F1) return !1;
|
|
1545
1545
|
if (qp !== void 0) return qp;
|
|
1546
1546
|
if (Af !== void 0) return Af;
|
|
1547
1547
|
let s = Qi();
|
|
@@ -1551,34 +1551,34 @@ function d2(s) {
|
|
|
1551
1551
|
qp = s;
|
|
1552
1552
|
}
|
|
1553
1553
|
let ai, Qo = null, $n = null, Rl = !1, i_ = null;
|
|
1554
|
-
const z0 = "terminal",
|
|
1555
|
-
|
|
1556
|
-
const
|
|
1554
|
+
const z0 = "terminal", U1 = x("console");
|
|
1555
|
+
U1 && N0();
|
|
1556
|
+
const z1 = /* @__PURE__ */ Symbol("consoleParent");
|
|
1557
1557
|
function N0() {
|
|
1558
1558
|
if (ai) {
|
|
1559
1559
|
ai.showSwitch();
|
|
1560
1560
|
return;
|
|
1561
1561
|
}
|
|
1562
|
-
|
|
1562
|
+
G1();
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1564
|
+
function N1() {
|
|
1565
1565
|
ai && (ai.hide(), ai.hideSwitch());
|
|
1566
1566
|
}
|
|
1567
|
-
function $
|
|
1568
|
-
i_ || (i_ = setInterval(
|
|
1567
|
+
function $1() {
|
|
1568
|
+
i_ || (i_ = setInterval(W1, 500));
|
|
1569
1569
|
}
|
|
1570
1570
|
let n_ = 0;
|
|
1571
|
-
function
|
|
1571
|
+
function W1() {
|
|
1572
1572
|
const s = M0(), e = s !== n_;
|
|
1573
|
-
n_ = s, e &&
|
|
1573
|
+
n_ = s, e && V1();
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function V1() {
|
|
1576
1576
|
N0(), $n && ($n.setAttribute("error", "true"), $n.innerText = "🤬");
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function H1() {
|
|
1579
1579
|
$n && ($n.removeAttribute("error"), $n.innerText = z0);
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function G1(s = !1) {
|
|
1582
1582
|
if (ai !== void 0 || Rl) return;
|
|
1583
1583
|
Rl = !0;
|
|
1584
1584
|
const e = document.createElement("script");
|
|
@@ -1587,13 +1587,13 @@ function GC(s = !1) {
|
|
|
1587
1587
|
console.warn("🌵 Debug console failed to load."), Rl = !1, ai = null;
|
|
1588
1588
|
return;
|
|
1589
1589
|
}
|
|
1590
|
-
Rl = !1, $
|
|
1590
|
+
Rl = !1, $1(), ai = new VConsole({
|
|
1591
1591
|
// defaultPlugins: ['system', 'network'],
|
|
1592
1592
|
pluginOrder: ["default", "needle-console"]
|
|
1593
1593
|
});
|
|
1594
1594
|
const t = globalThis["needle:codegen_files"];
|
|
1595
|
-
if (t && t.length > 0 && ai.addPlugin(
|
|
1596
|
-
$n.innerText = z0, $n.addEventListener("click",
|
|
1595
|
+
if (t && t.length > 0 && ai.addPlugin(q1()), ai.addPlugin(K1()), ai.addPlugin(Z1()), Qo = cP(), Qo && (Qo[z1] = Qo.parentElement, Qo.style.position = "absolute", Qo.style.zIndex = Number.MAX_SAFE_INTEGER.toString()), ai.setSwitchPosition(20, 30), $n = lP(), $n) {
|
|
1596
|
+
$n.innerText = z0, $n.addEventListener("click", H1);
|
|
1597
1597
|
const i = document.createElement("style"), n = 40;
|
|
1598
1598
|
i.innerHTML = `
|
|
1599
1599
|
#__vconsole .vc-switch {
|
|
@@ -1654,13 +1654,13 @@ function GC(s = !1) {
|
|
|
1654
1654
|
#__vconsole .vc-mask {
|
|
1655
1655
|
overflow: hidden;
|
|
1656
1656
|
}
|
|
1657
|
-
`, Qo?.prepend(i), s === !0 && M0() <= 0 &&
|
|
1657
|
+
`, Qo?.prepend(i), s === !0 && M0() <= 0 && N1(), console.log("🌵 Debug console has loaded");
|
|
1658
1658
|
}
|
|
1659
1659
|
}, e.onerror = () => {
|
|
1660
1660
|
console.warn("🌵 Debug console failed to load." + (window.crossOriginIsolated ? "This page is using cross-origin isolation, so external scripts can't be loaded." : "")), Rl = !1, ai = null;
|
|
1661
1661
|
}, e.src = "https://cdn.jsdelivr.net/npm/vconsole@3.15.1/dist/vconsole.min.js", document.body.appendChild(e);
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1663
|
+
function q1() {
|
|
1664
1664
|
if (!globalThis.VConsole) return;
|
|
1665
1665
|
const s = new VConsole.VConsolePlugin("needle-console", "🌵 Inspect glTF"), e = () => document.querySelector("#__vc_plug_" + s._id + " iframe");
|
|
1666
1666
|
return s.on("renderTab", function(t) {
|
|
@@ -1701,14 +1701,14 @@ function qC() {
|
|
|
1701
1701
|
}), t(i);
|
|
1702
1702
|
}), s;
|
|
1703
1703
|
}
|
|
1704
|
-
const Xp = "padding: 10px; font-family: monospace;", s_ = "margin-bottom: 10px;", Yo = "margin-bottom: 10px; margin-top: 15px;",
|
|
1704
|
+
const Xp = "padding: 10px; font-family: monospace;", s_ = "margin-bottom: 10px;", Yo = "margin-bottom: 10px; margin-top: 15px;", X1 = "width: 100%; border-collapse: collapse; border: 1px solid rgba(0,0,0,0.1); table-layout: fixed;", $0 = "border: 1px solid rgba(0,0,0,0.1); padding: 5px;", Q1 = $0, Y1 = $0 + " word-break: break-all;";
|
|
1705
1705
|
function jn(s, e = !1) {
|
|
1706
1706
|
e && s.sort((i, n) => (n.value ? 1 : 0) - (i.value ? 1 : 0));
|
|
1707
|
-
let t = `<table style='${
|
|
1707
|
+
let t = `<table style='${X1}'>`;
|
|
1708
1708
|
t += "<tbody>";
|
|
1709
1709
|
for (const i of s) {
|
|
1710
1710
|
const n = typeof i.value == "boolean" ? i.value ? "✅" : "❌" : i.value;
|
|
1711
|
-
t += `<tr><td style='${
|
|
1711
|
+
t += `<tr><td style='${Q1}'>${i.label}</td><td style='${Y1}'>${n}</td></tr>`;
|
|
1712
1712
|
}
|
|
1713
1713
|
return t += "</tbody></table>", t;
|
|
1714
1714
|
}
|
|
@@ -1720,7 +1720,7 @@ function W0() {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
return "❌";
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1723
|
+
function K1() {
|
|
1724
1724
|
if (!globalThis.VConsole) return;
|
|
1725
1725
|
const s = new VConsole.VConsolePlugin("device-utilities", "📱 Device Info");
|
|
1726
1726
|
return s.on("renderTab", function(e) {
|
|
@@ -1759,12 +1759,12 @@ function KC() {
|
|
|
1759
1759
|
t += jn(l, !1), t += "</div>", e(t);
|
|
1760
1760
|
}), s;
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1762
|
+
function Z1() {
|
|
1763
1763
|
if (!globalThis.VConsole) return;
|
|
1764
1764
|
const s = new VConsole.VConsolePlugin("graphics-info", "🎨 Graphics Info");
|
|
1765
1765
|
return s.on("renderTab", async function(e) {
|
|
1766
1766
|
let t = `<div style='${Xp}'>`;
|
|
1767
|
-
const i =
|
|
1767
|
+
const i = J1();
|
|
1768
1768
|
i.length > 0 && (t += `<h3 style='${Yo}'>General GPU Info</h3>`, t += jn(i, !1));
|
|
1769
1769
|
const n = tP();
|
|
1770
1770
|
n.length > 0 && (t += `<h3 style='${Yo}'>WebGL</h3>`, t += jn(n, !1));
|
|
@@ -1782,7 +1782,7 @@ function ZC() {
|
|
|
1782
1782
|
t += "</div>", e(t);
|
|
1783
1783
|
}), s;
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1785
|
+
function J1() {
|
|
1786
1786
|
const s = [], e = window.devicePixelRatio;
|
|
1787
1787
|
s.push({ label: "Device Pixel Ratio", value: e.toString() }), s.push({ label: "Width (px)", value: (window.innerWidth * e).toString() }), s.push({ label: "Height (px)", value: (window.innerHeight * e).toString() });
|
|
1788
1788
|
const i = D.isMobileDevice() ? 150 : 96, n = screen.width / i, o = screen.height / i, r = n * 2.54, a = o * 2.54;
|
|
@@ -1915,11 +1915,11 @@ Oo('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"]
|
|
|
1915
1915
|
Oo('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";');
|
|
1916
1916
|
Oo('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";');
|
|
1917
1917
|
Oo('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
|
|
1918
|
-
Oo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.12.
|
|
1918
|
+
Oo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.12.5";');
|
|
1919
1919
|
Oo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1920
|
-
Oo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
1920
|
+
Oo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Feb 09 2026 15:47:05 GMT+0000 (Coordinated Universal Time)";');
|
|
1921
1921
|
Oo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
|
|
1922
|
-
const Xi = "4.12.
|
|
1922
|
+
const Xi = "4.12.5", Rc = "undefined", Ad = "Mon Feb 09 2026 15:47:05 GMT+0000 (Coordinated Universal Time)";
|
|
1923
1923
|
H0 && console.log(`Engine version: ${Xi} (generator: ${Rc})
|
|
1924
1924
|
Project built at ${Ad}`);
|
|
1925
1925
|
const ur = NEEDLE_PUBLIC_KEY, yo = "needle_isActiveInHierarchy", aa = "builtin_components", rd = "needle_editor_guid";
|
|
@@ -1956,7 +1956,7 @@ function hP(s, e) {
|
|
|
1956
1956
|
const o = new window.SPECTOR.Spector();
|
|
1957
1957
|
o.spyCanvases = !0, i();
|
|
1958
1958
|
return;
|
|
1959
|
-
} else
|
|
1959
|
+
} else L() && console.debug("Spector available: Add '?spector=<frame>' to the URL to enable it and capture a frame.");
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
1962
|
const wi = /* @__PURE__ */ Symbol("shadowDomOwner"), dP = x("debugpatch");
|
|
@@ -2552,13 +2552,13 @@ class mP {
|
|
|
2552
2552
|
createInputEvent(e) {
|
|
2553
2553
|
switch (e.type) {
|
|
2554
2554
|
case "pointerdown":
|
|
2555
|
-
Ge &&
|
|
2555
|
+
Ge && Ae("Create Pointer down"), this.onDownButton(e.deviceIndex, e.button), this.onDown(e);
|
|
2556
2556
|
break;
|
|
2557
2557
|
case "pointermove":
|
|
2558
|
-
Ge &&
|
|
2558
|
+
Ge && Ae("Create Pointer move"), this.onMove(e);
|
|
2559
2559
|
break;
|
|
2560
2560
|
case "pointerup":
|
|
2561
|
-
Ge &&
|
|
2561
|
+
Ge && Ae("Create Pointer up"), this.onUp(e), this.onReleaseButton(e.deviceIndex, e.button);
|
|
2562
2562
|
break;
|
|
2563
2563
|
}
|
|
2564
2564
|
}
|
|
@@ -2652,7 +2652,7 @@ class mP {
|
|
|
2652
2652
|
if (this.context.isInAR || this.canReceiveInput(e) === !1) return;
|
|
2653
2653
|
e.target instanceof HTMLElement && e.target.setPointerCapture(e.pointerId);
|
|
2654
2654
|
const t = this.getPointerId(e);
|
|
2655
|
-
Ge &&
|
|
2655
|
+
Ge && Ae(`pointer down #${t}, identifier:${e.pointerId}`);
|
|
2656
2656
|
const i = this.getAndUpdateSpatialObjectForScreenPosition(t, e.clientX, e.clientY), n = new to("pointerdown", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: t, button: e.button, clientX: e.clientX, clientY: e.clientY, pointerType: e.pointerType, buttonName: this.getButtonName(e), device: i, pressure: e.pressure });
|
|
2657
2657
|
this.onDown(n);
|
|
2658
2658
|
};
|
|
@@ -3302,10 +3302,10 @@ Layout: `;
|
|
|
3302
3302
|
initialize() {
|
|
3303
3303
|
if (this._hasSelectEvent = this.profiles.includes("generic-hand-select") || this.profiles.some((e) => e.startsWith("generic-trigger")), this._isMetaQuestTouchController = this.profiles.includes("meta-quest-touch-plus") || this.profiles.includes("oculus-touch-v3"), this._isMxInk = this.profiles.includes("logitech-mx-ink"), !this._layout) {
|
|
3304
3304
|
if (this.inputSource.targetRayMode === "transient-pointer") return;
|
|
3305
|
-
const e =
|
|
3305
|
+
const e = EC(this.inputSource, _P, bP);
|
|
3306
3306
|
this.getMotionController = e.then((t) => {
|
|
3307
3307
|
if (!this.connected) return null;
|
|
3308
|
-
this._motioncontroller = new
|
|
3308
|
+
this._motioncontroller = new TC(
|
|
3309
3309
|
this.inputSource,
|
|
3310
3310
|
t.profile,
|
|
3311
3311
|
t.assetPath || ""
|
|
@@ -3480,7 +3480,7 @@ let Ec = !1;
|
|
|
3480
3480
|
const fr = [];
|
|
3481
3481
|
function Dr() {
|
|
3482
3482
|
if (Ec) return;
|
|
3483
|
-
|
|
3483
|
+
L() && console.debug("[Needle Engine] User input registered: Media playback is now allowed."), Ec = !0;
|
|
3484
3484
|
const s = [...fr];
|
|
3485
3485
|
fr.length = 0, s.forEach((e) => e());
|
|
3486
3486
|
}
|
|
@@ -3490,7 +3490,7 @@ document.addEventListener("click", Dr);
|
|
|
3490
3490
|
document.addEventListener("dragstart", Dr);
|
|
3491
3491
|
document.addEventListener("touchend", Dr);
|
|
3492
3492
|
document.addEventListener("keydown", Dr);
|
|
3493
|
-
typeof window < "u" && "userActivation" in navigator && navigator.userActivation?.isActive && (
|
|
3493
|
+
typeof window < "u" && "userActivation" in navigator && navigator.userActivation?.isActive && (L() && console.debug("[Needle Engine] User input already active: Media playback is now allowed."), fr.length = 0, Ec = !0);
|
|
3494
3494
|
class Zn extends EventTarget {
|
|
3495
3495
|
static get userInteractionRegistered() {
|
|
3496
3496
|
return Ec;
|
|
@@ -4044,7 +4044,7 @@ class EP {
|
|
|
4044
4044
|
return Promise.resolve(!0);
|
|
4045
4045
|
e && console.debug("Connecting to user provided url " + e);
|
|
4046
4046
|
const t = e || this.netWebSocketUrlProvider?.getWebsocketUrl();
|
|
4047
|
-
return t ? Bi = t :
|
|
4047
|
+
return t ? Bi = t : VC() && (Bi = "wss://" + window.location.host + "/socket"), this.connectWebsocket();
|
|
4048
4048
|
}
|
|
4049
4049
|
/** Disconnect from the networking backend + reset internal state */
|
|
4050
4050
|
disconnect() {
|
|
@@ -4079,7 +4079,7 @@ class EP {
|
|
|
4079
4079
|
console.debug(`Connecting to networking backend on
|
|
4080
4080
|
` + Bi);
|
|
4081
4081
|
const o = await import("./vendor-BIFy-gRe.js").then((c) => c.index), r = o.default?.WebsocketBuilder ?? o.WebsocketBuilder, a = o.default?.ExponentialBackoff ?? o.ExponentialBackoff, l = new r(Bi).withMaxRetries(10).withBackoff(new a(2e3, 4)).onOpen(() => {
|
|
4082
|
-
this._connectingToWebsocketPromise = null, this._ws = l, this.connected = !0,
|
|
4082
|
+
this._connectingToWebsocketPromise = null, this._ws = l, this.connected = !0, L() || yi ? console.log(`Connected to networking backend
|
|
4083
4083
|
` + Bi) : console.debug("Connected to networking backend", Bi), n(!0), this.onSendQueued(Bn.OnConnection);
|
|
4084
4084
|
}).onClose((c) => {
|
|
4085
4085
|
this._connectingToWebsocketPromise = null, this.connected = !1, this._isInRoom = !1, n(!1);
|
|
@@ -4111,14 +4111,14 @@ class EP {
|
|
|
4111
4111
|
else this.handleIncomingStringMessage(n);
|
|
4112
4112
|
return;
|
|
4113
4113
|
} catch (n) {
|
|
4114
|
-
yi && i === "pong" ? console.log("<<", i) :
|
|
4114
|
+
yi && i === "pong" ? console.log("<<", i) : L() && console.error("Failed to parse message", n);
|
|
4115
4115
|
}
|
|
4116
4116
|
}
|
|
4117
4117
|
async handleIncomingBinaryMessage(e) {
|
|
4118
4118
|
Rh && console.log("<< bin", this.context.time.frame);
|
|
4119
4119
|
const t = await e.arrayBuffer();
|
|
4120
4120
|
var i = new Uint8Array(t);
|
|
4121
|
-
const n = new
|
|
4121
|
+
const n = new AC(i), o = n.getBufferIdentifier(), r = this._listenersBinary[o], a = xP(n), l = SP(a);
|
|
4122
4122
|
if (l && typeof l == "string" && (this._state[l] = a), !r) return;
|
|
4123
4123
|
const c = a ?? n;
|
|
4124
4124
|
for (const h of r)
|
|
@@ -4143,7 +4143,7 @@ class EP {
|
|
|
4143
4143
|
if (yi && console.log(e), e) {
|
|
4144
4144
|
this._isInRoom = !0;
|
|
4145
4145
|
const r = e;
|
|
4146
|
-
this._currentRoomName = r.room, this._currentRoomViewId = r.viewId, this._currentRoomAllowEditing = r.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...r.inRoom), (Rh ||
|
|
4146
|
+
this._currentRoomName = r.room, this._currentRoomViewId = r.viewId, this._currentRoomAllowEditing = r.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...r.inRoom), (Rh || L()) && console.debug("Joined Needle Engine Room: " + r.room);
|
|
4147
4147
|
const a = new URL(window.location.href);
|
|
4148
4148
|
a.searchParams.has("room") && a.searchParams.delete("room"), a.searchParams.set("view", this._currentRoomViewId), console.debug(`Room view id: ${this._currentRoomViewId}
|
|
4149
4149
|
${a.href}`);
|
|
@@ -4155,7 +4155,7 @@ ${a.href}`);
|
|
|
4155
4155
|
break;
|
|
4156
4156
|
case "left-room":
|
|
4157
4157
|
const n = e;
|
|
4158
|
-
n.room === this.currentRoomName && (this._isInRoom = !1, this._currentRoomName = null, this._currentRoomAllowEditing = !0, this._currentInRoom.length = 0, (Rh ||
|
|
4158
|
+
n.room === this.currentRoomName && (this._isInRoom = !1, this._currentRoomName = null, this._currentRoomAllowEditing = !0, this._currentInRoom.length = 0, (Rh || L()) && console.debug("Left Needle Engine Room: " + n.room)), ci.sendEvent(this.context, "networking", {
|
|
4159
4159
|
event: "left_room",
|
|
4160
4160
|
room: n.room
|
|
4161
4161
|
});
|
|
@@ -4381,7 +4381,7 @@ class Ka {
|
|
|
4381
4381
|
static createText(e, t) {
|
|
4382
4382
|
let i = null;
|
|
4383
4383
|
const n = t?.font || zP(t?.familyFamily || null);
|
|
4384
|
-
n instanceof
|
|
4384
|
+
n instanceof uC ? i = this.#t(e, n, t) : i == null && (i = new _n());
|
|
4385
4385
|
const o = t?.color || 16777215, r = new H(i, t?.material ?? new pt({ color: o }));
|
|
4386
4386
|
return this.applyDefaultObjectOptions(r, t), n instanceof Promise ? n.then((a) => {
|
|
4387
4387
|
r.geometry = this.#t(e, a, t), t?.onGeometry && t.onGeometry(r);
|
|
@@ -4389,7 +4389,7 @@ class Ka {
|
|
|
4389
4389
|
}
|
|
4390
4390
|
static #t(e, t, i) {
|
|
4391
4391
|
const n = i?.depth || 0.1;
|
|
4392
|
-
return new
|
|
4392
|
+
return new fC(e, {
|
|
4393
4393
|
font: t,
|
|
4394
4394
|
size: 1,
|
|
4395
4395
|
depth: n,
|
|
@@ -4510,7 +4510,7 @@ function zP(s) {
|
|
|
4510
4510
|
const n = Eh.get(e);
|
|
4511
4511
|
if (n) return n;
|
|
4512
4512
|
}
|
|
4513
|
-
const t = new
|
|
4513
|
+
const t = new pC(), i = new Promise((n, o) => {
|
|
4514
4514
|
t.load(e, (r) => {
|
|
4515
4515
|
Eh.set(e, r), n(r);
|
|
4516
4516
|
}, void 0, o);
|
|
@@ -4654,7 +4654,7 @@ class $a {
|
|
|
4654
4654
|
const h = document.querySelector("needle-engine");
|
|
4655
4655
|
if (h) {
|
|
4656
4656
|
const d = h.getAttribute("logo-src");
|
|
4657
|
-
d?.length && (e = d,
|
|
4657
|
+
d?.length && (e = d, L() && console.debug("[XR] Using custom loading logo from license:", e));
|
|
4658
4658
|
}
|
|
4659
4659
|
}
|
|
4660
4660
|
const t = this._logoObject = new H(new Sn(1, 1, 1, 1), new we({ transparent: !0, side: 2 }));
|
|
@@ -4703,7 +4703,7 @@ var Tc;
|
|
|
4703
4703
|
((s) => {
|
|
4704
4704
|
const e = [];
|
|
4705
4705
|
function t() {
|
|
4706
|
-
e?.length ||
|
|
4706
|
+
e?.length || L() && console.warn("No USDZ exporters found – cannot export USDZ for QuickLook.");
|
|
4707
4707
|
for (const o of e)
|
|
4708
4708
|
o.exportAndOpen();
|
|
4709
4709
|
return !0;
|
|
@@ -4798,7 +4798,7 @@ function GP() {
|
|
|
4798
4798
|
}, 100);
|
|
4799
4799
|
});
|
|
4800
4800
|
}
|
|
4801
|
-
D.isDesktop() &&
|
|
4801
|
+
D.isDesktop() && L() && window.addEventListener("keydown", (s) => {
|
|
4802
4802
|
(s.key === "x" || s.key === "Escape") && K.active && K.stop();
|
|
4803
4803
|
});
|
|
4804
4804
|
function qP(s) {
|
|
@@ -4991,10 +4991,10 @@ class K {
|
|
|
4991
4991
|
}
|
|
4992
4992
|
if (e === "quicklook")
|
|
4993
4993
|
return console.warn("QuickLook mode is only supported on iOS devices"), null;
|
|
4994
|
-
if (e == "ar" && (e = "immersive-ar"),
|
|
4994
|
+
if (e == "ar" && (e = "immersive-ar"), L() && x("debugxrpreroom"))
|
|
4995
4995
|
return console.warn("Debug: Starting temporary XR session"), await $a.start(e, t || K.getDefaultSessionInit(e)), null;
|
|
4996
4996
|
if (this._currentSessionRequest)
|
|
4997
|
-
return console.warn("A XRSession is already being requested"), (He ||
|
|
4997
|
+
return console.warn("A XRSession is already being requested"), (He || L()) && _e("A XRSession is already being requested"), this._currentSessionRequest.then(() => this._activeSession);
|
|
4998
4998
|
if (this._activeSession)
|
|
4999
4999
|
return console.error("A XRSession is already running"), this._activeSession;
|
|
5000
5000
|
if (i || (i = N.Current), i || (i = pe.All[0]), !i) throw new Error("No Needle Engine Context found");
|
|
@@ -5031,7 +5031,7 @@ class K {
|
|
|
5031
5031
|
He ? console.log(`%cRequesting ${e} session`, "font-weight:bold;", t, n) : console.log(`%cRequesting ${e} session`, "font-weight:bold;");
|
|
5032
5032
|
for (const a of n)
|
|
5033
5033
|
a.onBeforeXR && a.activeAndEnabled && !a.destroyed && a.onBeforeXR(e, t);
|
|
5034
|
-
this.invokeSessionRequestStart(e, t), He &&
|
|
5034
|
+
this.invokeSessionRequestStart(e, t), He && Ae("Requesting " + e + " session (" + Date.now() + ")"), ci.sendEvent(N.Current, "xr", {
|
|
5035
5035
|
action: "session_request",
|
|
5036
5036
|
mode: e,
|
|
5037
5037
|
features: (t.requiredFeatures ?? []).concat(t.optionalFeatures ?? []).join(","),
|
|
@@ -5142,7 +5142,7 @@ class K {
|
|
|
5142
5142
|
}
|
|
5143
5143
|
/** Returns true if running in pass through mode in immersive AR (e.g. user is wearing a headset while in AR) */
|
|
5144
5144
|
get isPassThrough() {
|
|
5145
|
-
return !!(this.environmentBlendMode !== "opaque" && this.interactionMode === "world-space" || this.mode === "immersive-ar" && this.environmentBlendMode !== "opaque" && this.controllers.some((e) => e.inputSource.targetRayMode === "tracked-pointer") ||
|
|
5145
|
+
return !!(this.environmentBlendMode !== "opaque" && this.interactionMode === "world-space" || this.mode === "immersive-ar" && this.environmentBlendMode !== "opaque" && this.controllers.some((e) => e.inputSource.targetRayMode === "tracked-pointer") || L() && D.isDesktop() && this.mode === "immersive-ar");
|
|
5146
5146
|
}
|
|
5147
5147
|
get isAR() {
|
|
5148
5148
|
return this.mode === "immersive-ar";
|
|
@@ -6322,20 +6322,20 @@ var Id;
|
|
|
6322
6322
|
function t(b, v, A, O, R) {
|
|
6323
6323
|
if (!v.geometry || !v.geometry.hasAttribute("position"))
|
|
6324
6324
|
return !1;
|
|
6325
|
-
const
|
|
6325
|
+
const I = v.geometry;
|
|
6326
6326
|
if (v?.isSkinnedMesh) {
|
|
6327
6327
|
const j = v, B = j.bvhNeedsUpdate;
|
|
6328
6328
|
if (!j.staticGenerator)
|
|
6329
|
-
l(), r && (j.staticGenerator = new r(v), j.staticGenerator.applyWorldTransforms = !1, j.staticGeometry = j.staticGenerator.generate(),
|
|
6330
|
-
else if (
|
|
6329
|
+
l(), r && (j.staticGenerator = new r(v), j.staticGenerator.applyWorldTransforms = !1, j.staticGeometry = j.staticGenerator.generate(), I.boundsTree = a?.call(j.staticGeometry), j.staticGeometryLastUpdate = performance.now() + Math.random() * 200, j.bvhNeedsUpdate = !0);
|
|
6330
|
+
else if (I.boundsTree && (j.autoUpdateMeshBvhInterval !== void 0 && j.autoUpdateMeshBvhInterval >= 0 || B === !0)) {
|
|
6331
6331
|
const G = performance.now(), X = G - j.staticGeometryLastUpdate, k = j.autoUpdateMeshBvhInterval ?? 100;
|
|
6332
|
-
(B || X > k) && (Yt && console.warn(`Physics: updating skinned mesh bvh for ${v.name} after ${X.toFixed(2)}ms`), j.bvhNeedsUpdate = !1, j.staticGeometryLastUpdate = G, j.staticGenerator?.generate(j.staticGeometry),
|
|
6332
|
+
(B || X > k) && (Yt && console.warn(`Physics: updating skinned mesh bvh for ${v.name} after ${X.toFixed(2)}ms`), j.bvhNeedsUpdate = !1, j.staticGeometryLastUpdate = G, j.staticGenerator?.generate(j.staticGeometry), I.boundsTree.refit());
|
|
6333
6333
|
}
|
|
6334
|
-
} else if (!
|
|
6334
|
+
} else if (!I.boundsTree) {
|
|
6335
6335
|
h || w();
|
|
6336
6336
|
let j = !0;
|
|
6337
|
-
if ((O.xr ||
|
|
6338
|
-
if (
|
|
6337
|
+
if ((O.xr || I[m] === !1 || I.getAttribute("position")?.isInterleavedBufferAttribute || I.index && I.index?.isInterleavedBufferAttribute || e > 10) && (j = !1), j && f) {
|
|
6338
|
+
if (I[p] === void 0) {
|
|
6339
6339
|
let B = null;
|
|
6340
6340
|
if (g.length > 0) {
|
|
6341
6341
|
const G = g.shift();
|
|
@@ -6349,15 +6349,15 @@ var Id;
|
|
|
6349
6349
|
}
|
|
6350
6350
|
if (B != null && !B.running) {
|
|
6351
6351
|
const G = v.name;
|
|
6352
|
-
Yt && console.log("<<<< worker start", G, B),
|
|
6353
|
-
const X =
|
|
6352
|
+
Yt && console.log("<<<< worker start", G, B), I[p] = "queued", performance.mark("bvh.create.start");
|
|
6353
|
+
const X = I.clone();
|
|
6354
6354
|
try {
|
|
6355
6355
|
B.generate(X).then((k) => {
|
|
6356
|
-
|
|
6356
|
+
I[p] = "done", I.boundsTree = k;
|
|
6357
6357
|
}).catch((k) => {
|
|
6358
|
-
|
|
6358
|
+
I[p] = "failed - " + k?.message, I[m] = !1, Yt && console.error("Failed to generate mesh bvh on worker", k);
|
|
6359
6359
|
}).finally(() => {
|
|
6360
|
-
Yt && console.log(">>>>> worker done", G, { hasBoundsTre:
|
|
6360
|
+
Yt && console.log(">>>>> worker done", G, { hasBoundsTre: I.boundsTree != null }), g.push(B), X.dispose(), performance.mark("bvh.create.end"), performance.measure("bvh.create (worker)", "bvh.create.start", "bvh.create.end");
|
|
6361
6361
|
});
|
|
6362
6362
|
} catch (k) {
|
|
6363
6363
|
console.error("Failed to generate mesh bvh on worker", k);
|
|
@@ -6365,18 +6365,18 @@ var Id;
|
|
|
6365
6365
|
} else
|
|
6366
6366
|
Yt && console.warn("No worker available");
|
|
6367
6367
|
}
|
|
6368
|
-
} else (!d || !j) && (l(), o && (performance.mark("bvh.create.start"),
|
|
6368
|
+
} else (!d || !j) && (l(), o && (performance.mark("bvh.create.start"), I.boundsTree = new o(I), performance.mark("bvh.create.end"), performance.measure("bvh.create", "bvh.create.start", "bvh.create.end")));
|
|
6369
6369
|
}
|
|
6370
6370
|
if (b instanceof cu) {
|
|
6371
6371
|
const j = b, B = v.raycast;
|
|
6372
|
-
if (
|
|
6372
|
+
if (I.boundsTree)
|
|
6373
6373
|
l(), n && (v.acceleratedRaycast || (v.acceleratedRaycast = n.bind(v), Yt && console.debug(`Physics: bind acceleratedRaycast fn to "${v.name}"`)), v.raycast = v.acceleratedRaycast);
|
|
6374
|
-
else if (Yt && console.warn("No bounds tree found for mesh", v.name, { workerTask:
|
|
6374
|
+
else if (Yt && console.warn("No bounds tree found for mesh", v.name, { workerTask: I[p], hasAcceleratedRaycast: n != null }), R.allowSlowRaycastFallback === !1 && (I.getAttribute("position")?.array?.length ?? 0) > 2e3)
|
|
6375
6375
|
return Yt && console.warn("Skipping raycast because no bounds tree is available and allowSlowRaycastFallback is false"), !1;
|
|
6376
6376
|
const G = j.firstHitOnly;
|
|
6377
6377
|
return j.firstHitOnly = !1, j.intersectObject(v, !1, A), j.firstHitOnly = G, v.raycast = B, !0;
|
|
6378
6378
|
} else if (b instanceof hu) {
|
|
6379
|
-
const j =
|
|
6379
|
+
const j = I.boundsTree;
|
|
6380
6380
|
if (j) {
|
|
6381
6381
|
const B = b;
|
|
6382
6382
|
if (c.copy(v.matrixWorld).invert(), B.applyMatrix4(c), j.intersectsSphere(B)) {
|
|
@@ -6394,7 +6394,7 @@ var Id;
|
|
|
6394
6394
|
i || (i = !0, import("./vendor-BIFy-gRe.js").then((b) => b.index$1).then((b) => {
|
|
6395
6395
|
n = b.acceleratedRaycast, o = b.MeshBVH, r = b.StaticGeometryGenerator, a = b.computeBoundsTree;
|
|
6396
6396
|
}).catch((b) => {
|
|
6397
|
-
(Yt ||
|
|
6397
|
+
(Yt || L()) && console.error("Failed to load BVH library...", b.message);
|
|
6398
6398
|
}));
|
|
6399
6399
|
}
|
|
6400
6400
|
const c = new J();
|
|
@@ -6404,7 +6404,7 @@ var Id;
|
|
|
6404
6404
|
h = !0, d = !0, Promise.resolve().then(() => IL).then((b) => {
|
|
6405
6405
|
f = b.GenerateMeshBVHWorker;
|
|
6406
6406
|
}).catch((b) => {
|
|
6407
|
-
Yt ||
|
|
6407
|
+
Yt || L() ? console.warn("Failed to setup mesh bvh worker") : console.debug("Failed to setup mesh bvh worker", b);
|
|
6408
6408
|
}).finally(() => {
|
|
6409
6409
|
d = !1;
|
|
6410
6410
|
});
|
|
@@ -6488,42 +6488,42 @@ const rv = /* @__PURE__ */ Symbol("disposed");
|
|
|
6488
6488
|
function x2(s) {
|
|
6489
6489
|
return s[rv] === !0;
|
|
6490
6490
|
}
|
|
6491
|
-
function
|
|
6491
|
+
function Te(s) {
|
|
6492
6492
|
if (s) {
|
|
6493
6493
|
if (s[ov] === !1) {
|
|
6494
6494
|
yr && console.warn("Object is marked as not disposable", s);
|
|
6495
6495
|
return;
|
|
6496
6496
|
}
|
|
6497
6497
|
if (typeof s == "object" && (s[rv] = !0), s instanceof Mi)
|
|
6498
|
-
|
|
6498
|
+
Te(s.environment), Te(s.background), Te(s.customDepthMaterial), Te(s.customDistanceMaterial);
|
|
6499
6499
|
else if (s instanceof mo)
|
|
6500
|
-
|
|
6500
|
+
Te(s.geometry), Te(s.material), Te(s.skeleton), Te(s.bindMatrix), Te(s.bindMatrixInverse), Te(s.customDepthMaterial), Te(s.customDistanceMaterial), s.visible = !1;
|
|
6501
6501
|
else if (s instanceof H)
|
|
6502
|
-
|
|
6502
|
+
Te(s.geometry), Te(s.material), Te(s.customDepthMaterial), Te(s.customDistanceMaterial), s.visible = !1;
|
|
6503
6503
|
else if (s instanceof M)
|
|
6504
6504
|
s.visible = !1;
|
|
6505
6505
|
else if (s instanceof _n) {
|
|
6506
6506
|
Qr(s);
|
|
6507
6507
|
for (const e of Object.keys(s.attributes)) {
|
|
6508
6508
|
const t = s.attributes[e];
|
|
6509
|
-
|
|
6509
|
+
Te(t);
|
|
6510
6510
|
}
|
|
6511
6511
|
} else if (s instanceof mt || s instanceof r0)
|
|
6512
6512
|
yr && console.warn("BufferAttribute dispose not supported", s.count);
|
|
6513
6513
|
else if (s instanceof Array)
|
|
6514
6514
|
for (const e of s)
|
|
6515
|
-
e instanceof be &&
|
|
6515
|
+
e instanceof be && Te(e);
|
|
6516
6516
|
else if (s instanceof be) {
|
|
6517
6517
|
Qr(s);
|
|
6518
6518
|
for (const t of Object.keys(s)) {
|
|
6519
6519
|
const i = s[t];
|
|
6520
|
-
i instanceof Fe &&
|
|
6520
|
+
i instanceof Fe && Te(i);
|
|
6521
6521
|
}
|
|
6522
6522
|
const e = s.uniforms;
|
|
6523
6523
|
if (e)
|
|
6524
6524
|
for (const t of Object.keys(e)) {
|
|
6525
6525
|
const i = e[t];
|
|
6526
|
-
i instanceof Fe ?
|
|
6526
|
+
i instanceof Fe ? Te(i) : i instanceof Gi && Te(i.value);
|
|
6527
6527
|
}
|
|
6528
6528
|
} else s instanceof Fe ? (Qr(s), Qr(s.source), s.source?.data instanceof ImageBitmap && Qr(s.source.data)) : s instanceof eS ? (Qr(s.boneTexture), s.boneTexture = null) : s instanceof tS || !(s instanceof M) && yr && console.warn("Unknown object type", s);
|
|
6529
6529
|
}
|
|
@@ -6581,7 +6581,7 @@ function Ld(s, e, t, i) {
|
|
|
6581
6581
|
} else if (e && n.has(e)) {
|
|
6582
6582
|
n.delete(e);
|
|
6583
6583
|
let o = t[ql] || 0;
|
|
6584
|
-
o > 0 && (o -= 1, t[ql] = o), yr && console.warn(`🔴 Removed user of "${t.type}"`, e, t, o, "users:", n), o <= 0 && (Sa.isLoading(t) || (wu && console.warn(`🔴 Removed all user of "${t.type}"`, t), sv() &&
|
|
6584
|
+
o > 0 && (o -= 1, t[ql] = o), yr && console.warn(`🔴 Removed user of "${t.type}"`, e, t, o, "users:", n), o <= 0 && (Sa.isLoading(t) || (wu && console.warn(`🔴 Removed all user of "${t.type}"`, t), sv() && Te(t)));
|
|
6585
6585
|
}
|
|
6586
6586
|
t[s] = n;
|
|
6587
6587
|
}
|
|
@@ -6656,9 +6656,9 @@ function Ca(s, e) {
|
|
|
6656
6656
|
}
|
|
6657
6657
|
return !0;
|
|
6658
6658
|
}
|
|
6659
|
-
const em = x("debugnewscripts"), rO = x("debughierarchy"),
|
|
6659
|
+
const em = x("debugnewscripts"), rO = x("debughierarchy"), Re = [];
|
|
6660
6660
|
function aO() {
|
|
6661
|
-
return
|
|
6661
|
+
return Re.length > 0;
|
|
6662
6662
|
}
|
|
6663
6663
|
function jd(s) {
|
|
6664
6664
|
if (em && console.log("Register new components", s.new_scripts.length, [...s.new_scripts], s.alias ? "element: " + s.alias : s.hash, s), s.new_scripts_pre_setup_callbacks.length > 0) {
|
|
@@ -6667,31 +6667,31 @@ function jd(s) {
|
|
|
6667
6667
|
s.new_scripts_pre_setup_callbacks.length = 0;
|
|
6668
6668
|
}
|
|
6669
6669
|
if (!(s.new_scripts.length <= 0)) {
|
|
6670
|
-
|
|
6671
|
-
for (let e = 0; e <
|
|
6670
|
+
Re.length = 0, s.new_scripts.length > 0 && Re.push(...s.new_scripts), s.new_scripts.length = 0;
|
|
6671
|
+
for (let e = 0; e < Re.length; e++)
|
|
6672
6672
|
try {
|
|
6673
|
-
const t =
|
|
6673
|
+
const t = Re[e];
|
|
6674
6674
|
if (t.isComponent !== !0) {
|
|
6675
|
-
(
|
|
6675
|
+
(L() || em) && console.error(`Registered script is not a Needle Engine component.
|
|
6676
6676
|
The script will be ignored. Please make sure your component extends "Behaviour" imported from "@needle-tools/engine"
|
|
6677
|
-
`, t),
|
|
6677
|
+
`, t), Re.splice(e, 1), e--;
|
|
6678
6678
|
continue;
|
|
6679
6679
|
}
|
|
6680
6680
|
if (t.destroyed) continue;
|
|
6681
6681
|
if (!t.gameObject) {
|
|
6682
6682
|
console.warn(`Component can not be initialized: no GameObject assigned.
|
|
6683
|
-
Did you add and remove a component in the same frame?`),
|
|
6683
|
+
Did you add and remove a component in the same frame?`), Re.splice(e, 1), e--;
|
|
6684
6684
|
continue;
|
|
6685
6685
|
}
|
|
6686
6686
|
t.context = s, dc(t.gameObject), pg(t, s);
|
|
6687
6687
|
} catch (t) {
|
|
6688
|
-
console.error(t), _s(
|
|
6688
|
+
console.error(t), _s(Re[e], s), Re.splice(e, 1), e--;
|
|
6689
6689
|
}
|
|
6690
|
-
for (let e = 0; e <
|
|
6690
|
+
for (let e = 0; e < Re.length; e++)
|
|
6691
6691
|
try {
|
|
6692
|
-
const t =
|
|
6692
|
+
const t = Re[e];
|
|
6693
6693
|
if (t.destroyed) {
|
|
6694
|
-
_s(
|
|
6694
|
+
_s(Re[e], s), Re.splice(e, 1), e--;
|
|
6695
6695
|
continue;
|
|
6696
6696
|
}
|
|
6697
6697
|
if (t.registering)
|
|
@@ -6702,25 +6702,25 @@ Did you add and remove a component in the same frame?`), Ee.splice(e, 1), e--;
|
|
|
6702
6702
|
}
|
|
6703
6703
|
t.__internalAwake !== void 0 && (t.gameObject || console.error("Calling awake for a component without a GameObject", t, t.gameObject), dc(t.gameObject), t.activeAndEnabled && Ca(t.__internalAwake.bind(t)));
|
|
6704
6704
|
} catch (t) {
|
|
6705
|
-
console.error(t), _s(
|
|
6705
|
+
console.error(t), _s(Re[e], s), Re.splice(e, 1), e--;
|
|
6706
6706
|
}
|
|
6707
|
-
for (let e = 0; e <
|
|
6707
|
+
for (let e = 0; e < Re.length; e++)
|
|
6708
6708
|
try {
|
|
6709
|
-
const t =
|
|
6709
|
+
const t = Re[e];
|
|
6710
6710
|
if (t.destroyed || t.enabled === !1 || (dc(t.gameObject), t.activeAndEnabled === !1)) continue;
|
|
6711
6711
|
t.__internalEnable !== void 0 && (t.enabled = !0, Ca(t.__internalEnable.bind(t)));
|
|
6712
6712
|
} catch (t) {
|
|
6713
|
-
console.error(t), _s(
|
|
6713
|
+
console.error(t), _s(Re[e], s), Re.splice(e, 1), e--;
|
|
6714
6714
|
}
|
|
6715
|
-
for (let e = 0; e <
|
|
6715
|
+
for (let e = 0; e < Re.length; e++)
|
|
6716
6716
|
try {
|
|
6717
|
-
const t =
|
|
6717
|
+
const t = Re[e];
|
|
6718
6718
|
if (t.destroyed || !t.gameObject) continue;
|
|
6719
6719
|
s.new_script_start.push(t);
|
|
6720
6720
|
} catch (t) {
|
|
6721
|
-
console.error(t), _s(
|
|
6721
|
+
console.error(t), _s(Re[e], s), Re.splice(e, 1), e--;
|
|
6722
6722
|
}
|
|
6723
|
-
|
|
6723
|
+
Re.length = 0;
|
|
6724
6724
|
for (const e of s.new_scripts_post_setup_callbacks)
|
|
6725
6725
|
e && e();
|
|
6726
6726
|
s.new_scripts_post_setup_callbacks.length = 0;
|
|
@@ -6773,7 +6773,7 @@ function ad(s, e = !1) {
|
|
|
6773
6773
|
return;
|
|
6774
6774
|
}
|
|
6775
6775
|
const t = qc(s);
|
|
6776
|
-
dv(s, t, !0) || (em ||
|
|
6776
|
+
dv(s, t, !0) || (em || L() ? console.error(`Error updating hierarchy
|
|
6777
6777
|
Do you have circular references in your project? <a target="_blank" href="https://docs.needle.tools/circular-reference"> Click here for more information.`, s) : console.error('Failed to update active state in hierarchy of "' + s.name + '"', s), console.warn(" ↑ this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."));
|
|
6778
6778
|
}
|
|
6779
6779
|
function dv(s, e, t, i = 0) {
|
|
@@ -6892,7 +6892,7 @@ function xu(s, e, t = !0, i) {
|
|
|
6892
6892
|
return;
|
|
6893
6893
|
}
|
|
6894
6894
|
if (!e.isConnected) {
|
|
6895
|
-
|
|
6895
|
+
L() && console.debug("Can not send destroy: not connected", s.guid);
|
|
6896
6896
|
return;
|
|
6897
6897
|
}
|
|
6898
6898
|
let o = s.guid;
|
|
@@ -6957,7 +6957,7 @@ function pv(s, e, t, i) {
|
|
|
6957
6957
|
if (l.guid) {
|
|
6958
6958
|
Bd && console.log("[Local] new instance", "gameobject:", r?.guid);
|
|
6959
6959
|
const c = new mO(n.guid, l.guid);
|
|
6960
|
-
c.seed = a, e.deleteOnDisconnect === !0 && (c.deleteStateOnDisconnect = !0), o && (o.position && (Array.isArray(o.position) ? c.position = { x: o.position[0], y: o.position[1], z: o.position[2] } : c.position = { x: o.position.x, y: o.position.y, z: o.position.z }), o.rotation && (o.rotation instanceof lt ? o.rotation = new V().setFromEuler(o.rotation) : o.rotation instanceof Array && (o.rotation = new V().fromArray(o.rotation)), c.rotation = { x: o.rotation.x, y: o.rotation.y, z: o.rotation.z, w: o.rotation.w }), o.scale && (Array.isArray(o.scale) ? c.scale = { x: o.scale[0], y: o.scale[1], z: o.scale[2] } : c.scale = { x: o.scale.x, y: o.scale.y, z: o.scale.z })), c.position || (c.position = { x: l.position.x, y: l.position.y, z: l.position.z }), c.rotation || (c.rotation = { x: l.quaternion.x, y: l.quaternion.y, z: l.quaternion.z, w: l.quaternion.w }), c.scale || (c.scale = { x: l.scale.x, y: l.scale.y, z: l.scale.z }), c.visible = n.visible, o?.parent && (typeof o.parent == "string" ? c.parent = o.parent : c.parent = o.parent.guid), c.hostData = t, i === !1 && (c.dontSave = !0), !e?.context?.connection &&
|
|
6960
|
+
c.seed = a, e.deleteOnDisconnect === !0 && (c.deleteStateOnDisconnect = !0), o && (o.position && (Array.isArray(o.position) ? c.position = { x: o.position[0], y: o.position[1], z: o.position[2] } : c.position = { x: o.position.x, y: o.position.y, z: o.position.z }), o.rotation && (o.rotation instanceof lt ? o.rotation = new V().setFromEuler(o.rotation) : o.rotation instanceof Array && (o.rotation = new V().fromArray(o.rotation)), c.rotation = { x: o.rotation.x, y: o.rotation.y, z: o.rotation.z, w: o.rotation.w }), o.scale && (Array.isArray(o.scale) ? c.scale = { x: o.scale[0], y: o.scale[1], z: o.scale[2] } : c.scale = { x: o.scale.x, y: o.scale.y, z: o.scale.z })), c.position || (c.position = { x: l.position.x, y: l.position.y, z: l.position.z }), c.rotation || (c.rotation = { x: l.quaternion.x, y: l.quaternion.y, z: l.quaternion.z, w: l.quaternion.w }), c.scale || (c.scale = { x: l.scale.x, y: l.scale.y, z: l.scale.z }), c.visible = n.visible, o?.parent && (typeof o.parent == "string" ? c.parent = o.parent : c.parent = o.parent.guid), c.hostData = t, i === !1 && (c.dontSave = !0), !e?.context?.connection && L() && console.debug("Object will be instantiated but it will not be synced: not connected", n.guid), e.context.connection.isInRoom && la.push(new WeakRef(l)), e?.context?.connection.send("new-instance-created", c);
|
|
6961
6961
|
} else console.warn("Missing guid, can not send new instance event", l);
|
|
6962
6962
|
}
|
|
6963
6963
|
return r;
|
|
@@ -7829,7 +7829,7 @@ Object.getOwnPropertyDescriptor(M.prototype, "worldRotation") || Object.definePr
|
|
|
7829
7829
|
return og(this);
|
|
7830
7830
|
},
|
|
7831
7831
|
set: function(s) {
|
|
7832
|
-
|
|
7832
|
+
k1(this, s);
|
|
7833
7833
|
}
|
|
7834
7834
|
});
|
|
7835
7835
|
Object.getOwnPropertyDescriptor(M.prototype, "worldScale") || Object.defineProperty(M.prototype, "worldScale", {
|
|
@@ -7925,7 +7925,7 @@ function Ki(s, e = !0, t = !1) {
|
|
|
7925
7925
|
for (const i of ud)
|
|
7926
7926
|
i.gameObject = null, i.context = null;
|
|
7927
7927
|
for (const i of fd)
|
|
7928
|
-
ZO(i, !0), t &&
|
|
7928
|
+
ZO(i, !0), t && Te(i);
|
|
7929
7929
|
fd.length = 0, ud.length = 0;
|
|
7930
7930
|
}
|
|
7931
7931
|
function cm(s, e = !0, t = !0) {
|
|
@@ -8260,10 +8260,10 @@ var Ga;
|
|
|
8260
8260
|
if (A) break;
|
|
8261
8261
|
if (d?.abort?.aborted)
|
|
8262
8262
|
return console.debug("Aborted upload"), null;
|
|
8263
|
-
const
|
|
8264
|
-
|
|
8265
|
-
} catch (
|
|
8266
|
-
console.error(
|
|
8263
|
+
const I = await v(b.upload);
|
|
8264
|
+
I instanceof Error ? (O = I, await So(1e3 * R)) : I.ok && (console.debug("File uploaded successfully"), A = !0);
|
|
8265
|
+
} catch (I) {
|
|
8266
|
+
console.error(I);
|
|
8267
8267
|
}
|
|
8268
8268
|
if (!A)
|
|
8269
8269
|
return console.error(O?.message || "Failed to upload file"), null;
|
|
@@ -8689,7 +8689,7 @@ class Ls {
|
|
|
8689
8689
|
*/
|
|
8690
8690
|
static testIfRootCanAnimate(e, t) {
|
|
8691
8691
|
const i = e.getRoot();
|
|
8692
|
-
return i && (i.userData.static || i.matrixAutoUpdate === !1 || i.matrixWorldAutoUpdate === !1) ? ((t === !0 || t === void 0 &&
|
|
8692
|
+
return i && (i.userData.static || i.matrixAutoUpdate === !1 || i.matrixWorldAutoUpdate === !1) ? ((t === !0 || t === void 0 && L()) && console.warn(`AnimationUtils: The root object (${i.name || i.type}) of this AnimationAction has matrixAutoUpdate or matrixWorldAutoUpdate set to false. This may prevent the animation from working correctly. If the object is marked as static, try to change it to dynamic.`, { static: i.userData.static, name: i.userData.name, tag: i.userData.tag, matrixAutoUpdate: i.matrixAutoUpdate, matrixWorldAutoUpdate: i.matrixWorldAutoUpdate }), !1) : !0;
|
|
8693
8693
|
}
|
|
8694
8694
|
/**
|
|
8695
8695
|
* Tries to get the animation actions from an animation mixer.
|
|
@@ -8852,7 +8852,7 @@ class ck {
|
|
|
8852
8852
|
h && a.push(h);
|
|
8853
8853
|
}
|
|
8854
8854
|
const l = await k0(a);
|
|
8855
|
-
l?.anyFailed && (
|
|
8855
|
+
l?.anyFailed && (L() || Yr) && console.error("[NEEDLE_lightmaps]Error during extension loading:", l), o();
|
|
8856
8856
|
})) : null;
|
|
8857
8857
|
}
|
|
8858
8858
|
}
|
|
@@ -9006,8 +9006,8 @@ TEX ` + i.texture_lod;
|
|
|
9006
9006
|
` + (n.lastScreenCoverage * 100).toFixed(1) + `% cov
|
|
9007
9007
|
` + (n.lastCentrality * 100).toFixed(1) + `% centr
|
|
9008
9008
|
` + (Ih.min.x.toFixed(2) + "-" + Ih.max.x.toFixed(2) + "x" + Ih.min.y.toFixed(2) + "-" + Ih.max.y.toFixed(2)) + " scr"), n.lastScreenCoverage > 0.1) {
|
|
9009
|
-
const g = e, w = g.worldForward, b = g.worldPosition, A = z(w).multiplyScalar(c * 0.7).add(l), O = A.distanceTo(b), R = h[Math.min(h.length - 1, Math.max(0, o))] + "88",
|
|
9010
|
-
U.DrawLabel(A, _, O * 0.012 *
|
|
9009
|
+
const g = e, w = g.worldForward, b = g.worldPosition, A = z(w).multiplyScalar(c * 0.7).add(l), O = A.distanceTo(b), R = h[Math.min(h.length - 1, Math.max(0, o))] + "88", I = this.context.domHeight > 0 ? screen.height / this.context.domHeight : 1, j = e.isPerspectiveCamera ? Math.tan(e.fov * Math.PI / 180 / 2) : 1;
|
|
9010
|
+
U.DrawLabel(A, _, O * 0.012 * I * j, void 0, 16777215, R);
|
|
9011
9011
|
}
|
|
9012
9012
|
}
|
|
9013
9013
|
}
|
|
@@ -9451,7 +9451,7 @@ vec3 NeutralToneMapping( vec3 color ) {
|
|
|
9451
9451
|
if (i >= 0 && n >= 0) {
|
|
9452
9452
|
const o = Zt.tonemapping_pars_fragment.substring(i, n + t.length);
|
|
9453
9453
|
Zt.tonemapping_pars_fragment = Zt.tonemapping_pars_fragment.replace(o, s);
|
|
9454
|
-
} else
|
|
9454
|
+
} else L() && console.error("Couldn't find NeutralToneMapping in ShaderChunk.tonemapping_pars_fragment");
|
|
9455
9455
|
}
|
|
9456
9456
|
function Pk() {
|
|
9457
9457
|
const s = `
|
|
@@ -9569,7 +9569,7 @@ vec3 AgXToneMapping( vec3 color ) {
|
|
|
9569
9569
|
if (i >= 0 && n >= 0) {
|
|
9570
9570
|
const o = Zt.tonemapping_pars_fragment.substring(i, n + t.length);
|
|
9571
9571
|
Zt.tonemapping_pars_fragment = Zt.tonemapping_pars_fragment.replace(o, s);
|
|
9572
|
-
} else
|
|
9572
|
+
} else L() && console.error("Couldn't find AgXToneMapping in ShaderChunk.tonemapping_pars_fragment");
|
|
9573
9573
|
}
|
|
9574
9574
|
function Av(s) {
|
|
9575
9575
|
if (typeof s == "string")
|
|
@@ -9655,14 +9655,14 @@ async function kk(s, e) {
|
|
|
9655
9655
|
let h = null;
|
|
9656
9656
|
if (h = fc.getAttributeAndCheckFalsey(l, "qrcode-logo-src"), c && e.showLogo !== !0 && h === !1 || (h ||= fc.getAttributeAndCheckFalsey(l, "logo-src"), c && e.showLogo !== !0 && h === !1) || (h ||= fc.getAttributeAndCheckFalsey(l, "loading-logo-src", {
|
|
9657
9657
|
onAttribute: () => {
|
|
9658
|
-
|
|
9658
|
+
L() ? console.warn("[QR Code] 'loading-logo-src' is deprecated, please use 'logo-src' or 'qrcode-logo-src' instead.") : console.debug("[QR Code] 'loading-logo-src' is deprecated.");
|
|
9659
9659
|
}
|
|
9660
9660
|
}), c && e.showLogo !== !0 && h === !1) || (h && !c && (console.warn("[QR Code] Custom logo is only available with a commercial license. Using default Needle logo. Please get a commercial license at https://needle.tools/pricing."), h = null), h ||= Na, !h)) return;
|
|
9661
9661
|
let d = !1;
|
|
9662
9662
|
e.showLogo !== !1 && (a.src = h, d = await new Promise((v, A) => {
|
|
9663
9663
|
a.onload = () => v(!0), a.onerror = (O) => {
|
|
9664
9664
|
const R = h !== Na ? "'" + h + "'" : null;
|
|
9665
|
-
console.error("[QR Code] Error loading logo image for QR code", R,
|
|
9665
|
+
console.error("[QR Code] Error loading logo image for QR code", R, L() ? O : ""), v(!1);
|
|
9666
9666
|
};
|
|
9667
9667
|
}));
|
|
9668
9668
|
const f = document.createElement("canvas");
|
|
@@ -9677,10 +9677,10 @@ async function kk(s, e) {
|
|
|
9677
9677
|
if (d) {
|
|
9678
9678
|
const v = a.width / a.height;
|
|
9679
9679
|
v > 1 ? g = _ / v : _ = g * v;
|
|
9680
|
-
const A = n * s.width, O = Math.max(_, g), R = Math.round(O + A),
|
|
9680
|
+
const A = n * s.width, O = Math.max(_, g), R = Math.round(O + A), I = Math.round(O + A), j = (f.width - O) / 2, B = (f.height - O) / 2;
|
|
9681
9681
|
p.shadowColor = o, p.shadowBlur = i;
|
|
9682
9682
|
const G = r, X = Math.round(j - A / 2), k = Math.round(B - A / 2);
|
|
9683
|
-
p.beginPath(), p.moveTo(X + G, k), p.lineTo(X + R - G, k), p.quadraticCurveTo(X + R, k, X + R, k + G), p.lineTo(X + R, k +
|
|
9683
|
+
p.beginPath(), p.moveTo(X + G, k), p.lineTo(X + R - G, k), p.quadraticCurveTo(X + R, k, X + R, k + G), p.lineTo(X + R, k + I - G), p.quadraticCurveTo(X + R, k + I, X + R - G, k + I), p.lineTo(X + G, k + I), p.quadraticCurveTo(X, k + I, X, k + I - G), p.lineTo(X, k + G), p.quadraticCurveTo(X, k, X + G, k), p.fillStyle = "#ffffff", p.closePath(), p.fill(), p.clip(), p.shadowColor = "transparent";
|
|
9684
9684
|
const W = (f.width - _) / 2, q = (f.height - g) / 2;
|
|
9685
9685
|
p.drawImage(a, W, q, _, g);
|
|
9686
9686
|
}
|
|
@@ -9757,7 +9757,7 @@ class mn {
|
|
|
9757
9757
|
if (this._fullscreenButton)
|
|
9758
9758
|
return this._fullscreenButton;
|
|
9759
9759
|
if (!document.fullscreenEnabled)
|
|
9760
|
-
return
|
|
9760
|
+
return L() && console.warn("NeedleMenu: Fullscreen button could not be created, device doesn't support the Fullscreen API"), null;
|
|
9761
9761
|
const t = document.createElement("button");
|
|
9762
9762
|
this._fullscreenButton = t, t.classList.add("fullscreen-button"), t.title = "Click to enter fullscreen mode", bo.setElementPriority(t, 3);
|
|
9763
9763
|
const i = Ft("fullscreen"), n = Ft("fullscreen_exit");
|
|
@@ -9829,7 +9829,7 @@ class mn {
|
|
|
9829
9829
|
const o = document.createElement("div");
|
|
9830
9830
|
o.classList.add("qr-code-container"), n.appendChild(o), i.addEventListener("click", () => {
|
|
9831
9831
|
if (n.parentNode) return a();
|
|
9832
|
-
|
|
9832
|
+
L() && window.location.href.includes("://localhost") && _e("To access your website from another device in the same local network you have to use the IP address instead of localhost. The IP address is logged in your development server console when you start the server."), r();
|
|
9833
9833
|
});
|
|
9834
9834
|
async function r() {
|
|
9835
9835
|
await l();
|
|
@@ -10371,7 +10371,7 @@ let bo = class {
|
|
|
10371
10371
|
this._muteButton?.remove();
|
|
10372
10372
|
return;
|
|
10373
10373
|
}
|
|
10374
|
-
this._muteButton = mn.getOrCreate().createMuteButton(this._context), this.
|
|
10374
|
+
this._muteButton = mn.getOrCreate().createMuteButton(this._context), this._menu.appendChild(this._muteButton);
|
|
10375
10375
|
}
|
|
10376
10376
|
_muteButton;
|
|
10377
10377
|
showFullscreenOption(e) {
|
|
@@ -10379,7 +10379,7 @@ let bo = class {
|
|
|
10379
10379
|
this._fullscreenButton?.remove();
|
|
10380
10380
|
return;
|
|
10381
10381
|
}
|
|
10382
|
-
this._fullscreenButton = mn.getOrCreate().createFullscreenButton(this._context), this._fullscreenButton &&
|
|
10382
|
+
this._fullscreenButton = mn.getOrCreate().createFullscreenButton(this._context), this._fullscreenButton && this._menu.appendChild(this._fullscreenButton);
|
|
10383
10383
|
}
|
|
10384
10384
|
_fullscreenButton;
|
|
10385
10385
|
appendChild(e) {
|
|
@@ -10581,9 +10581,9 @@ class Ou extends HTMLElement {
|
|
|
10581
10581
|
|
|
10582
10582
|
.logo {
|
|
10583
10583
|
cursor: pointer;
|
|
10584
|
-
padding-left: 0.
|
|
10585
|
-
padding-bottom: .
|
|
10586
|
-
margin-right: 0.
|
|
10584
|
+
padding-left: 0.5em;
|
|
10585
|
+
padding-bottom: .02em;
|
|
10586
|
+
margin-right: 0.6em;
|
|
10587
10587
|
}
|
|
10588
10588
|
.logo-hidden {
|
|
10589
10589
|
.logo {
|
|
@@ -10592,8 +10592,8 @@ class Ou extends HTMLElement {
|
|
|
10592
10592
|
}
|
|
10593
10593
|
:host .has-options .logo {
|
|
10594
10594
|
border-left: 1px solid rgba(40,40,40,.4);
|
|
10595
|
-
margin-left: 0.
|
|
10596
|
-
margin-right: 0.
|
|
10595
|
+
margin-left: 0.3em;
|
|
10596
|
+
margin-right: 0.6em;
|
|
10597
10597
|
}
|
|
10598
10598
|
|
|
10599
10599
|
.logo > span {
|
|
@@ -10725,22 +10725,23 @@ class Ou extends HTMLElement {
|
|
|
10725
10725
|
}
|
|
10726
10726
|
|
|
10727
10727
|
.compact .options > *, .compact .options > ::slotted(*) {
|
|
10728
|
-
font-size: 1.
|
|
10729
|
-
padding: .
|
|
10728
|
+
font-size: 1.2em;
|
|
10729
|
+
padding: .6em .5em;
|
|
10730
10730
|
width: 100%;
|
|
10731
10731
|
}
|
|
10732
10732
|
.compact.has-options {
|
|
10733
|
-
padding-left:
|
|
10733
|
+
padding-left: 1em;
|
|
10734
10734
|
}
|
|
10735
10735
|
.compact.has-options .logo {
|
|
10736
10736
|
border: none;
|
|
10737
10737
|
padding-left: 0;
|
|
10738
|
-
margin-bottom: .
|
|
10738
|
+
margin-bottom: .02em;
|
|
10739
10739
|
}
|
|
10740
10740
|
.compact .options.compact-only {
|
|
10741
10741
|
display: initial;
|
|
10742
10742
|
& > * {
|
|
10743
10743
|
min-height: 1em;
|
|
10744
|
+
padding: .4em .4em;
|
|
10744
10745
|
}
|
|
10745
10746
|
}
|
|
10746
10747
|
.compact .options {
|
|
@@ -10840,7 +10841,7 @@ class Ou extends HTMLElement {
|
|
|
10840
10841
|
}
|
|
10841
10842
|
_sizeChangeInterval;
|
|
10842
10843
|
connectedCallback() {
|
|
10843
|
-
window.addEventListener("resize", this.handleSizeChange), this.handleMenuVisible(), this._sizeChangeInterval = setInterval(() => this.handleSizeChange(void 0, !
|
|
10844
|
+
window.addEventListener("resize", this.handleSizeChange), this.handleMenuVisible(), this._sizeChangeInterval = setInterval(() => this.handleSizeChange(void 0, !1), 5e3), setTimeout(() => {
|
|
10844
10845
|
this._domElement?.addEventListener("resize", this.handleSizeChange), this._domElement?.addEventListener("click", this.#t);
|
|
10845
10846
|
}, 1);
|
|
10846
10847
|
}
|
|
@@ -10957,6 +10958,8 @@ class Ou extends HTMLElement {
|
|
|
10957
10958
|
this.trackElement(t), this.options.prepend(t);
|
|
10958
10959
|
}
|
|
10959
10960
|
_isHandlingChange = !1;
|
|
10961
|
+
/** During modification of options container (e.g. when moving items into the extra buttons container) the mutation observer should not trigger an update event immediately. This is a workaround for the total size required for all elements not being calculated reliably. */
|
|
10962
|
+
_pauseMutationObserverOptionsContainer = !1;
|
|
10960
10963
|
/** Called when any change in the web component is detected (including in children and child attributes) */
|
|
10961
10964
|
onChangeDetected(e) {
|
|
10962
10965
|
if (!this._isHandlingChange) {
|
|
@@ -10964,7 +10967,7 @@ class Ou extends HTMLElement {
|
|
|
10964
10967
|
try {
|
|
10965
10968
|
this.handleMenuVisible();
|
|
10966
10969
|
for (const t of e)
|
|
10967
|
-
t.target == this.options && this.onOptionsChildrenChanged(t);
|
|
10970
|
+
t.target == this.options && (this._pauseMutationObserverOptionsContainer || this.onOptionsChildrenChanged(t));
|
|
10968
10971
|
} finally {
|
|
10969
10972
|
this._isHandlingChange = !1;
|
|
10970
10973
|
}
|
|
@@ -11014,46 +11017,64 @@ class Ou extends HTMLElement {
|
|
|
11014
11017
|
return !1;
|
|
11015
11018
|
}
|
|
11016
11019
|
_lastAvailableWidthChange = 0;
|
|
11017
|
-
|
|
11020
|
+
_timeoutHandleSize = 0;
|
|
11021
|
+
_timeoutHandleCompactItems = 0;
|
|
11018
11022
|
handleSizeChange = (e, t) => {
|
|
11019
11023
|
if (!this._domElement) return;
|
|
11020
11024
|
const i = this._domElement.clientWidth;
|
|
11021
11025
|
if (i < 100) {
|
|
11022
|
-
clearTimeout(this.
|
|
11026
|
+
clearTimeout(this._timeoutHandleSize), this.root.classList.add("compact"), this.foldout.classList.add("floating-panel-style");
|
|
11023
11027
|
return;
|
|
11024
11028
|
}
|
|
11025
|
-
const o = i -
|
|
11029
|
+
const o = i - 20;
|
|
11026
11030
|
if (!t && Math.abs(o - this._lastAvailableWidthChange) < 1) return;
|
|
11027
|
-
this._lastAvailableWidthChange = o, clearTimeout(this.
|
|
11031
|
+
this._lastAvailableWidthChange = o, clearTimeout(this._timeoutHandleSize), this._timeoutHandleSize = setTimeout(() => {
|
|
11028
11032
|
const c = l();
|
|
11029
|
-
|
|
11030
|
-
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
const p = this.options.children.item(f);
|
|
11036
|
-
if (p instanceof HTMLElement) {
|
|
11037
|
-
const m = bo.getElementPriority(p);
|
|
11038
|
-
if (m !== void 0 && m > d) {
|
|
11039
|
-
if (p.style.display === "none") continue;
|
|
11040
|
-
h = p, d = m;
|
|
11041
|
-
}
|
|
11042
|
-
}
|
|
11043
|
-
}
|
|
11044
|
-
if (h) {
|
|
11045
|
-
const f = h, p = f.cloneNode(!0);
|
|
11046
|
-
p.addEventListener("click", () => f.click()), this.optionsCompactMode.appendChild(p);
|
|
11047
|
-
}
|
|
11048
|
-
}
|
|
11049
|
-
}, 5);
|
|
11050
|
-
const r = () => this.options.clientWidth + this.logoContainer.clientWidth;
|
|
11033
|
+
c < 0 ? (this.root.classList.add("compact"), this.foldout.classList.add("floating-panel-style")) : c > 0 && (this.root.classList.remove("compact"), this.foldout.classList.remove("floating-panel-style"), l() < 0 && (this.root.classList.add("compact"), this.foldout.classList.add("floating-panel-style"))), this._pauseMutationObserverOptionsContainer = !0, this.updateCompactFoldoutItem(), window.requestAnimationFrame(() => this._pauseMutationObserverOptionsContainer = !1);
|
|
11034
|
+
}, 150);
|
|
11035
|
+
const r = () => {
|
|
11036
|
+
let c = 0;
|
|
11037
|
+
return c += this.options.getBoundingClientRect().width, c += this.optionsCompactMode.getBoundingClientRect().width, c += 10 * this.options.childElementCount, c += this.logoContainer.style.display != "none" ? this.logoContainer.getBoundingClientRect().width : 0, c;
|
|
11038
|
+
};
|
|
11051
11039
|
let a = -1;
|
|
11052
11040
|
const l = () => {
|
|
11053
11041
|
const c = o - r();
|
|
11054
|
-
return ga && c !== a && (a = c,
|
|
11042
|
+
return ga && c !== a && (a = c, Ae(`Menu space left: ${c.toFixed(0)}px`)), c;
|
|
11055
11043
|
};
|
|
11056
11044
|
};
|
|
11045
|
+
updateCompactFoldoutItem() {
|
|
11046
|
+
if (this.root.classList.contains("compact")) {
|
|
11047
|
+
let e = null, t = -1e7;
|
|
11048
|
+
const i = (n) => {
|
|
11049
|
+
if (n instanceof HTMLElement) {
|
|
11050
|
+
const o = bo.getElementPriority(n);
|
|
11051
|
+
if (o !== void 0 && o >= t) {
|
|
11052
|
+
const r = window.getComputedStyle(n);
|
|
11053
|
+
if (r.display === "none" || r.visibility === "hidden" || r.opacity === "0")
|
|
11054
|
+
return;
|
|
11055
|
+
e = n, t = o;
|
|
11056
|
+
}
|
|
11057
|
+
}
|
|
11058
|
+
};
|
|
11059
|
+
for (let n = 0; n < this.options.children.length; n++)
|
|
11060
|
+
i(this.options.children.item(n));
|
|
11061
|
+
for (let n = 0; n < this.optionsCompactMode.children.length; n++)
|
|
11062
|
+
i(this.optionsCompactMode.children.item(n));
|
|
11063
|
+
if (e && !this.optionsCompactMode.contains(e)) {
|
|
11064
|
+
this.optionsCompactMode.childNodes.forEach((o) => {
|
|
11065
|
+
this.options.appendChild(o);
|
|
11066
|
+
});
|
|
11067
|
+
const n = e;
|
|
11068
|
+
this.optionsCompactMode.appendChild(n);
|
|
11069
|
+
} else e || this.optionsCompactMode.childNodes.forEach((n) => {
|
|
11070
|
+
this.options.appendChild(n);
|
|
11071
|
+
});
|
|
11072
|
+
} else
|
|
11073
|
+
this.optionsCompactMode.childNodes.forEach((e) => {
|
|
11074
|
+
this.options.appendChild(e);
|
|
11075
|
+
});
|
|
11076
|
+
}
|
|
11077
|
+
// private _foldoutItemVisibleInterval = 0;
|
|
11057
11078
|
___insertDebugOptions() {
|
|
11058
11079
|
window.addEventListener("keydown", (i) => {
|
|
11059
11080
|
i.key === "p" && this.setPosition(this.root.classList.contains("top") ? "bottom" : "top");
|
|
@@ -11099,7 +11120,7 @@ var Se = /* @__PURE__ */ ((s) => (s[s.Start = -1] = "Start", s[s.EarlyUpdate = 0
|
|
|
11099
11120
|
function Sg(s, e) {
|
|
11100
11121
|
if (!s) return;
|
|
11101
11122
|
if (!s.isComponent) {
|
|
11102
|
-
(
|
|
11123
|
+
(L() || Ke) && console.error(`Registered script is not a Needle Engine component.
|
|
11103
11124
|
The script will be ignored. Please make sure your component extends "Behaviour" imported from "@needle-tools/engine"
|
|
11104
11125
|
`, s);
|
|
11105
11126
|
return;
|
|
@@ -11448,7 +11469,7 @@ class N {
|
|
|
11448
11469
|
_isCreated = !1;
|
|
11449
11470
|
_isCreating = !1;
|
|
11450
11471
|
_isVisible = !1;
|
|
11451
|
-
_stats = Tk ? new
|
|
11472
|
+
_stats = Tk ? new mC() : null;
|
|
11452
11473
|
constructor(e) {
|
|
11453
11474
|
this.name = e?.name || "", this.alias = e?.alias, this.domElement = e?.domElement || document.body, this.hash = e?.hash, e?.renderer && (this.renderer = e.renderer, this.isManagedExternally = !0), e?.runInBackground !== void 0 && (this.runInBackground = e.runInBackground), e?.scene ? this.scene = e.scene : this.scene = new Mi(), e?.camera && (this._mainCamera = e.camera), this.application = new Zn(this), this.time = new Sk(), this.input = new mP(this), this.physics = new Ac(this), this.connection = new EP(this), this.assets = new tO(), this.sceneLighting = new wk(this), this.addressables = new ik(this), this.lightmaps = new hk(this), this.players = new pk(this), this.menu = new bo(this), this.lodsManager = new dk(this), this.animations = new ak(this);
|
|
11454
11475
|
const t = () => this._needsUpdateSize = !0;
|
|
@@ -11470,7 +11491,7 @@ class N {
|
|
|
11470
11491
|
const t = this.domElement?.shadowRoot?.querySelector("canvas");
|
|
11471
11492
|
t && (e.canvas = t, Ke && console.log("Using canvas from shadow root", t));
|
|
11472
11493
|
}
|
|
11473
|
-
return Ke && console.log("Using Renderer Parameters:", e, this.domElement), this.renderer = new Ir(e), this.renderer.debug.checkShaderErrors =
|
|
11494
|
+
return Ke && console.log("Using Renderer Parameters:", e, this.domElement), this.renderer = new Ir(e), this.renderer.debug.checkShaderErrors = L() || x("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = Cd, this.renderer.setClearColor(new re("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = aS, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = As, this.renderer.nodes = {
|
|
11474
11495
|
library: new lS(),
|
|
11475
11496
|
modelViewMatrix: null,
|
|
11476
11497
|
modelNormalViewMatrix: null
|
|
@@ -11720,7 +11741,7 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
|
|
|
11720
11741
|
Ke && console.log("Creating context", this.name, e);
|
|
11721
11742
|
const i = globalThis["needle:dependencies:ready"];
|
|
11722
11743
|
i instanceof Promise && (Ke && console.log("Waiting for dependencies to be ready"), await i.catch((h) => {
|
|
11723
|
-
if (Ke ||
|
|
11744
|
+
if (Ke || L()) {
|
|
11724
11745
|
if (vu("Needle Engine dependencies failed to load. Please check the console for more details"), h instanceof ReferenceError) {
|
|
11725
11746
|
let d = "YourComponentName";
|
|
11726
11747
|
const f = h.message.indexOf("'");
|
|
@@ -11868,11 +11889,11 @@ Possible solutions:
|
|
|
11868
11889
|
_renderlooperrors = 0;
|
|
11869
11890
|
/** Performs a full update step including script callbacks, rendering (unless isManagedExternally is set to false) and post render callbacks */
|
|
11870
11891
|
update(e, t) {
|
|
11871
|
-
if (t === void 0 && (t = null),
|
|
11892
|
+
if (t === void 0 && (t = null), L() || Ke || aO())
|
|
11872
11893
|
try {
|
|
11873
11894
|
this.internalStep(e, t), this._renderlooperrors = 0;
|
|
11874
11895
|
} catch (i) {
|
|
11875
|
-
this._renderlooperrors += 1, (
|
|
11896
|
+
this._renderlooperrors += 1, (L() || Ke) && (i instanceof Error || i instanceof TypeError) && Ae("Caught unhandled exception during render-loop - see console for details.", qi.Error), console.error("Frame #" + this.time.frame + `
|
|
11876
11897
|
`, i), this._renderlooperrors >= 3 && (console.warn("Stopping render loop due to error"), this.renderer.setAnimationLoop(null), ci.sendError(N.Current, "renderloop", i instanceof Error ? i : new Error(String(i)))), this.domElement.dispatchEvent(new CustomEvent("error", { detail: i }));
|
|
11877
11898
|
}
|
|
11878
11899
|
else
|
|
@@ -12024,7 +12045,7 @@ Possible solutions:
|
|
|
12024
12045
|
this.pre_render_callbacks[n](t);
|
|
12025
12046
|
if (this._focusRect && this.mainCamera instanceof ce) {
|
|
12026
12047
|
const n = this.focusRectSettings, o = n.damping > 0 ? this.time.deltaTime / n.damping : 1;
|
|
12027
|
-
|
|
12048
|
+
g1(this._focusRect, this.focusRectSettings, o, this.mainCamera, this.renderer);
|
|
12028
12049
|
}
|
|
12029
12050
|
}
|
|
12030
12051
|
return !0;
|
|
@@ -12531,7 +12552,7 @@ function Fv() {
|
|
|
12531
12552
|
return Yf;
|
|
12532
12553
|
}
|
|
12533
12554
|
function H_(s) {
|
|
12534
|
-
s !== void 0 && typeof s == "string" &&
|
|
12555
|
+
s !== void 0 && typeof s == "string" && dC(s);
|
|
12535
12556
|
}
|
|
12536
12557
|
function G_(s) {
|
|
12537
12558
|
if (s !== void 0 && typeof s == "string" && s !== "js") {
|
|
@@ -12540,11 +12561,11 @@ function G_(s) {
|
|
|
12540
12561
|
}
|
|
12541
12562
|
}
|
|
12542
12563
|
function q_(s) {
|
|
12543
|
-
s !== void 0 && typeof s == "string" &&
|
|
12564
|
+
s !== void 0 && typeof s == "string" && hC(s);
|
|
12544
12565
|
}
|
|
12545
12566
|
function Og(s, e) {
|
|
12546
12567
|
const t = Fv();
|
|
12547
|
-
return e.renderer ? t.ktx2Loader.detectSupport(e.renderer) : console.warn("No renderer provided to detect ktx2 support - loading KTX2 textures will probably fail"),
|
|
12568
|
+
return e.renderer ? t.ktx2Loader.detectSupport(e.renderer) : console.warn("No renderer provided to detect ktx2 support - loading KTX2 textures will probably fail"), lC(s), s.dracoLoader || s.setDRACOLoader(t.dracoLoader), s.ktx2Loader || s.setKTX2Loader(t.ktx2Loader), s.meshoptDecoder || s.setMeshoptDecoder(t.meshoptDecoder), cC(s, {
|
|
12548
12569
|
progressive: !0
|
|
12549
12570
|
}), s;
|
|
12550
12571
|
}
|
|
@@ -13201,7 +13222,7 @@ class E {
|
|
|
13201
13222
|
}
|
|
13202
13223
|
/** @internal */
|
|
13203
13224
|
__internalEnable(e) {
|
|
13204
|
-
return this.__destroyed ? (
|
|
13225
|
+
return this.__destroyed ? (L() && console.warn("[Needle Engine Dev] Trying to enable destroyed component"), !1) : this.__didAwake ? this.__didEnable ? (e !== !0 && (this.__isEnabled = !0), !1) : (this.__didEnable = !0, this.__isEnabled = !0, this.onEnable(), !0) : !1;
|
|
13205
13226
|
}
|
|
13206
13227
|
/** @internal */
|
|
13207
13228
|
__internalDisable(e) {
|
|
@@ -13226,7 +13247,7 @@ class E {
|
|
|
13226
13247
|
}
|
|
13227
13248
|
set enabled(e) {
|
|
13228
13249
|
if (this.__destroyed) {
|
|
13229
|
-
|
|
13250
|
+
L() && console.warn(`[Needle Engine Dev] Trying to ${e ? "enable" : "disable"} destroyed component`);
|
|
13230
13251
|
return;
|
|
13231
13252
|
}
|
|
13232
13253
|
if (typeof e == "number" && (e >= 0.5 ? e = !0 : e = !1), !this.__didAwake) {
|
|
@@ -14086,7 +14107,7 @@ class wn {
|
|
|
14086
14107
|
if (typeof this.model == "string")
|
|
14087
14108
|
return console.warn("AnimatorController has not been resolved, can not create model from string", this.model), null;
|
|
14088
14109
|
nt && console.warn("AnimatorController clone()", this.model);
|
|
14089
|
-
const e = gu(this.model, (i, n, o) => o == null ? !0 : !(o.type === "Object3D" || o.isObject3D === !0 ||
|
|
14110
|
+
const e = gu(this.model, (i, n, o) => o == null ? !0 : !(o.type === "Object3D" || o.isObject3D === !0 || M1(o) || o.tracks !== void 0 || o instanceof wn));
|
|
14090
14111
|
return console.assert(e !== this.model), new wn(e);
|
|
14091
14112
|
}
|
|
14092
14113
|
/**
|
|
@@ -14127,7 +14148,7 @@ class wn {
|
|
|
14127
14148
|
}
|
|
14128
14149
|
}
|
|
14129
14150
|
setStartTransition() {
|
|
14130
|
-
this.model.layers.length > 1 && (nt ||
|
|
14151
|
+
this.model.layers.length > 1 && (nt || L()) && console.warn("Multiple layers are not supported yet " + this.animator?.name);
|
|
14131
14152
|
for (const e of this.model.layers) {
|
|
14132
14153
|
const t = e.stateMachine;
|
|
14133
14154
|
t.defaultState === void 0 && (nt && console.warn("AnimatorController default state is undefined, will assign state 0 as default", e), t.defaultState = 0);
|
|
@@ -14278,7 +14299,7 @@ Exit Time: ` + c, o.hasExitTime);
|
|
|
14278
14299
|
r.conditions || (r.conditions = []);
|
|
14279
14300
|
if (o.motion || (nt && console.warn("No motion", o), o.motion = Zk(o.name)), this.animator && o.motion.clips) {
|
|
14280
14301
|
const r = o.motion.clips?.find((a) => a.node.name === this.animator?.gameObject?.name);
|
|
14281
|
-
r ? o.motion.clip = r.clip : (nt ||
|
|
14302
|
+
r ? o.motion.clip = r.clip : (nt || L()) && console.warn('Could not find clip for animator "' + this.animator?.gameObject?.name + '"', o.motion.clips.map((a) => a.node.name));
|
|
14282
14303
|
}
|
|
14283
14304
|
if (!o.motion.clip) {
|
|
14284
14305
|
nt && console.warn("No clip assigned to state", o);
|
|
@@ -14291,7 +14312,7 @@ Exit Time: ` + c, o.hasExitTime);
|
|
|
14291
14312
|
const a = this.createAction(r);
|
|
14292
14313
|
o.motion.action = a;
|
|
14293
14314
|
} else
|
|
14294
|
-
(nt ||
|
|
14315
|
+
(nt || L()) && console.warn("No valid animationclip assigned", o);
|
|
14295
14316
|
}
|
|
14296
14317
|
if (o.behaviours && Array.isArray(o.behaviours))
|
|
14297
14318
|
for (const r of o.behaviours) {
|
|
@@ -14301,7 +14322,7 @@ Exit Time: ` + c, o.hasExitTime);
|
|
|
14301
14322
|
const l = new a();
|
|
14302
14323
|
l.isStateMachineBehaviour && (l._context = this.context ?? void 0, Wa(l, r.properties), r.instance = l), nt && console.log("Created animator controller behaviour", o.name, r.typeName, r.properties, l);
|
|
14303
14324
|
} else
|
|
14304
|
-
(nt ||
|
|
14325
|
+
(nt || L()) && console.warn("Could not find AnimatorBehaviour type: " + r.typeName);
|
|
14305
14326
|
}
|
|
14306
14327
|
}
|
|
14307
14328
|
}
|
|
@@ -15031,8 +15052,8 @@ function aM(s) {
|
|
|
15031
15052
|
s.maxZoom = b * 10, s.minZoom = b * 0.01, s.debug === !0 && console.log("Fit camera to objects", { fitHeightDistance: g, fitWidthDistance: w, distance: b, verticalFov: m, horizontalFov: _ });
|
|
15032
15053
|
const v = 0.05, A = l.clone();
|
|
15033
15054
|
if (A.y -= a.y * v, s.targetOffset && (s.targetOffset.x !== void 0 && (A.x += s.targetOffset.x), s.targetOffset.y !== void 0 && (A.y += s.targetOffset.y), s.targetOffset.z !== void 0 && (A.z += s.targetOffset.z)), s.relativeTargetOffset && (s.relativeTargetOffset.x !== void 0 && (A.x += s.relativeTargetOffset.x * a.x), s.relativeTargetOffset.y !== void 0 && (A.y += s.relativeTargetOffset.y * a.y), s.relativeTargetOffset.z !== void 0 && (A.z += s.relativeTargetOffset.z * a.z)), n == null || n == "auto") {
|
|
15034
|
-
const
|
|
15035
|
-
t instanceof ce && (t.near = b / 100, t.far = B + b * 10, t.updateProjectionMatrix()),
|
|
15055
|
+
const I = Gc(Fs), j = I ? I.radius : 0, B = Math.max(p.x, p.y, p.z, j);
|
|
15056
|
+
t instanceof ce && (t.near = b / 100, t.far = B + b * 10, t.updateProjectionMatrix()), I && (s.maxZoom = Math.max(Math.min(s.maxZoom, j * 0.5), b));
|
|
15036
15057
|
}
|
|
15037
15058
|
s.currentZoom !== void 0 && (s.currentZoom < s.minZoom && (s.minZoom = s.currentZoom * 0.9), s.currentZoom > s.maxZoom && (s.maxZoom = s.currentZoom * 1.1));
|
|
15038
15059
|
const O = l.clone();
|
|
@@ -15232,7 +15253,7 @@ const Nt = function(s, e) {
|
|
|
15232
15253
|
function cM(s, e, t, i, n) {
|
|
15233
15254
|
if (!n && !i && !s.onValidate) return;
|
|
15234
15255
|
if (t !== void 0) {
|
|
15235
|
-
console.error("Invalid usage of validate decorator. Only fields can be validated.", s, e, t),
|
|
15256
|
+
console.error("Invalid usage of validate decorator. Only fields can be validated.", s, e, t), Ae("Invalid usage of validate decorator. Only fields can be validated. Property: " + e, qi.Error);
|
|
15236
15257
|
return;
|
|
15237
15258
|
}
|
|
15238
15259
|
let o = "";
|
|
@@ -15240,7 +15261,7 @@ function cM(s, e, t, i, n) {
|
|
|
15240
15261
|
const r = Symbol(o), a = s.__internalAwake;
|
|
15241
15262
|
s.__internalAwake = function() {
|
|
15242
15263
|
if (!this.onValidate) {
|
|
15243
|
-
|
|
15264
|
+
L() && console.warn('Usage of @validate decorate detected but there is no onValidate method in your class: "' + s.constructor?.name + '"');
|
|
15244
15265
|
return;
|
|
15245
15266
|
}
|
|
15246
15267
|
if (this[r] === void 0) {
|
|
@@ -15458,7 +15479,7 @@ const fi = class md extends E {
|
|
|
15458
15479
|
this._watch = void 0, this._propertiesChanged = !1;
|
|
15459
15480
|
}
|
|
15460
15481
|
onEnable() {
|
|
15461
|
-
this._watch || (this._watch = new uM(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Se.LateUpdate),
|
|
15482
|
+
this._watch || (this._watch = new uM(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Se.LateUpdate), L() && (globalThis.NEEDLE_USE_RAPIER ? T.RAPIER_PHYSICS.ready().then(async () => {
|
|
15462
15483
|
await yu(3), this.context.physics.engine?.getBody(this) || console.warn(`Rigidbody could not be created. Ensure "${this.name}" has a Collider component.`);
|
|
15463
15484
|
}) : console.warn("Rigidbody could not be created: Rapier physics are explicitly disabled."));
|
|
15464
15485
|
}
|
|
@@ -15968,7 +15989,7 @@ class de {
|
|
|
15968
15989
|
if (l) {
|
|
15969
15990
|
const c = o.arguments?.map((h) => h instanceof Object && h.uuid ? e[h.uuid] : h?.isComponent ? e[h.guid] : h);
|
|
15970
15991
|
t.push(new ao(l.clone, o.methodName, c, o.enabled));
|
|
15971
|
-
} else
|
|
15992
|
+
} else L() && console.warn("Could not find target for event listener");
|
|
15972
15993
|
}
|
|
15973
15994
|
}
|
|
15974
15995
|
}
|
|
@@ -16091,7 +16112,7 @@ class gM extends sn {
|
|
|
16091
16112
|
if (e.endsWith(".glb") || e.endsWith(".gltf")) {
|
|
16092
16113
|
if (t.serializable instanceof Array && t.serializable.includes(ne))
|
|
16093
16114
|
return;
|
|
16094
|
-
|
|
16115
|
+
L() && _e("Detected wrong usage of @serializable with Object3D or GameObject. Instead you should use AssetReference here! Please see the console for details.");
|
|
16095
16116
|
const i = t.target?.constructor?.name;
|
|
16096
16117
|
console.warn(`Wrong usage of @serializable detected in your script "${i}"
|
|
16097
16118
|
|
|
@@ -16116,7 +16137,7 @@ ${t.path}! : AssetReference;
|
|
|
16116
16137
|
}
|
|
16117
16138
|
let i;
|
|
16118
16139
|
const n = t.gltf?.scene;
|
|
16119
|
-
return n && (i = C.findByGuid(e.guid, n)), i || (i = C.findByGuid(e.guid, t.context.scene)), i ? (i && i.isComponent === !0 && (gt && console.warn("Deserialized object reference is a component"), i = i.gameObject), gt && console.log("Deserialized object reference?", e, i, t?.nodeToObject)) : ((
|
|
16140
|
+
return n && (i = C.findByGuid(e.guid, n)), i || (i = C.findByGuid(e.guid, t.context.scene)), i ? (i && i.isComponent === !0 && (gt && console.warn("Deserialized object reference is a component"), i = i.gameObject), gt && console.log("Deserialized object reference?", e, i, t?.nodeToObject)) : ((L() || gt) && console.warn("Could not resolve object reference", t.path, e, t.target, t.context.scene), e.could_not_resolve = !0), i;
|
|
16120
16141
|
}
|
|
16121
16142
|
}
|
|
16122
16143
|
}
|
|
@@ -16141,7 +16162,7 @@ class _M extends sn {
|
|
|
16141
16162
|
let n = this.findObjectForGuid(e.guid, t.root);
|
|
16142
16163
|
if (n || t.context && (n = this.findObjectForGuid(e.guid, t.context?.scene), n))
|
|
16143
16164
|
return n;
|
|
16144
|
-
(
|
|
16165
|
+
(L() || gt) && console.warn('Could not resolve component reference: "' + i + '" using guid ' + e.guid, t.target), e.could_not_resolve = !0;
|
|
16145
16166
|
return;
|
|
16146
16167
|
}
|
|
16147
16168
|
}
|
|
@@ -16208,7 +16229,7 @@ Could not find method ${r.method} on object ${l.name}`, l, typeof l[r.method]);
|
|
|
16208
16229
|
}
|
|
16209
16230
|
p = Object.getPrototypeOf(p);
|
|
16210
16231
|
}
|
|
16211
|
-
!f && (
|
|
16232
|
+
!f && (L() || gt) && h();
|
|
16212
16233
|
}
|
|
16213
16234
|
}
|
|
16214
16235
|
if (l) {
|
|
@@ -16220,7 +16241,7 @@ Could not find method ${r.method} on object ${l.name}`, l, typeof l[r.method]);
|
|
|
16220
16241
|
const f = new ao(l, r.method, h, r.enabled);
|
|
16221
16242
|
i.push(f);
|
|
16222
16243
|
}
|
|
16223
|
-
} else
|
|
16244
|
+
} else L() && console.warn(`[Dev] EventList: Could not find event listener in scene (${t.object?.name})`, r);
|
|
16224
16245
|
}
|
|
16225
16246
|
const n = new de(i);
|
|
16226
16247
|
gt && console.log(n);
|
|
@@ -16501,7 +16522,7 @@ class hi extends E {
|
|
|
16501
16522
|
hits: n
|
|
16502
16523
|
});
|
|
16503
16524
|
}
|
|
16504
|
-
no && t.isClick &&
|
|
16525
|
+
no && t.isClick && Ae("EventSystem: " + t.pointerId + " - " + this.context.time.frame + " - Up:" + t.isUp + ", Down:" + t.isDown);
|
|
16505
16526
|
const o = {
|
|
16506
16527
|
sender: this,
|
|
16507
16528
|
args: t,
|
|
@@ -16707,7 +16728,7 @@ class hi extends E {
|
|
|
16707
16728
|
const n = this._capturedPointer[i] || [];
|
|
16708
16729
|
n.push(t), this._capturedPointer[i] = n;
|
|
16709
16730
|
} else
|
|
16710
|
-
|
|
16731
|
+
L() && !t.z__warned_no_pointermove && (t.z__warned_no_pointermove = !0, console.warn("PointerCapture was requested but the component doesn't implement onPointerMove. It will not receive any pointer events"));
|
|
16711
16732
|
} else e.z__pointer_cture_rleased && (e.z__pointer_cture_rleased = !1, this.releasePointerCapture(e, t));
|
|
16712
16733
|
}
|
|
16713
16734
|
/** removes the component from the pointer capture list */
|
|
@@ -16803,7 +16824,7 @@ class Tl {
|
|
|
16803
16824
|
return e ? e.isBlock || e.isText ? e : this.findBlockOrTextInParent(e.parent) : null;
|
|
16804
16825
|
}
|
|
16805
16826
|
}
|
|
16806
|
-
var kM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor,
|
|
16827
|
+
var kM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, Me = (s, e, t, i) => {
|
|
16807
16828
|
for (var n = i > 1 ? void 0 : i ? MM(e, t) : e, o = s.length - 1, r; o >= 0; o--)
|
|
16808
16829
|
(r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
|
|
16809
16830
|
return i && n && kM(e, t, n), n;
|
|
@@ -17164,9 +17185,9 @@ class ye extends E {
|
|
|
17164
17185
|
*/
|
|
17165
17186
|
setCameraAndLookTarget(e, t = !1) {
|
|
17166
17187
|
if (!e)
|
|
17167
|
-
return (
|
|
17188
|
+
return (L() || Lt) && console.warn("[OrbitControls] setCameraAndLookTarget target is null"), !1;
|
|
17168
17189
|
if (!(e instanceof M) && !(e instanceof Si))
|
|
17169
|
-
return (
|
|
17190
|
+
return (L() || Lt) && console.warn("[OrbitControls] setCameraAndLookTarget target is not an Object3D or Camera"), !1;
|
|
17170
17191
|
e instanceof Si && (e = e.gameObject);
|
|
17171
17192
|
const i = e.worldPosition, n = e.worldForward;
|
|
17172
17193
|
e instanceof dS && (Lt && console.debug("[OrbitControls] setCameraAndLookTarget flip forward direction for camera"), n.multiplyScalar(-1));
|
|
@@ -17281,79 +17302,79 @@ class ye extends E {
|
|
|
17281
17302
|
}
|
|
17282
17303
|
_haveAttachedKeyboardEvents = !1;
|
|
17283
17304
|
}
|
|
17284
|
-
|
|
17305
|
+
Me([
|
|
17285
17306
|
u()
|
|
17286
17307
|
], ye.prototype, "autoTarget", 2);
|
|
17287
|
-
|
|
17308
|
+
Me([
|
|
17288
17309
|
u()
|
|
17289
17310
|
], ye.prototype, "autoFit", 2);
|
|
17290
|
-
|
|
17311
|
+
Me([
|
|
17291
17312
|
u()
|
|
17292
17313
|
], ye.prototype, "enableRotate", 2);
|
|
17293
|
-
|
|
17314
|
+
Me([
|
|
17294
17315
|
u()
|
|
17295
17316
|
], ye.prototype, "autoRotate", 2);
|
|
17296
|
-
|
|
17317
|
+
Me([
|
|
17297
17318
|
u()
|
|
17298
17319
|
], ye.prototype, "autoRotateSpeed", 2);
|
|
17299
|
-
|
|
17320
|
+
Me([
|
|
17300
17321
|
u()
|
|
17301
17322
|
], ye.prototype, "minAzimuthAngle", 2);
|
|
17302
|
-
|
|
17323
|
+
Me([
|
|
17303
17324
|
u()
|
|
17304
17325
|
], ye.prototype, "maxAzimuthAngle", 2);
|
|
17305
|
-
|
|
17326
|
+
Me([
|
|
17306
17327
|
u()
|
|
17307
17328
|
], ye.prototype, "minPolarAngle", 2);
|
|
17308
|
-
|
|
17329
|
+
Me([
|
|
17309
17330
|
u()
|
|
17310
17331
|
], ye.prototype, "maxPolarAngle", 2);
|
|
17311
|
-
|
|
17332
|
+
Me([
|
|
17312
17333
|
u()
|
|
17313
17334
|
], ye.prototype, "enableKeys", 2);
|
|
17314
|
-
|
|
17335
|
+
Me([
|
|
17315
17336
|
u()
|
|
17316
17337
|
], ye.prototype, "enableDamping", 2);
|
|
17317
|
-
|
|
17338
|
+
Me([
|
|
17318
17339
|
u()
|
|
17319
17340
|
], ye.prototype, "dampingFactor", 2);
|
|
17320
|
-
|
|
17341
|
+
Me([
|
|
17321
17342
|
u()
|
|
17322
17343
|
], ye.prototype, "enableZoom", 2);
|
|
17323
|
-
|
|
17344
|
+
Me([
|
|
17324
17345
|
u()
|
|
17325
17346
|
], ye.prototype, "minZoom", 2);
|
|
17326
|
-
|
|
17347
|
+
Me([
|
|
17327
17348
|
u()
|
|
17328
17349
|
], ye.prototype, "maxZoom", 2);
|
|
17329
|
-
|
|
17350
|
+
Me([
|
|
17330
17351
|
u()
|
|
17331
17352
|
], ye.prototype, "zoomSpeed", 2);
|
|
17332
|
-
|
|
17353
|
+
Me([
|
|
17333
17354
|
u()
|
|
17334
17355
|
], ye.prototype, "enablePan", 2);
|
|
17335
|
-
|
|
17356
|
+
Me([
|
|
17336
17357
|
u(Ja)
|
|
17337
17358
|
], ye.prototype, "lookAtConstraint", 2);
|
|
17338
|
-
|
|
17359
|
+
Me([
|
|
17339
17360
|
u()
|
|
17340
17361
|
], ye.prototype, "lookAtConstraint01", 2);
|
|
17341
|
-
|
|
17362
|
+
Me([
|
|
17342
17363
|
u()
|
|
17343
17364
|
], ye.prototype, "allowInterrupt", 2);
|
|
17344
|
-
|
|
17365
|
+
Me([
|
|
17345
17366
|
u()
|
|
17346
17367
|
], ye.prototype, "middleClickToFocus", 2);
|
|
17347
|
-
|
|
17368
|
+
Me([
|
|
17348
17369
|
u()
|
|
17349
17370
|
], ye.prototype, "doubleClickToFocus", 2);
|
|
17350
|
-
|
|
17371
|
+
Me([
|
|
17351
17372
|
u()
|
|
17352
17373
|
], ye.prototype, "clickBackgroundToFitScene", 2);
|
|
17353
|
-
|
|
17374
|
+
Me([
|
|
17354
17375
|
u()
|
|
17355
17376
|
], ye.prototype, "targetLerpDuration", 1);
|
|
17356
|
-
|
|
17377
|
+
Me([
|
|
17357
17378
|
u(M)
|
|
17358
17379
|
], ye.prototype, "targetBounds", 2);
|
|
17359
17380
|
var TM = Object.defineProperty, AM = Object.getOwnPropertyDescriptor, ti = (s, e, t, i) => {
|
|
@@ -17656,7 +17677,7 @@ const so = x("debugcam"), tb = x("debugscreenpointtoray"), $t = class Yl extends
|
|
|
17656
17677
|
case 2:
|
|
17657
17678
|
if (this._backgroundColor && !t) {
|
|
17658
17679
|
let i = this._backgroundColor.alpha;
|
|
17659
|
-
Yl.backgroundShouldBeTransparent(this.context) && (i = this.ARBackgroundAlpha ?? 0), this.context.scene.background = null, this.context.xr?.isVR ? this.context.renderer.setClearColor(
|
|
17680
|
+
Yl.backgroundShouldBeTransparent(this.context) && (i = this.ARBackgroundAlpha ?? 0), this.context.scene.background = null, this.context.xr?.isVR ? this.context.renderer.setClearColor(b1(this._backgroundColor).convertLinearToSRGB()) : this.context.renderer.setClearColor(this._backgroundColor, i);
|
|
17660
17681
|
} else this._backgroundColor || so && console.warn(`[Camera] has no background color "${this.name}" `);
|
|
17661
17682
|
break;
|
|
17662
17683
|
case 4:
|
|
@@ -17682,7 +17703,7 @@ const so = x("debugcam"), tb = x("debugscreenpointtoray"), $t = class Yl extends
|
|
|
17682
17703
|
if (typeof t._transparent == "boolean")
|
|
17683
17704
|
return t._transparent;
|
|
17684
17705
|
const i = t.environmentBlendMode;
|
|
17685
|
-
so &&
|
|
17706
|
+
so && Ae("Environment blend mode: " + i + " on " + navigator.userAgent);
|
|
17686
17707
|
let n = i === "additive" || i === "alpha-blend";
|
|
17687
17708
|
if (e.isInAR && i === "opaque") {
|
|
17688
17709
|
if (navigator.userAgent?.includes("OculusBrowser"))
|
|
@@ -18047,7 +18068,7 @@ const xt = x("debugaudio"), on = class oo extends E {
|
|
|
18047
18068
|
console.warn("Custom rolloff for AudioSource is not supported: " + this.name);
|
|
18048
18069
|
break;
|
|
18049
18070
|
}
|
|
18050
|
-
this.spatialBlend > 0 ? xt && !this.helper && (this.helper = new
|
|
18071
|
+
this.spatialBlend > 0 ? xt && !this.helper && (this.helper = new gC(e, e.getRefDistance()), e.add(this.helper)) : this.helper && this.helper.parent && this.helper.removeFromParent();
|
|
18051
18072
|
}
|
|
18052
18073
|
async onNewClip(e) {
|
|
18053
18074
|
if (e && (this.clip = e), typeof e == "string")
|
|
@@ -18071,7 +18092,7 @@ const xt = x("debugaudio"), on = class oo extends E {
|
|
|
18071
18092
|
* @param clip - Optional audio clip or {@link MediaStream} to play
|
|
18072
18093
|
*/
|
|
18073
18094
|
play(e = void 0) {
|
|
18074
|
-
!e && this.clip && (e = this.clip), e !== void 0 && typeof e != "string" && !(e instanceof MediaStream) && (
|
|
18095
|
+
!e && this.clip && (e = this.clip), e !== void 0 && typeof e != "string" && !(e instanceof MediaStream) && (L() && console.warn("Called play on AudioSource with unknown argument type:", e + `
|
|
18075
18096
|
Using the assigned clip instead:`, this.clip), e = this.clip);
|
|
18076
18097
|
let t = !this.sound || e && e !== this.clip;
|
|
18077
18098
|
if (typeof e == "string" && !this.audioLoader && (t = !0), (e instanceof MediaStream || typeof e == "string") && (this.clip = e), t) {
|
|
@@ -18749,7 +18770,7 @@ class Ur extends E {
|
|
|
18749
18770
|
if (!await D.microphonePermissionsGranted())
|
|
18750
18771
|
return console.error("Cannot connect to voice chat - microphone permissions not granted"), this.updateButton(), !1;
|
|
18751
18772
|
} else return console.error("Cannot connect to voice chat - not connected to server"), this.updateButton(), !1;
|
|
18752
|
-
return this._allowSending = !0, this._net?.stopSendingStream(this._outputStream), Cs(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), this._net?.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await D.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : vu("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug ||
|
|
18773
|
+
return this._allowSending = !0, this._net?.stopSendingStream(this._outputStream), Cs(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), this._net?.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await D.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : vu("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || L()) && console.log("VOIP: Failed to get audio stream"), !1);
|
|
18753
18774
|
}
|
|
18754
18775
|
/** Stop sending audio (muting your own microphone) */
|
|
18755
18776
|
disconnect(e) {
|
|
@@ -18790,7 +18811,7 @@ class Ur extends E {
|
|
|
18790
18811
|
// private _analyzer?: AudioAnalyser;
|
|
18791
18812
|
/** @deprecated */
|
|
18792
18813
|
getFrequency(e) {
|
|
18793
|
-
return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0,
|
|
18814
|
+
return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, L() && _e("VOIP: getFrequency is currently not supported"), console.warn("VOIP: getFrequency is currently not supported")), null;
|
|
18794
18815
|
}
|
|
18795
18816
|
async getAudioStream(e) {
|
|
18796
18817
|
if (!navigator.mediaDevices.getUserMedia)
|
|
@@ -19401,7 +19422,7 @@ class zr extends Pn {
|
|
|
19401
19422
|
r && this.activeAndEnabled && (o.geometry = r, this.context.physics.engine?.addMeshCollider(this, o, this.convex));
|
|
19402
19423
|
});
|
|
19403
19424
|
} else
|
|
19404
|
-
(
|
|
19425
|
+
(L() || x("showcolliders")) && console.warn(`[MeshCollider] A MeshCollider mesh is assigned to an unknown object on "${this.gameObject.name}", but it's neither a Mesh nor a Group. Please double check that you attached the collider component to the right object and report a bug otherwise!`, this);
|
|
19405
19426
|
}
|
|
19406
19427
|
}
|
|
19407
19428
|
}
|
|
@@ -19690,7 +19711,7 @@ const Nr = class Kl extends E {
|
|
|
19690
19711
|
"gl_FragColor = vec4( vec3( 1.0 ), ( 1.0 - fragCoordZ ) * darkness * opacity * (gl_FrontFacing ? 1.0 : 0.66) );"
|
|
19691
19712
|
)}
|
|
19692
19713
|
`);
|
|
19693
|
-
}, this.depthMaterial.depthTest = !1, this.depthMaterial.depthWrite = !1, this.horizontalBlurMaterial = new Xn(
|
|
19714
|
+
}, this.depthMaterial.depthTest = !1, this.depthMaterial.depthWrite = !1, this.horizontalBlurMaterial = new Xn(yC), this.horizontalBlurMaterial.depthTest = !1, this.verticalBlurMaterial = new Xn(_C), this.verticalBlurMaterial.depthTest = !1, this.shadowGroup.visible = !1, this.autoFit ? this.fitShadows() : this.applyMinSize();
|
|
19694
19715
|
}
|
|
19695
19716
|
onEnable() {
|
|
19696
19717
|
this._needsUpdate = !0;
|
|
@@ -19724,7 +19745,7 @@ const Nr = class Kl extends E {
|
|
|
19724
19745
|
for (const p of h.opaque) {
|
|
19725
19746
|
if (!p.object.visible) continue;
|
|
19726
19747
|
const m = p.material;
|
|
19727
|
-
let _ = p.material.colorWrite == !1 || m.wireframe === !0 ||
|
|
19748
|
+
let _ = p.material.colorWrite == !1 || m.wireframe === !0 || A1(p.object) === !1;
|
|
19728
19749
|
!_ && p.material.isLineMaterial && (_ = !0), !_ && p.material.isPointsMaterial && (_ = !0), _ && (tp.push(p.object), p.object["needle:visible"] = p.object.visible, p.object.visible = !1);
|
|
19729
19750
|
}
|
|
19730
19751
|
i.setRenderTarget(this.renderTarget), i.clear(), i.render(t, this.shadowCamera), h.transparent = d;
|
|
@@ -20336,8 +20357,8 @@ class np {
|
|
|
20336
20357
|
const v = b[0];
|
|
20337
20358
|
if (this._draggedOverObject === v.object ? this._draggedOverObjectDuration += this.context.time.deltaTime : (this._draggedOverObject = v.object, this._draggedOverObjectDuration = 0), v.face) {
|
|
20338
20359
|
this._hasLastSurfaceHitPoint = !0, this._lastSurfaceHitPoint.copy(v.point);
|
|
20339
|
-
const O = this._draggedOverObjectDuration >= 0.15,
|
|
20340
|
-
if ((O ||
|
|
20360
|
+
const O = this._draggedOverObjectDuration >= 0.15, I = this._totalMovement.length() >= 1e-3, j = z(v.normal || v.face.normal).applyQuaternion(v.object.worldQuaternion);
|
|
20361
|
+
if ((O || I) && (this._draggedOverObjectLastSetUp !== this._draggedOverObject || this._draggedOverObjectLastNormal.dot(j) < 0.999999 || this.context.time.frame % 60 === 0)) {
|
|
20341
20362
|
this._draggedOverObjectLastSetUp = this._draggedOverObject, this._draggedOverObjectLastNormal.copy(v.face.normal);
|
|
20342
20363
|
const B = z(), G = z();
|
|
20343
20364
|
this._bounds.getCenter(B), this._bounds.getSize(G), B.sub(G.multiplyScalar(0.5).multiply(j)), this._hitPointInLocalSpace.copy(B), this._hitNormalInLocalSpace.copy(v.face.normal), this._bounds.getCenter(B), this._bounds.getSize(G), B.add(G.multiplyScalar(0.5).multiply(v.face.normal));
|
|
@@ -20345,7 +20366,7 @@ class np {
|
|
|
20345
20366
|
this._followObject.localToWorld(X);
|
|
20346
20367
|
const k = v.point;
|
|
20347
20368
|
this._dragPlane.setFromNormalAndCoplanarPoint(j, k);
|
|
20348
|
-
} else if (!(O ||
|
|
20369
|
+
} else if (!(O || I))
|
|
20349
20370
|
return;
|
|
20350
20371
|
}
|
|
20351
20372
|
} else f && this.gameObject && this.setPlaneViewAligned(this.gameObject.worldPosition, !1);
|
|
@@ -20705,7 +20726,7 @@ function yR(s, e, t) {
|
|
|
20705
20726
|
if (r)
|
|
20706
20727
|
return gc && console.debug(`Mimetype callback returned: ${r}`), r;
|
|
20707
20728
|
}
|
|
20708
|
-
if (
|
|
20729
|
+
if (L() || gc) {
|
|
20709
20730
|
const o = new TextDecoder().decode(e.slice(0, Math.min(e.byteLength, 32)));
|
|
20710
20731
|
console.warn(`Could not determine file type.
|
|
20711
20732
|
|
|
@@ -21072,7 +21093,7 @@ class rw {
|
|
|
21072
21093
|
d?.primitives && (l.sharedMaterials = d.primitives.map((f) => "/materials/" + (f.material ?? 0)), c = !0);
|
|
21073
21094
|
}
|
|
21074
21095
|
}
|
|
21075
|
-
!c && (An ||
|
|
21096
|
+
!c && (An || L()) && console.warn(`[NEEDLE_components] Component '${l.name}' on object '${i.name}' is not added to a mesh or failed to retrieve materials from glTF.`);
|
|
21076
21097
|
}
|
|
21077
21098
|
l && this.parser && r.push(
|
|
21078
21099
|
gg(this.parser, l).catch((c) => console.error(`Error while resolving references (see console for details)
|
|
@@ -21240,7 +21261,7 @@ class RR {
|
|
|
21240
21261
|
this.objectToWorldMatrix.copy(e.matrixWorld), zd(this.objectToWorldMatrix, this.objectToWorld), this.worldToObjectMatrix.copy(e.matrixWorld).invert(), zd(this.worldToObjectMatrix, this.worldToObject);
|
|
21241
21262
|
}
|
|
21242
21263
|
}
|
|
21243
|
-
class
|
|
21264
|
+
class Ee extends c0 {
|
|
21244
21265
|
identifier;
|
|
21245
21266
|
onBeforeRenderSceneCallback = this.onBeforeRenderScene.bind(this);
|
|
21246
21267
|
clone() {
|
|
@@ -21312,7 +21333,7 @@ class Te extends c0 {
|
|
|
21312
21333
|
}
|
|
21313
21334
|
onUpdateUniforms(e, t) {
|
|
21314
21335
|
const i = N.Current;
|
|
21315
|
-
if (e && (
|
|
21336
|
+
if (e && (Ee.viewProjection && this.uniforms[this._viewProjectionName] && (Ee.viewProjection.copy(e.projectionMatrix).multiply(e.matrixWorldInverse), zd(Ee.viewProjection, Ee._viewProjectionValues)), Ee.viewMatrix && this.uniforms[this._viewMatrixName] && (Ee.viewMatrix.copy(e.matrixWorldInverse), zd(Ee.viewMatrix, Ee._viewMatrixValues)), this.uniforms[Ee._worldSpaceCameraPosName] && Ee._worldSpaceCameraPos.setFromMatrixPosition(e.matrixWorld)), this.uniforms._TimeParameters && (this.uniforms._TimeParameters.value = i.sceneLighting.timeVec4), this.uniforms._Time) {
|
|
21316
21337
|
const a = this.uniforms._Time.value;
|
|
21317
21338
|
a.x = i.sceneLighting.timeVec4.x / 20, a.y = i.sceneLighting.timeVec4.x, a.z = i.sceneLighting.timeVec4.x * 2, a.w = i.sceneLighting.timeVec4.x * 3;
|
|
21318
21339
|
}
|
|
@@ -21330,12 +21351,12 @@ class Te extends c0 {
|
|
|
21330
21351
|
}
|
|
21331
21352
|
const n = i.mainLight;
|
|
21332
21353
|
if (n) {
|
|
21333
|
-
const a = te(n.gameObject,
|
|
21334
|
-
this.uniforms._MainLightPosition = { value: a.normalize() },
|
|
21354
|
+
const a = te(n.gameObject, Ee._mainLightPosition);
|
|
21355
|
+
this.uniforms._MainLightPosition = { value: a.normalize() }, Ee._mainLightColor.set(n.color.r, n.color.g, n.color.b, 0), this.uniforms._MainLightColor = { value: Ee._mainLightColor };
|
|
21335
21356
|
const l = n.intensity;
|
|
21336
|
-
|
|
21357
|
+
Ee._lightData.z = l, this.uniforms.unity_LightData = { value: Ee._lightData };
|
|
21337
21358
|
}
|
|
21338
|
-
if (e && (
|
|
21359
|
+
if (e && (Ee.viewProjection && this.uniforms[this._viewProjectionName] && (this.uniforms[this._viewProjectionName].value = Ee._viewProjectionValues), Ee.viewMatrix && this.uniforms[this._viewMatrixName] && (this.uniforms[this._viewMatrixName].value = Ee._viewMatrixValues), this.uniforms[Ee._worldSpaceCameraPosName] && (this.uniforms[Ee._worldSpaceCameraPosName] = { value: Ee._worldSpaceCameraPos }), i.mainCameraComponent)) {
|
|
21339
21360
|
if (this.uniforms._ProjectionParams) {
|
|
21340
21361
|
const a = this.uniforms._ProjectionParams.value;
|
|
21341
21362
|
a.x = 1, a.y = i.mainCameraComponent.nearClipPlane, a.z = i.mainCameraComponent.farClipPlane, a.w = 1 / a.z, this.uniforms._ProjectionParams.value = a;
|
|
@@ -21455,7 +21476,7 @@ class ER {
|
|
|
21455
21476
|
}
|
|
21456
21477
|
}
|
|
21457
21478
|
}
|
|
21458
|
-
const m = new
|
|
21479
|
+
const m = new Ee(
|
|
21459
21480
|
this.identifier,
|
|
21460
21481
|
{
|
|
21461
21482
|
name: t.name ?? "",
|
|
@@ -21561,7 +21582,7 @@ async function wm(s, e, t, i) {
|
|
|
21561
21582
|
const r = new Qd(o);
|
|
21562
21583
|
return r.setAnimationPointerResolver.bind(r)(new IR()), r;
|
|
21563
21584
|
} else
|
|
21564
|
-
return (TR ||
|
|
21585
|
+
return (TR || L()) && console.error("Missing KHR_animation_pointer extension..."), {
|
|
21565
21586
|
name: "KHR_animation_pointer_NOT_AVAILABLE"
|
|
21566
21587
|
};
|
|
21567
21588
|
});
|
|
@@ -21625,7 +21646,7 @@ class Qa {
|
|
|
21625
21646
|
let a = Qa.getStartInstanceCount(e);
|
|
21626
21647
|
(!a || a < 0) && (a = 4);
|
|
21627
21648
|
let l = e.name;
|
|
21628
|
-
l?.length || (l =
|
|
21649
|
+
l?.length || (l = qC());
|
|
21629
21650
|
const c = new DR(l, o.geometry, r, a, t);
|
|
21630
21651
|
return this.objs.push(c), c.addInstance(o);
|
|
21631
21652
|
}
|
|
@@ -21707,7 +21728,7 @@ class Ea {
|
|
|
21707
21728
|
return i(`Instancing: Can not update geometry (${this.name}), reserved index range is too small: ${this.__reservedIndexRange.toLocaleString()} < ${this.indexCount.toLocaleString()} indices for ${this.name}`);
|
|
21708
21729
|
return this.renderer.updateGeometry(e, this.__geometryIndex);
|
|
21709
21730
|
function i(n) {
|
|
21710
|
-
return t.updateMeshInformation() && (t.renderer.remove(t, !0), t.renderer.add(t)) ? !0 : ((
|
|
21731
|
+
return t.updateMeshInformation() && (t.renderer.remove(t, !0), t.renderer.add(t)) ? !0 : ((L() || jt) && console.error(n), !1);
|
|
21711
21732
|
}
|
|
21712
21733
|
}
|
|
21713
21734
|
/** Adds this object to the instancing renderer (effectively activating instancing) */
|
|
@@ -21807,7 +21828,7 @@ class DR {
|
|
|
21807
21828
|
this.add(t);
|
|
21808
21829
|
} catch (i) {
|
|
21809
21830
|
if (console.error(`Failed adding mesh to instancing (object name: "${e.name}", instances: ${this._currentInstanceCount.toLocaleString()}/${this._maxInstanceCount.toLocaleString()}, vertices: ${this._currentVertexCount.toLocaleString()}/${this._maxVertexCount.toLocaleString()}, indices: ${this._currentIndexCount.toLocaleString()}/${this._maxIndexCount.toLocaleString()})
|
|
21810
|
-
`, i),
|
|
21831
|
+
`, i), L()) {
|
|
21811
21832
|
vu("Failed instancing mesh. See the browser console for details.");
|
|
21812
21833
|
debugger;
|
|
21813
21834
|
}
|
|
@@ -21845,7 +21866,7 @@ class DR {
|
|
|
21845
21866
|
const t = this.geometry;
|
|
21846
21867
|
for (const i in t.attributes)
|
|
21847
21868
|
if (i !== "batchId" && !e.hasAttribute(i))
|
|
21848
|
-
return
|
|
21869
|
+
return L() && console.warn(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`), !1;
|
|
21849
21870
|
return !0;
|
|
21850
21871
|
}
|
|
21851
21872
|
markNeedsUpdate() {
|
|
@@ -21870,7 +21891,7 @@ Mesh: "${this.name}${e.name?.length ? "/" + e.name : ""}" (${f.vertexCount.toLoc
|
|
|
21870
21891
|
Max count ${this._maxInstanceCount.toLocaleString()} → ${o.toLocaleString()}
|
|
21871
21892
|
Max vertex count ${this._maxVertexCount.toLocaleString()} -> ${l.toLocaleString()}
|
|
21872
21893
|
Max index count ${this._maxIndexCount.toLocaleString()} -> ${c.toLocaleString()}`), this._debugMaterial = db();
|
|
21873
|
-
} else
|
|
21894
|
+
} else L() && console.debug(`[Instancing] Growing Buffer
|
|
21874
21895
|
Mesh: "${this.name}${e.name?.length ? "/" + e.name : ""}"
|
|
21875
21896
|
Max count ${this._maxInstanceCount} → ${o}
|
|
21876
21897
|
Max vertex count ${this._maxVertexCount.toLocaleString()} -> ${l.toLocaleString()}
|
|
@@ -21953,7 +21974,7 @@ Index: ${e.__instanceIndex}`), this._batchedMesh.deleteInstance(e.__instanceInde
|
|
|
21953
21974
|
}
|
|
21954
21975
|
function cr(s) {
|
|
21955
21976
|
if (!s)
|
|
21956
|
-
return
|
|
21977
|
+
return L() && console.error("Cannot get mesh information from null geometry"), { vertexCount: 0, indexCount: 0 };
|
|
21957
21978
|
let e = s.attributes?.position?.count || 0, t = s.index ? s.index.count : 0;
|
|
21958
21979
|
const i = We.getMeshLODExtension(s);
|
|
21959
21980
|
if (i) {
|
|
@@ -22602,7 +22623,7 @@ class Eo extends E {
|
|
|
22602
22623
|
// #region internals
|
|
22603
22624
|
/** @internal */
|
|
22604
22625
|
onEnable() {
|
|
22605
|
-
this.context.renderer.domElement.addEventListener("dragover", this.onDrag), this.context.renderer.domElement.addEventListener("drop", this.onDrop), window.addEventListener("paste", this.handlePaste), this.context.connection.beginListen("droplistener", this.onNetworkEvent),
|
|
22626
|
+
this.context.renderer.domElement.addEventListener("dragover", this.onDrag), this.context.renderer.domElement.addEventListener("drop", this.onDrop), window.addEventListener("paste", this.handlePaste), this.context.connection.beginListen("droplistener", this.onNetworkEvent), L() && this.dropArea && (this.dropArea.getComponentInChildren(ui) || console.warn("[DropListener] The assigned DropArea does not seem to have a renderer/mesh. Drag and Drop events will not be detected."));
|
|
22606
22627
|
}
|
|
22607
22628
|
/** @internal */
|
|
22608
22629
|
onDisable() {
|
|
@@ -22777,7 +22798,7 @@ class Eo extends E {
|
|
|
22777
22798
|
a.x = Math.abs(a.x), a.y = Math.abs(a.y), a.z = Math.abs(a.z);
|
|
22778
22799
|
let c = r.scale.clone();
|
|
22779
22800
|
const h = new Pi().setFromCenterAndSize(new y(0, this.fitVolumeSize.y * a.y * 0.5, 0).add(this.gameObject.worldPosition), this.fitVolumeSize.clone().multiply(a));
|
|
22780
|
-
if (Bt && U.DrawWireBox3(h, 255, 5), this.fitIntoVolume && (
|
|
22801
|
+
if (Bt && U.DrawWireBox3(h, 255, 5), this.fitIntoVolume && (I1(r, h, {
|
|
22781
22802
|
position: !this.placeAtHitPosition
|
|
22782
22803
|
}), c = r.scale.clone().divide(a), l = r.worldPosition.clone().sub(this.gameObject.worldPosition).divide(a), Bt && U.DrawSphere(l, 0.1, 16711680, 5)), this.gameObject.attach(r), r.position.copy(l), r.quaternion.identity(), r.scale.copy(c), Bt && U.DrawArrow(this.gameObject.worldPosition, r.getWorldPosition(new y()), 65280, 5), this._addedObjects.push(r), this._addedModels.push(n), this.placeAtHitPosition && t && t.screenposition) {
|
|
22783
22804
|
r.visible = !1;
|
|
@@ -22785,7 +22806,7 @@ class Eo extends E {
|
|
|
22785
22806
|
if (r.visible = !0, f && f.length > 0)
|
|
22786
22807
|
for (const p of f) {
|
|
22787
22808
|
const m = p.point.clone();
|
|
22788
|
-
Bt && console.log("Place object at hit", p),
|
|
22809
|
+
Bt && console.log("Place object at hit", p), L1(r, m);
|
|
22789
22810
|
break;
|
|
22790
22811
|
}
|
|
22791
22812
|
}
|
|
@@ -22844,7 +22865,7 @@ class Eo extends E {
|
|
|
22844
22865
|
testObject: (o) => !this._addedObjects.some((r) => r.contains(o))
|
|
22845
22866
|
});
|
|
22846
22867
|
if (!i.length)
|
|
22847
|
-
return
|
|
22868
|
+
return L() && console.log(`Dropped outside of drop area for DropListener "${this.name}".`), !1;
|
|
22848
22869
|
const n = i[0];
|
|
22849
22870
|
return !!(this.dropArea && this.dropArea.contains(n.object));
|
|
22850
22871
|
}
|
|
@@ -22952,7 +22973,7 @@ const Fu = class fw extends E {
|
|
|
22952
22973
|
const t = this.handleDuplication();
|
|
22953
22974
|
if (t) {
|
|
22954
22975
|
const i = C.getComponent(t, ya);
|
|
22955
|
-
i ? (i.onPointerDown(e), this._forwardPointerEvents.set(e.event.space, i)) :
|
|
22976
|
+
i ? (i.onPointerDown(e), this._forwardPointerEvents.set(e.event.space, i)) : L() && console.warn(`Duplicated object (${t.name}) does not have DragControls`);
|
|
22956
22977
|
} else
|
|
22957
22978
|
this._currentCount >= this.limitCount ? console.warn(`[Duplicatable] Limit of ${this.limitCount} objects created within a few seconds reached. Please wait a moment before creating more objects.`) : console.warn("[Duplicatable] Could not duplicate object.");
|
|
22958
22979
|
}
|
|
@@ -23954,12 +23975,12 @@ let aE = class {
|
|
|
23954
23975
|
he.report("export-usdz-textures", { message: "read back texture", autoStep: !0 });
|
|
23955
23976
|
const R = b.scale !== void 0 && b.scale.x !== 1 && b.scale.y !== 1 && b.scale.z !== 1 && b.scale.w !== 1;
|
|
23956
23977
|
(v.isCompressedTexture || v.isRenderTargetTexture || R) && (O = await cE(v, t.maxTextureSize, p, b.scale)), he.report("export-usdz-textures", { message: "convert texture to canvas", autoStep: !0 });
|
|
23957
|
-
const
|
|
23978
|
+
const I = await dE(O.imageBitmap || O.imageData, t.maxTextureSize).catch((j) => {
|
|
23958
23979
|
console.error("Error converting texture to canvas", v, j);
|
|
23959
23980
|
});
|
|
23960
|
-
if (
|
|
23981
|
+
if (I) {
|
|
23961
23982
|
he.report("export-usdz-textures", { message: "convert canvas to blob", autoStep: !0 });
|
|
23962
|
-
const j = await
|
|
23983
|
+
const j = await I.convertToBlob({ type: A ? "image/png" : "image/jpeg", quality: 0.95 });
|
|
23963
23984
|
n[`textures/${w}.${A ? "png" : "jpg"}`] = new Uint8Array(await j.arrayBuffer());
|
|
23964
23985
|
} else
|
|
23965
23986
|
console.warn("Can`t export texture: ", v);
|
|
@@ -23978,7 +23999,7 @@ let aE = class {
|
|
|
23978
23999
|
}
|
|
23979
24000
|
g = b.length;
|
|
23980
24001
|
}
|
|
23981
|
-
return he.report("export-usdz", "zip archive"),
|
|
24002
|
+
return he.report("export-usdz", "zip archive"), bC(n, { level: 0 });
|
|
23982
24003
|
}
|
|
23983
24004
|
};
|
|
23984
24005
|
function Pw(s, e, t, i) {
|
|
@@ -24450,7 +24471,7 @@ function Xs(s, e, t, i, n, o, r = void 0, a = void 0) {
|
|
|
24450
24471
|
// MirroredRepeatWrapping
|
|
24451
24472
|
}, _ = s.repeat.clone(), g = s.offset.clone(), w = s.rotation, b = Math.sin(w), v = Math.cos(w);
|
|
24452
24473
|
g.y = 1 - g.y - _.y, t ? (_.x === 0 && (_.x = 1e-4), _.y === 0 && (_.y = 1e-4), g.x = g.x / _.x, g.y = g.y / _.y, g.x += b / _.x, g.y += v - 1) : (g.x += b * _.x, g.y += (1 - v) * _.y);
|
|
24453
|
-
const A = Uu(n), O = _.x != 1 || _.y != 1 || g.x != 0 || g.y != 0 || w != 0, R = `${Xt}/${A}/${"uvReader_" + f}.outputs:result>`,
|
|
24474
|
+
const A = Uu(n), O = _.x != 1 || _.y != 1 || g.x != 0 || g.y != 0 || w != 0, R = `${Xt}/${A}/${"uvReader_" + f}.outputs:result>`, I = `${Xt}/${A}/Transform2d_${e}.outputs:result>`, j = e !== "normal" && r && (r.r !== 1 || r.g !== 1 || r.b !== 1 || a !== 1) || !1, B = e === "normal", G = n instanceof pt && n.normalScale ? n.normalScale.x * 2 : 2, X = G.toFixed(ke), k = (-1 * (G / 2)).toFixed(ke), W = (1 - G).toFixed(ke);
|
|
24454
24475
|
return `
|
|
24455
24476
|
${O ? `def Shader "Transform2d_${e}" (
|
|
24456
24477
|
sdrMetadata = {
|
|
@@ -24471,7 +24492,7 @@ function Xs(s, e, t, i, n, o, r = void 0, a = void 0) {
|
|
|
24471
24492
|
uniform token info:id = "UsdUVTexture"
|
|
24472
24493
|
asset inputs:file = @textures/${c}.${p ? "png" : "jpg"}@
|
|
24473
24494
|
token inputs:sourceColorSpace = "${s.colorSpace === "srgb" ? "sRGB" : "raw"}"
|
|
24474
|
-
float2 inputs:st.connect = ${O ?
|
|
24495
|
+
float2 inputs:st.connect = ${O ? I : R}
|
|
24475
24496
|
${j ? `
|
|
24476
24497
|
float4 inputs:scale = (${r ? r.r + ", " + r.g + ", " + r.b : "1, 1, 1"}, ${a})
|
|
24477
24498
|
` : ""}
|
|
@@ -25043,7 +25064,7 @@ class $e {
|
|
|
25043
25064
|
console.error("This is a rest clip but you're trying to add tracks to it – this is likely a bug");
|
|
25044
25065
|
return;
|
|
25045
25066
|
}
|
|
25046
|
-
e.name.endsWith("position") ? this.pos = e : e.name.endsWith("quaternion") ? this.rot = e : e.name.endsWith("scale") ? this.scale = e : (e.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + e.name + " on " + (this.root?.name ?? this.target.name) + ". Animate scale 0/1 instead.") : console.warn("[USDZ] Animation track type not supported for USDZ export and will NOT be exported: " + e.name + " on " + (this.root?.name ?? this.target.name) + ". Only .position, .rotation, .scale are supported."),
|
|
25067
|
+
e.name.endsWith("position") ? this.pos = e : e.name.endsWith("quaternion") ? this.rot = e : e.name.endsWith("scale") ? this.scale = e : (e.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + e.name + " on " + (this.root?.name ?? this.target.name) + ". Animate scale 0/1 instead.") : console.warn("[USDZ] Animation track type not supported for USDZ export and will NOT be exported: " + e.name + " on " + (this.root?.name ?? this.target.name) + ". Only .position, .rotation, .scale are supported."), L() && _e("[USDZ] Some animations can't be exported. See console for details."));
|
|
25047
25068
|
}
|
|
25048
25069
|
getFrames() {
|
|
25049
25070
|
return this.clip ? Math.max(this.pos?.times?.length ?? 0, this.rot?.times?.length ?? 0, this.scale?.times?.length ?? 0) : 2;
|
|
@@ -25430,14 +25451,14 @@ class xE {
|
|
|
25430
25451
|
_.push({ bone: k, inverse: k.matrixWorld.clone().invert() });
|
|
25431
25452
|
const v = _[0].bone.parent;
|
|
25432
25453
|
v || console.error("No bone parent found for skinned mesh during USDZ export", n.skinnedMesh), _.sort((k, W) => Ta(k.bone, v) > Ta(W.bone, v) ? 1 : -1);
|
|
25433
|
-
const A = t.quickLookCompatible, O = [], R = [],
|
|
25454
|
+
const A = t.quickLookCompatible, O = [], R = [], I = [], j = [];
|
|
25434
25455
|
for (const { bone: k } of _) {
|
|
25435
25456
|
if (A) {
|
|
25436
25457
|
const W = k.scale;
|
|
25437
25458
|
W.x == 0 && (W.x = 1e-5), W.y == 0 && (W.y = 1e-5), W.z == 0 && (W.z = 1e-5), O.push(new J().compose(k.position, k.quaternion, k.scale));
|
|
25438
25459
|
} else
|
|
25439
25460
|
O.push(k.matrix.clone());
|
|
25440
|
-
R.push(k.position),
|
|
25461
|
+
R.push(k.position), I.push(k.quaternion), j.push(k.scale);
|
|
25441
25462
|
}
|
|
25442
25463
|
const B = _.map((k) => '"' + Ta(k.bone, v) + '"').join(", "), G = _.map((k) => yb(k.inverse.clone().invert())).join(", ");
|
|
25443
25464
|
e.beginBlock('def Skeleton "Rig"'), e.appendLine(`uniform matrix4d[] bindTransforms = [${G}]`), e.appendLine(`uniform token[] joints = [${B}]`), e.appendLine('uniform token purpose = "guide"'), e.appendLine(`uniform matrix4d[] restTransforms = [${O.map((k) => yb(k)).join(", ")}]`);
|
|
@@ -25448,7 +25469,7 @@ class xE {
|
|
|
25448
25469
|
k = Math.min(k, q), W = Math.max(W, q);
|
|
25449
25470
|
console.log("Time samples", k, W, X);
|
|
25450
25471
|
}
|
|
25451
|
-
if (e.beginBlock('def SkelAnimation "_anim"'), e.appendLine(`uniform token[] joints = [${B}]`), e.appendLine(`quatf[] rotations = [${d(
|
|
25472
|
+
if (e.beginBlock('def SkelAnimation "_anim"'), e.appendLine(`uniform token[] joints = [${B}]`), e.appendLine(`quatf[] rotations = [${d(I)}]`), X && X.quaternion) {
|
|
25452
25473
|
e.beginBlock("quatf[] rotations.timeSamples = {", "");
|
|
25453
25474
|
const k = a(X.quaternion);
|
|
25454
25475
|
for (const W of k)
|
|
@@ -25587,7 +25608,7 @@ var CE = Object.defineProperty, Ue = (s, e, t, i) => {
|
|
|
25587
25608
|
};
|
|
25588
25609
|
const xb = x("debugusdzbehaviours");
|
|
25589
25610
|
function Zc(s) {
|
|
25590
|
-
s && (s.getComponentInParent(qa) || (
|
|
25611
|
+
s && (s.getComponentInParent(qa) || (L() && console.debug('Raycaster on "' + s.name + '" was automatically added, because no raycaster was found in the parent hierarchy.'), s.addComponent(Zi)));
|
|
25591
25612
|
}
|
|
25592
25613
|
class ol extends E {
|
|
25593
25614
|
object;
|
|
@@ -25663,7 +25684,7 @@ const zu = class qt extends E {
|
|
|
25663
25684
|
variantMaterial;
|
|
25664
25685
|
fadeDuration = 0;
|
|
25665
25686
|
start() {
|
|
25666
|
-
this._objectsWithThisMaterial = this.objectsWithThisMaterial, Zc(this.gameObject),
|
|
25687
|
+
this._objectsWithThisMaterial = this.objectsWithThisMaterial, Zc(this.gameObject), L() && this._objectsWithThisMaterial.length <= 0 && console.warn('ChangeMaterialOnClick: No objects found with material "' + this.materialToSwitch?.name + '"');
|
|
25667
25688
|
}
|
|
25668
25689
|
onPointerEnter(e) {
|
|
25669
25690
|
this.context.input.setCursor("pointer");
|
|
@@ -26020,7 +26041,7 @@ const qg = class Ln extends E {
|
|
|
26020
26041
|
afterSerialize() {
|
|
26021
26042
|
if (Ln.rootsWithExclusivePlayback.size > 1) {
|
|
26022
26043
|
const e = 'Multiple root objects targeted by more than one animation. To work around QuickLook bug FB13410767, animations will be set as "exclusive" and activating them will stop other animations being marked as exclusive.';
|
|
26023
|
-
|
|
26044
|
+
L() && _e(e), console.warn(e, ...Ln.rootsWithExclusivePlayback);
|
|
26024
26045
|
}
|
|
26025
26046
|
Ln.animationActions = [], Ln.rootsWithExclusivePlayback = /* @__PURE__ */ new Set();
|
|
26026
26047
|
}
|
|
@@ -26029,7 +26050,7 @@ const qg = class Ln extends E {
|
|
|
26029
26050
|
const i = t.document, n = t.extensions.find((a) => a instanceof Gg);
|
|
26030
26051
|
if (!n) return;
|
|
26031
26052
|
const o = n.getClipCount(this.target) > 1;
|
|
26032
|
-
o && (
|
|
26053
|
+
o && (L() && console.warn("Setting exclusive playback for " + this.target.name + "@" + this.stateName + " because it has " + n.getClipCount(this.target) + " animations. This works around QuickLook bug FB13410767."), Ln.rootsWithExclusivePlayback.add(this.target));
|
|
26033
26054
|
const r = this.name ? this.name : "";
|
|
26034
26055
|
i.traverse((a) => {
|
|
26035
26056
|
if (a.uuid === this.target?.uuid) {
|
|
@@ -26127,7 +26148,7 @@ const qg = class Ln extends E {
|
|
|
26127
26148
|
b.tracks = w.tracks.map((O) => {
|
|
26128
26149
|
const R = O.clone();
|
|
26129
26150
|
R.times = new Float32Array([0, A]);
|
|
26130
|
-
const
|
|
26151
|
+
const I = O.values.length, j = O.getValueSize(), B = O.values.slice(I - j, I);
|
|
26131
26152
|
return R.values = new Float32Array(2 * j), R.values.set(B, 0), R.values.set(B, j), R;
|
|
26132
26153
|
}), b.name = v, e.holdClipMap.set(w, b);
|
|
26133
26154
|
}
|
|
@@ -26317,7 +26338,7 @@ class xr {
|
|
|
26317
26338
|
const e = "https://oculus.com/open_url/?url=", t = document.createElement("button");
|
|
26318
26339
|
return this._sendToQuestButton = t, t.dataset.needle = "webxr-sendtoquest-button", t.innerText = "Open on Quest", t.prepend(Ft("share_windows")), t.title = "Click to send this page to the Oculus Browser on your Quest", t.addEventListener("click", () => {
|
|
26319
26340
|
const i = encodeURIComponent(window.location.href), n = e + i;
|
|
26320
|
-
window.open(n) == null &&
|
|
26341
|
+
window.open(n) == null && Ae("This page doesn't allow popups. Please paste " + n + " into your browser.");
|
|
26321
26342
|
}), this.listenToXRSessionState(t), this.hideElementDuringXRSession(t), D.isMozillaXR() || navigator.xr?.addEventListener("devicechange", () => {
|
|
26322
26343
|
navigator.xr?.isSessionSupported("immersive-vr") ? t.style.display = "none" : t.style.display = "";
|
|
26323
26344
|
}), t;
|
|
@@ -26335,13 +26356,13 @@ class xr {
|
|
|
26335
26356
|
return;
|
|
26336
26357
|
}
|
|
26337
26358
|
K.isSessionSupported(t).then((i) => {
|
|
26338
|
-
e.style.display = i ? "" : "none",
|
|
26359
|
+
e.style.display = i ? "" : "none", L() && !i && console.log('[WebXR] "' + t + '" is not supported on this device. Make sure your server runs using HTTPS and you have a device connected that supports ' + t);
|
|
26339
26360
|
});
|
|
26340
26361
|
}
|
|
26341
26362
|
}
|
|
26342
26363
|
hideElementDuringXRSession(e) {
|
|
26343
26364
|
lg((t) => {
|
|
26344
|
-
e["previous-display"] = e.style.display, e.style.display
|
|
26365
|
+
e["previous-display"] = e.style.display, e.style.setProperty("display", "none", "important");
|
|
26345
26366
|
}), Y0((t) => {
|
|
26346
26367
|
e["previous-display"] != null && (e.style.display = e["previous-display"]);
|
|
26347
26368
|
});
|
|
@@ -26843,7 +26864,7 @@ class gn extends E {
|
|
|
26843
26864
|
}
|
|
26844
26865
|
async onCreateAnchor(e, t) {
|
|
26845
26866
|
if (t.createAnchor === void 0) {
|
|
26846
|
-
console.warn("Hit does not support creating an anchor", t),
|
|
26867
|
+
console.warn("Hit does not support creating an anchor", t), L() && _e("Hit does not support creating an anchor");
|
|
26847
26868
|
return;
|
|
26848
26869
|
} else {
|
|
26849
26870
|
const i = await t.createAnchor(e.viewerPose.transform);
|
|
@@ -27100,10 +27121,10 @@ const Dw = function(s = null) {
|
|
|
27100
27121
|
let i = "";
|
|
27101
27122
|
typeof t == "string" ? i = t : i = t.name;
|
|
27102
27123
|
let n = null, o;
|
|
27103
|
-
typeof s == "string" ? o = e[s] : typeof s == "function" && (o = s), o == null && (
|
|
27124
|
+
typeof s == "string" ? o = e[s] : typeof s == "function" && (o = s), o == null && (L() || co) && s != null && console.warn('syncField: no callback function found for property "' + i + '"', '"' + s + '"');
|
|
27104
27125
|
const r = e, a = r.__internalAwake;
|
|
27105
27126
|
if (typeof a != "function") {
|
|
27106
|
-
(co ||
|
|
27127
|
+
(co || L()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + e?.constructor?.name + '" is not supported', e);
|
|
27107
27128
|
return;
|
|
27108
27129
|
}
|
|
27109
27130
|
co && console.log(i);
|
|
@@ -27117,7 +27138,7 @@ const Dw = function(s = null) {
|
|
|
27117
27138
|
set: function(f) {
|
|
27118
27139
|
const p = this[l];
|
|
27119
27140
|
if (this[l] = f, d) {
|
|
27120
|
-
(
|
|
27141
|
+
(L() || co) && console.warn("Recursive call detected", i);
|
|
27121
27142
|
return;
|
|
27122
27143
|
}
|
|
27123
27144
|
d = !0;
|
|
@@ -27556,7 +27577,7 @@ class Po extends E {
|
|
|
27556
27577
|
createHandModel = !0;
|
|
27557
27578
|
customLeftHand;
|
|
27558
27579
|
customRightHand;
|
|
27559
|
-
static factory = new
|
|
27580
|
+
static factory = new vC();
|
|
27560
27581
|
supportsXR(e) {
|
|
27561
27582
|
return e === "immersive-vr" || e === "immersive-ar";
|
|
27562
27583
|
}
|
|
@@ -27656,7 +27677,7 @@ class Po extends E {
|
|
|
27656
27677
|
l ? (a = l.url.split(".").slice(0, -1).join("."), o.setPath("")) : (a = t.inputSource.handedness === "left" ? "left" : "right", o.setPath("https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles/generic-hand/"));
|
|
27657
27678
|
const c = new M();
|
|
27658
27679
|
El(c);
|
|
27659
|
-
const h = new
|
|
27680
|
+
const h = new wC(c, n, o.path, a, o, (d) => {
|
|
27660
27681
|
const f = r?.gltf;
|
|
27661
27682
|
f?.scene.children?.length === 0 && (f.scene.children[0] = d), r?.gltf && Kn().createBuiltinComponents(e.context, e.sourceId || a, r.gltf, null, r), d.traverse((p) => {
|
|
27662
27683
|
p.layers.set(2), K.active?.isPassThrough && !l && this.makeOccluder(p), p instanceof H && We.assignMeshLOD(p, 0);
|
|
@@ -27735,7 +27756,7 @@ class tn extends E {
|
|
|
27735
27756
|
const n = z(i.x, 0, i.y);
|
|
27736
27757
|
n.multiplyScalar(this.context.time.deltaTimeUnscaled * this.movementSpeed);
|
|
27737
27758
|
const o = qe(t);
|
|
27738
|
-
n.multiplyScalar(o.x), n.applyQuaternion(e.xr.poseOrientation), n.y = 0, n.applyQuaternion(t.worldQuaternion),
|
|
27759
|
+
n.multiplyScalar(o.x), n.applyQuaternion(e.xr.poseOrientation), n.y = 0, n.applyQuaternion(t.worldQuaternion), L() && Number.isNaN(n.x) && console.error("Stick movement resulted in NaN", { stick: i, vec: n }), t.position.add(n), t.updateWorldMatrix(!1, !1);
|
|
27739
27760
|
for (const r of t.children) r.updateWorldMatrix(!1, !1);
|
|
27740
27761
|
}
|
|
27741
27762
|
}
|
|
@@ -27894,15 +27915,15 @@ class tn extends E {
|
|
|
27894
27915
|
}
|
|
27895
27916
|
/** create an object to visualize controller rays */
|
|
27896
27917
|
createRayLineObject() {
|
|
27897
|
-
const e = new
|
|
27918
|
+
const e = new xC();
|
|
27898
27919
|
e.layers.disableAll(), e.layers.enable(2);
|
|
27899
|
-
const t = new
|
|
27920
|
+
const t = new SC();
|
|
27900
27921
|
e.geometry = t;
|
|
27901
27922
|
const i = new Float32Array(9);
|
|
27902
27923
|
i.set([0, 0, 0.02, 0, 0, 0.4, 0, 0, 1]), t.setPositions(i);
|
|
27903
27924
|
const n = new Float32Array(9);
|
|
27904
27925
|
n.set([1, 1, 1, 0.1, 0.1, 0.1, 0, 0, 0]), t.setColors(n);
|
|
27905
|
-
const o = new
|
|
27926
|
+
const o = new CC({
|
|
27906
27927
|
color: 16777215,
|
|
27907
27928
|
vertexColors: !0,
|
|
27908
27929
|
worldUnits: !0,
|
|
@@ -28082,7 +28103,7 @@ const Ll = x("debugwebxr"), GE = x("debugusdz"), ht = class pa extends E {
|
|
|
28082
28103
|
for (const o of this.context.scene.children)
|
|
28083
28104
|
n.add(o);
|
|
28084
28105
|
this.context.scene.add(n), i = C.addComponent(n, gn), this._createdComponentsInSession.push(i);
|
|
28085
|
-
} else (Ll ||
|
|
28106
|
+
} else (Ll || L()) && console.warn("WebXR: No WebARSessionRoot found in scene and usePlacementReticle is disabled in WebXR component.");
|
|
28086
28107
|
this._activeWebARSessionRoot = i, i && (i.customReticle = this.customARPlacementReticle, i.arScale = this.arScale, i.arTouchTransform = this.usePlacementAdjustment, i.autoPlace = this.autoPlace, i.autoCenter = this.autoCenter, i.useXRAnchor = this.useXRAnchor);
|
|
28087
28108
|
}
|
|
28088
28109
|
this.useDefaultControls && this.setDefaultMovementEnabled(!0), (this.showControllerModels || this.showHandModels) && this.setDefaultControllerRenderingEnabled(!0), this.useSpatialGrab && (this._spatialGrabRaycaster = C.findObjectOfType(Xa) ?? void 0, this._spatialGrabRaycaster || (this._spatialGrabRaycaster = this.gameObject.addComponent(Xa))), this.createLocalAvatar(e.xr), e.xr.isScreenBasedAR || (this._exitXRMenuButton = this.context.menu.appendChild({
|
|
@@ -28166,33 +28187,33 @@ const Ll = x("debugwebxr"), GE = x("debugusdz"), ht = class pa extends E {
|
|
|
28166
28187
|
handleCreatingHTML() {
|
|
28167
28188
|
if (this.createARButton || this.createVRButton || this.useQuicklookExport) {
|
|
28168
28189
|
if ((D.isiOS() && D.isSafari() || GE) && this.useQuicklookExport) {
|
|
28169
|
-
const
|
|
28170
|
-
if (!
|
|
28171
|
-
const
|
|
28172
|
-
this.addButton(
|
|
28190
|
+
const e = C.findObjectOfType(qn);
|
|
28191
|
+
if (!e || e && e.allowCreateQuicklookButton) {
|
|
28192
|
+
const t = this.getButtonsFactory().createQuicklookButton();
|
|
28193
|
+
this.addButton(t);
|
|
28173
28194
|
}
|
|
28174
28195
|
}
|
|
28175
28196
|
if (this.createARButton) {
|
|
28176
|
-
const
|
|
28177
|
-
this.addButton(
|
|
28197
|
+
const e = this.getButtonsFactory().createARButton();
|
|
28198
|
+
this.addButton(e);
|
|
28178
28199
|
}
|
|
28179
28200
|
if (this.createVRButton) {
|
|
28180
|
-
const
|
|
28181
|
-
this.addButton(
|
|
28201
|
+
const e = this.getButtonsFactory().createVRButton();
|
|
28202
|
+
this.addButton(e);
|
|
28182
28203
|
}
|
|
28183
28204
|
}
|
|
28184
|
-
if (this.createSendToQuestButton && !D.isQuest() && K.isVRSupported().then((
|
|
28185
|
-
if (!
|
|
28186
|
-
const
|
|
28187
|
-
this.addButton(
|
|
28205
|
+
if (this.createSendToQuestButton && !D.isQuest() && K.isVRSupported().then((e) => {
|
|
28206
|
+
if (!e) {
|
|
28207
|
+
const t = this.getButtonsFactory().createSendToQuestButton();
|
|
28208
|
+
this.addButton(t);
|
|
28188
28209
|
}
|
|
28189
28210
|
}), this.createQRCode) {
|
|
28190
|
-
const
|
|
28191
|
-
if (
|
|
28192
|
-
|
|
28211
|
+
const e = Gc(Ns);
|
|
28212
|
+
if (e && e.createQRCodeButton === !1)
|
|
28213
|
+
L() && console.warn("WebXR: QRCode button is disabled in the Needle Menu component");
|
|
28193
28214
|
else if (!D.isMobileDevice()) {
|
|
28194
|
-
const
|
|
28195
|
-
this.addButton(
|
|
28215
|
+
const t = mn.getOrCreate().createQRCode();
|
|
28216
|
+
this.addButton(t);
|
|
28196
28217
|
}
|
|
28197
28218
|
}
|
|
28198
28219
|
}
|
|
@@ -28205,8 +28226,8 @@ const Ll = x("debugwebxr"), GE = x("debugusdz"), ht = class pa extends E {
|
|
|
28205
28226
|
* @param button The HTML element to add
|
|
28206
28227
|
* @param priority The button's priority value (lower numbers appear first)
|
|
28207
28228
|
*/
|
|
28208
|
-
addButton(e
|
|
28209
|
-
this._buttons.push(e),
|
|
28229
|
+
addButton(e) {
|
|
28230
|
+
this._buttons.push(e), this.context.menu.appendChild(e);
|
|
28210
28231
|
}
|
|
28211
28232
|
/**
|
|
28212
28233
|
* Removes all buttons created by this component from the UI.
|
|
@@ -28550,7 +28571,7 @@ class xn extends E {
|
|
|
28550
28571
|
const o = this._parentComponent.shadowComponent;
|
|
28551
28572
|
o && (o?.add(e), n = !0);
|
|
28552
28573
|
}
|
|
28553
|
-
this.shadowComponent = e, t && t.shadowComponent && this.shadowComponent && t.shadowComponent.add(this.shadowComponent), Vc && e.add(new Oi(0.5)), this.onAfterAddedToScene(), n &&
|
|
28574
|
+
this.shadowComponent = e, t && t.shadowComponent && this.shadowComponent && t.shadowComponent.add(this.shadowComponent), Vc && e.add(new Oi(0.5)), this.onAfterAddedToScene(), n && NC(), qE && console.warn("Added shadow component", this.shadowComponent);
|
|
28554
28575
|
}
|
|
28555
28576
|
setShadowComponentOwner(e) {
|
|
28556
28577
|
if (e && (e[wi] === void 0 || e[wi] === this) && (e[wi] = this, e.children))
|
|
@@ -28867,7 +28888,7 @@ const Zo = {
|
|
|
28867
28888
|
this.makePanel(), this.uiObject && (this.uiObject.setState(e), this?.markDirty());
|
|
28868
28889
|
}
|
|
28869
28890
|
setupState(e) {
|
|
28870
|
-
this.makePanel(), this.uiObject && (this._stateManager || (this._stateManager = new $
|
|
28891
|
+
this.makePanel(), this.uiObject && (this._stateManager || (this._stateManager = new $C(this.uiObject)), this.uiObject.setupState(e.state, e.attributes));
|
|
28871
28892
|
}
|
|
28872
28893
|
setOptions(e) {
|
|
28873
28894
|
this.makePanel(), this.uiObject && this.uiObject.set(e);
|
|
@@ -29519,21 +29540,21 @@ class Io extends Ai {
|
|
|
29519
29540
|
let g = 0;
|
|
29520
29541
|
a ? g += this.padding.left : g += this.padding.top;
|
|
29521
29542
|
let w = 0, b = 0;
|
|
29522
|
-
for (let
|
|
29523
|
-
const j = this.gameObject.children[
|
|
29543
|
+
for (let I = 0; I < this.gameObject.children.length; I++) {
|
|
29544
|
+
const j = this.gameObject.children[I], B = C.getComponent(j, es);
|
|
29524
29545
|
B?.activeAndEnabled && (b += 1, a ? w += B.width : w += B.height);
|
|
29525
29546
|
}
|
|
29526
29547
|
let v = 0;
|
|
29527
29548
|
const A = this.spacing * (b - 1);
|
|
29528
29549
|
if (d || c) {
|
|
29529
|
-
let
|
|
29530
|
-
a ?
|
|
29550
|
+
let I = 0;
|
|
29551
|
+
a ? I = n -= A : I = r -= A, b > 0 && (v = I / b);
|
|
29531
29552
|
}
|
|
29532
29553
|
let O = 0;
|
|
29533
29554
|
O += this.padding.left, O -= this.padding.right, _ !== 0 && (g = m - w, g *= _, g -= A * _, a ? (g -= this.padding.right * _, g += this.padding.left * (1 - _), g < this.padding.left && (g = this.padding.left)) : (g -= this.padding.bottom * _, g += this.padding.top * (1 - _), g < this.padding.top && (g = this.padding.top)));
|
|
29534
29555
|
let R = 1;
|
|
29535
|
-
for (let
|
|
29536
|
-
const j = this.gameObject.children[
|
|
29556
|
+
for (let I = 0; I < this.gameObject.children.length; I++) {
|
|
29557
|
+
const j = this.gameObject.children[I], B = C.getComponent(j, es);
|
|
29537
29558
|
if (B?.activeAndEnabled) {
|
|
29538
29559
|
B.pivot?.set(0.5, 0.5), B.anchorMin.set(0, 1), B.anchorMax.set(0, 1);
|
|
29539
29560
|
const G = i * 0.5 + O * 0.5;
|
|
@@ -29908,10 +29929,10 @@ class Yw {
|
|
|
29908
29929
|
if (m instanceof H && !w) {
|
|
29909
29930
|
const O = m.geometry.clone();
|
|
29910
29931
|
O.scale(1, 1, -1), this.flipWindingOrder(O), _.geometry = O;
|
|
29911
|
-
const R = new re(),
|
|
29932
|
+
const R = new re(), I = m.material.opacity;
|
|
29912
29933
|
R.copy(m.material.color), _.material = new we({
|
|
29913
29934
|
color: R,
|
|
29914
|
-
opacity:
|
|
29935
|
+
opacity: I * b,
|
|
29915
29936
|
map: m.material.map,
|
|
29916
29937
|
transparent: !0
|
|
29917
29938
|
});
|
|
@@ -30082,11 +30103,11 @@ const mi = class or extends E {
|
|
|
30082
30103
|
/** @internal */
|
|
30083
30104
|
onEnable() {
|
|
30084
30105
|
const e = D.supportsQuickLookAR(), t = D.isiOS() || D.isiPad();
|
|
30085
|
-
!this.button && (St || e || t) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = Ob(this.context, e), this.link.addEventListener("message", this.lastCallback)), St &&
|
|
30106
|
+
!this.button && (St || e || t) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = Ob(this.context, e), this.link.addEventListener("message", this.lastCallback)), St && Ae("USDZ Exporter enabled: " + this.name), document.getElementById("open-in-ar")?.addEventListener("click", this.onClickedOpenInARElement), Tc.registerExporter(this);
|
|
30086
30107
|
}
|
|
30087
30108
|
/** @internal */
|
|
30088
30109
|
onDisable() {
|
|
30089
|
-
this.button?.remove(), this.link?.removeEventListener("message", this.lastCallback), St &&
|
|
30110
|
+
this.button?.remove(), this.link?.removeEventListener("message", this.lastCallback), St && Ae("USDZ Exporter disabled: " + this.name), document.getElementById("open-in-ar")?.removeEventListener("click", this.onClickedOpenInARElement), Tc.unregisterExporter(this);
|
|
30090
30111
|
}
|
|
30091
30112
|
onClickedOpenInARElement = (e) => {
|
|
30092
30113
|
e.preventDefault(), this.exportAndOpen();
|
|
@@ -30144,14 +30165,14 @@ const mi = class or extends E {
|
|
|
30144
30165
|
for (const O of i) {
|
|
30145
30166
|
for (const R of O.sharedMeshes)
|
|
30146
30167
|
if (R) {
|
|
30147
|
-
let
|
|
30168
|
+
let I = 0;
|
|
30148
30169
|
const j = { exporter: this, type: "mesh", object: O.gameObject, mesh: R };
|
|
30149
30170
|
if (or.beforeLODExport.invoke(j), j.overrideLevel !== void 0)
|
|
30150
30171
|
if (j.overrideLevel === -1) {
|
|
30151
30172
|
St && console.warn("Skipping LOD export for mesh due to overrideLevel -1", O.gameObject, R);
|
|
30152
30173
|
continue;
|
|
30153
|
-
} else j.overrideLevel >= 0 && (
|
|
30154
|
-
const B = We.assignMeshLOD(R,
|
|
30174
|
+
} else j.overrideLevel >= 0 && (I = j.overrideLevel, St && console.log("Overriding LOD level for mesh export to level " + I + " " + R.name));
|
|
30175
|
+
const B = We.assignMeshLOD(R, I);
|
|
30155
30176
|
B instanceof Promise && n.push(new Promise((G, X) => {
|
|
30156
30177
|
B.then(() => {
|
|
30157
30178
|
o++, he.report("export-usdz-textures", { message: "Loaded progressive mesh", currentStep: o, totalSteps: n.length }), G();
|
|
@@ -30160,14 +30181,14 @@ const mi = class or extends E {
|
|
|
30160
30181
|
}
|
|
30161
30182
|
for (const R of O.sharedMaterials)
|
|
30162
30183
|
if (R) {
|
|
30163
|
-
let
|
|
30184
|
+
let I = 0;
|
|
30164
30185
|
const j = { exporter: this, type: "texture", object: O.gameObject, material: R };
|
|
30165
30186
|
if (or.beforeLODExport.invoke(j), j.overrideLevel !== void 0)
|
|
30166
30187
|
if (j.overrideLevel === -1) {
|
|
30167
30188
|
St && console.warn("Skipping LOD assignment due to overrideLevel -1", O.gameObject, R);
|
|
30168
30189
|
continue;
|
|
30169
|
-
} else j.overrideLevel >= 0 && (
|
|
30170
|
-
const B = We.assignTextureLOD(R,
|
|
30190
|
+
} else j.overrideLevel >= 0 && (I = j.overrideLevel, St && console.log("Overriding LOD level for texture export to level " + I + " " + R.name));
|
|
30191
|
+
const B = We.assignTextureLOD(R, I);
|
|
30171
30192
|
B instanceof Promise && n.push(new Promise((G, X) => {
|
|
30172
30193
|
B.then(() => {
|
|
30173
30194
|
o++, he.report("export-usdz-textures", { message: "Loaded progressive texture", currentStep: o, totalSteps: n.length }), G();
|
|
@@ -30175,13 +30196,13 @@ const mi = class or extends E {
|
|
|
30175
30196
|
}));
|
|
30176
30197
|
}
|
|
30177
30198
|
}
|
|
30178
|
-
St &&
|
|
30199
|
+
St && Ae("Progressive Loading: " + n.length), await Promise.all(n), St && Ae("Progressive Loading: done"), he.end("export-usdz-textures");
|
|
30179
30200
|
const r = li.Global.Mask;
|
|
30180
30201
|
li.Global.Set(ws.AR);
|
|
30181
30202
|
const a = new aE(), l = new Gg(this.quickLookCompatible);
|
|
30182
30203
|
let c;
|
|
30183
30204
|
const h = [];
|
|
30184
|
-
this.interactive && (h.push(new Fw()), h.push(new sl()), globalThis.NEEDLE_USE_RAPIER && C.getComponentsInChildren(e, Ze).length > 0 && (this.physics ? (c = new Uw(), h.push(c)) :
|
|
30205
|
+
this.interactive && (h.push(new Fw()), h.push(new sl()), globalThis.NEEDLE_USE_RAPIER && C.getComponentsInChildren(e, Ze).length > 0 && (this.physics ? (c = new Uw(), h.push(c)) : L() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), h.push(new ey()), h.push(new Yw()));
|
|
30185
30206
|
const d = [l, ...h, ...this.extensions], f = { self: this, exporter: a, extensions: d, object: e };
|
|
30186
30207
|
he.report("export-usdz", "Invoking before-export"), this.dispatchEvent(new CustomEvent("before-export", { detail: f })), this.applyWebARSessionRoot(), this._previousTimeScale = this.context.time.timeScale, this.context.time.timeScale = 0, he.report("export-usdz", "auto export animations and audio sources");
|
|
30187
30208
|
const p = new Array();
|
|
@@ -30189,14 +30210,14 @@ const mi = class or extends E {
|
|
|
30189
30210
|
const _ = Qa.instance.objs.map((O) => O.batchedMesh);
|
|
30190
30211
|
a.keepObject = (O) => {
|
|
30191
30212
|
let R = !0;
|
|
30192
|
-
const
|
|
30193
|
-
return
|
|
30213
|
+
const I = C.getComponent(O, ui);
|
|
30214
|
+
return I && !I.enabled && (R = !1), R && _.includes(O) && (R = !1), R && C.getComponentInParent(O, Du) && (R = !1), R && C.getComponentInParent(O, Fs) && (R = !1), St && !R && console.log("USDZExporter: Discarding object", O), R;
|
|
30194
30215
|
}, a.beforeWritingDocument = () => {
|
|
30195
|
-
if (
|
|
30216
|
+
if (L() && l && c) {
|
|
30196
30217
|
const O = l.animatedRoots;
|
|
30197
30218
|
for (const R of O) {
|
|
30198
|
-
const
|
|
30199
|
-
(
|
|
30219
|
+
const I = C.getComponentsInChildren(R, Ze).filter((B) => B.enabled), j = C.getComponents(R, Pn).filter((B) => B.enabled && !B.isTrigger);
|
|
30220
|
+
(I.length > 0 || j.length > 0) && console.error("An animated object has physics components in its child hierarchy. This can lead to undefined behaviour due to a bug in Apple's QuickLook (FB15925487). Remove the physics components from child objects or verify that you get the expected results.", R);
|
|
30200
30221
|
}
|
|
30201
30222
|
}
|
|
30202
30223
|
};
|
|
@@ -30258,7 +30279,7 @@ const mi = class or extends E {
|
|
|
30258
30279
|
const i = new URLSearchParams(this.link.href);
|
|
30259
30280
|
if (i) {
|
|
30260
30281
|
const n = i.get("callToActionURL");
|
|
30261
|
-
St &&
|
|
30282
|
+
St && Ae("Quicklook url: " + n), n && (ks() ? globalThis.open(n, "_blank") : console.warn("Quicklook closed: custom redirects require a Needle Engine Pro license: https://needle.tools/pricing", n));
|
|
30262
30283
|
}
|
|
30263
30284
|
}
|
|
30264
30285
|
}
|
|
@@ -31669,7 +31690,7 @@ const tt = class sc {
|
|
|
31669
31690
|
}
|
|
31670
31691
|
break;
|
|
31671
31692
|
default:
|
|
31672
|
-
this._vector.set(0, 0, 0),
|
|
31693
|
+
this._vector.set(0, 0, 0), L() && !globalThis.__particlesystem_shapetype_unsupported && (console.warn("ParticleSystem ShapeType is not supported:", Rm[this.shapeType]), globalThis.__particlesystem_shapetype_unsupported = !0);
|
|
31673
31694
|
break;
|
|
31674
31695
|
}
|
|
31675
31696
|
this.randomizePosition(this._vector, this.randomPositionAmount);
|
|
@@ -31868,7 +31889,7 @@ class xe {
|
|
|
31868
31889
|
_temp = new y();
|
|
31869
31890
|
apply(e, t, i, n, o, r) {
|
|
31870
31891
|
if (!this.enabled) return;
|
|
31871
|
-
this._noise || (this._noise =
|
|
31892
|
+
this._noise || (this._noise = IC(() => 0));
|
|
31872
31893
|
const a = this._temp.set(t.x, t.y, t.z).multiplyScalar(this.frequency), l = this._noise(a.x, a.y, a.z, this._time), c = this._noise(a.x, a.y, a.z, this._time + 1e3 * this.frequency), h = this._noise(a.x, a.y, a.z, this._time + 2e3 * this.frequency);
|
|
31873
31894
|
this._temp.set(l, c, h).normalize();
|
|
31874
31895
|
const d = o / r;
|
|
@@ -32082,7 +32103,7 @@ class Xe {
|
|
|
32082
32103
|
if (!this.enabled) return;
|
|
32083
32104
|
const l = r / a, c = this.speedModifier.evaluate(l) * this.speedModifierMultiplier, h = this.x.evaluate(l), d = this.y.evaluate(l), f = this.z.evaluate(l);
|
|
32084
32105
|
if (this._temp.set(-h, d, f), this._system && this._system.main.simulationSpace === 1 && this._temp.applyQuaternion(this._system.worldQuaternion), this._hasOrbital && this._system?.worldPos) {
|
|
32085
|
-
const m = this._temp2.set(i.x, i.y, i.z), _ = this.orbitalXMultiplier, g = this.orbitalYMultiplier, w = this.orbitalZMultiplier, b = c * Math.PI * 2 * 10, v = Math.cos(b * _), A = Math.sin(b * _), O = Math.cos(b * g), R = Math.sin(b * g),
|
|
32106
|
+
const m = this._temp2.set(i.x, i.y, i.z), _ = this.orbitalXMultiplier, g = this.orbitalYMultiplier, w = this.orbitalZMultiplier, b = c * Math.PI * 2 * 10, v = Math.cos(b * _), A = Math.sin(b * _), O = Math.cos(b * g), R = Math.sin(b * g), I = Math.cos(b * w), j = Math.sin(b * w), B = m.x * (O * I) + m.y * (O * j) + m.z * -R, G = m.x * (A * R * I - v * j) + m.y * (A * R * j + v * I) + m.z * (A * O), X = m.x * (v * R * I + A * j) + m.y * (v * R * j - A * I) + m.z * (v * O), k = this._temp3.set(m.x - B, m.y - G, m.z - X);
|
|
32086
32107
|
k.normalize(), k.multiplyScalar(0.2 / o * Math.max(this.orbitalXMultiplier, this.orbitalYMultiplier, this.orbitalZMultiplier)), n.x += k.x, n.y += k.y, n.z += k.z;
|
|
32087
32108
|
}
|
|
32088
32109
|
n.x += this._temp.x, n.y += this._temp.y, n.z += this._temp.z, n.x *= c, n.y *= c, n.z *= c;
|
|
@@ -32595,7 +32616,7 @@ class kn extends E {
|
|
|
32595
32616
|
cameraVelocityScale;
|
|
32596
32617
|
lengthScale;
|
|
32597
32618
|
start() {
|
|
32598
|
-
if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 &&
|
|
32619
|
+
if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 && L()) {
|
|
32599
32620
|
const e = `ParticleSystem "${this.name}" has non-default min/max particle size. This may not render correctly. Please set min size to 0 and the max size to 0.5 and use the "StartSize" setting instead`;
|
|
32600
32621
|
console.warn(e);
|
|
32601
32622
|
}
|
|
@@ -32913,7 +32934,7 @@ class HT {
|
|
|
32913
32934
|
startLength;
|
|
32914
32935
|
/** start length is for trails */
|
|
32915
32936
|
get startColor() {
|
|
32916
|
-
return new
|
|
32937
|
+
return new jC(new BC(1, 1, 1, 1));
|
|
32917
32938
|
}
|
|
32918
32939
|
get emissionOverTime() {
|
|
32919
32940
|
return this.emission;
|
|
@@ -32947,7 +32968,7 @@ class HT {
|
|
|
32947
32968
|
return gs.BillBoard;
|
|
32948
32969
|
}
|
|
32949
32970
|
rendererEmitterSettings = {
|
|
32950
|
-
startLength: new
|
|
32971
|
+
startLength: new FC(220),
|
|
32951
32972
|
followLocalOrigin: !1
|
|
32952
32973
|
};
|
|
32953
32974
|
get speedFactor() {
|
|
@@ -33137,7 +33158,7 @@ const Vt = class vd extends E {
|
|
|
33137
33158
|
if (!this._particleSystem)
|
|
33138
33159
|
return !1;
|
|
33139
33160
|
const t = this._particleSystem.behaviors, i = t.indexOf(e);
|
|
33140
|
-
return i !== -1 && ((
|
|
33161
|
+
return i !== -1 && ((L() || ro) && console.debug("Remove custom ParticleSystem Behaviour", i, e), t.splice(i, 1)), !0;
|
|
33141
33162
|
}
|
|
33142
33163
|
/** Removes all behaviours from the particle system
|
|
33143
33164
|
* **Note:** this will also remove the default behaviours like SizeBehaviour, ColorBehaviour etc.
|
|
@@ -33201,7 +33222,7 @@ const Vt = class vd extends E {
|
|
|
33201
33222
|
awake() {
|
|
33202
33223
|
if (this._worldPositionFrame = -1, this._renderer = this.gameObject.getComponent(kn), !this.main)
|
|
33203
33224
|
throw new Error("Not Supported: ParticleSystem needs a serialized MainModule. Creating new particle systems at runtime is currently not supported.");
|
|
33204
|
-
this._container = new M(), this._container.matrixAutoUpdate = !1, this.context.scene.add(this._container), this._batchSystem = new
|
|
33225
|
+
this._container = new M(), this._container.matrixAutoUpdate = !1, this.context.scene.add(this._container), this._batchSystem = new LC(), this._batchSystem.name = this.gameObject.name, this._container.add(this._batchSystem), this._interface = new HT(this), this._particleSystem = new DC(this._interface), this._particleSystem.addBehavior(new NT(this)), this._particleSystem.addBehavior(new VT(this)), this._particleSystem.addBehavior(new FT(this)), this._particleSystem.addBehavior(new UT(this)), this._particleSystem.addBehavior(new WT(this)), this._particleSystem.addBehavior(new $T(this)), this._batchSystem.addSystem(this._particleSystem);
|
|
33205
33226
|
const e = this._particleSystem.emitter;
|
|
33206
33227
|
this.context.scene.add(e), this.inheritVelocity.system && this.inheritVelocity.system !== this && (this.inheritVelocity = this.inheritVelocity.clone()), this.inheritVelocity.awake(this), ro && (console.log(this), this.gameObject.add(new Oi(1)));
|
|
33207
33228
|
}
|
|
@@ -33274,7 +33295,7 @@ const Vt = class vd extends E {
|
|
|
33274
33295
|
addSubParticleSystems() {
|
|
33275
33296
|
if (this._subEmitterSystems && this._particleSystem)
|
|
33276
33297
|
for (const e of this._subEmitterSystems) {
|
|
33277
|
-
e.particleSystem && (e.particleSystem.__internalAwake ? e.particleSystem.__internalAwake() :
|
|
33298
|
+
e.particleSystem && (e.particleSystem.__internalAwake ? e.particleSystem.__internalAwake() : L() && console.warn("SubParticleSystem serialization issue(?)", e.particleSystem, e));
|
|
33278
33299
|
const t = e.particleSystem?._particleSystem;
|
|
33279
33300
|
if (t) {
|
|
33280
33301
|
e.particleSystem._isUsedAsSubsystem = !0;
|
|
@@ -33352,7 +33373,7 @@ function ox(s, e) {
|
|
|
33352
33373
|
if (!s.unsupported_scaling_mode) {
|
|
33353
33374
|
s.unsupported_scaling_mode = !0;
|
|
33354
33375
|
const t = "ParticleSystem scale mode " + Em[s.main.scalingMode] + " is not supported";
|
|
33355
|
-
|
|
33376
|
+
L() && _e(t), console.warn(t, s.name, s);
|
|
33356
33377
|
}
|
|
33357
33378
|
e = qe(s.gameObject, e);
|
|
33358
33379
|
break;
|
|
@@ -33457,7 +33478,7 @@ function QT(s) {
|
|
|
33457
33478
|
const t = s.scene;
|
|
33458
33479
|
e = Gn(t, Dm);
|
|
33459
33480
|
} else
|
|
33460
|
-
|
|
33481
|
+
L() && console.warn("No post processing manager found");
|
|
33461
33482
|
return e;
|
|
33462
33483
|
}
|
|
33463
33484
|
const ut = {
|
|
@@ -34305,7 +34326,7 @@ function PA() {
|
|
|
34305
34326
|
["radius", new Gi(1)]
|
|
34306
34327
|
// ["threshold", new Uniform(0)],
|
|
34307
34328
|
]),
|
|
34308
|
-
attributes:
|
|
34329
|
+
attributes: WC.CONVOLUTION
|
|
34309
34330
|
});
|
|
34310
34331
|
}
|
|
34311
34332
|
}
|
|
@@ -34689,7 +34710,7 @@ class uh extends E {
|
|
|
34689
34710
|
/** @internal */
|
|
34690
34711
|
awake() {
|
|
34691
34712
|
tr && (console.log("PostprocessingManager Awake", this), console.log("Press P to toggle post processing"), window.addEventListener("keydown", (e) => {
|
|
34692
|
-
e.key === "p" && (this.enabled = !this.enabled,
|
|
34713
|
+
e.key === "p" && (this.enabled = !this.enabled, Ae("Toggle PostProcessing " + this.name + ": Enabled=" + this.enabled), this.markDirty());
|
|
34693
34714
|
})), this.sharedProfile?.__init(this);
|
|
34694
34715
|
}
|
|
34695
34716
|
_componentEnabledTime = -1;
|
|
@@ -34708,7 +34729,7 @@ class uh extends E {
|
|
|
34708
34729
|
if (!this.context.isInXR && (this.context.mainCamera && this._isDirty && this.apply(), this.context.composer && this._postprocessing && this._postprocessing.composer === this.context.composer)) {
|
|
34709
34730
|
if (this.context.renderer.getContext().isContextLost() && this.context.renderer.forceContextRestore(), this.context.composer.getRenderer() !== this.context.renderer && this.context.composer.setRenderer(this.context.renderer), this.context.composer.setMainScene(this.context.scene), this.multisampling === "auto")
|
|
34710
34731
|
if (this._postprocessing && this._postprocessing.hasSmaaEffect)
|
|
34711
|
-
this._postprocessing.multisampling !== 0 && (this._postprocessing.multisampling = 0, (tr ||
|
|
34732
|
+
this._postprocessing.multisampling !== 0 && (this._postprocessing.multisampling = 0, (tr || L()) && console.log(`[PostProcessing] multisampling is disabled because it's set to 'auto' on your PostprocessingManager/Volume component that also has an SMAA effect.
|
|
34712
34733
|
|
|
34713
34734
|
If you need multisampling consider changing 'auto' to a fixed value (e.g. 4).`));
|
|
34714
34735
|
else {
|
|
@@ -34748,7 +34769,7 @@ If you need multisampling consider changing 'auto' to a fixed value (e.g. 4).`))
|
|
|
34748
34769
|
_rapidApplyCount = 0;
|
|
34749
34770
|
_isDirty = !1;
|
|
34750
34771
|
apply() {
|
|
34751
|
-
if (tr && console.log(`Apply PostProcessing "${this.name || "unnamed"}"`),
|
|
34772
|
+
if (tr && console.log(`Apply PostProcessing "${this.name || "unnamed"}"`), L() && (this._lastApplyTime !== void 0 && Date.now() - this._lastApplyTime < 100 && (this._rapidApplyCount++, this._rapidApplyCount === 5 && console.warn("Detected rapid post processing modifications - this might be a bug", this)), this._lastApplyTime = Date.now()), this._isDirty = !1, this._activeEffects.length = 0, this.sharedProfile?.components) {
|
|
34752
34773
|
const e = this.sharedProfile.components;
|
|
34753
34774
|
for (const t of e)
|
|
34754
34775
|
t.active && t.enabled && !this._activeEffects.includes(t) && this._activeEffects.push(t);
|
|
@@ -35528,7 +35549,7 @@ class yt extends E {
|
|
|
35528
35549
|
return this.clip;
|
|
35529
35550
|
}
|
|
35530
35551
|
set audioOutputMode(e) {
|
|
35531
|
-
e !== this._audioOutputMode && (e === 1 &&
|
|
35552
|
+
e !== this._audioOutputMode && (e === 1 && L() && console.warn("VideoAudioOutputMode.AudioSource is not yet implemented"), this._audioOutputMode = e, this.updateVideoElementSettings());
|
|
35532
35553
|
}
|
|
35533
35554
|
get audioOutputMode() {
|
|
35534
35555
|
return this._audioOutputMode;
|
|
@@ -36100,7 +36121,7 @@ class qr extends E {
|
|
|
36100
36121
|
}
|
|
36101
36122
|
async internalShare(e) {
|
|
36102
36123
|
if (this.context.connection.isInRoom === !1) {
|
|
36103
|
-
console.warn("Can not start screensharing: requires network connection"),
|
|
36124
|
+
console.warn("Can not start screensharing: requires network connection"), L() && _e("Can not start screensharing: requires network connection. Add a SyncedRoom component or join a room first.");
|
|
36104
36125
|
return;
|
|
36105
36126
|
}
|
|
36106
36127
|
if (e?.device && (this.device = e.device), !this.videoPlayer && this.requiresVideoPlayer && (this._videoPlayer || (this._videoPlayer = C.getComponent(this.gameObject, yt) ?? void 0), this.videoPlayer || this._ensureVideoPlayer(), !this.videoPlayer)) {
|
|
@@ -36248,7 +36269,7 @@ class qr extends E {
|
|
|
36248
36269
|
} else
|
|
36249
36270
|
console.error("Failed to get user media", r.message, r.code, r);
|
|
36250
36271
|
}
|
|
36251
|
-
!n &&
|
|
36272
|
+
!n && L() && (_e("No camera found for sharing. Please connect a camera (see console for more information)"), console.warn("No camera found for sharing. Please connect a camera", i, this.deviceName, "Using deviceFilter? " + this.deviceFilter != null, "Using options? " + t != null, "Using deviceName? " + this.deviceName != null, "Using options.deviceId? " + t?.deviceId != null, "Using options.deviceFilter? " + t?.deviceFilter != null));
|
|
36252
36273
|
}
|
|
36253
36274
|
// private _cameraSelectionWindow : Window | null = null;
|
|
36254
36275
|
// private openWindowToSelectCamera(){
|
|
@@ -36570,7 +36591,7 @@ function Fb(s, e, t, i, n) {
|
|
|
36570
36591
|
if (e === "transparent" || e?.startsWith("rgb") || e?.startsWith("#"))
|
|
36571
36592
|
return console.warn(`Needle Engine: Invalid ${n} value (${e}). Did you mean to set background-color instead?`), null;
|
|
36572
36593
|
const o = new gy();
|
|
36573
|
-
o.sourceId =
|
|
36594
|
+
o.sourceId = YC(e), o.allowDrop = !1, o.allowNetworking = !1, o.background = t, o.environment = i, C.addComponent(s.scene, o);
|
|
36574
36595
|
const r = (a) => {
|
|
36575
36596
|
if (Kt && console.log(n, "CHANGED TO", a), a) {
|
|
36576
36597
|
if (typeof a != "string") {
|
|
@@ -36641,7 +36662,7 @@ const Ar = class extends E {
|
|
|
36641
36662
|
}
|
|
36642
36663
|
apply() {
|
|
36643
36664
|
const e = this._prevLoadedEnvironment;
|
|
36644
|
-
if (e && (e instanceof l0 || e instanceof JS || e.mapping == d0 || (e.mapping =
|
|
36665
|
+
if (e && (e instanceof l0 || e instanceof JS || e.mapping == d0 || (e.mapping = eC, e.needsUpdate = !0), !this.destroyed)) {
|
|
36645
36666
|
if (!this.context) {
|
|
36646
36667
|
console.warn("RemoteSkybox: Context is not available - can not apply skybox.");
|
|
36647
36668
|
return;
|
|
@@ -36733,7 +36754,7 @@ let gy = Ar;
|
|
|
36733
36754
|
function QA(s, e, t) {
|
|
36734
36755
|
if (s == null) return null;
|
|
36735
36756
|
const i = e && !t, n = Bb[s.toLowerCase()];
|
|
36736
|
-
return n ? i ? n.url_low : n.url : (typeof s == "string" && s?.length && (
|
|
36757
|
+
return n ? i ? n.url_low : n.url : (typeof s == "string" && s?.length && (L() || Kt) && !s.startsWith("http") && !s.startsWith("file:") && !s.startsWith("blob:") && !s.startsWith("data:") && console.warn(`RemoteSkybox: Unknown magic skybox name "${s}". Valid names are: ${Object.keys(Bb).map((r) => `"${r}"`).join(", ")}`), s);
|
|
36737
36758
|
}
|
|
36738
36759
|
var YA = Object.defineProperty, cf = (s, e, t, i) => {
|
|
36739
36760
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
@@ -37476,7 +37497,7 @@ function cI(s, e) {
|
|
|
37476
37497
|
const t = s.map((o) => new y(-o.position.x, o.position.y, o.position.z));
|
|
37477
37498
|
t.length === 1 && t.push(t[0]);
|
|
37478
37499
|
const i = s.reduce((o, r) => o + Math.abs(r.tangentOut.x) + Math.abs(r.tangentOut.y) + Math.abs(r.tangentOut.z), 0) / s.length, n = F.remap(i, 0, 0.3, 0, 0.5);
|
|
37479
|
-
return new
|
|
37500
|
+
return new tC(t, e, "catmullrom", n);
|
|
37480
37501
|
}
|
|
37481
37502
|
var hI = Object.defineProperty, dI = Object.getOwnPropertyDescriptor, Uo = (s, e, t, i) => {
|
|
37482
37503
|
for (var n = i > 1 ? void 0 : i ? dI(e, t) : e, o = s.length - 1, r; o >= 0; o--)
|
|
@@ -37706,7 +37727,7 @@ const vx = class Fm extends E {
|
|
|
37706
37727
|
for (const n in this.remoteCams) {
|
|
37707
37728
|
const o = this.remoteCams[n], r = this.context.time.realtimeSinceStartup - o.lastUpdate;
|
|
37708
37729
|
if (!o || r > this._camTimeoutInSeconds) {
|
|
37709
|
-
|
|
37730
|
+
L() && console.log("Remote cam timeout", n), o?.obj && C.destroy(o.obj), delete this.remoteCams[n], o && delete this.userToCamMap[o.userId], Fm.instances.push(o), this.context.players.removePlayerView(o.userId, _o.Browser);
|
|
37710
37731
|
continue;
|
|
37711
37732
|
}
|
|
37712
37733
|
}
|
|
@@ -37815,13 +37836,13 @@ class as extends E {
|
|
|
37815
37836
|
const i = x(this.urlParameterName);
|
|
37816
37837
|
if (i && (typeof i == "string" || typeof i == "number")) {
|
|
37817
37838
|
t = !0;
|
|
37818
|
-
const n =
|
|
37839
|
+
const n = XC(i.toString());
|
|
37819
37840
|
this.roomName = n;
|
|
37820
37841
|
} else if (this.joinRandomRoom && (console.log("No room name found in url, generating random one"), this.setRandomRoomUrlParameter(), e < 1))
|
|
37821
37842
|
return this.tryJoinRoom(e + 1);
|
|
37822
37843
|
} else
|
|
37823
37844
|
this.joinRandomRoom && (this.roomName === null || this.roomName === void 0 || this.roomName.length <= 0) && (this.roomName = this.generateRoomName());
|
|
37824
|
-
return this.requireRoomParameter && !t ? ((Ep ||
|
|
37845
|
+
return this.requireRoomParameter && !t ? ((Ep || L()) && console.warn('[SyncedRoom] Missing required room parameter "' + this.urlParameterName + `" in url - will not connect.
|
|
37825
37846
|
To allow joining a room without a query parameter you can set "requireRoomParameter" to false.`), !1) : (this.context.connection.isConnected || this.context.connection.connect(), this._lastJoinedRoom = this.roomName, this._roomPrefix && (this.roomName = this._roomPrefix + this.roomName), this.roomName.length <= 0 ? (console.warn(`[SyncedRoom] Room name is not set so we can not join a networked room.
|
|
37826
37847
|
Please choose one of the following options to fix this:
|
|
37827
37848
|
A) Set a room name in the SyncedRoom component
|
|
@@ -37833,7 +37854,7 @@ C) Set "joinRandomRoom" to true`), !1) : (Ep && console.log("Join " + this.roomN
|
|
|
37833
37854
|
_userWantsToBeInARoom = !1;
|
|
37834
37855
|
/** @internal */
|
|
37835
37856
|
update() {
|
|
37836
|
-
this.context.connection.isConnected && (this.context.time.time - this._lastPingTime > 3 && (this._lastPingTime = this.context.time.time, this.context.connection.sendPing()), this.context.connection.isInRoom && (this._lastRoomTime = this.context.time.time)), this._lastRoomTime > 0 && this.context.time.time - this._lastRoomTime > 0.3 && (this._lastRoomTime = -1, this.autoRejoin ? this._userWantsToBeInARoom && (console.log("Disconnected from networking backend - attempt reconnecting now"), this.tryJoinRoom()) :
|
|
37857
|
+
this.context.connection.isConnected && (this.context.time.time - this._lastPingTime > 3 && (this._lastPingTime = this.context.time.time, this.context.connection.sendPing()), this.context.connection.isInRoom && (this._lastRoomTime = this.context.time.time)), this._lastRoomTime > 0 && this.context.time.time - this._lastRoomTime > 0.3 && (this._lastRoomTime = -1, this.autoRejoin ? this._userWantsToBeInARoom && (console.log("Disconnected from networking backend - attempt reconnecting now"), this.tryJoinRoom()) : L() && console.warn("You are not connected to a room anymore (possibly because the tab was inactive for too long and the server kicked you?)"));
|
|
37837
37858
|
}
|
|
37838
37859
|
/**
|
|
37839
37860
|
* Get the URL to view the current room in view only mode.
|
|
@@ -37894,7 +37915,7 @@ C) Set "joinRandomRoom" to true`), !1) : (Ep && console.log("Join " + this.roomN
|
|
|
37894
37915
|
const t = this.getViewOnlyUrl();
|
|
37895
37916
|
t?.length ? navigator.canShare({ url: t }) ? navigator.share({ url: t })?.catch((i) => {
|
|
37896
37917
|
console.warn(i);
|
|
37897
|
-
}) : (navigator.clipboard.writeText(t),
|
|
37918
|
+
}) : (navigator.clipboard.writeText(t), Ae("View only URL copied to clipboard")) : _e("Could not create view only URL");
|
|
37898
37919
|
}, e.title = "Copy the view only URL: A page accessed by the view only URL can not be modified by visiting users.", e.textContent = "Share View URL", e.prepend(Ft("visibility"));
|
|
37899
37920
|
}
|
|
37900
37921
|
this.context.menu.appendChild(this._viewOnlyButton);
|
|
@@ -38238,13 +38259,13 @@ class nu extends yh {
|
|
|
38238
38259
|
if (!n) {
|
|
38239
38260
|
const f = t.tracks[0].name.substring(0, l) + ".quaternion";
|
|
38240
38261
|
Vn && console.warn("Create quaternion track", h, d);
|
|
38241
|
-
const p = new
|
|
38262
|
+
const p = new nC(f, [0, t.duration], [0, 0, 0, 1, 0, 0, 0, 1]);
|
|
38242
38263
|
t.tracks.push(p), this.createRotationInterpolant(t, e, p);
|
|
38243
38264
|
}
|
|
38244
38265
|
} else {
|
|
38245
38266
|
const f = c + ".position";
|
|
38246
38267
|
Vn && console.warn("Create position track", h, d);
|
|
38247
|
-
const p = new
|
|
38268
|
+
const p = new iC(f, [0, t.duration], [0, 0, 0, 0, 0, 0]);
|
|
38248
38269
|
t.tracks.push(p), this.createPositionInterpolant(t, e, p);
|
|
38249
38270
|
}
|
|
38250
38271
|
}
|
|
@@ -38328,7 +38349,7 @@ class nu extends yh {
|
|
|
38328
38349
|
l.reversed === !0 ? c.time = c.getClip().duration - v : c.time = v, c.timeScale = 0;
|
|
38329
38350
|
const R = Math.max(0, w);
|
|
38330
38351
|
if (c.weight = R, r += R, c.clampWhenFinished = !1, c.isRunning() || c.play(), this._useclipOffsets) {
|
|
38331
|
-
const
|
|
38352
|
+
const I = t == 0 ? this._totalOffsetPosition : this._totalOffsetPosition2, j = t == 0 ? this._totalOffsetRotation : this._totalOffsetRotation2;
|
|
38332
38353
|
t < 1 && (i = 1 - w), t += 1;
|
|
38333
38354
|
const B = this._summedPos.set(0, 0, 0), G = this._tempPos.set(0, 0, 0), X = this._summedRot.identity(), k = this._tempRot.identity(), W = h.rotation;
|
|
38334
38355
|
W && (this._clipRotQuat.identity(), this._clipRotQuat.slerp(W, w));
|
|
@@ -38336,11 +38357,11 @@ class nu extends yh {
|
|
|
38336
38357
|
if (q.hasOffsets)
|
|
38337
38358
|
for (let se = 0; se < A; se++)
|
|
38338
38359
|
q.rootPositionOffset ? G.copy(q.rootPositionOffset) : G.set(0, 0, 0), G.applyQuaternion(X), this._clipRotQuat && G.applyQuaternion(this._clipRotQuat), q.rootQuaternionOffset && (k.copy(q.rootQuaternionOffset), X.multiply(k)), B.add(G);
|
|
38339
|
-
this._clipRotQuat && j.multiply(this._clipRotQuat), j.multiply(X), h.position && B.add(h.position),
|
|
38360
|
+
this._clipRotQuat && j.multiply(this._clipRotQuat), j.multiply(X), h.position && B.add(h.position), I.add(B);
|
|
38340
38361
|
}
|
|
38341
38362
|
}
|
|
38342
38363
|
}
|
|
38343
|
-
if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, i), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, i)), this.__mixerError === void 0 && (Vn ||
|
|
38364
|
+
if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, i), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, i)), this.__mixerError === void 0 && (Vn || L()) && this._animator?.runtimeAnimatorController?.mixer && this.mixer !== this._animator?.runtimeAnimatorController?.mixer && (this.__mixerError = !0, console.error("AnimationTrack mixer is not shared with the animator controller - this might result in the timeline to not animate properly. Please report a bug to the Needle Engine team!", this)), this._animator?.runtimeAnimatorController) {
|
|
38344
38365
|
const a = Math.max(0, 1 - r);
|
|
38345
38366
|
this._animator?.runtimeAnimatorController?.update(a);
|
|
38346
38367
|
} else
|
|
@@ -38398,7 +38419,7 @@ class po extends yh {
|
|
|
38398
38419
|
}
|
|
38399
38420
|
}
|
|
38400
38421
|
addModel(e) {
|
|
38401
|
-
const t = new
|
|
38422
|
+
const t = new sC(this.listener);
|
|
38402
38423
|
this.audio.push(t);
|
|
38403
38424
|
const i = e;
|
|
38404
38425
|
i._didTriggerPlay = !1, this.models.push(i);
|
|
@@ -38664,7 +38685,7 @@ const dn = x("debugtimeline"), Sy = class Um extends E {
|
|
|
38664
38685
|
_speed = 1;
|
|
38665
38686
|
/** @internal */
|
|
38666
38687
|
awake() {
|
|
38667
|
-
dn && console.log(`[Timeline] Awake '${this.name}'`, this), this.rebuildGraph(), !this.isValid() && (dn ||
|
|
38688
|
+
dn && console.log(`[Timeline] Awake '${this.name}'`, this), this.rebuildGraph(), !this.isValid() && (dn || L()) && (dn ? console.warn("PlayableDirector is not valid", "Asset?", this.playableAsset, "Tracks:", this.playableAsset?.tracks, "IsArray?", Array.isArray(this.playableAsset?.tracks), this) : this.playableAsset?.tracks?.length ? console.warn("PlayableDirector is not valid") : console.warn("PlayableDirector has no tracks"));
|
|
38668
38689
|
}
|
|
38669
38690
|
/** @internal */
|
|
38670
38691
|
onEnable() {
|
|
@@ -39059,7 +39080,7 @@ class vl extends E {
|
|
|
39059
39080
|
orbit;
|
|
39060
39081
|
/** @internal */
|
|
39061
39082
|
onEnable() {
|
|
39062
|
-
if (!(this.isGizmo && !Vc) && this.context.mainCamera && (this._control || (this._control = new
|
|
39083
|
+
if (!(this.isGizmo && !Vc) && this.context.mainCamera && (this._control || (this._control = new PC(this.context.mainCamera, this.context.renderer.domElement), this._control.enabled = !0, this._control.getRaycaster().layers.set(2), this._control.size = 1, ("_root" in this._control ? this._control._root : this._control).traverse((t) => {
|
|
39063
39084
|
const i = t;
|
|
39064
39085
|
if (i.layers.set(2), i) {
|
|
39065
39086
|
const n = i.material;
|
|
@@ -39308,7 +39329,7 @@ class $o extends E {
|
|
|
39308
39329
|
ir && console.warn("Button Up", this.animationTriggers?.highlightedTrigger, this.animator, this._isHovered), this.interactable && (this.transition == 3 && this.animationTriggers && this.animator ? this.animator.setTrigger(this._isHovered ? this.animationTriggers.highlightedTrigger : this.animationTriggers.normalTrigger) : this.transition === 1 && this.colors && this._image?.setState(this._isHovered ? "hovered" : "normal"));
|
|
39309
39330
|
}
|
|
39310
39331
|
onPointerClick(e) {
|
|
39311
|
-
if (this.interactable && !(e.button !== 0 && e.event.pointerType === cg.Mouse) && (ir && (console.warn("Button Click", this.onClick),
|
|
39332
|
+
if (this.interactable && !(e.button !== 0 && e.event.pointerType === cg.Mouse) && (ir && (console.warn("Button Click", this.onClick), Ae("CLICKED button " + this.name + " at " + this.context.time.frameCount)), this.onClick && this.onClick.listenerCount > 0 && (this.onClick.invoke(), e.use(), ir))) {
|
|
39312
39333
|
const t = this.gameObject.worldPosition;
|
|
39313
39334
|
t.add(this.gameObject.worldUp.multiplyScalar(1 + Math.random() * 0.5)), U.DrawLabel(t, "CLICK:" + Date.now(), 0.1, 1 + Math.random() * 0.5);
|
|
39314
39335
|
}
|
|
@@ -39588,9 +39609,9 @@ class gf extends E {
|
|
|
39588
39609
|
return;
|
|
39589
39610
|
}
|
|
39590
39611
|
e.style.display = "block", e.style.visibility = "hidden";
|
|
39591
|
-
const t = new
|
|
39612
|
+
const t = new OC();
|
|
39592
39613
|
t.listenToPointerEvents(this.context.renderer, this.context.mainCamera), this.gameObject.add(t);
|
|
39593
|
-
const i = new
|
|
39614
|
+
const i = new kC(e);
|
|
39594
39615
|
t.add(i), i.visible = !1;
|
|
39595
39616
|
const n = i.material;
|
|
39596
39617
|
n.transparent = !0, setTimeout(() => {
|
|
@@ -39808,7 +39829,7 @@ const vh = class Rx extends E {
|
|
|
39808
39829
|
/** @internal */
|
|
39809
39830
|
onBeforeRender() {
|
|
39810
39831
|
let e = this.target;
|
|
39811
|
-
if (e || (e = this.context.mainCamera,
|
|
39832
|
+
if (e || (e = this.context.mainCamera, L() && !this.__did_warn && (this.__did_warn = !0, console.debug(`[LookAt] No target set on ${this.name}, using main camera as target.`))), !e) return;
|
|
39812
39833
|
let t = this.copyTargetRotation;
|
|
39813
39834
|
(this.context.isInVR || this.context.isInPassThrough) && (t = !1), _u(this.gameObject, e, this.keepUpDirection, t), this.invertForward && this.gameObject.quaternion.multiply(Rx.flipYQuat);
|
|
39814
39835
|
}
|
|
@@ -39868,7 +39889,7 @@ class wh extends E {
|
|
|
39868
39889
|
}
|
|
39869
39890
|
this._validateUrl();
|
|
39870
39891
|
let e = this.url;
|
|
39871
|
-
switch (!e.startsWith("mailto:") && e.includes("@") && (e = "mailto:" + e),
|
|
39892
|
+
switch (!e.startsWith("mailto:") && e.includes("@") && (e = "mailto:" + e), this.mode) {
|
|
39872
39893
|
case 0:
|
|
39873
39894
|
D.isSafari(), globalThis.open(e, "_blank");
|
|
39874
39895
|
break;
|
|
@@ -39897,7 +39918,7 @@ class wh extends E {
|
|
|
39897
39918
|
this.clickable && !e.used && this.url?.length && this.open();
|
|
39898
39919
|
}
|
|
39899
39920
|
_validateUrl() {
|
|
39900
|
-
this.url && this.url.startsWith("www.") && (
|
|
39921
|
+
this.url && this.url.startsWith("www.") && (L() && console.warn("URL is not valid, adding https:// to the start of the URL", this.url), this.url = "https://" + this.url);
|
|
39901
39922
|
}
|
|
39902
39923
|
}
|
|
39903
39924
|
ky([
|
|
@@ -40196,7 +40217,7 @@ class Wo extends E {
|
|
|
40196
40217
|
c.needsUpdate = !1;
|
|
40197
40218
|
try {
|
|
40198
40219
|
if (c.element = Tx(h), Fl && console.debug(`ScrollMarker #${h} (${c.time.toFixed(2)}) found`, c.element), !c.element) {
|
|
40199
|
-
(Fl ||
|
|
40220
|
+
(Fl || L()) && console.warn(`No HTML element found for ScrollMarker: ${c.name} (index ${h})`);
|
|
40200
40221
|
continue;
|
|
40201
40222
|
}
|
|
40202
40223
|
} catch (d) {
|
|
@@ -40208,7 +40229,7 @@ class Wo extends E {
|
|
|
40208
40229
|
}
|
|
40209
40230
|
n.length <= 0 && document.querySelectorAll("[data-timeline-marker]").forEach((h) => {
|
|
40210
40231
|
const d = h.getAttribute("data-timeline-marker"), f = parseFloat(d || "NaN");
|
|
40211
|
-
isNaN(f) ? (
|
|
40232
|
+
isNaN(f) ? (L() || Fl) && console.warn('[ScrollFollow] data-timeline-marker attribute is not a valid number. Supported are numbers only (e.g. <div data-timeline-marker="0.5">)') : n.push({
|
|
40212
40233
|
time: f,
|
|
40213
40234
|
element: h
|
|
40214
40235
|
});
|
|
@@ -40300,7 +40321,7 @@ let rt = class extends E {
|
|
|
40300
40321
|
debug = !1;
|
|
40301
40322
|
/** @internal */
|
|
40302
40323
|
onEnable() {
|
|
40303
|
-
(eo || this.debug ||
|
|
40324
|
+
(eo || this.debug || L()) && console.debug("[ViewBox] Using camera fov:", this.referenceFieldOfView), rt.instances.push(this), this._applyCount = 0, this.removeUpdateCallback(), this.context.pre_render_callbacks.push(this.internalUpdate);
|
|
40304
40325
|
}
|
|
40305
40326
|
/** @internal */
|
|
40306
40327
|
onDisable() {
|
|
@@ -40346,7 +40367,7 @@ let rt = class extends E {
|
|
|
40346
40367
|
}
|
|
40347
40368
|
const v = z(p);
|
|
40348
40369
|
e.worldToLocal(v), e.lookAt(p), e.updateMatrixWorld();
|
|
40349
|
-
const A = this.referenceFieldOfView * Math.PI / 180, O = 2 * Math.tan(A / 2) * g, R = O * e.aspect,
|
|
40370
|
+
const A = this.referenceFieldOfView * Math.PI / 180, O = 2 * Math.tan(A / 2) * g, R = O * e.aspect, I = this.projectBoxIntoCamera(e, 1), j = I.maxX - I.minX, B = I.maxY - I.minY, X = this.fit(
|
|
40350
40371
|
j * e.aspect,
|
|
40351
40372
|
B,
|
|
40352
40373
|
R / r,
|
|
@@ -40470,7 +40491,7 @@ NeedleXRSession.onSessionRequestStart(evt => {
|
|
|
40470
40491
|
evt.init.optionalFeatures = evt.init.optionalFeatures || [];
|
|
40471
40492
|
evt.init.optionalFeatures.push('camera-access');
|
|
40472
40493
|
});
|
|
40473
|
-
`),
|
|
40494
|
+
`), L() && vu("No camera feed available - please request the 'camera-access' feature before starting WebXR or add the ARCameraBackground component to your scene"), !1;
|
|
40474
40495
|
const n = t.getViewerPose(s.xr.getReferenceSpace());
|
|
40475
40496
|
if (n)
|
|
40476
40497
|
for (const o of n.views)
|
|
@@ -40517,10 +40538,10 @@ function Lx(s) {
|
|
|
40517
40538
|
return console.error("No camera found"), null;
|
|
40518
40539
|
const a = i.renderer, l = a.xr.enabled && a.xr.isPresenting;
|
|
40519
40540
|
if (l && i.currentFrameEvent != Se.EarlyUpdate)
|
|
40520
|
-
return console.warn("Screenshot: defer to access XR frame"), new Promise((
|
|
40541
|
+
return console.warn("Screenshot: defer to access XR frame"), new Promise((I) => {
|
|
40521
40542
|
Bs((j) => {
|
|
40522
40543
|
const B = Lx(s);
|
|
40523
|
-
|
|
40544
|
+
I(B);
|
|
40524
40545
|
}, Se.EarlyUpdate, { once: !0 });
|
|
40525
40546
|
});
|
|
40526
40547
|
const c = a.domElement, h = c.width, d = c.height;
|
|
@@ -40532,8 +40553,8 @@ function Lx(s) {
|
|
|
40532
40553
|
a.xr.enabled = !1, a.xr.isPresenting = !1, c.style.width = `${n}px`, c.style.height = `${o}px`;
|
|
40533
40554
|
const w = a.getRenderTarget(), b = a.getClearColor(new re()), v = a.getClearAlpha(), A = i.scene.background, O = "aspect" in r ? r.aspect : null;
|
|
40534
40555
|
try {
|
|
40535
|
-
const R = s.render_events !== !1,
|
|
40536
|
-
R && (Hc(i.scene, ui,
|
|
40556
|
+
const R = s.render_events !== !1, I = new Array();
|
|
40557
|
+
R && (Hc(i.scene, ui, I), I.forEach((k) => {
|
|
40537
40558
|
if (k?.onBeforeRender(), k.isInstancingActive && k.instances)
|
|
40538
40559
|
for (let W = 0; W < k.instances?.length; W++) {
|
|
40539
40560
|
const q = k.instances[W];
|
|
@@ -40554,7 +40575,7 @@ function Lx(s) {
|
|
|
40554
40575
|
scene: i.scene,
|
|
40555
40576
|
camera: r,
|
|
40556
40577
|
renderer: a
|
|
40557
|
-
})) : i.renderNow(r || null), r instanceof ce && O != null && (r.aspect = O, r.updateProjectionMatrix()), R &&
|
|
40578
|
+
})) : i.renderNow(r || null), r instanceof ce && O != null && (r.aspect = O, r.updateProjectionMatrix()), R && I.forEach((k) => k.onAfterRender()), !t && "download_filename" in s && s.download_filename)
|
|
40558
40579
|
switch (s.download_filename.split(".").pop()?.toLowerCase()) {
|
|
40559
40580
|
case "png":
|
|
40560
40581
|
t = "image/png";
|
|
@@ -40915,7 +40936,7 @@ class eL {
|
|
|
40915
40936
|
const n = i;
|
|
40916
40937
|
return n.isImageTrackingExtension && n.component.activeAndEnabled && n.component.trackedImages?.length > 0;
|
|
40917
40938
|
}).indexOf(this);
|
|
40918
|
-
this.shouldExport = t === 0, this.shouldExport && this.component.trackedImages?.length > 1 && (xc ||
|
|
40939
|
+
this.shouldExport = t === 0, this.shouldExport && this.component.trackedImages?.length > 1 && (xc || L()) && (_e("USDZ: Only one tracked image is supported."), console.warn("USDZ: Only one tracked image is supported. Will choose the first one in the trackedImages list"));
|
|
40919
40940
|
}
|
|
40920
40941
|
onAfterHierarchy(e, t) {
|
|
40921
40942
|
if (!this.shouldExport) return;
|
|
@@ -41085,7 +41106,7 @@ class wf extends E {
|
|
|
41085
41106
|
for (const a of this.currentImages)
|
|
41086
41107
|
if (a.model === n) {
|
|
41087
41108
|
const l = Date.now() - o.lastTrackingTime;
|
|
41088
|
-
if (xc &&
|
|
41109
|
+
if (xc && Ae(n.image + ", State: " + a.state + (n.imageDoesNotMove ? " (static)" : "") + (l <= i ? " (hysteresis)" : "")), n.imageDoesNotMove || a.state === "tracked" || l <= i) {
|
|
41089
41110
|
r = !0;
|
|
41090
41111
|
break;
|
|
41091
41112
|
}
|
|
@@ -41274,17 +41295,17 @@ class qo extends E {
|
|
|
41274
41295
|
} else {
|
|
41275
41296
|
if (!this.dataTemplate) {
|
|
41276
41297
|
const f = new H();
|
|
41277
|
-
nr ? f.material = new
|
|
41298
|
+
nr ? f.material = new oC() : this.occluder ? (f.material = new we(), this.makeOccluder(f, f.material, !0)) : f.material = new we({ wireframe: !0, opacity: 0.5, transparent: !0, color: 3355443 }), this.dataTemplate = new ne("", "", f);
|
|
41278
41299
|
}
|
|
41279
41300
|
if (!this.dataTemplate.asset)
|
|
41280
41301
|
this.dataTemplate.loadAssetAsync();
|
|
41281
41302
|
else {
|
|
41282
41303
|
const f = C.instantiate(this.dataTemplate.asset);
|
|
41283
41304
|
if (f.name = "xr-tracked-plane", d = f, B0(f, !1), f instanceof H)
|
|
41284
|
-
|
|
41305
|
+
Te(f.geometry), f.geometry = this.createGeometry(l), this.makeOccluder(f, f.material, this.occluder && !this.dataTemplate);
|
|
41285
41306
|
else if (f instanceof Os)
|
|
41286
41307
|
for (const _ of f.children)
|
|
41287
|
-
_ instanceof H && (
|
|
41308
|
+
_ instanceof H && (Te(_.geometry), _.geometry = this.createGeometry(l), this.makeOccluder(_, _.material, this.occluder && !this.dataTemplate));
|
|
41288
41309
|
const p = f.getComponent(zr);
|
|
41289
41310
|
if (p) {
|
|
41290
41311
|
const _ = f;
|
|
@@ -41317,7 +41338,7 @@ class qo extends E {
|
|
|
41317
41338
|
if (f.userData.normalsHelper)
|
|
41318
41339
|
f.userData.normalsHelper.update();
|
|
41319
41340
|
else {
|
|
41320
|
-
const p = new
|
|
41341
|
+
const p = new MC(f, 0.05, 255);
|
|
41321
41342
|
p.layers.disableAll(), p.layers.set(2), this.context.scene.add(p), f.userData.normalsHelper = p;
|
|
41322
41343
|
}
|
|
41323
41344
|
}));
|
|
@@ -41693,7 +41714,7 @@ async function $m(s, e, t, i, n) {
|
|
|
41693
41714
|
await $m(s, r, t, i, n + 1);
|
|
41694
41715
|
if (zl.length > 0 && n === 0) {
|
|
41695
41716
|
const r = zl.join(", ");
|
|
41696
|
-
console.warn(`Unknown components in scene: ${r}`), zl.length = 0, Qi() &&
|
|
41717
|
+
console.warn(`Unknown components in scene: ${r}`), zl.length = 0, Qi() && Ae(`<strong>Unknown components in scene</strong>:
|
|
41697
41718
|
|
|
41698
41719
|
${r}
|
|
41699
41720
|
|
|
@@ -41869,7 +41890,7 @@ function fL(s) {
|
|
|
41869
41890
|
if (new URL(s, window.location.href).href.startsWith("file://")) {
|
|
41870
41891
|
const t = `Hi - it looks like you are trying to load a local file which will not work. You need to use a webserver to serve your files.
|
|
41871
41892
|
Please refer to the documentation on <a href="https://fwd.needle.tools/needle-engine/docs/local-server">https://docs.needle.tools</a> or ask for help in our <a href="https://discord.needle.tools">discord community</a>`;
|
|
41872
|
-
|
|
41893
|
+
Ae(t), console.warn(t);
|
|
41873
41894
|
}
|
|
41874
41895
|
}
|
|
41875
41896
|
function pL(s, e) {
|
|
@@ -41943,7 +41964,7 @@ class gL {
|
|
|
41943
41964
|
}
|
|
41944
41965
|
ensureQuitARButton(e) {
|
|
41945
41966
|
const t = document.createElement("slot");
|
|
41946
|
-
t.style.display = "contents", t.setAttribute("name", "quit-ar"), this.appendElement(t, e), this._createdAROnlyElements.push(t), t.style.pointerEvents = "auto", D.isNeedleAppClip() && (t.style.display = "none");
|
|
41967
|
+
t.style.display = "contents", t.style.padding = "10px", t.setAttribute("name", "quit-ar"), this.appendElement(t, e), this._createdAROnlyElements.push(t), t.style.pointerEvents = "auto", D.isNeedleAppClip() && (t.style.display = "none");
|
|
41947
41968
|
const i = document.querySelector(`.${mL}`);
|
|
41948
41969
|
if (i) {
|
|
41949
41970
|
i.addEventListener("click", this.requestEndAR), Nl && i.addEventListener("click", () => console.log("Clicked quit-ar button"));
|
|
@@ -42459,7 +42480,7 @@ changed from "`, t, '" to "', i, '"'), this.onLoad();
|
|
|
42459
42480
|
const m = this.getAttribute("hide-loading-overlay");
|
|
42460
42481
|
m != null && m !== "0" && (o = !1);
|
|
42461
42482
|
}
|
|
42462
|
-
o === !1 && !n && (
|
|
42483
|
+
o === !1 && !n && (L() || (o = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), L() && _e('You need a <a target="_blank" href="https://needle.tools/pricing">commercial license</a> to override the default loading view. This will not work in production.')), !this._loadingView && o && (this._loadingView = new ru(this)), o && (this._didFullyLoad !== !0 ? this._loadingView?.onLoadingBegin("begin load") : setTimeout(() => {
|
|
42463
42484
|
this._loadingView && this._loadingProgress01 < 0.3 && this._loadId === t && this._loadingView.onLoadingBegin("begin load");
|
|
42464
42485
|
}, 300)), Oe && console.warn(`--------------
|
|
42465
42486
|
Needle Engine: Begin loading ` + t + `
|
|
@@ -42713,9 +42734,9 @@ function bL(s) {
|
|
|
42713
42734
|
let f = t[d];
|
|
42714
42735
|
(f === "_" || f === "-") && (f = " "), !(f === " " && l.length <= 0 || h.includes(f) || (l.length === 0 && (f = f.toUpperCase()), c && f === " ")) && (c && (f = f.toUpperCase()), c = !1, l += f, f === " " && (c = !0));
|
|
42715
42736
|
}
|
|
42716
|
-
return
|
|
42737
|
+
return L() && t !== l && console.debug('Generated display name: "' + t + '" → "' + l + '"'), l.trim();
|
|
42717
42738
|
}
|
|
42718
|
-
return
|
|
42739
|
+
return L() && console.debug("Loading: use default name", t), t;
|
|
42719
42740
|
}
|
|
42720
42741
|
function vL(s) {
|
|
42721
42742
|
Cg((e) => {
|
|
@@ -42766,7 +42787,7 @@ const wL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42766
42787
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
42767
42788
|
function xL() {
|
|
42768
42789
|
Zn.registerWaitForInteraction(() => {
|
|
42769
|
-
const s =
|
|
42790
|
+
const s = rC.getContext();
|
|
42770
42791
|
s.addEventListener("statechange", () => {
|
|
42771
42792
|
setTimeout(() => {
|
|
42772
42793
|
const e = s.state;
|
|
@@ -42802,7 +42823,7 @@ class Oc {
|
|
|
42802
42823
|
this.world?.removeCollider(o, !0);
|
|
42803
42824
|
const r = o.parent();
|
|
42804
42825
|
r && r.numColliders() <= 0 && (r[ri] || this.world?.removeRigidBody(r));
|
|
42805
|
-
} else n instanceof T.RAPIER_PHYSICS.MODULE.RigidBody && (n.numColliders() <= 0 ? this.world?.removeRigidBody(n) :
|
|
42826
|
+
} else n instanceof T.RAPIER_PHYSICS.MODULE.RigidBody && (n.numColliders() <= 0 ? this.world?.removeRigidBody(n) : L() && (n.did_log_removing || setTimeout(() => {
|
|
42806
42827
|
n.numColliders() > 0 && (n.did_log_removing = !0, console.warn("RapierPhysics: removing rigidbody with colliders from the physics world is not possible right now, please remove the colliders first"));
|
|
42807
42828
|
}, 1)));
|
|
42808
42829
|
}
|
|
@@ -43072,7 +43093,7 @@ class Oc {
|
|
|
43072
43093
|
Ne && console.warn("Missing mesh geometry", t.name);
|
|
43073
43094
|
return;
|
|
43074
43095
|
}
|
|
43075
|
-
o.index?.array?.length || (console.warn(`Your MeshCollider is missing vertices or indices in the assined mesh "${t.name}". Consider providing an indexed geometry.`), o =
|
|
43096
|
+
o.index?.array?.length || (console.warn(`Your MeshCollider is missing vertices or indices in the assined mesh "${t.name}". Consider providing an indexed geometry.`), o = RC(o));
|
|
43076
43097
|
let r = null;
|
|
43077
43098
|
const a = o.getAttribute("position");
|
|
43078
43099
|
if (a instanceof r0) {
|
|
@@ -43095,7 +43116,7 @@ class Oc {
|
|
|
43095
43116
|
if (this._meshCache.has(d))
|
|
43096
43117
|
Ne && console.warn("Use cached mesh collider"), r = this._meshCache.get(d);
|
|
43097
43118
|
else {
|
|
43098
|
-
(Ne ||
|
|
43119
|
+
(Ne || L()) && console.debug(`[Performance] Your MeshCollider "${e.name}" is scaled: consider applying the scale to the collider mesh instead (${c.x}, ${c.y}, ${c.z})`);
|
|
43099
43120
|
const f = new Float32Array(r.length);
|
|
43100
43121
|
for (let p = 0; p < r.length; p += 3)
|
|
43101
43122
|
f[p] = r[p] * c.x, f[p + 1] = r[p + 1] * c.y, f[p + 2] = r[p + 2] * c.z;
|
|
@@ -43337,7 +43358,7 @@ Error:`, r), null;
|
|
|
43337
43358
|
}
|
|
43338
43359
|
const o = i.translation(), r = i.rotation();
|
|
43339
43360
|
if (Number.isNaN(o.x) || Number.isNaN(r.x)) {
|
|
43340
|
-
!n.__COLLIDER_NAN &&
|
|
43361
|
+
!n.__COLLIDER_NAN && L() && (console.warn("Collider has NaN values", n.name, n.gameObject, i), n.__COLLIDER_NAN = !0);
|
|
43341
43362
|
continue;
|
|
43342
43363
|
}
|
|
43343
43364
|
const a = t.center;
|
|
@@ -43676,7 +43697,7 @@ function kL(s, e, t) {
|
|
|
43676
43697
|
const i = new Set(t);
|
|
43677
43698
|
return Array.from(i);
|
|
43678
43699
|
}
|
|
43679
|
-
const Zb = "needle-button", Bp =
|
|
43700
|
+
const Zb = "needle-button", Bp = L();
|
|
43680
43701
|
class ML extends HTMLElement {
|
|
43681
43702
|
static observedAttributes = ["ar", "vr", "quicklook", "qrcode"];
|
|
43682
43703
|
constructor() {
|
|
@@ -44155,7 +44176,7 @@ pe.registerCallback(ue.MissingCamera, (s) => {
|
|
|
44155
44176
|
typeof window !== void 0 && window.matchMedia("(prefers-color-scheme: dark)").matches && (a = "#1f1f1f"), e.background = new re(a);
|
|
44156
44177
|
}
|
|
44157
44178
|
if (!e.environment) {
|
|
44158
|
-
const a = new
|
|
44179
|
+
const a = new aC(s.context.renderer), l = new Oy("neutral");
|
|
44159
44180
|
e.environment = a.fromScene(l, 0.025).texture;
|
|
44160
44181
|
}
|
|
44161
44182
|
}
|
|
@@ -44168,7 +44189,7 @@ pe.registerCallback(ue.ContextCreated, (s) => {
|
|
|
44168
44189
|
return;
|
|
44169
44190
|
}
|
|
44170
44191
|
if (s.context.domElement?.cameraControls == !0) {
|
|
44171
|
-
if (
|
|
44192
|
+
if (u1(s.context.mainCamera)?.isCameraController == !0) {
|
|
44172
44193
|
$c && console.log("Will not auto-fit because a camera controller exists");
|
|
44173
44194
|
return;
|
|
44174
44195
|
}
|
|
@@ -44218,7 +44239,7 @@ var Jb;
|
|
|
44218
44239
|
}
|
|
44219
44240
|
s.createFromPoints = e;
|
|
44220
44241
|
})(Jb || (Jb = {}));
|
|
44221
|
-
class AL extends
|
|
44242
|
+
class AL extends UC {
|
|
44222
44243
|
constructor() {
|
|
44223
44244
|
super(/* new-worker */ new Worker(URL.createObjectURL(new Blob(["import '" + `${new URL('./generateMeshBVH.worker-iyfPIK6R.js', import.meta.url).toString()}` + "';"], { type: 'text/javascript' })), { type: "module" })), this.name = "GenerateMeshBVHWorker";
|
|
44224
44245
|
}
|
|
@@ -44233,7 +44254,7 @@ class AL extends U1 {
|
|
|
44233
44254
|
if (h.error)
|
|
44234
44255
|
o(new Error(h.error)), e.onmessage = null;
|
|
44235
44256
|
else if (h.serialized) {
|
|
44236
|
-
const { serialized: d, position: f } = h, p =
|
|
44257
|
+
const { serialized: d, position: f } = h, p = zC.deserialize(d, t, { setIndex: !1 }), m = Object.assign({
|
|
44237
44258
|
setBoundingBox: !0
|
|
44238
44259
|
}, i);
|
|
44239
44260
|
if (t.attributes.position.array = f, d.index)
|
|
@@ -44351,7 +44372,7 @@ export {
|
|
|
44351
44372
|
xy as ControlTrackHandler,
|
|
44352
44373
|
wl as CursorFollow,
|
|
44353
44374
|
cl as CustomBranding,
|
|
44354
|
-
|
|
44375
|
+
Ee as CustomShader,
|
|
44355
44376
|
hm as DefaultReflectionMode,
|
|
44356
44377
|
iw as Deletable,
|
|
44357
44378
|
vr as DeleteBox,
|
|
@@ -44652,7 +44673,7 @@ export {
|
|
|
44652
44673
|
N2 as colorSerializer,
|
|
44653
44674
|
PO as compareAssociation,
|
|
44654
44675
|
Kf as componentSerializer,
|
|
44655
|
-
|
|
44676
|
+
R1 as copyTexture,
|
|
44656
44677
|
Zk as createMotion,
|
|
44657
44678
|
yi as debugNet,
|
|
44658
44679
|
Mh as debugOwner,
|
|
@@ -44664,7 +44685,7 @@ export {
|
|
|
44664
44685
|
Ki as destroy,
|
|
44665
44686
|
HO as destroyComponentInstance,
|
|
44666
44687
|
mR as determineMimeTypeFromExtension,
|
|
44667
|
-
|
|
44688
|
+
Te as disposeObjectResources,
|
|
44668
44689
|
Cs as disposeStream,
|
|
44669
44690
|
rd as editorGuidKeyName,
|
|
44670
44691
|
lc as enableSpatialConsole,
|
|
@@ -44676,14 +44697,14 @@ export {
|
|
|
44676
44697
|
GO as findObjectsOfType,
|
|
44677
44698
|
av as findResourceUsers,
|
|
44678
44699
|
aM as fitCamera,
|
|
44679
|
-
|
|
44700
|
+
I1 as fitObjectIntoVolume,
|
|
44680
44701
|
Ha as foreachComponent,
|
|
44681
44702
|
vg as foreachComponentEnumerator,
|
|
44682
44703
|
l2 as forward,
|
|
44683
44704
|
Ok as generateQRCode,
|
|
44684
44705
|
gO as generateSeed,
|
|
44685
44706
|
di as getBoundingBox,
|
|
44686
|
-
|
|
44707
|
+
u1 as getCameraController,
|
|
44687
44708
|
Za as getComponent,
|
|
44688
44709
|
Pu as getComponentInChildren,
|
|
44689
44710
|
Ud as getComponentInParent,
|
|
@@ -44701,12 +44722,12 @@ export {
|
|
|
44701
44722
|
g2 as getPeerOptions,
|
|
44702
44723
|
CP as getPeerjsInstance,
|
|
44703
44724
|
C2 as getResourceUserCount,
|
|
44704
|
-
|
|
44725
|
+
b1 as getTempColor,
|
|
44705
44726
|
bi as getTempQuaternion,
|
|
44706
44727
|
z as getTempVector,
|
|
44707
44728
|
mu as getUrlParams,
|
|
44708
|
-
|
|
44709
|
-
|
|
44729
|
+
A1 as getVisibleInCustomShadowRendering,
|
|
44730
|
+
P1 as getWorldDirection,
|
|
44710
44731
|
D0 as getWorldEuler,
|
|
44711
44732
|
te as getWorldPosition,
|
|
44712
44733
|
ve as getWorldQuaternion,
|
|
@@ -44716,7 +44737,7 @@ export {
|
|
|
44716
44737
|
ku as hasIndieLicense,
|
|
44717
44738
|
_m as hasPointerEventComponent,
|
|
44718
44739
|
ks as hasProLicense,
|
|
44719
|
-
|
|
44740
|
+
N1 as hideDebugConsole,
|
|
44720
44741
|
uE as imageToCanvas,
|
|
44721
44742
|
Pr as instantiate,
|
|
44722
44743
|
LR as invokeLoadedImportPluginHooks,
|
|
@@ -44725,16 +44746,16 @@ export {
|
|
|
44725
44746
|
YO as isActiveInHierarchy,
|
|
44726
44747
|
qc as isActiveSelf,
|
|
44727
44748
|
YL as isAndroidDevice,
|
|
44728
|
-
|
|
44749
|
+
M1 as isAnimationAction,
|
|
44729
44750
|
zM as isComponent,
|
|
44730
44751
|
NL as isDebugMode,
|
|
44731
44752
|
GL as isDesktop,
|
|
44732
44753
|
Va as isDestroyed,
|
|
44733
|
-
|
|
44754
|
+
L as isDevEnvironment,
|
|
44734
44755
|
x2 as isDisposed,
|
|
44735
44756
|
nD as isExporting,
|
|
44736
44757
|
UM as isGLTFModel,
|
|
44737
|
-
|
|
44758
|
+
VC as isHostedOnGlitch,
|
|
44738
44759
|
Q_ as isHotReloadEnabled,
|
|
44739
44760
|
L2 as isHotReloading,
|
|
44740
44761
|
XL as isIPad,
|
|
@@ -44757,12 +44778,12 @@ export {
|
|
|
44757
44778
|
_u as lookAtObject,
|
|
44758
44779
|
a2 as lookAtScreenPoint,
|
|
44759
44780
|
WL as makeId,
|
|
44760
|
-
|
|
44781
|
+
qC as makeIdFromRandomWords,
|
|
44761
44782
|
en as makeNameSafe,
|
|
44762
44783
|
KO as markAsInstancedRendered,
|
|
44763
44784
|
i2 as microphonePermissionsGranted,
|
|
44764
44785
|
zL as nameof,
|
|
44765
|
-
|
|
44786
|
+
HC as nameofFactory,
|
|
44766
44787
|
yM as objectSerializer,
|
|
44767
44788
|
p2 as offXRSessionEnd,
|
|
44768
44789
|
f2 as offXRSessionStart,
|
|
@@ -44776,10 +44797,10 @@ export {
|
|
|
44776
44797
|
Y0 as onXRSessionEnd,
|
|
44777
44798
|
lg as onXRSessionStart,
|
|
44778
44799
|
dL as parseSync,
|
|
44779
|
-
|
|
44800
|
+
L1 as placeOnSurface,
|
|
44780
44801
|
F0 as postprocessFBXMaterials,
|
|
44781
44802
|
z2 as prefix,
|
|
44782
|
-
|
|
44803
|
+
GC as pushState,
|
|
44783
44804
|
VL as randomNumber,
|
|
44784
44805
|
ev as registerBinaryType,
|
|
44785
44806
|
Sg as registerComponent,
|
|
@@ -44792,13 +44813,13 @@ export {
|
|
|
44792
44813
|
bO as registerPrefabProvider,
|
|
44793
44814
|
zO as registerPrototypeExtensions,
|
|
44794
44815
|
yv as registerType,
|
|
44795
|
-
|
|
44816
|
+
QC as relativePathPrefix,
|
|
44796
44817
|
O0 as removeAttributeChangeCallback,
|
|
44797
44818
|
Sv as removeComponent,
|
|
44798
44819
|
q2 as removeCustomImportExtensionType,
|
|
44799
44820
|
u2 as removePatch,
|
|
44800
44821
|
Lr as resolveUrl,
|
|
44801
|
-
|
|
44822
|
+
XC as sanitizeString,
|
|
44802
44823
|
QI as saveImage,
|
|
44803
44824
|
J2 as screenshot,
|
|
44804
44825
|
Lx as screenshot2,
|
|
@@ -44807,7 +44828,7 @@ export {
|
|
|
44807
44828
|
TO as serializeObject,
|
|
44808
44829
|
Je as serializeable,
|
|
44809
44830
|
dd as setActive,
|
|
44810
|
-
|
|
44831
|
+
n1 as setAllowBalloonMessages,
|
|
44811
44832
|
n2 as setAllowOverlayMessages,
|
|
44812
44833
|
Hp as setAutoFitEnabled,
|
|
44813
44834
|
Yy as setCameraController,
|
|
@@ -44827,11 +44848,11 @@ export {
|
|
|
44827
44848
|
Fa as setWorldPositionXYZ,
|
|
44828
44849
|
Yn as setWorldQuaternion,
|
|
44829
44850
|
L0 as setWorldQuaternionXYZW,
|
|
44830
|
-
|
|
44851
|
+
k1 as setWorldRotation,
|
|
44831
44852
|
bu as setWorldRotationXYZ,
|
|
44832
44853
|
Mc as setWorldScale,
|
|
44833
44854
|
vu as showBalloonError,
|
|
44834
|
-
|
|
44855
|
+
Ae as showBalloonMessage,
|
|
44835
44856
|
_e as showBalloonWarning,
|
|
44836
44857
|
N0 as showDebugConsole,
|
|
44837
44858
|
o2 as slerp,
|
|
@@ -44839,7 +44860,7 @@ export {
|
|
|
44839
44860
|
Dw as syncField,
|
|
44840
44861
|
pv as syncInstantiate,
|
|
44841
44862
|
h2 as textureToCanvas,
|
|
44842
|
-
|
|
44863
|
+
YC as toSourceId,
|
|
44843
44864
|
xP as tryCastBinary,
|
|
44844
44865
|
yR as tryDetermineMimetypeFromBinary,
|
|
44845
44866
|
gR as tryDetermineMimetypeFromURL,
|
|
@@ -44847,7 +44868,7 @@ export {
|
|
|
44847
44868
|
SP as tryGetGuid,
|
|
44848
44869
|
Vk as unregisterHotReloadType,
|
|
44849
44870
|
C0 as unwatchWrite,
|
|
44850
|
-
|
|
44871
|
+
f1 as useForAutoFit,
|
|
44851
44872
|
Nt as validate,
|
|
44852
44873
|
ig as watchWrite
|
|
44853
44874
|
};
|