@needle-tools/engine 4.11.5-next.753a642 → 4.11.5-next.ca8b86d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{needle-engine.bundle-DVXwSz-d.js → needle-engine.bundle-9X7aq_Lu.js} +609 -609
- package/dist/{needle-engine.bundle-CAKvhOvZ.min.js → needle-engine.bundle-DAt-oKnG.min.js} +61 -61
- package/dist/{needle-engine.bundle-OrbPGV3t.umd.cjs → needle-engine.bundle-DsQVlU6y.umd.cjs} +57 -57
- package/dist/needle-engine.d.ts +15 -15
- 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/engine_loaders.d.ts +0 -6
- package/lib/engine/engine_loaders.js +5 -5
- package/lib/engine/engine_loaders.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_lightmaps.js +2 -2
- package/lib/engine/extensions/NEEDLE_lightmaps.js.map +1 -1
- package/lib/engine/extensions/extensions.d.ts +2 -2
- package/lib/engine/extensions/extensions.js +11 -5
- package/lib/engine/extensions/extensions.js.map +1 -1
- package/lib/engine-components/webxr/controllers/XRControllerModel.js +1 -1
- package/lib/engine-components/webxr/controllers/XRControllerModel.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/engine_loaders.ts +6 -6
- package/src/engine/extensions/NEEDLE_lightmaps.ts +2 -2
- package/src/engine/extensions/extensions.ts +11 -5
- package/src/engine-components/webxr/controllers/XRControllerModel.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Vector2 as J, Vector3 as y, Vector4 as fe, Quaternion as $, PlaneGeometry as Yn, WebGLRenderer as Pr, PerspectiveCamera as le, OrthographicCamera as eu, Scene as Ci, Mesh as G, Texture as Ee, Uniform$1 as Hi, Color as se, ShaderMaterial as Wn, Box3 as wi, ShadowMaterial as Vb, Euler as at, MeshStandardMaterial as ft, Box3Helper as Ax, GridHelper as Dm, Object3D as k, Material as _e, Matrix3 as Hb, Matrix4 as Z, Layers as yo, Ray as ks, MathUtils as xs, AxesHelper as xi, MeshBasicMaterial as we, DoubleSide as Pi, BufferGeometry as un, Group as Ss, CylinderGeometry as Gb, SphereGeometry as tu, BoxGeometry as
|
|
1
|
+
import { Vector2 as J, Vector3 as y, Vector4 as fe, Quaternion as $, PlaneGeometry as Yn, WebGLRenderer as Pr, PerspectiveCamera as le, OrthographicCamera as eu, Scene as Ci, Mesh as G, Texture as Ee, Uniform$1 as Hi, Color as se, ShaderMaterial as Wn, Box3 as wi, ShadowMaterial as Vb, Euler as at, MeshStandardMaterial as ft, Box3Helper as Ax, GridHelper as Dm, Object3D as k, Material as _e, Matrix3 as Hb, Matrix4 as Z, Layers as yo, Ray as ks, MathUtils as xs, AxesHelper as xi, MeshBasicMaterial as we, DoubleSide as Pi, BufferGeometry as un, Group as Ss, CylinderGeometry as Gb, SphereGeometry as tu, BoxGeometry as Sa, SpriteMaterial as Ix, Sprite as Lx, Shape as Dx, ExtrudeGeometry as jx, Fog as qb, DirectionalLight as Ep, PointLight as jm, EdgesGeometry as Bx, LineSegments as Xb, LineBasicMaterial as Bm, Line as Ca, BufferAttribute as pt, Raycaster as iu, Sphere as nu, ArrayCamera as Fx, Plane as mr, SkinnedMesh as uo, InterleavedBufferAttribute as Qb, Skeleton as zx, Bone as Ux, WebGLCubeRenderTarget as Nx, CubeCamera as $x, AnimationClip as Si, FileLoader as Fm, TextureLoader as vc, PropertyBinding as Pa, KeyframeTrack as Wx, LinearSRGBColorSpace as Ms, ShaderChunk as Gt, UniformsLib as Vx, DataTexture as zm, RGBAFormat as su, EquirectangularReflectionMapping as Cs, SRGBColorSpace as Rs, Clock as Hx, NeutralToneMapping as Oa, AgXToneMapping as ou, ACESFilmicToneMapping as ru, NoToneMapping as md, PCFSoftShadowMap$1 as Gx, BasicNodeLibrary as qx, WebGLRenderTarget as Vn, DepthTexture as Yb, NearestFilter as gd, LoopRepeat as Xx, LoopOnce as Ap, AnimationMixer as Um, CompressedTexture as Qx, FrontSide as _o, Camera as Yx, Frustum as Cy, AudioListener as Kx, PositionalAudio as Zx, AudioLoader as Ip, EventDispatcher as Nm, BackSide as au, MeshDepthMaterial as Jx, CustomBlending as eS, MaxEquation as tS, AlwaysStencilFunc as iS, GreaterEqualStencilFunc as nS, NotEqualStencilFunc as sS, GreaterStencilFunc as oS, LessEqualStencilFunc as rS, EqualStencilFunc as aS, LessStencilFunc as lS, NeverStencilFunc as Py, InvertStencilOp as cS, DecrementWrapStencilOp as hS, IncrementWrapStencilOp as dS, DecrementStencilOp as uS, IncrementStencilOp as fS, ReplaceStencilOp as pS, ZeroStencilOp as mS, KeepStencilOp as gS, AmbientLight as yS, HemisphereLight as _S, RawShaderMaterial as Kb, GLSL3 as bS, AlwaysDepth as vS, GreaterEqualDepth as wS, GreaterDepth as xS, LessEqualDepth as SS, LessDepth as CS, NotEqualDepth as PS, EqualDepth as OS, BatchedMesh as Oy, MeshPhysicalMaterial as Lp, LinearFilter as yd, UnsignedByteType as kS, RingGeometry as MS, Line3 as RS, AdditiveBlending as Zb, BoxHelper as TS, SpotLight as ES, DirectionalLightHelper as AS, CameraHelper as IS, LOD as LS, Triangle as DS, NormalBlending as jS, ReinhardToneMapping as $m, LinearToneMapping as Wm, HalfFloatType as gf, VideoTexture as BS, CubeUVReflectionMapping as Jb, CubeTexture as FS, CompressedCubeTexture as zS, EquirectangularRefractionMapping as US, CatmullRomCurve3 as NS, VectorKeyframeTrack as $S, QuaternionKeyframeTrack as WS, Audio as VS, ShaderLib as _d, UniformsUtils as e0, MirroredRepeatWrapping as ky, MeshNormalMaterial as HS, AudioContext as GS, PMREMGenerator$1 as qS } from "./three-MHVqtJYj.js";
|
|
2
2
|
import { createLoaders as Vm, getRaycastMesh as t0, LODsManager as Wo, NEEDLE_progressive as Ve, addDracoAndKTX2Loaders as XS, configureLoader as QS, setKTX2TranscoderLocation as YS, setDracoDecoderLocation as KS } from "./gltf-progressive-BvlZQAkt.js";
|
|
3
|
-
import { GroundedSkybox as
|
|
3
|
+
import { GroundedSkybox as ka, Font as ZS, TextGeometry as JS, FontLoader as e1, GLTFLoader as Ts, TransformControlsGizmo as i0, EXRLoader as Hm, RGBELoader as n0, Stats as t1, nodeFrame as My, OrbitControls as s0, PositionalAudioHelper as i1, HorizontalBlurShader as n1, VerticalBlurShader as s1, GLTFExporter as o0, strToU8 as r0, zipSync as o1, XRControllerModelFactory as r1, XRHandMeshModel as a1, Line2 as l1, LineGeometry as c1, LineMaterial as h1, TransformControls as d1, InteractiveGroup as u1, HTMLMesh as f1, VertexNormalsHelper as p1, OBJLoader as Gm, FBXLoader as a0, mergeVertices as m1 } from "./three-examples-C5Ht-QFN.js";
|
|
4
4
|
import { fetchProfile as g1, MotionController as y1, $70d766613f57b014$export$2e2bcd8739ae039 as Ry, ByteBuffer as _1, v5 as Ty, md5 as Ey, SIZE_PREFIX_LENGTH as l0, Builder as qm, createNoise4D as b1, Matrix4 as yf, BatchedParticleRenderer as v1, ParticleSystem as w1, RenderMode as fs, ConstantColor as x1, Vector4 as S1, ConstantValue as C1, TrailParticle as Ay, WorkerBase as P1, MeshBVH as O1 } from "./vendor-petGQl0N.js";
|
|
5
5
|
import { __webpack_exports__default as Ce, __webpack_exports__Text as c0, __webpack_exports__Block as h0, __webpack_exports__update as k1, SimpleStateBehavior as M1, __webpack_exports__Inline as _f, __webpack_exports__FontLibrary as Iy, ThreeMeshUI as Ly } from "./three-mesh-ui-BjWTTk1R.js";
|
|
6
6
|
import { EffectAttribute as R1 } from "./postprocessing-CJC0Npcd.js";
|
|
@@ -324,22 +324,22 @@ class fo {
|
|
|
324
324
|
this._watches.length = 0;
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
const
|
|
327
|
+
const Yr = Symbol("needle:watches");
|
|
328
328
|
function Xm(s, e) {
|
|
329
|
-
if (!s[
|
|
329
|
+
if (!s[Yr])
|
|
330
330
|
if (s instanceof J)
|
|
331
|
-
s[
|
|
331
|
+
s[Yr] = new fo(s, ["x", "y"]);
|
|
332
332
|
else if (s instanceof y)
|
|
333
|
-
s[
|
|
333
|
+
s[Yr] = new fo(s, ["x", "y", "z"]);
|
|
334
334
|
else if (s instanceof fe || s instanceof $)
|
|
335
|
-
s[
|
|
335
|
+
s[Yr] = new fo(s, ["x", "y", "z", "w"]);
|
|
336
336
|
else
|
|
337
337
|
return !1;
|
|
338
|
-
return s[
|
|
338
|
+
return s[Yr].subscribeWrite(e), !0;
|
|
339
339
|
}
|
|
340
340
|
function u0(s, e) {
|
|
341
341
|
if (!s) return;
|
|
342
|
-
const t = s[
|
|
342
|
+
const t = s[Yr];
|
|
343
343
|
t && t.unsubscribeWrite(e);
|
|
344
344
|
}
|
|
345
345
|
var q;
|
|
@@ -966,7 +966,7 @@ function kt(s, e) {
|
|
|
966
966
|
const t = Ym.get();
|
|
967
967
|
return e !== t && t.copy(e), (s?.parent ?? s).worldToLocal(t), s.position.set(t.x, t.y, t.z), s;
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function Ma(s, e, t, i) {
|
|
970
970
|
const n = Ym.get();
|
|
971
971
|
return n.set(e, t, i), kt(s, n), s;
|
|
972
972
|
}
|
|
@@ -1188,7 +1188,7 @@ function oi(s, e = void 0, t = void 0, i = void 0) {
|
|
|
1188
1188
|
function r(l) {
|
|
1189
1189
|
let c = !0;
|
|
1190
1190
|
if (l.visible && J1(l) !== !1 && !(l.type === "TransformControlsGizmo" || l.type === "TransformControlsPlane")) {
|
|
1191
|
-
if (l instanceof Ax && (c = !1), l instanceof Dm && (c = !1), l instanceof
|
|
1191
|
+
if (l instanceof Ax && (c = !1), l instanceof Dm && (c = !1), l instanceof ka && (c = !1), l.isGizmo === !0 && (c = !1), l.material instanceof Vb && (c = !1), yC(l) || (c = !1), t && l.layers.test(t) === !1 && (c = !1), c) {
|
|
1192
1192
|
if (e && Array.isArray(e) && e?.includes(l)) return;
|
|
1193
1193
|
if (typeof e == "function" && e(l) === !0)
|
|
1194
1194
|
return;
|
|
@@ -1267,9 +1267,9 @@ function O0(s, e, t, i) {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
let mh = !1;
|
|
1269
1269
|
U1((...s) => {
|
|
1270
|
-
L() && ue.Current?.isInXR && (
|
|
1270
|
+
L() && ue.Current?.isInXR && (da(!0), k0("error", ...s));
|
|
1271
1271
|
});
|
|
1272
|
-
function
|
|
1272
|
+
function da(s) {
|
|
1273
1273
|
if (s) {
|
|
1274
1274
|
if (mh) return;
|
|
1275
1275
|
mh = !0, xC();
|
|
@@ -1426,10 +1426,10 @@ function SC() {
|
|
|
1426
1426
|
for (const s in ic)
|
|
1427
1427
|
console[s] = ic[s];
|
|
1428
1428
|
}
|
|
1429
|
-
const
|
|
1429
|
+
const bl = /* @__PURE__ */ new Map();
|
|
1430
1430
|
function k0(s, ...e) {
|
|
1431
1431
|
try {
|
|
1432
|
-
switch (
|
|
1432
|
+
switch (bl.clear(), s) {
|
|
1433
1433
|
case "log":
|
|
1434
1434
|
ar?.addLog("log", t());
|
|
1435
1435
|
break;
|
|
@@ -1443,7 +1443,7 @@ function k0(s, ...e) {
|
|
|
1443
1443
|
} catch (o) {
|
|
1444
1444
|
console.error("Error in spatial console", o);
|
|
1445
1445
|
} finally {
|
|
1446
|
-
|
|
1446
|
+
bl.clear();
|
|
1447
1447
|
}
|
|
1448
1448
|
function t() {
|
|
1449
1449
|
let o = "";
|
|
@@ -1488,7 +1488,7 @@ function k0(s, ...e) {
|
|
|
1488
1488
|
if (o instanceof Z) return `[${o.elements.join(", ")}]`;
|
|
1489
1489
|
if (o instanceof yo) return o.mask.toString();
|
|
1490
1490
|
if (typeof o == "object") {
|
|
1491
|
-
if (
|
|
1491
|
+
if (bl.has(o)) return "*";
|
|
1492
1492
|
let a = `{
|
|
1493
1493
|
`;
|
|
1494
1494
|
a += n(r);
|
|
@@ -1496,11 +1496,11 @@ function k0(s, ...e) {
|
|
|
1496
1496
|
let c = "";
|
|
1497
1497
|
for (let h = 0; h < l.length; h++) {
|
|
1498
1498
|
const d = l[h], f = o[d];
|
|
1499
|
-
if (
|
|
1499
|
+
if (bl.has(f)) {
|
|
1500
1500
|
c += "";
|
|
1501
1501
|
continue;
|
|
1502
1502
|
}
|
|
1503
|
-
|
|
1503
|
+
bl.set(f, !0), c += d + ":" + i(f, r + 1), h < l.length - 1 && (c += ", "), c.length >= 60 && (c += `
|
|
1504
1504
|
`, c += n(r), a += c, c = "");
|
|
1505
1505
|
}
|
|
1506
1506
|
return a += c, a += `
|
|
@@ -1536,7 +1536,7 @@ function L() {
|
|
|
1536
1536
|
function IL(s) {
|
|
1537
1537
|
Up = s;
|
|
1538
1538
|
}
|
|
1539
|
-
let Wi, Vo = null, Ln = null,
|
|
1539
|
+
let Wi, Vo = null, Ln = null, vl = !1, Xy = null;
|
|
1540
1540
|
const M0 = "terminal", PC = x("console");
|
|
1541
1541
|
PC && R0();
|
|
1542
1542
|
const OC = Symbol("consoleParent");
|
|
@@ -1565,15 +1565,15 @@ function EC() {
|
|
|
1565
1565
|
Ln && (Ln.removeAttribute("error"), Ln.innerText = M0);
|
|
1566
1566
|
}
|
|
1567
1567
|
function AC(s = !1) {
|
|
1568
|
-
if (Wi !== void 0 ||
|
|
1569
|
-
|
|
1568
|
+
if (Wi !== void 0 || vl) return;
|
|
1569
|
+
vl = !0;
|
|
1570
1570
|
const e = document.createElement("script");
|
|
1571
1571
|
e.onload = () => {
|
|
1572
1572
|
if (!globalThis.VConsole) {
|
|
1573
|
-
console.warn("🌵 Debug console failed to load."),
|
|
1573
|
+
console.warn("🌵 Debug console failed to load."), vl = !1, Wi = null;
|
|
1574
1574
|
return;
|
|
1575
1575
|
}
|
|
1576
|
-
|
|
1576
|
+
vl = !1, MC(), Wi = new VConsole({
|
|
1577
1577
|
// defaultPlugins: ['system', 'network'],
|
|
1578
1578
|
pluginOrder: ["default", "needle-console"]
|
|
1579
1579
|
});
|
|
@@ -1643,7 +1643,7 @@ function AC(s = !1) {
|
|
|
1643
1643
|
`, Vo?.prepend(i), s === !0 && g0() <= 0 && kC(), console.log("🌵 Debug console has loaded");
|
|
1644
1644
|
}
|
|
1645
1645
|
}, e.onerror = () => {
|
|
1646
|
-
console.warn("🌵 Debug console failed to load." + (window.crossOriginIsolated ? "This page is using cross-origin isolation, so external scripts can't be loaded." : "")),
|
|
1646
|
+
console.warn("🌵 Debug console failed to load." + (window.crossOriginIsolated ? "This page is using cross-origin isolation, so external scripts can't be loaded." : "")), vl = !1, Wi = null;
|
|
1647
1647
|
}, e.src = "https://cdn.jsdelivr.net/npm/vconsole@3.15.1/dist/vconsole.min.js", document.body.appendChild(e);
|
|
1648
1648
|
}
|
|
1649
1649
|
function IC() {
|
|
@@ -1702,12 +1702,12 @@ wo('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUIL
|
|
|
1702
1702
|
wo('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
|
|
1703
1703
|
wo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.11.5-beta";');
|
|
1704
1704
|
wo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1705
|
-
wo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Wed Oct 29 2025
|
|
1705
|
+
wo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Wed Oct 29 2025 13:18:27 GMT+0000 (Coordinated Universal Time)";');
|
|
1706
1706
|
wo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
|
|
1707
|
-
const zn = "4.11.5-beta", Zm = "undefined", E0 = "Wed Oct 29 2025
|
|
1707
|
+
const zn = "4.11.5-beta", Zm = "undefined", E0 = "Wed Oct 29 2025 13:18:27 GMT+0000 (Coordinated Universal Time)";
|
|
1708
1708
|
T0 && console.log(`Engine version: ${zn} (generator: ${Zm})
|
|
1709
1709
|
Project built at ${E0}`);
|
|
1710
|
-
const zl = NEEDLE_PUBLIC_KEY, po = "needle_isActiveInHierarchy",
|
|
1710
|
+
const zl = NEEDLE_PUBLIC_KEY, po = "needle_isActiveInHierarchy", Kr = "builtin_components", Kh = "needle_editor_guid";
|
|
1711
1711
|
function wo(s) {
|
|
1712
1712
|
try {
|
|
1713
1713
|
(0, eval)(s);
|
|
@@ -1799,31 +1799,31 @@ function D0(s, e, t, i, ...n) {
|
|
|
1799
1799
|
for (const r of o)
|
|
1800
1800
|
r.postfix?.call(t, i, ...n);
|
|
1801
1801
|
}
|
|
1802
|
-
const
|
|
1802
|
+
const Ra = [];
|
|
1803
1803
|
function tg(s) {
|
|
1804
|
-
|
|
1804
|
+
Ra.indexOf(s) === -1 && Ra.push(s);
|
|
1805
1805
|
}
|
|
1806
1806
|
function DL(s) {
|
|
1807
|
-
const e =
|
|
1808
|
-
e !== -1 &&
|
|
1807
|
+
const e = Ra.indexOf(s);
|
|
1808
|
+
e !== -1 && Ra.splice(e, 1);
|
|
1809
1809
|
}
|
|
1810
|
-
const
|
|
1810
|
+
const Ta = [];
|
|
1811
1811
|
function j0(s) {
|
|
1812
|
-
|
|
1812
|
+
Ta.indexOf(s) === -1 && Ta.push(s);
|
|
1813
1813
|
}
|
|
1814
1814
|
function jL(s) {
|
|
1815
|
-
const e =
|
|
1816
|
-
e !== -1 &&
|
|
1815
|
+
const e = Ta.indexOf(s);
|
|
1816
|
+
e !== -1 && Ta.splice(e, 1);
|
|
1817
1817
|
}
|
|
1818
1818
|
function FC(s) {
|
|
1819
1819
|
globalThis.dispatchEvent(new CustomEvent("needle-xrsession-start", { detail: s }));
|
|
1820
|
-
for (let e = 0; e <
|
|
1821
|
-
|
|
1820
|
+
for (let e = 0; e < Ra.length; e++)
|
|
1821
|
+
Ra[e](s);
|
|
1822
1822
|
}
|
|
1823
1823
|
function zC(s) {
|
|
1824
1824
|
globalThis.dispatchEvent(new CustomEvent("needle-xrsession-end", { detail: s }));
|
|
1825
|
-
for (let e = 0; e <
|
|
1826
|
-
|
|
1825
|
+
for (let e = 0; e < Ta.length; e++)
|
|
1826
|
+
Ta[e](s);
|
|
1827
1827
|
}
|
|
1828
1828
|
const it = x("debuginput");
|
|
1829
1829
|
var ig = /* @__PURE__ */ ((s) => (s.Mouse = "mouse", s.Touch = "touch", s.Controller = "controller", s.Hand = "hand", s))(ig || {}), De = /* @__PURE__ */ ((s) => (s.PointerDown = "pointerdown", s.PointerUp = "pointerup", s.PointerMove = "pointermove", s.KeyDown = "keydown", s.KeyUp = "keyup", s.KeyPressed = "keypress", s))(De || {});
|
|
@@ -2585,7 +2585,7 @@ class UC {
|
|
|
2585
2585
|
}
|
|
2586
2586
|
}
|
|
2587
2587
|
}
|
|
2588
|
-
const
|
|
2588
|
+
const ua = new Z().makeRotationY(Math.PI), $i = new $().setFromAxisAngle(new y(0, 1, 0), Math.PI), NC = x("debugwebxr");
|
|
2589
2589
|
class $C {
|
|
2590
2590
|
priority = -1e5;
|
|
2591
2591
|
gameObject;
|
|
@@ -2916,13 +2916,13 @@ Layout: `;
|
|
|
2916
2916
|
let i = null, n = null, o = null, r = null;
|
|
2917
2917
|
if (t) {
|
|
2918
2918
|
const h = t.transform;
|
|
2919
|
-
this._rayMatrix.fromArray(h.matrix).premultiply(
|
|
2919
|
+
this._rayMatrix.fromArray(h.matrix).premultiply(ua), this._rayMatrix.decompose(this._rayPosition, this._rayQuaternion, F(1, 1, 1)), o = F(h.position), r = pi(h.orientation), this._rayPositionRaw.copy(o), this._rayRotationRaw.copy(r);
|
|
2920
2920
|
}
|
|
2921
2921
|
if (this.inputSource.gripSpace) {
|
|
2922
2922
|
const h = e.getPose(this.inputSource.gripSpace, this.xr.referenceSpace);
|
|
2923
2923
|
if (h) {
|
|
2924
2924
|
const d = h.transform;
|
|
2925
|
-
if (i = F(d.position), n = pi(d.orientation), this._gripMatrix.fromArray(d.matrix).premultiply(
|
|
2925
|
+
if (i = F(d.position), n = pi(d.orientation), this._gripMatrix.fromArray(d.matrix).premultiply(ua), this._gripMatrix.decompose(this._gripPosition, this._gripQuaternion, F(1, 1, 1)), "linearVelocity" in h && h.linearVelocity) {
|
|
2926
2926
|
const f = h.linearVelocity;
|
|
2927
2927
|
this._linearVelocity.set(f.x, f.y, f.z);
|
|
2928
2928
|
}
|
|
@@ -2940,7 +2940,7 @@ Layout: `;
|
|
|
2940
2940
|
}
|
|
2941
2941
|
h || (this._object.position.copy(this._rayPosition), this._object.quaternion.copy(this._rayQuaternion).multiply($i));
|
|
2942
2942
|
const p = a.get("middle-finger-metacarpal"), g = p && this.getHandJointPose(p, e);
|
|
2943
|
-
g && (this._gripMatrix.fromArray(g.transform.matrix).premultiply(
|
|
2943
|
+
g && (this._gripMatrix.fromArray(g.transform.matrix).premultiply(ua), this._gripMatrix.decompose(this._gripPosition, this._gripQuaternion, F(1, 1, 1)), i = F().copy(g.transform.position), n = pi().copy(g.transform.orientation), n.multiply(HC), i.add(F(GC).applyQuaternion(n)));
|
|
2944
2944
|
} else this.inputSource.gripSpace && this.targetRayMode === "transient-pointer" && i && n ? (this._object.position.copy(i), this._object.quaternion.copy(n).multiply($i)) : o && r && (this._object.position.copy(o), this._object.quaternion.copy(r).multiply($i));
|
|
2945
2945
|
os && (o && r && (this._raySpaceObject?.position.copy(o), this._raySpaceObject?.quaternion.copy(r).multiply($i)), i && n && (this._gripSpaceObject?.position.copy(i), this._gripSpaceObject?.quaternion.copy(n).multiply($i)));
|
|
2946
2946
|
const l = this.xr.context.mainCamera?.parent, c = l ? be(l) : void 0;
|
|
@@ -3232,12 +3232,12 @@ class e_ {
|
|
|
3232
3232
|
}
|
|
3233
3233
|
var $p = /* @__PURE__ */ ((s) => (s.Visible = "application-visible", s.Hidden = "application-hidden", s.MuteChanged = "application-mutechanged", s))($p || {});
|
|
3234
3234
|
let Sd = !1;
|
|
3235
|
-
const
|
|
3235
|
+
const oa = [];
|
|
3236
3236
|
function kr() {
|
|
3237
3237
|
if (Sd) return;
|
|
3238
3238
|
L() && console.debug("User interaction registered: audio can now be played"), Sd = !0;
|
|
3239
|
-
const s = [...
|
|
3240
|
-
|
|
3239
|
+
const s = [...oa];
|
|
3240
|
+
oa.length = 0, s.forEach((e) => e());
|
|
3241
3241
|
}
|
|
3242
3242
|
document.addEventListener("mousedown", kr);
|
|
3243
3243
|
document.addEventListener("pointerup", kr);
|
|
@@ -3262,15 +3262,15 @@ class qn extends EventTarget {
|
|
|
3262
3262
|
e();
|
|
3263
3263
|
return;
|
|
3264
3264
|
}
|
|
3265
|
-
|
|
3265
|
+
oa.indexOf(e) === -1 && oa.push(e);
|
|
3266
3266
|
}
|
|
3267
3267
|
}
|
|
3268
3268
|
/**
|
|
3269
3269
|
* Unregister a callback that was previously registered with registerWaitForInteraction.
|
|
3270
3270
|
*/
|
|
3271
3271
|
static unregisterWaitForInteraction(e) {
|
|
3272
|
-
const t =
|
|
3273
|
-
t !== -1 &&
|
|
3272
|
+
const t = oa.indexOf(e);
|
|
3273
|
+
t !== -1 && oa.splice(t, 1);
|
|
3274
3274
|
}
|
|
3275
3275
|
_mute = !1;
|
|
3276
3276
|
/** audio muted? */
|
|
@@ -3317,14 +3317,14 @@ class qn extends EventTarget {
|
|
|
3317
3317
|
}
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
|
-
const
|
|
3320
|
+
const fa = /* @__PURE__ */ new Map(), ra = /* @__PURE__ */ new Map();
|
|
3321
3321
|
let t_ = 0;
|
|
3322
3322
|
function Ls(s, e, t) {
|
|
3323
|
-
if (
|
|
3323
|
+
if (fa.has(e) || fa.set(e, new Array()), fa.get(e).push({
|
|
3324
3324
|
method: s,
|
|
3325
3325
|
options: { once: !1, ...t }
|
|
3326
3326
|
}), t_ < 30) {
|
|
3327
|
-
const i =
|
|
3327
|
+
const i = ra.get(e);
|
|
3328
3328
|
i && i?.length > 100 && (t_ += 1, console.warn(`You have ${i.length} methods registered for Event ${e}.
|
|
3329
3329
|
|
|
3330
3330
|
This might be a performance issue!
|
|
@@ -3338,7 +3338,7 @@ See https://engine.needle.tools/docs/scripting.html#special-lifecycle-hooks for
|
|
|
3338
3338
|
}
|
|
3339
3339
|
}
|
|
3340
3340
|
function xo(s, e) {
|
|
3341
|
-
const t =
|
|
3341
|
+
const t = ra.get(e);
|
|
3342
3342
|
if (t) {
|
|
3343
3343
|
for (let n = 0; n < t.length; n++)
|
|
3344
3344
|
if (t[n].method === s) {
|
|
@@ -3346,7 +3346,7 @@ function xo(s, e) {
|
|
|
3346
3346
|
return;
|
|
3347
3347
|
}
|
|
3348
3348
|
}
|
|
3349
|
-
const i =
|
|
3349
|
+
const i = fa.get(e);
|
|
3350
3350
|
if (i) {
|
|
3351
3351
|
for (let n = 0; n < i.length; n++)
|
|
3352
3352
|
if (i[n].method === s) {
|
|
@@ -3359,13 +3359,13 @@ function Sn(s, e) {
|
|
|
3359
3359
|
e === de.ContextCreated && Wp.delete(s), F0(s, e);
|
|
3360
3360
|
}
|
|
3361
3361
|
function F0(s, e) {
|
|
3362
|
-
e === xe.Start &&
|
|
3363
|
-
const t = e === xe.Start || e === de.ContextCreated, i =
|
|
3362
|
+
e === xe.Start && fa.get(de.ContextCreated) && F0(s, de.ContextCreated);
|
|
3363
|
+
const t = e === xe.Start || e === de.ContextCreated, i = ra.get(e);
|
|
3364
3364
|
i && i.length > 0 && n_(s, i, t);
|
|
3365
|
-
const n =
|
|
3365
|
+
const n = fa.get(e);
|
|
3366
3366
|
if (n && n.length > 0) {
|
|
3367
3367
|
const o = [...n];
|
|
3368
|
-
n.length = 0, n_(s, o, t), o.length > 0 && (
|
|
3368
|
+
n.length = 0, n_(s, o, t), o.length > 0 && (ra.has(e) || ra.set(e, new Array()), ra.get(e).push(...o));
|
|
3369
3369
|
}
|
|
3370
3370
|
}
|
|
3371
3371
|
const _h = new Array(), i_ = {
|
|
@@ -4112,8 +4112,8 @@ class r_ {
|
|
|
4112
4112
|
_transitionPromise = null;
|
|
4113
4113
|
_transitionResolve = null;
|
|
4114
4114
|
}
|
|
4115
|
-
var
|
|
4116
|
-
class
|
|
4115
|
+
var Ea = /* @__PURE__ */ ((s) => (s[s.Quad = 0] = "Quad", s[s.Cube = 1] = "Cube", s[s.Sphere = 2] = "Sphere", s[s.Cylinder = 3] = "Cylinder", s[s.RoundedCube = 10] = "RoundedCube", s))(Ea || {});
|
|
4116
|
+
class $a {
|
|
4117
4117
|
/**
|
|
4118
4118
|
* Creates a 3D text object
|
|
4119
4119
|
* @param text The text to display
|
|
@@ -4164,7 +4164,7 @@ class Na {
|
|
|
4164
4164
|
case "Cube":
|
|
4165
4165
|
case 1:
|
|
4166
4166
|
{
|
|
4167
|
-
const o = new
|
|
4167
|
+
const o = new Sa(1, 1, 1), r = t?.material ?? new ft({ color: n });
|
|
4168
4168
|
t?.texture && "map" in r && (r.map = t.texture), i = new G(o, r), i.name = "Cube";
|
|
4169
4169
|
}
|
|
4170
4170
|
break;
|
|
@@ -4290,9 +4290,9 @@ function a_(s, e) {
|
|
|
4290
4290
|
}
|
|
4291
4291
|
}
|
|
4292
4292
|
function l_() {
|
|
4293
|
-
return new Ss().add(
|
|
4293
|
+
return new Ss().add($a.createPrimitive("Sphere", { material: new we({ transparent: !0, opacity: 0.1 }) }));
|
|
4294
4294
|
}
|
|
4295
|
-
class
|
|
4295
|
+
class Aa {
|
|
4296
4296
|
static _active = null;
|
|
4297
4297
|
static get active() {
|
|
4298
4298
|
return this._active;
|
|
@@ -4310,7 +4310,7 @@ class Ea {
|
|
|
4310
4310
|
const i = await navigator.xr.requestSession(e, t);
|
|
4311
4311
|
return i.addEventListener("end", () => {
|
|
4312
4312
|
this._active = null;
|
|
4313
|
-
}), this._requestInFlight ? (this._requestInFlight = !1, this._active = new
|
|
4313
|
+
}), this._requestInFlight ? (this._requestInFlight = !1, this._active = new Aa(e, t, i), this._active) : (i.end(), null);
|
|
4314
4314
|
}
|
|
4315
4315
|
return null;
|
|
4316
4316
|
}
|
|
@@ -4374,7 +4374,7 @@ class Ea {
|
|
|
4374
4374
|
roughness: 0.8
|
|
4375
4375
|
});
|
|
4376
4376
|
this.isAR && (r.emissive = new se(Math.random(), Math.random(), Math.random()), r.emissiveIntensity = Math.random());
|
|
4377
|
-
const a = j.random(0, 1) > 0.5 ?
|
|
4377
|
+
const a = j.random(0, 1) > 0.5 ? Ea.Sphere : Ea.Cube, l = $a.createPrimitive(a, {
|
|
4378
4378
|
material: r
|
|
4379
4379
|
});
|
|
4380
4380
|
l.position.x = j.random(-n, n), l.position.y = j.random(-2, n), l.position.z = j.random(-n, n), l.rotation.x = j.random(0, Math.PI * 2), l.rotation.y = j.random(0, Math.PI * 2), l.rotation.z = j.random(0, Math.PI * 2), l.scale.multiplyScalar(0.5 + Math.random() * 10);
|
|
@@ -4425,7 +4425,7 @@ async function aP() {
|
|
|
4425
4425
|
if (s instanceof Promise) {
|
|
4426
4426
|
delete globalThis["needle:XRSession"], ue.addContextCreatedCallback(async (e) => {
|
|
4427
4427
|
if (!s) return;
|
|
4428
|
-
|
|
4428
|
+
da(!0);
|
|
4429
4429
|
const t = await s;
|
|
4430
4430
|
if (t) {
|
|
4431
4431
|
const i = K.getDefaultSessionInit("immersive-vr");
|
|
@@ -4443,10 +4443,10 @@ async function aP() {
|
|
|
4443
4443
|
return;
|
|
4444
4444
|
}
|
|
4445
4445
|
navigator.xr?.addEventListener("sessiongranted", async () => {
|
|
4446
|
-
|
|
4446
|
+
da(!0), console.log("Received Session Granted..."), await Es(100);
|
|
4447
4447
|
const s = sessionStorage.getItem("needle_xr_session_mode"), e = sessionStorage.getItem("needle_xr_session_init") ?? null, t = e ? JSON.parse(e) : null;
|
|
4448
4448
|
let i = null;
|
|
4449
|
-
if ($0() && (await
|
|
4449
|
+
if ($0() && (await Aa.start(s || "immersive-vr", t || K.getDefaultSessionInit("immersive-vr")), await hP(), i = await Aa.handoff()), i)
|
|
4450
4450
|
K.setSession(i.mode, i.session, i.init, W.Current);
|
|
4451
4451
|
else if (s && e) {
|
|
4452
4452
|
console.log("Session Granted: Restore last session");
|
|
@@ -4657,7 +4657,7 @@ class K {
|
|
|
4657
4657
|
return Sc.exportAndOpen(), null;
|
|
4658
4658
|
} else e == "ar" && (e = "immersive-ar");
|
|
4659
4659
|
if (L() && x("debugxrpreroom"))
|
|
4660
|
-
return console.warn("Debug: Starting temporary XR session"), await
|
|
4660
|
+
return console.warn("Debug: Starting temporary XR session"), await Aa.start(e, t || K.getDefaultSessionInit(e)), null;
|
|
4661
4661
|
if (this._currentSessionRequest)
|
|
4662
4662
|
return console.warn("A XRSession is already being requested"), (We || L()) && ye("A XRSession is already being requested"), this._currentSessionRequest.then(() => this._activeSession);
|
|
4663
4663
|
if (this._activeSession)
|
|
@@ -4691,7 +4691,7 @@ class K {
|
|
|
4691
4691
|
console.warn("No default session init for mode", e);
|
|
4692
4692
|
break;
|
|
4693
4693
|
}
|
|
4694
|
-
t.optionalFeatures ??= [], t.requiredFeatures ??= [], await
|
|
4694
|
+
t.optionalFeatures ??= [], t.requiredFeatures ??= [], await Aa.stop();
|
|
4695
4695
|
const n = e == "immersive-ar" ? i.scripts_immersive_ar : i.scripts_immersive_vr;
|
|
4696
4696
|
We ? console.log(`%cRequesting ${e} session`, "font-weight:bold;", t, n) : console.log(`%cRequesting ${e} session`, "font-weight:bold;");
|
|
4697
4697
|
for (const a of n)
|
|
@@ -4841,7 +4841,7 @@ class K {
|
|
|
4841
4841
|
/** The currently active XR rig */
|
|
4842
4842
|
get rig() {
|
|
4843
4843
|
const e = this._rigs[0] ?? null;
|
|
4844
|
-
return e?.gameObject &&
|
|
4844
|
+
return e?.gameObject && La(e.gameObject) || e?.isActive === !1 ? (this.updateActiveXRRig(), this._rigs[0] ?? null) : e;
|
|
4845
4845
|
}
|
|
4846
4846
|
_rigScale = 1;
|
|
4847
4847
|
_lastRigScaleUpdate = -1;
|
|
@@ -4885,7 +4885,7 @@ class K {
|
|
|
4885
4885
|
for (let i = 1; i < this._rigs.length; i++) {
|
|
4886
4886
|
const n = this._rigs[i];
|
|
4887
4887
|
if (n.isActive) {
|
|
4888
|
-
if (
|
|
4888
|
+
if (La(n.gameObject)) {
|
|
4889
4889
|
this._rigs.splice(i, 1), i--;
|
|
4890
4890
|
continue;
|
|
4891
4891
|
}
|
|
@@ -4928,7 +4928,7 @@ class K {
|
|
|
4928
4928
|
const t = this.context.renderer.xr.getReferenceSpace(), i = t && e.getPose(t);
|
|
4929
4929
|
if (i) {
|
|
4930
4930
|
const n = F(i.transform.position), o = pi(i.transform.orientation), r = this.context.mainCamera;
|
|
4931
|
-
if (r?.parent !== this._cameraRenderParent && n.applyMatrix4(
|
|
4931
|
+
if (r?.parent !== this._cameraRenderParent && n.applyMatrix4(ua), r?.parent) {
|
|
4932
4932
|
n.applyMatrix4(r.parent.matrixWorld), o.multiply($i);
|
|
4933
4933
|
const a = be(r.parent);
|
|
4934
4934
|
a.premultiply($i), o.premultiply(a);
|
|
@@ -4940,7 +4940,7 @@ class K {
|
|
|
4940
4940
|
/** convert a XRRigidTransform from XR session space to threejs / Needle Engine XR space */
|
|
4941
4941
|
convertSpace(e) {
|
|
4942
4942
|
const t = F(e.position);
|
|
4943
|
-
t.applyMatrix4(
|
|
4943
|
+
t.applyMatrix4(ua);
|
|
4944
4944
|
const i = pi(e.orientation);
|
|
4945
4945
|
return i.premultiply($i), { position: t, quaternion: i };
|
|
4946
4946
|
}
|
|
@@ -4963,7 +4963,7 @@ class K {
|
|
|
4963
4963
|
*/
|
|
4964
4964
|
_mainCamera = null;
|
|
4965
4965
|
constructor(e, t, i, n) {
|
|
4966
|
-
lP(e, n.init), this.session = t, this.mode = e, this.context = i, (We || x("console")) &&
|
|
4966
|
+
lP(e, n.init), this.session = t, this.mode = e, this.context = i, (We || x("console")) && da(!0), this._xr_scripts = [...n.scripts], this._xr_update_scripts = this._xr_scripts.filter((o) => typeof o.onUpdateXR == "function"), this._controllerAdded = n.controller_added, this._controllerRemoved = n.controller_removed, Ls(this.onBefore, xe.LateUpdate), this.context.pre_render_callbacks.push(this.onBeforeRender), this.context.post_render_callbacks.push(this.onAfterRender), (n.init.optionalFeatures?.includes("hit-test") || n.init.requiredFeatures?.includes("hit-test")) && t.requestReferenceSpace("viewer").then((o) => t.requestHitTestSource?.call(t, { space: o })?.then((r) => this._viewerHitTestSource = r).catch((r) => console.error(r))).catch((o) => console.error(o)), this.context.mainCamera && (this._originalCameraWorldPosition = ee(this.context.mainCamera, new y()), this._originalCameraWorldRotation = be(this.context.mainCamera, new $()), this._originalCameraWorldScale = Qe(this.context.mainCamera, new y()), this._originalCameraParent = this.context.mainCamera.parent, this.context.mainCamera instanceof le && (this.context.mainCamera[xh] = this.context.mainCamera.fov)), this._defaultRig = new $C(), this.context.scene.add(this._defaultRig.gameObject), this.addRig(this._defaultRig);
|
|
4967
4967
|
for (let o = 0; o < t.inputSources.length; o++) {
|
|
4968
4968
|
const r = t.inputSources[o];
|
|
4969
4969
|
if (!r.handedness) {
|
|
@@ -5056,7 +5056,7 @@ class K {
|
|
|
5056
5056
|
this.controllers.length = 0, this._newControllers.length = 0;
|
|
5057
5057
|
for (const o of this._xr_scripts)
|
|
5058
5058
|
o?.onLeaveXR?.({ xr: this });
|
|
5059
|
-
this.sync?.onExitXR(this), this.context.mainCamera && (this._originalCameraParent?.add(this.context.mainCamera), this._originalCameraWorldPosition && kt(this.context.mainCamera, this._originalCameraWorldPosition), this._originalCameraWorldRotation && Hn(this.context.mainCamera, this._originalCameraWorldRotation), this._originalCameraWorldScale && xc(this.context.mainCamera, this._originalCameraWorldScale), this.context.mainCamera instanceof le && this.context.mainCamera[xh] && (this.context.mainCamera.fov = this.context.mainCamera[xh], this.context.mainCamera[xh] = 0)), this.context.requestSizeUpdate(), this._defaultRig.gameObject.removeFromParent(),
|
|
5059
|
+
this.sync?.onExitXR(this), this.context.mainCamera && (this._originalCameraParent?.add(this.context.mainCamera), this._originalCameraWorldPosition && kt(this.context.mainCamera, this._originalCameraWorldPosition), this._originalCameraWorldRotation && Hn(this.context.mainCamera, this._originalCameraWorldRotation), this._originalCameraWorldScale && xc(this.context.mainCamera, this._originalCameraWorldScale), this.context.mainCamera instanceof le && this.context.mainCamera[xh] && (this.context.mainCamera.fov = this.context.mainCamera[xh], this.context.mainCamera[xh] = 0)), this.context.requestSizeUpdate(), this._defaultRig.gameObject.removeFromParent(), da(!1);
|
|
5060
5060
|
};
|
|
5061
5061
|
_didStart = !1;
|
|
5062
5062
|
/** Called every frame by the engine */
|
|
@@ -5139,7 +5139,7 @@ class K {
|
|
|
5139
5139
|
}
|
|
5140
5140
|
this.controllers.sort((o, r) => o.index - r.index);
|
|
5141
5141
|
}
|
|
5142
|
-
We && this.context.time.frame % 30 === 0 && this.controllers.length <= 0 && this.session.inputSources.length > 0 && (
|
|
5142
|
+
We && this.context.time.frame % 30 === 0 && this.controllers.length <= 0 && this.session.inputSources.length > 0 && (da(!0), console.error("XRControllers are not added but inputSources are present"));
|
|
5143
5143
|
for (const n of this._xr_update_scripts) {
|
|
5144
5144
|
if (n.destroyed === !0) {
|
|
5145
5145
|
this._script_to_remove.push(n);
|
|
@@ -5499,7 +5499,7 @@ class z {
|
|
|
5499
5499
|
static DrawWireSphere(e, t, i = on, n = 0, o = !0) {
|
|
5500
5500
|
if (!z.enabled) return;
|
|
5501
5501
|
const r = ji.getSphere(t, n, !0);
|
|
5502
|
-
|
|
5502
|
+
Ma(r, e.x, e.y, e.z), r.material.depthTest = o, r.material.depthWrite = !1, r.material.fog = !1, cn(r.material, i);
|
|
5503
5503
|
}
|
|
5504
5504
|
/**
|
|
5505
5505
|
* Draw a 3D sphere gizmo in the scene
|
|
@@ -5512,7 +5512,7 @@ class z {
|
|
|
5512
5512
|
static DrawSphere(e, t, i = on, n = 0, o = !0) {
|
|
5513
5513
|
if (!z.enabled) return;
|
|
5514
5514
|
const r = ji.getSphere(t, n, !1);
|
|
5515
|
-
|
|
5515
|
+
Ma(r, e.x, e.y, e.z), r.material.depthTest = o, r.material.depthWrite = !1, cn(r.material, i);
|
|
5516
5516
|
}
|
|
5517
5517
|
/**
|
|
5518
5518
|
* Draw a 3D wiremesh box gizmo in the scene
|
|
@@ -5577,7 +5577,7 @@ class z {
|
|
|
5577
5577
|
"mesh" in e ? (t.geometry = e.mesh.geometry, t.matrixWorld.copy(e.mesh.matrixWorld)) : (t.geometry = e.geometry, t.matrixWorld.copy(e.matrix)), t.matrixAutoUpdate = !1, t.matrixWorldAutoUpdate = !1, t.material.depthTest = e.depthTest ?? !0, t.material.wireframe = !0, cn(t.material, e.color ?? on);
|
|
5578
5578
|
}
|
|
5579
5579
|
}
|
|
5580
|
-
const pP = new
|
|
5580
|
+
const pP = new Sa(1, 1, 1);
|
|
5581
5581
|
function og(s = null) {
|
|
5582
5582
|
const e = new se(s ?? 14540253), t = new Bx(pP);
|
|
5583
5583
|
return new Xb(t, new Bm({ color: e }));
|
|
@@ -5634,7 +5634,7 @@ class ji {
|
|
|
5634
5634
|
static getBox(e) {
|
|
5635
5635
|
let t = this.boxesCache.pop();
|
|
5636
5636
|
if (!t) {
|
|
5637
|
-
const i = new
|
|
5637
|
+
const i = new Sa(1, 1, 1);
|
|
5638
5638
|
t = new G(i);
|
|
5639
5639
|
}
|
|
5640
5640
|
return this.registerTimedObject(W.Current, t, e, this.boxesCache), t;
|
|
@@ -5642,7 +5642,7 @@ class ji {
|
|
|
5642
5642
|
static getLine(e) {
|
|
5643
5643
|
let t = this.linesCache.pop();
|
|
5644
5644
|
if (!t) {
|
|
5645
|
-
t = new
|
|
5645
|
+
t = new Ca();
|
|
5646
5646
|
let i = t.geometry.getAttribute("position");
|
|
5647
5647
|
i || (i = new pt(new Float32Array(6), 3), t.geometry.setAttribute("position", i));
|
|
5648
5648
|
}
|
|
@@ -5651,7 +5651,7 @@ class ji {
|
|
|
5651
5651
|
static getCircle(e) {
|
|
5652
5652
|
let t = this.circlesCache.pop();
|
|
5653
5653
|
if (!t) {
|
|
5654
|
-
t = new
|
|
5654
|
+
t = new Ca();
|
|
5655
5655
|
let i = t.geometry.getAttribute("position");
|
|
5656
5656
|
if (!i) {
|
|
5657
5657
|
i = new pt(new Float32Array(Af * 3), 3), t.geometry.setAttribute("position", i);
|
|
@@ -5729,7 +5729,7 @@ class ji {
|
|
|
5729
5729
|
for (let i = 0; i < t.length; i++) {
|
|
5730
5730
|
const n = t[i];
|
|
5731
5731
|
if (e.mainCamera && n instanceof Ce.MeshUIBaseElement) {
|
|
5732
|
-
if (
|
|
5732
|
+
if (La(n))
|
|
5733
5733
|
continue;
|
|
5734
5734
|
const o = e.isInVR, r = !1, a = !o;
|
|
5735
5735
|
du(n, e.mainCamera, r, a);
|
|
@@ -5740,7 +5740,7 @@ class ji {
|
|
|
5740
5740
|
const n = e.time.realtimeSinceStartup;
|
|
5741
5741
|
for (let o = t.length - 1; o >= 0; o--) {
|
|
5742
5742
|
const r = t[o];
|
|
5743
|
-
n >= i[o] - 1e-6 && (t.splice(o, 1), i.splice(o, 1), r.removeFromParent(),
|
|
5743
|
+
n >= i[o] - 1e-6 && (t.splice(o, 1), i.splice(o, 1), r.removeFromParent(), La(r) != !0 && r[Vp].push(r));
|
|
5744
5744
|
}
|
|
5745
5745
|
}
|
|
5746
5746
|
}
|
|
@@ -5872,7 +5872,7 @@ class Cc {
|
|
|
5872
5872
|
}
|
|
5873
5873
|
intersect(e, t, i, n) {
|
|
5874
5874
|
for (const o of t) {
|
|
5875
|
-
if (!o || o.visible === !1 || z.isGizmo(o) || n.lineThreshold !== void 0 && n.lineThreshold < 0 && o instanceof
|
|
5875
|
+
if (!o || o.visible === !1 || z.isGizmo(o) || n.lineThreshold !== void 0 && n.lineThreshold < 0 && o instanceof Ca)
|
|
5876
5876
|
continue;
|
|
5877
5877
|
let r = !0;
|
|
5878
5878
|
const a = o, l = a.geometry;
|
|
@@ -5885,7 +5885,7 @@ class Cc {
|
|
|
5885
5885
|
if (r) {
|
|
5886
5886
|
const c = i.length, h = o.raycastPreference || "lod";
|
|
5887
5887
|
let d = h !== "bounds";
|
|
5888
|
-
if (n.precise === !1 && (d = !1), l && (d ||= l.getAttribute("position")?.array?.length < 64), a instanceof
|
|
5888
|
+
if (n.precise === !1 && (d = !1), l && (d ||= l.getAttribute("position")?.array?.length < 64), a instanceof ka && (d = !1), h === "lod") {
|
|
5889
5889
|
const f = t0(o);
|
|
5890
5890
|
f && (a.geometry = f);
|
|
5891
5891
|
}
|
|
@@ -5901,7 +5901,7 @@ class Cc {
|
|
|
5901
5901
|
tempBoundingBox = new wi();
|
|
5902
5902
|
intersectSphere(e, t, i, n, o, r, a, l) {
|
|
5903
5903
|
let c = e && e.isMesh && e.layers.test(n) && !z.isGizmo(e);
|
|
5904
|
-
c &&= e.visible, c &&= !(e instanceof
|
|
5904
|
+
c &&= e.visible, c &&= !(e instanceof Ca), c &&= !(e instanceof ka);
|
|
5905
5905
|
const h = e, d = h.geometry;
|
|
5906
5906
|
if (c && l) {
|
|
5907
5907
|
const f = l(e);
|
|
@@ -5944,7 +5944,7 @@ function gP(s, e, t) {
|
|
|
5944
5944
|
return n || (n = s["_computeIntersections:Needle"] = function(o, r, a) {
|
|
5945
5945
|
const l = this, c = l.geometry.boundingSphere;
|
|
5946
5946
|
if (c) {
|
|
5947
|
-
if (l instanceof
|
|
5947
|
+
if (l instanceof ka) {
|
|
5948
5948
|
Sh.setFromNormalAndCoplanarPoint(F(0, 1, 0), F(0, -l.position.y, 0)), Sh.applyMatrix4(l.matrixWorld, mP);
|
|
5949
5949
|
const d = o.ray.intersectPlane(Sh, F());
|
|
5950
5950
|
if (d) {
|
|
@@ -6061,12 +6061,12 @@ var Cd;
|
|
|
6061
6061
|
}
|
|
6062
6062
|
})(Cd || (Cd = {}));
|
|
6063
6063
|
const p_ = Symbol("gltf-loader-internal-usage-tracker"), yP = x("debugusers");
|
|
6064
|
-
class
|
|
6064
|
+
class pa {
|
|
6065
6065
|
get name() {
|
|
6066
6066
|
return "NEEDLE_internal_usage_tracker";
|
|
6067
6067
|
}
|
|
6068
6068
|
static isLoading(e) {
|
|
6069
|
-
return
|
|
6069
|
+
return pa._loadingProcesses > 0;
|
|
6070
6070
|
}
|
|
6071
6071
|
static _loadingProcesses = 0;
|
|
6072
6072
|
parser;
|
|
@@ -6077,7 +6077,7 @@ class fa {
|
|
|
6077
6077
|
this.parser = e, this._getDependency = this.parser.getDependency, this._loadingId = Date.now().toString();
|
|
6078
6078
|
}
|
|
6079
6079
|
beforeRoot() {
|
|
6080
|
-
|
|
6080
|
+
pa._loadingProcesses++;
|
|
6081
6081
|
const e = this, t = this._getDependency;
|
|
6082
6082
|
return this.parser.getDependency = function(i, n) {
|
|
6083
6083
|
const o = t.call(this, i, n);
|
|
@@ -6085,7 +6085,7 @@ class fa {
|
|
|
6085
6085
|
}, null;
|
|
6086
6086
|
}
|
|
6087
6087
|
afterRoot(e) {
|
|
6088
|
-
|
|
6088
|
+
pa._loadingProcesses--, this.parser.getDependency = this._getDependency;
|
|
6089
6089
|
for (const t of this._loadedObjects)
|
|
6090
6090
|
delete t[p_], t instanceof k && (t.parent || t instanceof G && setTimeout(() => {
|
|
6091
6091
|
yP && console.warn("> GLTF LOADER: Mesh not used in scene!", t), t.material = null, t.geometry = null;
|
|
@@ -6231,7 +6231,7 @@ function Pd(s, e, t, i) {
|
|
|
6231
6231
|
} else if (e && n.has(e)) {
|
|
6232
6232
|
n.delete(e);
|
|
6233
6233
|
let o = t[Ul] || 0;
|
|
6234
|
-
o > 0 && (o -= 1, t[Ul] = o), lr && console.warn(`🔴 Removed user of "${t.type}"`, e, t, o, "users:", n), o <= 0 && (
|
|
6234
|
+
o > 0 && (o -= 1, t[Ul] = o), lr && console.warn(`🔴 Removed user of "${t.type}"`, e, t, o, "users:", n), o <= 0 && (pa.isLoading(t) || (pu && console.warn(`🔴 Removed all user of "${t.type}"`, t), V0() && Te(t)));
|
|
6235
6235
|
}
|
|
6236
6236
|
t[s] = n;
|
|
6237
6237
|
}
|
|
@@ -6298,7 +6298,7 @@ var Od;
|
|
|
6298
6298
|
((s) => {
|
|
6299
6299
|
s.experimentalSmartHierarchyUpdate = !1;
|
|
6300
6300
|
})(Od || (Od = {}));
|
|
6301
|
-
function
|
|
6301
|
+
function ma(s, e) {
|
|
6302
6302
|
try {
|
|
6303
6303
|
e || s();
|
|
6304
6304
|
} catch (t) {
|
|
@@ -6350,7 +6350,7 @@ Did you add and remove a component in the same frame?`), Me.splice(e, 1), e--;
|
|
|
6350
6350
|
} catch (i) {
|
|
6351
6351
|
console.error(i);
|
|
6352
6352
|
}
|
|
6353
|
-
t.__internalAwake !== void 0 && (t.gameObject || console.error("Calling awake for a component without a GameObject", t, t.gameObject), sc(t.gameObject), t.activeAndEnabled &&
|
|
6353
|
+
t.__internalAwake !== void 0 && (t.gameObject || console.error("Calling awake for a component without a GameObject", t, t.gameObject), sc(t.gameObject), t.activeAndEnabled && ma(t.__internalAwake.bind(t)));
|
|
6354
6354
|
} catch (t) {
|
|
6355
6355
|
console.error(t), ms(Me[e], s), Me.splice(e, 1), e--;
|
|
6356
6356
|
}
|
|
@@ -6358,7 +6358,7 @@ Did you add and remove a component in the same frame?`), Me.splice(e, 1), e--;
|
|
|
6358
6358
|
try {
|
|
6359
6359
|
const t = Me[e];
|
|
6360
6360
|
if (t.destroyed || t.enabled === !1 || (sc(t.gameObject), t.activeAndEnabled === !1)) continue;
|
|
6361
|
-
t.__internalEnable !== void 0 && (t.enabled = !0,
|
|
6361
|
+
t.__internalEnable !== void 0 && (t.enabled = !0, ma(t.__internalEnable.bind(t)));
|
|
6362
6362
|
} catch (t) {
|
|
6363
6363
|
console.error(t), ms(Me[e], s), Me.splice(e, 1), e--;
|
|
6364
6364
|
}
|
|
@@ -6385,7 +6385,7 @@ function Y0(s, e) {
|
|
|
6385
6385
|
const i = s.new_script_start[t];
|
|
6386
6386
|
if (e !== void 0 && i.gameObject !== e || i.destroyed || i.activeAndEnabled === !1)
|
|
6387
6387
|
continue;
|
|
6388
|
-
|
|
6388
|
+
ma(i.__internalAwake.bind(i)), i.enabled && (ma(i.__internalEnable.bind(i)), ma(i.__internalStart.bind(i)), s.new_script_start.splice(t, 1), t--);
|
|
6389
6389
|
} catch (i) {
|
|
6390
6390
|
console.error(i), ms(s.new_script_start[t], s), s.new_script_start.splice(t, 1), t--;
|
|
6391
6391
|
}
|
|
@@ -6436,7 +6436,7 @@ function K0(s, e, t, i = 0) {
|
|
|
6436
6436
|
}
|
|
6437
6437
|
const r = s[po] !== e;
|
|
6438
6438
|
r && (s[po] = e, SP && console.warn("ACTIVE CHANGE", s.name, n, s.visible, e, "changed?" + r, s), OP(s, (l) => {
|
|
6439
|
-
e ? l.enabled && (
|
|
6439
|
+
e ? l.enabled && (ma(l.__internalAwake.bind(l)), l.enabled && l.__internalEnable()) : l.__didAwake && l.enabled && (l.__didEnable = !1, l.onDisable());
|
|
6440
6440
|
}));
|
|
6441
6441
|
let a = !0;
|
|
6442
6442
|
if (s.children)
|
|
@@ -6607,7 +6607,7 @@ function ev(s, e, t, i) {
|
|
|
6607
6607
|
if (l.guid) {
|
|
6608
6608
|
Md && console.log("[Local] new instance", "gameobject:", r?.guid);
|
|
6609
6609
|
const c = new AP(n.guid, l.guid);
|
|
6610
|
-
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 at ? o.rotation = new $().setFromEuler(o.rotation) : o.rotation instanceof Array && (o.rotation = new $().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 &&
|
|
6610
|
+
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 at ? o.rotation = new $().setFromEuler(o.rotation) : o.rotation instanceof Array && (o.rotation = new $().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 && Zr.push(new WeakRef(l)), e?.context?.connection.send("new-instance-created", c);
|
|
6611
6611
|
} else console.warn("Missing guid, can not send new instance event", l);
|
|
6612
6612
|
}
|
|
6613
6613
|
return r;
|
|
@@ -6615,7 +6615,7 @@ function ev(s, e, t, i) {
|
|
|
6615
6615
|
function IP() {
|
|
6616
6616
|
return Math.random() * 9999999;
|
|
6617
6617
|
}
|
|
6618
|
-
const
|
|
6618
|
+
const Zr = new Array();
|
|
6619
6619
|
function LP(s) {
|
|
6620
6620
|
s.connection.beginListen("new-instance-created", async (e) => {
|
|
6621
6621
|
const t = await BP(e.originalGuid, s.scene);
|
|
@@ -6627,21 +6627,21 @@ function LP(s) {
|
|
|
6627
6627
|
}
|
|
6628
6628
|
const i = new Kn();
|
|
6629
6629
|
e.position && (i.position = new y(e.position.x, e.position.y, e.position.z)), e.rotation && (i.rotation = new $(e.rotation.x, e.rotation.y, e.rotation.z, e.rotation.w)), e.scale && (i.scale = new y(e.scale.x, e.scale.y, e.scale.z)), i.parent = e.parent, e.seed && (i.idProvider = new Dt(e.seed)), i.visible = e.visible, i.context = s, Md && s.alias && console.log("[Remote] instantiate in: " + s.alias);
|
|
6630
|
-
const n =
|
|
6631
|
-
|
|
6630
|
+
const n = ja(t, i);
|
|
6631
|
+
Zr.push(new WeakRef(n)), n && (e.parent === "scene" && s.scene.add(n), Md && console.log("[Remote] new instance", "gameobject:", n?.guid, t));
|
|
6632
6632
|
}), s.connection.beginListen("left-room", () => {
|
|
6633
|
-
|
|
6634
|
-
for (const e of
|
|
6633
|
+
Zr.length > 0 && console.debug(`Left networking room, cleaning up ${Zr.length} instantiated objects`);
|
|
6634
|
+
for (const e of Zr) {
|
|
6635
6635
|
const t = e.deref();
|
|
6636
6636
|
t && t.destroy();
|
|
6637
6637
|
}
|
|
6638
|
-
|
|
6638
|
+
Zr.length = 0;
|
|
6639
6639
|
});
|
|
6640
6640
|
}
|
|
6641
6641
|
function DP(s, e) {
|
|
6642
6642
|
const t = IP(), i = e ?? new Kn();
|
|
6643
6643
|
i.idProvider = new Dt(t);
|
|
6644
|
-
const n =
|
|
6644
|
+
const n = ja(s, i);
|
|
6645
6645
|
return { seed: t, instance: n };
|
|
6646
6646
|
}
|
|
6647
6647
|
const tv = {};
|
|
@@ -7113,7 +7113,7 @@ function Zp(s, e, t, i, n) {
|
|
|
7113
7113
|
if (!h.$serializedTypes && r.prototype.$serializedTypes && (h.$serializedTypes = r.prototype.$serializedTypes), h.$serializedTypes && Kp(h, s, t), n && r !== void 0)
|
|
7114
7114
|
try {
|
|
7115
7115
|
let d = null;
|
|
7116
|
-
i.serializer && (d = i.serializer.onDeserialize(s, t)), d || (d = new r(), mt && console.log("Create concrete instance for persistent asset", n, "instance:", d),
|
|
7116
|
+
i.serializer && (d = i.serializer.onDeserialize(s, t)), d || (d = new r(), mt && console.log("Create concrete instance for persistent asset", n, "instance:", d), Ia(d, n)), n.__concreteInstance = d, n = d;
|
|
7117
7117
|
} catch (d) {
|
|
7118
7118
|
console.error("Error creating instance or creating values on instance", d, n, r);
|
|
7119
7119
|
}
|
|
@@ -7155,7 +7155,7 @@ function JP(s) {
|
|
|
7155
7155
|
return ed;
|
|
7156
7156
|
}
|
|
7157
7157
|
const Jp = Symbol("assigned component properties");
|
|
7158
|
-
function
|
|
7158
|
+
function Ia(s, e, t, i) {
|
|
7159
7159
|
if (e == null || s == null) return;
|
|
7160
7160
|
s[Jp] = !0;
|
|
7161
7161
|
const n = s.constructor?.name ?? "unknown";
|
|
@@ -7269,11 +7269,11 @@ function cv(s, e) {
|
|
|
7269
7269
|
return t < 0 || (rg.dispatchComponentLifecycleEvent("removing-component", e), e.gameObject = null, s.userData.components.splice(t, 1)), e;
|
|
7270
7270
|
}
|
|
7271
7271
|
function gu(s, e, t) {
|
|
7272
|
-
const i =
|
|
7272
|
+
const i = Wa(s, e);
|
|
7273
7273
|
return i || Un(s, e, t);
|
|
7274
7274
|
}
|
|
7275
7275
|
const hv = new Dt("addComponentIdProvider");
|
|
7276
|
-
function
|
|
7276
|
+
function ga(s, e, t = !0) {
|
|
7277
7277
|
s.userData || (s.userData = {}), s.userData.components || (s.userData.components = []), s.userData.components.push(e), e.gameObject = s, (e.guid === void 0 || e.guid === "invalid") && (e.guid = hv.generateUUID()), dg(s), mg(e, e.context);
|
|
7278
7278
|
try {
|
|
7279
7279
|
t && e.__internalAwake && (sc(s), e.activeAndEnabled && e.__internalAwake()), rg.dispatchComponentLifecycleEvent("component-added", e);
|
|
@@ -7287,7 +7287,7 @@ function Un(s, e, t, i) {
|
|
|
7287
7287
|
const n = new e();
|
|
7288
7288
|
t && n.__internalNewInstanceCreated(t);
|
|
7289
7289
|
let o = !0;
|
|
7290
|
-
return i?.callAwake != null && (o = i.callAwake),
|
|
7290
|
+
return i?.callAwake != null && (o = i.callAwake), ga(s, n, o);
|
|
7291
7291
|
}
|
|
7292
7292
|
if (e.destroyed)
|
|
7293
7293
|
return console.warn("Can not move/add a destroyed component", e), e;
|
|
@@ -7331,7 +7331,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects
|
|
|
7331
7331
|
}
|
|
7332
7332
|
return t || null;
|
|
7333
7333
|
}
|
|
7334
|
-
function
|
|
7334
|
+
function Wa(s, e) {
|
|
7335
7335
|
const t = dv(s, e);
|
|
7336
7336
|
return t ? Array.isArray(t) ? t[0] : t : null;
|
|
7337
7337
|
}
|
|
@@ -7340,7 +7340,7 @@ function yu(s, e, t, i = !0) {
|
|
|
7340
7340
|
}
|
|
7341
7341
|
function _u(s, e, t) {
|
|
7342
7342
|
if (t === !1 && s[po] === !1) return null;
|
|
7343
|
-
const i =
|
|
7343
|
+
const i = Wa(s, e);
|
|
7344
7344
|
if (t === !1 && i?.enabled === !1) return null;
|
|
7345
7345
|
if (i) return i;
|
|
7346
7346
|
for (let n = 0; n < s?.children?.length; n++) {
|
|
@@ -7364,7 +7364,7 @@ function Td(s, e) {
|
|
|
7364
7364
|
}
|
|
7365
7365
|
return null;
|
|
7366
7366
|
}
|
|
7367
|
-
const t =
|
|
7367
|
+
const t = Wa(s, e);
|
|
7368
7368
|
return t || (s.parent ? Td(s.parent, e) : null);
|
|
7369
7369
|
}
|
|
7370
7370
|
function hg(s, e, t, i = !0) {
|
|
@@ -7426,7 +7426,7 @@ k.prototype.getOrAddComponent = function(s, e) {
|
|
|
7426
7426
|
return gu(this, s, e);
|
|
7427
7427
|
};
|
|
7428
7428
|
k.prototype.getComponent = function(s) {
|
|
7429
|
-
return
|
|
7429
|
+
return Wa(this, s);
|
|
7430
7430
|
};
|
|
7431
7431
|
k.prototype.getComponents = function(s, e) {
|
|
7432
7432
|
return yu(this, s, e);
|
|
@@ -7561,14 +7561,14 @@ function uv(s, e) {
|
|
|
7561
7561
|
return wc(s, e, !0, !0);
|
|
7562
7562
|
}
|
|
7563
7563
|
const fv = Symbol("isDestroyed");
|
|
7564
|
-
function
|
|
7564
|
+
function La(s) {
|
|
7565
7565
|
return s[fv];
|
|
7566
7566
|
}
|
|
7567
7567
|
function mO(s, e) {
|
|
7568
7568
|
s[fv] = e;
|
|
7569
7569
|
}
|
|
7570
7570
|
const em = Symbol("isDontDestroy");
|
|
7571
|
-
function
|
|
7571
|
+
function wl(s, e = !0) {
|
|
7572
7572
|
s[em] = e;
|
|
7573
7573
|
}
|
|
7574
7574
|
const nd = [], sd = [];
|
|
@@ -7607,7 +7607,7 @@ function tm(s, e = !0, t = !0) {
|
|
|
7607
7607
|
tm(r, e, !1);
|
|
7608
7608
|
t && n.removeFromParent();
|
|
7609
7609
|
}
|
|
7610
|
-
function
|
|
7610
|
+
function Da(s, e, t = !0) {
|
|
7611
7611
|
return pv(s, e, t);
|
|
7612
7612
|
}
|
|
7613
7613
|
function* fg(s, e, t = !1, i = 999, n = 0) {
|
|
@@ -7644,7 +7644,7 @@ function pv(s, e, t, i = 0) {
|
|
|
7644
7644
|
}
|
|
7645
7645
|
}
|
|
7646
7646
|
}
|
|
7647
|
-
function
|
|
7647
|
+
function ja(s, e) {
|
|
7648
7648
|
if ("isAssetReference" in s)
|
|
7649
7649
|
return s.instantiate(e ?? void 0);
|
|
7650
7650
|
let t = null;
|
|
@@ -7731,7 +7731,7 @@ function mv(s, e, t, i, n, o) {
|
|
|
7731
7731
|
return l;
|
|
7732
7732
|
}
|
|
7733
7733
|
function gO(s, e, t) {
|
|
7734
|
-
|
|
7734
|
+
Ia(e, s, void 0, {
|
|
7735
7735
|
// onAssigned: (target, key, _oldValue, value) => {
|
|
7736
7736
|
// if (value !== null && typeof value === "object") {
|
|
7737
7737
|
// const serializable = target as ISerializable;
|
|
@@ -7839,7 +7839,7 @@ function P_(s, e, t, i) {
|
|
|
7839
7839
|
return t.__internalOnInstantiate(i);
|
|
7840
7840
|
}
|
|
7841
7841
|
}
|
|
7842
|
-
var
|
|
7842
|
+
var Ba;
|
|
7843
7843
|
((s) => {
|
|
7844
7844
|
s.baseUrl = "https://networking.needle.tools";
|
|
7845
7845
|
function i(h) {
|
|
@@ -7944,7 +7944,7 @@ var ja;
|
|
|
7944
7944
|
return p instanceof ArrayBuffer ? new Uint8Array(p) : (console.error("Download failed, no arraybuffer returned"), null);
|
|
7945
7945
|
}
|
|
7946
7946
|
s.download = c;
|
|
7947
|
-
})(
|
|
7947
|
+
})(Ba || (Ba = {}));
|
|
7948
7948
|
const Ws = x("debugaddressables");
|
|
7949
7949
|
class bO {
|
|
7950
7950
|
_context;
|
|
@@ -8075,7 +8075,7 @@ class ne {
|
|
|
8075
8075
|
return e === this.url && (this.mustLoad && await this.loadAssetAsync(), this.asset) ? this.asset : null;
|
|
8076
8076
|
}
|
|
8077
8077
|
get mustLoad() {
|
|
8078
|
-
return !this.asset || this.asset.__destroyed === !0 ||
|
|
8078
|
+
return !this.asset || this.asset.__destroyed === !0 || La(this.asset) === !0;
|
|
8079
8079
|
}
|
|
8080
8080
|
_loadingPromise = null;
|
|
8081
8081
|
/**
|
|
@@ -8092,7 +8092,7 @@ class ne {
|
|
|
8092
8092
|
if (!this.mustLoad || this._isLoadingRawBinary) return null;
|
|
8093
8093
|
if (this._rawBinary !== void 0) return this._rawBinary;
|
|
8094
8094
|
this._isLoadingRawBinary = !0, Ws && console.log("Preload", this.url);
|
|
8095
|
-
const e = await
|
|
8095
|
+
const e = await Ba.download(this.url, (t) => {
|
|
8096
8096
|
this.raiseProgressEvent(t);
|
|
8097
8097
|
});
|
|
8098
8098
|
return this._rawBinary = e?.buffer ?? null, this._isLoadingRawBinary = !1, this._rawBinary;
|
|
@@ -8154,7 +8154,7 @@ class ne {
|
|
|
8154
8154
|
if (l)
|
|
8155
8155
|
return l;
|
|
8156
8156
|
} else {
|
|
8157
|
-
const a =
|
|
8157
|
+
const a = ja(this.asset, o);
|
|
8158
8158
|
if (a)
|
|
8159
8159
|
return a;
|
|
8160
8160
|
}
|
|
@@ -8210,11 +8210,11 @@ class vO extends en {
|
|
|
8210
8210
|
}
|
|
8211
8211
|
new vO();
|
|
8212
8212
|
const wO = Promise.resolve(null);
|
|
8213
|
-
class
|
|
8213
|
+
class ya {
|
|
8214
8214
|
static imageReferences = /* @__PURE__ */ new Map();
|
|
8215
8215
|
static getOrCreate(e) {
|
|
8216
|
-
let t =
|
|
8217
|
-
return t || (t = new
|
|
8216
|
+
let t = ya.imageReferences.get(e);
|
|
8217
|
+
return t || (t = new ya(e), ya.imageReferences.set(e, t)), t;
|
|
8218
8218
|
}
|
|
8219
8219
|
constructor(e) {
|
|
8220
8220
|
this.url = e;
|
|
@@ -8247,7 +8247,7 @@ class ga {
|
|
|
8247
8247
|
}
|
|
8248
8248
|
class xO extends en {
|
|
8249
8249
|
constructor() {
|
|
8250
|
-
super([
|
|
8250
|
+
super([ya], "ImageReferenceSerializer");
|
|
8251
8251
|
}
|
|
8252
8252
|
onSerialize(e, t) {
|
|
8253
8253
|
return null;
|
|
@@ -8255,16 +8255,16 @@ class xO extends en {
|
|
|
8255
8255
|
onDeserialize(e, t) {
|
|
8256
8256
|
if (typeof e == "string") {
|
|
8257
8257
|
const i = Or(t.gltfId, e);
|
|
8258
|
-
return
|
|
8258
|
+
return ya.getOrCreate(i);
|
|
8259
8259
|
}
|
|
8260
8260
|
}
|
|
8261
8261
|
}
|
|
8262
8262
|
new xO();
|
|
8263
|
-
class
|
|
8263
|
+
class _a {
|
|
8264
8264
|
static cache = /* @__PURE__ */ new Map();
|
|
8265
8265
|
static getOrCreate(e) {
|
|
8266
|
-
let t =
|
|
8267
|
-
return t || (t = new
|
|
8266
|
+
let t = _a.cache.get(e);
|
|
8267
|
+
return t || (t = new _a(e), _a.cache.set(e, t)), t;
|
|
8268
8268
|
}
|
|
8269
8269
|
/** Load the file binary data
|
|
8270
8270
|
* @returns a promise that resolves to the binary data of the file. Make sure to await this request or use `.then(res => {...})` to get the result.
|
|
@@ -8287,7 +8287,7 @@ class ya {
|
|
|
8287
8287
|
}
|
|
8288
8288
|
class SO extends en {
|
|
8289
8289
|
constructor() {
|
|
8290
|
-
super([
|
|
8290
|
+
super([_a], "FileReferenceSerializer");
|
|
8291
8291
|
}
|
|
8292
8292
|
onSerialize(e, t) {
|
|
8293
8293
|
return null;
|
|
@@ -8295,7 +8295,7 @@ class SO extends en {
|
|
|
8295
8295
|
onDeserialize(e, t) {
|
|
8296
8296
|
if (typeof e == "string") {
|
|
8297
8297
|
const i = Or(t.gltfId, e);
|
|
8298
|
-
return
|
|
8298
|
+
return _a.getOrCreate(i);
|
|
8299
8299
|
}
|
|
8300
8300
|
}
|
|
8301
8301
|
}
|
|
@@ -8367,8 +8367,8 @@ class yr {
|
|
|
8367
8367
|
continue;
|
|
8368
8368
|
}
|
|
8369
8369
|
for (const a in r.tracks) {
|
|
8370
|
-
const l = r.tracks[a], c =
|
|
8371
|
-
let h =
|
|
8370
|
+
const l = r.tracks[a], c = Pa.parseTrackName(l.name);
|
|
8371
|
+
let h = Pa.findNode(t, c.nodeName);
|
|
8372
8372
|
if (!h) {
|
|
8373
8373
|
const f = l.__objectName ?? l.name.substring(0, l.name.indexOf("."));
|
|
8374
8374
|
if (h = t.getObjectByProperty("uuid", f), !h)
|
|
@@ -8458,7 +8458,7 @@ function* PO(s) {
|
|
|
8458
8458
|
for (s.then(() => e = !1), s.catch(() => e = !1); e; )
|
|
8459
8459
|
yield;
|
|
8460
8460
|
}
|
|
8461
|
-
const O_ = "NEEDLE_lightmaps",
|
|
8461
|
+
const O_ = "NEEDLE_lightmaps", $r = x("debuglightmapsextension") || x("debuglightmaps");
|
|
8462
8462
|
var En = /* @__PURE__ */ ((s) => (s[s.Lightmap = 0] = "Lightmap", s[s.Skybox = 1] = "Skybox", s[s.Reflection = 2] = "Reflection", s))(En || {});
|
|
8463
8463
|
class OO {
|
|
8464
8464
|
get name() {
|
|
@@ -8476,17 +8476,17 @@ class OO {
|
|
|
8476
8476
|
const i = t[O_];
|
|
8477
8477
|
if (i) {
|
|
8478
8478
|
const n = i.textures;
|
|
8479
|
-
return n?.length ? (
|
|
8479
|
+
return n?.length ? ($r && console.log(i), new Promise(async (o, r) => {
|
|
8480
8480
|
const a = [];
|
|
8481
8481
|
for (const c of n)
|
|
8482
8482
|
if (c.pointer) {
|
|
8483
|
-
|
|
8483
|
+
$r && console.log(c);
|
|
8484
8484
|
let h = null;
|
|
8485
8485
|
if (c.pointer.startsWith("/textures/") || /** legacy support e.g. SOC */
|
|
8486
8486
|
c.pointer.startsWith("textures/"))
|
|
8487
|
-
|
|
8487
|
+
$r && console.log("Load texture from gltf", c.pointer), h = cg(this.parser, c.pointer).then((d) => this.resolveTexture(c, d));
|
|
8488
8488
|
else if (typeof c.pointer == "string") {
|
|
8489
|
-
|
|
8489
|
+
$r && console.log("Load texture from path", c.pointer);
|
|
8490
8490
|
const d = Or(this.source, c.pointer);
|
|
8491
8491
|
let f;
|
|
8492
8492
|
d.endsWith(".exr") ? f = new Hm(this.parser.options.manager) : d.endsWith(".hdr") ? f = new n0(this.parser.options.manager) : f = new vc(this.parser.options.manager), h = f.loadAsync(d, void 0).then((p) => this.resolveTexture(c, p));
|
|
@@ -8494,7 +8494,7 @@ class OO {
|
|
|
8494
8494
|
h && a.push(h);
|
|
8495
8495
|
}
|
|
8496
8496
|
const l = await m0(a);
|
|
8497
|
-
l?.anyFailed && L() && console.error("
|
|
8497
|
+
l?.anyFailed && (L() || $r) && console.error("[NEEDLE_lightmaps]Error during extension loading:", l), o();
|
|
8498
8498
|
})) : null;
|
|
8499
8499
|
}
|
|
8500
8500
|
}
|
|
@@ -8502,10 +8502,10 @@ class OO {
|
|
|
8502
8502
|
}
|
|
8503
8503
|
resolveTexture(e, t) {
|
|
8504
8504
|
const i = t;
|
|
8505
|
-
|
|
8505
|
+
$r && console.log("Light Texture loaded:", i), i?.isTexture && (this.registry ? (i.colorSpace = Ms, this.registry.registerTexture(this.source, e.type, i, e.index)) : console.log(En[e.type], e.pointer, i));
|
|
8506
8506
|
}
|
|
8507
8507
|
}
|
|
8508
|
-
const
|
|
8508
|
+
const Wr = !!x("debuglightmaps");
|
|
8509
8509
|
class kO {
|
|
8510
8510
|
context;
|
|
8511
8511
|
map = /* @__PURE__ */ new Map();
|
|
@@ -8516,7 +8516,7 @@ class kO {
|
|
|
8516
8516
|
this.context = e;
|
|
8517
8517
|
}
|
|
8518
8518
|
registerTexture(e, t, i, n) {
|
|
8519
|
-
|
|
8519
|
+
Wr && console.log("Registering ", En[t] + ' "' + e + '"', i), this.map.has(e) || this.map.set(e, /* @__PURE__ */ new Map());
|
|
8520
8520
|
const o = this.map.get(e), r = o?.get(t) ?? [];
|
|
8521
8521
|
r.length < n && (r.length = n + 1), vP(i, !1), r[n] = i, o?.set(t, r);
|
|
8522
8522
|
}
|
|
@@ -8524,19 +8524,19 @@ class kO {
|
|
|
8524
8524
|
return this.tryGet(e, En.Lightmap, t);
|
|
8525
8525
|
}
|
|
8526
8526
|
tryGetSkybox(e) {
|
|
8527
|
-
return
|
|
8527
|
+
return Wr && console.log("[Get Skybox]", e, this.map), this.tryGet(e, En.Skybox, 0);
|
|
8528
8528
|
}
|
|
8529
8529
|
tryGetReflection(e) {
|
|
8530
|
-
return
|
|
8530
|
+
return Wr && console.log("[Get Reflection]", e, this.map), this.tryGet(e, En.Reflection, 0);
|
|
8531
8531
|
}
|
|
8532
8532
|
tryGet(e, t, i) {
|
|
8533
8533
|
if (!e)
|
|
8534
|
-
return
|
|
8534
|
+
return Wr && console.warn("Missing source id"), null;
|
|
8535
8535
|
const n = this.map.get(e);
|
|
8536
8536
|
if (!n)
|
|
8537
|
-
return
|
|
8537
|
+
return Wr && console.warn(`[Lighting] No ${En[t]} texture entry for`, e), null;
|
|
8538
8538
|
const o = n.get(t);
|
|
8539
|
-
return o === void 0 ? (
|
|
8539
|
+
return o === void 0 ? (Wr && console.warn(`[Lighting] No ${En[t]} texture for`, e, "index", i), null) : !o?.length || o.length <= i ? null : o[i];
|
|
8540
8540
|
}
|
|
8541
8541
|
}
|
|
8542
8542
|
Gt.lights_fragment_maps = Gt.lights_fragment_maps.replace("vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );", `
|
|
@@ -9204,13 +9204,13 @@ function _v(s) {
|
|
|
9204
9204
|
case "none":
|
|
9205
9205
|
return md;
|
|
9206
9206
|
case "neutral":
|
|
9207
|
-
return
|
|
9207
|
+
return Oa;
|
|
9208
9208
|
case "aces":
|
|
9209
9209
|
return ru;
|
|
9210
9210
|
case "agx":
|
|
9211
9211
|
return ou;
|
|
9212
9212
|
case "khronos_neutral":
|
|
9213
|
-
return
|
|
9213
|
+
return Oa;
|
|
9214
9214
|
default:
|
|
9215
9215
|
console.warn("[PostProcessing] Unknown tone mapping mode", s);
|
|
9216
9216
|
return;
|
|
@@ -9686,7 +9686,7 @@ class JO {
|
|
|
9686
9686
|
borderWidth: 5e-3
|
|
9687
9687
|
});
|
|
9688
9688
|
const e = P.get("ObjectRaycaster");
|
|
9689
|
-
return e &&
|
|
9689
|
+
return e && ga(this.menu, new e()), this.menu;
|
|
9690
9690
|
}
|
|
9691
9691
|
_poweredByNeedleElement;
|
|
9692
9692
|
handleNeedleWatermark() {
|
|
@@ -9706,7 +9706,7 @@ class JO {
|
|
|
9706
9706
|
backgroundOpacity: 1
|
|
9707
9707
|
}), this._poweredByNeedleElement["needle:use_eventsystem"] = !0;
|
|
9708
9708
|
const e = new I_(this._context, () => globalThis.open("https://needle.tools", "_self"));
|
|
9709
|
-
|
|
9709
|
+
ga(this._poweredByNeedleElement, e);
|
|
9710
9710
|
const t = new Ce.Text({
|
|
9711
9711
|
textContent: "Powered by",
|
|
9712
9712
|
width: "auto",
|
|
@@ -9775,7 +9775,7 @@ class JO {
|
|
|
9775
9775
|
});
|
|
9776
9776
|
i.add(n), i["needle:use_eventsystem"] = !0;
|
|
9777
9777
|
const o = new I_(this._context, () => t.click());
|
|
9778
|
-
return
|
|
9778
|
+
return ga(i, o), new ek(this, e, t, i, n);
|
|
9779
9779
|
}
|
|
9780
9780
|
}
|
|
9781
9781
|
class ek {
|
|
@@ -11309,7 +11309,7 @@ Possible solutions:
|
|
|
11309
11309
|
if (!this._mainCamera) {
|
|
11310
11310
|
W.Current = this;
|
|
11311
11311
|
let c = null;
|
|
11312
|
-
|
|
11312
|
+
Da(this.scene, (h) => {
|
|
11313
11313
|
const d = h;
|
|
11314
11314
|
if (d?.isCamera) {
|
|
11315
11315
|
if (sc(d.gameObject), !d.activeAndEnabled) return;
|
|
@@ -11372,7 +11372,7 @@ Possible solutions:
|
|
|
11372
11372
|
if (!Array.isArray(c.file.parser.json.materials)) continue;
|
|
11373
11373
|
for (let d = 0; d < c.file.parser.json.materials.length; d++) {
|
|
11374
11374
|
const f = await c.file.parser.getDependency("material", d), p = new k();
|
|
11375
|
-
p.position.x = d * 1.1, p.position.y = h, this.scene.add(p),
|
|
11375
|
+
p.position.x = d * 1.1, p.position.y = h, this.scene.add(p), $a.createPrimitive("ShaderBall", {
|
|
11376
11376
|
parent: p,
|
|
11377
11377
|
material: f
|
|
11378
11378
|
});
|
|
@@ -12100,7 +12100,7 @@ class S extends k {
|
|
|
12100
12100
|
* @returns True if the GameObject has been destroyed
|
|
12101
12101
|
*/
|
|
12102
12102
|
static isDestroyed(e) {
|
|
12103
|
-
return
|
|
12103
|
+
return La(e);
|
|
12104
12104
|
}
|
|
12105
12105
|
/**
|
|
12106
12106
|
* Sets the active state of a GameObject
|
|
@@ -12151,7 +12151,7 @@ class S extends k {
|
|
|
12151
12151
|
* @returns The last return value of the callback
|
|
12152
12152
|
*/
|
|
12153
12153
|
static foreachComponent(e, t, i = !0) {
|
|
12154
|
-
return
|
|
12154
|
+
return Da(e, t, i);
|
|
12155
12155
|
}
|
|
12156
12156
|
/**
|
|
12157
12157
|
* Creates a new instance of the provided object that will be replicated to all connected clients
|
|
@@ -12163,7 +12163,7 @@ class S extends k {
|
|
|
12163
12163
|
return e ? ev(e, t) : null;
|
|
12164
12164
|
}
|
|
12165
12165
|
static instantiate(e, t = null) {
|
|
12166
|
-
return "isAssetReference" in e,
|
|
12166
|
+
return "isAssetReference" in e, ja(e, t);
|
|
12167
12167
|
}
|
|
12168
12168
|
/**
|
|
12169
12169
|
* Destroys an object on all connected clients (if in a networked session)
|
|
@@ -12281,7 +12281,7 @@ class S extends k {
|
|
|
12281
12281
|
* @returns The component if found, otherwise null
|
|
12282
12282
|
*/
|
|
12283
12283
|
static getComponent(e, t) {
|
|
12284
|
-
return e === null ? null :
|
|
12284
|
+
return e === null ? null : Wa(e, t);
|
|
12285
12285
|
}
|
|
12286
12286
|
/**
|
|
12287
12287
|
* Gets all components of the specified type on the provided object
|
|
@@ -12663,7 +12663,7 @@ class T {
|
|
|
12663
12663
|
* @param z Z-coordinate in world space
|
|
12664
12664
|
*/
|
|
12665
12665
|
setWorldPosition(e, t, i) {
|
|
12666
|
-
|
|
12666
|
+
Ma(this.gameObject, e, t, i);
|
|
12667
12667
|
}
|
|
12668
12668
|
/**
|
|
12669
12669
|
* Gets the rotation of this component's GameObject in world space as a quaternion
|
|
@@ -13706,7 +13706,7 @@ Exit Time: ` + c, o.hasExitTime);
|
|
|
13706
13706
|
const a = P.get(r.typeName);
|
|
13707
13707
|
if (a) {
|
|
13708
13708
|
const l = new a();
|
|
13709
|
-
l.isStateMachineBehaviour && (l._context = this.context ?? void 0,
|
|
13709
|
+
l.isStateMachineBehaviour && (l._context = this.context ?? void 0, Ia(l, r.properties), r.instance = l), tt && console.log("Created animator controller behaviour", o.name, r.typeName, r.properties, l);
|
|
13710
13710
|
} else
|
|
13711
13711
|
(tt || L()) && console.warn("Could not find AnimatorBehaviour type: " + r.typeName);
|
|
13712
13712
|
}
|
|
@@ -14284,7 +14284,7 @@ class Ds extends T {
|
|
|
14284
14284
|
if (!this._projection || n) {
|
|
14285
14285
|
Th && console.log("Create/Update Ground Projection", e.name), this._projection?.removeFromParent();
|
|
14286
14286
|
try {
|
|
14287
|
-
this._projection = new
|
|
14287
|
+
this._projection = new ka(e, this._height, this._radius, 64);
|
|
14288
14288
|
} catch (o) {
|
|
14289
14289
|
console.error("Error creating three GroundProjection", o);
|
|
14290
14290
|
return;
|
|
@@ -14457,7 +14457,7 @@ var Ik = Object.defineProperty, bg = (s, e, t, i) => {
|
|
|
14457
14457
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
14458
14458
|
return n && Ik(e, t, n), n;
|
|
14459
14459
|
};
|
|
14460
|
-
class
|
|
14460
|
+
class Va extends T {
|
|
14461
14461
|
constraintActive = !0;
|
|
14462
14462
|
locked = !1;
|
|
14463
14463
|
sources = [];
|
|
@@ -14471,13 +14471,13 @@ class Wa extends T {
|
|
|
14471
14471
|
}
|
|
14472
14472
|
bg([
|
|
14473
14473
|
u()
|
|
14474
|
-
],
|
|
14474
|
+
], Va.prototype, "constraintActive");
|
|
14475
14475
|
bg([
|
|
14476
14476
|
u()
|
|
14477
|
-
],
|
|
14477
|
+
], Va.prototype, "locked");
|
|
14478
14478
|
bg([
|
|
14479
14479
|
u(k)
|
|
14480
|
-
],
|
|
14480
|
+
], Va.prototype, "sources");
|
|
14481
14481
|
let dr = class {
|
|
14482
14482
|
bb = null;
|
|
14483
14483
|
bb_pos = 0;
|
|
@@ -15701,7 +15701,7 @@ var Xk = Object.defineProperty, Qk = (s, e, t, i) => {
|
|
|
15701
15701
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
15702
15702
|
return n && Xk(e, t, n), n;
|
|
15703
15703
|
};
|
|
15704
|
-
class
|
|
15704
|
+
class Fa extends T {
|
|
15705
15705
|
awake() {
|
|
15706
15706
|
si.createIfNoneExists(this.context);
|
|
15707
15707
|
}
|
|
@@ -15712,7 +15712,7 @@ class Ba extends T {
|
|
|
15712
15712
|
si.get(this.context)?.unregister(this);
|
|
15713
15713
|
}
|
|
15714
15714
|
}
|
|
15715
|
-
class Qi extends
|
|
15715
|
+
class Qi extends Fa {
|
|
15716
15716
|
targets = null;
|
|
15717
15717
|
raycastHits = [];
|
|
15718
15718
|
ignoreSkinnedMeshes = !1;
|
|
@@ -15739,13 +15739,13 @@ class xg extends Qi {
|
|
|
15739
15739
|
super(), this.ignoreSkinnedMeshes = !0;
|
|
15740
15740
|
}
|
|
15741
15741
|
}
|
|
15742
|
-
class
|
|
15742
|
+
class za extends Fa {
|
|
15743
15743
|
/**
|
|
15744
15744
|
* Use to disable SpatialGrabRaycaster globally
|
|
15745
15745
|
*/
|
|
15746
15746
|
static allow = !0;
|
|
15747
15747
|
performRaycast(e) {
|
|
15748
|
-
if (!K.active || !
|
|
15748
|
+
if (!K.active || !za.allow || !e?.ray) return null;
|
|
15749
15749
|
const t = e.ray.origin;
|
|
15750
15750
|
return this.context.physics.sphereOverlap(t, 0.015, !1, !0);
|
|
15751
15751
|
}
|
|
@@ -15761,14 +15761,14 @@ class Rv {
|
|
|
15761
15761
|
const i = this.tryFindCanvasGroup(e);
|
|
15762
15762
|
if (i?.isCanvasGroup === !0 && (t && (t.canvasGroup = i), i.blocksRaycasts === !1 || i.interactable === !1))
|
|
15763
15763
|
return !1;
|
|
15764
|
-
const n =
|
|
15764
|
+
const n = Da(e, (o) => {
|
|
15765
15765
|
if (o.isGraphic === !0) return o;
|
|
15766
15766
|
}, !1);
|
|
15767
15767
|
return t && n?.isGraphic === !0 && (t.graphic = n), !(n?.raycastTarget === !1 || n?.layer === 2);
|
|
15768
15768
|
}
|
|
15769
15769
|
static tryFindCanvasGroup(e) {
|
|
15770
15770
|
if (!e) return null;
|
|
15771
|
-
const t =
|
|
15771
|
+
const t = Da(e, (i) => {
|
|
15772
15772
|
if (i.activeAndEnabled) {
|
|
15773
15773
|
const n = i;
|
|
15774
15774
|
if (n.blocksRaycasts !== void 0 && n.interactable !== void 0) return n;
|
|
@@ -15794,7 +15794,7 @@ function Bd(s, e) {
|
|
|
15794
15794
|
for (const i of s.children)
|
|
15795
15795
|
Bd(i, e);
|
|
15796
15796
|
}
|
|
15797
|
-
function
|
|
15797
|
+
function Jr(s, e, t) {
|
|
15798
15798
|
s[e] === void 0 && console.warn("Field", e, "is undefined on", s);
|
|
15799
15799
|
const i = Proxy.revocable(s[e], {
|
|
15800
15800
|
// get(target, prop, receiver) {
|
|
@@ -15864,7 +15864,7 @@ class si extends T {
|
|
|
15864
15864
|
this.gameObject !== this.context.scene && (console.debug(`[Needle Engine] EventSystem is only allowed on the scene root. Disabling EventSystem on '${this.gameObject.name}'`), this.enabled = !1);
|
|
15865
15865
|
}
|
|
15866
15866
|
start() {
|
|
15867
|
-
this.context.scene.getComponent(
|
|
15867
|
+
this.context.scene.getComponent(Fa) || this.context.scene.addComponent(Qi);
|
|
15868
15868
|
}
|
|
15869
15869
|
onEnable() {
|
|
15870
15870
|
this.context.input.addEventListener(De.PointerDown, this.onPointerEvent), this.context.input.addEventListener(De.PointerUp, this.onPointerEvent), this.context.input.addEventListener(De.PointerMove, this.onPointerEvent);
|
|
@@ -15935,7 +15935,7 @@ class si extends T {
|
|
|
15935
15935
|
* For example if an event component has only an onPointerClick method we don't need to raycast during movement events
|
|
15936
15936
|
* */
|
|
15937
15937
|
shouldRaycastObject = (e) => {
|
|
15938
|
-
const t = e && "getComponent" in e ? e.getComponent(
|
|
15938
|
+
const t = e && "getComponent" in e ? e.getComponent(Fa) : null;
|
|
15939
15939
|
if (t && t != this._currentlyActiveRaycaster)
|
|
15940
15940
|
return !1;
|
|
15941
15941
|
let i = null;
|
|
@@ -16740,7 +16740,7 @@ ke([
|
|
|
16740
16740
|
u()
|
|
16741
16741
|
], ge.prototype, "enablePan", 2);
|
|
16742
16742
|
ke([
|
|
16743
|
-
u(
|
|
16743
|
+
u(Va)
|
|
16744
16744
|
], ge.prototype, "lookAtConstraint", 2);
|
|
16745
16745
|
ke([
|
|
16746
16746
|
u()
|
|
@@ -16767,7 +16767,7 @@ var iM = Object.defineProperty, nM = Object.getOwnPropertyDescriptor, Qt = (s, e
|
|
|
16767
16767
|
for (var n = i > 1 ? void 0 : i ? nM(e, t) : e, o = s.length - 1, r; o >= 0; o--)
|
|
16768
16768
|
(r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
|
|
16769
16769
|
return i && n && iM(e, t, n), n;
|
|
16770
|
-
},
|
|
16770
|
+
}, ba = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.Skybox = 1] = "Skybox", s[s.SolidColor = 2] = "SolidColor", s[s.Uninitialized = 4] = "Uninitialized", s))(ba || {});
|
|
16771
16771
|
const to = x("debugcam"), G_ = x("debugscreenpointtoray"), Ft = class Wl extends T {
|
|
16772
16772
|
/**
|
|
16773
16773
|
* Returns whether this component is a camera
|
|
@@ -16990,7 +16990,7 @@ const to = x("debugcam"), G_ = x("debugscreenpointtoray"), Ft = class Wl extends
|
|
|
16990
16990
|
}
|
|
16991
16991
|
/** @internal */
|
|
16992
16992
|
onEnable() {
|
|
16993
|
-
to && console.log(`Camera enabled: "${this.name}". ClearFlags=${
|
|
16993
|
+
to && console.log(`Camera enabled: "${this.name}". ClearFlags=${ba[this._clearFlags]}`, this), this.buildCamera(), (this.tag == "MainCamera" || !this.context.mainCameraComponent) && (this.context.setCurrentCamera(this), oM(this)), this.applyClearFlagsIfIsActiveCamera({ applySkybox: !0 });
|
|
16994
16994
|
}
|
|
16995
16995
|
/** @internal */
|
|
16996
16996
|
onDisable() {
|
|
@@ -17046,7 +17046,7 @@ const to = x("debugcam"), G_ = x("debugscreenpointtoray"), Ft = class Wl extends
|
|
|
17046
17046
|
return;
|
|
17047
17047
|
}
|
|
17048
17048
|
if (this.fieldOfView = this.fieldOfView, to) {
|
|
17049
|
-
const i = `[Camera] Apply ClearFlags: ${
|
|
17049
|
+
const i = `[Camera] Apply ClearFlags: ${ba[this._clearFlags]} - "${this.name}"`;
|
|
17050
17050
|
console.debug(i);
|
|
17051
17051
|
}
|
|
17052
17052
|
const t = this.context.domElement.getAttribute("background-image") || this.context.domElement.getAttribute("background-color");
|
|
@@ -17568,7 +17568,7 @@ class je extends T {
|
|
|
17568
17568
|
return this.connectionId === this.context.connection.connectionId;
|
|
17569
17569
|
}
|
|
17570
17570
|
}
|
|
17571
|
-
class
|
|
17571
|
+
class va {
|
|
17572
17572
|
static Pois = [];
|
|
17573
17573
|
static LastChangeTime = 0;
|
|
17574
17574
|
static Add(e, t, i = null) {
|
|
@@ -17620,7 +17620,7 @@ class zd extends T {
|
|
|
17620
17620
|
});
|
|
17621
17621
|
}
|
|
17622
17622
|
update() {
|
|
17623
|
-
if ((!this.context.connection.isConnected || this._model?.hasOwnership) && (
|
|
17623
|
+
if ((!this.context.connection.isConnected || this._model?.hasOwnership) && (va.LastChangeTime !== this._lastPoiChangedTime && (this._lastPoiChangedTime = va.LastChangeTime, this._lookDuration = 0), this.selectTarget(), this._currentTargetObject && this.context.time.frameCount % 10 === 0 && this.target)) {
|
|
17624
17624
|
const t = ee(this._currentTargetObject);
|
|
17625
17625
|
kt(this.target, t), this.context.connection.isConnected && this.avatar && (this.context.connection.send("avatar-look-target-changed", this._targetModel), this._targetModel.guid = this.avatar.guid, this._targetModel.position.copy(t));
|
|
17626
17626
|
}
|
|
@@ -17628,7 +17628,7 @@ class zd extends T {
|
|
|
17628
17628
|
selectTarget() {
|
|
17629
17629
|
if (this.context.time.time - this._lastUpdateTime > this._lookDuration) {
|
|
17630
17630
|
this._lastUpdateTime = this.context.time.time, this._lookDuration = Math.random() * 0.5 + 0.2;
|
|
17631
|
-
const t =
|
|
17631
|
+
const t = va.Pois;
|
|
17632
17632
|
if (t.length > 0) {
|
|
17633
17633
|
const i = t[Math.floor(Math.random() * t.length)];
|
|
17634
17634
|
if (i && i.obj) {
|
|
@@ -18343,7 +18343,7 @@ var CM = Object.defineProperty, PM = (s, e, t, i) => {
|
|
|
18343
18343
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
18344
18344
|
return n && CM(e, t, n), n;
|
|
18345
18345
|
};
|
|
18346
|
-
const
|
|
18346
|
+
const ea = x("debugxrflags"), Iv = x("disablexrflags");
|
|
18347
18347
|
Iv && console.warn("XRFlags are disabled");
|
|
18348
18348
|
var _s = /* @__PURE__ */ ((s) => (s[s.Never = 0] = "Never", s[s.Browser = 1] = "Browser", s[s.AR = 2] = "AR", s[s.VR = 4] = "VR", s[s.FirstPerson = 8] = "FirstPerson", s[s.ThirdPerson = 16] = "ThirdPerson", s[s.All = 4294967295] = "All", s))(_s || {});
|
|
18349
18349
|
class ni {
|
|
@@ -18353,7 +18353,7 @@ class ni {
|
|
|
18353
18353
|
return (this.Mask & e) !== 0;
|
|
18354
18354
|
}
|
|
18355
18355
|
Set(e) {
|
|
18356
|
-
|
|
18356
|
+
ea && console.warn("Set XR flag state to", e), this.Mask = e, dn.Apply();
|
|
18357
18357
|
}
|
|
18358
18358
|
Enable(e) {
|
|
18359
18359
|
this.Mask |= e, dn.Apply();
|
|
@@ -18397,11 +18397,11 @@ const Lv = class ls extends T {
|
|
|
18397
18397
|
return;
|
|
18398
18398
|
let t;
|
|
18399
18399
|
const i = e;
|
|
18400
|
-
if (i && typeof i == "number" && (console.assert(typeof i == "number", "XRFlag.UpdateVisible: state must be a number", i),
|
|
18400
|
+
if (i && typeof i == "number" && (console.assert(typeof i == "number", "XRFlag.UpdateVisible: state must be a number", i), ea && console.log(i), ls.buffer.Mask = i, e = ls.buffer), e instanceof ni ? (ea && console.warn(this.name, "use passed in mask", e.Mask, this.visibleIn), t = e.Has(this.visibleIn)) : (ea && console.log(this.name, "use global mask"), ni.Global.Has(this.visibleIn)), t !== void 0)
|
|
18401
18401
|
if (t)
|
|
18402
|
-
|
|
18402
|
+
ea && console.log(this.name, "is visible", this.gameObject.uuid), S.setActive(this.gameObject, !0);
|
|
18403
18403
|
else {
|
|
18404
|
-
if (
|
|
18404
|
+
if (ea && console.log(this.name, "is not visible", this.gameObject.uuid), !this.gameObject.visible) return;
|
|
18405
18405
|
this.gameObject.visible = !1;
|
|
18406
18406
|
}
|
|
18407
18407
|
}
|
|
@@ -18415,7 +18415,7 @@ var OM = Object.defineProperty, Ou = (s, e, t, i) => {
|
|
|
18415
18415
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
18416
18416
|
return n && OM(e, t, n), n;
|
|
18417
18417
|
};
|
|
18418
|
-
class
|
|
18418
|
+
class Ha extends T {
|
|
18419
18419
|
eyes = [];
|
|
18420
18420
|
lastBlinkTime = 0;
|
|
18421
18421
|
blinkLength = 0;
|
|
@@ -18436,16 +18436,16 @@ class Va extends T {
|
|
|
18436
18436
|
}
|
|
18437
18437
|
Ou([
|
|
18438
18438
|
u(k)
|
|
18439
|
-
],
|
|
18439
|
+
], Ha.prototype, "eyes");
|
|
18440
18440
|
Ou([
|
|
18441
18441
|
u()
|
|
18442
|
-
],
|
|
18442
|
+
], Ha.prototype, "lastBlinkTime");
|
|
18443
18443
|
Ou([
|
|
18444
18444
|
u()
|
|
18445
|
-
],
|
|
18445
|
+
], Ha.prototype, "blinkLength");
|
|
18446
18446
|
Ou([
|
|
18447
18447
|
u()
|
|
18448
|
-
],
|
|
18448
|
+
], Ha.prototype, "eyesOpen");
|
|
18449
18449
|
var kM = Object.defineProperty, Og = (s, e, t, i) => {
|
|
18450
18450
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
18451
18451
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
@@ -18836,7 +18836,7 @@ var AM = Object.defineProperty, js = (s, e, t, i) => {
|
|
|
18836
18836
|
return n && AM(e, t, n), n;
|
|
18837
18837
|
};
|
|
18838
18838
|
const X_ = x("debugcharactercontroller");
|
|
18839
|
-
class
|
|
18839
|
+
class Ga extends T {
|
|
18840
18840
|
center = new y(0, 0, 0);
|
|
18841
18841
|
radius = 0.5;
|
|
18842
18842
|
height = 2;
|
|
@@ -18881,13 +18881,13 @@ class Ha extends T {
|
|
|
18881
18881
|
}
|
|
18882
18882
|
js([
|
|
18883
18883
|
u(y)
|
|
18884
|
-
],
|
|
18884
|
+
], Ga.prototype, "center");
|
|
18885
18885
|
js([
|
|
18886
18886
|
u()
|
|
18887
|
-
],
|
|
18887
|
+
], Ga.prototype, "radius");
|
|
18888
18888
|
js([
|
|
18889
18889
|
u()
|
|
18890
|
-
],
|
|
18890
|
+
], Ga.prototype, "height");
|
|
18891
18891
|
class So extends T {
|
|
18892
18892
|
controller;
|
|
18893
18893
|
movementSpeed = 2;
|
|
@@ -18950,7 +18950,7 @@ class So extends T {
|
|
|
18950
18950
|
_raycastOptions = new Mr();
|
|
18951
18951
|
}
|
|
18952
18952
|
js([
|
|
18953
|
-
u(
|
|
18953
|
+
u(Ga)
|
|
18954
18954
|
], So.prototype, "controller");
|
|
18955
18955
|
js([
|
|
18956
18956
|
u()
|
|
@@ -18967,7 +18967,7 @@ js([
|
|
|
18967
18967
|
js([
|
|
18968
18968
|
u(Mt)
|
|
18969
18969
|
], So.prototype, "animator");
|
|
18970
|
-
var IM = Object.defineProperty,
|
|
18970
|
+
var IM = Object.defineProperty, qa = (s, e, t, i) => {
|
|
18971
18971
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
18972
18972
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
18973
18973
|
return n && IM(e, t, n), n;
|
|
@@ -19151,22 +19151,22 @@ const Ir = class Vl extends T {
|
|
|
19151
19151
|
);
|
|
19152
19152
|
}
|
|
19153
19153
|
};
|
|
19154
|
-
|
|
19154
|
+
qa([
|
|
19155
19155
|
u()
|
|
19156
19156
|
], Ir.prototype, "autoFit");
|
|
19157
|
-
|
|
19157
|
+
qa([
|
|
19158
19158
|
u()
|
|
19159
19159
|
], Ir.prototype, "darkness");
|
|
19160
|
-
|
|
19160
|
+
qa([
|
|
19161
19161
|
u()
|
|
19162
19162
|
], Ir.prototype, "opacity");
|
|
19163
|
-
|
|
19163
|
+
qa([
|
|
19164
19164
|
u()
|
|
19165
19165
|
], Ir.prototype, "blur");
|
|
19166
|
-
|
|
19166
|
+
qa([
|
|
19167
19167
|
u()
|
|
19168
19168
|
], Ir.prototype, "occludeBelowGround");
|
|
19169
|
-
|
|
19169
|
+
qa([
|
|
19170
19170
|
u()
|
|
19171
19171
|
], Ir.prototype, "backfaceShadows");
|
|
19172
19172
|
let Mu = Ir;
|
|
@@ -19483,7 +19483,7 @@ Lr([
|
|
|
19483
19483
|
Lr([
|
|
19484
19484
|
u()
|
|
19485
19485
|
], Co.prototype, "showGizmo");
|
|
19486
|
-
let
|
|
19486
|
+
let aa = Co;
|
|
19487
19487
|
class FM {
|
|
19488
19488
|
handlerA;
|
|
19489
19489
|
handlerB;
|
|
@@ -19833,7 +19833,7 @@ class Wv {
|
|
|
19833
19833
|
static geometry = new un().setFromPoints([new y(0, 0, 0), new y(0, -1, 0)]);
|
|
19834
19834
|
constructor(e) {
|
|
19835
19835
|
this._camera = e;
|
|
19836
|
-
const t = new
|
|
19836
|
+
const t = new Ca(Wv.geometry), i = t.material;
|
|
19837
19837
|
i.color = new se(0.4, 0.4, 0.4), t.layers.set(2), t.name = "line", t.scale.y = 1, this._groundLine = t;
|
|
19838
19838
|
const n = new tu(0.5, 22, 22), o = new we({ color: i.color }), r = new G(n, o);
|
|
19839
19839
|
r.visible = !1, r.layers.set(2), this._groundMarker = r;
|
|
@@ -19842,12 +19842,12 @@ class Wv {
|
|
|
19842
19842
|
if (this._selected && t)
|
|
19843
19843
|
for (const i of this._rbs)
|
|
19844
19844
|
i.wakeUp(), i.setVelocity(0, 0, 0);
|
|
19845
|
-
if (this._selected &&
|
|
19845
|
+
if (this._selected && va.Remove(t, this._selected), this._selected = e, this._context = t, this._rbs.length = 0, e ? (t.scene.add(this._groundLine), t.scene.add(this._groundMarker)) : (this._groundLine.removeFromParent(), this._groundMarker.removeFromParent()), this._selected) {
|
|
19846
19846
|
if (!t) {
|
|
19847
19847
|
console.error("DragHelper: no context");
|
|
19848
19848
|
return;
|
|
19849
19849
|
}
|
|
19850
|
-
|
|
19850
|
+
va.Add(t, this._selected, null), this._groundOffsetFactor = 0, this._hasGroundPlane = !0, this._groundOffset.set(0, 0, 0), this._requireUpdateGroundPlane = !0, this.onUpdateScreenSpacePlane();
|
|
19851
19851
|
}
|
|
19852
19852
|
}
|
|
19853
19853
|
_groundOffsetVector = new y(0, 1, 0);
|
|
@@ -19924,13 +19924,13 @@ var tr;
|
|
|
19924
19924
|
e.set(n.guid, o);
|
|
19925
19925
|
const r = new k();
|
|
19926
19926
|
r.position.y = -0.5, o.add(r);
|
|
19927
|
-
const a = new G(new
|
|
19927
|
+
const a = new G(new Sa(1, 1, 1, 1, 1, 1), new we(
|
|
19928
19928
|
{ color: 14540253, wireframe: !0, transparent: !0, opacity: 0.3 }
|
|
19929
19929
|
));
|
|
19930
19930
|
a.position.y = 0.5, r.add(a);
|
|
19931
19931
|
const l = new k();
|
|
19932
19932
|
r.add(l);
|
|
19933
|
-
const c = new G(new
|
|
19933
|
+
const c = new G(new Sa(1, 1, 1, 1, 1, 1), new we({
|
|
19934
19934
|
color: 12307660,
|
|
19935
19935
|
transparent: !0,
|
|
19936
19936
|
opacity: 0.4
|
|
@@ -19956,14 +19956,14 @@ var tr;
|
|
|
19956
19956
|
}
|
|
19957
19957
|
s.removePreview = i;
|
|
19958
19958
|
})(tr || (tr = {}));
|
|
19959
|
-
const
|
|
19959
|
+
const la = [], ad = [];
|
|
19960
19960
|
var K_;
|
|
19961
19961
|
((s) => {
|
|
19962
19962
|
function e(i, n) {
|
|
19963
19963
|
const o = { name: n?.name, priority: n?.priority ?? 0, callback: i };
|
|
19964
|
-
return
|
|
19965
|
-
const r =
|
|
19966
|
-
r >= 0 &&
|
|
19964
|
+
return la.push(o), la.sort((r, a) => r.priority === a.priority ? 0 : r.priority > a.priority ? -1 : 1), () => {
|
|
19965
|
+
const r = la.indexOf(o);
|
|
19966
|
+
r >= 0 && la.splice(r, 1);
|
|
19967
19967
|
};
|
|
19968
19968
|
}
|
|
19969
19969
|
s.onCreateCustomModelLoader = e;
|
|
@@ -20342,7 +20342,7 @@ typeof window < "u" && window.addEventListener("unhandledrejection", (s) => {
|
|
|
20342
20342
|
});
|
|
20343
20343
|
const Pn = mt, Ah = "$___Export_Components", QM = "NEEDLE_components";
|
|
20344
20344
|
class YM {
|
|
20345
|
-
[
|
|
20345
|
+
[Kr];
|
|
20346
20346
|
}
|
|
20347
20347
|
class KM {
|
|
20348
20348
|
node;
|
|
@@ -20408,7 +20408,7 @@ class Hv {
|
|
|
20408
20408
|
const d = Gn().writeBuiltinComponentData(h, this.context);
|
|
20409
20409
|
d !== null && c.push(d);
|
|
20410
20410
|
}
|
|
20411
|
-
c.length > 0 && (l[
|
|
20411
|
+
c.length > 0 && (l[Kr] = c, Pn && console.log("DID WRITE", n, "nodeIndex", r, c));
|
|
20412
20412
|
}
|
|
20413
20413
|
}
|
|
20414
20414
|
// -------------------------------------
|
|
@@ -20460,7 +20460,7 @@ class Hv {
|
|
|
20460
20460
|
}
|
|
20461
20461
|
async createComponents(e, t, i, n) {
|
|
20462
20462
|
if (!n) return;
|
|
20463
|
-
const o = n[
|
|
20463
|
+
const o = n[Kr];
|
|
20464
20464
|
if (o) {
|
|
20465
20465
|
const r = new Array();
|
|
20466
20466
|
Pn && console.log(i.name, o);
|
|
@@ -20480,7 +20480,7 @@ class Hv {
|
|
|
20480
20480
|
l && this.parser && r.push(
|
|
20481
20481
|
cg(this.parser, l).catch((c) => console.error(`Error while resolving references (see console for details)
|
|
20482
20482
|
`, c, i, l))
|
|
20483
|
-
), i.userData = i.userData || {}, i.userData[
|
|
20483
|
+
), i.userData = i.userData || {}, i.userData[Kr] = i.userData[Kr] || [], i.userData[Kr].push(l);
|
|
20484
20484
|
}
|
|
20485
20485
|
await Promise.all(r).catch((a) => {
|
|
20486
20486
|
console.error("Error while loading components", a);
|
|
@@ -20547,7 +20547,7 @@ class ZM {
|
|
|
20547
20547
|
t.layers === void 0 && (t.layers = 0), e.userData.layer = t.layers, e.layers.disableAll(), e.layers.set(t.layers), e.userData.tag = t.tag ?? "none", e.hideFlags = 0, e.userData.static = t.static ?? !1, e.visible = t.activeSelf ?? !0, e.guid = t.guid;
|
|
20548
20548
|
}
|
|
20549
20549
|
}
|
|
20550
|
-
const tb = "NEEDLE_lighting_settings",
|
|
20550
|
+
const tb = "NEEDLE_lighting_settings", ta = x("debugenvlight");
|
|
20551
20551
|
class JM {
|
|
20552
20552
|
get name() {
|
|
20553
20553
|
return tb;
|
|
@@ -20563,7 +20563,7 @@ class JM {
|
|
|
20563
20563
|
if (t) {
|
|
20564
20564
|
const i = t[tb];
|
|
20565
20565
|
if (i) {
|
|
20566
|
-
|
|
20566
|
+
ta && console.log('Loaded "' + this.name + '", src: "' + this.sourceId + '"', i);
|
|
20567
20567
|
let n;
|
|
20568
20568
|
if (e.scene.children.length === 1) {
|
|
20569
20569
|
const o = e.scene.children[0];
|
|
@@ -20596,7 +20596,7 @@ class dm extends T {
|
|
|
20596
20596
|
const t = this.environmentReflectionSource === im.Skybox ? En.Skybox : En.Reflection, i = this.context.lightmaps.tryGet(this.sourceId, t, 0);
|
|
20597
20597
|
this._hasReflection = i != null, i && this.context.sceneLighting.internalRegisterReflection(this.sourceId, i);
|
|
20598
20598
|
}
|
|
20599
|
-
this.enabled = !1, this.context.sceneLighting.internalRegisterSceneLightSettings(this),
|
|
20599
|
+
this.enabled = !1, this.context.sceneLighting.internalRegisterSceneLightSettings(this), ta && window.addEventListener("keydown", (t) => {
|
|
20600
20600
|
if (!this.destroyed)
|
|
20601
20601
|
switch (t.key) {
|
|
20602
20602
|
case "l":
|
|
@@ -20618,27 +20618,27 @@ class dm extends T {
|
|
|
20618
20618
|
return 2.2 * j.lerp(0, 1.33, t);
|
|
20619
20619
|
}
|
|
20620
20620
|
onEnable() {
|
|
20621
|
-
if (
|
|
20621
|
+
if (ta && console.warn("💡🟡 >>> Enable lighting", this.sourceId, this.enabled, this), this.ambientMode == oc.Flat) {
|
|
20622
20622
|
if (this.ambientLight && !this._ambientLightObj) {
|
|
20623
20623
|
const e = this.calculateIntensityFactor(this.ambientLight);
|
|
20624
|
-
this._ambientLightObj = new yS(this.ambientLight, this.ambientIntensity * e),
|
|
20624
|
+
this._ambientLightObj = new yS(this.ambientLight, this.ambientIntensity * e), ta && console.log("Created ambient light", this.sourceId, this._ambientLightObj, this.ambientIntensity, e);
|
|
20625
20625
|
}
|
|
20626
20626
|
this._ambientLightObj && this.gameObject.add(this._ambientLightObj);
|
|
20627
20627
|
} else if (this.ambientMode === oc.Trilight) {
|
|
20628
20628
|
if (this.ambientTrilight) {
|
|
20629
20629
|
const e = this.ambientTrilight[0], t = this.ambientTrilight[this.ambientTrilight.length - 1], i = this.calculateIntensityFactor(t);
|
|
20630
|
-
this._hemisphereLightObj = new _S(t, e, this.ambientIntensity * i), this.gameObject.add(this._hemisphereLightObj),
|
|
20630
|
+
this._hemisphereLightObj = new _S(t, e, this.ambientIntensity * i), this.gameObject.add(this._hemisphereLightObj), ta && console.log("Created hemisphere ambient light", this.sourceId, this._hemisphereLightObj, this.ambientIntensity, i);
|
|
20631
20631
|
}
|
|
20632
20632
|
} else
|
|
20633
20633
|
this._ambientLightObj && this._ambientLightObj.removeFromParent(), this._hemisphereLightObj && this._hemisphereLightObj.removeFromParent();
|
|
20634
20634
|
this.sourceId && (this.context.domElement.getAttribute("environment-image") || this.context.sceneLighting.internalEnableReflection(this.sourceId));
|
|
20635
20635
|
}
|
|
20636
20636
|
onDisable() {
|
|
20637
|
-
|
|
20637
|
+
ta && console.warn("💡⚫ <<< Disable lighting:", this.sourceId, this), this._ambientLightObj && this._ambientLightObj.removeFromParent(), this._hemisphereLightObj && this._hemisphereLightObj.removeFromParent(), this.sourceId && this.context.sceneLighting.internalDisableReflection(this.sourceId);
|
|
20638
20638
|
}
|
|
20639
20639
|
}
|
|
20640
20640
|
var Gv = /* @__PURE__ */ ((s) => (s[s.INT = 5124] = "INT", s[s.FLOAT = 5126] = "FLOAT", s[s.FLOAT_VEC2 = 35664] = "FLOAT_VEC2", s[s.FLOAT_VEC3 = 35665] = "FLOAT_VEC3", s[s.FLOAT_VEC4 = 35666] = "FLOAT_VEC4", s[s.INT_VEC2 = 35667] = "INT_VEC2", s[s.INT_VEC3 = 35668] = "INT_VEC3", s[s.INT_VEC4 = 35669] = "INT_VEC4", s[s.BOOL = 35670] = "BOOL", s[s.BOOL_VEC2 = 35671] = "BOOL_VEC2", s[s.BOOL_VEC3 = 35672] = "BOOL_VEC3", s[s.BOOL_VEC4 = 35673] = "BOOL_VEC4", s[s.FLOAT_MAT2 = 35674] = "FLOAT_MAT2", s[s.FLOAT_MAT3 = 35675] = "FLOAT_MAT3", s[s.FLOAT_MAT4 = 35676] = "FLOAT_MAT4", s[s.SAMPLER_2D = 35678] = "SAMPLER_2D", s[s.SAMPLER_3D = 35680] = "SAMPLER_3D", s[s.SAMPLER_CUBE = 35681] = "SAMPLER_CUBE", s[s.UNKNOWN = 0] = "UNKNOWN", s))(Gv || {});
|
|
20641
|
-
const Mn = x("debugcustomshader"),
|
|
20641
|
+
const Mn = x("debugcustomshader"), Vr = "NEEDLE_techniques_webgl";
|
|
20642
20642
|
class eR {
|
|
20643
20643
|
objectToWorldMatrix = new Z();
|
|
20644
20644
|
worldToObjectMatrix = new Z();
|
|
@@ -20773,7 +20773,7 @@ class Re extends Kb {
|
|
|
20773
20773
|
}
|
|
20774
20774
|
class tR {
|
|
20775
20775
|
get name() {
|
|
20776
|
-
return
|
|
20776
|
+
return Vr;
|
|
20777
20777
|
}
|
|
20778
20778
|
parser;
|
|
20779
20779
|
identifier;
|
|
@@ -20784,13 +20784,13 @@ class tR {
|
|
|
20784
20784
|
const t = this.parser.json.materials[e];
|
|
20785
20785
|
if (!t)
|
|
20786
20786
|
return Mn && console.log(e, this.parser.json.materials), null;
|
|
20787
|
-
if (!t.extensions || !t.extensions[
|
|
20787
|
+
if (!t.extensions || !t.extensions[Vr])
|
|
20788
20788
|
return Mn && console.log(`Material ${e} does not use NEEDLE_techniques_webgl`), null;
|
|
20789
20789
|
Mn && console.log(`Material ${e} uses NEEDLE_techniques_webgl`, t);
|
|
20790
|
-
const i = t.extensions[
|
|
20790
|
+
const i = t.extensions[Vr].technique;
|
|
20791
20791
|
if (i < 0)
|
|
20792
20792
|
return console.debug(`Material ${e} does not have a valid technique index`), null;
|
|
20793
|
-
const n = this.parser.json.extensions[
|
|
20793
|
+
const n = this.parser.json.extensions[Vr];
|
|
20794
20794
|
if (!n)
|
|
20795
20795
|
return Mn ? console.error("Missing shader data", this.parser.json.extensions) : console.debug("Missing custom shader data in parser.json.extensions"), null;
|
|
20796
20796
|
Mn && console.log(n);
|
|
@@ -20835,8 +20835,8 @@ class tR {
|
|
|
20835
20835
|
}
|
|
20836
20836
|
}
|
|
20837
20837
|
let p = !1;
|
|
20838
|
-
if (t.extensions && t.extensions[
|
|
20839
|
-
const w = t.extensions[
|
|
20838
|
+
if (t.extensions && t.extensions[Vr]) {
|
|
20839
|
+
const w = t.extensions[Vr];
|
|
20840
20840
|
if (w.technique === i) {
|
|
20841
20841
|
Mn && console.log(t.name, "Material Properties", w);
|
|
20842
20842
|
for (const b in w.values) {
|
|
@@ -20974,20 +20974,20 @@ class sR {
|
|
|
20974
20974
|
return e.includes("/extensions/builtin_components/") ? e.replace("/extensions/builtin_components/", "/userData/components/") : e.includes("extensions/builtin_components/") ? e.replace("extensions/builtin_components/", "/userData/components/") : e;
|
|
20975
20975
|
}
|
|
20976
20976
|
}
|
|
20977
|
-
async function um(s, e, t) {
|
|
20978
|
-
const
|
|
20979
|
-
|
|
20980
|
-
}), s.register((
|
|
20977
|
+
async function um(s, e, t, i) {
|
|
20978
|
+
const n = t.indexOf("?");
|
|
20979
|
+
n >= 0 && (t = t.substring(0, n)), i || (i = t), (i.startsWith("blob:") || i.startsWith("data:")) && console.debug("[GLTFLoader] Suspicious sourceId detected"), s.register((o) => new ZM(o)), s.register((o) => new HP(o)), s.register((o) => new OO(o, e.lightmaps, i)), s.register((o) => new JM(o, i, e)), s.register((o) => new tR(o, i)), s.register((o) => new oo(o, i)), s.register((o) => new Ve(o)), s.register((o) => new XM(o)), bP() && s.register((o) => new pa(o)), await nR.catch((o) => {
|
|
20980
|
+
}), s.register((o) => {
|
|
20981
20981
|
if (Nd) {
|
|
20982
|
-
const
|
|
20983
|
-
return
|
|
20982
|
+
const r = new Nd(o);
|
|
20983
|
+
return r.setAnimationPointerResolver.bind(r)(new sR()), r;
|
|
20984
20984
|
} else
|
|
20985
20985
|
return (iR || L()) && console.error("Missing KHR_animation_pointer extension..."), {
|
|
20986
20986
|
name: "KHR_animation_pointer_NOT_AVAILABLE"
|
|
20987
20987
|
};
|
|
20988
20988
|
});
|
|
20989
|
-
for (const
|
|
20990
|
-
|
|
20989
|
+
for (const o of _r)
|
|
20990
|
+
o.onImport && o.onImport(s, t, e);
|
|
20991
20991
|
}
|
|
20992
20992
|
function Qv(s, e) {
|
|
20993
20993
|
for (const t of _r)
|
|
@@ -20998,8 +20998,8 @@ function oR(s, e, t) {
|
|
|
20998
20998
|
i.onLoaded && i.onLoaded(s, e, t);
|
|
20999
20999
|
}
|
|
21000
21000
|
const Jt = x("debuginstancing");
|
|
21001
|
-
class
|
|
21002
|
-
static instance = new
|
|
21001
|
+
class Ua {
|
|
21002
|
+
static instance = new Ua();
|
|
21003
21003
|
/** This is the initial instance count when creating a new instancing structure.
|
|
21004
21004
|
* Override this and the number of max instances that you expect for a given object.
|
|
21005
21005
|
* The larger the value the more objects can be added without having to resize but it will also consume more memory.
|
|
@@ -21042,7 +21042,7 @@ class za {
|
|
|
21042
21042
|
if (!d.canAdd(o.geometry, r)) continue;
|
|
21043
21043
|
return d.addInstance(o);
|
|
21044
21044
|
}
|
|
21045
|
-
let a =
|
|
21045
|
+
let a = Ua.getStartInstanceCount(e);
|
|
21046
21046
|
(!a || a < 0) && (a = 4);
|
|
21047
21047
|
let l = e.name;
|
|
21048
21048
|
l?.length || (l = I1());
|
|
@@ -21059,7 +21059,7 @@ class za {
|
|
|
21059
21059
|
e.matrixWorld.multiplyMatrices = n;
|
|
21060
21060
|
}
|
|
21061
21061
|
}
|
|
21062
|
-
class
|
|
21062
|
+
class wa {
|
|
21063
21063
|
static all = [];
|
|
21064
21064
|
/** The name of the object */
|
|
21065
21065
|
get name() {
|
|
@@ -21100,7 +21100,7 @@ class va {
|
|
|
21100
21100
|
/** The mesh information of the object - this tries to also calculate the LOD info */
|
|
21101
21101
|
meshInformation;
|
|
21102
21102
|
constructor(e, t) {
|
|
21103
|
-
this.__instanceIndex = -1, this.object = e, this.renderer = t, e[Q0] = t, this.meshInformation = ir(e.geometry),
|
|
21103
|
+
this.__instanceIndex = -1, this.object = e, this.renderer = t, e[Q0] = t, this.meshInformation = ir(e.geometry), wa.all.push(this);
|
|
21104
21104
|
}
|
|
21105
21105
|
/** Calculates the mesh information again
|
|
21106
21106
|
* @returns true if the vertex count or index count has changed
|
|
@@ -21139,8 +21139,8 @@ class va {
|
|
|
21139
21139
|
*/
|
|
21140
21140
|
remove(e) {
|
|
21141
21141
|
if (!(this.__instanceIndex < 0) && (this.renderer.remove(this, e), S.markAsInstancedRendered(this.object, !1), e)) {
|
|
21142
|
-
const t =
|
|
21143
|
-
t >= 0 &&
|
|
21142
|
+
const t = wa.all.indexOf(this);
|
|
21143
|
+
t >= 0 && wa.all.splice(t, 1);
|
|
21144
21144
|
}
|
|
21145
21145
|
}
|
|
21146
21146
|
}
|
|
@@ -21218,7 +21218,7 @@ class rR {
|
|
|
21218
21218
|
Jt && console.warn("Dispose instanced renderer", this.name), this._context.scene.remove(this._batchedMesh), this._batchedMesh.dispose(), this._batchedMesh = null, this._handles = [];
|
|
21219
21219
|
}
|
|
21220
21220
|
addInstance(e) {
|
|
21221
|
-
const t = new
|
|
21221
|
+
const t = new wa(e, this);
|
|
21222
21222
|
e.castShadow === !0 && this._batchedMesh.castShadow === !1 && (this._batchedMesh.castShadow = !0), e.receiveShadow === !0 && this._batchedMesh.receiveShadow === !1 && (this._batchedMesh.receiveShadow = !0);
|
|
21223
21223
|
try {
|
|
21224
21224
|
this.add(t);
|
|
@@ -21366,7 +21366,7 @@ function ib() {
|
|
|
21366
21366
|
const s = new ft({ color: new se(Math.random(), Math.random(), Math.random()) });
|
|
21367
21367
|
return s.emissive = s.color, s.emissiveIntensity = 0.3, x("wireframe") && (s.wireframe = !0), s;
|
|
21368
21368
|
}
|
|
21369
|
-
const
|
|
21369
|
+
const Hr = x("debuglightmaps");
|
|
21370
21370
|
let ep = 0;
|
|
21371
21371
|
const tp = Symbol("lightmap-material-version");
|
|
21372
21372
|
class Yv {
|
|
@@ -21397,9 +21397,9 @@ class Yv {
|
|
|
21397
21397
|
init(e, t, i) {
|
|
21398
21398
|
console.assert(this.gameObject !== void 0 && this.gameObject !== null, "Missing gameobject", this), this.lightmapIndex = e, !(this.lightmapIndex < 0) && (this.lightmapScaleOffset = t, this.lightmapTexture = i, Ve.assignTextureLOD(i, 0).then((n) => {
|
|
21399
21399
|
n?.isTexture && (this.lightmapTexture = n);
|
|
21400
|
-
}),
|
|
21400
|
+
}), Hr == "show" ? (console.log("Lightmap:", this.gameObject.name, e, `
|
|
21401
21401
|
ScaleOffset:`, t, `
|
|
21402
|
-
Texture:`, i), this.setLightmapDebugMaterial()) :
|
|
21402
|
+
Texture:`, i), this.setLightmapDebugMaterial()) : Hr && console.log("Use debuglightmaps=show to render lightmaps only in the scene."), this.applyLightmap());
|
|
21403
21403
|
}
|
|
21404
21404
|
updateLightmapUniforms(e) {
|
|
21405
21405
|
const t = e.uniforms;
|
|
@@ -21410,7 +21410,7 @@ Texture:`, i), this.setLightmapDebugMaterial()) : Vr && console.log("Use debugli
|
|
|
21410
21410
|
*/
|
|
21411
21411
|
applyLightmap() {
|
|
21412
21412
|
if (this.gameObject.type === "Object3D") {
|
|
21413
|
-
|
|
21413
|
+
Hr && console.warn("Can not add lightmap. Is this object missing a renderer?", this.gameObject.name);
|
|
21414
21414
|
return;
|
|
21415
21415
|
}
|
|
21416
21416
|
const e = this.gameObject;
|
|
@@ -21436,17 +21436,17 @@ Texture:`, i), this.setLightmapDebugMaterial()) : Vr && console.log("Use debugli
|
|
|
21436
21436
|
}
|
|
21437
21437
|
ensureLightmapMaterial(e, t) {
|
|
21438
21438
|
if (e.userData || (e.userData = {}), this.clonedMaterials[t] !== e) {
|
|
21439
|
-
|
|
21439
|
+
Hr && (++ep, ep++ < 1e3 ? console.warn(`Cloning material for lightmap ${this.renderer.name}: '${e.name}'`) : ep === 1e3 && console.warn("Further material cloning for lightmaps suppressed to avoid flooding the console."));
|
|
21440
21440
|
const i = e.clone();
|
|
21441
21441
|
i.name?.includes("(lightmap)") || (i.name = e.name + " (lightmap)"), e = i, e.onBeforeCompile = this.onBeforeCompile, this.clonedMaterials[t] = e;
|
|
21442
21442
|
}
|
|
21443
21443
|
return e;
|
|
21444
21444
|
}
|
|
21445
21445
|
assignLightmapTexture(e) {
|
|
21446
|
-
!e || e instanceof Lp && e.transmission > 0 || !(e.lightMap !== this.lightmapTexture || e[tp] !== e.version) || (
|
|
21446
|
+
!e || e instanceof Lp && e.transmission > 0 || !(e.lightMap !== this.lightmapTexture || e[tp] !== e.version) || (Hr && console.log(`Assigning lightmap texture ${this.renderer.name}: '${e.name}' (${e.version} ${e[tp]})`), e.lightMap = this.lightmapTexture, e.needsUpdate = !0, e[tp] = e.version);
|
|
21447
21447
|
}
|
|
21448
21448
|
onBeforeCompile = (e, t) => {
|
|
21449
|
-
|
|
21449
|
+
Hr === "verbose" && console.log(`Lightmaps, before compile
|
|
21450
21450
|
`, e), this.lightmapScaleOffsetUniform.value = this.lightmapScaleOffset, this.lightmapUniform.value = this.lightmapTexture, e.uniforms.lightmapScaleOffset = this.lightmapScaleOffsetUniform;
|
|
21451
21451
|
};
|
|
21452
21452
|
setLightmapDebugMaterial() {
|
|
@@ -21487,7 +21487,7 @@ var aR = Object.defineProperty, Bs = (s, e, t, i) => {
|
|
|
21487
21487
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
21488
21488
|
return n && aR(e, t, n), n;
|
|
21489
21489
|
};
|
|
21490
|
-
const
|
|
21490
|
+
const ia = x("debugrenderer"), nb = x("debugskinnedmesh"), sb = x("noinstancing"), lR = x("wireframe");
|
|
21491
21491
|
class cR {
|
|
21492
21492
|
path = null;
|
|
21493
21493
|
asset = null;
|
|
@@ -21503,7 +21503,7 @@ class hR {
|
|
|
21503
21503
|
return this._changed;
|
|
21504
21504
|
}
|
|
21505
21505
|
set changed(e) {
|
|
21506
|
-
e === !0 &&
|
|
21506
|
+
e === !0 && ia && console.warn("SharedMaterials have changed: " + this._renderer.name), this._changed = e;
|
|
21507
21507
|
}
|
|
21508
21508
|
is(e) {
|
|
21509
21509
|
return this._renderer === e;
|
|
@@ -21597,7 +21597,7 @@ const Zn = class ld extends T {
|
|
|
21597
21597
|
* @returns true if the object is rendered using instancing
|
|
21598
21598
|
*/
|
|
21599
21599
|
static isInstanced(e) {
|
|
21600
|
-
const t =
|
|
21600
|
+
const t = Wa(e, ld);
|
|
21601
21601
|
return t ? t.isInstancingActive : fn.isUsingInstancing(e);
|
|
21602
21602
|
}
|
|
21603
21603
|
/** Set the rendering state only of an object (makes it visible or invisible) without affecting component state or child hierarchy visibility! You can also just enable/disable the Renderer component on that object for the same effect!
|
|
@@ -21712,7 +21712,7 @@ const Zn = class ld extends T {
|
|
|
21712
21712
|
this.enabled || this.setVisibility(!1);
|
|
21713
21713
|
}
|
|
21714
21714
|
awake() {
|
|
21715
|
-
if (this._firstFrame = this.context.time.frame,
|
|
21715
|
+
if (this._firstFrame = this.context.time.frame, ia && console.log("Renderer ", this.name, this), this.clearInstancingState(), this.probeAnchor && ia && this.probeAnchor.add(new xi(0.2)), this._reflectionProbe = null, this.isMultiMaterialObject(this.gameObject)) {
|
|
21716
21716
|
for (const e of this.gameObject.children)
|
|
21717
21717
|
this.context.addBeforeRenderListener(e, this.onBeforeRenderThree), e.layers.mask = this.gameObject.layers.mask;
|
|
21718
21718
|
if (this.renderOrder !== void 0) {
|
|
@@ -21743,7 +21743,7 @@ const Zn = class ld extends T {
|
|
|
21743
21743
|
const t = new Yv(this);
|
|
21744
21744
|
t.init(this.lightmapIndex, this.lightmapScaleOffset, e), this._lightmaps.push(t);
|
|
21745
21745
|
} else
|
|
21746
|
-
|
|
21746
|
+
ia && console.warn(`[Renderer] No lightmaps found ${this.name} (${this.sourceId}, ${this.lightmapIndex})`);
|
|
21747
21747
|
}
|
|
21748
21748
|
}
|
|
21749
21749
|
_isInstancingEnabled = !1;
|
|
@@ -21771,7 +21771,7 @@ const Zn = class ld extends T {
|
|
|
21771
21771
|
if (this._isInstancingEnabled === e) return e && (this._handles === void 0 || this._handles != null && this._handles.length > 0);
|
|
21772
21772
|
if (this._isInstancingEnabled = e, e) {
|
|
21773
21773
|
if (this.enableInstancing === void 0 && (this.enableInstancing = !0), this._handles === void 0) {
|
|
21774
|
-
if (this._handles =
|
|
21774
|
+
if (this._handles = Ua.instance.setup(this, this.gameObject, this.context, null, { rend: this, foundMeshes: 0, useMatrixWorldAutoUpdate: this.useInstanceMatrixWorldAutoUpdate() }), this._handles)
|
|
21775
21775
|
return S.markAsInstancedRendered(this.gameObject, !0), !0;
|
|
21776
21776
|
} else if (this._handles !== null) {
|
|
21777
21777
|
for (const t of this._handles)
|
|
@@ -21817,7 +21817,7 @@ const Zn = class ld extends T {
|
|
|
21817
21817
|
}
|
|
21818
21818
|
onBeforeRender() {
|
|
21819
21819
|
if (this.gameObject) {
|
|
21820
|
-
if (this._probeAnchorLastFrame !== this.probeAnchor && (this._reflectionProbe?.onUnset(this), this.updateReflectionProbe()),
|
|
21820
|
+
if (this._probeAnchorLastFrame !== this.probeAnchor && (this._reflectionProbe?.onUnset(this), this.updateReflectionProbe()), ia == this.name && this.gameObject instanceof G) {
|
|
21821
21821
|
this.gameObject.geometry.computeBoundingSphere();
|
|
21822
21822
|
const e = F(this.gameObject.geometry.boundingSphere.center).applyMatrix4(this.gameObject.matrixWorld);
|
|
21823
21823
|
z.DrawWireSphere(e, this.gameObject.geometry.boundingSphere.radius, 56831);
|
|
@@ -21841,7 +21841,7 @@ const Zn = class ld extends T {
|
|
|
21841
21841
|
if (this.reflectionProbeUsage !== 0 && this._reflectionProbe && (this._lightmaps?.length || this._reflectionProbe.onSet(this)), this._sharedMaterials)
|
|
21842
21842
|
for (const e of this._sharedMaterials)
|
|
21843
21843
|
e && "envMap" in e && "envMapIntensity" in e && !Ud.isUsingReflectionProbe(e) && (e.envMap = this.context.scene.environment, e.envMapIntensity = this.context.scene.environmentIntensity, e.envMapRotation = this.context.scene.environmentRotation);
|
|
21844
|
-
else
|
|
21844
|
+
else ia && console.warn("[Renderer] sharedMaterials not initialized yet: " + this.name);
|
|
21845
21845
|
}
|
|
21846
21846
|
}
|
|
21847
21847
|
onBeforeRenderThree = (e, t, i, n, o, r) => {
|
|
@@ -21956,7 +21956,7 @@ class Kv extends Tu {
|
|
|
21956
21956
|
this._needUpdateBoundingSphere = !0;
|
|
21957
21957
|
}
|
|
21958
21958
|
}
|
|
21959
|
-
var dR = Object.defineProperty,
|
|
21959
|
+
var dR = Object.defineProperty, Xa = (s, e, t, i) => {
|
|
21960
21960
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
21961
21961
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
21962
21962
|
return n && dR(e, t, n), n;
|
|
@@ -22133,7 +22133,7 @@ class Po extends T {
|
|
|
22133
22133
|
if (n) {
|
|
22134
22134
|
this.dispatchEvent(new CustomEvent("file-dropped", { detail: i })), t.file = i;
|
|
22135
22135
|
const o = this.onObjectLoaded(n, t, !1);
|
|
22136
|
-
o && this.context.connection.isConnected && this.useNetworking && (console.debug("Uploading dropped file to blob storage"),
|
|
22136
|
+
o && this.context.connection.isConnected && this.useNetworking && (console.debug("Uploading dropped file to blob storage"), Ba.upload(i, { abort: this._abort?.signal }).then((r) => {
|
|
22137
22137
|
r?.download_url && this._addedObjects.includes(o) && this.sendDropEvent(r.download_url, o, n.contentMD5);
|
|
22138
22138
|
}).catch(console.warn));
|
|
22139
22139
|
break;
|
|
@@ -22243,22 +22243,22 @@ class Po extends T {
|
|
|
22243
22243
|
return !!(this.dropArea && this.dropArea.contains(n.object));
|
|
22244
22244
|
}
|
|
22245
22245
|
}
|
|
22246
|
-
|
|
22246
|
+
Xa([
|
|
22247
22247
|
u(k)
|
|
22248
22248
|
], Po.prototype, "dropArea");
|
|
22249
|
-
|
|
22249
|
+
Xa([
|
|
22250
22250
|
u()
|
|
22251
22251
|
], Po.prototype, "fitIntoVolume");
|
|
22252
|
-
|
|
22252
|
+
Xa([
|
|
22253
22253
|
u(y)
|
|
22254
22254
|
], Po.prototype, "fitVolumeSize");
|
|
22255
|
-
|
|
22255
|
+
Xa([
|
|
22256
22256
|
u()
|
|
22257
22257
|
], Po.prototype, "placeAtHitPosition");
|
|
22258
|
-
|
|
22258
|
+
Xa([
|
|
22259
22259
|
u()
|
|
22260
22260
|
], Po.prototype, "useNetworking");
|
|
22261
|
-
|
|
22261
|
+
Xa([
|
|
22262
22262
|
u(he)
|
|
22263
22263
|
], Po.prototype, "onDropped");
|
|
22264
22264
|
function pR(s) {
|
|
@@ -22273,7 +22273,7 @@ var $d;
|
|
|
22273
22273
|
return URL.revokeObjectURL(c), h ? new Promise((d, f) => {
|
|
22274
22274
|
const p = new FileReader();
|
|
22275
22275
|
p.readAsArrayBuffer(i), p.onloadend = async (g) => {
|
|
22276
|
-
const _ = p.result, m =
|
|
22276
|
+
const _ = p.result, m = Ba.hashMD5(_);
|
|
22277
22277
|
return d({ model: h, contentMD5: m });
|
|
22278
22278
|
};
|
|
22279
22279
|
}) : (console.warn(`Failed to load "${i.name}" (${i.type})`), null);
|
|
@@ -22292,7 +22292,7 @@ var $d;
|
|
|
22292
22292
|
c.onProgress(d.loaded / d.total);
|
|
22293
22293
|
}).catch(console.warn);
|
|
22294
22294
|
if (h) {
|
|
22295
|
-
const d = await fetch(l).then((p) => p.arrayBuffer()), f =
|
|
22295
|
+
const d = await fetch(l).then((p) => p.arrayBuffer()), f = Ba.hashMD5(d);
|
|
22296
22296
|
ti ? setTimeout(() => tr.removePreview(n.guid), 3e3) : tr.removePreview(n.guid), o({ model: h, contentMD5: f });
|
|
22297
22297
|
} else
|
|
22298
22298
|
ti ? setTimeout(() => tr.removePreview(n.guid), 3e3) : tr.removePreview(n.guid), console.warn("Unsupported file type: " + i.toString());
|
|
@@ -22317,15 +22317,15 @@ const Eu = class Zv extends T {
|
|
|
22317
22317
|
if (this.object === this.gameObject) {
|
|
22318
22318
|
const t = new Dt(this.guid);
|
|
22319
22319
|
this.object = S.instantiate(this.object, { idProvider: t, keepWorldPosition: !1 }), S.getComponent(this.object, Zv)?.destroy();
|
|
22320
|
-
let n = this.object.getComponentInChildren(
|
|
22321
|
-
n || (n = this.object.addComponent(
|
|
22320
|
+
let n = this.object.getComponentInChildren(aa);
|
|
22321
|
+
n || (n = this.object.addComponent(aa, {
|
|
22322
22322
|
dragMode: $v.SnapToSurfaces
|
|
22323
22323
|
}), n.guid = t.generateUUID());
|
|
22324
22324
|
let o = S.getComponent(n.gameObject, Xn);
|
|
22325
22325
|
o || (o = n.gameObject.addComponent(Xn), o.guid = t.generateUUID());
|
|
22326
22326
|
}
|
|
22327
22327
|
this.object.visible = !1;
|
|
22328
|
-
const e = this.gameObject.getComponent(
|
|
22328
|
+
const e = this.gameObject.getComponent(aa);
|
|
22329
22329
|
e && (e.enabled = !1), this._startPosition = this.object.position?.clone() ?? new y(0, 0, 0), this._startQuaternion = this.object.quaternion?.clone() ?? new $(0, 0, 0, 1);
|
|
22330
22330
|
}
|
|
22331
22331
|
this.gameObject.getComponentInParent(Qi) || this.gameObject.addComponent(Qi);
|
|
@@ -22345,7 +22345,7 @@ const Eu = class Zv extends T {
|
|
|
22345
22345
|
if (e.used || !this.object || !this.context.connection.allowEditing || e.button !== 0) return;
|
|
22346
22346
|
const t = this.handleDuplication();
|
|
22347
22347
|
if (t) {
|
|
22348
|
-
const i = S.getComponent(t,
|
|
22348
|
+
const i = S.getComponent(t, aa);
|
|
22349
22349
|
i ? (i.onPointerDown(e), this._forwardPointerEvents.set(e.event.space, i)) : L() && console.warn(`Duplicated object (${t.name}) does not have DragControls`);
|
|
22350
22350
|
} else
|
|
22351
22351
|
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.");
|
|
@@ -22488,7 +22488,7 @@ const Ih = x("debuggltfexport");
|
|
|
22488
22488
|
class sw extends Ot {
|
|
22489
22489
|
sceneRoot;
|
|
22490
22490
|
}
|
|
22491
|
-
const jg = class
|
|
22491
|
+
const jg = class na extends T {
|
|
22492
22492
|
binary = !0;
|
|
22493
22493
|
objects = [];
|
|
22494
22494
|
ext;
|
|
@@ -22496,10 +22496,10 @@ const jg = class ia extends T {
|
|
|
22496
22496
|
Ih && console.log("Exporting objects as glTF", this.objects), e || (e = "scene"), (!this.objects || this.objects.length <= 0) && (this.objects = [this.context.scene]);
|
|
22497
22497
|
const i = {
|
|
22498
22498
|
binary: this.binary,
|
|
22499
|
-
pivot:
|
|
22499
|
+
pivot: na.calculateCenter(this.objects),
|
|
22500
22500
|
...t
|
|
22501
22501
|
}, n = await this.export(this.objects, i).catch((o) => (console.error(o), !1));
|
|
22502
|
-
return n === !1 ? !1 : (this.binary ? e.endsWith(".glb") || (e += ".glb") : e.endsWith(".gltf") || (e += ".gltf"), this.binary ?
|
|
22502
|
+
return n === !1 ? !1 : (this.binary ? e.endsWith(".glb") || (e += ".glb") : e.endsWith(".gltf") || (e += ".gltf"), this.binary ? na.saveArrayBuffer(n, e) : na.saveJson(n, e), !0);
|
|
22503
22503
|
}
|
|
22504
22504
|
async export(e, t) {
|
|
22505
22505
|
if (!e || e.length <= 0) {
|
|
@@ -22507,7 +22507,7 @@ const jg = class ia extends T {
|
|
|
22507
22507
|
return;
|
|
22508
22508
|
}
|
|
22509
22509
|
const i = new o0();
|
|
22510
|
-
i.register((c) => new iw(c)), i.register((c) => new tw(c)), Qv(i, this.context),
|
|
22510
|
+
i.register((c) => new iw(c)), i.register((c) => new tw(c)), Qv(i, this.context), na.filterTopmostParent(e);
|
|
22511
22511
|
const n = {
|
|
22512
22512
|
trs: !1,
|
|
22513
22513
|
onlyVisible: !0,
|
|
@@ -22517,7 +22517,7 @@ const jg = class ia extends T {
|
|
|
22517
22517
|
// To prevent NaN value,
|
|
22518
22518
|
embedImages: !0,
|
|
22519
22519
|
includeCustomExtensions: !0,
|
|
22520
|
-
animations: t?.animations ||
|
|
22520
|
+
animations: t?.animations || na.collectAnimations(e),
|
|
22521
22521
|
...t
|
|
22522
22522
|
}, o = new Array(), r = new k();
|
|
22523
22523
|
t?.pivot && r.position.sub(t.pivot), Ih && console.log("EXPORT", e), e.forEach((c) => {
|
|
@@ -23217,7 +23217,7 @@ ${c}
|
|
|
23217
23217
|
`;
|
|
23218
23218
|
}
|
|
23219
23219
|
}
|
|
23220
|
-
const
|
|
23220
|
+
const Gr = `
|
|
23221
23221
|
`, Wt = "</StageRoot/Materials";
|
|
23222
23222
|
class TR {
|
|
23223
23223
|
str;
|
|
@@ -23229,19 +23229,19 @@ class TR {
|
|
|
23229
23229
|
this.str = "", this.indent = 0;
|
|
23230
23230
|
}
|
|
23231
23231
|
beginBlock(e = void 0, t = "{", i = !0) {
|
|
23232
|
-
e !== void 0 ? (e = this.applyIndent(e), this.str += e, i ? (this.str +=
|
|
23232
|
+
e !== void 0 ? (e = this.applyIndent(e), this.str += e, i ? (this.str += Gr, this.str += this.applyIndent(t)) : this.str += " " + t) : this.str += this.applyIndent(t), this.str += Gr, this.indent += 1;
|
|
23233
23233
|
}
|
|
23234
23234
|
closeBlock(e = "}") {
|
|
23235
|
-
this.indent -= 1, this.str += this.applyIndent(e) +
|
|
23235
|
+
this.indent -= 1, this.str += this.applyIndent(e) + Gr;
|
|
23236
23236
|
}
|
|
23237
23237
|
beginArray(e) {
|
|
23238
|
-
e = this.applyIndent(e + " = ["), this.str += e, this.str +=
|
|
23238
|
+
e = this.applyIndent(e + " = ["), this.str += e, this.str += Gr, this.indent += 1;
|
|
23239
23239
|
}
|
|
23240
23240
|
closeArray() {
|
|
23241
|
-
this.indent -= 1, this.str += this.applyIndent("]") +
|
|
23241
|
+
this.indent -= 1, this.str += this.applyIndent("]") + Gr;
|
|
23242
23242
|
}
|
|
23243
23243
|
appendLine(e = "") {
|
|
23244
|
-
e = this.applyIndent(e), this.str += e, this.str +=
|
|
23244
|
+
e = this.applyIndent(e), this.str += e, this.str += Gr;
|
|
23245
23245
|
}
|
|
23246
23246
|
toString() {
|
|
23247
23247
|
return this.str;
|
|
@@ -23503,9 +23503,9 @@ async function cd(s, e, t = null) {
|
|
|
23503
23503
|
}
|
|
23504
23504
|
}
|
|
23505
23505
|
}
|
|
23506
|
-
let Dh = null, Nt = null, ip,
|
|
23506
|
+
let Dh = null, Nt = null, ip, qr, jh;
|
|
23507
23507
|
async function LR(s, e = 1 / 0, t = null, i = void 0) {
|
|
23508
|
-
ip || (ip = new Yn(2, 2, 1, 1)),
|
|
23508
|
+
ip || (ip = new Yn(2, 2, 1, 1)), qr || (qr = new Wn({
|
|
23509
23509
|
uniforms: {
|
|
23510
23510
|
blitTexture: new Hi(s),
|
|
23511
23511
|
flipY: new Hi(!1),
|
|
@@ -23537,8 +23537,8 @@ async function LR(s, e = 1 / 0, t = null, i = void 0) {
|
|
|
23537
23537
|
gl_FragColor.rgba *= scale.rgba;
|
|
23538
23538
|
}`
|
|
23539
23539
|
}));
|
|
23540
|
-
const n =
|
|
23541
|
-
n.blitTexture.value = s, n.flipY.value = !1, n.scale.value = new fe(1, 1, 1, 1), i !== void 0 && n.scale.value.copy(i),
|
|
23540
|
+
const n = qr.uniforms;
|
|
23541
|
+
n.blitTexture.value = s, n.flipY.value = !1, n.scale.value = new fe(1, 1, 1, 1), i !== void 0 && n.scale.value.copy(i), qr.defines.IS_SRGB = s.colorSpace == Rs, qr.needsUpdate = !0, jh || (jh = new G(ip, qr), jh.frustumCulled = !1);
|
|
23542
23542
|
const o = new le(), r = new Ci();
|
|
23543
23543
|
r.add(jh), t || (t = Dh = new Pr({ antialias: !1, alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0 }));
|
|
23544
23544
|
const a = Math.min(s.image.width, e), l = Math.min(s.image.height, e);
|
|
@@ -23602,7 +23602,7 @@ function pm(s, e) {
|
|
|
23602
23602
|
function Au(s) {
|
|
23603
23603
|
return Ki(s.name || "Material") + "_" + s.id;
|
|
23604
23604
|
}
|
|
23605
|
-
function
|
|
23605
|
+
function xa(s, e) {
|
|
23606
23606
|
let t = ab(s), i = s.parent;
|
|
23607
23607
|
for (; i && i !== e; )
|
|
23608
23608
|
t = ab(i) + "/" + t, i = i.parent;
|
|
@@ -23670,7 +23670,7 @@ function NR(s, e = [], t = !0) {
|
|
|
23670
23670
|
for (const m of lw(e))
|
|
23671
23671
|
a.push({ bone: m, index: a.length });
|
|
23672
23672
|
const g = a[0].bone.parent;
|
|
23673
|
-
a.sort((m, w) =>
|
|
23673
|
+
a.sort((m, w) => xa(m.bone, g) > xa(w.bone, g) ? 1 : -1), a.map((m) => '"' + xa(m.bone, g) + '"').join(", ");
|
|
23674
23674
|
for (const m in a)
|
|
23675
23675
|
l[a[m].index] = parseInt(m);
|
|
23676
23676
|
const _ = n.skinIndex;
|
|
@@ -24043,11 +24043,11 @@ class jt {
|
|
|
24043
24043
|
i.appendLine(), this.action.writeTo(t, i), i.closeBlock();
|
|
24044
24044
|
}
|
|
24045
24045
|
}
|
|
24046
|
-
const
|
|
24046
|
+
const Xr = /* @__PURE__ */ new Set();
|
|
24047
24047
|
function mm(s, e) {
|
|
24048
24048
|
let t = "";
|
|
24049
24049
|
if (Array.isArray(s)) {
|
|
24050
|
-
|
|
24050
|
+
Xr.clear();
|
|
24051
24051
|
let i = "[ ";
|
|
24052
24052
|
for (let n = 0; n < s.length; n++) {
|
|
24053
24053
|
let o = s[n];
|
|
@@ -24056,20 +24056,20 @@ function mm(s, e) {
|
|
|
24056
24056
|
continue;
|
|
24057
24057
|
}
|
|
24058
24058
|
if (typeof o == "string") {
|
|
24059
|
-
if (
|
|
24060
|
-
i += o,
|
|
24059
|
+
if (Xr.has(o)) continue;
|
|
24060
|
+
i += o, Xr.add(o);
|
|
24061
24061
|
} else if (typeof o == "object") {
|
|
24062
24062
|
if (o.isObject3D && (o = e.findById(o.uuid), !o)) {
|
|
24063
24063
|
console.warn("Invalid target object in behavior", s + ". Is the object exported?");
|
|
24064
24064
|
continue;
|
|
24065
24065
|
}
|
|
24066
24066
|
const r = o.getPath?.call(o);
|
|
24067
|
-
if (
|
|
24068
|
-
i += r,
|
|
24067
|
+
if (Xr.has(r)) continue;
|
|
24068
|
+
i += r, Xr.add(r);
|
|
24069
24069
|
}
|
|
24070
24070
|
n + 1 < s.length && (i += ", ");
|
|
24071
24071
|
}
|
|
24072
|
-
i += " ]", t = i,
|
|
24072
|
+
i += " ]", t = i, Xr.clear();
|
|
24073
24073
|
} else if (typeof s == "object") {
|
|
24074
24074
|
const i = s;
|
|
24075
24075
|
if (i.isObject3D && (s = e.findById(i.uuid)), !s)
|
|
@@ -24125,7 +24125,7 @@ class qt {
|
|
|
24125
24125
|
return i.tokenId = "ProximityToCamera", i.distance = t, i;
|
|
24126
24126
|
}
|
|
24127
24127
|
}
|
|
24128
|
-
class
|
|
24128
|
+
class ca {
|
|
24129
24129
|
static global_id = 0;
|
|
24130
24130
|
static getId() {
|
|
24131
24131
|
return this.global_id++;
|
|
@@ -24230,10 +24230,10 @@ class Vi {
|
|
|
24230
24230
|
}
|
|
24231
24231
|
class me {
|
|
24232
24232
|
static sequence(...e) {
|
|
24233
|
-
return new
|
|
24233
|
+
return new ca("Group_" + ca.getId(), e).makeSequence();
|
|
24234
24234
|
}
|
|
24235
24235
|
static parallel(...e) {
|
|
24236
|
-
return new
|
|
24236
|
+
return new ca("Group_" + ca.getId(), e).makeParallel();
|
|
24237
24237
|
}
|
|
24238
24238
|
static fadeAction(e, t, i) {
|
|
24239
24239
|
const n = new fi(e);
|
|
@@ -24389,8 +24389,8 @@ class or {
|
|
|
24389
24389
|
let e;
|
|
24390
24390
|
try {
|
|
24391
24391
|
for (const t of this.clip?.tracks ?? []) {
|
|
24392
|
-
const i =
|
|
24393
|
-
let n =
|
|
24392
|
+
const i = Pa.parseTrackName(t.name);
|
|
24393
|
+
let n = Pa.findNode(this.root, i.nodeName);
|
|
24394
24394
|
if (n)
|
|
24395
24395
|
if (!e) e = n;
|
|
24396
24396
|
else {
|
|
@@ -24605,7 +24605,7 @@ class Fg {
|
|
|
24605
24605
|
const n = this.injectRestPoses ? 1 : 0, o = (this.rootToRegisteredClip.get(e)?.length ?? 0) + n, r = this.rootTargetMap.get(e), a = new Set(r);
|
|
24606
24606
|
if (t && t.tracks)
|
|
24607
24607
|
for (const c of t.tracks) {
|
|
24608
|
-
const h =
|
|
24608
|
+
const h = Pa.parseTrackName(c.name), d = Pa.findNode(e, h.nodeName);
|
|
24609
24609
|
if (!d) {
|
|
24610
24610
|
console.warn("no object found for track", c.name, "using " + e.name + " instead");
|
|
24611
24611
|
continue;
|
|
@@ -24754,17 +24754,17 @@ class qR {
|
|
|
24754
24754
|
Li ? console.assert(Li.length === Se, "We should have the same number of TransformData entries for each bone", Li, N) : fh = new Ne(null, et, null);
|
|
24755
24755
|
for (let $s = 0; $s < Se; $s++) {
|
|
24756
24756
|
const mf = Li ? Li[$s] : fh, Ur = N[$s];
|
|
24757
|
-
for (const { time:
|
|
24758
|
-
const nn = (
|
|
24759
|
-
te.has(nn) || te.set(nn, new Array()), te.get(nn).push(
|
|
24757
|
+
for (const { time: yl, translation: _l } of mf.getValues(Ur.pos, !0, !1, !1)) {
|
|
24758
|
+
const nn = (yl + Ur.timeOffset) * 60;
|
|
24759
|
+
te.has(nn) || te.set(nn, new Array()), te.get(nn).push(_l.clone());
|
|
24760
24760
|
}
|
|
24761
|
-
for (const { time:
|
|
24762
|
-
const nn = (
|
|
24763
|
-
re.has(nn) || re.set(nn, new Array()), re.get(nn).push(
|
|
24761
|
+
for (const { time: yl, rotation: _l } of mf.getValues(Ur.rot, !1, !0, !1)) {
|
|
24762
|
+
const nn = (yl + Ur.timeOffset) * 60;
|
|
24763
|
+
re.has(nn) || re.set(nn, new Array()), re.get(nn).push(_l.clone());
|
|
24764
24764
|
}
|
|
24765
|
-
for (const { time:
|
|
24766
|
-
const nn = (
|
|
24767
|
-
pe.has(nn) || pe.set(nn, new Array()), pe.get(nn).push(
|
|
24765
|
+
for (const { time: yl, scale: _l } of mf.getValues(Ur.scale, !1, !1, !0)) {
|
|
24766
|
+
const nn = (yl + Ur.timeOffset) * 60;
|
|
24767
|
+
pe.has(nn) || pe.set(nn, new Array()), pe.get(nn).push(_l.clone());
|
|
24768
24768
|
}
|
|
24769
24769
|
}
|
|
24770
24770
|
}
|
|
@@ -24823,7 +24823,7 @@ class qR {
|
|
|
24823
24823
|
for (const M of lw(g.bones))
|
|
24824
24824
|
_.push({ bone: M, inverse: M.matrixWorld.clone().invert() });
|
|
24825
24825
|
const v = _[0].bone.parent;
|
|
24826
|
-
v || console.error("No bone parent found for skinned mesh during USDZ export", n.skinnedMesh), _.sort((M, N) =>
|
|
24826
|
+
v || console.error("No bone parent found for skinned mesh during USDZ export", n.skinnedMesh), _.sort((M, N) => xa(M.bone, v) > xa(N.bone, v) ? 1 : -1);
|
|
24827
24827
|
const I = t.quickLookCompatible, O = [], R = [], A = [], D = [];
|
|
24828
24828
|
for (const { bone: M } of _) {
|
|
24829
24829
|
if (I) {
|
|
@@ -24833,7 +24833,7 @@ class qR {
|
|
|
24833
24833
|
O.push(M.matrix.clone());
|
|
24834
24834
|
R.push(M.position), A.push(M.quaternion), D.push(M.scale);
|
|
24835
24835
|
}
|
|
24836
|
-
const B = _.map((M) => '"' +
|
|
24836
|
+
const B = _.map((M) => '"' + xa(M.bone, v) + '"').join(", "), H = _.map((M) => lb(M.inverse.clone().invert())).join(", ");
|
|
24837
24837
|
e.beginBlock('def Skeleton "Rig"'), e.appendLine(`uniform matrix4d[] bindTransforms = [${H}]`), e.appendLine(`uniform token[] joints = [${B}]`), e.appendLine('uniform token purpose = "guide"'), e.appendLine(`uniform matrix4d[] restTransforms = [${O.map((M) => lb(M)).join(", ")}]`);
|
|
24838
24838
|
const X = p(_.map((M) => M.bone));
|
|
24839
24839
|
if (An) {
|
|
@@ -24935,7 +24935,7 @@ class qR {
|
|
|
24935
24935
|
}
|
|
24936
24936
|
}
|
|
24937
24937
|
const XR = x("debugusdz");
|
|
24938
|
-
class
|
|
24938
|
+
class Qa {
|
|
24939
24939
|
static getName(e) {
|
|
24940
24940
|
const t = e.split(".").pop();
|
|
24941
24941
|
let n = e.split(".").slice(0, -1).join(".").split("/").pop()?.replace(".", "_");
|
|
@@ -24951,7 +24951,7 @@ class Xa {
|
|
|
24951
24951
|
for (const o of n) {
|
|
24952
24952
|
if (!o.clip || typeof o.clip != "string" || !o.playOnAwake)
|
|
24953
24953
|
continue;
|
|
24954
|
-
const r = o.clip.split("/").pop() || "Audio", a =
|
|
24954
|
+
const r = o.clip.split("/").pop() || "Audio", a = Qa.getName(o.clip), l = Ki(a);
|
|
24955
24955
|
if (!this.files.some((c) => c.path === o.clip)) {
|
|
24956
24956
|
this.files.push({ path: o.clip, name: a });
|
|
24957
24957
|
const c = a.toLowerCase();
|
|
@@ -24981,9 +24981,9 @@ var QR = Object.defineProperty, Fe = (s, e, t, i) => {
|
|
|
24981
24981
|
};
|
|
24982
24982
|
const fb = x("debugusdzbehaviours");
|
|
24983
24983
|
function Wc(s) {
|
|
24984
|
-
s && (s.getComponentInParent(
|
|
24984
|
+
s && (s.getComponentInParent(Fa) || (L() && console.debug('Raycaster on "' + s.name + '" was automatically added, because no raycaster was found in the parent hierarchy.'), s.addComponent(Qi)));
|
|
24985
24985
|
}
|
|
24986
|
-
class
|
|
24986
|
+
class Ya extends T {
|
|
24987
24987
|
object;
|
|
24988
24988
|
target;
|
|
24989
24989
|
duration = 1;
|
|
@@ -25038,16 +25038,16 @@ class Qa extends T {
|
|
|
25038
25038
|
}
|
|
25039
25039
|
Fe([
|
|
25040
25040
|
u(k)
|
|
25041
|
-
],
|
|
25041
|
+
], Ya.prototype, "object");
|
|
25042
25042
|
Fe([
|
|
25043
25043
|
u(k)
|
|
25044
|
-
],
|
|
25044
|
+
], Ya.prototype, "target");
|
|
25045
25045
|
Fe([
|
|
25046
25046
|
u()
|
|
25047
|
-
],
|
|
25047
|
+
], Ya.prototype, "duration");
|
|
25048
25048
|
Fe([
|
|
25049
25049
|
u()
|
|
25050
|
-
],
|
|
25050
|
+
], Ya.prototype, "relativeMotion");
|
|
25051
25051
|
const Iu = class $t extends T {
|
|
25052
25052
|
materialToSwitch;
|
|
25053
25053
|
variantMaterial;
|
|
@@ -25330,7 +25330,7 @@ class br extends T {
|
|
|
25330
25330
|
const n = this.clip ? this.clip : this.target ? this.target.clip : void 0;
|
|
25331
25331
|
if (!n || typeof n != "string") return;
|
|
25332
25332
|
const o = this.target ? this.target.gameObject : this.gameObject;
|
|
25333
|
-
|
|
25333
|
+
Qa.getName(n);
|
|
25334
25334
|
const r = this.target ? this.target.volume : 1, a = this.target && this.target.spatialBlend == 0 ? "nonSpatial" : "spatial";
|
|
25335
25335
|
let l = !1;
|
|
25336
25336
|
this.gameObject.traverse((f) => {
|
|
@@ -26160,7 +26160,7 @@ class qi extends T {
|
|
|
26160
26160
|
if (!o) {
|
|
26161
26161
|
if (this.customReticle)
|
|
26162
26162
|
if (this.customReticle.asset)
|
|
26163
|
-
o =
|
|
26163
|
+
o = ja(this.customReticle.asset);
|
|
26164
26164
|
else {
|
|
26165
26165
|
this.customReticle.loadAssetAsync();
|
|
26166
26166
|
return;
|
|
@@ -26760,7 +26760,7 @@ ju([
|
|
|
26760
26760
|
vw(_m.prototype.onOwnerChange)
|
|
26761
26761
|
], _m.prototype, "owner");
|
|
26762
26762
|
let Bn = _m;
|
|
26763
|
-
var lT = Object.defineProperty,
|
|
26763
|
+
var lT = Object.defineProperty, Ka = (s, e, t, i) => {
|
|
26764
26764
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
26765
26765
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
26766
26766
|
return n && lT(e, t, n), n;
|
|
@@ -26786,22 +26786,22 @@ class Fs extends T {
|
|
|
26786
26786
|
this.context.menu.setPosition(this.position), this.context.menu.showNeedleLogo(this.showNeedleLogo), this.createFullscreenButton === !0 && this.context.menu.showFullscreenOption(!0), this.createMuteButton === !0 && this.context.menu.showAudioPlaybackOption(!0), this.showSpatialMenu === !0 && this.context.menu.showSpatialMenu(this.showSpatialMenu), this.createQRCodeButton === !0 && (q.isMobileDevice() || this.context.menu.showQRCodeButton(!0));
|
|
26787
26787
|
}
|
|
26788
26788
|
}
|
|
26789
|
-
|
|
26789
|
+
Ka([
|
|
26790
26790
|
u()
|
|
26791
26791
|
], Fs.prototype, "position");
|
|
26792
|
-
|
|
26792
|
+
Ka([
|
|
26793
26793
|
u()
|
|
26794
26794
|
], Fs.prototype, "showNeedleLogo");
|
|
26795
|
-
|
|
26795
|
+
Ka([
|
|
26796
26796
|
u()
|
|
26797
26797
|
], Fs.prototype, "showSpatialMenu");
|
|
26798
|
-
|
|
26798
|
+
Ka([
|
|
26799
26799
|
u()
|
|
26800
26800
|
], Fs.prototype, "createFullscreenButton");
|
|
26801
|
-
|
|
26801
|
+
Ka([
|
|
26802
26802
|
u()
|
|
26803
26803
|
], Fs.prototype, "createMuteButton");
|
|
26804
|
-
|
|
26804
|
+
Ka([
|
|
26805
26805
|
u()
|
|
26806
26806
|
], Fs.prototype, "createQRCodeButton");
|
|
26807
26807
|
var cT = Object.defineProperty, $g = (s, e, t, i) => {
|
|
@@ -26894,7 +26894,7 @@ class wr extends T {
|
|
|
26894
26894
|
else {
|
|
26895
26895
|
const e = new k();
|
|
26896
26896
|
e.name = "Head";
|
|
26897
|
-
const t =
|
|
26897
|
+
const t = $a.createPrimitive(Ea.Cube);
|
|
26898
26898
|
e.add(t), this.gameObject.add(e), this.head = new ne("", this.sourceId, e), Pl && console.log("Create head", e);
|
|
26899
26899
|
}
|
|
26900
26900
|
if (this.rightHand)
|
|
@@ -26956,7 +26956,7 @@ class vo extends T {
|
|
|
26956
26956
|
if (this.createHandModel) {
|
|
26957
26957
|
const n = await this.loadHandModel(this, i);
|
|
26958
26958
|
if (!n || !i.connected || !i.isHand) {
|
|
26959
|
-
n?.handObject &&
|
|
26959
|
+
n?.handObject && wl(n.handObject, !1), n?.handObject?.destroy();
|
|
26960
26960
|
return;
|
|
26961
26961
|
}
|
|
26962
26962
|
this._models.push({ controller: i, model: n.handObject, handmesh: n.handmesh }), this._models.sort((o, r) => o.controller.index - r.controller.index), this.scene.add(n.handObject), i.model = n.handObject;
|
|
@@ -26977,14 +26977,14 @@ class vo extends T {
|
|
|
26977
26977
|
onXRControllerRemoved(e) {
|
|
26978
26978
|
console.debug("XR Controller Removed", e.controller.side, e.controller.index);
|
|
26979
26979
|
const t = this._models.findIndex((n) => n.controller === e.controller), i = this._models[t];
|
|
26980
|
-
i && (this._models.splice(t, 1), i.model && (
|
|
26980
|
+
i && (this._models.splice(t, 1), i.model && (wl(i.model, !1), i.model.destroy(), i.model = void 0));
|
|
26981
26981
|
}
|
|
26982
26982
|
onBeforeXR(e, t) {
|
|
26983
26983
|
this.createHandModel && (this.customLeftHand || this.customRightHand) && (t.optionalFeatures = t.optionalFeatures || [], t.optionalFeatures.includes("hand-tracking") || t.optionalFeatures.push("hand-tracking"));
|
|
26984
26984
|
}
|
|
26985
26985
|
onLeaveXR(e) {
|
|
26986
26986
|
for (const t of this._models)
|
|
26987
|
-
t && (t.model && (
|
|
26987
|
+
t && (t.model && (wl(t.model, !1), t.model.destroy(), t.model = void 0), t.controller.model === t.model && (t.controller.model = null));
|
|
26988
26988
|
this._models.length = 0;
|
|
26989
26989
|
}
|
|
26990
26990
|
onBeforeRender() {
|
|
@@ -27018,7 +27018,7 @@ class vo extends T {
|
|
|
27018
27018
|
l.visible = c != null;
|
|
27019
27019
|
}
|
|
27020
27020
|
}
|
|
27021
|
-
i.model && (i.model.visible = n.isTracking, i.model.visible && i.model.parent !== e.rig?.gameObject && e.rig?.gameObject.add(i.model)), i.model?.visible && (i.handmesh?.updateMesh(), i.model.matrixAutoUpdate = !1, i.model.matrix.identity(), i.model.applyMatrix4(
|
|
27021
|
+
i.model && (i.model.visible = n.isTracking, i.model.visible && i.model.parent !== e.rig?.gameObject && e.rig?.gameObject.add(i.model)), i.model?.visible && (i.handmesh?.updateMesh(), i.model.matrixAutoUpdate = !1, i.model.matrix.identity(), i.model.applyMatrix4(ua));
|
|
27022
27022
|
}
|
|
27023
27023
|
}
|
|
27024
27024
|
}
|
|
@@ -27027,7 +27027,7 @@ class vo extends T {
|
|
|
27027
27027
|
if (!e.connected)
|
|
27028
27028
|
return console.warn("XRControllerModel.onXRControllerAdded: controller is not connected anymore", e.side), null;
|
|
27029
27029
|
const n = await ne.getOrCreate("", t).instantiate();
|
|
27030
|
-
return
|
|
27030
|
+
return wl(n), K.active?.isPassThrough && n.traverseVisible((o) => {
|
|
27031
27031
|
this.makeOccluder(o);
|
|
27032
27032
|
}), n;
|
|
27033
27033
|
}
|
|
@@ -27035,13 +27035,13 @@ class vo extends T {
|
|
|
27035
27035
|
const i = this.context, n = i.renderer.xr.getHand(t.index);
|
|
27036
27036
|
n || (Gs ? z.DrawLabel(t.rayWorldPosition, "No hand found for index " + t.index, 0.05, 5) : console.warn("No hand found for index " + t.index));
|
|
27037
27037
|
const o = new Ts();
|
|
27038
|
-
_g(o, i), await um(o, i, this.sourceId ?? "");
|
|
27038
|
+
_g(o, i), await um(o, i, this.sourceId ?? "", this.sourceId ?? "");
|
|
27039
27039
|
const r = Xv(o);
|
|
27040
27040
|
let a = "";
|
|
27041
27041
|
const l = t.side === "left" ? this.customLeftHand : this.customRightHand;
|
|
27042
27042
|
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/"));
|
|
27043
27043
|
const c = new k();
|
|
27044
|
-
|
|
27044
|
+
wl(c);
|
|
27045
27045
|
const h = new a1(c, n, o.path, a, o, (d) => {
|
|
27046
27046
|
const f = r?.gltf;
|
|
27047
27047
|
f?.scene.children?.length === 0 && (f.scene.children[0] = d), r?.gltf && Gn().createBuiltinComponents(e.context, e.sourceId || a, r.gltf, null, r), d.traverse((p) => {
|
|
@@ -27154,7 +27154,7 @@ class Zi extends T {
|
|
|
27154
27154
|
else if (i > 0.8) {
|
|
27155
27155
|
this._didTeleport = !0;
|
|
27156
27156
|
const n = this.context.physics.raycastFromRay(e.ray)[0];
|
|
27157
|
-
if (n && n.object instanceof
|
|
27157
|
+
if (n && n.object instanceof ka) {
|
|
27158
27158
|
const r = n.normal?.dot(F(0, 1, 0));
|
|
27159
27159
|
if (r !== void 0 && r < 0.4)
|
|
27160
27160
|
return;
|
|
@@ -27333,7 +27333,7 @@ var fT = Object.defineProperty, _t = (s, e, t, i) => {
|
|
|
27333
27333
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
27334
27334
|
return n && fT(e, t, n), n;
|
|
27335
27335
|
};
|
|
27336
|
-
const Ol = x("debugwebxr"), pT = x("debugusdz"), ht = class
|
|
27336
|
+
const Ol = x("debugwebxr"), pT = x("debugusdz"), ht = class sa extends T {
|
|
27337
27337
|
createVRButton = !0;
|
|
27338
27338
|
createARButton = !0;
|
|
27339
27339
|
createSendToQuestButton = !0;
|
|
@@ -27428,7 +27428,7 @@ const Ol = x("debugwebxr"), pT = x("debugusdz"), ht = class na extends T {
|
|
|
27428
27428
|
_spatialGrabRaycaster;
|
|
27429
27429
|
_activeWebARSessionRoot = null;
|
|
27430
27430
|
get isActiveWebXR() {
|
|
27431
|
-
return !
|
|
27431
|
+
return !sa.activeWebXRComponent || sa.activeWebXRComponent === this;
|
|
27432
27432
|
}
|
|
27433
27433
|
/**
|
|
27434
27434
|
* Called before entering a WebXR session. Sets up optional features like depth sensing, if needed.
|
|
@@ -27438,10 +27438,10 @@ const Ol = x("debugwebxr"), pT = x("debugusdz"), ht = class na extends T {
|
|
|
27438
27438
|
*/
|
|
27439
27439
|
onBeforeXR(e, t) {
|
|
27440
27440
|
if (!this.isActiveWebXR) {
|
|
27441
|
-
console.warn(`WebXR: another WebXR component is already active (${
|
|
27441
|
+
console.warn(`WebXR: another WebXR component is already active (${sa.activeWebXRComponent?.name}). This is ignored: ${this.name}`);
|
|
27442
27442
|
return;
|
|
27443
27443
|
}
|
|
27444
|
-
|
|
27444
|
+
sa.activeWebXRComponent = this, e == "immersive-ar" && this.useDepthSensing && (t.optionalFeatures = t.optionalFeatures || [], t.optionalFeatures.push("depth-sensing"));
|
|
27445
27445
|
}
|
|
27446
27446
|
/**
|
|
27447
27447
|
* Called when a WebXR session begins. Sets up the scene for XR by configuring controllers,
|
|
@@ -27464,7 +27464,7 @@ const Ol = x("debugwebxr"), pT = x("debugusdz"), ht = class na extends T {
|
|
|
27464
27464
|
} else (Ol || L()) && console.warn("WebXR: No WebARSessionRoot found in scene and usePlacementReticle is disabled in WebXR component.");
|
|
27465
27465
|
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);
|
|
27466
27466
|
}
|
|
27467
|
-
this.useDefaultControls && this.setDefaultMovementEnabled(!0), (this.showControllerModels || this.showHandModels) && this.setDefaultControllerRenderingEnabled(!0), this.useSpatialGrab && (this._spatialGrabRaycaster = S.findObjectOfType(
|
|
27467
|
+
this.useDefaultControls && this.setDefaultMovementEnabled(!0), (this.showControllerModels || this.showHandModels) && this.setDefaultControllerRenderingEnabled(!0), this.useSpatialGrab && (this._spatialGrabRaycaster = S.findObjectOfType(za) ?? void 0, this._spatialGrabRaycaster || (this._spatialGrabRaycaster = this.gameObject.addComponent(za))), this.createLocalAvatar(e.xr), e.xr.isScreenBasedAR || (this._exitXRMenuButton = this.context.menu.appendChild({
|
|
27468
27468
|
label: "Quit XR",
|
|
27469
27469
|
onClick: () => this.exitXR(),
|
|
27470
27470
|
icon: "exit_to_app",
|
|
@@ -27491,7 +27491,7 @@ const Ol = x("debugwebxr"), pT = x("debugusdz"), ht = class na extends T {
|
|
|
27491
27491
|
ni.Global.Set(this._previousXRState), this._playerSync?.destroyInstance();
|
|
27492
27492
|
for (const t of this._createdComponentsInSession)
|
|
27493
27493
|
t.destroy();
|
|
27494
|
-
this._createdComponentsInSession.length = 0, this._activeWebARSessionRoot = null, this.handleOfferSession(), hu(1).then(() =>
|
|
27494
|
+
this._createdComponentsInSession.length = 0, this._activeWebARSessionRoot = null, this.handleOfferSession(), hu(1).then(() => sa.activeWebXRComponent = null);
|
|
27495
27495
|
}
|
|
27496
27496
|
}
|
|
27497
27497
|
/** Call to enable or disable default controller behaviour */
|
|
@@ -27663,7 +27663,7 @@ class Sw {
|
|
|
27663
27663
|
/** Register audio clip for USDZ export. The clip will be embedded in the resulting file. */
|
|
27664
27664
|
addAudioClip(e) {
|
|
27665
27665
|
if (!e || typeof e != "string") return "";
|
|
27666
|
-
const i = "audio/" +
|
|
27666
|
+
const i = "audio/" + Qa.getName(e);
|
|
27667
27667
|
return this.audioClips.push({ clipUrl: e, filesKey: i }), i;
|
|
27668
27668
|
}
|
|
27669
27669
|
behaviourComponents = [];
|
|
@@ -27700,7 +27700,7 @@ class Sw {
|
|
|
27700
27700
|
let a = `graph LR
|
|
27701
27701
|
`, l = "";
|
|
27702
27702
|
function c(d) {
|
|
27703
|
-
if (d instanceof
|
|
27703
|
+
if (d instanceof ca) {
|
|
27704
27704
|
r && (a += `subgraph Group_${d.id}
|
|
27705
27705
|
`);
|
|
27706
27706
|
for (const f of d.actions)
|
|
@@ -27974,7 +27974,7 @@ class bT {
|
|
|
27974
27974
|
width;
|
|
27975
27975
|
height;
|
|
27976
27976
|
}
|
|
27977
|
-
const an = new y(), kl = new Z(), Uh = new $(),
|
|
27977
|
+
const an = new y(), kl = new Z(), Uh = new $(), Za = class Pw extends yn {
|
|
27978
27978
|
get parent() {
|
|
27979
27979
|
return this._parentRectTransform;
|
|
27980
27980
|
}
|
|
@@ -28032,15 +28032,15 @@ const an = new y(), kl = new Z(), Uh = new $(), Ka = class Pw extends yn {
|
|
|
28032
28032
|
_parentRectTransform;
|
|
28033
28033
|
_lastUpdateFrame = -1;
|
|
28034
28034
|
awake() {
|
|
28035
|
-
super.awake(), this._lastUpdateFrame = -1, this._parentRectTransform = void 0, this.rectBlock = new k(), this.rectBlock.name = this.name, this.lastMatrix = new Z(), this._lastAnchoring = null, this._initialPosition = this.gameObject.position.clone(), this._initialPosition.z = 0, this._anchoredPosition || (this._anchoredPosition = new J()),
|
|
28035
|
+
super.awake(), this._lastUpdateFrame = -1, this._parentRectTransform = void 0, this.rectBlock = new k(), this.rectBlock.name = this.name, this.lastMatrix = new Z(), this._lastAnchoring = null, this._initialPosition = this.gameObject.position.clone(), this._initialPosition.z = 0, this._anchoredPosition || (this._anchoredPosition = new J()), Jr(this, "_anchoredPosition", () => {
|
|
28036
28036
|
this.markDirty();
|
|
28037
|
-
}),
|
|
28037
|
+
}), Jr(this, "sizeDelta", () => {
|
|
28038
28038
|
this.markDirty();
|
|
28039
|
-
}),
|
|
28039
|
+
}), Jr(this, "pivot", () => {
|
|
28040
28040
|
this.markDirty();
|
|
28041
|
-
}),
|
|
28041
|
+
}), Jr(this, "anchorMin", () => {
|
|
28042
28042
|
this.markDirty();
|
|
28043
|
-
}),
|
|
28043
|
+
}), Jr(this, "anchorMax", () => {
|
|
28044
28044
|
this.markDirty();
|
|
28045
28045
|
});
|
|
28046
28046
|
}
|
|
@@ -28155,20 +28155,20 @@ const an = new y(), kl = new Z(), Uh = new $(), Ka = class Pw extends yn {
|
|
|
28155
28155
|
};
|
|
28156
28156
|
qc([
|
|
28157
28157
|
u(J)
|
|
28158
|
-
],
|
|
28158
|
+
], Za.prototype, "anchoredPosition", 1);
|
|
28159
28159
|
qc([
|
|
28160
28160
|
u(J)
|
|
28161
|
-
],
|
|
28161
|
+
], Za.prototype, "sizeDelta", 2);
|
|
28162
28162
|
qc([
|
|
28163
28163
|
u(J)
|
|
28164
|
-
],
|
|
28164
|
+
], Za.prototype, "pivot", 2);
|
|
28165
28165
|
qc([
|
|
28166
28166
|
u(J)
|
|
28167
|
-
],
|
|
28167
|
+
], Za.prototype, "anchorMin", 2);
|
|
28168
28168
|
qc([
|
|
28169
28169
|
u(J)
|
|
28170
|
-
],
|
|
28171
|
-
let Qn =
|
|
28170
|
+
], Za.prototype, "anchorMax", 2);
|
|
28171
|
+
let Qn = Za;
|
|
28172
28172
|
var vT = Object.defineProperty, Ow = (s, e, t, i) => {
|
|
28173
28173
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
28174
28174
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
@@ -28252,7 +28252,7 @@ const Go = {
|
|
|
28252
28252
|
this.makePanel(), this.uiObject && this.uiObject.set(e);
|
|
28253
28253
|
}
|
|
28254
28254
|
awake() {
|
|
28255
|
-
super.awake(), this.makePanel(),
|
|
28255
|
+
super.awake(), this.makePanel(), Jr(this, "_color", () => Kk(this, this.onColorChanged));
|
|
28256
28256
|
}
|
|
28257
28257
|
onEnable() {
|
|
28258
28258
|
super.onEnable(), this.uiObject && (this.rectTransform.shadowComponent?.add(this.uiObject), this.addShadowComponent(this.uiObject, this.rectTransform));
|
|
@@ -28779,7 +28779,7 @@ var MT = Object.defineProperty, Ke = (s, e, t, i) => {
|
|
|
28779
28779
|
return n && MT(e, t, n), n;
|
|
28780
28780
|
};
|
|
28781
28781
|
const gb = x("debuguilayout");
|
|
28782
|
-
class
|
|
28782
|
+
class Ja {
|
|
28783
28783
|
left = 0;
|
|
28784
28784
|
right = 0;
|
|
28785
28785
|
top = 0;
|
|
@@ -28793,16 +28793,16 @@ class Za {
|
|
|
28793
28793
|
}
|
|
28794
28794
|
Ke([
|
|
28795
28795
|
u()
|
|
28796
|
-
],
|
|
28796
|
+
], Ja.prototype, "left");
|
|
28797
28797
|
Ke([
|
|
28798
28798
|
u()
|
|
28799
|
-
],
|
|
28799
|
+
], Ja.prototype, "right");
|
|
28800
28800
|
Ke([
|
|
28801
28801
|
u()
|
|
28802
|
-
],
|
|
28802
|
+
], Ja.prototype, "top");
|
|
28803
28803
|
Ke([
|
|
28804
28804
|
u()
|
|
28805
|
-
],
|
|
28805
|
+
], Ja.prototype, "bottom");
|
|
28806
28806
|
class Ri extends T {
|
|
28807
28807
|
_rectTransform = null;
|
|
28808
28808
|
get rectTransform() {
|
|
@@ -28861,7 +28861,7 @@ Ke([
|
|
|
28861
28861
|
u()
|
|
28862
28862
|
], Ri.prototype, "spacing");
|
|
28863
28863
|
Ke([
|
|
28864
|
-
u(
|
|
28864
|
+
u(Ja)
|
|
28865
28865
|
], Ri.prototype, "padding");
|
|
28866
28866
|
Ke([
|
|
28867
28867
|
u()
|
|
@@ -29407,7 +29407,7 @@ var jT = Object.defineProperty, Rt = (s, e, t, i) => {
|
|
|
29407
29407
|
return n && jT(e, t, n), n;
|
|
29408
29408
|
};
|
|
29409
29409
|
const hi = x("debugusdz"), BT = x("debugusdzpruning");
|
|
29410
|
-
class
|
|
29410
|
+
class el {
|
|
29411
29411
|
callToAction;
|
|
29412
29412
|
checkoutTitle;
|
|
29413
29413
|
checkoutSubtitle;
|
|
@@ -29415,16 +29415,16 @@ class Ja {
|
|
|
29415
29415
|
}
|
|
29416
29416
|
Rt([
|
|
29417
29417
|
u()
|
|
29418
|
-
],
|
|
29418
|
+
], el.prototype, "callToAction");
|
|
29419
29419
|
Rt([
|
|
29420
29420
|
u()
|
|
29421
|
-
],
|
|
29421
|
+
], el.prototype, "checkoutTitle");
|
|
29422
29422
|
Rt([
|
|
29423
29423
|
u()
|
|
29424
|
-
],
|
|
29424
|
+
], el.prototype, "checkoutSubtitle");
|
|
29425
29425
|
Rt([
|
|
29426
29426
|
u()
|
|
29427
|
-
],
|
|
29427
|
+
], el.prototype, "callToActionURL");
|
|
29428
29428
|
const ci = class Ql extends T {
|
|
29429
29429
|
static beforeExport = new he();
|
|
29430
29430
|
static afterExport = new he();
|
|
@@ -29546,12 +29546,12 @@ const ci = class Ql extends T {
|
|
|
29546
29546
|
const a = new AR(), l = new Fg(this.quickLookCompatible);
|
|
29547
29547
|
let c;
|
|
29548
29548
|
const h = [];
|
|
29549
|
-
this.interactive && (h.push(new Sw()), h.push(new
|
|
29549
|
+
this.interactive && (h.push(new Sw()), h.push(new Qa()), globalThis.NEEDLE_USE_RAPIER && S.getComponentsInChildren(e, lt).length > 0 && (this.physics ? (c = new Cw(), 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 Gg()), h.push(new Dw()));
|
|
29550
29550
|
const d = [l, ...h, ...this.extensions], f = { self: this, exporter: a, extensions: d, object: e };
|
|
29551
29551
|
ce.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, ce.report("export-usdz", "auto export animations and audio sources");
|
|
29552
29552
|
const p = new Array();
|
|
29553
29553
|
this.autoExportAnimations && p.push(...IT(e, l)), d.find((O) => O.extensionName === "Audio") && this.autoExportAudioSources && p.push(...LT(e)), a.debug = hi, a.pruneUnusedNodes = !BT;
|
|
29554
|
-
const _ =
|
|
29554
|
+
const _ = Ua.instance.objs.map((O) => O.batchedMesh);
|
|
29555
29555
|
a.keepObject = (O) => {
|
|
29556
29556
|
let R = !0;
|
|
29557
29557
|
const A = S.getComponent(O, ri);
|
|
@@ -29678,7 +29678,7 @@ Rt([
|
|
|
29678
29678
|
u(URL)
|
|
29679
29679
|
], ci.prototype, "customUsdzFile");
|
|
29680
29680
|
Rt([
|
|
29681
|
-
u(
|
|
29681
|
+
u(el)
|
|
29682
29682
|
], ci.prototype, "customBranding");
|
|
29683
29683
|
Rt([
|
|
29684
29684
|
u()
|
|
@@ -29754,7 +29754,7 @@ var UT = Object.defineProperty, Qg = (s, e, t, i) => {
|
|
|
29754
29754
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
29755
29755
|
return n && UT(e, t, n), n;
|
|
29756
29756
|
};
|
|
29757
|
-
class
|
|
29757
|
+
class tl extends T {
|
|
29758
29758
|
objectBounds = !1;
|
|
29759
29759
|
color;
|
|
29760
29760
|
isGizmo = !0;
|
|
@@ -29773,13 +29773,13 @@ class el extends T {
|
|
|
29773
29773
|
}
|
|
29774
29774
|
Qg([
|
|
29775
29775
|
u()
|
|
29776
|
-
],
|
|
29776
|
+
], tl.prototype, "objectBounds");
|
|
29777
29777
|
Qg([
|
|
29778
29778
|
u(se)
|
|
29779
|
-
],
|
|
29779
|
+
], tl.prototype, "color");
|
|
29780
29780
|
Qg([
|
|
29781
29781
|
u()
|
|
29782
|
-
],
|
|
29782
|
+
], tl.prototype, "isGizmo");
|
|
29783
29783
|
var NT = Object.defineProperty, Yg = (s, e, t, i) => {
|
|
29784
29784
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
29785
29785
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
@@ -30032,7 +30032,7 @@ class Ti extends T {
|
|
|
30032
30032
|
switch (this.type) {
|
|
30033
30033
|
case 1:
|
|
30034
30034
|
const t = new Ep(this.color, this.intensity * Math.PI);
|
|
30035
|
-
if (t.position.set(0, 0, -_b * 0.5).applyQuaternion(this.gameObject.quaternion), this.gameObject.add(t.target),
|
|
30035
|
+
if (t.position.set(0, 0, -_b * 0.5).applyQuaternion(this.gameObject.quaternion), this.gameObject.add(t.target), Ma(t.target, 0, 0, 0), this.light = t, this.gameObject.position.set(0, 0, 0), this.gameObject.rotation.set(0, 0, 0), Xs) {
|
|
30036
30036
|
const r = new AS(this.light, 0.2, this.color);
|
|
30037
30037
|
this.context.scene.add(r);
|
|
30038
30038
|
}
|
|
@@ -30361,7 +30361,7 @@ var KT = Object.defineProperty, Gu = (s, e, t, i) => {
|
|
|
30361
30361
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
30362
30362
|
return n && KT(e, t, n), n;
|
|
30363
30363
|
};
|
|
30364
|
-
class
|
|
30364
|
+
class il extends T {
|
|
30365
30365
|
referenceSpace;
|
|
30366
30366
|
from;
|
|
30367
30367
|
affectPosition = !1;
|
|
@@ -30392,16 +30392,16 @@ class tl extends T {
|
|
|
30392
30392
|
}
|
|
30393
30393
|
Gu([
|
|
30394
30394
|
u(S)
|
|
30395
|
-
],
|
|
30395
|
+
], il.prototype, "referenceSpace");
|
|
30396
30396
|
Gu([
|
|
30397
30397
|
u(S)
|
|
30398
|
-
],
|
|
30398
|
+
], il.prototype, "from");
|
|
30399
30399
|
Gu([
|
|
30400
30400
|
u(y)
|
|
30401
|
-
],
|
|
30401
|
+
], il.prototype, "positionOffset");
|
|
30402
30402
|
Gu([
|
|
30403
30403
|
u(y)
|
|
30404
|
-
],
|
|
30404
|
+
], il.prototype, "rotationOffset");
|
|
30405
30405
|
var ZT = Object.defineProperty, Ro = (s, e, t, i) => {
|
|
30406
30406
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
30407
30407
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
@@ -30508,7 +30508,7 @@ var JT = Object.defineProperty, C = (s, e, t, i) => {
|
|
|
30508
30508
|
};
|
|
30509
30509
|
const $h = x("debugparticles");
|
|
30510
30510
|
var ps = /* @__PURE__ */ ((s) => (s[s.Billboard = 0] = "Billboard", s[s.Stretch = 1] = "Stretch", s[s.HorizontalBillboard = 2] = "HorizontalBillboard", s[s.VerticalBillboard = 3] = "VerticalBillboard", s[s.Mesh = 4] = "Mesh", s))(ps || {});
|
|
30511
|
-
class
|
|
30511
|
+
class nl {
|
|
30512
30512
|
alphaKeys = [];
|
|
30513
30513
|
colorKeys = [];
|
|
30514
30514
|
get duration() {
|
|
@@ -30541,10 +30541,10 @@ class il {
|
|
|
30541
30541
|
}
|
|
30542
30542
|
C([
|
|
30543
30543
|
u()
|
|
30544
|
-
],
|
|
30544
|
+
], nl.prototype, "alphaKeys");
|
|
30545
30545
|
C([
|
|
30546
30546
|
u()
|
|
30547
|
-
],
|
|
30547
|
+
], nl.prototype, "colorKeys");
|
|
30548
30548
|
var Ec = /* @__PURE__ */ ((s) => (s[s.Local = 0] = "Local", s[s.World = 1] = "World", s[s.Custom = 2] = "Custom", s))(Ec || {}), vm = /* @__PURE__ */ ((s) => (s[s.Sphere = 0] = "Sphere", s[s.SphereShell = 1] = "SphereShell", s[s.Hemisphere = 2] = "Hemisphere", s[s.HemisphereShell = 3] = "HemisphereShell", s[s.Cone = 4] = "Cone", s[s.Box = 5] = "Box", s[s.Mesh = 6] = "Mesh", s[s.ConeShell = 7] = "ConeShell", s[s.ConeVolume = 8] = "ConeVolume", s[s.ConeVolumeShell = 9] = "ConeVolumeShell", s[s.Circle = 10] = "Circle", s[s.CircleEdge = 11] = "CircleEdge", s[s.SingleSidedEdge = 12] = "SingleSidedEdge", s[s.MeshRenderer = 13] = "MeshRenderer", s[s.SkinnedMeshRenderer = 14] = "SkinnedMeshRenderer", s[s.BoxShell = 15] = "BoxShell", s[s.BoxEdge = 16] = "BoxEdge", s[s.Donut = 17] = "Donut", s[s.Rectangle = 18] = "Rectangle", s[s.Sprite = 19] = "Sprite", s[s.SpriteRenderer = 20] = "SpriteRenderer", s))(vm || {});
|
|
30549
30549
|
const Us = class Kl {
|
|
30550
30550
|
static constant(e) {
|
|
@@ -30715,15 +30715,15 @@ C([
|
|
|
30715
30715
|
u(oe)
|
|
30716
30716
|
], To.prototype, "colorMax");
|
|
30717
30717
|
C([
|
|
30718
|
-
u(
|
|
30718
|
+
u(nl)
|
|
30719
30719
|
], To.prototype, "gradient");
|
|
30720
30720
|
C([
|
|
30721
|
-
u(
|
|
30721
|
+
u(nl)
|
|
30722
30722
|
], To.prototype, "gradientMin");
|
|
30723
30723
|
C([
|
|
30724
|
-
u(
|
|
30724
|
+
u(nl)
|
|
30725
30725
|
], To.prototype, "gradientMax");
|
|
30726
|
-
let
|
|
30726
|
+
let sl = To;
|
|
30727
30727
|
var wm = /* @__PURE__ */ ((s) => (s[s.Hierarchy = 0] = "Hierarchy", s[s.Local = 1] = "Local", s[s.Shape = 2] = "Shape", s))(wm || {});
|
|
30728
30728
|
class Kt {
|
|
30729
30729
|
cullingMode;
|
|
@@ -30773,7 +30773,7 @@ C([
|
|
|
30773
30773
|
u(Y)
|
|
30774
30774
|
], Kt.prototype, "gravityModifier");
|
|
30775
30775
|
C([
|
|
30776
|
-
u(
|
|
30776
|
+
u(sl)
|
|
30777
30777
|
], Kt.prototype, "startColor");
|
|
30778
30778
|
C([
|
|
30779
30779
|
u(Y)
|
|
@@ -30894,9 +30894,9 @@ class ey {
|
|
|
30894
30894
|
color;
|
|
30895
30895
|
}
|
|
30896
30896
|
C([
|
|
30897
|
-
u(
|
|
30897
|
+
u(sl)
|
|
30898
30898
|
], ey.prototype, "color");
|
|
30899
|
-
class
|
|
30899
|
+
class ol {
|
|
30900
30900
|
enabled;
|
|
30901
30901
|
separateAxes;
|
|
30902
30902
|
size;
|
|
@@ -30923,16 +30923,16 @@ class sl {
|
|
|
30923
30923
|
}
|
|
30924
30924
|
C([
|
|
30925
30925
|
u(Y)
|
|
30926
|
-
],
|
|
30926
|
+
], ol.prototype, "size");
|
|
30927
30927
|
C([
|
|
30928
30928
|
u(Y)
|
|
30929
|
-
],
|
|
30929
|
+
], ol.prototype, "x");
|
|
30930
30930
|
C([
|
|
30931
30931
|
u(Y)
|
|
30932
|
-
],
|
|
30932
|
+
], ol.prototype, "y");
|
|
30933
30933
|
C([
|
|
30934
30934
|
u(Y)
|
|
30935
|
-
],
|
|
30935
|
+
], ol.prototype, "z");
|
|
30936
30936
|
const Ze = class Zl {
|
|
30937
30937
|
// Emittershape start
|
|
30938
30938
|
get type() {
|
|
@@ -31365,10 +31365,10 @@ C([
|
|
|
31365
31365
|
u()
|
|
31366
31366
|
], $e.prototype, "attachRibbonToTransform");
|
|
31367
31367
|
C([
|
|
31368
|
-
u(
|
|
31368
|
+
u(sl)
|
|
31369
31369
|
], $e.prototype, "colorOverLifetime");
|
|
31370
31370
|
C([
|
|
31371
|
-
u(
|
|
31371
|
+
u(sl)
|
|
31372
31372
|
], $e.prototype, "colorOverTrail");
|
|
31373
31373
|
C([
|
|
31374
31374
|
u()
|
|
@@ -31879,7 +31879,7 @@ C([
|
|
|
31879
31879
|
u(J)
|
|
31880
31880
|
], eh.prototype, "range");
|
|
31881
31881
|
C([
|
|
31882
|
-
u(
|
|
31882
|
+
u(sl)
|
|
31883
31883
|
], eh.prototype, "color");
|
|
31884
31884
|
new y(1, 1, 1);
|
|
31885
31885
|
new y(0, 0, 1);
|
|
@@ -31925,7 +31925,7 @@ class Ww {
|
|
|
31925
31925
|
const t = this.system.deltaTime;
|
|
31926
31926
|
if (this.emitterType === Sm.Death) {
|
|
31927
31927
|
let n = e.life;
|
|
31928
|
-
if (e[
|
|
31928
|
+
if (e[ha] !== void 0 && (n = e[ha]), !(e.age + t * 1.2 >= n)) return;
|
|
31929
31929
|
const r = this.subSystem.main.maxParticles - this.subSystem.currentParticles;
|
|
31930
31930
|
e.emissionState.waitEmiting = r;
|
|
31931
31931
|
}
|
|
@@ -32162,15 +32162,15 @@ class cE extends Dr {
|
|
|
32162
32162
|
}
|
|
32163
32163
|
}
|
|
32164
32164
|
}
|
|
32165
|
-
const
|
|
32165
|
+
const ha = Symbol("particleLife"), mp = Symbol("trailLifetime"), wb = Symbol("trailStartLength"), gp = Symbol("trailWidthRandom");
|
|
32166
32166
|
class hE extends Dr {
|
|
32167
32167
|
type = "NeedleTrail";
|
|
32168
32168
|
initialize(e) {
|
|
32169
|
-
e instanceof Ay && (e[
|
|
32169
|
+
e instanceof Ay && (e[ha] = e.life, this.system.trails.enabled && this.system.trails.dieWithParticles === !1 && (e[mp] = this.system.trails.lifetime.evaluate(Math.random(), Math.random()), e.life += e[mp]), e[wb] = e.length, e[gp] = Math.random());
|
|
32170
32170
|
}
|
|
32171
32171
|
update(e) {
|
|
32172
32172
|
if (this.system.trails?.enabled && e instanceof Ay) {
|
|
32173
|
-
const t = e, i = e.age / e[
|
|
32173
|
+
const t = e, i = e.age / e[ha], n = e.previous.values(), o = e.previous.length;
|
|
32174
32174
|
for (let r = 0; r < o; r++) {
|
|
32175
32175
|
const l = n.next().value, c = 1 - r / (o - 1), h = e.size;
|
|
32176
32176
|
if (h.x <= 0 && !this.system.trails.sizeAffectsWidth) {
|
|
@@ -32179,9 +32179,9 @@ class hE extends Dr {
|
|
|
32179
32179
|
}
|
|
32180
32180
|
l.size = this.system.trails.getWidth(h.x, i, c, t[gp]), l.color.copy(e.color), this.system.trails.getColor(l.color, i, c);
|
|
32181
32181
|
}
|
|
32182
|
-
if (e.age > e[
|
|
32182
|
+
if (e.age > e[ha]) {
|
|
32183
32183
|
e.velocity.set(0, 0, 0);
|
|
32184
|
-
const r = (e.age - e[
|
|
32184
|
+
const r = (e.age - e[ha]) / e[mp];
|
|
32185
32185
|
t.length = j.lerp(e[wb], 0, r);
|
|
32186
32186
|
}
|
|
32187
32187
|
}
|
|
@@ -32547,7 +32547,7 @@ const zt = class dd extends T {
|
|
|
32547
32547
|
const i = e[t];
|
|
32548
32548
|
if (!(i instanceof xm)) {
|
|
32549
32549
|
const n = new xm();
|
|
32550
|
-
|
|
32550
|
+
Ia(n, i), e[t] = n;
|
|
32551
32551
|
}
|
|
32552
32552
|
}
|
|
32553
32553
|
this._bursts = e;
|
|
@@ -32559,7 +32559,7 @@ const zt = class dd extends T {
|
|
|
32559
32559
|
const i = e[t];
|
|
32560
32560
|
if (!(i instanceof Pm)) {
|
|
32561
32561
|
const n = new Pm();
|
|
32562
|
-
|
|
32562
|
+
Ia(n, i), e[t] = n;
|
|
32563
32563
|
}
|
|
32564
32564
|
}
|
|
32565
32565
|
no && e.length > 0 && console.log("SubEmitters: ", e, this), this._subEmitterSystems = e;
|
|
@@ -32668,7 +32668,7 @@ ze([
|
|
|
32668
32668
|
u(Eo)
|
|
32669
32669
|
], zt.prototype, "emission");
|
|
32670
32670
|
ze([
|
|
32671
|
-
u(
|
|
32671
|
+
u(ol)
|
|
32672
32672
|
], zt.prototype, "sizeOverLifetime");
|
|
32673
32673
|
ze([
|
|
32674
32674
|
u(Uw)
|
|
@@ -33189,9 +33189,9 @@ function bp(s) {
|
|
|
33189
33189
|
case 3:
|
|
33190
33190
|
return ou;
|
|
33191
33191
|
case 4:
|
|
33192
|
-
return
|
|
33192
|
+
return Oa;
|
|
33193
33193
|
default:
|
|
33194
|
-
return Pb.has(s) || (Pb.set(s, !0), console.warn("[Postprocessing] Unknown tone mapping mode", s)),
|
|
33194
|
+
return Pb.has(s) || (Pb.set(s, !0), console.warn("[Postprocessing] Unknown tone mapping mode", s)), Oa;
|
|
33195
33195
|
}
|
|
33196
33196
|
}
|
|
33197
33197
|
function DE(s) {
|
|
@@ -33202,7 +33202,7 @@ function DE(s) {
|
|
|
33202
33202
|
return 2;
|
|
33203
33203
|
case ou:
|
|
33204
33204
|
return 3;
|
|
33205
|
-
case
|
|
33205
|
+
case Oa:
|
|
33206
33206
|
return 1;
|
|
33207
33207
|
case $m:
|
|
33208
33208
|
return 1;
|
|
@@ -33218,7 +33218,7 @@ function ud(s) {
|
|
|
33218
33218
|
return E.POSTPROCESSING.MODULE.ToneMappingMode.ACES_FILMIC;
|
|
33219
33219
|
case ou:
|
|
33220
33220
|
return E.POSTPROCESSING.MODULE.ToneMappingMode.AGX;
|
|
33221
|
-
case
|
|
33221
|
+
case Oa:
|
|
33222
33222
|
return E.POSTPROCESSING.MODULE.ToneMappingMode.NEUTRAL;
|
|
33223
33223
|
case $m:
|
|
33224
33224
|
return E.POSTPROCESSING.MODULE.ToneMappingMode.REINHARD;
|
|
@@ -33685,7 +33685,7 @@ function qE() {
|
|
|
33685
33685
|
}
|
|
33686
33686
|
return t;
|
|
33687
33687
|
}
|
|
33688
|
-
var XE = Object.defineProperty,
|
|
33688
|
+
var XE = Object.defineProperty, rl = (s, e, t, i) => {
|
|
33689
33689
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
33690
33690
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
33691
33691
|
return n && XE(e, t, n), n;
|
|
@@ -33714,22 +33714,22 @@ class Ns extends ct {
|
|
|
33714
33714
|
return this.offset.onValueChanged = (t) => e.offset = t, this.rotation.onValueChanged = (t) => e.rotation = t, this.focusArea.onValueChanged = (t) => e.focusArea = t, this.feather.onValueChanged = (t) => e.feather = t, this.kernelSize.onValueChanged = (t) => e.blurPass.kernelSize = t, this.resolutionScale.onValueChanged = (t) => e.resolution.scale = t / window.devicePixelRatio, e;
|
|
33715
33715
|
}
|
|
33716
33716
|
}
|
|
33717
|
-
|
|
33717
|
+
rl([
|
|
33718
33718
|
u(U)
|
|
33719
33719
|
], Ns.prototype, "offset");
|
|
33720
|
-
|
|
33720
|
+
rl([
|
|
33721
33721
|
u(U)
|
|
33722
33722
|
], Ns.prototype, "rotation");
|
|
33723
|
-
|
|
33723
|
+
rl([
|
|
33724
33724
|
u(U)
|
|
33725
33725
|
], Ns.prototype, "focusArea");
|
|
33726
|
-
|
|
33726
|
+
rl([
|
|
33727
33727
|
u(U)
|
|
33728
33728
|
], Ns.prototype, "feather");
|
|
33729
|
-
|
|
33729
|
+
rl([
|
|
33730
33730
|
u(U)
|
|
33731
33731
|
], Ns.prototype, "kernelSize");
|
|
33732
|
-
|
|
33732
|
+
rl([
|
|
33733
33733
|
u(U)
|
|
33734
33734
|
], Ns.prototype, "resolutionScale");
|
|
33735
33735
|
wn("TiltShiftEffect", Ns);
|
|
@@ -33738,7 +33738,7 @@ var QE = Object.defineProperty, ry = (s, e, t, i) => {
|
|
|
33738
33738
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
33739
33739
|
return n && QE(e, t, n), n;
|
|
33740
33740
|
};
|
|
33741
|
-
class
|
|
33741
|
+
class al extends ct {
|
|
33742
33742
|
get typeName() {
|
|
33743
33743
|
return "Vignette";
|
|
33744
33744
|
}
|
|
@@ -33763,14 +33763,14 @@ class rl extends ct {
|
|
|
33763
33763
|
}
|
|
33764
33764
|
ry([
|
|
33765
33765
|
u(U)
|
|
33766
|
-
],
|
|
33766
|
+
], al.prototype, "color");
|
|
33767
33767
|
ry([
|
|
33768
33768
|
u(U)
|
|
33769
|
-
],
|
|
33769
|
+
], al.prototype, "intensity");
|
|
33770
33770
|
ry([
|
|
33771
33771
|
u(U)
|
|
33772
|
-
],
|
|
33773
|
-
wn("Vignette",
|
|
33772
|
+
], al.prototype, "center");
|
|
33773
|
+
wn("Vignette", al);
|
|
33774
33774
|
globalThis.NEEDLE_USE_POSTPROCESSING = globalThis.NEEDLE_USE_POSTPROCESSING !== void 0 ? globalThis.NEEDLE_USE_POSTPROCESSING : !0;
|
|
33775
33775
|
const as = x("debugpost"), wp = Symbol("needle:postprocessing-handler"), Ml = Symbol("needle:previous-autoclear-state"), Rl = Symbol("needle:previous-tone-mapping");
|
|
33776
33776
|
class Yw {
|
|
@@ -35197,7 +35197,7 @@ class oA {
|
|
|
35197
35197
|
const e = this._videos[this._videos.length - 1];
|
|
35198
35198
|
if (!e) return;
|
|
35199
35199
|
if (this._isInScreenspaceMode = !0, !this._screenspaceModeQuad) {
|
|
35200
|
-
if (this._screenspaceModeQuad =
|
|
35200
|
+
if (this._screenspaceModeQuad = $a.createPrimitive(Ea.Quad, {
|
|
35201
35201
|
material: new aA(e)
|
|
35202
35202
|
}), !this._screenspaceModeQuad) return;
|
|
35203
35203
|
this._screenspaceModeQuad.geometry.scale(2, 2, 2);
|
|
@@ -35644,7 +35644,7 @@ sh([
|
|
|
35644
35644
|
sh([
|
|
35645
35645
|
u()
|
|
35646
35646
|
], zr.prototype, "deviceName", 2);
|
|
35647
|
-
var hA = Object.defineProperty,
|
|
35647
|
+
var hA = Object.defineProperty, ll = (s, e, t, i) => {
|
|
35648
35648
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
35649
35649
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
35650
35650
|
return n && hA(e, t, n), n;
|
|
@@ -35746,22 +35746,22 @@ class Io extends T {
|
|
|
35746
35746
|
});
|
|
35747
35747
|
}
|
|
35748
35748
|
}
|
|
35749
|
-
|
|
35749
|
+
ll([
|
|
35750
35750
|
u(k)
|
|
35751
35751
|
], Io.prototype, "referencePoint");
|
|
35752
|
-
|
|
35752
|
+
ll([
|
|
35753
35753
|
u()
|
|
35754
35754
|
], Io.prototype, "fadeDuration");
|
|
35755
|
-
|
|
35755
|
+
ll([
|
|
35756
35756
|
u()
|
|
35757
35757
|
], Io.prototype, "minAlpha");
|
|
35758
|
-
|
|
35758
|
+
ll([
|
|
35759
35759
|
u()
|
|
35760
35760
|
], Io.prototype, "useAlphaHash");
|
|
35761
|
-
|
|
35761
|
+
ll([
|
|
35762
35762
|
u()
|
|
35763
35763
|
], Io.prototype, "overrideAlpha");
|
|
35764
|
-
|
|
35764
|
+
ll([
|
|
35765
35765
|
u()
|
|
35766
35766
|
], Io.prototype, "autoUpdate");
|
|
35767
35767
|
class pc {
|
|
@@ -35797,7 +35797,7 @@ class ef extends T {
|
|
|
35797
35797
|
if (this.gameObject instanceof G)
|
|
35798
35798
|
this.gameObject instanceof G && this.gameObject.material && (this.gameObject.material = this.gameObject.material.clone(), this.targetMesh = this.gameObject, this.targetMesh.receiveShadow = !0);
|
|
35799
35799
|
else {
|
|
35800
|
-
const e =
|
|
35800
|
+
const e = $a.createPrimitive(Ea.Quad, {
|
|
35801
35801
|
name: "ShadowCatcher",
|
|
35802
35802
|
material: new ft({
|
|
35803
35803
|
// HACK heuristic to get approx. the same colors out as with the current default ShadowCatcher material
|
|
@@ -36710,7 +36710,7 @@ class MA {
|
|
|
36710
36710
|
}, 1e3));
|
|
36711
36711
|
}
|
|
36712
36712
|
}
|
|
36713
|
-
var RA = Object.defineProperty, TA = Object.getOwnPropertyDescriptor,
|
|
36713
|
+
var RA = Object.defineProperty, TA = Object.getOwnPropertyDescriptor, cl = (s, e, t, i) => {
|
|
36714
36714
|
for (var n = i > 1 ? void 0 : i ? TA(e, t) : e, o = s.length - 1, r; o >= 0; o--)
|
|
36715
36715
|
(r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
|
|
36716
36716
|
return i && n && RA(e, t, n), n;
|
|
@@ -36722,19 +36722,19 @@ class As {
|
|
|
36722
36722
|
tangentIn = new y();
|
|
36723
36723
|
tangentOut = new y();
|
|
36724
36724
|
}
|
|
36725
|
-
|
|
36725
|
+
cl([
|
|
36726
36726
|
Ye(y)
|
|
36727
36727
|
], As.prototype, "position", 2);
|
|
36728
|
-
|
|
36728
|
+
cl([
|
|
36729
36729
|
Ye($)
|
|
36730
36730
|
], As.prototype, "rotation", 2);
|
|
36731
|
-
|
|
36731
|
+
cl([
|
|
36732
36732
|
Ye(y)
|
|
36733
36733
|
], As.prototype, "tangentIn", 2);
|
|
36734
|
-
|
|
36734
|
+
cl([
|
|
36735
36735
|
Ye(y)
|
|
36736
36736
|
], As.prototype, "tangentOut", 2);
|
|
36737
|
-
class
|
|
36737
|
+
class hl extends T {
|
|
36738
36738
|
/**
|
|
36739
36739
|
* Adds a knot to the end of the spline.
|
|
36740
36740
|
*/
|
|
@@ -36827,16 +36827,16 @@ class cl extends T {
|
|
|
36827
36827
|
const e = new Bm({
|
|
36828
36828
|
color: 6684927
|
|
36829
36829
|
}), t = this.spline.length * 10, i = this._curve.getPoints(t), n = new un().setFromPoints(i);
|
|
36830
|
-
this._debugLine = new
|
|
36830
|
+
this._debugLine = new Ca(n, e), this.gameObject?.add(this._debugLine);
|
|
36831
36831
|
}
|
|
36832
36832
|
}
|
|
36833
36833
|
}
|
|
36834
|
-
|
|
36834
|
+
cl([
|
|
36835
36835
|
Ye()
|
|
36836
|
-
],
|
|
36837
|
-
|
|
36836
|
+
], hl.prototype, "closed", 1);
|
|
36837
|
+
cl([
|
|
36838
36838
|
Ye(As)
|
|
36839
|
-
],
|
|
36839
|
+
], hl.prototype, "spline", 2);
|
|
36840
36840
|
function EA(s, e) {
|
|
36841
36841
|
const t = s.map((o) => new y(-o.position.x, o.position.y, o.position.z));
|
|
36842
36842
|
t.length === 1 && t.push(t[0]);
|
|
@@ -36926,7 +36926,7 @@ class xn extends T {
|
|
|
36926
36926
|
_lastPositionVector = new y();
|
|
36927
36927
|
}
|
|
36928
36928
|
Lo([
|
|
36929
|
-
Ye(
|
|
36929
|
+
Ye(hl)
|
|
36930
36930
|
], xn.prototype, "spline", 2);
|
|
36931
36931
|
Lo([
|
|
36932
36932
|
Ye(k)
|
|
@@ -37105,7 +37105,7 @@ const ox = class Rm extends T {
|
|
|
37105
37105
|
const o = n.obj;
|
|
37106
37106
|
this.context.players.setPlayerView(i, o, hr.Browser), n.lastUpdate = this.context.time.realtimeSinceStartup, fn.markDirty(o);
|
|
37107
37107
|
const r = e.pos();
|
|
37108
|
-
r &&
|
|
37108
|
+
r && Ma(o, r.x(), r.y(), r.z());
|
|
37109
37109
|
const a = e.rot();
|
|
37110
37110
|
a && uu(o, a.x(), a.y(), a.z());
|
|
37111
37111
|
}
|
|
@@ -37939,7 +37939,7 @@ class py extends lh {
|
|
|
37939
37939
|
console.log("no source object, removing model", t, n), this.models.splice(t, 1);
|
|
37940
37940
|
continue;
|
|
37941
37941
|
} else {
|
|
37942
|
-
const o = S.getComponent(n.sourceObject,
|
|
37942
|
+
const o = S.getComponent(n.sourceObject, Na);
|
|
37943
37943
|
this.timelines.push(o), o && n.updateDirector && (o.playOnAwake = !1);
|
|
37944
37944
|
}
|
|
37945
37945
|
}
|
|
@@ -38409,13 +38409,13 @@ dx([
|
|
|
38409
38409
|
dx([
|
|
38410
38410
|
u()
|
|
38411
38411
|
], my.prototype, "extrapolationMode");
|
|
38412
|
-
let
|
|
38412
|
+
let Na = my;
|
|
38413
38413
|
var qA = Object.defineProperty, rf = (s, e, t, i) => {
|
|
38414
38414
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
38415
38415
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
38416
38416
|
return n && qA(e, t, n), n;
|
|
38417
38417
|
};
|
|
38418
|
-
class
|
|
38418
|
+
class dl extends T {
|
|
38419
38419
|
isGizmo = !1;
|
|
38420
38420
|
translationSnap = 1;
|
|
38421
38421
|
rotationSnapAngle = 15;
|
|
@@ -38543,16 +38543,16 @@ class hl extends T {
|
|
|
38543
38543
|
}
|
|
38544
38544
|
rf([
|
|
38545
38545
|
u()
|
|
38546
|
-
],
|
|
38546
|
+
], dl.prototype, "isGizmo");
|
|
38547
38547
|
rf([
|
|
38548
38548
|
u()
|
|
38549
|
-
],
|
|
38549
|
+
], dl.prototype, "translationSnap");
|
|
38550
38550
|
rf([
|
|
38551
38551
|
u()
|
|
38552
|
-
],
|
|
38552
|
+
], dl.prototype, "rotationSnapAngle");
|
|
38553
38553
|
rf([
|
|
38554
38554
|
u()
|
|
38555
|
-
],
|
|
38555
|
+
], dl.prototype, "scaleSnap");
|
|
38556
38556
|
var XA = Object.defineProperty, QA = Object.getOwnPropertyDescriptor, af = (s, e, t, i) => {
|
|
38557
38557
|
for (var n = i > 1 ? void 0 : i ? QA(e, t) : e, o = s.length - 1, r; o >= 0; o--)
|
|
38558
38558
|
(r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
|
|
@@ -38708,7 +38708,7 @@ class Bo extends T {
|
|
|
38708
38708
|
super.awake(), Yo && console.log(this), this._isInit = !1, this.init();
|
|
38709
38709
|
}
|
|
38710
38710
|
start() {
|
|
38711
|
-
this._image?.setInteractable(this.interactable), this.gameObject.getComponentInParent(
|
|
38711
|
+
this._image?.setInteractable(this.interactable), this.gameObject.getComponentInParent(Fa) || this.gameObject.addComponent(xg);
|
|
38712
38712
|
}
|
|
38713
38713
|
onEnable() {
|
|
38714
38714
|
super.onEnable();
|
|
@@ -39165,7 +39165,7 @@ const tI = {
|
|
|
39165
39165
|
class _y extends Ci {
|
|
39166
39166
|
constructor(e) {
|
|
39167
39167
|
super(), this.position.y = -3.5;
|
|
39168
|
-
const t = new
|
|
39168
|
+
const t = new Sa();
|
|
39169
39169
|
t.deleteAttribute("uv");
|
|
39170
39170
|
const i = new ft({ metalness: 0, side: au }), n = new ft({ metalness: 0 }), o = e == "legacy" ? tI : iI, r = new jm(16777215, o.topLight.intensity, 28, 2);
|
|
39171
39171
|
r.position.set(...o.topLight.position), this.add(r);
|
|
@@ -39352,7 +39352,7 @@ var oI = Object.defineProperty, df = (s, e, t, i) => {
|
|
|
39352
39352
|
return n && oI(e, t, n), n;
|
|
39353
39353
|
};
|
|
39354
39354
|
const rI = x("debugcursor");
|
|
39355
|
-
class
|
|
39355
|
+
class ul extends T {
|
|
39356
39356
|
damping = 0;
|
|
39357
39357
|
useFullPage = !0;
|
|
39358
39358
|
keepDistance = !0;
|
|
@@ -39404,18 +39404,18 @@ class dl extends T {
|
|
|
39404
39404
|
}
|
|
39405
39405
|
df([
|
|
39406
39406
|
u()
|
|
39407
|
-
],
|
|
39407
|
+
], ul.prototype, "damping");
|
|
39408
39408
|
df([
|
|
39409
39409
|
u()
|
|
39410
|
-
],
|
|
39410
|
+
], ul.prototype, "useFullPage");
|
|
39411
39411
|
df([
|
|
39412
39412
|
u()
|
|
39413
|
-
],
|
|
39413
|
+
], ul.prototype, "keepDistance");
|
|
39414
39414
|
df([
|
|
39415
39415
|
u()
|
|
39416
|
-
],
|
|
39416
|
+
], ul.prototype, "snapToSurface");
|
|
39417
39417
|
const Cp = new ks();
|
|
39418
|
-
var aI = Object.defineProperty, lI = Object.getOwnPropertyDescriptor,
|
|
39418
|
+
var aI = Object.defineProperty, lI = Object.getOwnPropertyDescriptor, fl = (s, e, t, i) => {
|
|
39419
39419
|
for (var n = i > 1 ? void 0 : i ? lI(e, t) : e, o = s.length - 1, r; o >= 0; o--)
|
|
39420
39420
|
(r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
|
|
39421
39421
|
return i && n && aI(e, t, n), n;
|
|
@@ -39454,25 +39454,25 @@ let Is = class extends T {
|
|
|
39454
39454
|
this.hovered && this.animation?.play(this.hovered, { exclusive: !0, fadeDuration: 0.1, loop: !1, clampWhenFinished: !0 });
|
|
39455
39455
|
}
|
|
39456
39456
|
};
|
|
39457
|
-
|
|
39457
|
+
fl([
|
|
39458
39458
|
u()
|
|
39459
39459
|
], Is.prototype, "type", 2);
|
|
39460
|
-
|
|
39460
|
+
fl([
|
|
39461
39461
|
u()
|
|
39462
39462
|
], Is.prototype, "duration", 2);
|
|
39463
|
-
|
|
39463
|
+
fl([
|
|
39464
39464
|
u()
|
|
39465
39465
|
], Is.prototype, "scaleFactor", 2);
|
|
39466
|
-
|
|
39466
|
+
fl([
|
|
39467
39467
|
u(Si)
|
|
39468
39468
|
], Is.prototype, "hovered", 2);
|
|
39469
|
-
|
|
39469
|
+
fl([
|
|
39470
39470
|
u(Si)
|
|
39471
39471
|
], Is.prototype, "idle", 2);
|
|
39472
|
-
Is =
|
|
39472
|
+
Is = fl([
|
|
39473
39473
|
nv
|
|
39474
39474
|
], Is);
|
|
39475
|
-
var cI = Object.defineProperty,
|
|
39475
|
+
var cI = Object.defineProperty, pl = (s, e, t, i) => {
|
|
39476
39476
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
39477
39477
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
39478
39478
|
return n && cI(e, t, n), n;
|
|
@@ -39552,7 +39552,7 @@ class Fo extends T {
|
|
|
39552
39552
|
};
|
|
39553
39553
|
applyScroll(e, t) {
|
|
39554
39554
|
if (e)
|
|
39555
|
-
if (e instanceof
|
|
39555
|
+
if (e instanceof Na)
|
|
39556
39556
|
this.handleTimelineTarget(e, t), e.isPlaying && e.pause(), e.evaluate();
|
|
39557
39557
|
else if (e instanceof Mt)
|
|
39558
39558
|
e.setFloat("scroll", t);
|
|
@@ -39640,22 +39640,22 @@ class Fo extends T {
|
|
|
39640
39640
|
}
|
|
39641
39641
|
}
|
|
39642
39642
|
}
|
|
39643
|
-
|
|
39643
|
+
pl([
|
|
39644
39644
|
u([T, k])
|
|
39645
39645
|
], Fo.prototype, "target");
|
|
39646
|
-
|
|
39646
|
+
pl([
|
|
39647
39647
|
u()
|
|
39648
39648
|
], Fo.prototype, "damping");
|
|
39649
|
-
|
|
39649
|
+
pl([
|
|
39650
39650
|
u()
|
|
39651
39651
|
], Fo.prototype, "invert");
|
|
39652
|
-
|
|
39652
|
+
pl([
|
|
39653
39653
|
u()
|
|
39654
39654
|
], Fo.prototype, "htmlSelector");
|
|
39655
|
-
|
|
39655
|
+
pl([
|
|
39656
39656
|
u()
|
|
39657
39657
|
], Fo.prototype, "mode");
|
|
39658
|
-
|
|
39658
|
+
pl([
|
|
39659
39659
|
u(he)
|
|
39660
39660
|
], Fo.prototype, "changed");
|
|
39661
39661
|
const Ab = /* @__PURE__ */ new WeakMap(), On = [], Pp = new Array();
|
|
@@ -39785,7 +39785,7 @@ uf([
|
|
|
39785
39785
|
ot = uf([
|
|
39786
39786
|
nv
|
|
39787
39787
|
], ot);
|
|
39788
|
-
var pI = Object.defineProperty,
|
|
39788
|
+
var pI = Object.defineProperty, ml = (s, e, t, i) => {
|
|
39789
39789
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
39790
39790
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
39791
39791
|
return n && pI(e, t, n), n;
|
|
@@ -39828,22 +39828,22 @@ class zo extends T {
|
|
|
39828
39828
|
this.resetTransformAfterXRSession && (this.gameObject.position.copy(this._startPosition), this.gameObject.quaternion.copy(this._startRotation), this.gameObject.scale.copy(this._startScale));
|
|
39829
39829
|
}
|
|
39830
39830
|
}
|
|
39831
|
-
|
|
39831
|
+
ml([
|
|
39832
39832
|
u()
|
|
39833
39833
|
], zo.prototype, "side");
|
|
39834
|
-
|
|
39834
|
+
ml([
|
|
39835
39835
|
u()
|
|
39836
39836
|
], zo.prototype, "controller");
|
|
39837
|
-
|
|
39837
|
+
ml([
|
|
39838
39838
|
u()
|
|
39839
39839
|
], zo.prototype, "hands");
|
|
39840
|
-
|
|
39840
|
+
ml([
|
|
39841
39841
|
u()
|
|
39842
39842
|
], zo.prototype, "controlVisibility");
|
|
39843
|
-
|
|
39843
|
+
ml([
|
|
39844
39844
|
u()
|
|
39845
39845
|
], zo.prototype, "useGripSpace");
|
|
39846
|
-
|
|
39846
|
+
ml([
|
|
39847
39847
|
u()
|
|
39848
39848
|
], zo.prototype, "resetTransformAfterXRSession");
|
|
39849
39849
|
function _x(s, e) {
|
|
@@ -40527,7 +40527,7 @@ async function Db(s) {
|
|
|
40527
40527
|
Xh.delete(s);
|
|
40528
40528
|
}), e;
|
|
40529
40529
|
}
|
|
40530
|
-
var SI = Object.defineProperty,
|
|
40530
|
+
var SI = Object.defineProperty, gl = (s, e, t, i) => {
|
|
40531
40531
|
for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
40532
40532
|
(r = s[o]) && (n = r(e, t, n) || n);
|
|
40533
40533
|
return n && SI(e, t, n), n;
|
|
@@ -40761,22 +40761,22 @@ class $o extends T {
|
|
|
40761
40761
|
return t.setAttribute("position", new pt(new Float32Array(i), 3)), t.setAttribute("uv", new pt(new Float32Array(n), 2)), t.setAttribute("normal", new pt(new Float32Array(h), 3)), t.setIndex(d), t.computeBoundingBox(), t.computeBoundingSphere(), t;
|
|
40762
40762
|
}
|
|
40763
40763
|
}
|
|
40764
|
-
|
|
40764
|
+
gl([
|
|
40765
40765
|
u(ne)
|
|
40766
40766
|
], $o.prototype, "dataTemplate");
|
|
40767
|
-
|
|
40767
|
+
gl([
|
|
40768
40768
|
u()
|
|
40769
40769
|
], $o.prototype, "occluder");
|
|
40770
|
-
|
|
40770
|
+
gl([
|
|
40771
40771
|
u()
|
|
40772
40772
|
], $o.prototype, "initiateRoomCaptureIfNoData");
|
|
40773
|
-
|
|
40773
|
+
gl([
|
|
40774
40774
|
u()
|
|
40775
40775
|
], $o.prototype, "usePlaneData");
|
|
40776
|
-
|
|
40776
|
+
gl([
|
|
40777
40777
|
u()
|
|
40778
40778
|
], $o.prototype, "useMeshData");
|
|
40779
|
-
|
|
40779
|
+
gl([
|
|
40780
40780
|
u()
|
|
40781
40781
|
], $o.prototype, "runInVR");
|
|
40782
40782
|
var CI = Object.defineProperty, PI = (s, e, t, i) => {
|
|
@@ -40808,7 +40808,7 @@ class xy extends T {
|
|
|
40808
40808
|
if (jb) {
|
|
40809
40809
|
const e = new k();
|
|
40810
40810
|
e.position.y += 0.5, this.gameObject.add(e);
|
|
40811
|
-
const t = e.addNewComponent(
|
|
40811
|
+
const t = e.addNewComponent(tl);
|
|
40812
40812
|
t && (t.isGizmo = !1);
|
|
40813
40813
|
const i = new xi(0.5);
|
|
40814
40814
|
this.gameObject.add(i);
|
|
@@ -40847,13 +40847,13 @@ P.add("AudioSource", Yi);
|
|
|
40847
40847
|
P.add("Avatar_Brain_LookAt", zd);
|
|
40848
40848
|
P.add("Avatar_MouthShapes", Pu);
|
|
40849
40849
|
P.add("Avatar_MustacheShake", Av);
|
|
40850
|
-
P.add("AvatarBlink_Simple",
|
|
40850
|
+
P.add("AvatarBlink_Simple", Ha);
|
|
40851
40851
|
P.add("AvatarEyeLook_Rotation", jv);
|
|
40852
40852
|
P.add("AxesHelper", Nc);
|
|
40853
40853
|
P.add("BasicIKConstraint", Bv);
|
|
40854
40854
|
P.add("BoxHelperComponent", Ot);
|
|
40855
40855
|
P.add("Camera", bi);
|
|
40856
|
-
P.add("CharacterController",
|
|
40856
|
+
P.add("CharacterController", Ga);
|
|
40857
40857
|
P.add("CharacterControllerInput", So);
|
|
40858
40858
|
P.add("Collider", ki);
|
|
40859
40859
|
P.add("SphereCollider", $c);
|
|
@@ -40865,7 +40865,7 @@ P.add("LogStats", zv);
|
|
|
40865
40865
|
P.add("DeleteBox", ur);
|
|
40866
40866
|
P.add("Deletable", Nv);
|
|
40867
40867
|
P.add("DeviceFlag", Tg);
|
|
40868
|
-
P.add("DragControls",
|
|
40868
|
+
P.add("DragControls", aa);
|
|
40869
40869
|
P.add("DropListener", Po);
|
|
40870
40870
|
P.add("Duplicatable", Jv);
|
|
40871
40871
|
P.add("EventListEvent", wg);
|
|
@@ -40873,7 +40873,7 @@ P.add("EventTrigger", Dg);
|
|
|
40873
40873
|
P.add("GltfExportBox", sw);
|
|
40874
40874
|
P.add("GltfExport", ow);
|
|
40875
40875
|
P.add("VariantAction", mw);
|
|
40876
|
-
P.add("ChangeTransformOnClick",
|
|
40876
|
+
P.add("ChangeTransformOnClick", Ya);
|
|
40877
40877
|
P.add("ChangeMaterialOnClick", gw);
|
|
40878
40878
|
P.add("SetActiveOnClick", yw);
|
|
40879
40879
|
P.add("HideOnStart", hn);
|
|
@@ -40886,7 +40886,7 @@ P.add("VisibilityAction", Du);
|
|
|
40886
40886
|
P.add("TapGestureTrigger", _w);
|
|
40887
40887
|
P.add("USDZExporter", $n);
|
|
40888
40888
|
P.add("Fog", Qc);
|
|
40889
|
-
P.add("BoxGizmo",
|
|
40889
|
+
P.add("BoxGizmo", tl);
|
|
40890
40890
|
P.add("GridHelper", Yc);
|
|
40891
40891
|
P.add("GroundProjectedEnv", Ds);
|
|
40892
40892
|
P.add("UsageMarker", Ru);
|
|
@@ -40895,11 +40895,11 @@ P.add("FixedJoint", jw);
|
|
|
40895
40895
|
P.add("HingeJoint", $u);
|
|
40896
40896
|
P.add("Light", Ti);
|
|
40897
40897
|
P.add("LODGroup", Wu);
|
|
40898
|
-
P.add("LookAtConstraint",
|
|
40898
|
+
P.add("LookAtConstraint", Va);
|
|
40899
40899
|
P.add("NeedleMenu", Fs);
|
|
40900
40900
|
P.add("NestedGltf", Vu);
|
|
40901
40901
|
P.add("Networking", Fw);
|
|
40902
|
-
P.add("OffsetConstraint",
|
|
40902
|
+
P.add("OffsetConstraint", il);
|
|
40903
40903
|
P.add("CameraTargetReachedEvent", Fd);
|
|
40904
40904
|
P.add("OrbitControls", ge);
|
|
40905
40905
|
P.add("ParticleSystemRenderer", vn);
|
|
@@ -40918,7 +40918,7 @@ P.add("ScreenSpaceAmbientOcclusionN8", ns);
|
|
|
40918
40918
|
P.add("SharpeningEffect", Ju);
|
|
40919
40919
|
P.add("TiltShiftEffect", Ns);
|
|
40920
40920
|
P.add("ToneMappingEffect", Sr);
|
|
40921
|
-
P.add("Vignette",
|
|
40921
|
+
P.add("Vignette", al);
|
|
40922
40922
|
P.add("Volume", nh);
|
|
40923
40923
|
P.add("ReflectionProbe", Ud);
|
|
40924
40924
|
P.add("Renderer", ri);
|
|
@@ -40934,7 +40934,7 @@ P.add("SmoothFollow", cy);
|
|
|
40934
40934
|
P.add("SpatialTriggerReceiver", Os);
|
|
40935
40935
|
P.add("SpatialTrigger", hy);
|
|
40936
40936
|
P.add("SpectatorCamera", dy);
|
|
40937
|
-
P.add("SplineContainer",
|
|
40937
|
+
P.add("SplineContainer", hl);
|
|
40938
40938
|
P.add("SplineWalker", xn);
|
|
40939
40939
|
P.add("SpriteRenderer", Mi);
|
|
40940
40940
|
P.add("SyncedCamera", rx);
|
|
@@ -40942,14 +40942,14 @@ P.add("SyncedRoom", ss);
|
|
|
40942
40942
|
P.add("SyncedTransform", Xn);
|
|
40943
40943
|
P.add("TestRunner", ax);
|
|
40944
40944
|
P.add("TestSimulateUserData", lx);
|
|
40945
|
-
P.add("PlayableDirector",
|
|
40945
|
+
P.add("PlayableDirector", Na);
|
|
40946
40946
|
P.add("SignalReceiver", of);
|
|
40947
40947
|
P.add("AnimationTrackHandler", Qd);
|
|
40948
40948
|
P.add("AudioTrackHandler", ho);
|
|
40949
40949
|
P.add("MarkerTrackHandler", fy);
|
|
40950
40950
|
P.add("SignalTrackHandler", Yd);
|
|
40951
40951
|
P.add("ControlTrackHandler", py);
|
|
40952
|
-
P.add("TransformGizmo",
|
|
40952
|
+
P.add("TransformGizmo", dl);
|
|
40953
40953
|
P.add("BaseUIComponent", yn);
|
|
40954
40954
|
P.add("UIRootComponent", zu);
|
|
40955
40955
|
P.add("Button", Bo);
|
|
@@ -40967,7 +40967,7 @@ P.add("GridLayoutGroup", Aw);
|
|
|
40967
40967
|
P.add("Outline", Xc);
|
|
40968
40968
|
P.add("ObjectRaycaster", Qi);
|
|
40969
40969
|
P.add("GraphicRaycaster", xg);
|
|
40970
|
-
P.add("SpatialGrabRaycaster",
|
|
40970
|
+
P.add("SpatialGrabRaycaster", za);
|
|
40971
40971
|
P.add("RectTransform", Qn);
|
|
40972
40972
|
P.add("SpatialHtml", cf);
|
|
40973
40973
|
P.add("Text", Yt);
|
|
@@ -40977,7 +40977,7 @@ P.add("OpenURL", uh);
|
|
|
40977
40977
|
P.add("VideoPlayer", gt);
|
|
40978
40978
|
P.add("Voip", Er);
|
|
40979
40979
|
P.add("ClickThrough", vy);
|
|
40980
|
-
P.add("CursorFollow",
|
|
40980
|
+
P.add("CursorFollow", ul);
|
|
40981
40981
|
P.add("HoverAnimation", Is);
|
|
40982
40982
|
P.add("ScrollFollow", Fo);
|
|
40983
40983
|
P.add("ViewBox", ot);
|
|
@@ -41040,18 +41040,18 @@ async function TI(s, e, t, i = null, n) {
|
|
|
41040
41040
|
}
|
|
41041
41041
|
});
|
|
41042
41042
|
}
|
|
41043
|
-
const Em = Symbol("original-component-name"),
|
|
41043
|
+
const Em = Symbol("original-component-name"), Qr = /* @__PURE__ */ new Map();
|
|
41044
41044
|
function Am(s, e, t, i) {
|
|
41045
41045
|
if (e === null || !s) return;
|
|
41046
41046
|
const n = s.guid, o = s.guid;
|
|
41047
|
-
o?.length && (
|
|
41048
|
-
const r = o &&
|
|
41047
|
+
o?.length && (Qr.has(o) || (yc && console.log('Creating InstanceIdProvider with key "' + o + '" for object ' + s.name), Qr.set(o, new Dt(o))));
|
|
41048
|
+
const r = o && Qr.get(o) || e;
|
|
41049
41049
|
if (s.guid = r.generateUUID(), n && n !== "invalid" && (t[n] = s.guid), s && s.userData && s.userData.components)
|
|
41050
41050
|
for (const a of s.userData.components) {
|
|
41051
41051
|
if (a === null) continue;
|
|
41052
41052
|
const l = a.guid;
|
|
41053
|
-
l ?
|
|
41054
|
-
const c =
|
|
41053
|
+
l ? Qr.has(l) || (yc && console.log('Creating InstanceIdProvider with key "' + l + '" for component ' + a[Em]), Qr.set(l, new Dt(l))) : yc && console.warn("Can not create IdProvider: component " + a[Em] + " has no guid", a.guid);
|
|
41054
|
+
const c = Qr.get(l) || e, h = a.guid;
|
|
41055
41055
|
a.guid = c.generateUUID(), h && h !== "invalid" && (t[h] = a.guid), a.resolveGuids && i.push(a);
|
|
41056
41056
|
}
|
|
41057
41057
|
if (s.children)
|
|
@@ -41071,7 +41071,7 @@ async function Im(s, e, t, i, n) {
|
|
|
41071
41071
|
const l = P.get(a.name);
|
|
41072
41072
|
if (l != null) {
|
|
41073
41073
|
const c = new l();
|
|
41074
|
-
c.sourceId = s.gltfId,
|
|
41074
|
+
c.sourceId = s.gltfId, Ia(c, a, s.implementationInformation), c.context = s.context, "guid" in a && (c[Kh] = a.guid), c[Em] = a.name, ga(e, c, !1), t.push({ instance: c, compData: a, obj: e }), c.isCamera && s.context && s.context.mainCamera === null && c.tag === "MainCamera" && s.context.setCurrentCamera(c), s.context?.physics?.engine?.isInitialized === !1 && (c.isCollider || c.isRigidbody) && s.context?.physics.engine?.initialize();
|
|
41075
41075
|
} else
|
|
41076
41076
|
yc && console.debug("unknown component: " + a.name), Al.includes(a.name) || Al.push(a.name);
|
|
41077
41077
|
} catch (l) {
|
|
@@ -41111,23 +41111,23 @@ class vx {
|
|
|
41111
41111
|
}
|
|
41112
41112
|
I0(vx);
|
|
41113
41113
|
const wx = x("printGltf") || x("printgltf"), AI = x("debugfileformat");
|
|
41114
|
-
async function xx(s, e) {
|
|
41115
|
-
const
|
|
41116
|
-
AI && console.debug(`Determined file type: '${
|
|
41117
|
-
for (const
|
|
41118
|
-
const { callback:
|
|
41119
|
-
if (
|
|
41120
|
-
return console.debug(`Using custom loader (${
|
|
41121
|
-
}
|
|
41122
|
-
switch (
|
|
41114
|
+
async function xx(s, e, t) {
|
|
41115
|
+
const i = await NM(s, { useExtension: !0 }) || "unknown";
|
|
41116
|
+
AI && console.debug(`Determined file type: '${i}' for url '${s}'`, { registeredModelLoaderCallbacks: la });
|
|
41117
|
+
for (const n of la) {
|
|
41118
|
+
const { callback: o } = n, r = o({ context: e, url: s, mimetype: i });
|
|
41119
|
+
if (r instanceof Promise && await r, r)
|
|
41120
|
+
return console.debug(`Using custom loader (${n.name || "unnamed"}) for ${i} at '${s}'`), r;
|
|
41121
|
+
}
|
|
41122
|
+
switch (i) {
|
|
41123
41123
|
case "unsupported":
|
|
41124
41124
|
return null;
|
|
41125
41125
|
default:
|
|
41126
41126
|
case "unknown": {
|
|
41127
|
-
console.warn(`Unknown file type (${
|
|
41127
|
+
console.warn(`Unknown file type (${i}). Needle Engine will fallback to the GLTFLoader - To support more model formats please create a Needle loader plugin.
|
|
41128
41128
|
Use import { NeedleEngineModelLoader } from "@needle-tools/engine" namespace to register your loader.`, s);
|
|
41129
|
-
const
|
|
41130
|
-
return await um(
|
|
41129
|
+
const n = new Ts();
|
|
41130
|
+
return await um(n, e, s, t), n;
|
|
41131
41131
|
}
|
|
41132
41132
|
case "model/fbx":
|
|
41133
41133
|
case "model/vnd.autodesk.fbx":
|
|
@@ -41137,12 +41137,12 @@ Use import { NeedleEngineModelLoader } from "@needle-tools/engine" namespace to
|
|
|
41137
41137
|
case "model/vnd.usdz+zip":
|
|
41138
41138
|
case "model/vnd.usd+zip":
|
|
41139
41139
|
case "model/vnd.usda+zip":
|
|
41140
|
-
return console.warn(
|
|
41140
|
+
return console.warn(i.toUpperCase() + " files are not supported."), null;
|
|
41141
41141
|
case "model/gltf+json":
|
|
41142
41142
|
case "model/gltf-binary":
|
|
41143
41143
|
case "model/vrm": {
|
|
41144
|
-
const
|
|
41145
|
-
return await um(
|
|
41144
|
+
const n = new Ts();
|
|
41145
|
+
return await um(n, e, s, t), n;
|
|
41146
41146
|
}
|
|
41147
41147
|
}
|
|
41148
41148
|
}
|
|
@@ -41151,7 +41151,7 @@ function x2(s, e) {
|
|
|
41151
41151
|
}
|
|
41152
41152
|
async function II(s, e, t, i) {
|
|
41153
41153
|
typeof t != "string" && (console.warn("Parse gltf binary without path, this might lead to errors in resolving extensions. Please provide the source path of the gltf/glb file", t, typeof t), t = ""), wx && console.log("Parse glTF", t);
|
|
41154
|
-
const n = await xx(t, s);
|
|
41154
|
+
const n = await xx(t, s, t);
|
|
41155
41155
|
if (!n)
|
|
41156
41156
|
return;
|
|
41157
41157
|
const { componentsExtension: o } = Cx(n, s);
|
|
@@ -41186,7 +41186,7 @@ async function II(s, e, t, i) {
|
|
|
41186
41186
|
}
|
|
41187
41187
|
async function Sx(s, e, t, i, n) {
|
|
41188
41188
|
DI(e);
|
|
41189
|
-
const o = await xx(e, s);
|
|
41189
|
+
const o = await xx(e, s, t);
|
|
41190
41190
|
if (!o)
|
|
41191
41191
|
return;
|
|
41192
41192
|
const { componentsExtension: r } = Cx(o, s);
|
|
@@ -42686,7 +42686,7 @@ Error:`, r), null;
|
|
|
42686
42686
|
const l = this._tempPosition.copy(a).applyQuaternion(this._tempQuaternion), c = Qe(t.gameObject);
|
|
42687
42687
|
l.multiply(c), o.x -= l.x, o.y -= l.y, o.z -= l.z;
|
|
42688
42688
|
}
|
|
42689
|
-
|
|
42689
|
+
Ma(t.gameObject, o.x, o.y, o.z), x0(t.gameObject, r.x, r.y, r.z, r.w);
|
|
42690
42690
|
}
|
|
42691
42691
|
}
|
|
42692
42692
|
syncPhysicsBody(e, t, i, n) {
|
|
@@ -42790,13 +42790,13 @@ class GI {
|
|
|
42790
42790
|
onCollisionStarted(e, t, i, n) {
|
|
42791
42791
|
let o = null;
|
|
42792
42792
|
if (e.isTrigger || i.isTrigger)
|
|
42793
|
-
|
|
42793
|
+
Da(e.gameObject, (r) => {
|
|
42794
42794
|
r.onTriggerEnter && !r.destroyed && r.onTriggerEnter(i), this.activeTriggers.push({ collider: e, component: r, otherCollider: i });
|
|
42795
42795
|
});
|
|
42796
42796
|
else {
|
|
42797
42797
|
const r = e.gameObject;
|
|
42798
42798
|
this.world.contactPair(t, n, (a, l) => {
|
|
42799
|
-
|
|
42799
|
+
Da(r, (c) => {
|
|
42800
42800
|
if (c.destroyed) return;
|
|
42801
42801
|
const h = c.onCollisionEnter || c.onCollisionStay || c.onCollisionExit;
|
|
42802
42802
|
if (h || Rp) {
|
|
@@ -43260,12 +43260,12 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43260
43260
|
AnimatorController: pn,
|
|
43261
43261
|
Antialiasing: Xu,
|
|
43262
43262
|
Attractor: th,
|
|
43263
|
-
AudioExtension:
|
|
43263
|
+
AudioExtension: Qa,
|
|
43264
43264
|
AudioListener: lo,
|
|
43265
43265
|
AudioSource: Yi,
|
|
43266
43266
|
AudioTrackHandler: ho,
|
|
43267
43267
|
Avatar: wr,
|
|
43268
|
-
AvatarBlink_Simple:
|
|
43268
|
+
AvatarBlink_Simple: Ha,
|
|
43269
43269
|
AvatarEyeLook_Rotation: jv,
|
|
43270
43270
|
AvatarLoader: KI,
|
|
43271
43271
|
AvatarMarker: je,
|
|
@@ -43273,7 +43273,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43273
43273
|
Avatar_Brain_LookAt: zd,
|
|
43274
43274
|
Avatar_MouthShapes: Pu,
|
|
43275
43275
|
Avatar_MustacheShake: Av,
|
|
43276
|
-
Avatar_POI:
|
|
43276
|
+
Avatar_POI: va,
|
|
43277
43277
|
AxesHelper: Nc,
|
|
43278
43278
|
BaseUIComponent: yn,
|
|
43279
43279
|
BasicIKConstraint: Bv,
|
|
@@ -43281,7 +43281,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43281
43281
|
BehaviorModel: jt,
|
|
43282
43282
|
BloomEffect: oy,
|
|
43283
43283
|
BoxCollider: Rg,
|
|
43284
|
-
BoxGizmo:
|
|
43284
|
+
BoxGizmo: tl,
|
|
43285
43285
|
BoxHelperComponent: Ot,
|
|
43286
43286
|
Button: Bo,
|
|
43287
43287
|
CallInfo: so,
|
|
@@ -43291,8 +43291,8 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43291
43291
|
CanvasGroup: xr,
|
|
43292
43292
|
CapsuleCollider: bo,
|
|
43293
43293
|
ChangeMaterialOnClick: gw,
|
|
43294
|
-
ChangeTransformOnClick:
|
|
43295
|
-
CharacterController:
|
|
43294
|
+
ChangeTransformOnClick: Ya,
|
|
43295
|
+
CharacterController: Ga,
|
|
43296
43296
|
CharacterControllerInput: So,
|
|
43297
43297
|
ChromaticAberration: Yu,
|
|
43298
43298
|
ClickThrough: vy,
|
|
@@ -43302,14 +43302,14 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43302
43302
|
ColorOverLifetimeModule: ey,
|
|
43303
43303
|
ContactShadows: Mu,
|
|
43304
43304
|
ControlTrackHandler: py,
|
|
43305
|
-
CursorFollow:
|
|
43306
|
-
CustomBranding:
|
|
43305
|
+
CursorFollow: ul,
|
|
43306
|
+
CustomBranding: el,
|
|
43307
43307
|
Deletable: Nv,
|
|
43308
43308
|
DeleteBox: ur,
|
|
43309
43309
|
DepthOfField: is,
|
|
43310
43310
|
DeviceFlag: Tg,
|
|
43311
43311
|
DocumentExtension: ZI,
|
|
43312
|
-
DragControls:
|
|
43312
|
+
DragControls: aa,
|
|
43313
43313
|
DropListener: Po,
|
|
43314
43314
|
Duplicatable: Jv,
|
|
43315
43315
|
EffectWrapper: Gd,
|
|
@@ -43325,13 +43325,13 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43325
43325
|
Fog: Qc,
|
|
43326
43326
|
GltfExport: ow,
|
|
43327
43327
|
GltfExportBox: sw,
|
|
43328
|
-
Gradient:
|
|
43328
|
+
Gradient: nl,
|
|
43329
43329
|
Graphic: Uu,
|
|
43330
43330
|
GraphicRaycaster: xg,
|
|
43331
43331
|
GridHelper: Yc,
|
|
43332
43332
|
GridLayoutGroup: Aw,
|
|
43333
43333
|
GroundProjectedEnv: Ds,
|
|
43334
|
-
GroupActionModel:
|
|
43334
|
+
GroupActionModel: ca,
|
|
43335
43335
|
HideOnStart: hn,
|
|
43336
43336
|
HingeJoint: $u,
|
|
43337
43337
|
HorizontalLayoutGroup: Ew,
|
|
@@ -43341,8 +43341,8 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43341
43341
|
Image: ch,
|
|
43342
43342
|
InheritVelocityModule: $w,
|
|
43343
43343
|
InputField: ux,
|
|
43344
|
-
InstanceHandle:
|
|
43345
|
-
InstancingHandler:
|
|
43344
|
+
InstanceHandle: wa,
|
|
43345
|
+
InstancingHandler: Ua,
|
|
43346
43346
|
Interactable: Uv,
|
|
43347
43347
|
Keyframe: vi,
|
|
43348
43348
|
LODGroup: Wu,
|
|
@@ -43351,24 +43351,24 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43351
43351
|
LimitVelocityOverLifetimeModule: bt,
|
|
43352
43352
|
LogStats: zv,
|
|
43353
43353
|
LookAt: mx,
|
|
43354
|
-
LookAtConstraint:
|
|
43354
|
+
LookAtConstraint: Va,
|
|
43355
43355
|
MainModule: Kt,
|
|
43356
43356
|
MarkerTrackHandler: fy,
|
|
43357
43357
|
MaskableGraphic: Nu,
|
|
43358
43358
|
MeshCollider: Ar,
|
|
43359
43359
|
MeshRenderer: Tu,
|
|
43360
43360
|
MinMaxCurve: Y,
|
|
43361
|
-
MinMaxGradient:
|
|
43361
|
+
MinMaxGradient: sl,
|
|
43362
43362
|
NeedleMenu: Fs,
|
|
43363
43363
|
NestedGltf: Vu,
|
|
43364
43364
|
Networking: Fw,
|
|
43365
43365
|
NoiseModule: ve,
|
|
43366
43366
|
ObjectRaycaster: Qi,
|
|
43367
|
-
OffsetConstraint:
|
|
43367
|
+
OffsetConstraint: il,
|
|
43368
43368
|
OpenURL: uh,
|
|
43369
43369
|
OrbitControls: ge,
|
|
43370
43370
|
Outline: Xc,
|
|
43371
|
-
Padding:
|
|
43371
|
+
Padding: Ja,
|
|
43372
43372
|
ParticleBurst: xm,
|
|
43373
43373
|
ParticleSubEmitter: Ww,
|
|
43374
43374
|
ParticleSystem: Hd,
|
|
@@ -43377,7 +43377,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43377
43377
|
PixelationEffect: Zu,
|
|
43378
43378
|
PlayAnimationOnClick: Wd,
|
|
43379
43379
|
PlayAudioOnClick: br,
|
|
43380
|
-
PlayableDirector:
|
|
43380
|
+
PlayableDirector: Na,
|
|
43381
43381
|
PlayerColor: Ac,
|
|
43382
43382
|
PointerEventData: Su,
|
|
43383
43383
|
PostProcessingHandler: Yw,
|
|
@@ -43410,16 +43410,16 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43410
43410
|
SignalTrackHandler: Yd,
|
|
43411
43411
|
Size: _T,
|
|
43412
43412
|
SizeBySpeedModule: Ei,
|
|
43413
|
-
SizeOverLifetimeModule:
|
|
43413
|
+
SizeOverLifetimeModule: ol,
|
|
43414
43414
|
SkinnedMeshRenderer: Kv,
|
|
43415
43415
|
SmoothFollow: cy,
|
|
43416
|
-
SpatialGrabRaycaster:
|
|
43416
|
+
SpatialGrabRaycaster: za,
|
|
43417
43417
|
SpatialHtml: cf,
|
|
43418
43418
|
SpatialTrigger: hy,
|
|
43419
43419
|
SpatialTriggerReceiver: Os,
|
|
43420
43420
|
SpectatorCamera: dy,
|
|
43421
43421
|
SphereCollider: $c,
|
|
43422
|
-
SplineContainer:
|
|
43422
|
+
SplineContainer: hl,
|
|
43423
43423
|
SplineData: As,
|
|
43424
43424
|
SplineWalker: xn,
|
|
43425
43425
|
Sprite: Oo,
|
|
@@ -43442,7 +43442,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43442
43442
|
ToneMappingEffect: Sr,
|
|
43443
43443
|
TrailModule: $e,
|
|
43444
43444
|
TransformData: Ne,
|
|
43445
|
-
TransformGizmo:
|
|
43445
|
+
TransformGizmo: dl,
|
|
43446
43446
|
TriggerBuilder: qt,
|
|
43447
43447
|
TriggerModel: fr,
|
|
43448
43448
|
UIRaycastUtils: Rv,
|
|
@@ -43458,7 +43458,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43458
43458
|
get ViewBox() {
|
|
43459
43459
|
return ot;
|
|
43460
43460
|
},
|
|
43461
|
-
Vignette:
|
|
43461
|
+
Vignette: al,
|
|
43462
43462
|
VisibilityAction: Du,
|
|
43463
43463
|
Voip: Er,
|
|
43464
43464
|
Volume: nh,
|
|
@@ -43485,11 +43485,11 @@ ue.registerCallback(de.MissingCamera, (s) => {
|
|
|
43485
43485
|
t.name = "Default Fallback Camera", e.add(t);
|
|
43486
43486
|
const i = new bi();
|
|
43487
43487
|
if (i.sourceId = s.files?.[0]?.src ?? "unknown", i.fieldOfView = 35, s.context.domElement.getAttribute("transparent") != null)
|
|
43488
|
-
i.clearFlags =
|
|
43488
|
+
i.clearFlags = ba.Uninitialized;
|
|
43489
43489
|
else if (s.context.domElement.getAttribute("background-image")?.length || s.context.lightmaps.tryGetSkybox(i.sourceId))
|
|
43490
|
-
i.clearFlags =
|
|
43490
|
+
i.clearFlags = ba.Skybox;
|
|
43491
43491
|
else {
|
|
43492
|
-
if (i.clearFlags =
|
|
43492
|
+
if (i.clearFlags = ba.SolidColor, !s.context.domElement.getAttribute("background-color")) {
|
|
43493
43493
|
let a = "#efefef";
|
|
43494
43494
|
typeof window !== void 0 && window.matchMedia("(prefers-color-scheme: dark)").matches && (a = "#1f1f1f"), e.background = new se(a);
|
|
43495
43495
|
}
|
|
@@ -43498,7 +43498,7 @@ ue.registerCallback(de.MissingCamera, (s) => {
|
|
|
43498
43498
|
e.environment = a.fromScene(l, 0.025).texture;
|
|
43499
43499
|
}
|
|
43500
43500
|
}
|
|
43501
|
-
const o =
|
|
43501
|
+
const o = ga(t, i, !0);
|
|
43502
43502
|
return t.position.x = 0, t.position.y = 1, t.position.z = 2, s.context.domElement?.cameraControls != !1 && Ex(s.context, o), o;
|
|
43503
43503
|
});
|
|
43504
43504
|
ue.registerCallback(de.ContextCreated, (s) => {
|
|
@@ -43535,11 +43535,11 @@ ue.registerCallback(de.ContextCreated, (s) => {
|
|
|
43535
43535
|
for (const t of s.files)
|
|
43536
43536
|
S.foreachComponent(t.file.scene, (n) => {
|
|
43537
43537
|
if (n.enabled !== !1) {
|
|
43538
|
-
if (n instanceof Xt && n.playAutomatically || n instanceof Mt || n instanceof
|
|
43538
|
+
if (n instanceof Xt && n.playAutomatically || n instanceof Mt || n instanceof Na && n.playOnAwake === !0)
|
|
43539
43539
|
return !0;
|
|
43540
43540
|
if (n instanceof Xt)
|
|
43541
43541
|
return n.playAutomatically = !0, !0;
|
|
43542
|
-
if (n instanceof
|
|
43542
|
+
if (n instanceof Na)
|
|
43543
43543
|
return n.playOnAwake = !0, !0;
|
|
43544
43544
|
}
|
|
43545
43545
|
}, !0) !== !0 && yr.autoplayAnimations(t.file);
|
|
@@ -43547,7 +43547,7 @@ ue.registerCallback(de.ContextCreated, (s) => {
|
|
|
43547
43547
|
var Wb;
|
|
43548
43548
|
((s) => {
|
|
43549
43549
|
function e(t, i = !1, n = 0.75) {
|
|
43550
|
-
const o = new
|
|
43550
|
+
const o = new hl(), r = 1 - j.clamp(n, 0, 1);
|
|
43551
43551
|
return t.forEach((a, l) => {
|
|
43552
43552
|
const c = new y();
|
|
43553
43553
|
l < t.length - 1 ? c.subVectors(t[l + 1], a).normalize().multiplyScalar(r) : i && t.length > 1 && c.subVectors(t[0], a).normalize().multiplyScalar(r);
|
|
@@ -43626,12 +43626,12 @@ export {
|
|
|
43626
43626
|
_P as AssetDatabase,
|
|
43627
43627
|
ne as AssetReference,
|
|
43628
43628
|
th as Attractor,
|
|
43629
|
-
|
|
43629
|
+
Qa as AudioExtension,
|
|
43630
43630
|
lo as AudioListener,
|
|
43631
43631
|
Yi as AudioSource,
|
|
43632
43632
|
ho as AudioTrackHandler,
|
|
43633
43633
|
wr as Avatar,
|
|
43634
|
-
|
|
43634
|
+
Ha as AvatarBlink_Simple,
|
|
43635
43635
|
jv as AvatarEyeLook_Rotation,
|
|
43636
43636
|
KI as AvatarLoader,
|
|
43637
43637
|
je as AvatarMarker,
|
|
@@ -43639,7 +43639,7 @@ export {
|
|
|
43639
43639
|
zd as Avatar_Brain_LookAt,
|
|
43640
43640
|
Pu as Avatar_MouthShapes,
|
|
43641
43641
|
Av as Avatar_MustacheShake,
|
|
43642
|
-
|
|
43642
|
+
va as Avatar_POI,
|
|
43643
43643
|
$l as Axes,
|
|
43644
43644
|
Nc as AxesHelper,
|
|
43645
43645
|
E0 as BUILD_TIME,
|
|
@@ -43647,10 +43647,10 @@ export {
|
|
|
43647
43647
|
Bv as BasicIKConstraint,
|
|
43648
43648
|
Sw as BehaviorExtension,
|
|
43649
43649
|
jt as BehaviorModel,
|
|
43650
|
-
|
|
43650
|
+
Ba as BlobStorage,
|
|
43651
43651
|
oy as BloomEffect,
|
|
43652
43652
|
Rg as BoxCollider,
|
|
43653
|
-
|
|
43653
|
+
tl as BoxGizmo,
|
|
43654
43654
|
Ot as BoxHelperComponent,
|
|
43655
43655
|
Bo as Button,
|
|
43656
43656
|
Dn as ButtonsFactory,
|
|
@@ -43662,12 +43662,12 @@ export {
|
|
|
43662
43662
|
xr as CanvasGroup,
|
|
43663
43663
|
bo as CapsuleCollider,
|
|
43664
43664
|
gw as ChangeMaterialOnClick,
|
|
43665
|
-
|
|
43666
|
-
|
|
43665
|
+
Ya as ChangeTransformOnClick,
|
|
43666
|
+
Ga as CharacterController,
|
|
43667
43667
|
So as CharacterControllerInput,
|
|
43668
43668
|
Yu as ChromaticAberration,
|
|
43669
43669
|
Xi as CircularBuffer,
|
|
43670
|
-
|
|
43670
|
+
ba as ClearFlags,
|
|
43671
43671
|
vy as ClickThrough,
|
|
43672
43672
|
us as ClipExtrapolation,
|
|
43673
43673
|
ki as Collider,
|
|
@@ -43688,8 +43688,8 @@ export {
|
|
|
43688
43688
|
de as ContextEvent,
|
|
43689
43689
|
ue as ContextRegistry,
|
|
43690
43690
|
py as ControlTrackHandler,
|
|
43691
|
-
|
|
43692
|
-
|
|
43691
|
+
ul as CursorFollow,
|
|
43692
|
+
el as CustomBranding,
|
|
43693
43693
|
Re as CustomShader,
|
|
43694
43694
|
im as DefaultReflectionMode,
|
|
43695
43695
|
Nv as Deletable,
|
|
@@ -43698,7 +43698,7 @@ export {
|
|
|
43698
43698
|
Tg as DeviceFlag,
|
|
43699
43699
|
q as DeviceUtilities,
|
|
43700
43700
|
ZI as DocumentExtension,
|
|
43701
|
-
|
|
43701
|
+
aa as DragControls,
|
|
43702
43702
|
$v as DragMode,
|
|
43703
43703
|
Po as DropListener,
|
|
43704
43704
|
Jv as Duplicatable,
|
|
@@ -43712,7 +43712,7 @@ export {
|
|
|
43712
43712
|
si as EventSystem,
|
|
43713
43713
|
Dg as EventTrigger,
|
|
43714
43714
|
cR as FieldWithDefault,
|
|
43715
|
-
|
|
43715
|
+
_a as FileReference,
|
|
43716
43716
|
SO as FileReferenceSerializer,
|
|
43717
43717
|
f2 as FileSpawnModel,
|
|
43718
43718
|
zM as File_Event,
|
|
@@ -43724,14 +43724,14 @@ export {
|
|
|
43724
43724
|
z as Gizmos,
|
|
43725
43725
|
ow as GltfExport,
|
|
43726
43726
|
sw as GltfExportBox,
|
|
43727
|
-
|
|
43727
|
+
nl as Gradient,
|
|
43728
43728
|
Uu as Graphic,
|
|
43729
43729
|
xg as GraphicRaycaster,
|
|
43730
43730
|
gr as Graphics,
|
|
43731
43731
|
Yc as GridHelper,
|
|
43732
43732
|
Aw as GridLayoutGroup,
|
|
43733
43733
|
Ds as GroundProjectedEnv,
|
|
43734
|
-
|
|
43734
|
+
ca as GroupActionModel,
|
|
43735
43735
|
Cg as HideFlags,
|
|
43736
43736
|
hn as HideOnStart,
|
|
43737
43737
|
$u as HingeJoint,
|
|
@@ -43739,15 +43739,15 @@ export {
|
|
|
43739
43739
|
qL as HostData,
|
|
43740
43740
|
Is as HoverAnimation,
|
|
43741
43741
|
ch as Image,
|
|
43742
|
-
|
|
43742
|
+
ya as ImageReference,
|
|
43743
43743
|
xO as ImageReferenceSerializer,
|
|
43744
43744
|
$w as InheritVelocityModule,
|
|
43745
43745
|
UC as Input,
|
|
43746
43746
|
mi as InputEventQueue,
|
|
43747
43747
|
De as InputEvents,
|
|
43748
43748
|
ux as InputField,
|
|
43749
|
-
|
|
43750
|
-
|
|
43749
|
+
wa as InstanceHandle,
|
|
43750
|
+
Ua as InstancingHandler,
|
|
43751
43751
|
fn as InstancingUtil,
|
|
43752
43752
|
RP as InstantiateEvent,
|
|
43753
43753
|
Dt as InstantiateIdProvider,
|
|
@@ -43767,7 +43767,7 @@ export {
|
|
|
43767
43767
|
zv as LogStats,
|
|
43768
43768
|
Gi as LogType,
|
|
43769
43769
|
mx as LookAt,
|
|
43770
|
-
|
|
43770
|
+
Va as LookAtConstraint,
|
|
43771
43771
|
E as MODULES,
|
|
43772
43772
|
Kt as MainModule,
|
|
43773
43773
|
fy as MarkerTrackHandler,
|
|
@@ -43777,7 +43777,7 @@ export {
|
|
|
43777
43777
|
Ar as MeshCollider,
|
|
43778
43778
|
Tu as MeshRenderer,
|
|
43779
43779
|
Y as MinMaxCurve,
|
|
43780
|
-
|
|
43780
|
+
sl as MinMaxGradient,
|
|
43781
43781
|
Od as NEEDLE_ENGINE_FEATURE_FLAGS,
|
|
43782
43782
|
gh as NEKeyboardEvent,
|
|
43783
43783
|
Zs as NEPointerEvent,
|
|
@@ -43798,8 +43798,8 @@ export {
|
|
|
43798
43798
|
AP as NewInstanceModel,
|
|
43799
43799
|
ve as NoiseModule,
|
|
43800
43800
|
Qi as ObjectRaycaster,
|
|
43801
|
-
|
|
43802
|
-
|
|
43801
|
+
$a as ObjectUtils,
|
|
43802
|
+
il as OffsetConstraint,
|
|
43803
43803
|
xf as OneEuroFilter,
|
|
43804
43804
|
v0 as OneEuroFilterXYZ,
|
|
43805
43805
|
uh as OpenURL,
|
|
@@ -43808,7 +43808,7 @@ export {
|
|
|
43808
43808
|
eP as OwnershipEvent,
|
|
43809
43809
|
N0 as OwnershipModel,
|
|
43810
43810
|
zl as PUBLIC_KEY,
|
|
43811
|
-
|
|
43811
|
+
Ja as Padding,
|
|
43812
43812
|
xm as ParticleBurst,
|
|
43813
43813
|
Ww as ParticleSubEmitter,
|
|
43814
43814
|
Hd as ParticleSystem,
|
|
@@ -43823,7 +43823,7 @@ export {
|
|
|
43823
43823
|
Zu as PixelationEffect,
|
|
43824
43824
|
Wd as PlayAnimationOnClick,
|
|
43825
43825
|
br as PlayAudioOnClick,
|
|
43826
|
-
|
|
43826
|
+
Na as PlayableDirector,
|
|
43827
43827
|
Ac as PlayerColor,
|
|
43828
43828
|
Bn as PlayerState,
|
|
43829
43829
|
aT as PlayerStateEvent,
|
|
@@ -43838,7 +43838,7 @@ export {
|
|
|
43838
43838
|
Gc as PreliminaryAction,
|
|
43839
43839
|
Lu as PreliminaryTrigger,
|
|
43840
43840
|
tr as PreviewHelper,
|
|
43841
|
-
|
|
43841
|
+
Ea as PrimitiveType,
|
|
43842
43842
|
ce as Progress,
|
|
43843
43843
|
m0 as PromiseAllWithErrors,
|
|
43844
43844
|
zy as PromiseErrorResult,
|
|
@@ -43881,17 +43881,17 @@ export {
|
|
|
43881
43881
|
Yd as SignalTrackHandler,
|
|
43882
43882
|
_T as Size,
|
|
43883
43883
|
Ei as SizeBySpeedModule,
|
|
43884
|
-
|
|
43884
|
+
ol as SizeOverLifetimeModule,
|
|
43885
43885
|
Kv as SkinnedMeshRenderer,
|
|
43886
43886
|
cy as SmoothFollow,
|
|
43887
|
-
|
|
43887
|
+
za as SpatialGrabRaycaster,
|
|
43888
43888
|
cf as SpatialHtml,
|
|
43889
43889
|
hy as SpatialTrigger,
|
|
43890
43890
|
Os as SpatialTriggerReceiver,
|
|
43891
43891
|
dy as SpectatorCamera,
|
|
43892
43892
|
$c as SphereCollider,
|
|
43893
43893
|
W0 as SphereIntersection,
|
|
43894
|
-
|
|
43894
|
+
hl as SplineContainer,
|
|
43895
43895
|
As as SplineData,
|
|
43896
43896
|
Wb as SplineUtils,
|
|
43897
43897
|
xn as SplineWalker,
|
|
@@ -43922,7 +43922,7 @@ export {
|
|
|
43922
43922
|
Ni as TrackType,
|
|
43923
43923
|
$e as TrailModule,
|
|
43924
43924
|
Ne as TransformData,
|
|
43925
|
-
|
|
43925
|
+
dl as TransformGizmo,
|
|
43926
43926
|
qt as TriggerBuilder,
|
|
43927
43927
|
fr as TriggerModel,
|
|
43928
43928
|
P as TypeStore,
|
|
@@ -43945,7 +43945,7 @@ export {
|
|
|
43945
43945
|
gt as VideoPlayer,
|
|
43946
43946
|
ot as ViewBox,
|
|
43947
43947
|
hr as ViewDevice,
|
|
43948
|
-
|
|
43948
|
+
al as Vignette,
|
|
43949
43949
|
Du as VisibilityAction,
|
|
43950
43950
|
Er as Voip,
|
|
43951
43951
|
nh as Volume,
|
|
@@ -43976,7 +43976,7 @@ export {
|
|
|
43976
43976
|
f0 as addAttributeChangeCallback,
|
|
43977
43977
|
Un as addComponent,
|
|
43978
43978
|
p2 as addCustomExtensionPlugin,
|
|
43979
|
-
|
|
43979
|
+
ga as addNewComponent,
|
|
43980
43980
|
Jm as addPatch,
|
|
43981
43981
|
dg as apply,
|
|
43982
43982
|
n2 as applyHMRChanges,
|
|
@@ -43985,7 +43985,7 @@ export {
|
|
|
43985
43985
|
LP as beginListenInstantiate,
|
|
43986
43986
|
z0 as binaryIdentifierCasts,
|
|
43987
43987
|
YL as build_scene_functions,
|
|
43988
|
-
|
|
43988
|
+
Kr as builtinComponentKeyName,
|
|
43989
43989
|
Ox as calculateProgress01,
|
|
43990
43990
|
OL as clearMessages,
|
|
43991
43991
|
c2 as colorSerializer,
|
|
@@ -44006,7 +44006,7 @@ export {
|
|
|
44006
44006
|
Te as disposeObjectResources,
|
|
44007
44007
|
ws as disposeStream,
|
|
44008
44008
|
Kh as editorGuidKeyName,
|
|
44009
|
-
|
|
44009
|
+
da as enableSpatialConsole,
|
|
44010
44010
|
h2 as euler,
|
|
44011
44011
|
d2 as eventListSerializer,
|
|
44012
44012
|
O2 as exportAsGLTF,
|
|
@@ -44016,14 +44016,14 @@ export {
|
|
|
44016
44016
|
q0 as findResourceUsers,
|
|
44017
44017
|
Ak as fitCamera,
|
|
44018
44018
|
bC as fitObjectIntoVolume,
|
|
44019
|
-
|
|
44019
|
+
Da as foreachComponent,
|
|
44020
44020
|
fg as foreachComponentEnumerator,
|
|
44021
44021
|
TL as forward,
|
|
44022
44022
|
YO as generateQRCode,
|
|
44023
44023
|
IP as generateSeed,
|
|
44024
44024
|
oi as getBoundingBox,
|
|
44025
44025
|
Z1 as getCameraController,
|
|
44026
|
-
|
|
44026
|
+
Wa as getComponent,
|
|
44027
44027
|
_u as getComponentInChildren,
|
|
44028
44028
|
Td as getComponentInParent,
|
|
44029
44029
|
yu as getComponents,
|
|
@@ -44057,7 +44057,7 @@ export {
|
|
|
44057
44057
|
Ps as hasProLicense,
|
|
44058
44058
|
kC as hideDebugConsole,
|
|
44059
44059
|
BR as imageToCanvas,
|
|
44060
|
-
|
|
44060
|
+
ja as instantiate,
|
|
44061
44061
|
oR as invokeLoadedImportPluginHooks,
|
|
44062
44062
|
zC as invokeXRSessionEnd,
|
|
44063
44063
|
FC as invokeXRSessionStart,
|
|
@@ -44068,7 +44068,7 @@ export {
|
|
|
44068
44068
|
dM as isComponent,
|
|
44069
44069
|
cL as isDebugMode,
|
|
44070
44070
|
pL as isDesktop,
|
|
44071
|
-
|
|
44071
|
+
La as isDestroyed,
|
|
44072
44072
|
L as isDevEnvironment,
|
|
44073
44073
|
VL as isDisposed,
|
|
44074
44074
|
P2 as isExporting,
|
|
@@ -44153,7 +44153,7 @@ export {
|
|
|
44153
44153
|
mO as setDestroyed,
|
|
44154
44154
|
IL as setDevEnvironment,
|
|
44155
44155
|
vP as setDisposable,
|
|
44156
|
-
|
|
44156
|
+
wl as setDontDestroy,
|
|
44157
44157
|
jy as setOrAddParamsToUrl,
|
|
44158
44158
|
hL as setParam,
|
|
44159
44159
|
bd as setParamWithoutReload,
|
|
@@ -44163,7 +44163,7 @@ export {
|
|
|
44163
44163
|
P0 as setVisibleInCustomShadowRendering,
|
|
44164
44164
|
C0 as setWorldEuler,
|
|
44165
44165
|
kt as setWorldPosition,
|
|
44166
|
-
|
|
44166
|
+
Ma as setWorldPositionXYZ,
|
|
44167
44167
|
Hn as setWorldQuaternion,
|
|
44168
44168
|
x0 as setWorldQuaternionXYZW,
|
|
44169
44169
|
fC as setWorldRotation,
|