@needle-tools/engine 4.5.0-alpha.2 → 4.5.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -2
- package/dist/{needle-engine.bundle-a52706c5.umd.cjs → needle-engine.bundle-1ea82d1b.umd.cjs} +74 -73
- package/dist/{needle-engine.bundle-f3c8cffc.light.umd.cjs → needle-engine.bundle-5799046c.light.umd.cjs} +74 -73
- package/dist/{needle-engine.bundle-53f80c62.js → needle-engine.bundle-613ac05e.js} +757 -750
- package/dist/{needle-engine.bundle-1526f05b.light.js → needle-engine.bundle-82027067.light.js} +944 -937
- package/dist/{needle-engine.bundle-15b19b2c.light.min.js → needle-engine.bundle-cb8d3ee9.light.min.js} +74 -73
- package/dist/{needle-engine.bundle-2024e2b3.min.js → needle-engine.bundle-e8936122.min.js} +74 -73
- package/dist/needle-engine.js +24 -24
- package/dist/needle-engine.light.js +24 -24
- package/dist/needle-engine.light.min.js +1 -1
- package/dist/needle-engine.light.umd.cjs +1 -1
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/lib/engine/engine_components.js +6 -14
- package/lib/engine/engine_components.js.map +1 -1
- package/lib/engine/engine_context_registry.d.ts +2 -2
- package/lib/engine/engine_context_registry.js +2 -2
- package/lib/engine/engine_context_registry.js.map +1 -1
- package/lib/engine/engine_loaders.callbacks.d.ts +43 -9
- package/lib/engine/engine_loaders.callbacks.js +42 -12
- package/lib/engine/engine_loaders.callbacks.js.map +1 -1
- package/lib/engine/engine_loaders.js +18 -15
- package/lib/engine/engine_loaders.js.map +1 -1
- package/lib/engine/engine_utils_format.d.ts +5 -5
- package/lib/engine/engine_utils_format.js +31 -31
- package/lib/engine/engine_utils_format.js.map +1 -1
- package/lib/engine-components/ContactShadows.d.ts +12 -0
- package/lib/engine-components/ContactShadows.js +23 -0
- package/lib/engine-components/ContactShadows.js.map +1 -1
- package/lib/engine-components/webxr/controllers/XRControllerModel.js.map +1 -1
- package/package.json +1 -1
- package/plugins/vite/dependencies.js +1 -1
- package/src/engine/engine_components.ts +4 -12
- package/src/engine/engine_context_registry.ts +2 -2
- package/src/engine/engine_loaders.callbacks.ts +63 -17
- package/src/engine/engine_loaders.ts +17 -15
- package/src/engine/engine_utils_format.ts +45 -34
- package/src/engine-components/ContactShadows.ts +24 -0
- package/src/engine-components/webxr/controllers/XRControllerModel.ts +0 -2
|
@@ -10,7 +10,7 @@ var fe = (s, t, e) => (Pf(s, t, "read from private field"), e ? e.call(s) : t.ge
|
|
|
10
10
|
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
11
11
|
}, cn = (s, t, e, i) => (Pf(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
|
|
12
12
|
var Sl = (s, t, e) => (Pf(s, t, "access private method"), e);
|
|
13
|
-
import { Vector2 as oe, Vector3 as v, Vector4 as ge, Quaternion as W, PlaneGeometry as Xn, PerspectiveCamera as be, Scene as Ri, ShaderMaterial as wn, Uniform$1 as po, Mesh as q, WebGLRenderer as kr, Texture as Fe, Euler as Bt, Box3 as Oi, MeshStandardMaterial as Tt, Color as le, ShadowMaterial as t0, Box3Helper as Rx, GridHelper as ng, Material as Se, Matrix3 as i0, Matrix4 as se, Layers as Co, Object3D as L, Ray as Po, MathUtils as Cs, AxesHelper as Mi, MeshBasicMaterial as Me, DoubleSide as ki, BufferGeometry as Wn, Group as mo, SphereGeometry as xu, BoxGeometry as Ea, SpriteMaterial as kx, Sprite as Tx, Shape as Ax, ExtrudeGeometry as Ex, Fog as n0, DirectionalLight as Yp, PointLight as sg, Line as
|
|
13
|
+
import { Vector2 as oe, Vector3 as v, Vector4 as ge, Quaternion as W, PlaneGeometry as Xn, PerspectiveCamera as be, Scene as Ri, ShaderMaterial as wn, Uniform$1 as po, Mesh as q, WebGLRenderer as kr, Texture as Fe, Euler as Bt, Box3 as Oi, MeshStandardMaterial as Tt, Color as le, ShadowMaterial as t0, Box3Helper as Rx, GridHelper as ng, Material as Se, Matrix3 as i0, Matrix4 as se, Layers as Co, Object3D as L, Ray as Po, MathUtils as Cs, AxesHelper as Mi, MeshBasicMaterial as Me, DoubleSide as ki, BufferGeometry as Wn, Group as mo, SphereGeometry as xu, BoxGeometry as Ea, SpriteMaterial as kx, Sprite as Tx, Shape as Ax, ExtrudeGeometry as Ex, Fog as n0, DirectionalLight as Yp, PointLight as sg, Line as Lc, BufferAttribute as mt, CylinderGeometry as Ix, EdgesGeometry as Lx, LineSegments as s0, LineBasicMaterial as o0, Sphere as Su, Plane as xr, Raycaster as Cu, ArrayCamera as Dx, SkinnedMesh as Ps, InterleavedBufferAttribute as r0, Skeleton as jx, Bone as Bx, Source as Fx, WebGLCubeRenderTarget as zx, CubeCamera as Ux, AnimationClip as go, FileLoader as og, TextureLoader as wa, PropertyBinding as Ia, LinearSRGBColorSpace as As, ShaderChunk as Jt, UniformsLib as Nx, DataTexture as rg, RGBAFormat as Pu, EquirectangularReflectionMapping as Os, SRGBColorSpace as Es, Clock as $x, NoToneMapping as La, PCFSoftShadowMap$1 as Wx, BasicNodeLibrary as Vx, WebGLRenderTarget as Is, DepthTexture as Hx, NearestFilter as jd, LoopRepeat as Gx, LoopOnce as Kp, AnimationMixer as ag, CompressedTexture as qx, FrontSide as Oo, Camera as Xx, Frustum as Fy, OrthographicCamera as lg, AudioListener as Qx, PositionalAudio as Yx, AudioLoader as Zp, EventDispatcher as cg, BackSide as Ou, MeshDepthMaterial as Kx, CustomBlending as Zx, MaxEquation as Jx, AmbientLight as e1, HemisphereLight as t1, InvertStencilOp as i1, DecrementWrapStencilOp as n1, IncrementWrapStencilOp as s1, DecrementStencilOp as o1, IncrementStencilOp as r1, ReplaceStencilOp as a1, ZeroStencilOp as l1, KeepStencilOp as c1, AlwaysStencilFunc as h1, GreaterEqualStencilFunc as d1, NotEqualStencilFunc as u1, GreaterStencilFunc as f1, LessEqualStencilFunc as p1, EqualStencilFunc as m1, LessStencilFunc as g1, NeverStencilFunc as zy, RawShaderMaterial as a0, GLSL3 as y1, AlwaysDepth as _1, GreaterEqualDepth as b1, GreaterDepth as v1, LessEqualDepth as w1, LessDepth as x1, NotEqualDepth as S1, EqualDepth as C1, BatchedMesh as Uy, MeshPhysicalMaterial as Jp, UnsignedByteType as P1, LinearFilter as Ny, RingGeometry as O1, Line3 as M1, AdditiveBlending as l0, BoxHelper as R1, SpotLight as k1, DirectionalLightHelper as T1, CameraHelper as A1, LOD as E1, Triangle as I1, NormalBlending as L1, NeutralToneMapping as Dc, AgXToneMapping as Mu, ACESFilmicToneMapping as hg, ReinhardToneMapping as dg, LinearToneMapping as Ru, HalfFloatType as D1, VideoTexture as j1, CubeTexture as B1, CompressedCubeTexture as F1, EquirectangularRefractionMapping as z1, VectorKeyframeTrack as U1, QuaternionKeyframeTrack as N1, Audio as $1, MirroredRepeatWrapping as $y, UniformsUtils as c0, ShaderLib as Bd, MeshNormalMaterial as W1, AudioContext as V1, PMREMGenerator$1 as H1 } from "./three-3fd45ef1.js";
|
|
14
14
|
import { createLoaders as ug, getRaycastMesh as h0, LODsManager as Hr, NEEDLE_progressive as Ze, addDracoAndKTX2Loaders as G1, configureLoader as q1, setDracoDecoderLocation as X1, setKTX2TranscoderLocation as Q1 } from "./gltf-progressive-1e91190e.js";
|
|
15
15
|
import { GroundedSkybox as Da, Font as Y1, TextGeometry as K1, FontLoader as Z1, GLTFLoader as Ls, TransformControlsGizmo as d0, EXRLoader as Fd, RGBELoader as em, Stats as J1, nodeFrame as eS, OrbitControls as u0, PositionalAudioHelper as tS, HorizontalBlurShader as iS, VerticalBlurShader as nS, GLTFExporter as f0, strToU8 as p0, zipSync as sS, XRControllerModelFactory as oS, XRHandMeshModel as rS, Line2 as aS, LineGeometry as lS, LineMaterial as cS, KTX2Loader as hS, TransformControls as dS, InteractiveGroup as uS, HTMLMesh as fS, VertexNormalsHelper as pS, OBJLoader as fg, FBXLoader as m0, mergeVertices as mS } from "./three-examples-9070776e.js";
|
|
16
16
|
import { fetchProfile as gS, MotionController as yS, $70d766613f57b014$export$2e2bcd8739ae039 as Wy, ByteBuffer as _S, v5 as Vy, md5 as Hy, SIZE_PREFIX_LENGTH as g0, Builder as pg, createNoise4D as bS, Matrix4 as Of, BatchedParticleRenderer as vS, ParticleSystem as wS, RenderMode as fs, TrailParticle as Gy, ConstantColor as xS, Vector4 as SS, ConstantValue as CS, WorkerBase as PS, MeshBVH as OS } from "./vendor-804f80f4.js";
|
|
@@ -185,7 +185,7 @@ function ES() {
|
|
|
185
185
|
function IS(s) {
|
|
186
186
|
return s = s.replace(/[^a-z0-9áéíóúñü \.,_-]/gim, ""), s.trim();
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function jc(s, t, e = !0, i = !1) {
|
|
189
189
|
var n;
|
|
190
190
|
if (t == null)
|
|
191
191
|
return null;
|
|
@@ -201,13 +201,13 @@ function Dc(s, t, e = !0, i = !1) {
|
|
|
201
201
|
if (e) {
|
|
202
202
|
if (t.scenes)
|
|
203
203
|
for (const o in t.scenes) {
|
|
204
|
-
const a = t.scenes[o], l =
|
|
204
|
+
const a = t.scenes[o], l = jc(s, a, e, i);
|
|
205
205
|
if (l)
|
|
206
206
|
return l;
|
|
207
207
|
}
|
|
208
208
|
if (t.children)
|
|
209
209
|
for (const o in t.children) {
|
|
210
|
-
const a = t.children[o], l =
|
|
210
|
+
const a = t.children[o], l = jc(s, a, e, i);
|
|
211
211
|
if (l)
|
|
212
212
|
return l;
|
|
213
213
|
}
|
|
@@ -245,19 +245,19 @@ function Au(s, t) {
|
|
|
245
245
|
t.pre_update_callbacks.push(o);
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
|
-
const
|
|
248
|
+
const Th = x("debugresolveurl"), LS = "rel:";
|
|
249
249
|
function ZI(s, t) {
|
|
250
250
|
return Tr(s, t);
|
|
251
251
|
}
|
|
252
252
|
function Tr(s, t) {
|
|
253
253
|
if (t === void 0)
|
|
254
|
-
return
|
|
254
|
+
return Th && console.warn("getPath: uri is undefined, returning uri", t), t;
|
|
255
255
|
if (t.startsWith("./"))
|
|
256
256
|
return t;
|
|
257
257
|
if (t.startsWith("http"))
|
|
258
|
-
return
|
|
258
|
+
return Th && console.warn("getPath: uri is absolute, returning uri", t), t;
|
|
259
259
|
if (s === void 0)
|
|
260
|
-
return
|
|
260
|
+
return Th && console.warn("getPath: source is undefined, returning uri", t), t;
|
|
261
261
|
t.startsWith(LS) && (t = t.substring(4));
|
|
262
262
|
const e = s.lastIndexOf("/");
|
|
263
263
|
if (e >= 0) {
|
|
@@ -265,7 +265,7 @@ function Tr(s, t) {
|
|
|
265
265
|
for (; i.endsWith("/") && t.startsWith("/"); )
|
|
266
266
|
t = t.substring(1);
|
|
267
267
|
const n = i + t;
|
|
268
|
-
return
|
|
268
|
+
return Th && console.log("source:", s, `changed uri
|
|
269
269
|
from`, t, `
|
|
270
270
|
to `, n, `
|
|
271
271
|
basePath: ` + i), n;
|
|
@@ -590,8 +590,8 @@ async function US(s) {
|
|
|
590
590
|
}), e;
|
|
591
591
|
}
|
|
592
592
|
const x0 = x("debugdebug");
|
|
593
|
-
let
|
|
594
|
-
(x("noerrors") || x("nooverlaymessages")) && (
|
|
593
|
+
let Bc = !1;
|
|
594
|
+
(x("noerrors") || x("nooverlaymessages")) && (Bc = !0);
|
|
595
595
|
const kf = "needle_engine_global_error_container";
|
|
596
596
|
var Ji = /* @__PURE__ */ ((s) => (s[s.Log = 0] = "Log", s[s.Warn = 1] = "Warn", s[s.Error = 2] = "Error", s))(Ji || {});
|
|
597
597
|
function gg() {
|
|
@@ -618,13 +618,13 @@ const S0 = console.error, C0 = function(...s) {
|
|
|
618
618
|
S0.apply(console, s), HS(s), Fn(2, s), nm(...s);
|
|
619
619
|
};
|
|
620
620
|
function WS(s) {
|
|
621
|
-
|
|
621
|
+
Bc = !s, s ? console.error = C0 : console.error = S0;
|
|
622
622
|
}
|
|
623
623
|
function fL(s) {
|
|
624
624
|
return WS(s);
|
|
625
625
|
}
|
|
626
626
|
function VS() {
|
|
627
|
-
|
|
627
|
+
Bc || (x0 && console.warn("Patch console", window.location.hostname), console.error = C0, window.addEventListener("error", (s) => {
|
|
628
628
|
if (!s)
|
|
629
629
|
return;
|
|
630
630
|
const t = s.error;
|
|
@@ -634,7 +634,7 @@ function VS() {
|
|
|
634
634
|
}
|
|
635
635
|
Fn(2, t, s.filename, s.lineno), nm(s);
|
|
636
636
|
}, !0), window.addEventListener("unhandledrejection", (s) => {
|
|
637
|
-
|
|
637
|
+
Bc || s && (s.reason ? Fn(2, s.reason.message, s.reason.stack) : Fn(2, "unhandled rejection"), nm(s));
|
|
638
638
|
}));
|
|
639
639
|
}
|
|
640
640
|
let P0 = 0;
|
|
@@ -649,7 +649,7 @@ function HS(s) {
|
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
function Fn(s, t, e, i) {
|
|
652
|
-
if (
|
|
652
|
+
if (Bc)
|
|
653
653
|
return;
|
|
654
654
|
const n = pe.Current, o = (n == null ? void 0 : n.domElement) ?? document.querySelector("needle-engine");
|
|
655
655
|
if (o) {
|
|
@@ -664,7 +664,7 @@ function Fn(s, t, e, i) {
|
|
|
664
664
|
!t || t.length <= 0 || GS(s, o, t);
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
const
|
|
667
|
+
const ac = /* @__PURE__ */ new Map();
|
|
668
668
|
function GS(s, t, e) {
|
|
669
669
|
if (e == null)
|
|
670
670
|
return;
|
|
@@ -675,20 +675,20 @@ function GS(s, t, e) {
|
|
|
675
675
|
}
|
|
676
676
|
e.length > 400 && (e = e.substring(0, 400) + "...");
|
|
677
677
|
const n = e;
|
|
678
|
-
if (
|
|
678
|
+
if (ac.has(n))
|
|
679
679
|
return;
|
|
680
680
|
const o = QS(s, e);
|
|
681
681
|
i.prepend(o);
|
|
682
682
|
const a = () => {
|
|
683
|
-
|
|
683
|
+
ac.delete(n), e_(o);
|
|
684
684
|
};
|
|
685
|
-
|
|
685
|
+
ac.set(n, a), setTimeout(a, 1e4);
|
|
686
686
|
}
|
|
687
687
|
function pL() {
|
|
688
688
|
x0 && console.log("Clearing messages");
|
|
689
|
-
for (const s of
|
|
689
|
+
for (const s of ac.values())
|
|
690
690
|
s == null || s.call(s);
|
|
691
|
-
|
|
691
|
+
ac.clear();
|
|
692
692
|
}
|
|
693
693
|
const qS = `
|
|
694
694
|
|
|
@@ -960,12 +960,12 @@ class M0 {
|
|
|
960
960
|
this.x.reset(t == null ? void 0 : t.x), this.y.reset(t == null ? void 0 : t.y), this.z.reset(t == null ? void 0 : t.z);
|
|
961
961
|
}
|
|
962
962
|
}
|
|
963
|
-
const
|
|
963
|
+
const pd = "needle:cameraController";
|
|
964
964
|
function ZS(s) {
|
|
965
|
-
return s[
|
|
965
|
+
return s[pd];
|
|
966
966
|
}
|
|
967
967
|
function i_(s, t, e) {
|
|
968
|
-
e ? s[
|
|
968
|
+
e ? s[pd] = t : s[pd] === t && (s[pd] = null);
|
|
969
969
|
}
|
|
970
970
|
const sm = "needle:autofit";
|
|
971
971
|
function JS(s) {
|
|
@@ -1065,7 +1065,7 @@ const sC = new nn(() => new v(), 100), oC = new v();
|
|
|
1065
1065
|
function Ke(s, t = null) {
|
|
1066
1066
|
return t || (t = sC.get()), s ? s.parent ? (s.getWorldScale(t), t) : t.copy(s.scale) : t.set(0, 0, 0);
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Fc(s, t) {
|
|
1069
1069
|
if (!s)
|
|
1070
1070
|
return;
|
|
1071
1071
|
if (!s.parent) {
|
|
@@ -1278,7 +1278,7 @@ function gC(s, t, e) {
|
|
|
1278
1278
|
const c = new v();
|
|
1279
1279
|
c.set(a.x / n.x, a.y / n.y, a.z / n.z);
|
|
1280
1280
|
const h = Math.min(c.x, c.y, c.z), d = (e == null ? void 0 : e.scale) !== !1;
|
|
1281
|
-
if (d &&
|
|
1281
|
+
if (d && Fc(s, Ke(s).multiplyScalar(h)), (e == null ? void 0 : e.position) !== !1) {
|
|
1282
1282
|
const u = new v();
|
|
1283
1283
|
i.getCenter(u), u.y = i.min.y;
|
|
1284
1284
|
const p = new v();
|
|
@@ -1316,23 +1316,23 @@ function I0(s, t, e, i) {
|
|
|
1316
1316
|
const o = t;
|
|
1317
1317
|
return o && (o.map ? n.color.set(1, 1, 1) : n.color.copyLinearToSRGB(o.color), n.emissive.copyLinearToSRGB(o.emissive), n.emissiveIntensity = o.emissiveIntensity, n.opacity = o.opacity, n.displacementScale = o.displacementScale, n.transparent = o.transparent, n.bumpMap = o.bumpMap, n.aoMap = o.aoMap, n.map = o.map, n.displacementMap = o.displacementMap, n.emissiveMap = o.emissiveMap, n.normalMap = o.normalMap, n.envMap = o.envMap, n.alphaMap = o.alphaMap, n.metalness = o.reflectivity, n.vertexColors = o.vertexColors, o.shininess && (n.roughness = 1 - Math.sqrt(o.shininess) / 10), n.needsUpdate = !0), e === void 0 ? s.material = n : i[e] = n, !0;
|
|
1318
1318
|
}
|
|
1319
|
-
let
|
|
1319
|
+
let Ah = !1;
|
|
1320
1320
|
NS((...s) => {
|
|
1321
1321
|
var t;
|
|
1322
1322
|
B() && ((t = pe.Current) != null && t.isInXR) && (xa(!0), L0("error", ...s));
|
|
1323
1323
|
});
|
|
1324
1324
|
function xa(s) {
|
|
1325
1325
|
if (s) {
|
|
1326
|
-
if (
|
|
1326
|
+
if (Ah)
|
|
1327
1327
|
return;
|
|
1328
|
-
|
|
1328
|
+
Ah = !0, bC();
|
|
1329
1329
|
} else {
|
|
1330
|
-
if (!
|
|
1330
|
+
if (!Ah)
|
|
1331
1331
|
return;
|
|
1332
|
-
|
|
1332
|
+
Ah = !1, vC();
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
|
-
const
|
|
1335
|
+
const lc = {
|
|
1336
1336
|
log: void 0,
|
|
1337
1337
|
warn: void 0,
|
|
1338
1338
|
error: void 0
|
|
@@ -1468,12 +1468,12 @@ class _C {
|
|
|
1468
1468
|
let Kt = null;
|
|
1469
1469
|
function bC() {
|
|
1470
1470
|
Kt || (Kt = new _C()), Kt.onEnable();
|
|
1471
|
-
for (const s in
|
|
1472
|
-
|
|
1471
|
+
for (const s in lc) {
|
|
1472
|
+
lc[s] = console[s];
|
|
1473
1473
|
let t = !1;
|
|
1474
1474
|
console[s] = function() {
|
|
1475
1475
|
var e;
|
|
1476
|
-
if ((e =
|
|
1476
|
+
if ((e = lc[s]) == null || e.apply(console, arguments), !t)
|
|
1477
1477
|
try {
|
|
1478
1478
|
t = !0, L0(s, ...arguments);
|
|
1479
1479
|
} finally {
|
|
@@ -1484,8 +1484,8 @@ function bC() {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
function vC() {
|
|
1486
1486
|
Kt == null || Kt.onDisable();
|
|
1487
|
-
for (const s in
|
|
1488
|
-
console[s] =
|
|
1487
|
+
for (const s in lc)
|
|
1488
|
+
console[s] = lc[s];
|
|
1489
1489
|
}
|
|
1490
1490
|
const Cl = /* @__PURE__ */ new Map();
|
|
1491
1491
|
function L0(s, ...t) {
|
|
@@ -1792,18 +1792,18 @@ function TC() {
|
|
|
1792
1792
|
return s || null;
|
|
1793
1793
|
}
|
|
1794
1794
|
const z0 = x("debugdefines");
|
|
1795
|
-
Ro('if(!globalThis[""4.5.0-alpha.
|
|
1795
|
+
Ro('if(!globalThis[""4.5.0-alpha.4""]) globalThis[""4.5.0-alpha.4""] = "0.0.0";');
|
|
1796
1796
|
Ro('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
1797
|
-
Ro('if(!globalThis[""
|
|
1797
|
+
Ro('if(!globalThis[""Wed May 14 2025 16:49:50 GMT+0700 (Indochina Time)""]) globalThis[""Wed May 14 2025 16:49:50 GMT+0700 (Indochina Time)""] = "unknown";');
|
|
1798
1798
|
Ro('if(!globalThis[""npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd""]) globalThis[""npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd""] = "unknown";');
|
|
1799
|
-
Ro('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.5.0-alpha.
|
|
1799
|
+
Ro('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.5.0-alpha.4";');
|
|
1800
1800
|
Ro('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1801
|
-
Ro('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
1801
|
+
Ro('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Wed May 14 2025 16:49:50 GMT+0700 (Indochina Time)";');
|
|
1802
1802
|
Ro('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd";');
|
|
1803
|
-
const Vn = "4.5.0-alpha.
|
|
1803
|
+
const Vn = "4.5.0-alpha.4", bg = "undefined", U0 = "Wed May 14 2025 16:49:50 GMT+0700 (Indochina Time)";
|
|
1804
1804
|
z0 && console.log(`Engine version: ${Vn} (generator: ${bg})
|
|
1805
1805
|
Project built at ${U0}`);
|
|
1806
|
-
const
|
|
1806
|
+
const md = "npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd", _o = "needle_isActiveInHierarchy", sa = "builtin_components", gd = "needle_editor_guid";
|
|
1807
1807
|
function Ro(s) {
|
|
1808
1808
|
try {
|
|
1809
1809
|
(0, eval)(s);
|
|
@@ -2019,7 +2019,7 @@ class eo extends PointerEvent {
|
|
|
2019
2019
|
this._propagationStopped = !0, super.stopPropagation(), (e = this.source) == null || e.stopPropagation(), lt && console.warn("Stop propagation...", this.pointerId, this.pointerType);
|
|
2020
2020
|
}
|
|
2021
2021
|
}
|
|
2022
|
-
class
|
|
2022
|
+
class Eh extends KeyboardEvent {
|
|
2023
2023
|
constructor(e, i, n) {
|
|
2024
2024
|
super(e, n);
|
|
2025
2025
|
r(this, "source");
|
|
@@ -2109,7 +2109,7 @@ class DC {
|
|
|
2109
2109
|
if (e && e.pressed)
|
|
2110
2110
|
return;
|
|
2111
2111
|
this.keysPressed[t.code] = { pressed: !0, frame: this.context.time.frameCount + 1, startFrame: this.context.time.frameCount + 1, key: t.key, code: t.code };
|
|
2112
|
-
const i = new
|
|
2112
|
+
const i = new Eh("keydown", t, t);
|
|
2113
2113
|
this.onDispatchEvent(i);
|
|
2114
2114
|
});
|
|
2115
2115
|
r(this, "onKeyPressed", (t) => {
|
|
@@ -2119,7 +2119,7 @@ class DC {
|
|
|
2119
2119
|
if (!e)
|
|
2120
2120
|
return;
|
|
2121
2121
|
e.pressed = !0, e.frame = this.context.time.frameCount + 1;
|
|
2122
|
-
const i = new
|
|
2122
|
+
const i = new Eh("keypress", t, t);
|
|
2123
2123
|
this.onDispatchEvent(i);
|
|
2124
2124
|
});
|
|
2125
2125
|
r(this, "onKeyUp", (t) => {
|
|
@@ -2129,7 +2129,7 @@ class DC {
|
|
|
2129
2129
|
if (!e)
|
|
2130
2130
|
return;
|
|
2131
2131
|
e.pressed = !1, e.frame = this.context.time.frameCount + 1;
|
|
2132
|
-
const i = new
|
|
2132
|
+
const i = new Eh("keyup", t, t);
|
|
2133
2133
|
this.onDispatchEvent(i);
|
|
2134
2134
|
});
|
|
2135
2135
|
r(this, "onWheelWindow", (t) => {
|
|
@@ -2229,7 +2229,7 @@ class DC {
|
|
|
2229
2229
|
dispatchEvent(t) {
|
|
2230
2230
|
var i, n, o, a;
|
|
2231
2231
|
let e = !1;
|
|
2232
|
-
if (t instanceof
|
|
2232
|
+
if (t instanceof Eh) {
|
|
2233
2233
|
const l = this._eventListeners[t.type];
|
|
2234
2234
|
if (l)
|
|
2235
2235
|
for (const c of l)
|
|
@@ -2742,7 +2742,7 @@ class BC {
|
|
|
2742
2742
|
return this.gameObject.visible;
|
|
2743
2743
|
}
|
|
2744
2744
|
}
|
|
2745
|
-
const ns = x("debugwebxr"),
|
|
2745
|
+
const ns = x("debugwebxr"), Ih = x("debugcustomgesture"), FC = "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles", zC = "generic-trigger", UC = new W().setFromEuler(new Bt(Cs.degToRad(0), Cs.degToRad(-90), Cs.degToRad(-90))), NC = new v(0.04, -0.04, 0);
|
|
2746
2746
|
class G0 {
|
|
2747
2747
|
constructor(t, e, i) {
|
|
2748
2748
|
/** the Needle XR Session */
|
|
@@ -2841,10 +2841,10 @@ class G0 {
|
|
|
2841
2841
|
return;
|
|
2842
2842
|
this.onUpdateFrame(t.frame), this._hasSelectEvent = !0;
|
|
2843
2843
|
const e = (n = this._layout) == null ? void 0 : n.selectComponentId, i = (l = (a = (o = this._layout) == null ? void 0 : o.components[e]) == null ? void 0 : a.gamepadIndices) == null ? void 0 : l.button;
|
|
2844
|
-
i !== void 0 && (this._selectButtonIndex = i), !
|
|
2844
|
+
i !== void 0 && (this._selectButtonIndex = i), !Ih && (ns && V.DrawDirection(this.rayWorldPosition, G(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 16711680, 10), this.emitPointerEvent(Ne.PointerDown, this._selectButtonIndex || 0, "xr-standard-trigger", !0, t));
|
|
2845
2845
|
});
|
|
2846
2846
|
r(this, "onSelectEnd", (t) => {
|
|
2847
|
-
this.emitPointerUpEvent && (
|
|
2847
|
+
this.emitPointerUpEvent && (Ih || this.inputSource === t.inputSource && this.emitPointerEvent(Ne.PointerUp, this._selectButtonIndex || 0, "xr-standard-trigger", !0, t));
|
|
2848
2848
|
});
|
|
2849
2849
|
r(this, "onSequeezeStart", (t) => {
|
|
2850
2850
|
var e, i, n;
|
|
@@ -3294,7 +3294,7 @@ Pinch: ${(o = this.getGesture("pinch")) == null ? void 0 : o.value.toFixed(3)}`)
|
|
|
3294
3294
|
const c = n !== this._selectButtonIndex && n !== this._squeezeButtonIndex;
|
|
3295
3295
|
if (l != null && c) {
|
|
3296
3296
|
let h = (e = this._layout) == null ? void 0 : e.gamepad[n];
|
|
3297
|
-
this._isMxInk && n === 4 && (h = "stylus-touch"), this._isMxInk && n === 5 && (h = "stylus-tip"), (ns ||
|
|
3297
|
+
this._isMxInk && n === 4 && (h = "stylus-touch"), this._isMxInk && n === 5 && (h = "stylus-tip"), (ns || Ih) && console.log("Emitting pointer event", l, n, h, o.value, this.gamepad, this._layout), this.emitPointerEvent(l, n, h ?? "none", !1, null, o.value);
|
|
3298
3298
|
}
|
|
3299
3299
|
}
|
|
3300
3300
|
if (this._isMetaQuestTouchController) {
|
|
@@ -3317,7 +3317,7 @@ Pinch: ${(o = this.getGesture("pinch")) == null ? void 0 : o.value.toFixed(3)}`)
|
|
|
3317
3317
|
const u = this.states.pinch || new f_(), p = (0.02 + 0.01) * 1.5;
|
|
3318
3318
|
u.value = 1 - (l - 0.02) / p;
|
|
3319
3319
|
const m = l < 0.02 - 0.01, g = l > 0.02 + 0.01;
|
|
3320
|
-
m && !u.pressed ? (
|
|
3320
|
+
m && !u.pressed ? (Ih && console.log("pinch start", l), u.isDown = !0, u.isUp = !1, u.pressed = !0) : g && u.pressed ? (u.isDown = !1, u.isUp = !0, u.pressed = !1) : (u.isDown = !1, u.isUp = !1), this.states.pinch = u;
|
|
3321
3321
|
}
|
|
3322
3322
|
}
|
|
3323
3323
|
}
|
|
@@ -3515,17 +3515,17 @@ function q0(s, t) {
|
|
|
3515
3515
|
n.length = 0, y_(s, o, e), o.length > 0 && (fa.has(t) || fa.set(t, new Array()), fa.get(t).push(...o));
|
|
3516
3516
|
}
|
|
3517
3517
|
}
|
|
3518
|
-
const
|
|
3518
|
+
const Lh = new Array(), g_ = {
|
|
3519
3519
|
context: null
|
|
3520
3520
|
};
|
|
3521
3521
|
function y_(s, t, e) {
|
|
3522
3522
|
var n, o;
|
|
3523
|
-
|
|
3523
|
+
Lh.length = 0;
|
|
3524
3524
|
for (let a = 0; a < t.length; a++)
|
|
3525
|
-
|
|
3525
|
+
Lh.push(t[a]);
|
|
3526
3526
|
let i = dm.get(s);
|
|
3527
|
-
for (let a = 0; a <
|
|
3528
|
-
const l =
|
|
3527
|
+
for (let a = 0; a < Lh.length; a++) {
|
|
3528
|
+
const l = Lh[a];
|
|
3529
3529
|
let c = !0;
|
|
3530
3530
|
if (i && i.has(l) && (c = !1), c)
|
|
3531
3531
|
try {
|
|
@@ -3656,7 +3656,7 @@ class qC extends GC {
|
|
|
3656
3656
|
var Ln = /* @__PURE__ */ ((s) => (s[s.OnConnection = 0] = "OnConnection", s[s.OnRoomJoin = 1] = "OnRoomJoin", s[s.Queued = 2] = "Queued", s[s.Immediate = 3] = "Immediate", s))(Ln || {});
|
|
3657
3657
|
const b_ = "https://urls.needle.tools/default-networking-backend/index";
|
|
3658
3658
|
let li = "wss://networking.needle.tools/socket";
|
|
3659
|
-
const gi = !!x("debugnet"),
|
|
3659
|
+
const gi = !!x("debugnet"), Dh = !!(gi || x("debugowner")), jh = x("debugnetbin");
|
|
3660
3660
|
var XC = /* @__PURE__ */ ((s) => (s.ConnectionInfo = "connection-start-info", s))(XC || {}), ne = /* @__PURE__ */ ((s) => (s.Join = "join-room", s.Leave = "leave-room", s.JoinedRoom = "joined-room", s.LeftRoom = "left-room", s.UserJoinedRoom = "user-joined-room", s.UserLeftRoom = "user-left-room", s.RoomStateSent = "room-state-sent", s))(ne || {});
|
|
3661
3661
|
class RL {
|
|
3662
3662
|
constructor() {
|
|
@@ -3717,7 +3717,7 @@ class Y0 {
|
|
|
3717
3717
|
return this._isWaitingForOwnershipResponseCallback !== null ? this : (this._isWaitingForOwnershipResponseCallback = this.waitForHasOwnershipRequestResponse.bind(this), this.connection.beginListen("response-has-owner", this._isWaitingForOwnershipResponseCallback), this.connection.send("request-has-owner", { guid: this.guid }), this);
|
|
3718
3718
|
}
|
|
3719
3719
|
waitForHasOwnershipRequestResponse(t) {
|
|
3720
|
-
t.guid === this.guid && (this._isWaitingForOwnershipResponseCallback && (this.connection.stopListen("response-has-owner", this._isWaitingForOwnershipResponseCallback), this._isWaitingForOwnershipResponseCallback = null), this._isOwned = t.value, t.value || (
|
|
3720
|
+
t.guid === this.guid && (this._isWaitingForOwnershipResponseCallback && (this.connection.stopListen("response-has-owner", this._isWaitingForOwnershipResponseCallback), this._isWaitingForOwnershipResponseCallback = null), this._isOwned = t.value, t.value || (Dh && console.log("request ownership", this.guid), this.requestOwnership()));
|
|
3721
3721
|
}
|
|
3722
3722
|
requestOwnershipAsync() {
|
|
3723
3723
|
return new Promise((t, e) => {
|
|
@@ -3734,7 +3734,7 @@ class Y0 {
|
|
|
3734
3734
|
});
|
|
3735
3735
|
}
|
|
3736
3736
|
requestOwnership() {
|
|
3737
|
-
return
|
|
3737
|
+
return Dh && console.log("Request ownership", this.guid), this.connection.send("request-ownership", { guid: this.guid }), this;
|
|
3738
3738
|
}
|
|
3739
3739
|
freeOwnership() {
|
|
3740
3740
|
return this.connection.send("remove-ownership", { guid: this.guid }), this._isWaitingForOwnershipResponseCallback && (this.connection.stopListen("response-has-owner", this._isWaitingForOwnershipResponseCallback), this._isWaitingForOwnershipResponseCallback = null), this;
|
|
@@ -3743,10 +3743,10 @@ class Y0 {
|
|
|
3743
3743
|
this.connection.stopListen("gained-ownership", this._gainSubscription), this.connection.stopListen("lost-ownership", this._lostSubscription), this.connection.stopListen("response-has-owner", this._hasOwnerResponse), this._isWaitingForOwnershipResponseCallback && (this.connection.stopListen("response-has-owner", this._isWaitingForOwnershipResponseCallback), this._isWaitingForOwnershipResponseCallback = null);
|
|
3744
3744
|
}
|
|
3745
3745
|
onGainedOwnership(t) {
|
|
3746
|
-
t.guid === this.guid && (this._isOwned = !0, this.connection.connectionId === t.owner ? (
|
|
3746
|
+
t.guid === this.guid && (this._isOwned = !0, this.connection.connectionId === t.owner ? (Dh && console.log("GAINED OWNERSHIP", this.guid), this._hasOwnership = !0) : this._hasOwnership = !1);
|
|
3747
3747
|
}
|
|
3748
3748
|
onLostOwnership(t) {
|
|
3749
|
-
t === this.guid && (
|
|
3749
|
+
t === this.guid && (Dh && console.log("LOST OWNERSHIP", this.guid), this._hasOwnership = !1, this._isOwned = !1);
|
|
3750
3750
|
}
|
|
3751
3751
|
}
|
|
3752
3752
|
class YC {
|
|
@@ -3884,7 +3884,7 @@ class YC {
|
|
|
3884
3884
|
/** Send a binary message to the server (broadcasted to all connected users) */
|
|
3885
3885
|
sendBinary(t) {
|
|
3886
3886
|
var e;
|
|
3887
|
-
|
|
3887
|
+
jh && console.log("<< send binary", this.context.time.frame, t.length / 1024 + " KB"), (e = this._ws) == null || e.send(t);
|
|
3888
3888
|
}
|
|
3889
3889
|
sendBufferedMessagesNow() {
|
|
3890
3890
|
var i;
|
|
@@ -4041,7 +4041,7 @@ class YC {
|
|
|
4041
4041
|
}
|
|
4042
4042
|
}
|
|
4043
4043
|
async handleIncomingBinaryMessage(t) {
|
|
4044
|
-
|
|
4044
|
+
jh && console.log("<< bin", this.context.time.frame);
|
|
4045
4045
|
const e = await t.arrayBuffer();
|
|
4046
4046
|
var i = new Uint8Array(e);
|
|
4047
4047
|
const n = new _S(i), o = n.getBufferIdentifier(), a = this._listenersBinary[o], l = $C(n), c = WC(l);
|
|
@@ -4070,7 +4070,7 @@ class YC {
|
|
|
4070
4070
|
if (gi && console.log(t), t) {
|
|
4071
4071
|
this._isInRoom = !0;
|
|
4072
4072
|
const c = t;
|
|
4073
|
-
this._currentRoomName = c.room, this._currentRoomViewId = c.viewId, this._currentRoomAllowEditing = c.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...c.inRoom), (
|
|
4073
|
+
this._currentRoomName = c.room, this._currentRoomViewId = c.viewId, this._currentRoomAllowEditing = c.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...c.inRoom), (jh || B()) && console.debug("Joined Needle Engine Room: " + c.room);
|
|
4074
4074
|
const h = new URL(window.location.href);
|
|
4075
4075
|
h.searchParams.has("room") && h.searchParams.delete("room"), h.searchParams.set("view", this._currentRoomViewId), console.debug(`Room view id: ${this._currentRoomViewId}
|
|
4076
4076
|
${h.href}`);
|
|
@@ -4079,7 +4079,7 @@ ${h.href}`);
|
|
|
4079
4079
|
break;
|
|
4080
4080
|
case "left-room":
|
|
4081
4081
|
const a = t;
|
|
4082
|
-
a.room === this.currentRoomName && (this._isInRoom = !1, this._currentRoomName = null, this._currentRoomAllowEditing = !0, this._currentInRoom.length = 0, (
|
|
4082
|
+
a.room === this.currentRoomName && (this._isInRoom = !1, this._currentRoomName = null, this._currentRoomAllowEditing = !0, this._currentInRoom.length = 0, (jh || B()) && console.debug("Left Needle Engine Room: " + a.room));
|
|
4083
4083
|
break;
|
|
4084
4084
|
case "user-joined-room":
|
|
4085
4085
|
if (t.data) {
|
|
@@ -4139,7 +4139,7 @@ ${h.href}`);
|
|
|
4139
4139
|
}
|
|
4140
4140
|
}
|
|
4141
4141
|
}
|
|
4142
|
-
const
|
|
4142
|
+
const cc = x("debugwebxr");
|
|
4143
4143
|
class jf {
|
|
4144
4144
|
constructor(t, e) {
|
|
4145
4145
|
r(this, "controllerStates", []);
|
|
@@ -4147,7 +4147,7 @@ class jf {
|
|
|
4147
4147
|
r(this, "context");
|
|
4148
4148
|
r(this, "userStateEvtName");
|
|
4149
4149
|
r(this, "onReceivedControllerState", (t) => {
|
|
4150
|
-
|
|
4150
|
+
cc && console.log(`XRSync: Received change for ${this.userId}: ${t.type} ${t.handedness}; tracked=${t.isTracking}`);
|
|
4151
4151
|
let e = !1;
|
|
4152
4152
|
for (let i = 0; i < this.controllerStates.length; i++)
|
|
4153
4153
|
if (this.controllerStates[i].index === t.index) {
|
|
@@ -4168,7 +4168,7 @@ class jf {
|
|
|
4168
4168
|
let n = !1;
|
|
4169
4169
|
for (let o = 0; o < t.controllers.length; o++)
|
|
4170
4170
|
t.controllers[o].index === i.index && (n = !0);
|
|
4171
|
-
n || (
|
|
4171
|
+
n || (cc && console.log(`XRSync: ${i.type} ${i.handedness} removed`, i.index), this.controllerStates.splice(e, 1), this.sendControllerRemoved(i));
|
|
4172
4172
|
}
|
|
4173
4173
|
for (const e of t.controllers)
|
|
4174
4174
|
this.updateControllerStates(e);
|
|
@@ -4195,7 +4195,7 @@ class jf {
|
|
|
4195
4195
|
index: t.index,
|
|
4196
4196
|
type: t.hand ? "hand" : "controller"
|
|
4197
4197
|
};
|
|
4198
|
-
this.controllerStates.push(i), this.context.connection.send(this.userStateEvtName, i),
|
|
4198
|
+
this.controllerStates.push(i), this.context.connection.send(this.userStateEvtName, i), cc && console.log(`XRSync: ${i.type} ${i.handedness} added`, i.index);
|
|
4199
4199
|
}
|
|
4200
4200
|
}
|
|
4201
4201
|
}
|
|
@@ -4204,7 +4204,7 @@ class KC {
|
|
|
4204
4204
|
r(this, "context");
|
|
4205
4205
|
r(this, "onJoinedRoom", () => {
|
|
4206
4206
|
if (this.context.connection.connectionId) {
|
|
4207
|
-
this._states.has(this.context.connection.connectionId) || (
|
|
4207
|
+
this._states.has(this.context.connection.connectionId) || (cc && console.log("XRSync: Local user joined room", this.context.connection.connectionId), this._states.set(this.context.connection.connectionId, new jf(this.context.connection.connectionId, this.context)));
|
|
4208
4208
|
for (const t of this.context.connection.usersInRoom())
|
|
4209
4209
|
this._states.has(t) || this._states.set(t, new jf(t, this.context));
|
|
4210
4210
|
}
|
|
@@ -4217,7 +4217,7 @@ class KC {
|
|
|
4217
4217
|
});
|
|
4218
4218
|
r(this, "onOtherUserJoinedRoom", (t) => {
|
|
4219
4219
|
const e = t.userId;
|
|
4220
|
-
this._states.has(e) || (
|
|
4220
|
+
this._states.has(e) || (cc && console.log("XRSync: Remote user joined room", e), this._states.set(e, new jf(e, this.context)));
|
|
4221
4221
|
});
|
|
4222
4222
|
r(this, "onOtherUserLeftRoom", (t) => {
|
|
4223
4223
|
const e = t.userId;
|
|
@@ -4310,7 +4310,7 @@ class v_ {
|
|
|
4310
4310
|
return this._transitionPromise = t, t;
|
|
4311
4311
|
}
|
|
4312
4312
|
}
|
|
4313
|
-
var za = /* @__PURE__ */ ((s) => (s[s.Quad = 0] = "Quad", s[s.Cube = 1] = "Cube", s[s.Sphere = 2] = "Sphere", s[s.RoundedCube = 10] = "RoundedCube", s))(za || {}),
|
|
4313
|
+
var za = /* @__PURE__ */ ((s) => (s[s.Quad = 0] = "Quad", s[s.Cube = 1] = "Cube", s[s.Sphere = 2] = "Sphere", s[s.RoundedCube = 10] = "RoundedCube", s))(za || {}), Xc, um;
|
|
4314
4314
|
class Er {
|
|
4315
4315
|
/**
|
|
4316
4316
|
* Creates a 3D text object
|
|
@@ -4320,10 +4320,10 @@ class Er {
|
|
|
4320
4320
|
static createText(t, e) {
|
|
4321
4321
|
let i = null;
|
|
4322
4322
|
const n = (e == null ? void 0 : e.font) || JC((e == null ? void 0 : e.familyFamily) || null);
|
|
4323
|
-
n instanceof Y1 ? i = Sl(this,
|
|
4323
|
+
n instanceof Y1 ? i = Sl(this, Xc, um).call(this, t, n, e) : i == null && (i = new Wn());
|
|
4324
4324
|
const o = (e == null ? void 0 : e.color) || 16777215, a = new q(i, (e == null ? void 0 : e.material) ?? new Tt({ color: o }));
|
|
4325
4325
|
return this.applyDefaultObjectOptions(a, e), n instanceof Promise ? n.then((l) => {
|
|
4326
|
-
a.geometry = Sl(this,
|
|
4326
|
+
a.geometry = Sl(this, Xc, um).call(this, t, l, e), e != null && e.onGeometry && e.onGeometry(a);
|
|
4327
4327
|
}) : e != null && e.onGeometry && e.onGeometry(a), a;
|
|
4328
4328
|
}
|
|
4329
4329
|
/**
|
|
@@ -4388,7 +4388,7 @@ class Er {
|
|
|
4388
4388
|
t.receiveShadow = !0, t.castShadow = !0, e != null && e.name && (t.name = e.name), e != null && e.position && (Array.isArray(e.position) ? t.position.set(e.position[0], e.position[1], e.position[2]) : t.position.set(e.position.x, e.position.y, e.position.z)), e != null && e.rotation && (Array.isArray(e.rotation) ? t.rotation.set(e.rotation[0], e.rotation[1], e.rotation[2]) : t.rotation.set(e.rotation.x, e.rotation.y, e.rotation.z)), e != null && e.scale && (typeof e.scale == "number" ? t.scale.set(e.scale, e.scale, e.scale) : Array.isArray(e.scale) ? t.scale.set(e.scale[0], e.scale[1], e.scale[2]) : t.scale.set(e.scale.x, e.scale.y, e.scale.z)), (e == null ? void 0 : e.receiveShadow) != null && (t.receiveShadow = e.receiveShadow), (e == null ? void 0 : e.castShadow) != null && (t.castShadow = e.castShadow), e != null && e.parent && e.parent.add(t);
|
|
4389
4389
|
}
|
|
4390
4390
|
}
|
|
4391
|
-
|
|
4391
|
+
Xc = new WeakSet(), um = function(t, e, i) {
|
|
4392
4392
|
const n = (i == null ? void 0 : i.depth) || 0.1;
|
|
4393
4393
|
return new K1(t, {
|
|
4394
4394
|
font: e,
|
|
@@ -4400,7 +4400,7 @@ qc = new WeakSet(), um = function(t, e, i) {
|
|
|
4400
4400
|
bevelOffset: 0.01,
|
|
4401
4401
|
bevelSize: 0.01
|
|
4402
4402
|
});
|
|
4403
|
-
}, Ui(Er,
|
|
4403
|
+
}, Ui(Er, Xc);
|
|
4404
4404
|
function ZC(s, t, e, i, n) {
|
|
4405
4405
|
const o = new Ax(), a = 1e-5, l = i - a;
|
|
4406
4406
|
o.absarc(a, a, a, -Math.PI / 2, -Math.PI, !0), o.absarc(a, t - l * 2, a, Math.PI, Math.PI / 2, !0), o.absarc(s - l * 2, t - l * 2, a, Math.PI / 2, 0, !0), o.absarc(s - l * 2, a, a, 0, -Math.PI / 2, !0);
|
|
@@ -4414,7 +4414,7 @@ function ZC(s, t, e, i, n) {
|
|
|
4414
4414
|
});
|
|
4415
4415
|
return c.scale(1, 1, 1 - i), c.center(), c.computeVertexNormals(), c;
|
|
4416
4416
|
}
|
|
4417
|
-
const
|
|
4417
|
+
const Bh = /* @__PURE__ */ new Map();
|
|
4418
4418
|
function JC(s) {
|
|
4419
4419
|
let t = "";
|
|
4420
4420
|
switch (s) {
|
|
@@ -4426,17 +4426,17 @@ function JC(s) {
|
|
|
4426
4426
|
t = "https://raw.githubusercontent.com/mrdoob/three.js/master/examples/fonts/helvetiker_regular.typeface.json";
|
|
4427
4427
|
break;
|
|
4428
4428
|
}
|
|
4429
|
-
if (
|
|
4430
|
-
const n =
|
|
4429
|
+
if (Bh.has(t)) {
|
|
4430
|
+
const n = Bh.get(t);
|
|
4431
4431
|
if (n)
|
|
4432
4432
|
return n;
|
|
4433
4433
|
}
|
|
4434
4434
|
const e = new Z1(), i = new Promise((n, o) => {
|
|
4435
4435
|
e.load(t, (a) => {
|
|
4436
|
-
|
|
4436
|
+
Bh.set(t, a), n(a);
|
|
4437
4437
|
}, void 0, o);
|
|
4438
4438
|
});
|
|
4439
|
-
return
|
|
4439
|
+
return Bh.set(t, i), i;
|
|
4440
4440
|
}
|
|
4441
4441
|
let Bf = !1, Ff = null;
|
|
4442
4442
|
function eP(s, t) {
|
|
@@ -4573,7 +4573,7 @@ const ky = class {
|
|
|
4573
4573
|
};
|
|
4574
4574
|
let ho = ky;
|
|
4575
4575
|
r(ho, "_active", null), r(ho, "_requestInFlight", !1);
|
|
4576
|
-
var
|
|
4576
|
+
var zc;
|
|
4577
4577
|
((s) => {
|
|
4578
4578
|
const t = [];
|
|
4579
4579
|
function e() {
|
|
@@ -4595,7 +4595,7 @@ var Fc;
|
|
|
4595
4595
|
a >= 0 && t.splice(a, 1);
|
|
4596
4596
|
}
|
|
4597
4597
|
s.unregisterExporter = n;
|
|
4598
|
-
})(
|
|
4598
|
+
})(zc || (zc = {}));
|
|
4599
4599
|
const ft = x("debugwebxr"), S_ = x("stats");
|
|
4600
4600
|
let zf = 0;
|
|
4601
4601
|
function tP(s) {
|
|
@@ -4763,7 +4763,7 @@ const ps = class {
|
|
|
4763
4763
|
this._newControllers.length = 0, this.controllers.length = 0;
|
|
4764
4764
|
for (const c of this._xr_scripts)
|
|
4765
4765
|
(o = c == null ? void 0 : c.onLeaveXR) == null || o.call(c, { xr: this });
|
|
4766
|
-
(a = this.sync) == null || a.onExitXR(this), this.context.mainCamera && ((l = this._originalCameraParent) == null || l.add(this.context.mainCamera), this._originalCameraWorldPosition && _t(this.context.mainCamera, this._originalCameraWorldPosition), this._originalCameraWorldRotation && xn(this.context.mainCamera, this._originalCameraWorldRotation), this._originalCameraWorldScale &&
|
|
4766
|
+
(a = this.sync) == null || a.onExitXR(this), this.context.mainCamera && ((l = this._originalCameraParent) == null || l.add(this.context.mainCamera), this._originalCameraWorldPosition && _t(this.context.mainCamera, this._originalCameraWorldPosition), this._originalCameraWorldRotation && xn(this.context.mainCamera, this._originalCameraWorldRotation), this._originalCameraWorldScale && Fc(this.context.mainCamera, this._originalCameraWorldScale)), this.context.requestSizeUpdate(), this._defaultRig.gameObject.removeFromParent(), xa(!1);
|
|
4767
4767
|
});
|
|
4768
4768
|
r(this, "_didStart", !1);
|
|
4769
4769
|
/** Called every frame by the engine */
|
|
@@ -5066,7 +5066,7 @@ const ps = class {
|
|
|
5066
5066
|
if (await this.isARSupported())
|
|
5067
5067
|
t = "immersive-ar";
|
|
5068
5068
|
else
|
|
5069
|
-
return
|
|
5069
|
+
return zc.exportAndOpen(), null;
|
|
5070
5070
|
} else
|
|
5071
5071
|
t == "ar" && (t = "immersive-ar");
|
|
5072
5072
|
if (B() && x("debugxrpreroom"))
|
|
@@ -5774,7 +5774,7 @@ class Ie {
|
|
|
5774
5774
|
static getLine(t) {
|
|
5775
5775
|
let e = this.linesCache.pop();
|
|
5776
5776
|
if (!e) {
|
|
5777
|
-
e = new
|
|
5777
|
+
e = new Lc();
|
|
5778
5778
|
let i = e.geometry.getAttribute("position");
|
|
5779
5779
|
i || (i = new mt(new Float32Array(2 * 3), 3), e.geometry.setAttribute("position", i));
|
|
5780
5780
|
}
|
|
@@ -5783,7 +5783,7 @@ class Ie {
|
|
|
5783
5783
|
static getCircle(t) {
|
|
5784
5784
|
let e = this.circlesCache.pop();
|
|
5785
5785
|
if (!e) {
|
|
5786
|
-
e = new
|
|
5786
|
+
e = new Lc();
|
|
5787
5787
|
let i = e.geometry.getAttribute("position");
|
|
5788
5788
|
if (!i) {
|
|
5789
5789
|
i = new mt(new Float32Array(Nf * 3), 3), e.geometry.setAttribute("position", i);
|
|
@@ -6000,7 +6000,7 @@ const uu = class {
|
|
|
6000
6000
|
intersect(t, e, i, n) {
|
|
6001
6001
|
var o, a, l;
|
|
6002
6002
|
for (const c of e) {
|
|
6003
|
-
if (!c || c.visible === !1 || V.isGizmo(c) || n.lineThreshold !== void 0 && n.lineThreshold < 0 && c instanceof
|
|
6003
|
+
if (!c || c.visible === !1 || V.isGizmo(c) || n.lineThreshold !== void 0 && n.lineThreshold < 0 && c instanceof Lc)
|
|
6004
6004
|
continue;
|
|
6005
6005
|
let h = !0;
|
|
6006
6006
|
const d = c, u = d.geometry;
|
|
@@ -6027,7 +6027,7 @@ const uu = class {
|
|
|
6027
6027
|
}
|
|
6028
6028
|
intersectSphere(t, e, i, n, o, a, l, c) {
|
|
6029
6029
|
let h = t && t.isMesh && t.layers.test(n) && !V.isGizmo(t);
|
|
6030
|
-
h && (h = t.visible), h && (h = !(t instanceof
|
|
6030
|
+
h && (h = t.visible), h && (h = !(t instanceof Lc)), h && (h = !(t instanceof Da));
|
|
6031
6031
|
const d = t, u = d.geometry;
|
|
6032
6032
|
if (h && c) {
|
|
6033
6033
|
const p = c(t);
|
|
@@ -6060,12 +6060,12 @@ const uu = class {
|
|
|
6060
6060
|
}
|
|
6061
6061
|
}
|
|
6062
6062
|
};
|
|
6063
|
-
let
|
|
6064
|
-
r(
|
|
6063
|
+
let hc = uu;
|
|
6064
|
+
r(hc, "_raycasting", 0);
|
|
6065
6065
|
function M_(s) {
|
|
6066
6066
|
return !(s.index && s.index.array.length < 3);
|
|
6067
6067
|
}
|
|
6068
|
-
const Ho = new Su(),
|
|
6068
|
+
const Ho = new Su(), Fh = new xr(), hP = new i0();
|
|
6069
6069
|
function dP(s, t, e) {
|
|
6070
6070
|
const i = s._computeIntersections;
|
|
6071
6071
|
if (!i)
|
|
@@ -6075,12 +6075,12 @@ function dP(s, t, e) {
|
|
|
6075
6075
|
const c = this, h = c.geometry.boundingSphere;
|
|
6076
6076
|
if (h) {
|
|
6077
6077
|
if (c instanceof Da) {
|
|
6078
|
-
|
|
6079
|
-
const u = o.ray.intersectPlane(
|
|
6078
|
+
Fh.setFromNormalAndCoplanarPoint(G(0, 1, 0), G(0, -c.position.y, 0)), Fh.applyMatrix4(c.matrixWorld, hP);
|
|
6079
|
+
const u = o.ray.intersectPlane(Fh, G());
|
|
6080
6080
|
if (u) {
|
|
6081
6081
|
Ho.copy(h), Ho.applyMatrix4(c.matrixWorld);
|
|
6082
6082
|
const m = G(u).sub(o.ray.origin).length(), g = Ho.radius * 0.5;
|
|
6083
|
-
m < g && a.push({ distance: m, point: u, object: c, normal:
|
|
6083
|
+
m < g && a.push({ distance: m, point: u, object: c, normal: Fh.normal.clone() });
|
|
6084
6084
|
}
|
|
6085
6085
|
return;
|
|
6086
6086
|
}
|
|
@@ -6182,7 +6182,7 @@ var Wd;
|
|
|
6182
6182
|
});
|
|
6183
6183
|
}
|
|
6184
6184
|
})(Wd || (Wd = {}));
|
|
6185
|
-
const R_ = Symbol("gltf-loader-internal-usage-tracker"), uP = x("debugusers"),
|
|
6185
|
+
const R_ = Symbol("gltf-loader-internal-usage-tracker"), uP = x("debugusers"), Oc = class {
|
|
6186
6186
|
constructor(t) {
|
|
6187
6187
|
r(this, "parser");
|
|
6188
6188
|
r(this, "_getDependency");
|
|
@@ -6194,10 +6194,10 @@ const R_ = Symbol("gltf-loader-internal-usage-tracker"), uP = x("debugusers"), P
|
|
|
6194
6194
|
return "NEEDLE_internal_usage_tracker";
|
|
6195
6195
|
}
|
|
6196
6196
|
static isLoading(t) {
|
|
6197
|
-
return
|
|
6197
|
+
return Oc._loadingProcesses > 0;
|
|
6198
6198
|
}
|
|
6199
6199
|
beforeRoot() {
|
|
6200
|
-
|
|
6200
|
+
Oc._loadingProcesses++;
|
|
6201
6201
|
const t = this, e = this._getDependency;
|
|
6202
6202
|
return this.parser.getDependency = function(i, n) {
|
|
6203
6203
|
const o = e.call(this, i, n);
|
|
@@ -6205,7 +6205,7 @@ const R_ = Symbol("gltf-loader-internal-usage-tracker"), uP = x("debugusers"), P
|
|
|
6205
6205
|
}, null;
|
|
6206
6206
|
}
|
|
6207
6207
|
afterRoot(t) {
|
|
6208
|
-
|
|
6208
|
+
Oc._loadingProcesses--, this.parser.getDependency = this._getDependency;
|
|
6209
6209
|
for (const e of this._loadedObjects)
|
|
6210
6210
|
delete e[R_], e instanceof L && (e.parent || e instanceof q && setTimeout(() => {
|
|
6211
6211
|
uP && console.warn("> GLTF LOADER: Mesh not used in scene!", e), e.material = null, e.geometry = null;
|
|
@@ -6225,8 +6225,8 @@ const R_ = Symbol("gltf-loader-internal-usage-tracker"), uP = x("debugusers"), P
|
|
|
6225
6225
|
// // return process;
|
|
6226
6226
|
// }
|
|
6227
6227
|
};
|
|
6228
|
-
let
|
|
6229
|
-
r(
|
|
6228
|
+
let dc = Oc;
|
|
6229
|
+
r(dc, "_loadingProcesses", 0);
|
|
6230
6230
|
class fP {
|
|
6231
6231
|
constructor() {
|
|
6232
6232
|
window.addEventListener("unhandledrejection", (t) => {
|
|
@@ -6312,7 +6312,7 @@ const gP = /* @__PURE__ */ new Set();
|
|
|
6312
6312
|
function nv(s, t, e = null, i) {
|
|
6313
6313
|
if (i || (i = gP, i.clear()), !s)
|
|
6314
6314
|
return i;
|
|
6315
|
-
const n = s[
|
|
6315
|
+
const n = s[Uc];
|
|
6316
6316
|
if (n)
|
|
6317
6317
|
for (const o of n)
|
|
6318
6318
|
i.has(o) || (e == null ? void 0 : e.call(null, o)) !== !1 && (i.add(o), t && nv(o, !0, e, i));
|
|
@@ -6321,20 +6321,20 @@ function nv(s, t, e = null, i) {
|
|
|
6321
6321
|
function IL(s) {
|
|
6322
6322
|
return s[Gl];
|
|
6323
6323
|
}
|
|
6324
|
-
const pr = x("debugresourceusers") || x("debugmemory"),
|
|
6324
|
+
const pr = x("debugresourceusers") || x("debugmemory"), Uc = Symbol("needle-resource-users"), Gl = Symbol("needle-resource-users-count");
|
|
6325
6325
|
function Vt(s, t) {
|
|
6326
6326
|
vg(s, t, function(e, i) {
|
|
6327
|
-
Ir && !
|
|
6327
|
+
Ir && !hc.raycasting && (Vd(Uc, this, e, !1), Vd(Uc, this, i, !0));
|
|
6328
6328
|
});
|
|
6329
6329
|
}
|
|
6330
6330
|
Ir && (Vt(q.prototype, "material"), Vt(q.prototype, "geometry"), Vt(Se.prototype, "map"), Vt(Se.prototype, "bumpMap"), Vt(Se.prototype, "alphaMap"), Vt(Se.prototype, "normalMap"), Vt(Se.prototype, "displacementMap"), Vt(Se.prototype, "roughnessMap"), Vt(Se.prototype, "metalnessMap"), Vt(Se.prototype, "emissiveMap"), Vt(Se.prototype, "specularMap"), Vt(Se.prototype, "envMap"), Vt(Se.prototype, "lightMap"), Vt(Se.prototype, "aoMap"), Vt(Se.prototype, "gradientMap"));
|
|
6331
6331
|
function yP(s) {
|
|
6332
6332
|
if (Ir === !1)
|
|
6333
6333
|
return;
|
|
6334
|
-
const t = s[
|
|
6334
|
+
const t = s[Uc];
|
|
6335
6335
|
if (t)
|
|
6336
6336
|
for (const e of t)
|
|
6337
|
-
Vd(
|
|
6337
|
+
Vd(Uc, e, s, !1);
|
|
6338
6338
|
}
|
|
6339
6339
|
Ir && vg(Se.prototype, "dispose", function() {
|
|
6340
6340
|
yP(this);
|
|
@@ -6360,7 +6360,7 @@ function Vd(s, t, e, i) {
|
|
|
6360
6360
|
} else if (t && n.has(t)) {
|
|
6361
6361
|
n.delete(t);
|
|
6362
6362
|
let o = e[Gl] || 0;
|
|
6363
|
-
o > 0 && (o -= 1, e[Gl] = o), pr && console.warn(`🔴 Removed user of "${e.type}"`, t, e, o, "users:", n), o <= 0 && (
|
|
6363
|
+
o > 0 && (o -= 1, e[Gl] = o), pr && console.warn(`🔴 Removed user of "${e.type}"`, t, e, o, "users:", n), o <= 0 && (dc.isLoading(e) || (Du && console.warn(`🔴 Removed all user of "${e.type}"`, e), J0() && Ee(e)));
|
|
6364
6364
|
}
|
|
6365
6365
|
e[s] = n;
|
|
6366
6366
|
}
|
|
@@ -6400,7 +6400,7 @@ class ju {
|
|
|
6400
6400
|
}
|
|
6401
6401
|
}
|
|
6402
6402
|
r(ju, "eventListeners", /* @__PURE__ */ new Map());
|
|
6403
|
-
const
|
|
6403
|
+
const Nc = Symbol("NEEDLE_NEED_UPDATE_INSTANCE"), sv = Symbol("isUsingInstancing"), ov = Symbol("instancingRenderer"), ql = Symbol("instancingAutoUpdateBounds");
|
|
6404
6404
|
class bn {
|
|
6405
6405
|
/** Is this object rendered using a InstancedMesh */
|
|
6406
6406
|
static isUsingInstancing(t) {
|
|
@@ -6419,7 +6419,7 @@ class bn {
|
|
|
6419
6419
|
// TODO: change this so it does not set matrix world directly but some flag that is only used by instancing
|
|
6420
6420
|
/** Mark an instanced object dirty so the instance matrix will be updated */
|
|
6421
6421
|
static markDirty(t, e = !0) {
|
|
6422
|
-
if (t && (this.isUsingInstancing(t) && (t[
|
|
6422
|
+
if (t && (this.isUsingInstancing(t) && (t[Nc] = !0, t.matrixWorldNeedsUpdate = !0), e))
|
|
6423
6423
|
for (const i of t.children)
|
|
6424
6424
|
bn.markDirty(i, !0);
|
|
6425
6425
|
}
|
|
@@ -6460,7 +6460,7 @@ The script will be ignored. Please make sure your component extends "Behaviour"
|
|
|
6460
6460
|
Did you add and remove a component in the same frame?`), je.splice(t, 1), t--;
|
|
6461
6461
|
continue;
|
|
6462
6462
|
}
|
|
6463
|
-
e.context = s,
|
|
6463
|
+
e.context = s, uc(e.gameObject), Mg(e, s);
|
|
6464
6464
|
} catch (e) {
|
|
6465
6465
|
console.error(e), _s(je[t], s), je.splice(t, 1), t--;
|
|
6466
6466
|
}
|
|
@@ -6477,14 +6477,14 @@ Did you add and remove a component in the same frame?`), je.splice(t, 1), t--;
|
|
|
6477
6477
|
} catch (i) {
|
|
6478
6478
|
console.error(i);
|
|
6479
6479
|
}
|
|
6480
|
-
e.__internalAwake !== void 0 && (e.gameObject || console.error("Calling awake for a component without a GameObject", e, e.gameObject),
|
|
6480
|
+
e.__internalAwake !== void 0 && (e.gameObject || console.error("Calling awake for a component without a GameObject", e, e.gameObject), uc(e.gameObject), e.activeAndEnabled && Pa(e.__internalAwake.bind(e)));
|
|
6481
6481
|
} catch (e) {
|
|
6482
6482
|
console.error(e), _s(je[t], s), je.splice(t, 1), t--;
|
|
6483
6483
|
}
|
|
6484
6484
|
for (let t = 0; t < je.length; t++)
|
|
6485
6485
|
try {
|
|
6486
6486
|
const e = je[t];
|
|
6487
|
-
if (e.destroyed || e.enabled === !1 || (
|
|
6487
|
+
if (e.destroyed || e.enabled === !1 || (uc(e.gameObject), e.activeAndEnabled === !1))
|
|
6488
6488
|
continue;
|
|
6489
6489
|
e.__internalEnable !== void 0 && (e.enabled = !0, Pa(e.__internalEnable.bind(e)));
|
|
6490
6490
|
} catch (e) {
|
|
@@ -6538,19 +6538,19 @@ function $f(s, t) {
|
|
|
6538
6538
|
}
|
|
6539
6539
|
return !1;
|
|
6540
6540
|
}
|
|
6541
|
-
function
|
|
6541
|
+
function yd(s) {
|
|
6542
6542
|
if (s || (s = pe.Current.scene), !s) {
|
|
6543
6543
|
console.trace("Invalid call - no current context.");
|
|
6544
6544
|
return;
|
|
6545
6545
|
}
|
|
6546
|
-
const t =
|
|
6546
|
+
const t = Jc(s);
|
|
6547
6547
|
av(s, t, !0) || (mm || B() ? console.error(`Error updating hierarchy
|
|
6548
6548
|
Do you have circular references in your project? <a target="_blank" href="https://docs.needle.tools/circular-reference"> Click here for more information.`, s) : console.error('Failed to update active state in hierarchy of "' + s.name + '"', s), console.warn(" ↑ this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."));
|
|
6549
6549
|
}
|
|
6550
6550
|
function av(s, t, e, i = 0) {
|
|
6551
6551
|
if (i > 1e3)
|
|
6552
6552
|
return console.warn("Hierarchy is too deep (> 1000 level) - will abort updating active state"), !1;
|
|
6553
|
-
const n =
|
|
6553
|
+
const n = Jc(s);
|
|
6554
6554
|
if (t && (t = n, t && s.parent)) {
|
|
6555
6555
|
const c = s.parent;
|
|
6556
6556
|
t = c[_o], t === void 0 && (c instanceof Ri || (t = !0));
|
|
@@ -6565,10 +6565,10 @@ function av(s, t, e, i = 0) {
|
|
|
6565
6565
|
av(c, t, e, i + 1) === !1 && (l = !1);
|
|
6566
6566
|
return l;
|
|
6567
6567
|
}
|
|
6568
|
-
function
|
|
6568
|
+
function uc(s) {
|
|
6569
6569
|
let t = !0, e = s, i = !1;
|
|
6570
6570
|
for (; e && e; ) {
|
|
6571
|
-
if (e.type === "Scene" && (i = !0), !
|
|
6571
|
+
if (e.type === "Scene" && (i = !0), !Jc(e)) {
|
|
6572
6572
|
t = !1;
|
|
6573
6573
|
break;
|
|
6574
6574
|
}
|
|
@@ -6586,17 +6586,17 @@ function wP(s, t) {
|
|
|
6586
6586
|
for (const i of s.userData.components)
|
|
6587
6587
|
t(i);
|
|
6588
6588
|
}
|
|
6589
|
-
const
|
|
6589
|
+
const _d = /* @__PURE__ */ new Map(), lv = Symbol("prewarmFlag"), gm = Symbol("waitingForPrewarm"), ym = x("debugprewarm");
|
|
6590
6590
|
function xP(s, t) {
|
|
6591
6591
|
if (!s || s[lv] === !0 || s[gm] === !0)
|
|
6592
6592
|
return;
|
|
6593
|
-
|
|
6593
|
+
_d.has(t) || _d.set(t, []), s[gm] = !0, _d.get(t).push(s), ym && console.debug("register prewarm", s.name);
|
|
6594
6594
|
}
|
|
6595
6595
|
let T_ = null, A_ = null;
|
|
6596
6596
|
function SP(s) {
|
|
6597
6597
|
if (!s)
|
|
6598
6598
|
return;
|
|
6599
|
-
const t =
|
|
6599
|
+
const t = _d.get(s);
|
|
6600
6600
|
if (!(t != null && t.length))
|
|
6601
6601
|
return;
|
|
6602
6602
|
const e = s.mainCamera;
|
|
@@ -6798,7 +6798,7 @@ function uv(s, t) {
|
|
|
6798
6798
|
}
|
|
6799
6799
|
return null;
|
|
6800
6800
|
}
|
|
6801
|
-
const
|
|
6801
|
+
const Kc = x("gizmos"), gt = x("debugextension"), Wf = x("debugtypes");
|
|
6802
6802
|
class IP {
|
|
6803
6803
|
constructor() {
|
|
6804
6804
|
r(this, "_types", /* @__PURE__ */ new Map());
|
|
@@ -7099,7 +7099,7 @@ function WP(s, t) {
|
|
|
7099
7099
|
}
|
|
7100
7100
|
return i.name = n(s), typeof s.guid == "string" && (i.guid = s.guid), i;
|
|
7101
7101
|
}
|
|
7102
|
-
const
|
|
7102
|
+
const bd = [];
|
|
7103
7103
|
function mv(s, t) {
|
|
7104
7104
|
if (!s)
|
|
7105
7105
|
return t;
|
|
@@ -7138,7 +7138,7 @@ function bm(s, t, e) {
|
|
|
7138
7138
|
}
|
|
7139
7139
|
else
|
|
7140
7140
|
s[n] = o(a);
|
|
7141
|
-
|
|
7141
|
+
bd.length = 0;
|
|
7142
7142
|
}
|
|
7143
7143
|
s.onAfterDeserializeMember !== void 0 && s.onAfterDeserializeMember(n, l, e);
|
|
7144
7144
|
}
|
|
@@ -7301,10 +7301,10 @@ function vm(s, t, e, i, n) {
|
|
|
7301
7301
|
return h.$serializedTypes && bm(h, s, e), c;
|
|
7302
7302
|
}
|
|
7303
7303
|
function XP(s) {
|
|
7304
|
-
if (
|
|
7304
|
+
if (bd.length = 0, typeof s == "object" && s !== null && s !== void 0)
|
|
7305
7305
|
for (const t of Object.keys(s))
|
|
7306
|
-
|
|
7307
|
-
return
|
|
7306
|
+
bd.push(s[t]);
|
|
7307
|
+
return bd;
|
|
7308
7308
|
}
|
|
7309
7309
|
const wm = Symbol("assigned component properties");
|
|
7310
7310
|
function Ua(s, t, e) {
|
|
@@ -7430,7 +7430,7 @@ const bv = new Ft("addComponentIdProvider");
|
|
|
7430
7430
|
function Oa(s, t, e = !0) {
|
|
7431
7431
|
s.userData || (s.userData = {}), s.userData.components || (s.userData.components = []), s.userData.components.push(t), t.gameObject = s, (t.guid === void 0 || t.guid === "invalid") && (t.guid = bv.generateUUID()), Ag(s), Dg(t, t.context);
|
|
7432
7432
|
try {
|
|
7433
|
-
e && t.__internalAwake && (
|
|
7433
|
+
e && t.__internalAwake && (uc(s), t.activeAndEnabled && t.__internalAwake()), ju.dispatchComponentLifecycleEvent("component-added", t);
|
|
7434
7434
|
} catch (i) {
|
|
7435
7435
|
console.error(i);
|
|
7436
7436
|
}
|
|
@@ -7502,6 +7502,8 @@ function zu(s, t, e, i = !0) {
|
|
|
7502
7502
|
}
|
|
7503
7503
|
function Uu(s, t, e) {
|
|
7504
7504
|
var n;
|
|
7505
|
+
if (e === !1 && s[_o] === !1)
|
|
7506
|
+
return null;
|
|
7505
7507
|
const i = Xa(s, t);
|
|
7506
7508
|
if (e === !1 && (i == null ? void 0 : i.enabled) === !1)
|
|
7507
7509
|
return null;
|
|
@@ -7514,11 +7516,11 @@ function Uu(s, t, e) {
|
|
|
7514
7516
|
}
|
|
7515
7517
|
return null;
|
|
7516
7518
|
}
|
|
7517
|
-
function
|
|
7519
|
+
function Zc(s, t, e, i = !0) {
|
|
7518
7520
|
var n;
|
|
7519
7521
|
e || (e = []), i && (e.length = 0), zu(s, t, e, !1);
|
|
7520
7522
|
for (let o = 0; o < ((n = s == null ? void 0 : s.children) == null ? void 0 : n.length); o++)
|
|
7521
|
-
|
|
7523
|
+
Zc(s.children[o], t, e, !1);
|
|
7522
7524
|
return e;
|
|
7523
7525
|
}
|
|
7524
7526
|
function Xd(s, t) {
|
|
@@ -7546,15 +7548,8 @@ function Nu(s, t = void 0, e = !0) {
|
|
|
7546
7548
|
let i = t;
|
|
7547
7549
|
if (i.isScene || (i = t == null ? void 0 : t.scene), !i)
|
|
7548
7550
|
return null;
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
if (e === !1 && o[_o] === !1)
|
|
7552
|
-
continue;
|
|
7553
|
-
const a = Uu(o, s);
|
|
7554
|
-
if (a)
|
|
7555
|
-
return a;
|
|
7556
|
-
}
|
|
7557
|
-
return null;
|
|
7551
|
+
const n = Uu(i, s, e);
|
|
7552
|
+
return n || null;
|
|
7558
7553
|
}
|
|
7559
7554
|
function sO(s, t, e = void 0) {
|
|
7560
7555
|
if (!s)
|
|
@@ -7563,13 +7558,7 @@ function sO(s, t, e = void 0) {
|
|
|
7563
7558
|
return console.error("Can not search object without any needle context or scene!!!"), t;
|
|
7564
7559
|
"scene" in e && (e = e.scene);
|
|
7565
7560
|
const i = e;
|
|
7566
|
-
|
|
7567
|
-
return t;
|
|
7568
|
-
for (const n in i.children) {
|
|
7569
|
-
const o = i.children[n];
|
|
7570
|
-
Kc(o, s, t, !1);
|
|
7571
|
-
}
|
|
7572
|
-
return t;
|
|
7561
|
+
return i && Zc(i, s, t, !1), t;
|
|
7573
7562
|
}
|
|
7574
7563
|
function Ag(s) {
|
|
7575
7564
|
s && s.isObject3D === !0 && KP(s, L);
|
|
@@ -7605,7 +7594,7 @@ L.prototype.getComponentInChildren = function(s) {
|
|
|
7605
7594
|
return Uu(this, s);
|
|
7606
7595
|
};
|
|
7607
7596
|
L.prototype.getComponentsInChildren = function(s, t) {
|
|
7608
|
-
return
|
|
7597
|
+
return Zc(this, s, t);
|
|
7609
7598
|
};
|
|
7610
7599
|
L.prototype.getComponentInParent = function(s) {
|
|
7611
7600
|
return Xd(this, s);
|
|
@@ -7615,10 +7604,10 @@ L.prototype.getComponentsInParent = function(s, t) {
|
|
|
7615
7604
|
};
|
|
7616
7605
|
Object.getOwnPropertyDescriptor(L.prototype, "activeSelf") || Object.defineProperty(L.prototype, "activeSelf", {
|
|
7617
7606
|
get: function() {
|
|
7618
|
-
return
|
|
7607
|
+
return Jc(this);
|
|
7619
7608
|
},
|
|
7620
7609
|
set: function(s) {
|
|
7621
|
-
|
|
7610
|
+
xd(this, s);
|
|
7622
7611
|
}
|
|
7623
7612
|
});
|
|
7624
7613
|
Object.getOwnPropertyDescriptor(L.prototype, "worldPosition") || Object.defineProperty(L.prototype, "worldPosition", {
|
|
@@ -7650,7 +7639,7 @@ Object.getOwnPropertyDescriptor(L.prototype, "worldScale") || Object.definePrope
|
|
|
7650
7639
|
return Ke(this);
|
|
7651
7640
|
},
|
|
7652
7641
|
set: function(s) {
|
|
7653
|
-
|
|
7642
|
+
Fc(this, s);
|
|
7654
7643
|
}
|
|
7655
7644
|
});
|
|
7656
7645
|
Object.getOwnPropertyDescriptor(L.prototype, "worldForward") || Object.defineProperty(L.prototype, "worldForward", {
|
|
@@ -7733,7 +7722,7 @@ class ce extends le {
|
|
|
7733
7722
|
return new ce(e);
|
|
7734
7723
|
}
|
|
7735
7724
|
}
|
|
7736
|
-
const
|
|
7725
|
+
const vd = x("debuggetcomponent"), wd = x("debuginstantiate");
|
|
7737
7726
|
class Qn {
|
|
7738
7727
|
constructor() {
|
|
7739
7728
|
r(this, "idProvider");
|
|
@@ -7757,10 +7746,10 @@ class Qn {
|
|
|
7757
7746
|
this.idProvider = t.idProvider, this.parent = t.parent, this.keepWorldPosition = t.keepWorldPosition, this.position = (e = t.position) == null ? void 0 : e.clone(), this.rotation = (i = t.rotation) == null ? void 0 : i.clone(), this.scale = (n = t.scale) == null ? void 0 : n.clone(), this.visible = t.visible, this.context = t.context, this.components = t.components;
|
|
7758
7747
|
}
|
|
7759
7748
|
}
|
|
7760
|
-
function
|
|
7749
|
+
function Jc(s) {
|
|
7761
7750
|
return s.visible;
|
|
7762
7751
|
}
|
|
7763
|
-
function
|
|
7752
|
+
function xd(s, t) {
|
|
7764
7753
|
return typeof t == "number" && (t = t > 0.5), s.visible = t, s.visible;
|
|
7765
7754
|
}
|
|
7766
7755
|
function oO(s) {
|
|
@@ -7773,7 +7762,7 @@ function Eg(s) {
|
|
|
7773
7762
|
return bn.isUsingInstancing(s);
|
|
7774
7763
|
}
|
|
7775
7764
|
function wv(s, t) {
|
|
7776
|
-
return
|
|
7765
|
+
return jc(s, t, !0, !0);
|
|
7777
7766
|
}
|
|
7778
7767
|
const xv = Symbol("isDestroyed");
|
|
7779
7768
|
function Na(s) {
|
|
@@ -7786,14 +7775,14 @@ const xm = Symbol("isDontDestroy");
|
|
|
7786
7775
|
function Ol(s, t = !0) {
|
|
7787
7776
|
s[xm] = t;
|
|
7788
7777
|
}
|
|
7789
|
-
const
|
|
7778
|
+
const Sd = [], Cd = [];
|
|
7790
7779
|
function sn(s, t = !0, e = !1) {
|
|
7791
|
-
|
|
7792
|
-
for (const i of xd)
|
|
7793
|
-
i.gameObject = null, i.context = null;
|
|
7780
|
+
Sd.length = 0, Cd.length = 0, Sm(s, t, !0);
|
|
7794
7781
|
for (const i of Sd)
|
|
7782
|
+
i.gameObject = null, i.context = null;
|
|
7783
|
+
for (const i of Cd)
|
|
7795
7784
|
aO(i, !0), e && Ee(i), mP(i);
|
|
7796
|
-
|
|
7785
|
+
Cd.length = 0, Sd.length = 0;
|
|
7797
7786
|
}
|
|
7798
7787
|
function Sm(s, t = !0, e = !0) {
|
|
7799
7788
|
var a;
|
|
@@ -7803,7 +7792,7 @@ function Sm(s, t = !0, e = !0) {
|
|
|
7803
7792
|
if (i.isComponent) {
|
|
7804
7793
|
if (i[xm])
|
|
7805
7794
|
return;
|
|
7806
|
-
|
|
7795
|
+
Sd.push(i);
|
|
7807
7796
|
const l = i.gameObject;
|
|
7808
7797
|
i.__internalDisable(), i.__internalDestroy(), i.gameObject = l;
|
|
7809
7798
|
return;
|
|
@@ -7811,7 +7800,7 @@ function Sm(s, t = !0, e = !0) {
|
|
|
7811
7800
|
if (s[xm])
|
|
7812
7801
|
return;
|
|
7813
7802
|
const n = s;
|
|
7814
|
-
|
|
7803
|
+
vd && console.log(n), Cd.push(n);
|
|
7815
7804
|
const o = (a = n.userData) == null ? void 0 : a.components;
|
|
7816
7805
|
if (o != null && Array.isArray(o)) {
|
|
7817
7806
|
let l = o.length;
|
|
@@ -7872,14 +7861,14 @@ function Wa(s, t) {
|
|
|
7872
7861
|
let e = null;
|
|
7873
7862
|
t != null && (t.x !== void 0 ? (e = new Qn(), e.position = t) : e = t);
|
|
7874
7863
|
let i = ee.Current;
|
|
7875
|
-
e != null && e.context && (i = e.context),
|
|
7864
|
+
e != null && e.context && (i = e.context), vd && i.alias && console.log("context", i.alias), e && !e.idProvider && (e.idProvider = new Ft(Date.now()));
|
|
7876
7865
|
const n = [], o = {}, a = {}, l = Cv(i, s, e, n, o, a);
|
|
7877
|
-
l && (cO(o), lO(a, o)),
|
|
7866
|
+
l && (cO(o), lO(a, o)), vd && (rm(s, !0), rm(l, !0));
|
|
7878
7867
|
const c = {};
|
|
7879
7868
|
if ((e == null ? void 0 : e.components) !== !1) {
|
|
7880
7869
|
for (const h in n) {
|
|
7881
7870
|
const d = n[h], u = d.guid;
|
|
7882
|
-
e && e.idProvider && (d.guid = e.idProvider.generateUUID(), c[u] = d.guid,
|
|
7871
|
+
e && e.idProvider && (d.guid = e.idProvider.generateUUID(), c[u] = d.guid, vd && console.log(d.name, d.guid)), Dg(d, i), d.__internalNewInstanceCreated && d.__internalNewInstanceCreated();
|
|
7883
7872
|
}
|
|
7884
7873
|
for (const h in n) {
|
|
7885
7874
|
const d = n[h];
|
|
@@ -7898,7 +7887,7 @@ function Cv(s, t, e, i, n, o) {
|
|
|
7898
7887
|
const l = t.children;
|
|
7899
7888
|
t.children = [];
|
|
7900
7889
|
const c = t.clone(!1);
|
|
7901
|
-
if (Ag(c), t.userData = a, t.children = l, n[t.uuid] = { original: t, clone: c },
|
|
7890
|
+
if (Ag(c), t.userData = a, t.children = l, n[t.uuid] = { original: t, clone: c }, wd && console.log("ADD", t, c), t.type === "SkinnedMesh" && (o[t.uuid] = { original: t, clone: c }), (e == null ? void 0 : e.visible) !== void 0 && (c.visible = e.visible), e != null && e.idProvider) {
|
|
7902
7891
|
c.uuid = e.idProvider.generateUUID();
|
|
7903
7892
|
const u = c;
|
|
7904
7893
|
u && (u.guid = c.uuid);
|
|
@@ -7907,7 +7896,7 @@ function Cv(s, t, e, i, n, o) {
|
|
|
7907
7896
|
const h = t.parent;
|
|
7908
7897
|
if (h && h.add(c), e != null && e.position ? _t(c, e.position) : c.position.copy(t.position), e != null && e.rotation ? xn(c, e.rotation) : c.quaternion.copy(t.quaternion), e != null && e.scale ? c.scale.copy(e.scale) : c.scale.copy(t.scale), e != null && e.parent && e.parent !== "scene") {
|
|
7909
7898
|
let u = null;
|
|
7910
|
-
if (typeof e.parent == "string" ? u =
|
|
7899
|
+
if (typeof e.parent == "string" ? u = jc(e.parent, s.scene, !0) : u = e.parent, u) {
|
|
7911
7900
|
const p = e.keepWorldPosition === !0 ? u.attach : u.add;
|
|
7912
7901
|
p ? p.call(u, c) : console.error("Invalid parent object", u, "received when instantiating:", t);
|
|
7913
7902
|
} else
|
|
@@ -7920,7 +7909,7 @@ function Cv(s, t, e, i, n, o) {
|
|
|
7920
7909
|
c.userData.components = p;
|
|
7921
7910
|
for (let m = 0; m < u.length; m++) {
|
|
7922
7911
|
const g = u[m], y = new g.constructor();
|
|
7923
|
-
Ua(y, g), g[
|
|
7912
|
+
Ua(y, g), g[gd] !== void 0 && (y[gd] = g[gd]), p.push(y), y.gameObject = c, i.push(y), n[g.guid] = { original: g, clone: y }, ju.dispatchComponentLifecycleEvent("component-added", y);
|
|
7924
7913
|
}
|
|
7925
7914
|
}
|
|
7926
7915
|
e && (e.position = void 0, e.rotation = void 0, e.scale = void 0, e.parent = void 0);
|
|
@@ -7986,12 +7975,12 @@ function z_(s, t, e, i) {
|
|
|
7986
7975
|
if (a) {
|
|
7987
7976
|
const l = a.uuid, c = (n = i[l]) == null ? void 0 : n.clone;
|
|
7988
7977
|
if (!c) {
|
|
7989
|
-
|
|
7978
|
+
wd && console.log("reference did not change", t, s, e);
|
|
7990
7979
|
return;
|
|
7991
7980
|
}
|
|
7992
7981
|
const h = a.userData.components.indexOf(e);
|
|
7993
7982
|
if (h >= 0 && c.isObject3D)
|
|
7994
|
-
return
|
|
7983
|
+
return wd && console.log(t, l), c.userData.components[h];
|
|
7995
7984
|
console.warn("could not find component", t, e);
|
|
7996
7985
|
}
|
|
7997
7986
|
} else if (e.isObject3D === !0) {
|
|
@@ -8001,7 +7990,7 @@ function z_(s, t, e, i) {
|
|
|
8001
7990
|
if (a) {
|
|
8002
7991
|
const l = a.uuid, c = (o = i[l]) == null ? void 0 : o.clone;
|
|
8003
7992
|
if (c)
|
|
8004
|
-
return
|
|
7993
|
+
return wd && console.log(t, "old", e, "new", c), c;
|
|
8005
7994
|
}
|
|
8006
7995
|
} else {
|
|
8007
7996
|
if (e.isVector4 || e.isVector3 || e.isVector2 || e.isQuaternion || e.isEuler)
|
|
@@ -8394,7 +8383,7 @@ class dO extends an {
|
|
|
8394
8383
|
}
|
|
8395
8384
|
}
|
|
8396
8385
|
new dO();
|
|
8397
|
-
const uO = Promise.resolve(null),
|
|
8386
|
+
const uO = Promise.resolve(null), Mc = class {
|
|
8398
8387
|
constructor(t) {
|
|
8399
8388
|
r(this, "url");
|
|
8400
8389
|
r(this, "_bitmap");
|
|
@@ -8403,8 +8392,8 @@ const uO = Promise.resolve(null), Oc = class {
|
|
|
8403
8392
|
this.url = t;
|
|
8404
8393
|
}
|
|
8405
8394
|
static getOrCreate(t) {
|
|
8406
|
-
let e =
|
|
8407
|
-
return e || (e = new
|
|
8395
|
+
let e = Mc.imageReferences.get(t);
|
|
8396
|
+
return e || (e = new Mc(t), Mc.imageReferences.set(t, e)), e;
|
|
8408
8397
|
}
|
|
8409
8398
|
dispose() {
|
|
8410
8399
|
this._bitmapObject && this._bitmapObject.close(), this._bitmap = void 0;
|
|
@@ -8431,11 +8420,11 @@ const uO = Promise.resolve(null), Oc = class {
|
|
|
8431
8420
|
}), this._bitmap);
|
|
8432
8421
|
}
|
|
8433
8422
|
};
|
|
8434
|
-
let
|
|
8435
|
-
r(
|
|
8423
|
+
let fc = Mc;
|
|
8424
|
+
r(fc, "imageReferences", /* @__PURE__ */ new Map());
|
|
8436
8425
|
class fO extends an {
|
|
8437
8426
|
constructor() {
|
|
8438
|
-
super([
|
|
8427
|
+
super([fc], "ImageReferenceSerializer");
|
|
8439
8428
|
}
|
|
8440
8429
|
onSerialize(t, e) {
|
|
8441
8430
|
return null;
|
|
@@ -8443,12 +8432,12 @@ class fO extends an {
|
|
|
8443
8432
|
onDeserialize(t, e) {
|
|
8444
8433
|
if (typeof t == "string") {
|
|
8445
8434
|
const i = Tr(e.gltfId, t);
|
|
8446
|
-
return
|
|
8435
|
+
return fc.getOrCreate(i);
|
|
8447
8436
|
}
|
|
8448
8437
|
}
|
|
8449
8438
|
}
|
|
8450
8439
|
new fO();
|
|
8451
|
-
const
|
|
8440
|
+
const Rc = class {
|
|
8452
8441
|
constructor(t) {
|
|
8453
8442
|
/** The resolved url to the file */
|
|
8454
8443
|
r(this, "url");
|
|
@@ -8456,8 +8445,8 @@ const Mc = class {
|
|
|
8456
8445
|
this.url = t;
|
|
8457
8446
|
}
|
|
8458
8447
|
static getOrCreate(t) {
|
|
8459
|
-
let e =
|
|
8460
|
-
return e || (e = new
|
|
8448
|
+
let e = Rc.cache.get(t);
|
|
8449
|
+
return e || (e = new Rc(t), Rc.cache.set(t, e)), e;
|
|
8461
8450
|
}
|
|
8462
8451
|
/** Load the file binary data
|
|
8463
8452
|
* @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.
|
|
@@ -8472,11 +8461,11 @@ const Mc = class {
|
|
|
8472
8461
|
return this.res || (this.res = fetch(this.url)), this.res.then((t) => t.text());
|
|
8473
8462
|
}
|
|
8474
8463
|
};
|
|
8475
|
-
let
|
|
8476
|
-
r(
|
|
8464
|
+
let pc = Rc;
|
|
8465
|
+
r(pc, "cache", /* @__PURE__ */ new Map());
|
|
8477
8466
|
class pO extends an {
|
|
8478
8467
|
constructor() {
|
|
8479
|
-
super([
|
|
8468
|
+
super([pc], "FileReferenceSerializer");
|
|
8480
8469
|
}
|
|
8481
8470
|
onSerialize(t, e) {
|
|
8482
8471
|
return null;
|
|
@@ -8484,7 +8473,7 @@ class pO extends an {
|
|
|
8484
8473
|
onDeserialize(t, e) {
|
|
8485
8474
|
if (typeof t == "string") {
|
|
8486
8475
|
const i = Tr(e.gltfId, t);
|
|
8487
|
-
return
|
|
8476
|
+
return pc.getOrCreate(i);
|
|
8488
8477
|
}
|
|
8489
8478
|
}
|
|
8490
8479
|
}
|
|
@@ -8521,7 +8510,7 @@ class mO {
|
|
|
8521
8510
|
e !== -1 && this.mixers.splice(e, 1);
|
|
8522
8511
|
}
|
|
8523
8512
|
}
|
|
8524
|
-
class
|
|
8513
|
+
class $c {
|
|
8525
8514
|
/**
|
|
8526
8515
|
* Tries to get the animation actions from an animation mixer.
|
|
8527
8516
|
* @param mixer The animation mixer to get the actions from
|
|
@@ -8715,7 +8704,7 @@ irradiance += getLightProbeIrradiance( lightProbe, geometry.normal );
|
|
|
8715
8704
|
#endif`
|
|
8716
8705
|
);
|
|
8717
8706
|
Nx.lightmap.lightmapScaleOffset = { value: new ge(1, 1, 0, 0) };
|
|
8718
|
-
const Gf = x("debugprogressive"),
|
|
8707
|
+
const Gf = x("debugprogressive"), zh = new Oi(), Uh = new Su();
|
|
8719
8708
|
class bO {
|
|
8720
8709
|
constructor(t) {
|
|
8721
8710
|
r(this, "context");
|
|
@@ -8764,8 +8753,8 @@ class bO {
|
|
|
8764
8753
|
const a = i.mesh_lod != n.lastLodLevel_Mesh || i.texture_lod != n.lastLodLevel_Texture;
|
|
8765
8754
|
if (Gf && e.geometry.boundingSphere) {
|
|
8766
8755
|
const d = e.geometry.boundingSphere;
|
|
8767
|
-
|
|
8768
|
-
const u =
|
|
8756
|
+
Uh.copy(d), Uh.applyMatrix4(e.matrixWorld);
|
|
8757
|
+
const u = Uh.center, p = Uh.radius, m = ["#76c43e", "#bcc43e", "#c4ac3e", "#c4673e", "#ff3e3e"];
|
|
8769
8758
|
if (a)
|
|
8770
8759
|
V.DrawWireSphere(u, p, m[o], 0.1);
|
|
8771
8760
|
else {
|
|
@@ -8785,7 +8774,7 @@ TEX ` + i.texture_lod;
|
|
|
8785
8774
|
` + (b / n.lastScreenCoverage).toFixed(0) + ` dens
|
|
8786
8775
|
` + (n.lastScreenCoverage * 100).toFixed(1) + `% cov
|
|
8787
8776
|
` + (n.lastCentrality * 100).toFixed(1) + `% centr
|
|
8788
|
-
` + (
|
|
8777
|
+
` + (zh.min.x.toFixed(2) + "-" + zh.max.x.toFixed(2) + "x" + zh.min.y.toFixed(2) + "-" + zh.max.y.toFixed(2)) + " scr"), n.lastScreenCoverage > 0.1) {
|
|
8789
8778
|
const C = t, k = C.worldForward, O = C.worldPosition, E = G(k).multiplyScalar(p * 0.7).add(u), F = E.distanceTo(O), A = m[Math.min(m.length - 1, Math.max(0, o))] + "88", z = this.context.domHeight > 0 ? screen.height / this.context.domHeight : 1, U = t.isPerspectiveCamera ? Math.tan(t.fov * Math.PI / 180 / 2) : 1;
|
|
8790
8779
|
V.DrawLabel(E, w, F * 0.012 * z * U, void 0, 16777215, A);
|
|
8791
8780
|
}
|
|
@@ -8839,12 +8828,12 @@ class xO {
|
|
|
8839
8828
|
}
|
|
8840
8829
|
}
|
|
8841
8830
|
new og();
|
|
8842
|
-
const
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
const SO = new rg(
|
|
8831
|
+
const eh = new Uint8Array(4);
|
|
8832
|
+
eh[0] = 255;
|
|
8833
|
+
eh[1] = 255;
|
|
8834
|
+
eh[2] = 255;
|
|
8835
|
+
eh[3] = 255;
|
|
8836
|
+
const SO = new rg(eh, 1, 1, Pu);
|
|
8848
8837
|
function Lg(s, t = 1) {
|
|
8849
8838
|
const e = "alpha" in s, i = t * t, n = new Uint8Array(4 * i), o = Math.floor(s.r * 255), a = Math.floor(s.g * 255), l = Math.floor(s.b * 255);
|
|
8850
8839
|
for (let h = 0; h < i; h++) {
|
|
@@ -8925,7 +8914,7 @@ function RO(s) {
|
|
|
8925
8914
|
}).join(""));
|
|
8926
8915
|
}
|
|
8927
8916
|
const dn = x("debugenvlight");
|
|
8928
|
-
var
|
|
8917
|
+
var mc = /* @__PURE__ */ ((s) => (s[s.Skybox = 0] = "Skybox", s[s.Trilight = 1] = "Trilight", s[s.Flat = 3] = "Flat", s[s.Custom = 4] = "Custom", s))(mc || {}), Cm = /* @__PURE__ */ ((s) => (s[s.Skybox = 0] = "Skybox", s[s.Custom = 1] = "Custom", s))(Cm || {});
|
|
8929
8918
|
class kO {
|
|
8930
8919
|
constructor(t) {
|
|
8931
8920
|
r(this, "context");
|
|
@@ -9017,7 +9006,7 @@ class kO {
|
|
|
9017
9006
|
var i;
|
|
9018
9007
|
this.__currentReflectionId = t;
|
|
9019
9008
|
const e = (i = this._sceneLightSettings) == null ? void 0 : i.get(t);
|
|
9020
|
-
switch (dn && console.log("Enable reflection", t, e ?
|
|
9009
|
+
switch (dn && console.log("Enable reflection", t, e ? mc[e.ambientMode] : "Unknown ambient mode", e), e == null ? void 0 : e.ambientMode) {
|
|
9021
9010
|
case 0:
|
|
9022
9011
|
case 4:
|
|
9023
9012
|
const n = this.internalGetReflection(t);
|
|
@@ -9361,20 +9350,20 @@ function LO(s) {
|
|
|
9361
9350
|
var e;
|
|
9362
9351
|
return ((e = s.classList) == null ? void 0 : e.contains("material-symbols-outlined")) || !1;
|
|
9363
9352
|
}
|
|
9364
|
-
const
|
|
9353
|
+
const Nh = /* @__PURE__ */ new Map();
|
|
9365
9354
|
async function G_(s) {
|
|
9366
9355
|
const t = "Material Symbols Outlined";
|
|
9367
|
-
if (document.fonts.check(`1em '${t}'`) || (console.log("Font not loaded yet"), await document.fonts.ready),
|
|
9368
|
-
return
|
|
9356
|
+
if (document.fonts.check(`1em '${t}'`) || (console.log("Font not loaded yet"), await document.fonts.ready), Nh.has(s))
|
|
9357
|
+
return Nh.get(s);
|
|
9369
9358
|
const e = document.createElement("canvas"), i = 48;
|
|
9370
9359
|
e.width = i, e.height = i;
|
|
9371
9360
|
const n = e.getContext("2d");
|
|
9372
9361
|
if (n) {
|
|
9373
9362
|
n.font = `${i}px '${t}'`, n.fillStyle = "black", n.fillText(s, 0, i);
|
|
9374
9363
|
const o = e.toDataURL(), a = new Fe();
|
|
9375
|
-
return a.name = s + " icon", a.image = new Image(), a.image.src = o, a.needsUpdate = !0,
|
|
9364
|
+
return a.name = s + " icon", a.image = new Image(), a.image.src = o, a.needsUpdate = !0, Nh.set(s, a), a;
|
|
9376
9365
|
}
|
|
9377
|
-
return
|
|
9366
|
+
return Nh.set(s, null), null;
|
|
9378
9367
|
}
|
|
9379
9368
|
const fu = class {
|
|
9380
9369
|
constructor() {
|
|
@@ -9926,7 +9915,7 @@ class q_ {
|
|
|
9926
9915
|
t.use(), this.onclick();
|
|
9927
9916
|
}
|
|
9928
9917
|
}
|
|
9929
|
-
const Jo = "needle-menu",
|
|
9918
|
+
const Jo = "needle-menu", gc = x("debugmenu"), X_ = x("debugnoncommercial");
|
|
9930
9919
|
let GO = class {
|
|
9931
9920
|
constructor(t) {
|
|
9932
9921
|
r(this, "_context");
|
|
@@ -9954,9 +9943,9 @@ let GO = class {
|
|
|
9954
9943
|
}
|
|
9955
9944
|
}, this._menu.appendChild(o);
|
|
9956
9945
|
} else
|
|
9957
|
-
|
|
9946
|
+
gc && console.error("NeedleMenu: unknown postMessage event", e);
|
|
9958
9947
|
} else
|
|
9959
|
-
|
|
9948
|
+
gc && console.warn("NeedleMenu: unknown postMessage type", i, e);
|
|
9960
9949
|
}
|
|
9961
9950
|
});
|
|
9962
9951
|
r(this, "onStartXR", (t) => {
|
|
@@ -10041,7 +10030,7 @@ let GO = class {
|
|
|
10041
10030
|
return this._menu.appendChild(t);
|
|
10042
10031
|
}
|
|
10043
10032
|
};
|
|
10044
|
-
var
|
|
10033
|
+
var Qc;
|
|
10045
10034
|
const Ty = class extends HTMLElement {
|
|
10046
10035
|
constructor() {
|
|
10047
10036
|
var u, p, m, g, y, _;
|
|
@@ -10049,7 +10038,7 @@ const Ty = class extends HTMLElement {
|
|
|
10049
10038
|
r(this, "_domElement", null);
|
|
10050
10039
|
r(this, "_context", null);
|
|
10051
10040
|
r(this, "_sizeChangeInterval");
|
|
10052
|
-
Ui(this,
|
|
10041
|
+
Ui(this, Qc, (e) => {
|
|
10053
10042
|
if (!e.defaultPrevented && e.target == this._domElement && e instanceof PointerEvent && e.button === 0 && this.root.classList.contains("open")) {
|
|
10054
10043
|
const i = this.foldout.getBoundingClientRect(), n = e;
|
|
10055
10044
|
n.clientX > i.left && n.clientX < i.right && n.clientY > i.top && n.clientY < i.bottom || this.root.classList.toggle("open", !1);
|
|
@@ -10496,7 +10485,7 @@ const Ty = class extends HTMLElement {
|
|
|
10496
10485
|
let l = 0;
|
|
10497
10486
|
const c = (b, w) => {
|
|
10498
10487
|
var C, k, O;
|
|
10499
|
-
|
|
10488
|
+
gc && console.log("Set menu visible", w), a != null && a.isInAR && a.arOverlayElement ? b != a.arOverlayElement && a.arOverlayElement.appendChild(this) : this.parentNode != ((C = this._domElement) == null ? void 0 : C.shadowRoot) && ((O = (k = this._domElement) == null ? void 0 : k.shadowRoot) == null || O.appendChild(this)), this.style.display = w ? "flex" : "none", this.style.visibility = "visible", this.style.opacity = "1";
|
|
10500
10489
|
};
|
|
10501
10490
|
let h = !1;
|
|
10502
10491
|
new MutationObserver((b) => {
|
|
@@ -10512,7 +10501,7 @@ const Ty = class extends HTMLElement {
|
|
|
10512
10501
|
} finally {
|
|
10513
10502
|
h = !1;
|
|
10514
10503
|
}
|
|
10515
|
-
}).observe(this.root, { childList: !0, subtree: !0, attributes: !0 }),
|
|
10504
|
+
}).observe(this.root, { childList: !0, subtree: !0, attributes: !0 }), gc && this.___insertDebugOptions();
|
|
10516
10505
|
}
|
|
10517
10506
|
static create() {
|
|
10518
10507
|
return document.createElement(Jo, { is: Jo });
|
|
@@ -10524,12 +10513,12 @@ const Ty = class extends HTMLElement {
|
|
|
10524
10513
|
connectedCallback() {
|
|
10525
10514
|
window.addEventListener("resize", this.handleSizeChange), this.handleMenuVisible(), this._sizeChangeInterval = setInterval(() => this.handleSizeChange(void 0, !0), 5e3), setTimeout(() => {
|
|
10526
10515
|
var e, i;
|
|
10527
|
-
(e = this._domElement) == null || e.addEventListener("resize", this.handleSizeChange), (i = this._domElement) == null || i.addEventListener("click", fe(this,
|
|
10516
|
+
(e = this._domElement) == null || e.addEventListener("resize", this.handleSizeChange), (i = this._domElement) == null || i.addEventListener("click", fe(this, Qc));
|
|
10528
10517
|
}, 1);
|
|
10529
10518
|
}
|
|
10530
10519
|
disconnectedCallback() {
|
|
10531
10520
|
var e, i;
|
|
10532
|
-
window.removeEventListener("resize", this.handleSizeChange), clearInterval(this._sizeChangeInterval), (e = this._domElement) == null || e.removeEventListener("resize", this.handleSizeChange), (i = this._context) == null || i.domElement.removeEventListener("click", fe(this,
|
|
10521
|
+
window.removeEventListener("resize", this.handleSizeChange), clearInterval(this._sizeChangeInterval), (e = this._domElement) == null || e.removeEventListener("resize", this.handleSizeChange), (i = this._context) == null || i.domElement.removeEventListener("click", fe(this, Qc));
|
|
10533
10522
|
}
|
|
10534
10523
|
showNeedleLogo(e) {
|
|
10535
10524
|
this._userRequestedLogoVisible = e, !(!e && (!ks() || X_) && (console.warn("[Needle Engine] You need a PRO license to hide the Needle Engine logo in production."), !ui())) && this.___onSetLogoVisible(e);
|
|
@@ -10620,7 +10609,7 @@ const Ty = class extends HTMLElement {
|
|
|
10620
10609
|
* if we dont have any content and logo then we hide the menu
|
|
10621
10610
|
*/
|
|
10622
10611
|
handleMenuVisible() {
|
|
10623
|
-
|
|
10612
|
+
gc && console.log("Update VisibleState: Any Content?", this.hasAnyContent), this.hasAnyContent ? this.root.style.display = "" : this.root.style.display = "none", this.root.classList.toggle("has-options", this.hasAnyVisibleOptions), this.root.classList.toggle("has-no-options", !this.hasAnyVisibleOptions);
|
|
10624
10613
|
}
|
|
10625
10614
|
/** @returns true if we have any content OR a logo */
|
|
10626
10615
|
get hasAnyContent() {
|
|
@@ -10662,7 +10651,7 @@ const Ty = class extends HTMLElement {
|
|
|
10662
10651
|
}
|
|
10663
10652
|
};
|
|
10664
10653
|
let Zd = Ty;
|
|
10665
|
-
|
|
10654
|
+
Qc = new WeakMap();
|
|
10666
10655
|
customElements.get(Jo) || customElements.define(Jo, Zd);
|
|
10667
10656
|
const st = x("debugcontext"), qO = x("stats"), XO = x("debugactive"), QO = x("debugframerate"), YO = x("debugcoroutine"), FL = {};
|
|
10668
10657
|
class zL {
|
|
@@ -10879,7 +10868,7 @@ const ke = class {
|
|
|
10879
10868
|
r(this, "_contextRestoreTries", 0);
|
|
10880
10869
|
/** returns true if we should return out of the frame loop */
|
|
10881
10870
|
r(this, "_wasPaused", !1);
|
|
10882
|
-
this.name = (t == null ? void 0 : t.name) || "", this.alias = t == null ? void 0 : t.alias, this.domElement = (t == null ? void 0 : t.domElement) || document.body, this.hash = t == null ? void 0 : t.hash, t != null && t.renderer && (this.renderer = t.renderer, this.isManagedExternally = !0), (t == null ? void 0 : t.runInBackground) !== void 0 && (this.runInBackground = t.runInBackground), t != null && t.scene ? this.scene = t.scene : this.scene = new Ri(), t != null && t.camera && (this._mainCamera = t.camera), this.application = new _n(this), this.time = new AO(), this.input = new DC(this), this.physics = new
|
|
10871
|
+
this.name = (t == null ? void 0 : t.name) || "", this.alias = t == null ? void 0 : t.alias, this.domElement = (t == null ? void 0 : t.domElement) || document.body, this.hash = t == null ? void 0 : t.hash, t != null && t.renderer && (this.renderer = t.renderer, this.isManagedExternally = !0), (t == null ? void 0 : t.runInBackground) !== void 0 && (this.runInBackground = t.runInBackground), t != null && t.scene ? this.scene = t.scene : this.scene = new Ri(), t != null && t.camera && (this._mainCamera = t.camera), this.application = new _n(this), this.time = new AO(), this.input = new DC(this), this.physics = new hc(this), this.connection = new YC(this), this.assets = new fP(), this.sceneLighting = new kO(this), this.addressables = new hO(this), this.lightmaps = new _O(this), this.players = new xO(this), this.menu = new GO(this), this.lodsManager = new bO(this), this.animations = new mO(this);
|
|
10883
10872
|
const e = () => this._needsUpdateSize = !0;
|
|
10884
10873
|
window.addEventListener("resize", e), this._disposeCallbacks.push(() => window.removeEventListener("resize", e));
|
|
10885
10874
|
const i = new ResizeObserver((n) => this._needsUpdateSize = !0);
|
|
@@ -11360,7 +11349,7 @@ Possible solutions:
|
|
|
11360
11349
|
$a(this.scene, (w) => {
|
|
11361
11350
|
const C = w;
|
|
11362
11351
|
if (C != null && C.isCamera) {
|
|
11363
|
-
if (
|
|
11352
|
+
if (uc(C.gameObject), !C.activeAndEnabled)
|
|
11364
11353
|
return;
|
|
11365
11354
|
if (C.tag === "MainCamera")
|
|
11366
11355
|
return b = C, !0;
|
|
@@ -11476,7 +11465,7 @@ Possible solutions:
|
|
|
11476
11465
|
}
|
|
11477
11466
|
if ((n = this._stats) == null || n.begin(), ke.Current = this, this.onHandlePaused())
|
|
11478
11467
|
return !1;
|
|
11479
|
-
for (ke.Current = this, this.time.update(), QO && console.log("FPS", this.time.smoothedFps.toFixed(0)), Hd(this),
|
|
11468
|
+
for (ke.Current = this, this.time.update(), QO && console.log("FPS", this.time.smoothedFps.toFixed(0)), Hd(this), yd(this.scene), rv(this), Rn(
|
|
11480
11469
|
this,
|
|
11481
11470
|
-1
|
|
11482
11471
|
/* Start */
|
|
@@ -11717,7 +11706,7 @@ function KO(s) {
|
|
|
11717
11706
|
return s(!0);
|
|
11718
11707
|
kv.push(s);
|
|
11719
11708
|
}
|
|
11720
|
-
function
|
|
11709
|
+
function $h(s) {
|
|
11721
11710
|
for (const t of kv)
|
|
11722
11711
|
try {
|
|
11723
11712
|
t(s);
|
|
@@ -11738,9 +11727,9 @@ async function ZO() {
|
|
|
11738
11727
|
}).catch((e) => {
|
|
11739
11728
|
Ki && console.error("License check failed", e);
|
|
11740
11729
|
});
|
|
11741
|
-
(t == null ? void 0 : t.status) === 200 ? (Mm = !1, Ki && console.log("License check succeeded"), Ms = "pro",
|
|
11730
|
+
(t == null ? void 0 : t.status) === 200 ? (Mm = !1, Ki && console.log("License check succeeded"), Ms = "pro", $h(!0)) : (t == null ? void 0 : t.status) === 403 ? ($h(!1), Mm = !0, Xl = await t.text()) : ($h(!1), Ki && console.log("License check failed with status " + (t == null ? void 0 : t.status)));
|
|
11742
11731
|
} catch (s) {
|
|
11743
|
-
|
|
11732
|
+
$h(!1), Ki && console.error("License check failed", s);
|
|
11744
11733
|
}
|
|
11745
11734
|
else
|
|
11746
11735
|
Ki && console.log('Runtime license check is skipped because license is already applied as "' + Ms + '"');
|
|
@@ -11913,7 +11902,7 @@ async function iM() {
|
|
|
11913
11902
|
version: Vn,
|
|
11914
11903
|
generator: bg,
|
|
11915
11904
|
build_time: U0,
|
|
11916
|
-
public_key:
|
|
11905
|
+
public_key: md
|
|
11917
11906
|
}, l = (s = navigator.sendBeacon) == null ? void 0 : s.call(navigator, o, JSON.stringify(a));
|
|
11918
11907
|
Ki && console.log("Send beacon result", l);
|
|
11919
11908
|
}
|
|
@@ -11979,31 +11968,31 @@ function J_(s) {
|
|
|
11979
11968
|
return s;
|
|
11980
11969
|
}
|
|
11981
11970
|
const vo = x("debughotreload");
|
|
11982
|
-
let
|
|
11983
|
-
const
|
|
11971
|
+
let Wc = !1;
|
|
11972
|
+
const yc = /* @__PURE__ */ new Map();
|
|
11984
11973
|
function UL() {
|
|
11985
|
-
return
|
|
11974
|
+
return Wc;
|
|
11986
11975
|
}
|
|
11987
11976
|
function eb() {
|
|
11988
11977
|
return globalThis.NEEDLE_HOT_RELOAD_ENABLED === !0;
|
|
11989
11978
|
}
|
|
11990
11979
|
function sM(s) {
|
|
11991
11980
|
var i;
|
|
11992
|
-
if (
|
|
11981
|
+
if (Wc) {
|
|
11993
11982
|
vo && console.warn("[Needle Engine] Hot reloading is in progress, not registering instance", s);
|
|
11994
11983
|
return;
|
|
11995
11984
|
}
|
|
11996
11985
|
vo && console.log("[Needle Engine] Registering hot reload instance", s);
|
|
11997
11986
|
const e = s.constructor.name;
|
|
11998
|
-
|
|
11987
|
+
yc.has(e) ? (i = yc.get(e)) == null || i.push(s) : yc.set(e, [s]);
|
|
11999
11988
|
}
|
|
12000
11989
|
function oM(s) {
|
|
12001
|
-
if (
|
|
11990
|
+
if (Wc) {
|
|
12002
11991
|
vo && console.warn("[Needle Engine] Hot reloading is in progress, not unregistering instance", s);
|
|
12003
11992
|
return;
|
|
12004
11993
|
}
|
|
12005
11994
|
vo && console.log("[Needle Engine] Unregistering hot reload instance", s);
|
|
12006
|
-
const e = s.constructor.name, i =
|
|
11995
|
+
const e = s.constructor.name, i = yc.get(e);
|
|
12007
11996
|
if (!i)
|
|
12008
11997
|
return;
|
|
12009
11998
|
const n = i.indexOf(s);
|
|
@@ -12030,13 +12019,13 @@ function NL(s) {
|
|
|
12030
12019
|
vo && console.log("[HMR] Apply changes", s, Object.keys(s)), rM();
|
|
12031
12020
|
for (const t of Object.keys(s))
|
|
12032
12021
|
try {
|
|
12033
|
-
|
|
12022
|
+
Wc = !0;
|
|
12034
12023
|
const e = M.get(t);
|
|
12035
12024
|
if (!e) {
|
|
12036
12025
|
vo && console.log("[HMR] Type not found: " + t);
|
|
12037
12026
|
continue;
|
|
12038
12027
|
}
|
|
12039
|
-
const i = s[t], n =
|
|
12028
|
+
const i = s[t], n = yc.get(i.name);
|
|
12040
12029
|
let o = "[Needle Engine] Updating type: " + t;
|
|
12041
12030
|
const a = (n == null ? void 0 : n.length) ?? -1;
|
|
12042
12031
|
a > 0 ? o += " x" + a : o += " (No instances registered)", console.log(o);
|
|
@@ -12076,7 +12065,7 @@ function NL(s) {
|
|
|
12076
12065
|
else
|
|
12077
12066
|
return !1;
|
|
12078
12067
|
} finally {
|
|
12079
|
-
|
|
12068
|
+
Wc = !1, Fn(Ji.Log, "Script changes applied (HMR)");
|
|
12080
12069
|
}
|
|
12081
12070
|
return !0;
|
|
12082
12071
|
}
|
|
@@ -12103,7 +12092,7 @@ class S extends L {
|
|
|
12103
12092
|
* @param processStart Whether to process the start callbacks if being activated
|
|
12104
12093
|
*/
|
|
12105
12094
|
static setActive(e, i, n = !0) {
|
|
12106
|
-
e && (
|
|
12095
|
+
e && (xd(e, i), yd(e), i && n && rv(ee.Current, e));
|
|
12107
12096
|
}
|
|
12108
12097
|
/**
|
|
12109
12098
|
* Checks if the GameObject itself is active (same as go.visible)
|
|
@@ -12111,7 +12100,7 @@ class S extends L {
|
|
|
12111
12100
|
* @returns True if the GameObject is active
|
|
12112
12101
|
*/
|
|
12113
12102
|
static isActiveSelf(e) {
|
|
12114
|
-
return
|
|
12103
|
+
return Jc(e);
|
|
12115
12104
|
}
|
|
12116
12105
|
/**
|
|
12117
12106
|
* Checks if the GameObject is active in the hierarchy (e.g. if any parent is invisible or not in the scene it will be false)
|
|
@@ -12191,7 +12180,7 @@ class S extends L {
|
|
|
12191
12180
|
console.warn("Can not add object to self", e);
|
|
12192
12181
|
return;
|
|
12193
12182
|
}
|
|
12194
|
-
n || (n = ee.Current), i.add(e),
|
|
12183
|
+
n || (n = ee.Current), i.add(e), xd(e, !0), yd(e), n ? S.foreachComponent(e, (o) => {
|
|
12195
12184
|
Mg(o, n), !o.__internalDidAwakeAndStart && n.new_script_start.includes(o) === !1 && n.new_script_start.push(o);
|
|
12196
12185
|
}, !0) : console.warn("Missing context");
|
|
12197
12186
|
}
|
|
@@ -12202,7 +12191,7 @@ class S extends L {
|
|
|
12202
12191
|
*/
|
|
12203
12192
|
static remove(e) {
|
|
12204
12193
|
var i;
|
|
12205
|
-
e && ((i = e.parent) == null || i.remove(e),
|
|
12194
|
+
e && ((i = e.parent) == null || i.remove(e), xd(e, !1), yd(e), S.foreachComponent(e, (n) => {
|
|
12206
12195
|
vP(n);
|
|
12207
12196
|
}, !0));
|
|
12208
12197
|
}
|
|
@@ -12335,7 +12324,7 @@ class S extends L {
|
|
|
12335
12324
|
* @returns Array of components
|
|
12336
12325
|
*/
|
|
12337
12326
|
static getComponentsInChildren(e, i, n = null) {
|
|
12338
|
-
return
|
|
12327
|
+
return Zc(e, i, n ?? void 0);
|
|
12339
12328
|
}
|
|
12340
12329
|
/**
|
|
12341
12330
|
* Gets a component of the specified type in the gameObject's parent hierarchy
|
|
@@ -12379,7 +12368,7 @@ class S extends L {
|
|
|
12379
12368
|
yield i[o];
|
|
12380
12369
|
}
|
|
12381
12370
|
}
|
|
12382
|
-
const
|
|
12371
|
+
const kc = class {
|
|
12383
12372
|
/** @internal */
|
|
12384
12373
|
constructor(t) {
|
|
12385
12374
|
r(this, "__context");
|
|
@@ -12740,19 +12729,19 @@ const Rc = class {
|
|
|
12740
12729
|
* Gets the forward direction vector (0,0,-1) of this component's GameObject in world space
|
|
12741
12730
|
*/
|
|
12742
12731
|
get forward() {
|
|
12743
|
-
return
|
|
12732
|
+
return kc._forward.set(0, 0, -1).applyQuaternion(this.worldQuaternion);
|
|
12744
12733
|
}
|
|
12745
12734
|
/**
|
|
12746
12735
|
* Gets the right direction vector (1,0,0) of this component's GameObject in world space
|
|
12747
12736
|
*/
|
|
12748
12737
|
get right() {
|
|
12749
|
-
return
|
|
12738
|
+
return kc._right.set(1, 0, 0).applyQuaternion(this.worldQuaternion);
|
|
12750
12739
|
}
|
|
12751
12740
|
/**
|
|
12752
12741
|
* Gets the up direction vector (0,1,0) of this component's GameObject in world space
|
|
12753
12742
|
*/
|
|
12754
12743
|
get up() {
|
|
12755
|
-
return
|
|
12744
|
+
return kc._up.set(0, 1, 0).applyQuaternion(this.worldQuaternion);
|
|
12756
12745
|
}
|
|
12757
12746
|
/**
|
|
12758
12747
|
* Registers an event listener for the specified event type
|
|
@@ -12787,7 +12776,7 @@ const Rc = class {
|
|
|
12787
12776
|
return !1;
|
|
12788
12777
|
}
|
|
12789
12778
|
};
|
|
12790
|
-
let I =
|
|
12779
|
+
let I = kc;
|
|
12791
12780
|
r(I, "_forward", new v()), r(I, "_right", new v()), r(I, "_up", new v());
|
|
12792
12781
|
const $L = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12793
12782
|
__proto__: null,
|
|
@@ -13147,22 +13136,22 @@ class dM {
|
|
|
13147
13136
|
this.mixer.removeEventListener("finished", this.onFinished);
|
|
13148
13137
|
}
|
|
13149
13138
|
}
|
|
13150
|
-
const
|
|
13139
|
+
const Pd = Symbol("objectIsAnimatedData");
|
|
13151
13140
|
function ib(s, t, e) {
|
|
13152
13141
|
if (!s)
|
|
13153
13142
|
return;
|
|
13154
|
-
if (s[
|
|
13143
|
+
if (s[Pd] === void 0) {
|
|
13155
13144
|
if (!e)
|
|
13156
13145
|
return;
|
|
13157
|
-
s[
|
|
13146
|
+
s[Pd] = /* @__PURE__ */ new Set();
|
|
13158
13147
|
}
|
|
13159
|
-
const i = s[
|
|
13148
|
+
const i = s[Pd];
|
|
13160
13149
|
e ? i.add(t) : i.has(t) && i.delete(t);
|
|
13161
13150
|
}
|
|
13162
13151
|
function uM(s) {
|
|
13163
13152
|
if (!s)
|
|
13164
13153
|
return !1;
|
|
13165
|
-
const t = s[
|
|
13154
|
+
const t = s[Pd];
|
|
13166
13155
|
return t !== void 0 && t.size > 0;
|
|
13167
13156
|
}
|
|
13168
13157
|
class VL {
|
|
@@ -13176,7 +13165,7 @@ class VL {
|
|
|
13176
13165
|
return !0;
|
|
13177
13166
|
}
|
|
13178
13167
|
}
|
|
13179
|
-
class
|
|
13168
|
+
class Wh {
|
|
13180
13169
|
constructor(t, e, i, n) {
|
|
13181
13170
|
/** The name of the animation */
|
|
13182
13171
|
r(this, "name");
|
|
@@ -13208,7 +13197,7 @@ function fM(s, t) {
|
|
|
13208
13197
|
};
|
|
13209
13198
|
}
|
|
13210
13199
|
var Yo = /* @__PURE__ */ ((s) => (s[s.If = 1] = "If", s[s.IfNot = 2] = "IfNot", s[s.Greater = 3] = "Greater", s[s.Less = 4] = "Less", s[s.Equals = 6] = "Equals", s[s.NotEqual = 7] = "NotEqual", s))(Yo || {}), Lv = /* @__PURE__ */ ((s) => (s[s.Float = 1] = "Float", s[s.Int = 3] = "Int", s[s.Bool = 4] = "Bool", s[s.Trigger = 9] = "Trigger", s))(Lv || {});
|
|
13211
|
-
const at = x("debuganimatorcontroller"),
|
|
13200
|
+
const at = x("debuganimatorcontroller"), Vh = x("debugrootmotion");
|
|
13212
13201
|
class vn {
|
|
13213
13202
|
constructor(t) {
|
|
13214
13203
|
r(this, "_speed", 1);
|
|
@@ -13468,7 +13457,7 @@ class vn {
|
|
|
13468
13457
|
if (!t)
|
|
13469
13458
|
return null;
|
|
13470
13459
|
const e = this._activeState.motion.clip.duration, i = e <= 0 ? 0 : Math.abs(t.time / e);
|
|
13471
|
-
return new
|
|
13460
|
+
return new Wh(this._activeState, i, e, this._speed);
|
|
13472
13461
|
}
|
|
13473
13462
|
/**
|
|
13474
13463
|
* Gets the animation action currently playing.
|
|
@@ -13624,7 +13613,7 @@ Exit Time: ` + d, a.hasExitTime);
|
|
|
13624
13613
|
i && this.setTimescale(i, e);
|
|
13625
13614
|
let n = !1;
|
|
13626
13615
|
if (e.motion.isLooping && i && (i.time >= i.getClip().duration ? (n = !0, i.reset(), i.time = 0, i.play()) : i.time <= 0 && i.timeScale < 0 && (n = !0, i.reset(), i.time = i.getClip().duration, i.play())), !n && e && !t && i && this.animator && e.behaviours) {
|
|
13627
|
-
const a = i == null ? void 0 : i.getClip().duration, l = i.time / a, c = new
|
|
13616
|
+
const a = i == null ? void 0 : i.getClip().duration, l = i.time / a, c = new Wh(this._activeState, l, a, this._speed);
|
|
13628
13617
|
for (const h of e.behaviours)
|
|
13629
13618
|
h.instance && ((o = h.instance.onStateUpdate) == null || o.call(h.instance, this.animator, c, 0));
|
|
13630
13619
|
}
|
|
@@ -13657,7 +13646,7 @@ Exit Time: ` + d, a.hasExitTime);
|
|
|
13657
13646
|
}
|
|
13658
13647
|
}
|
|
13659
13648
|
if ((d = this._activeState) != null && d.behaviours && this._activeState.motion.action) {
|
|
13660
|
-
const w = (u = this._activeState) == null ? void 0 : u.motion.clip.duration, C = this._activeState.motion.action.time / w, k = new
|
|
13649
|
+
const w = (u = this._activeState) == null ? void 0 : u.motion.clip.duration, C = this._activeState.motion.action.time / w, k = new Wh(this._activeState, C, w, this._speed);
|
|
13661
13650
|
for (const O of this._activeState.behaviours)
|
|
13662
13651
|
(m = (p = O.instance) == null ? void 0 : p.onStateExit) == null || m.call(O.instance, this.animator, k, n);
|
|
13663
13652
|
}
|
|
@@ -13675,7 +13664,7 @@ Exit Time: ` + d, a.hasExitTime);
|
|
|
13675
13664
|
c.isRunning() && c.stop(), c.reset(), c.enabled = !0, this.setTimescale(c, t);
|
|
13676
13665
|
const w = t.motion.clip.duration;
|
|
13677
13666
|
if (c.time = o ? 0 : i * w, c.timeScale < 0 && (c.time = w - c.time), c.clampWhenFinished = !0, c.setLoop(Kp, 0), e > 0 ? c.fadeIn(e) : c.weight = 1, c.play(), this.rootMotionHandler && this.rootMotionHandler.onStart(c), this._activeStates.includes(t) || this._activeStates.push(t), this._activeState.behaviours) {
|
|
13678
|
-
const C = new
|
|
13667
|
+
const C = new Wh(t, i, w, this._speed);
|
|
13679
13668
|
for (const k of this._activeState.behaviours)
|
|
13680
13669
|
(b = (_ = k.instance) == null ? void 0 : _.onStateEnter) == null || b.call(k.instance, this.animator, C, n);
|
|
13681
13670
|
}
|
|
@@ -13835,7 +13824,7 @@ const ht = class {
|
|
|
13835
13824
|
return;
|
|
13836
13825
|
ht.lastObjRotation[this.cacheId] || (ht.lastObjRotation[this.cacheId] = this.root.quaternion.clone());
|
|
13837
13826
|
const e = ht.lastObjRotation[this.cacheId];
|
|
13838
|
-
if (ht.spaceRotation[this.cacheId].copy(e),
|
|
13827
|
+
if (ht.spaceRotation[this.cacheId].copy(e), Vh) {
|
|
13839
13828
|
const i = new Bt().setFromQuaternion(e);
|
|
13840
13829
|
console.log("START", this.clip.name, $.toDegrees(i.y), this.root.position.z);
|
|
13841
13830
|
}
|
|
@@ -13846,17 +13835,17 @@ const ht = class {
|
|
|
13846
13835
|
handlePosition(t, e) {
|
|
13847
13836
|
if (e) {
|
|
13848
13837
|
const i = this.root;
|
|
13849
|
-
|
|
13838
|
+
Vh && i.add(new Mi()), ht.lastObjPosition[this.cacheId] || (ht.lastObjPosition[this.cacheId] = this.root.position.clone());
|
|
13850
13839
|
const n = new v(), o = new v();
|
|
13851
13840
|
this.positionWrapper = new nb(e, (a, l) => {
|
|
13852
13841
|
const c = this.action.getEffectiveWeight();
|
|
13853
|
-
return
|
|
13842
|
+
return Vh && i.position.length() > 8 && i.position.set(0, i.position.y, 0), a > this._prevTime && (n.set(l[0], l[1], l[2]), n.sub(o), n.multiplyScalar(c), n.applyQuaternion(this.getClipRotationOffset()), n.applyQuaternion(i.quaternion), this.positionChange.copy(n)), o.fromArray(l), this._prevTime = a, l[0] = 0, l[1] = 0, l[2] = 0, l;
|
|
13854
13843
|
});
|
|
13855
13844
|
}
|
|
13856
13845
|
}
|
|
13857
13846
|
handleRotation(t, e) {
|
|
13858
13847
|
if (e) {
|
|
13859
|
-
if (
|
|
13848
|
+
if (Vh) {
|
|
13860
13849
|
const a = e.values, l = new Bt().setFromQuaternion(new W(a[0], a[1], a[2], a[3]));
|
|
13861
13850
|
console.log(t.name, e.name, "FIRST ROTATION IN TRACK", $.toDegrees(l.y));
|
|
13862
13851
|
const c = e.values.length - 4, h = new W().set(a[c], a[c + 1], a[c + 2], a[c + 3]), d = new Bt().setFromQuaternion(h);
|
|
@@ -14256,12 +14245,12 @@ const sb = Symbol("previous-visibility"), ya = class extends Is {
|
|
|
14256
14245
|
};
|
|
14257
14246
|
let gr = ya;
|
|
14258
14247
|
r(gr, "_userSet", /* @__PURE__ */ new Set());
|
|
14259
|
-
var _M = Object.defineProperty, bM = Object.getOwnPropertyDescriptor,
|
|
14248
|
+
var _M = Object.defineProperty, bM = Object.getOwnPropertyDescriptor, th = (s, t, e, i) => {
|
|
14260
14249
|
for (var n = i > 1 ? void 0 : i ? bM(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
14261
14250
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
14262
14251
|
return i && n && _M(t, e, n), n;
|
|
14263
14252
|
};
|
|
14264
|
-
const
|
|
14253
|
+
const Hh = x("debuggroundprojection");
|
|
14265
14254
|
class Us extends I {
|
|
14266
14255
|
constructor() {
|
|
14267
14256
|
super(...arguments);
|
|
@@ -14304,7 +14293,7 @@ class Us extends I {
|
|
|
14304
14293
|
/** @internal */
|
|
14305
14294
|
onEnable() {
|
|
14306
14295
|
this.context.time.frameCount > 0 && this.applyOnAwake && this.updateAndCreate(), this._watcher || (this._watcher = new yo(this.context.scene, "background"), this._watcher.subscribeWrite((e) => {
|
|
14307
|
-
|
|
14296
|
+
Hh && console.log("Background changed", this.context.scene.background), this._needsTextureUpdate = !0;
|
|
14308
14297
|
}));
|
|
14309
14298
|
}
|
|
14310
14299
|
/** @internal */
|
|
@@ -14351,7 +14340,7 @@ class Us extends I {
|
|
|
14351
14340
|
let i = !0;
|
|
14352
14341
|
const n = 0, o = e !== this._lastBackground || this._height !== this._lastHeight || this._radius !== this._lastRadius;
|
|
14353
14342
|
if (!this._projection || o) {
|
|
14354
|
-
|
|
14343
|
+
Hh && console.log("Create/Update Ground Projection", e.name), (u = this._projection) == null || u.removeFromParent();
|
|
14355
14344
|
try {
|
|
14356
14345
|
this._projection = new Da(e, this._height, this._radius, 64);
|
|
14357
14346
|
} catch (p) {
|
|
@@ -14370,7 +14359,7 @@ class Us extends I {
|
|
|
14370
14359
|
const y = Ke(this.gameObject).x;
|
|
14371
14360
|
g.y = m + this._height * y - n, g.z = p.min.z + (p.max.z - p.min.z) * 0.5, _t(this._projection, g);
|
|
14372
14361
|
}
|
|
14373
|
-
|
|
14362
|
+
Hh && V.DrawWireBox3(p, 65280, 5);
|
|
14374
14363
|
}
|
|
14375
14364
|
this.context.scene.backgroundBlurriness > 1e-3 && this._needsTextureUpdate && this.updateBlurriness(e, this.context.scene.backgroundBlurriness), this._lastBackground = e, this._lastHeight = this._height, this._lastRadius = this._radius, this._needsTextureUpdate = !1;
|
|
14376
14365
|
}
|
|
@@ -14381,7 +14370,7 @@ class Us extends I {
|
|
|
14381
14370
|
return;
|
|
14382
14371
|
} else
|
|
14383
14372
|
return;
|
|
14384
|
-
this._needsTextureUpdate = !1,
|
|
14373
|
+
this._needsTextureUpdate = !1, Hh && console.log("Update Blurriness", i), this._blurrynessShader ?? (this._blurrynessShader = new wn({
|
|
14385
14374
|
name: "GroundProjectionBlurriness",
|
|
14386
14375
|
uniforms: {
|
|
14387
14376
|
map: { value: e },
|
|
@@ -14396,19 +14385,19 @@ class Us extends I {
|
|
|
14396
14385
|
this._projection.material.transparent = (((o = this.context.xr) == null ? void 0 : o.isAR) === !0 && this.arBlending > 1e-6) ?? !1, this._projection.material.transparent ? this._blurrynessShader.uniforms.blending.value = this.arBlending : this._blurrynessShader.uniforms.blending.value = 0, this.context.isInPassThrough ? this._blurrynessShader.uniforms.alphaFactor.value = 0.95 : this._blurrynessShader.uniforms.alphaFactor.value = 1, n !== this._projection.material.transparent && (this._projection.material.needsUpdate = !0), this._projection.material.map = mn.copyTexture(e, this._blurrynessShader), this._projection.material.depthTest = !0, this._projection.material.depthWrite = !1;
|
|
14397
14386
|
}
|
|
14398
14387
|
}
|
|
14399
|
-
|
|
14388
|
+
th([
|
|
14400
14389
|
f()
|
|
14401
14390
|
], Us.prototype, "applyOnAwake", 2);
|
|
14402
|
-
|
|
14391
|
+
th([
|
|
14403
14392
|
f()
|
|
14404
14393
|
], Us.prototype, "autoFit", 2);
|
|
14405
|
-
|
|
14394
|
+
th([
|
|
14406
14395
|
f()
|
|
14407
14396
|
], Us.prototype, "radius", 1);
|
|
14408
|
-
|
|
14397
|
+
th([
|
|
14409
14398
|
f()
|
|
14410
14399
|
], Us.prototype, "height", 1);
|
|
14411
|
-
|
|
14400
|
+
th([
|
|
14412
14401
|
f()
|
|
14413
14402
|
], Us.prototype, "arBlending", 1);
|
|
14414
14403
|
const vM = `
|
|
@@ -14839,7 +14828,7 @@ class TM {
|
|
|
14839
14828
|
}
|
|
14840
14829
|
}
|
|
14841
14830
|
var Bp;
|
|
14842
|
-
const
|
|
14831
|
+
const Od = (Bp = class extends I {
|
|
14843
14832
|
constructor() {
|
|
14844
14833
|
super(...arguments);
|
|
14845
14834
|
r(this, "autoMass", !0);
|
|
@@ -15066,12 +15055,12 @@ const Pd = (Bp = class extends I {
|
|
|
15066
15055
|
}
|
|
15067
15056
|
captureVelocity() {
|
|
15068
15057
|
const t = this.gameObject.matrixWorld;
|
|
15069
|
-
|
|
15070
|
-
const e =
|
|
15071
|
-
this._lastPosition.copy(
|
|
15058
|
+
Od.tempPosition.setFromMatrixPosition(t);
|
|
15059
|
+
const e = Od.tempPosition.sub(this._lastPosition);
|
|
15060
|
+
this._lastPosition.copy(Od.tempPosition), this._smoothedVelocity.lerp(e, this.context.time.deltaTime / 0.1);
|
|
15072
15061
|
}
|
|
15073
15062
|
}, r(Bp, "tempPosition", new v()), Bp);
|
|
15074
|
-
let _e =
|
|
15063
|
+
let _e = Od;
|
|
15075
15064
|
Ai([
|
|
15076
15065
|
$t()
|
|
15077
15066
|
], _e.prototype, "autoMass", 2);
|
|
@@ -15121,8 +15110,8 @@ Ai([
|
|
|
15121
15110
|
], _e.prototype, "dominanceGroup", 2);
|
|
15122
15111
|
new v();
|
|
15123
15112
|
new v();
|
|
15124
|
-
const to = x("debugsync"),
|
|
15125
|
-
Q0(
|
|
15113
|
+
const to = x("debugsync"), Vc = "STRS";
|
|
15114
|
+
Q0(Vc, vs.getRootAsSyncedTransformModel);
|
|
15126
15115
|
const kn = new pg();
|
|
15127
15116
|
function jv(s, t, e = !0) {
|
|
15128
15117
|
kn.clear();
|
|
@@ -15131,13 +15120,13 @@ function jv(s, t, e = !0) {
|
|
|
15131
15120
|
const n = t.worldPosition, o = t.worldEuler, a = t.gameObject.scale;
|
|
15132
15121
|
vs.addTransform(kn, Dv.createTransform(kn, n.x, n.y, n.z, o.x, o.y, o.z, a.x, a.y, a.z));
|
|
15133
15122
|
const l = vs.endSyncedTransformModel(kn);
|
|
15134
|
-
return kn.finish(l,
|
|
15123
|
+
return kn.finish(l, Vc), kn.asUint8Array();
|
|
15135
15124
|
}
|
|
15136
|
-
let km = 0,
|
|
15125
|
+
let km = 0, _c = 0;
|
|
15137
15126
|
OM((s) => {
|
|
15138
15127
|
var i;
|
|
15139
15128
|
const e = ((i = s.connection.currentServerUrl) == null ? void 0 : i.includes("glitch")) ? 10 : 40;
|
|
15140
|
-
|
|
15129
|
+
_c = Math.floor(km / e), km = 0, to && _c > 0 && console.log("Sync Transform Fast Interval", _c);
|
|
15141
15130
|
});
|
|
15142
15131
|
class js extends I {
|
|
15143
15132
|
constructor() {
|
|
@@ -15205,11 +15194,11 @@ class js extends I {
|
|
|
15205
15194
|
}
|
|
15206
15195
|
/** @internal */
|
|
15207
15196
|
awake() {
|
|
15208
|
-
to && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new v(), this._targetRotation = new W(), this.lastPosition = new v(), this.lastRotation = new W(), this.lastScale = new v(), this.rb = S.getComponentInChildren(this.gameObject, _e), this.rb && (this._wasKinematic = this.rb.isKinematic), this.receivedUpdate = !0, this._model = new Y0(this.context.connection, this.guid), this.context.connection.isConnected && this.tryGetLastState(), this.joinedRoomCallback = this.tryGetLastState.bind(this), this.context.connection.beginListen(ne.JoinedRoom, this.joinedRoomCallback), this.receivedDataCallback = this.onReceivedData.bind(this), this.context.connection.beginListenBinary(
|
|
15197
|
+
to && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new v(), this._targetRotation = new W(), this.lastPosition = new v(), this.lastRotation = new W(), this.lastScale = new v(), this.rb = S.getComponentInChildren(this.gameObject, _e), this.rb && (this._wasKinematic = this.rb.isKinematic), this.receivedUpdate = !0, this._model = new Y0(this.context.connection, this.guid), this.context.connection.isConnected && this.tryGetLastState(), this.joinedRoomCallback = this.tryGetLastState.bind(this), this.context.connection.beginListen(ne.JoinedRoom, this.joinedRoomCallback), this.receivedDataCallback = this.onReceivedData.bind(this), this.context.connection.beginListenBinary(Vc, this.receivedDataCallback);
|
|
15209
15198
|
}
|
|
15210
15199
|
/** @internal */
|
|
15211
15200
|
onDestroy() {
|
|
15212
|
-
this.syncDestroy && cv(this.guid, this.context.connection), this._model = null, this.context.connection.stopListen(ne.JoinedRoom, this.joinedRoomCallback), this.context.connection.stopListenBinary(
|
|
15201
|
+
this.syncDestroy && cv(this.guid, this.context.connection), this._model = null, this.context.connection.stopListen(ne.JoinedRoom, this.joinedRoomCallback), this.context.connection.stopListenBinary(Vc, this.receivedDataCallback);
|
|
15213
15202
|
}
|
|
15214
15203
|
/**
|
|
15215
15204
|
* Attempts to retrieve and apply the last known network state for this transform
|
|
@@ -15289,7 +15278,7 @@ class js extends I {
|
|
|
15289
15278
|
this.rb && this.overridePhysics && this._wasKinematic !== void 0 && (to && console.log("reset kinematic", this.rb.name, this._wasKinematic), this.rb.isKinematic = this._wasKinematic);
|
|
15290
15279
|
const o = 10, a = this.rb || this.fastMode;
|
|
15291
15280
|
if (this._needsUpdate && (this.context.time.frameCount % o === 0 || a)) {
|
|
15292
|
-
if (km++, a &&
|
|
15281
|
+
if (km++, a && _c > 0 && this.context.time.frameCount % _c !== 0)
|
|
15293
15282
|
return;
|
|
15294
15283
|
to && console.debug("[SyncedTransform] Send update", this.context.connection.connectionId, this.guid, this.gameObject.name, this.gameObject.guid), this._needsUpdate = !1;
|
|
15295
15284
|
const l = jv(this.guid, this, !!a);
|
|
@@ -16362,7 +16351,7 @@ var GM = Object.defineProperty, qM = Object.getOwnPropertyDescriptor, ze = (s, t
|
|
|
16362
16351
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
16363
16352
|
return i && n && GM(t, e, n), n;
|
|
16364
16353
|
};
|
|
16365
|
-
const Wi = x("debugorbit"), Zf = x("freecam"), Rl = x("debugcamerafit"),
|
|
16354
|
+
const Wi = x("debugorbit"), Zf = x("freecam"), Rl = x("debugcamerafit"), Gh = x("smoothcam"), XM = { LEFT: "", UP: "", RIGHT: "", BOTTOM: "" };
|
|
16366
16355
|
let Jf;
|
|
16367
16356
|
class tu extends CustomEvent {
|
|
16368
16357
|
constructor(t, e) {
|
|
@@ -16631,9 +16620,9 @@ class we extends I {
|
|
|
16631
16620
|
}
|
|
16632
16621
|
}
|
|
16633
16622
|
if (this._controls) {
|
|
16634
|
-
if (this.debugLog && (this._controls.domElement = this.context.renderer.domElement), this._controls.enabled = !this._shouldDisable && this._camera === this.context.mainCameraComponent && !this.context.isInXR && !this._activePointerEvents.some((l) => l.used), this._controls.keys = this.enableKeys ? Jf : XM, this._controls.autoRotate = this.autoRotate, this._controls.autoRotateSpeed = this.autoRotateSpeed, this._controls.enableZoom = this.enableZoom, this._controls.zoomSpeed = this.zoomSpeed, this._controls.zoomToCursor = this.zoomToCursor, this._controls.enableDamping = this.enableDamping, this._controls.dampingFactor = this.dampingFactor, this._controls.enablePan = this.enablePan, this._controls.enableRotate = this.enableRotate, this._controls.minAzimuthAngle = this.minAzimuthAngle, this._controls.maxAzimuthAngle = this.maxAzimuthAngle, this._controls.minPolarAngle = this.minPolarAngle, this._controls.maxPolarAngle = this.maxPolarAngle, Zf || (((o = (n = this._camera) == null ? void 0 : n.threeCamera) == null ? void 0 : o.type) === "PerspectiveCamera" ? (this._controls.minDistance = this.minZoom, this._controls.maxDistance = this.maxZoom, this._controls.minZoom = 0, this._controls.maxZoom = 1 / 0) : (this._controls.minDistance = 0, this._controls.maxDistance = 1 / 0, this._controls.minZoom = this.minZoom, this._controls.maxZoom = this.maxZoom)), typeof
|
|
16623
|
+
if (this.debugLog && (this._controls.domElement = this.context.renderer.domElement), this._controls.enabled = !this._shouldDisable && this._camera === this.context.mainCameraComponent && !this.context.isInXR && !this._activePointerEvents.some((l) => l.used), this._controls.keys = this.enableKeys ? Jf : XM, this._controls.autoRotate = this.autoRotate, this._controls.autoRotateSpeed = this.autoRotateSpeed, this._controls.enableZoom = this.enableZoom, this._controls.zoomSpeed = this.zoomSpeed, this._controls.zoomToCursor = this.zoomToCursor, this._controls.enableDamping = this.enableDamping, this._controls.dampingFactor = this.dampingFactor, this._controls.enablePan = this.enablePan, this._controls.enableRotate = this.enableRotate, this._controls.minAzimuthAngle = this.minAzimuthAngle, this._controls.maxAzimuthAngle = this.maxAzimuthAngle, this._controls.minPolarAngle = this.minPolarAngle, this._controls.maxPolarAngle = this.maxPolarAngle, Zf || (((o = (n = this._camera) == null ? void 0 : n.threeCamera) == null ? void 0 : o.type) === "PerspectiveCamera" ? (this._controls.minDistance = this.minZoom, this._controls.maxDistance = this.maxZoom, this._controls.minZoom = 0, this._controls.maxZoom = 1 / 0) : (this._controls.minDistance = 0, this._controls.maxDistance = 1 / 0, this._controls.minZoom = this.minZoom, this._controls.maxZoom = this.maxZoom)), typeof Gh == "number" || Gh === !0) {
|
|
16635
16624
|
this._controls.enableDamping = !0;
|
|
16636
|
-
const l = typeof
|
|
16625
|
+
const l = typeof Gh == "number" ? Gh : 0.99;
|
|
16637
16626
|
this._controls.dampingFactor = Math.max(1e-3, 1 - Math.min(1, l));
|
|
16638
16627
|
}
|
|
16639
16628
|
this.allowInterrupt || (this._lookTargetLerpActive && (this._controls.enablePan = !1), this._cameraLerpActive && (this._controls.enableRotate = !1, this._controls.autoRotate = !1), (this._lookTargetLerpActive || this._cameraLerpActive) && (this._controls.enableZoom = !1)), this.context.isInXR || (!Zf && ((a = this.lookAtConstraint) != null && a.locked) && this.setLookTargetFromConstraint(0, this.lookAtConstraint01), this._controls.update(this.context.time.deltaTime), Wi && V.DrawWireSphere(this._controls.target, 0.1, 65280));
|
|
@@ -16885,8 +16874,8 @@ var QM = Object.defineProperty, YM = Object.getOwnPropertyDescriptor, ni = (s, t
|
|
|
16885
16874
|
return i && n && QM(t, e, n), n;
|
|
16886
16875
|
}, br = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.Skybox = 1] = "Skybox", s[s.SolidColor = 2] = "SolidColor", s[s.Uninitialized = 4] = "Uninitialized", s))(br || {});
|
|
16887
16876
|
const no = x("debugcam"), rb = x("debugscreenpointtoray");
|
|
16888
|
-
var
|
|
16889
|
-
const Yl = (
|
|
16877
|
+
var ld;
|
|
16878
|
+
const Yl = (ld = class extends I {
|
|
16890
16879
|
constructor() {
|
|
16891
16880
|
super(...arguments);
|
|
16892
16881
|
r(this, "_nearClipPlane", 0.1);
|
|
@@ -17214,7 +17203,7 @@ const Yl = (ad = class extends I {
|
|
|
17214
17203
|
let n = i === "additive" || i === "alpha-blend";
|
|
17215
17204
|
return t.isInAR && i === "opaque" && ((a = navigator.userAgent) != null && a.includes("OculusBrowser") || (l = navigator.userAgent) != null && l.includes("Mozilla") && ((c = navigator.userAgent) != null && c.includes("Mobile WebXRViewer/v2"))) && (n = !0), e._transparent = n, n;
|
|
17216
17205
|
}
|
|
17217
|
-
}, r(
|
|
17206
|
+
}, r(ld, "_origin", new v()), r(ld, "_direction", new v()), ld);
|
|
17218
17207
|
let Pe = Yl;
|
|
17219
17208
|
ni([
|
|
17220
17209
|
f()
|
|
@@ -18685,22 +18674,22 @@ const $v = (Fp = class extends I {
|
|
|
18685
18674
|
}
|
|
18686
18675
|
}
|
|
18687
18676
|
}, r(Fp, "forward", new v(0, 0, 1)), Fp);
|
|
18688
|
-
let
|
|
18677
|
+
let ih = $v;
|
|
18689
18678
|
Hg([
|
|
18690
18679
|
f(L)
|
|
18691
|
-
],
|
|
18680
|
+
], ih.prototype, "head", 2);
|
|
18692
18681
|
Hg([
|
|
18693
18682
|
f(L)
|
|
18694
|
-
],
|
|
18683
|
+
], ih.prototype, "eyes", 2);
|
|
18695
18684
|
Hg([
|
|
18696
18685
|
f(L)
|
|
18697
|
-
],
|
|
18686
|
+
], ih.prototype, "target", 2);
|
|
18698
18687
|
var OR = Object.defineProperty, MR = Object.getOwnPropertyDescriptor, Gg = (s, t, e, i) => {
|
|
18699
18688
|
for (var n = i > 1 ? void 0 : i ? MR(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
18700
18689
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
18701
18690
|
return i && n && OR(t, e, n), n;
|
|
18702
18691
|
};
|
|
18703
|
-
class
|
|
18692
|
+
class nh extends I {
|
|
18704
18693
|
constructor() {
|
|
18705
18694
|
super(...arguments);
|
|
18706
18695
|
r(this, "length", 1);
|
|
@@ -18713,7 +18702,7 @@ class ih extends I {
|
|
|
18713
18702
|
* If marked as a gizmo, it will only be shown when gizmos are enabled in the global parameters.
|
|
18714
18703
|
*/
|
|
18715
18704
|
onEnable() {
|
|
18716
|
-
if (this.isGizmo && !
|
|
18705
|
+
if (this.isGizmo && !Kc)
|
|
18717
18706
|
return;
|
|
18718
18707
|
this._axes || (this._axes = new Mi(this.length)), this._axes.layers.disableAll(), this._axes.layers.set(this.layer), this.gameObject.add(this._axes);
|
|
18719
18708
|
const e = this._axes.material;
|
|
@@ -18728,13 +18717,13 @@ class ih extends I {
|
|
|
18728
18717
|
}
|
|
18729
18718
|
Gg([
|
|
18730
18719
|
f()
|
|
18731
|
-
],
|
|
18720
|
+
], nh.prototype, "length", 2);
|
|
18732
18721
|
Gg([
|
|
18733
18722
|
f()
|
|
18734
|
-
],
|
|
18723
|
+
], nh.prototype, "depthTest", 2);
|
|
18735
18724
|
Gg([
|
|
18736
18725
|
f()
|
|
18737
|
-
],
|
|
18726
|
+
], nh.prototype, "isGizmo", 2);
|
|
18738
18727
|
class Wv extends I {
|
|
18739
18728
|
constructor() {
|
|
18740
18729
|
super(...arguments);
|
|
@@ -18909,7 +18898,7 @@ fi([
|
|
|
18909
18898
|
fi([
|
|
18910
18899
|
f()
|
|
18911
18900
|
], Ei.prototype, "filter", 2);
|
|
18912
|
-
class
|
|
18901
|
+
class sh extends Ei {
|
|
18913
18902
|
constructor() {
|
|
18914
18903
|
super(...arguments);
|
|
18915
18904
|
r(this, "radius", 0.5);
|
|
@@ -18938,10 +18927,10 @@ class nh extends Ei {
|
|
|
18938
18927
|
fi([
|
|
18939
18928
|
$t(),
|
|
18940
18929
|
f()
|
|
18941
|
-
],
|
|
18930
|
+
], sh.prototype, "radius", 2);
|
|
18942
18931
|
fi([
|
|
18943
18932
|
f(v)
|
|
18944
|
-
],
|
|
18933
|
+
], sh.prototype, "center", 2);
|
|
18945
18934
|
const Vv = class extends Ei {
|
|
18946
18935
|
constructor() {
|
|
18947
18936
|
super(...arguments);
|
|
@@ -18992,14 +18981,14 @@ const Vv = class extends Ei {
|
|
|
18992
18981
|
e.position.copy(i), e.quaternion.copy(n), e.scale.copy(o), e.parent = a, (t == null ? void 0 : t.debug) === !0 && V.DrawWireBox3(l, 16768256, 20), this.size = l.getSize(new v()) || new v(1, 1, 1), this.center = l.getCenter(new v()) || new v(0, 0, 0), this.size.length() <= 0 && this.size.set(0.01, 0.01, 0.01);
|
|
18993
18982
|
}
|
|
18994
18983
|
};
|
|
18995
|
-
let
|
|
18984
|
+
let oh = Vv;
|
|
18996
18985
|
fi([
|
|
18997
18986
|
$t(),
|
|
18998
18987
|
f(v)
|
|
18999
|
-
],
|
|
18988
|
+
], oh.prototype, "size", 2);
|
|
19000
18989
|
fi([
|
|
19001
18990
|
f(v)
|
|
19002
|
-
],
|
|
18991
|
+
], oh.prototype, "center", 2);
|
|
19003
18992
|
class jr extends Ei {
|
|
19004
18993
|
constructor() {
|
|
19005
18994
|
super(...arguments);
|
|
@@ -19247,6 +19236,12 @@ const Kl = (zp = class extends I {
|
|
|
19247
19236
|
* The minimum size of the shadows box
|
|
19248
19237
|
*/
|
|
19249
19238
|
r(this, "minSize");
|
|
19239
|
+
/**
|
|
19240
|
+
* When enabled the shadows will not be updated automatically. Use `needsUpdate()` to update the shadows manually.
|
|
19241
|
+
* This is useful when you want to update the shadows only when the scene changes.
|
|
19242
|
+
*/
|
|
19243
|
+
r(this, "manualUpdate", !1);
|
|
19244
|
+
r(this, "_needsUpdate", !1);
|
|
19250
19245
|
/** All shadow objects are parented to this object.
|
|
19251
19246
|
* The gameObject itself should not be transformed because we want the ContactShadows object e.g. also have a GroundProjectedEnv component
|
|
19252
19247
|
* in which case ContactShadows scale would affect the projection
|
|
@@ -19283,6 +19278,15 @@ const Kl = (zp = class extends I {
|
|
|
19283
19278
|
}
|
|
19284
19279
|
return t.scene.add(e.gameObject), e.fitShadows(), e;
|
|
19285
19280
|
}
|
|
19281
|
+
/**
|
|
19282
|
+
* Call this method to update the shadows manually. The update will be done in the next frame.
|
|
19283
|
+
*/
|
|
19284
|
+
set needsUpdate(t) {
|
|
19285
|
+
this._needsUpdate = t;
|
|
19286
|
+
}
|
|
19287
|
+
get needsUpdate() {
|
|
19288
|
+
return this._needsUpdate;
|
|
19289
|
+
}
|
|
19286
19290
|
/**
|
|
19287
19291
|
* Call to fit the shadows to the scene.
|
|
19288
19292
|
*/
|
|
@@ -19329,6 +19333,9 @@ const Kl = (zp = class extends I {
|
|
|
19329
19333
|
`);
|
|
19330
19334
|
}, this.depthMaterial.depthTest = !1, this.depthMaterial.depthWrite = !1, this.horizontalBlurMaterial = new wn(iS), this.horizontalBlurMaterial.depthTest = !1, this.verticalBlurMaterial = new wn(nS), this.verticalBlurMaterial.depthTest = !1, this.shadowGroup.visible = !1, this.autoFit ? this.fitShadows() : this.applyMinSize();
|
|
19331
19335
|
}
|
|
19336
|
+
onEnable() {
|
|
19337
|
+
this._needsUpdate = !0;
|
|
19338
|
+
}
|
|
19332
19339
|
/** @internal */
|
|
19333
19340
|
onDestroy() {
|
|
19334
19341
|
var e, i, n, o, a, l, c, h;
|
|
@@ -19336,7 +19343,9 @@ const Kl = (zp = class extends I {
|
|
|
19336
19343
|
}
|
|
19337
19344
|
/** @internal */
|
|
19338
19345
|
onBeforeRender(t) {
|
|
19339
|
-
if (
|
|
19346
|
+
if (this.manualUpdate && !this._needsUpdate)
|
|
19347
|
+
return;
|
|
19348
|
+
if (this._needsUpdate = !1, !this.renderTarget || !this.renderTargetBlur || !this.depthMaterial || !this.shadowCamera || !this.blurPlane || !this.shadowGroup || !this.plane || !this.horizontalBlurMaterial || !this.verticalBlurMaterial) {
|
|
19340
19349
|
kl && console.error("ContactShadows: not initialized yet");
|
|
19341
19350
|
return;
|
|
19342
19351
|
}
|
|
@@ -19426,16 +19435,16 @@ class Qu extends I {
|
|
|
19426
19435
|
}
|
|
19427
19436
|
class Gv extends I {
|
|
19428
19437
|
}
|
|
19429
|
-
const hb = x("debugdeletable"),
|
|
19438
|
+
const hb = x("debugdeletable"), Tc = class extends wi {
|
|
19430
19439
|
onEnable() {
|
|
19431
|
-
|
|
19440
|
+
Tc._instances.push(this);
|
|
19432
19441
|
}
|
|
19433
19442
|
onDisable() {
|
|
19434
|
-
const t =
|
|
19435
|
-
t >= 0 &&
|
|
19443
|
+
const t = Tc._instances.indexOf(this);
|
|
19444
|
+
t >= 0 && Tc._instances.splice(t, 1);
|
|
19436
19445
|
}
|
|
19437
19446
|
};
|
|
19438
|
-
let Ra =
|
|
19447
|
+
let Ra = Tc;
|
|
19439
19448
|
r(Ra, "_instances", []);
|
|
19440
19449
|
class qv extends I {
|
|
19441
19450
|
update() {
|
|
@@ -20082,7 +20091,7 @@ const Iy = class {
|
|
|
20082
20091
|
r(this, "_requireUpdateGroundPlane", !0);
|
|
20083
20092
|
r(this, "_didDragOnGroundPlaneLastFrame", !1);
|
|
20084
20093
|
this._camera = t;
|
|
20085
|
-
const e = new
|
|
20094
|
+
const e = new Lc(Iy.geometry), i = e.material;
|
|
20086
20095
|
i.color = new le(0.4, 0.4, 0.4), e.layers.set(2), e.name = "line", e.scale.y = 1, this._groundLine = e;
|
|
20087
20096
|
const n = new xu(0.5, 22, 22), o = new Me({ color: i.color }), a = new q(n, o);
|
|
20088
20097
|
a.visible = !1, a.layers.set(2), this._groundMarker = a;
|
|
@@ -20448,7 +20457,7 @@ class Ao extends I {
|
|
|
20448
20457
|
break;
|
|
20449
20458
|
}
|
|
20450
20459
|
}
|
|
20451
|
-
|
|
20460
|
+
$c.assignAnimationsFromFile(o, {
|
|
20452
20461
|
createAnimationComponent: (p) => tn(p, ti)
|
|
20453
20462
|
});
|
|
20454
20463
|
const h = new GR({
|
|
@@ -20654,16 +20663,16 @@ const Qv = class extends I {
|
|
|
20654
20663
|
return console.assert(e !== this.object, "Duplicated object is original"), this.object.visible = !1, this._startPosition && this.object.position.clone().copy(this._startPosition), this._startQuaternion && this.object.quaternion.clone().copy(this._startQuaternion), e;
|
|
20655
20664
|
}
|
|
20656
20665
|
};
|
|
20657
|
-
let
|
|
20666
|
+
let rh = Qv;
|
|
20658
20667
|
Xg([
|
|
20659
20668
|
f(L)
|
|
20660
|
-
],
|
|
20669
|
+
], rh.prototype, "parent", 2);
|
|
20661
20670
|
Xg([
|
|
20662
20671
|
f(L)
|
|
20663
|
-
],
|
|
20672
|
+
], rh.prototype, "object", 2);
|
|
20664
20673
|
Xg([
|
|
20665
20674
|
f()
|
|
20666
|
-
],
|
|
20675
|
+
], rh.prototype, "limitCount", 2);
|
|
20667
20676
|
var cs = /* @__PURE__ */ ((s) => (s[s.PointerEnter = 0] = "PointerEnter", s[s.PointerExit = 1] = "PointerExit", s[s.PointerDown = 2] = "PointerDown", s[s.PointerUp = 3] = "PointerUp", s[s.PointerClick = 4] = "PointerClick", s[s.Drag = 5] = "Drag", s[s.Drop = 6] = "Drop", s[s.Scroll = 7] = "Scroll", s[s.UpdateSelected = 8] = "UpdateSelected", s[s.Select = 9] = "Select", s[s.Deselect = 10] = "Deselect", s[s.Move = 11] = "Move", s[s.InitializePotentialDrag = 12] = "InitializePotentialDrag", s[s.BeginDrag = 13] = "BeginDrag", s[s.EndDrag = 14] = "EndDrag", s[s.Submit = 15] = "Submit", s[s.Cancel = 16] = "Cancel", s))(cs || {}), KR = Object.defineProperty, ZR = Object.getOwnPropertyDescriptor, Qg = (s, t, e, i) => {
|
|
20668
20677
|
for (var n = i > 1 ? void 0 : i ? ZR(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
20669
20678
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
@@ -20765,7 +20774,7 @@ class ek {
|
|
|
20765
20774
|
}
|
|
20766
20775
|
typeof window < "u" && window.addEventListener("unhandledrejection", (s) => {
|
|
20767
20776
|
});
|
|
20768
|
-
const os = gt,
|
|
20777
|
+
const os = gt, qh = "$___Export_Components", tk = "NEEDLE_components";
|
|
20769
20778
|
var UI;
|
|
20770
20779
|
class ik {
|
|
20771
20780
|
constructor() {
|
|
@@ -20819,13 +20828,13 @@ class Zv {
|
|
|
20819
20828
|
serializeUserData(t, e) {
|
|
20820
20829
|
var n;
|
|
20821
20830
|
const i = (n = t.userData) == null ? void 0 : n.components;
|
|
20822
|
-
return !i || i.length <= 0 ? !1 : (delete t.userData.components, t[
|
|
20831
|
+
return !i || i.length <= 0 ? !1 : (delete t.userData.components, t[qh] = i, !0);
|
|
20823
20832
|
}
|
|
20824
20833
|
afterSerializeUserData(t, e) {
|
|
20825
|
-
if (t.type === "Scene" && os && console.log("DONE", JSON.stringify(e)), t[
|
|
20834
|
+
if (t.type === "Scene" && os && console.log("DONE", JSON.stringify(e)), t[qh] === void 0)
|
|
20826
20835
|
return;
|
|
20827
|
-
const i = t[
|
|
20828
|
-
delete t[
|
|
20836
|
+
const i = t[qh];
|
|
20837
|
+
delete t[qh], i !== null && (t.userData.components = i);
|
|
20829
20838
|
}
|
|
20830
20839
|
writeNode(t, e) {
|
|
20831
20840
|
const i = this.writer.json.nodes.length;
|
|
@@ -21017,7 +21026,7 @@ pe.registerCallback(me.ContextCreated, (s) => {
|
|
|
21017
21026
|
class Im extends I {
|
|
21018
21027
|
constructor() {
|
|
21019
21028
|
super(...arguments);
|
|
21020
|
-
r(this, "ambientMode",
|
|
21029
|
+
r(this, "ambientMode", mc.Skybox);
|
|
21021
21030
|
r(this, "ambientLight");
|
|
21022
21031
|
r(this, "ambientTrilight");
|
|
21023
21032
|
r(this, "ambientIntensity", 1);
|
|
@@ -21054,13 +21063,13 @@ class Im extends I {
|
|
|
21054
21063
|
return 2.2 * $.lerp(0, 1.33, i);
|
|
21055
21064
|
}
|
|
21056
21065
|
onEnable() {
|
|
21057
|
-
if (la && console.warn("💡🟡 >>> Enable lighting", this.sourceId, this.enabled, this), this.ambientMode ==
|
|
21066
|
+
if (la && console.warn("💡🟡 >>> Enable lighting", this.sourceId, this.enabled, this), this.ambientMode == mc.Flat) {
|
|
21058
21067
|
if (this.ambientLight && !this._ambientLightObj) {
|
|
21059
21068
|
const e = this.calculateIntensityFactor(this.ambientLight);
|
|
21060
21069
|
this._ambientLightObj = new e1(this.ambientLight, this.ambientIntensity * e), la && console.log("Created ambient light", this.sourceId, this._ambientLightObj, this.ambientIntensity, e);
|
|
21061
21070
|
}
|
|
21062
21071
|
this._ambientLightObj && this.gameObject.add(this._ambientLightObj);
|
|
21063
|
-
} else if (this.ambientMode ===
|
|
21072
|
+
} else if (this.ambientMode === mc.Trilight) {
|
|
21064
21073
|
if (this.ambientTrilight) {
|
|
21065
21074
|
const e = this.ambientTrilight[0], i = this.ambientTrilight[this.ambientTrilight.length - 1], n = this.calculateIntensityFactor(i);
|
|
21066
21075
|
this._hemisphereLightObj = new t1(i, e, this.ambientIntensity * n), this.gameObject.add(this._hemisphereLightObj), la && console.log("Created hemisphere ambient light", this.sourceId, this._hemisphereLightObj, this.ambientIntensity, n);
|
|
@@ -21126,8 +21135,8 @@ const ak = Symbol("stencils"), sr = class {
|
|
|
21126
21135
|
return null;
|
|
21127
21136
|
}
|
|
21128
21137
|
};
|
|
21129
|
-
let
|
|
21130
|
-
r(
|
|
21138
|
+
let bc = sr;
|
|
21139
|
+
r(bc, "stencils", {});
|
|
21131
21140
|
function ap(s) {
|
|
21132
21141
|
switch (s) {
|
|
21133
21142
|
case 0:
|
|
@@ -21508,7 +21517,7 @@ class pk {
|
|
|
21508
21517
|
}
|
|
21509
21518
|
async function Lm(s, t, e) {
|
|
21510
21519
|
const i = e.indexOf("?");
|
|
21511
|
-
i >= 0 && (e = e.substring(0, i)), s.register((n) => new sk(n)), s.register((n) => new UP(n)), s.register((n) => new yO(n, t.lightmaps, e)), s.register((n) => new ok(n, e, t)), s.register((n) => new dk(n, e)), s.register((n) => new
|
|
21520
|
+
i >= 0 && (e = e.substring(0, i)), s.register((n) => new sk(n)), s.register((n) => new UP(n)), s.register((n) => new yO(n, t.lightmaps, e)), s.register((n) => new ok(n, e, t)), s.register((n) => new dk(n, e)), s.register((n) => new bc(n, e)), s.register((n) => new Ze(n, e)), s.register((n) => new ek(n)), pP() && s.register((n) => new dc(n)), await fk.catch((n) => {
|
|
21512
21521
|
}), s.register((n) => {
|
|
21513
21522
|
if (su) {
|
|
21514
21523
|
const o = new su(n);
|
|
@@ -21559,8 +21568,8 @@ var gk = Object.defineProperty, yk = Object.getOwnPropertyDescriptor, sw = (s, t
|
|
|
21559
21568
|
return i && n && gk(t, e, n), n;
|
|
21560
21569
|
};
|
|
21561
21570
|
const Tl = x("debugreflectionprobe"), fb = x("noreflectionprobe"), _k = Symbol("reflectionProbeKey"), bk = Symbol("original material");
|
|
21562
|
-
var
|
|
21563
|
-
const hs = (
|
|
21571
|
+
var cd;
|
|
21572
|
+
const hs = (cd = class extends I {
|
|
21564
21573
|
constructor() {
|
|
21565
21574
|
var t;
|
|
21566
21575
|
super();
|
|
@@ -21653,17 +21662,17 @@ const hs = (ld = class extends I {
|
|
|
21653
21662
|
t.sharedMaterials[i] = n.material;
|
|
21654
21663
|
}
|
|
21655
21664
|
}
|
|
21656
|
-
}, r(
|
|
21665
|
+
}, r(cd, "_probes", /* @__PURE__ */ new Map()), // when objects are rendered and they share material
|
|
21657
21666
|
// and some need reflection probe and some don't
|
|
21658
21667
|
// we need to make sure we don't override the material but use a copy
|
|
21659
|
-
r(
|
|
21660
|
-
let
|
|
21668
|
+
r(cd, "_rendererMaterialsCache", /* @__PURE__ */ new Map()), cd);
|
|
21669
|
+
let ah = hs;
|
|
21661
21670
|
sw([
|
|
21662
21671
|
f(v)
|
|
21663
|
-
],
|
|
21672
|
+
], ah.prototype, "center", 2);
|
|
21664
21673
|
sw([
|
|
21665
21674
|
f(v)
|
|
21666
|
-
],
|
|
21675
|
+
], ah.prototype, "size", 2);
|
|
21667
21676
|
const ci = x("debuginstancing"), pu = class {
|
|
21668
21677
|
constructor() {
|
|
21669
21678
|
r(this, "objs", []);
|
|
@@ -21715,7 +21724,7 @@ const ci = x("debuginstancing"), pu = class {
|
|
|
21715
21724
|
autoUpdateInstanceMatrix(t) {
|
|
21716
21725
|
const e = t.matrixWorld.multiplyMatrices.bind(t.matrixWorld), i = t.matrixWorld.clone(), n = (o, a) => {
|
|
21717
21726
|
const l = e(o, a);
|
|
21718
|
-
return (t[
|
|
21727
|
+
return (t[Nc] || i.equals(l) === !1) && (i.copy(l), t[Nc] = !0), l;
|
|
21719
21728
|
};
|
|
21720
21729
|
t.matrixWorld.multiplyMatrices = n;
|
|
21721
21730
|
}
|
|
@@ -21729,7 +21738,7 @@ r(rr, "instance", new pu()), /** This is the initial instance count when creatin
|
|
|
21729
21738
|
* @returns The initial instance count
|
|
21730
21739
|
* */
|
|
21731
21740
|
r(rr, "getStartInstanceCount", (t) => 4);
|
|
21732
|
-
const
|
|
21741
|
+
const Ac = class {
|
|
21733
21742
|
constructor(t, e) {
|
|
21734
21743
|
/** The object that is being instanced */
|
|
21735
21744
|
r(this, "object");
|
|
@@ -21744,7 +21753,7 @@ const Tc = class {
|
|
|
21744
21753
|
r(this, "__geometryIndex", -1);
|
|
21745
21754
|
/** The mesh information of the object - this tries to also calculate the LOD info */
|
|
21746
21755
|
r(this, "meshInformation");
|
|
21747
|
-
this.__instanceIndex = -1, this.object = t, this.renderer = e, t[ov] = e, this.meshInformation = tr(t.geometry),
|
|
21756
|
+
this.__instanceIndex = -1, this.object = t, this.renderer = e, t[ov] = e, this.meshInformation = tr(t.geometry), Ac.all.push(this);
|
|
21748
21757
|
}
|
|
21749
21758
|
/** The name of the object */
|
|
21750
21759
|
get name() {
|
|
@@ -21809,13 +21818,13 @@ const Tc = class {
|
|
|
21809
21818
|
*/
|
|
21810
21819
|
remove(t) {
|
|
21811
21820
|
if (!(this.__instanceIndex < 0) && (this.renderer.remove(this, t), S.markAsInstancedRendered(this.object, !1), t)) {
|
|
21812
|
-
const e =
|
|
21813
|
-
e >= 0 &&
|
|
21821
|
+
const e = Ac.all.indexOf(this);
|
|
21822
|
+
e >= 0 && Ac.all.splice(e, 1);
|
|
21814
21823
|
}
|
|
21815
21824
|
}
|
|
21816
21825
|
};
|
|
21817
|
-
let
|
|
21818
|
-
r(
|
|
21826
|
+
let vc = Ac;
|
|
21827
|
+
r(vc, "all", []);
|
|
21819
21828
|
class ow {
|
|
21820
21829
|
constructor(t, e, i, n, o) {
|
|
21821
21830
|
/** If true, the instancer is allowed to grow when the max instance count is reached */
|
|
@@ -21895,7 +21904,7 @@ class ow {
|
|
|
21895
21904
|
ci && console.warn("Dispose instanced renderer", this.name), this._context.scene.remove(this._batchedMesh), this._batchedMesh.dispose(), this._batchedMesh = null, this._handles = [];
|
|
21896
21905
|
}
|
|
21897
21906
|
addInstance(t) {
|
|
21898
|
-
const e = new
|
|
21907
|
+
const e = new vc(t, this);
|
|
21899
21908
|
t.castShadow === !0 && this._batchedMesh.castShadow === !1 && (this._batchedMesh.castShadow = !0), t.receiveShadow === !0 && this._batchedMesh.receiveShadow === !1 && (this._batchedMesh.receiveShadow = !0);
|
|
21900
21909
|
try {
|
|
21901
21910
|
this.add(e);
|
|
@@ -22256,7 +22265,7 @@ class Ck {
|
|
|
22256
22265
|
return i ? i.material : null;
|
|
22257
22266
|
}
|
|
22258
22267
|
}
|
|
22259
|
-
const
|
|
22268
|
+
const Md = class extends I {
|
|
22260
22269
|
constructor() {
|
|
22261
22270
|
super(...arguments);
|
|
22262
22271
|
r(this, "receiveShadows", !1);
|
|
@@ -22304,14 +22313,14 @@ const Od = class extends I {
|
|
|
22304
22313
|
* @returns the Renderer component that was created or already existed on the object
|
|
22305
22314
|
*/
|
|
22306
22315
|
static setInstanced(t, e) {
|
|
22307
|
-
const i = Fu(t,
|
|
22316
|
+
const i = Fu(t, Md);
|
|
22308
22317
|
return i.setInstancingEnabled(e), i;
|
|
22309
22318
|
}
|
|
22310
22319
|
/** Check if an object is currently rendered using instancing
|
|
22311
22320
|
* @returns true if the object is rendered using instancing
|
|
22312
22321
|
*/
|
|
22313
22322
|
static isInstanced(t) {
|
|
22314
|
-
const e = Xa(t,
|
|
22323
|
+
const e = Xa(t, Md);
|
|
22315
22324
|
return e ? e.isInstancingActive : bn.isUsingInstancing(t);
|
|
22316
22325
|
}
|
|
22317
22326
|
/** 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!
|
|
@@ -22404,7 +22413,7 @@ const Od = class extends I {
|
|
|
22404
22413
|
let t = 0;
|
|
22405
22414
|
for (let e = 0; e < this.gameObject.children.length; e++) {
|
|
22406
22415
|
const i = this.gameObject.children[e];
|
|
22407
|
-
if (!(!this.isMeshOrSkinnedMesh(i) || S.getComponent(i,
|
|
22416
|
+
if (!(!this.isMeshOrSkinnedMesh(i) || S.getComponent(i, Md))) {
|
|
22408
22417
|
if (this.renderOrder.length <= t) {
|
|
22409
22418
|
console.warn("Incorrect renderOrder element count", this, this.renderOrder.length + " but expected " + this.gameObject.children.length, "Index: " + t, "ChildElement:", i);
|
|
22410
22419
|
continue;
|
|
@@ -22529,8 +22538,8 @@ const Od = class extends I {
|
|
|
22529
22538
|
this.applySettings(n);
|
|
22530
22539
|
else
|
|
22531
22540
|
this.applySettings(this.gameObject);
|
|
22532
|
-
if (this.sharedMaterials.changed && (this.sharedMaterials.changed = !1, this.applyLightmapping()), (i = this._handles) != null && i.length && this.gameObject[
|
|
22533
|
-
this.gameObject[
|
|
22541
|
+
if (this.sharedMaterials.changed && (this.sharedMaterials.changed = !1, this.applyLightmapping()), (i = this._handles) != null && i.length && this.gameObject[Nc] === !0) {
|
|
22542
|
+
this.gameObject[Nc] = !1;
|
|
22534
22543
|
for (let o = this._handles.length - 1; o >= 0; o--)
|
|
22535
22544
|
this._handles[o].updateInstanceMatrix();
|
|
22536
22545
|
this.gameObject.matrixWorldNeedsUpdate = !1;
|
|
@@ -22553,7 +22562,7 @@ const Od = class extends I {
|
|
|
22553
22562
|
}
|
|
22554
22563
|
/** Applies stencil settings for this renderer's objects (if stencil settings are available) */
|
|
22555
22564
|
applyStencil() {
|
|
22556
|
-
|
|
22565
|
+
bc.applyStencil(this);
|
|
22557
22566
|
}
|
|
22558
22567
|
/** Apply the settings of this renderer to the given object
|
|
22559
22568
|
* Settings include shadow casting and receiving (e.g. this.receiveShadows, this.shadowCastingMode)
|
|
@@ -22566,7 +22575,7 @@ const Od = class extends I {
|
|
|
22566
22575
|
}
|
|
22567
22576
|
*_updateReflectionProbe() {
|
|
22568
22577
|
const t = this.probeAnchor || this.gameObject, e = !!this.probeAnchor;
|
|
22569
|
-
this._reflectionProbe =
|
|
22578
|
+
this._reflectionProbe = ah.get(t, this.context, e, this.probeAnchor);
|
|
22570
22579
|
}
|
|
22571
22580
|
setVisibility(t) {
|
|
22572
22581
|
if (!this.isMultiMaterialObject(this.gameObject))
|
|
@@ -22582,7 +22591,7 @@ const Od = class extends I {
|
|
|
22582
22591
|
return t.type === "Mesh" || t.type === "SkinnedMesh";
|
|
22583
22592
|
}
|
|
22584
22593
|
};
|
|
22585
|
-
let Je =
|
|
22594
|
+
let Je = Md;
|
|
22586
22595
|
$s([
|
|
22587
22596
|
f()
|
|
22588
22597
|
], Je.prototype, "receiveShadows", 2);
|
|
@@ -22654,7 +22663,7 @@ var Pk = Object.defineProperty, Ok = Object.getOwnPropertyDescriptor, aw = (s, t
|
|
|
22654
22663
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
22655
22664
|
return i && n && Pk(t, e, n), n;
|
|
22656
22665
|
};
|
|
22657
|
-
const
|
|
22666
|
+
const Xh = x("debuggltfexport");
|
|
22658
22667
|
class lw extends wi {
|
|
22659
22668
|
constructor() {
|
|
22660
22669
|
super(...arguments);
|
|
@@ -22669,7 +22678,7 @@ const ca = class extends I {
|
|
|
22669
22678
|
r(this, "ext");
|
|
22670
22679
|
}
|
|
22671
22680
|
async exportNow(t, e) {
|
|
22672
|
-
|
|
22681
|
+
Xh && console.log("Exporting objects as glTF", this.objects), t || (t = "scene"), (!this.objects || this.objects.length <= 0) && (this.objects = [this.context.scene]);
|
|
22673
22682
|
const i = {
|
|
22674
22683
|
binary: this.binary,
|
|
22675
22684
|
pivot: ca.calculateCenter(this.objects),
|
|
@@ -22696,7 +22705,7 @@ const ca = class extends I {
|
|
|
22696
22705
|
animations: (e == null ? void 0 : e.animations) || ca.collectAnimations(t),
|
|
22697
22706
|
...e
|
|
22698
22707
|
}, o = new Array(), a = new L();
|
|
22699
|
-
e != null && e.pivot && a.position.sub(e.pivot),
|
|
22708
|
+
e != null && e.pivot && a.position.sub(e.pivot), Xh && console.log("EXPORT", t), t.forEach((h) => {
|
|
22700
22709
|
h && Em(h) && (a.children.push(h), h.matrixAutoUpdate = !1, h.matrix.copy(h.matrixWorld), S.getComponentsInChildren(h, Je).forEach((d) => {
|
|
22701
22710
|
S.isActiveInHierarchy(d.gameObject) && d.setInstancingEnabled(!1);
|
|
22702
22711
|
}), h.traverse((d) => {
|
|
@@ -22710,7 +22719,7 @@ const ca = class extends I {
|
|
|
22710
22719
|
});
|
|
22711
22720
|
const l = new pv(a);
|
|
22712
22721
|
return e != null && e.needleComponents && (this.ext = new Zv()), this.ext && (this.ext.registerExport(i), this.ext.context = l), new Promise((h, d) => {
|
|
22713
|
-
|
|
22722
|
+
Xh && console.log("Starting glTF export.");
|
|
22714
22723
|
try {
|
|
22715
22724
|
i == null || i.parse(
|
|
22716
22725
|
a,
|
|
@@ -22727,7 +22736,7 @@ const ca = class extends I {
|
|
|
22727
22736
|
} catch (u) {
|
|
22728
22737
|
console.error(u), d(u);
|
|
22729
22738
|
} finally {
|
|
22730
|
-
o.forEach((u) => u()),
|
|
22739
|
+
o.forEach((u) => u()), Xh && console.log("Finished glTF export.");
|
|
22731
22740
|
}
|
|
22732
22741
|
});
|
|
22733
22742
|
function c() {
|
|
@@ -23233,7 +23242,7 @@ let Dk = class {
|
|
|
23233
23242
|
const n = i.files, o = "model.usda";
|
|
23234
23243
|
n[o] = null;
|
|
23235
23244
|
const a = i.materials, l = i.textures;
|
|
23236
|
-
de.report("export-usdz", "Invoking onBeforeBuildDocument"), await
|
|
23245
|
+
de.report("export-usdz", "Invoking onBeforeBuildDocument"), await Rd(i, "onBeforeBuildDocument"), de.report("export-usdz", "Done onBeforeBuildDocument"), de.report("export-usdz", "Reparent bones to common ancestor");
|
|
23237
23246
|
const c = [], h = /* @__PURE__ */ new Set();
|
|
23238
23247
|
t == null || t.traverse((k) => {
|
|
23239
23248
|
if (!(!e.exportInvisible && !k.visible) && k instanceof Ps) {
|
|
@@ -23248,7 +23257,7 @@ let Dk = class {
|
|
|
23248
23257
|
const { object: O, originalParent: R, newParent: E } = k;
|
|
23249
23258
|
E.add(O);
|
|
23250
23259
|
}
|
|
23251
|
-
de.report("export-usdz", "Traversing hierarchy"), t && fw(t, i.document, i, this.keepObject), de.report("export-usdz", "Invoking onAfterBuildDocument"), await
|
|
23260
|
+
de.report("export-usdz", "Traversing hierarchy"), t && fw(t, i.document, i, this.keepObject), de.report("export-usdz", "Invoking onAfterBuildDocument"), await Rd(i, "onAfterBuildDocument");
|
|
23252
23261
|
const d = i.extensions.find((k) => k.extensionName === "Behaviour"), u = (d == null ? void 0 : d.getAllTargetUuids()) ?? /* @__PURE__ */ new Set();
|
|
23253
23262
|
if (this.pruneUnusedNodes) {
|
|
23254
23263
|
const k = {
|
|
@@ -23260,7 +23269,7 @@ let Dk = class {
|
|
|
23260
23269
|
this.debug && yb(i.document, "Hierarchy BEFORE pruning", k), pw(i.document, k), this.debug && yb(i.document, "Hierarchy AFTER pruning");
|
|
23261
23270
|
} else
|
|
23262
23271
|
this.debug && console.log("Pruning of empty nodes is disabled. This may result in a larger USDZ file.");
|
|
23263
|
-
de.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await jk(i, () => (de.report("export-usdz", "Building materials"), Gk(a, l, e.quickLookCompatible))), de.report("export-usdz", "Invoking onAfterSerialize"), await
|
|
23272
|
+
de.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await jk(i, () => (de.report("export-usdz", "Building materials"), Gk(a, l, e.quickLookCompatible))), de.report("export-usdz", "Invoking onAfterSerialize"), await Rd(i, "onAfterSerialize");
|
|
23264
23273
|
for (const k of c) {
|
|
23265
23274
|
const { object: O, originalParent: R, newParent: E } = k;
|
|
23266
23275
|
R && R.add(O);
|
|
@@ -23318,13 +23327,13 @@ function fw(s, t, e, i) {
|
|
|
23318
23327
|
let n, o, a;
|
|
23319
23328
|
const l = { position: s.position, quaternion: s.quaternion, scale: s.scale };
|
|
23320
23329
|
if (s.position.x === 0 && s.position.y === 0 && s.position.z === 0 && (l.position = null), s.quaternion.x === 0 && s.quaternion.y === 0 && s.quaternion.z === 0 && s.quaternion.w === 1 && (l.quaternion = null), s.scale.x === 1 && s.scale.y === 1 && s.scale.z === 1 && (l.scale = null), (s instanceof q || s instanceof Ps) && (o = s.geometry, a = s.material), i && !i(s) && (o = void 0, a = void 0), (s instanceof q || s instanceof Ps) && a && (a instanceof Tt || a instanceof Me || a instanceof Se && a.type === "MeshLineMaterial")) {
|
|
23321
|
-
const h =
|
|
23330
|
+
const h = Kh(s), d = s instanceof Ps ? s : null;
|
|
23322
23331
|
n = new jt(s.uuid, h, l, o, a, void 0, d, s.animations);
|
|
23323
23332
|
} else if (s instanceof be || s instanceof lg) {
|
|
23324
|
-
const h =
|
|
23333
|
+
const h = Kh(s);
|
|
23325
23334
|
n = new jt(s.uuid, h, l, void 0, void 0, s);
|
|
23326
23335
|
} else {
|
|
23327
|
-
const h =
|
|
23336
|
+
const h = Kh(s);
|
|
23328
23337
|
n = new jt(s.uuid, h, l, void 0, void 0, void 0, void 0, s.animations);
|
|
23329
23338
|
}
|
|
23330
23339
|
if (n) {
|
|
@@ -23332,7 +23341,7 @@ function fw(s, t, e, i) {
|
|
|
23332
23341
|
for (const h of e.extensions)
|
|
23333
23342
|
h.onExportObject && h.onExportObject.call(h, s, n, e);
|
|
23334
23343
|
} else {
|
|
23335
|
-
const h =
|
|
23344
|
+
const h = Kh(s), d = new jt(s.uuid, h, { position: s.position, quaternion: s.quaternion, scale: s.scale });
|
|
23336
23345
|
t && t.add(d), t = d;
|
|
23337
23346
|
}
|
|
23338
23347
|
for (const h of s.children)
|
|
@@ -23411,7 +23420,7 @@ async function jk(s, t) {
|
|
|
23411
23420
|
de.start("export-usdz-xforms", "export-usdz"), de.report("export-usdz-xforms", { totalSteps: l, currentStep: 1 });
|
|
23412
23421
|
for (const c of s.document.children)
|
|
23413
23422
|
gw(c, n, s);
|
|
23414
|
-
de.end("export-usdz-xforms"), de.report("export-usdz", "invoke onAfterHierarchy"),
|
|
23423
|
+
de.end("export-usdz-xforms"), de.report("export-usdz", "invoke onAfterHierarchy"), Rd(s, "onAfterHierarchy", n), n.closeBlock(), n.closeBlock(), n.appendLine(t()), n.closeBlock(), de.report("export-usdz", "write to string"), s.output += n.toString();
|
|
23415
23424
|
}
|
|
23416
23425
|
function mw(s, t, e) {
|
|
23417
23426
|
if (!s)
|
|
@@ -23434,7 +23443,7 @@ function mw(s, t, e) {
|
|
|
23434
23443
|
for (const o of s.children)
|
|
23435
23444
|
mw(o, t, e);
|
|
23436
23445
|
}
|
|
23437
|
-
async function
|
|
23446
|
+
async function Rd(s, t, e = null) {
|
|
23438
23447
|
if (s.extensions) {
|
|
23439
23448
|
for (const i of s.extensions)
|
|
23440
23449
|
if (i && typeof i[t] == "function") {
|
|
@@ -23443,7 +23452,7 @@ async function Md(s, t, e = null) {
|
|
|
23443
23452
|
}
|
|
23444
23453
|
}
|
|
23445
23454
|
}
|
|
23446
|
-
let
|
|
23455
|
+
let Qh = null, Gt = null, cp, Yr, Yh;
|
|
23447
23456
|
async function Bk(s, t = 1 / 0, e = null, i = void 0) {
|
|
23448
23457
|
cp || (cp = new Xn(2, 2, 1, 1)), Yr || (Yr = new wn({
|
|
23449
23458
|
uniforms: {
|
|
@@ -23478,11 +23487,11 @@ async function Bk(s, t = 1 / 0, e = null, i = void 0) {
|
|
|
23478
23487
|
}`
|
|
23479
23488
|
}));
|
|
23480
23489
|
const n = Yr.uniforms;
|
|
23481
|
-
n.blitTexture.value = s, n.flipY.value = !1, n.scale.value = new ge(1, 1, 1, 1), i !== void 0 && n.scale.value.copy(i), Yr.defines.IS_SRGB = s.colorSpace == Es, Yr.needsUpdate = !0,
|
|
23490
|
+
n.blitTexture.value = s, n.flipY.value = !1, n.scale.value = new ge(1, 1, 1, 1), i !== void 0 && n.scale.value.copy(i), Yr.defines.IS_SRGB = s.colorSpace == Es, Yr.needsUpdate = !0, Yh || (Yh = new q(cp, Yr), Yh.frustumCulled = !1);
|
|
23482
23491
|
const o = new be(), a = new Ri();
|
|
23483
|
-
a.add(
|
|
23492
|
+
a.add(Yh), e || (e = Qh = new kr({ antialias: !1, alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0 }));
|
|
23484
23493
|
const l = Math.min(s.image.width, t), c = Math.min(s.image.height, t);
|
|
23485
|
-
Gt && (Gt.width !== l || Gt.height !== c) && (Gt.dispose(), Gt = null), Gt || (Gt = new Is(l, c, { format: Pu, type: P1, minFilter: Ny, magFilter: Ny })), e.setRenderTarget(Gt), e.setSize(l, c), e.clear(), e.render(a, o),
|
|
23494
|
+
Gt && (Gt.width !== l || Gt.height !== c) && (Gt.dispose(), Gt = null), Gt || (Gt = new Is(l, c, { format: Pu, type: P1, minFilter: Ny, magFilter: Ny })), e.setRenderTarget(Gt), e.setSize(l, c), e.clear(), e.render(a, o), Qh && (Qh.dispose(), Qh = null);
|
|
23486
23495
|
const h = new Uint8ClampedArray(Gt.width * Gt.height * 4);
|
|
23487
23496
|
e.readRenderTargetPixels(Gt, 0, 0, Gt.width, Gt.height, h);
|
|
23488
23497
|
const d = new ImageData(h, Gt.width, Gt.height, void 0), u = await createImageBitmap(d, { premultiplyAlpha: "none" });
|
|
@@ -23531,7 +23540,7 @@ function $k(s, t) {
|
|
|
23531
23540
|
let e = Nk();
|
|
23532
23541
|
return e += s, p0(e);
|
|
23533
23542
|
}
|
|
23534
|
-
function
|
|
23543
|
+
function Kh(s) {
|
|
23535
23544
|
return s.name.replace(/[-<>\(\)\[\]§$%&\/\\\=\?\,\;]/g, "") + "_" + s.id;
|
|
23536
23545
|
}
|
|
23537
23546
|
function _b(s) {
|
|
@@ -23583,9 +23592,9 @@ function he(s) {
|
|
|
23583
23592
|
}
|
|
23584
23593
|
function bb(s) {
|
|
23585
23594
|
const t = s.elements;
|
|
23586
|
-
return `( ${
|
|
23595
|
+
return `( ${Zh(t, 0)}, ${Zh(t, 4)}, ${Zh(t, 8)}, ${Zh(t, 12)} )`;
|
|
23587
23596
|
}
|
|
23588
|
-
function
|
|
23597
|
+
function Zh(s, t) {
|
|
23589
23598
|
return `(${he(s[t + 0])}, ${he(s[t + 1])}, ${he(s[t + 2])}, ${he(s[t + 3])})`;
|
|
23590
23599
|
}
|
|
23591
23600
|
function Wk(s, t = [], e = !0) {
|
|
@@ -23634,11 +23643,11 @@ function Vk(s, t = [], e = !0) {
|
|
|
23634
23643
|
int[] faceVertexIndices = [${dp(s)}]
|
|
23635
23644
|
${n.normal || e ? (
|
|
23636
23645
|
// in QuickLook, normals are required, otherwise double-sided rendering doesn't work.
|
|
23637
|
-
`normal3f[] normals = [${
|
|
23646
|
+
`normal3f[] normals = [${kd(n.normal, o)}] (
|
|
23638
23647
|
interpolation = "vertex"
|
|
23639
23648
|
)`
|
|
23640
23649
|
) : ""}
|
|
23641
|
-
point3f[] points = [${
|
|
23650
|
+
point3f[] points = [${kd(n.position, o)}]
|
|
23642
23651
|
${n.uv ? `texCoord2f[] primvars:st = [${yw(n.uv, o, !0)}] (
|
|
23643
23652
|
interpolation = "vertex"
|
|
23644
23653
|
)` : ""}
|
|
@@ -23657,7 +23666,7 @@ function Vk(s, t = [], e = !0) {
|
|
|
23657
23666
|
elementSize = 4
|
|
23658
23667
|
interpolation = "vertex"
|
|
23659
23668
|
)` : ""}
|
|
23660
|
-
${n.color ? `color3f[] primvars:displayColor = [${
|
|
23669
|
+
${n.color ? `color3f[] primvars:displayColor = [${kd(n.color, o)}] (
|
|
23661
23670
|
interpolation = "vertex"
|
|
23662
23671
|
)` : ""}
|
|
23663
23672
|
uniform token subdivisionScheme = "none"
|
|
@@ -23707,7 +23716,7 @@ function up(s, t) {
|
|
|
23707
23716
|
interpolation = "vertex"
|
|
23708
23717
|
)`;
|
|
23709
23718
|
case 3:
|
|
23710
|
-
return `texCoord3f[] primvars:${s} = [${
|
|
23719
|
+
return `texCoord3f[] primvars:${s} = [${kd(t, e)}] (
|
|
23711
23720
|
interpolation = "vertex"
|
|
23712
23721
|
)`;
|
|
23713
23722
|
case 4:
|
|
@@ -23718,7 +23727,7 @@ function up(s, t) {
|
|
|
23718
23727
|
return console.warn("USDZExporter: Attribute with " + e + " components are currently not supported. Results may be undefined for " + s + "."), "";
|
|
23719
23728
|
}
|
|
23720
23729
|
}
|
|
23721
|
-
function
|
|
23730
|
+
function kd(s, t) {
|
|
23722
23731
|
if (s === void 0)
|
|
23723
23732
|
return console.warn("USDZExporter: A mesh attribute is missing and will be set with placeholder data. The result may look incorrect."), Array(t).fill("(0, 0, 1)").join(", ");
|
|
23724
23733
|
const e = [];
|
|
@@ -24371,7 +24380,7 @@ class lr {
|
|
|
24371
24380
|
return t;
|
|
24372
24381
|
}
|
|
24373
24382
|
}
|
|
24374
|
-
const
|
|
24383
|
+
const Ec = class {
|
|
24375
24384
|
constructor(t, e, i) {
|
|
24376
24385
|
r(this, "clip");
|
|
24377
24386
|
r(this, "pos");
|
|
@@ -24381,7 +24390,7 @@ const Ac = class {
|
|
|
24381
24390
|
r(this, "target");
|
|
24382
24391
|
r(this, "duration", 0);
|
|
24383
24392
|
r(this, "useRootMotion", !1);
|
|
24384
|
-
if (this.root = t, this.target = e, this.clip = i, i ? this.duration = i.duration : this.duration =
|
|
24393
|
+
if (this.root = t, this.target = e, this.clip = i, i ? this.duration = i.duration : this.duration = Ec.restPoseClipDuration, i && i.tracks) {
|
|
24385
24394
|
const o = Math.max(...i.tracks.map((a) => a.times[a.times.length - 1]));
|
|
24386
24395
|
o !== this.duration && (console.warn("USDZExporter: Animation clip duration does not match the maximum time value in the tracks.", i, o, this.duration), this.duration = o);
|
|
24387
24396
|
}
|
|
@@ -24435,7 +24444,7 @@ const Ac = class {
|
|
|
24435
24444
|
const p = 0;
|
|
24436
24445
|
for (let _ = 0 - p; _ < t.length + p; _++) {
|
|
24437
24446
|
let b = 0, w = 0;
|
|
24438
|
-
if (_ < 0 ? (b = t[0], w = b -
|
|
24447
|
+
if (_ < 0 ? (b = t[0], w = b - Ec.animationDurationPadding / 2 + 1 / 60) : _ >= t.length ? (b = t[t.length - 1], w = b + Ec.animationDurationPadding / 2 - 1 / 60) : (b = t[_], w = b), h) {
|
|
24439
24448
|
const C = h.evaluate(b);
|
|
24440
24449
|
o.set(C[0], C[1], C[2]);
|
|
24441
24450
|
}
|
|
@@ -24455,7 +24464,7 @@ const Ac = class {
|
|
|
24455
24464
|
}
|
|
24456
24465
|
}
|
|
24457
24466
|
};
|
|
24458
|
-
let $e =
|
|
24467
|
+
let $e = Ec;
|
|
24459
24468
|
/** This value can theoretically be anything – a value of 1 is good to clearly see animation gaps.
|
|
24460
24469
|
* For production, a value of 1/60 is enough, since the files can then still properly play back at 60fps.
|
|
24461
24470
|
*/
|
|
@@ -24970,7 +24979,7 @@ var Zk = Object.defineProperty, Jk = Object.getOwnPropertyDescriptor, Ve = (s, t
|
|
|
24970
24979
|
return i && n && Zk(t, e, n), n;
|
|
24971
24980
|
};
|
|
24972
24981
|
const Cb = x("debugusdzbehaviours");
|
|
24973
|
-
function
|
|
24982
|
+
function lh(s) {
|
|
24974
24983
|
s && (s.getComponentInParent(Ha) || (B() && console.debug('Raycaster on "' + s.name + '" was automatically added, because no raycaster was found in the parent hierarchy.'), s.addComponent(on)));
|
|
24975
24984
|
}
|
|
24976
24985
|
class il extends I {
|
|
@@ -24986,7 +24995,7 @@ class il extends I {
|
|
|
24986
24995
|
r(this, "targetScale", new v());
|
|
24987
24996
|
}
|
|
24988
24997
|
start() {
|
|
24989
|
-
|
|
24998
|
+
lh(this.gameObject);
|
|
24990
24999
|
}
|
|
24991
25000
|
onPointerClick(e) {
|
|
24992
25001
|
e.use(), this.coroutine && this.stopCoroutine(this.coroutine), this.relativeMotion ? this.coroutine = this.startCoroutine(this.moveRelative()) : this.coroutine = this.startCoroutine(this.moveToTarget());
|
|
@@ -24996,12 +25005,12 @@ class il extends I {
|
|
|
24996
25005
|
return;
|
|
24997
25006
|
const e = ie(this.object).clone(), i = ie(this.target).clone(), n = Ce(this.object).clone(), o = Ce(this.target).clone(), a = Ke(this.object).clone(), l = Ke(this.target).clone(), c = e.distanceTo(i), h = n.angleTo(o), d = a.distanceTo(l);
|
|
24998
25007
|
if (c < 0.01 && h < 0.01 && d < 0.01) {
|
|
24999
|
-
_t(this.object, i), xn(this.object, o),
|
|
25008
|
+
_t(this.object, i), xn(this.object, o), Fc(this.object, l), this.coroutine = null;
|
|
25000
25009
|
return;
|
|
25001
25010
|
}
|
|
25002
25011
|
let u = 0, p = 0;
|
|
25003
25012
|
for (; u < 1; )
|
|
25004
|
-
u += this.context.time.deltaTime / this.duration, u > 1 && (u = 1), p = u < 0.5 ? 4 * u * u * u : 1 - Math.pow(-2 * u + 2, 3) / 2, this.targetPos.lerpVectors(e, i, p), this.targetRot.slerpQuaternions(n, o, p), this.targetScale.lerpVectors(a, l, p), _t(this.object, this.targetPos), xn(this.object, this.targetRot),
|
|
25013
|
+
u += this.context.time.deltaTime / this.duration, u > 1 && (u = 1), p = u < 0.5 ? 4 * u * u * u : 1 - Math.pow(-2 * u + 2, 3) / 2, this.targetPos.lerpVectors(e, i, p), this.targetRot.slerpQuaternions(n, o, p), this.targetScale.lerpVectors(a, l, p), _t(this.object, this.targetPos), xn(this.object, this.targetRot), Fc(this.object, this.targetScale), yield;
|
|
25005
25014
|
this.coroutine = null;
|
|
25006
25015
|
}
|
|
25007
25016
|
*moveRelative() {
|
|
@@ -25051,7 +25060,7 @@ const Xt = (ea = class extends I {
|
|
|
25051
25060
|
}
|
|
25052
25061
|
start() {
|
|
25053
25062
|
var t;
|
|
25054
|
-
this._objectsWithThisMaterial = this.objectsWithThisMaterial,
|
|
25063
|
+
this._objectsWithThisMaterial = this.objectsWithThisMaterial, lh(this.gameObject), B() && this._objectsWithThisMaterial.length <= 0 && console.warn('ChangeMaterialOnClick: No objects found with material "' + ((t = this.materialToSwitch) == null ? void 0 : t.name) + '"');
|
|
25055
25064
|
}
|
|
25056
25065
|
onPointerEnter(t) {
|
|
25057
25066
|
this.context.input.setCursor("pointer");
|
|
@@ -25133,16 +25142,16 @@ const Xt = (ea = class extends I {
|
|
|
25133
25142
|
return t;
|
|
25134
25143
|
}
|
|
25135
25144
|
}, r(ea, "_materialTriggersPerId", {}), r(ea, "_startHiddenBehaviour", null), r(ea, "_parallelStartHiddenActions", []), r(ea, "variantSwitchIndex", 0), ea);
|
|
25136
|
-
let
|
|
25145
|
+
let ch = Xt;
|
|
25137
25146
|
Ve([
|
|
25138
25147
|
f(Se)
|
|
25139
|
-
],
|
|
25148
|
+
], ch.prototype, "materialToSwitch", 2);
|
|
25140
25149
|
Ve([
|
|
25141
25150
|
f(Se)
|
|
25142
|
-
],
|
|
25151
|
+
], ch.prototype, "variantMaterial", 2);
|
|
25143
25152
|
Ve([
|
|
25144
25153
|
f()
|
|
25145
|
-
],
|
|
25154
|
+
], ch.prototype, "fadeDuration", 2);
|
|
25146
25155
|
var ta;
|
|
25147
25156
|
const Ue = (ta = class extends I {
|
|
25148
25157
|
constructor() {
|
|
@@ -25159,7 +25168,7 @@ const Ue = (ta = class extends I {
|
|
|
25159
25168
|
r(this, "targetStateBeforeCreatingDocument", !1);
|
|
25160
25169
|
}
|
|
25161
25170
|
start() {
|
|
25162
|
-
|
|
25171
|
+
lh(this.gameObject);
|
|
25163
25172
|
}
|
|
25164
25173
|
onPointerClick(t) {
|
|
25165
25174
|
t.use(), !this.toggleOnClick && this.hideSelf && (this.gameObject.visible = !1), this.target && (this.target.visible = this.toggleOnClick ? !this.target.visible : this.targetState);
|
|
@@ -25264,7 +25273,7 @@ const ms = class extends I {
|
|
|
25264
25273
|
};
|
|
25265
25274
|
let cr = ms;
|
|
25266
25275
|
r(cr, "_fadeBehaviour"), r(cr, "_fadeObjects", []);
|
|
25267
|
-
class
|
|
25276
|
+
class hh extends I {
|
|
25268
25277
|
constructor() {
|
|
25269
25278
|
super(...arguments);
|
|
25270
25279
|
r(this, "target");
|
|
@@ -25288,13 +25297,13 @@ class ch extends I {
|
|
|
25288
25297
|
}
|
|
25289
25298
|
Ve([
|
|
25290
25299
|
f()
|
|
25291
|
-
],
|
|
25300
|
+
], hh.prototype, "target", 2);
|
|
25292
25301
|
Ve([
|
|
25293
25302
|
f()
|
|
25294
|
-
],
|
|
25303
|
+
], hh.prototype, "duration", 2);
|
|
25295
25304
|
Ve([
|
|
25296
25305
|
f()
|
|
25297
|
-
],
|
|
25306
|
+
], hh.prototype, "motionType", 2);
|
|
25298
25307
|
class Cr extends I {
|
|
25299
25308
|
constructor() {
|
|
25300
25309
|
super(...arguments);
|
|
@@ -25305,7 +25314,7 @@ class Cr extends I {
|
|
|
25305
25314
|
r(this, "trigger", "tap");
|
|
25306
25315
|
}
|
|
25307
25316
|
start() {
|
|
25308
|
-
|
|
25317
|
+
lh(this.gameObject);
|
|
25309
25318
|
}
|
|
25310
25319
|
ensureAudioSource() {
|
|
25311
25320
|
if (!this.target) {
|
|
@@ -25365,8 +25374,8 @@ Ve([
|
|
|
25365
25374
|
Ve([
|
|
25366
25375
|
f()
|
|
25367
25376
|
], Cr.prototype, "toggleOnClick", 2);
|
|
25368
|
-
var
|
|
25369
|
-
const An = (
|
|
25377
|
+
var hd;
|
|
25378
|
+
const An = (hd = class extends I {
|
|
25370
25379
|
constructor() {
|
|
25371
25380
|
super(...arguments);
|
|
25372
25381
|
r(this, "animator");
|
|
@@ -25388,7 +25397,7 @@ const An = (cd = class extends I {
|
|
|
25388
25397
|
return ((t = this.animator) == null ? void 0 : t.gameObject) || ((e = this.animation) == null ? void 0 : e.gameObject);
|
|
25389
25398
|
}
|
|
25390
25399
|
start() {
|
|
25391
|
-
|
|
25400
|
+
lh(this.gameObject);
|
|
25392
25401
|
}
|
|
25393
25402
|
onPointerClick(t) {
|
|
25394
25403
|
var e;
|
|
@@ -25581,7 +25590,7 @@ const An = (cd = class extends I {
|
|
|
25581
25590
|
const n = An.getAndRegisterAnimationSequences(t, this.target, this.stateName);
|
|
25582
25591
|
n && (this.animationSequence = n.animationSequence, this.animationLoopAfterSequence = n.animationLoopAfterSequence, this.randomOffsetNormalized = n.randomTimeOffset, this.stateAnimationModel = e);
|
|
25583
25592
|
}
|
|
25584
|
-
}, r(
|
|
25593
|
+
}, r(hd, "animationActions", []), r(hd, "rootsWithExclusivePlayback", /* @__PURE__ */ new Set()), hd);
|
|
25585
25594
|
let Ga = An;
|
|
25586
25595
|
Ve([
|
|
25587
25596
|
f(Ut)
|
|
@@ -25589,7 +25598,7 @@ Ve([
|
|
|
25589
25598
|
Ve([
|
|
25590
25599
|
f()
|
|
25591
25600
|
], Ga.prototype, "stateName", 2);
|
|
25592
|
-
class
|
|
25601
|
+
class dh extends I {
|
|
25593
25602
|
constructor() {
|
|
25594
25603
|
super(...arguments);
|
|
25595
25604
|
r(this, "target");
|
|
@@ -25601,7 +25610,7 @@ class hh extends I {
|
|
|
25601
25610
|
}
|
|
25602
25611
|
Ve([
|
|
25603
25612
|
f(L)
|
|
25604
|
-
],
|
|
25613
|
+
], dh.prototype, "target", 2);
|
|
25605
25614
|
class Zu extends I {
|
|
25606
25615
|
constructor() {
|
|
25607
25616
|
super(...arguments);
|
|
@@ -25609,9 +25618,9 @@ class Zu extends I {
|
|
|
25609
25618
|
}
|
|
25610
25619
|
}
|
|
25611
25620
|
Ve([
|
|
25612
|
-
f(
|
|
25621
|
+
f(dh)
|
|
25613
25622
|
], Zu.prototype, "target", 2);
|
|
25614
|
-
class Ju extends
|
|
25623
|
+
class Ju extends dh {
|
|
25615
25624
|
constructor() {
|
|
25616
25625
|
super(...arguments);
|
|
25617
25626
|
r(this, "type", 1);
|
|
@@ -25852,7 +25861,7 @@ vt([
|
|
|
25852
25861
|
Qa()
|
|
25853
25862
|
], Eo.prototype, "vertices", 2);
|
|
25854
25863
|
const fp = Symbol("spriteOwner");
|
|
25855
|
-
class
|
|
25864
|
+
class Hc {
|
|
25856
25865
|
constructor() {
|
|
25857
25866
|
r(this, "sprites");
|
|
25858
25867
|
this.sprites = [];
|
|
@@ -25860,7 +25869,7 @@ class Vc {
|
|
|
25860
25869
|
}
|
|
25861
25870
|
vt([
|
|
25862
25871
|
f(Eo)
|
|
25863
|
-
],
|
|
25872
|
+
], Hc.prototype, "sprites", 2);
|
|
25864
25873
|
const zm = class {
|
|
25865
25874
|
// we don't assign anything here because it's used by the serialization system.
|
|
25866
25875
|
// there's currently a limitation in the serializer when e.g. spriteSheet is already assigned it will not be overriden by the serializer
|
|
@@ -25871,7 +25880,7 @@ const zm = class {
|
|
|
25871
25880
|
}
|
|
25872
25881
|
static create() {
|
|
25873
25882
|
const s = new zm();
|
|
25874
|
-
return s.spriteSheet = new
|
|
25883
|
+
return s.spriteSheet = new Hc(), s;
|
|
25875
25884
|
}
|
|
25876
25885
|
clone() {
|
|
25877
25886
|
const s = new zm();
|
|
@@ -25881,7 +25890,7 @@ const zm = class {
|
|
|
25881
25890
|
* Set the sprite to be rendered in the currently assigned sprite sheet at the currently active index {@link index}
|
|
25882
25891
|
*/
|
|
25883
25892
|
set sprite(s) {
|
|
25884
|
-
s && (this.spriteSheet ? ((this.index === null || this.index === void 0) && (this.index = 0), this.spriteSheet.sprites[this.index] = s) : (this.spriteSheet = new
|
|
25893
|
+
s && (this.spriteSheet ? ((this.index === null || this.index === void 0) && (this.index = 0), this.spriteSheet.sprites[this.index] = s) : (this.spriteSheet = new Hc(), this.spriteSheet.sprites = [s], this.index = 0));
|
|
25885
25894
|
}
|
|
25886
25895
|
/** The currently active sprite */
|
|
25887
25896
|
get sprite() {
|
|
@@ -25906,7 +25915,7 @@ const zm = class {
|
|
|
25906
25915
|
};
|
|
25907
25916
|
let wr = zm;
|
|
25908
25917
|
vt([
|
|
25909
|
-
f(
|
|
25918
|
+
f(Hc)
|
|
25910
25919
|
], wr.prototype, "spriteSheet", 2);
|
|
25911
25920
|
vt([
|
|
25912
25921
|
f()
|
|
@@ -26529,16 +26538,16 @@ function a2(s, t) {
|
|
|
26529
26538
|
let e = t !== s;
|
|
26530
26539
|
return !e && s && t && (Array.isArray(s) && Array.isArray(t) || typeof s == "object" && typeof t == "object") && (e = !0), e;
|
|
26531
26540
|
}
|
|
26532
|
-
const
|
|
26541
|
+
const wc = Symbol("AutoSyncHandler");
|
|
26533
26542
|
function l2(s) {
|
|
26534
|
-
if (s[
|
|
26535
|
-
return s[
|
|
26543
|
+
if (s[wc])
|
|
26544
|
+
return s[wc];
|
|
26536
26545
|
const t = ey.getOrCreateSyncer(s);
|
|
26537
|
-
return t == null || t.init(s), s[
|
|
26546
|
+
return t == null || t.init(s), s[wc] = t, t;
|
|
26538
26547
|
}
|
|
26539
26548
|
function c2(s) {
|
|
26540
|
-
const t = s[
|
|
26541
|
-
t && (ey.removeSyncer(t), t.destroy(), delete s[
|
|
26549
|
+
const t = s[wc];
|
|
26550
|
+
t && (ey.removeSyncer(t), t.destroy(), delete s[wc]);
|
|
26542
26551
|
}
|
|
26543
26552
|
const xw = function(s = null) {
|
|
26544
26553
|
return function(t, e) {
|
|
@@ -26688,16 +26697,16 @@ const Yt = x("debugplayersync"), Sw = class extends I {
|
|
|
26688
26697
|
});
|
|
26689
26698
|
}
|
|
26690
26699
|
};
|
|
26691
|
-
let
|
|
26700
|
+
let uh = Sw;
|
|
26692
26701
|
ef([
|
|
26693
26702
|
f()
|
|
26694
|
-
],
|
|
26703
|
+
], uh.prototype, "autoSync", 2);
|
|
26695
26704
|
ef([
|
|
26696
26705
|
f(re)
|
|
26697
|
-
],
|
|
26706
|
+
], uh.prototype, "asset", 2);
|
|
26698
26707
|
ef([
|
|
26699
26708
|
f(xe)
|
|
26700
|
-
],
|
|
26709
|
+
], uh.prototype, "onPlayerSpawned", 2);
|
|
26701
26710
|
var u2 = /* @__PURE__ */ ((s) => (s.OwnerChanged = "ownerChanged", s))(u2 || {}), Vl;
|
|
26702
26711
|
const Rt = (Vl = class extends I {
|
|
26703
26712
|
constructor() {
|
|
@@ -27501,7 +27510,7 @@ const da = (Up = class extends I {
|
|
|
27501
27510
|
*/
|
|
27502
27511
|
onEnable() {
|
|
27503
27512
|
var t, e;
|
|
27504
|
-
window.location.protocol !== "https:" && ve('<a href="https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API" target="_blank">WebXR</a> only works on secure connections (https).'), this.useQuicklookExport && (S.findObjectOfType(Ge) || (El && console.log("WebXR: Adding USDZExporter"), this._usdzExporter = S.addComponent(this.gameObject, Ge), this._usdzExporter.objectToExport = this.context.scene, this._usdzExporter.autoExportAnimations = !0, this._usdzExporter.autoExportAudioSources = !0)), this.handleCreatingHTML(), this.handleOfferSession(), this.defaultAvatar === !0 && (El && console.warn("WebXR: No default avatar set, using static default avatar"), this.defaultAvatar = new re("https://cdn.needle.tools/static/avatars/DefaultAvatar.glb")), this.defaultAvatar && (this._playerSync = this.gameObject.getOrAddComponent(
|
|
27513
|
+
window.location.protocol !== "https:" && ve('<a href="https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API" target="_blank">WebXR</a> only works on secure connections (https).'), this.useQuicklookExport && (S.findObjectOfType(Ge) || (El && console.log("WebXR: Adding USDZExporter"), this._usdzExporter = S.addComponent(this.gameObject, Ge), this._usdzExporter.objectToExport = this.context.scene, this._usdzExporter.autoExportAnimations = !0, this._usdzExporter.autoExportAudioSources = !0)), this.handleCreatingHTML(), this.handleOfferSession(), this.defaultAvatar === !0 && (El && console.warn("WebXR: No default avatar set, using static default avatar"), this.defaultAvatar = new re("https://cdn.needle.tools/static/avatars/DefaultAvatar.glb")), this.defaultAvatar && (this._playerSync = this.gameObject.getOrAddComponent(uh), this._playerSync.autoSync = !1), this._playerSync && typeof this.defaultAvatar != "boolean" && (this._playerSync.asset = this.defaultAvatar, (t = this._playerSync.onPlayerSpawned) == null || t.removeEventListener(this.onAvatarSpawned), (e = this._playerSync.onPlayerSpawned) == null || e.addEventListener(this.onAvatarSpawned));
|
|
27505
27514
|
}
|
|
27506
27515
|
/**
|
|
27507
27516
|
* Cleans up resources when the component is disabled.
|
|
@@ -27765,7 +27774,7 @@ wt([
|
|
|
27765
27774
|
wt([
|
|
27766
27775
|
f(re)
|
|
27767
27776
|
], et.prototype, "defaultAvatar", 2);
|
|
27768
|
-
const
|
|
27777
|
+
const Jh = x("debugusdzbehaviours");
|
|
27769
27778
|
class Cw {
|
|
27770
27779
|
constructor() {
|
|
27771
27780
|
r(this, "behaviours", []);
|
|
@@ -27805,7 +27814,7 @@ class Cw {
|
|
|
27805
27814
|
l instanceof Promise && e.push(l);
|
|
27806
27815
|
}
|
|
27807
27816
|
}, !1);
|
|
27808
|
-
}),
|
|
27817
|
+
}), Jh && console.log("onBeforeBuildDocument: all components", this.behaviourComponents), Promise.all(e);
|
|
27809
27818
|
}
|
|
27810
27819
|
onExportObject(t, e, i) {
|
|
27811
27820
|
var n;
|
|
@@ -27816,7 +27825,7 @@ class Cw {
|
|
|
27816
27825
|
for (const u of this.behaviourComponents)
|
|
27817
27826
|
typeof u.afterCreateDocument == "function" && u.afterCreateDocument(this, t);
|
|
27818
27827
|
this.behaviourComponentsCopy = this.behaviourComponents.slice(), this.behaviourComponents.length = 0, this.audioClipsCopy = this.audioClips.slice(), this.audioClips.length = 0;
|
|
27819
|
-
const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a =
|
|
27828
|
+
const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a = Jh;
|
|
27820
27829
|
let l = `graph LR
|
|
27821
27830
|
`, c = "";
|
|
27822
27831
|
function h(u) {
|
|
@@ -27913,7 +27922,7 @@ axisFormat %s
|
|
|
27913
27922
|
n.add(p.uuid);
|
|
27914
27923
|
else
|
|
27915
27924
|
n.add(u.uuid);
|
|
27916
|
-
|
|
27925
|
+
Jh && console.log("All Behavior trigger sources and action targets", e, i, n), this.targetUuids = new Set(n);
|
|
27917
27926
|
}
|
|
27918
27927
|
onAfterHierarchy(t, e) {
|
|
27919
27928
|
var i;
|
|
@@ -27925,7 +27934,7 @@ axisFormat %s
|
|
|
27925
27934
|
}
|
|
27926
27935
|
}
|
|
27927
27936
|
async onAfterSerialize(t) {
|
|
27928
|
-
|
|
27937
|
+
Jh && console.log("onAfterSerialize behaviours", this.behaviourComponentsCopy);
|
|
27929
27938
|
for (const e of this.behaviourComponentsCopy)
|
|
27930
27939
|
typeof e.afterSerialize == "function" && (e.afterSerialize.constructor.name === "AsyncFunction" ? await e.afterSerialize(this, t) : e.afterSerialize(this, t));
|
|
27931
27940
|
for (const { clipUrl: e, filesKey: i } of this.audioClipsCopy) {
|
|
@@ -27960,10 +27969,10 @@ class Pw {
|
|
|
27960
27969
|
var p;
|
|
27961
27970
|
c.beginBlock('def RealityKitComponent "Collider"', "{", !0), c.appendLine("uint group = 1"), c.appendLine('uniform token info:id = "RealityKit.Collider"'), c.appendLine("uint mask = 4294967295");
|
|
27962
27971
|
const u = l.isTrigger ? "Trigger" : "Default";
|
|
27963
|
-
if (c.appendLine(`token type = "${u}"`), c.beginBlock('def RealityKitStruct "Shape"', "{", !0), l instanceof
|
|
27972
|
+
if (c.appendLine(`token type = "${u}"`), c.beginBlock('def RealityKitStruct "Shape"', "{", !0), l instanceof sh) {
|
|
27964
27973
|
const m = l;
|
|
27965
27974
|
c.appendLine('token shapeType = "Sphere"'), c.appendLine(`float radius = ${m.radius}`);
|
|
27966
|
-
} else if (l instanceof
|
|
27975
|
+
} else if (l instanceof oh) {
|
|
27967
27976
|
const m = l;
|
|
27968
27977
|
c.appendLine('token shapeType = "Box"'), c.appendLine(`float3 extent = (${m.size.x}, ${m.size.y}, ${m.size.z})`);
|
|
27969
27978
|
} else if (l instanceof Mo) {
|
|
@@ -28060,7 +28069,7 @@ class Sn extends I {
|
|
|
28060
28069
|
const l = this._parentComponent.shadowComponent;
|
|
28061
28070
|
l && (l == null || l.add(e), o = !0);
|
|
28062
28071
|
}
|
|
28063
|
-
this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent),
|
|
28072
|
+
this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent), Kc && e.add(new Mi(0.5)), this.onAfterAddedToScene(), o && MS(), P2 && console.warn("Added shadow component", this.shadowComponent);
|
|
28064
28073
|
}
|
|
28065
28074
|
setShadowComponentOwner(e) {
|
|
28066
28075
|
if (e && (e[xi] === void 0 || e[xi] === this) && (e[xi] = this, e.children))
|
|
@@ -28089,7 +28098,7 @@ class nf extends Sn {
|
|
|
28089
28098
|
super.awake();
|
|
28090
28099
|
}
|
|
28091
28100
|
}
|
|
28092
|
-
var O2 = Object.defineProperty, M2 = Object.getOwnPropertyDescriptor,
|
|
28101
|
+
var O2 = Object.defineProperty, M2 = Object.getOwnPropertyDescriptor, fh = (s, t, e, i) => {
|
|
28093
28102
|
for (var n = i > 1 ? void 0 : i ? M2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28094
28103
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28095
28104
|
return i && n && O2(t, e, n), n;
|
|
@@ -28109,7 +28118,7 @@ class k2 {
|
|
|
28109
28118
|
r(this, "height");
|
|
28110
28119
|
}
|
|
28111
28120
|
}
|
|
28112
|
-
const un = new v(), Il = new se(),
|
|
28121
|
+
const un = new v(), Il = new se(), ed = new W(), Ow = class extends Sn {
|
|
28113
28122
|
constructor() {
|
|
28114
28123
|
super(...arguments);
|
|
28115
28124
|
r(this, "_anchoredPosition");
|
|
@@ -28224,7 +28233,7 @@ const un = new v(), Il = new se(), Jh = new W(), Ow = class extends Sn {
|
|
|
28224
28233
|
const e = this.shadowComponent;
|
|
28225
28234
|
if (!e)
|
|
28226
28235
|
return;
|
|
28227
|
-
this.gameObject.parent ? this._parentRectTransform = S.getComponentInParent(this.gameObject.parent, Ow) : this._parentRectTransform = void 0, this._transformNeedsUpdate = !1, yp && console.warn("RectTransform → ApplyTransform", this.name + " because " + t), this.isRoot() ? this.Root.screenspace || (e.rotation.y = Math.PI) : (e.matrix.identity(), e.matrixAutoUpdate = !1, un.set(0, 0, 0), this.applyPivot(un), e.matrix.setPosition(un.x, un.y, 0), (this.gameObject.quaternion.x || this.gameObject.quaternion.y || this.gameObject.quaternion.z) && (
|
|
28236
|
+
this.gameObject.parent ? this._parentRectTransform = S.getComponentInParent(this.gameObject.parent, Ow) : this._parentRectTransform = void 0, this._transformNeedsUpdate = !1, yp && console.warn("RectTransform → ApplyTransform", this.name + " because " + t), this.isRoot() ? this.Root.screenspace || (e.rotation.y = Math.PI) : (e.matrix.identity(), e.matrixAutoUpdate = !1, un.set(0, 0, 0), this.applyPivot(un), e.matrix.setPosition(un.x, un.y, 0), (this.gameObject.quaternion.x || this.gameObject.quaternion.y || this.gameObject.quaternion.z) && (ed.copy(this.gameObject.quaternion), ed.x *= -1, ed.z *= -1, Il.makeRotationFromQuaternion(ed), e.matrix.premultiply(Il)), un.set(0, 0, 0), this.applyAnchoring(un), (n = this.canvas) != null && n.screenspace ? un.z += 0.1 : un.z += 0.01, Il.identity(), Il.setPosition(un.x, un.y, un.z), e.matrix.premultiply(Il), e.matrix.scale(this.gameObject.scale)), this.lastMatrix.copy(this.gameObject.matrix);
|
|
28228
28237
|
const i = !0;
|
|
28229
28238
|
for (const o of Ig(this.gameObject, Sn, i, 1)) {
|
|
28230
28239
|
if (o === this || !o.activeAndEnabled)
|
|
@@ -28298,19 +28307,19 @@ const un = new v(), Il = new se(), Jh = new W(), Ow = class extends Sn {
|
|
|
28298
28307
|
}
|
|
28299
28308
|
};
|
|
28300
28309
|
let ii = Ow;
|
|
28301
|
-
|
|
28310
|
+
fh([
|
|
28302
28311
|
f(oe)
|
|
28303
28312
|
], ii.prototype, "anchoredPosition", 1);
|
|
28304
|
-
|
|
28313
|
+
fh([
|
|
28305
28314
|
f(oe)
|
|
28306
28315
|
], ii.prototype, "sizeDelta", 2);
|
|
28307
|
-
|
|
28316
|
+
fh([
|
|
28308
28317
|
f(oe)
|
|
28309
28318
|
], ii.prototype, "pivot", 2);
|
|
28310
|
-
|
|
28319
|
+
fh([
|
|
28311
28320
|
f(oe)
|
|
28312
28321
|
], ii.prototype, "anchorMin", 2);
|
|
28313
|
-
|
|
28322
|
+
fh([
|
|
28314
28323
|
f(oe)
|
|
28315
28324
|
], ii.prototype, "anchorMax", 2);
|
|
28316
28325
|
var T2 = Object.defineProperty, A2 = Object.getOwnPropertyDescriptor, Mw = (s, t, e, i) => {
|
|
@@ -28318,7 +28327,7 @@ var T2 = Object.defineProperty, A2 = Object.getOwnPropertyDescriptor, Mw = (s, t
|
|
|
28318
28327
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28319
28328
|
return i && n && T2(t, e, n), n;
|
|
28320
28329
|
};
|
|
28321
|
-
class
|
|
28330
|
+
class ph extends I {
|
|
28322
28331
|
constructor() {
|
|
28323
28332
|
super(...arguments);
|
|
28324
28333
|
r(this, "effectColor");
|
|
@@ -28327,16 +28336,16 @@ class fh extends I {
|
|
|
28327
28336
|
}
|
|
28328
28337
|
Mw([
|
|
28329
28338
|
f(ce)
|
|
28330
|
-
],
|
|
28339
|
+
], ph.prototype, "effectColor", 2);
|
|
28331
28340
|
Mw([
|
|
28332
28341
|
f(oe)
|
|
28333
|
-
],
|
|
28342
|
+
], ph.prototype, "effectDistance", 2);
|
|
28334
28343
|
var E2 = Object.defineProperty, I2 = Object.getOwnPropertyDescriptor, Rw = (s, t, e, i) => {
|
|
28335
28344
|
for (var n = i > 1 ? void 0 : i ? I2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28336
28345
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28337
28346
|
return i && n && E2(t, e, n), n;
|
|
28338
28347
|
};
|
|
28339
|
-
const
|
|
28348
|
+
const td = {
|
|
28340
28349
|
backgroundColor: new le(1, 1, 1),
|
|
28341
28350
|
backgroundOpacity: 1,
|
|
28342
28351
|
borderColor: new le(1, 1, 1),
|
|
@@ -28371,7 +28380,7 @@ const ec = (Np = class extends Sn {
|
|
|
28371
28380
|
return this._alphaFactor;
|
|
28372
28381
|
}
|
|
28373
28382
|
onColorChanged() {
|
|
28374
|
-
this.uiObject && (this.sRGBColor.copy(this._color), this.sRGBColor.convertLinearToSRGB(),
|
|
28383
|
+
this.uiObject && (this.sRGBColor.copy(this._color), this.sRGBColor.convertLinearToSRGB(), td.backgroundColor = this.sRGBColor, td.backgroundOpacity = this._color.alpha * this._alphaFactor, this.applyEffects(td, this._alphaFactor), this.uiObject.set(td), this.markDirty());
|
|
28375
28384
|
}
|
|
28376
28385
|
// used via animations
|
|
28377
28386
|
get m_Color() {
|
|
@@ -28429,7 +28438,7 @@ const ec = (Np = class extends Sn {
|
|
|
28429
28438
|
}
|
|
28430
28439
|
applyEffects(t, e = 1) {
|
|
28431
28440
|
var n;
|
|
28432
|
-
const i = (n = this.gameObject) == null ? void 0 : n.getComponent(
|
|
28441
|
+
const i = (n = this.gameObject) == null ? void 0 : n.getComponent(ph);
|
|
28433
28442
|
i && (i.effectDistance && (t.borderWidth = Math.max(Math.abs(i.effectDistance.x), Math.abs(i.effectDistance.y))), i.effectColor && (t.borderColor = i.effectColor, t.borderOpacity = i.effectColor.alpha * e));
|
|
28434
28443
|
}
|
|
28435
28444
|
async setTexture(t) {
|
|
@@ -29629,8 +29638,8 @@ Et([
|
|
|
29629
29638
|
Et([
|
|
29630
29639
|
f()
|
|
29631
29640
|
], al.prototype, "callToActionURL", 2);
|
|
29632
|
-
var
|
|
29633
|
-
const Um = (
|
|
29641
|
+
var dd;
|
|
29642
|
+
const Um = (dd = class extends I {
|
|
29634
29643
|
constructor() {
|
|
29635
29644
|
super(...arguments);
|
|
29636
29645
|
r(this, "objectToExport");
|
|
@@ -29679,12 +29688,12 @@ const Um = (hd = class extends I {
|
|
|
29679
29688
|
onEnable() {
|
|
29680
29689
|
var i;
|
|
29681
29690
|
const t = X.supportsQuickLookAR(), e = X.isiOS() || X.isiPad();
|
|
29682
|
-
!this.button && (pi || t || e) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = Rb(this.context, t), this.link.addEventListener("message", this.lastCallback)), pi && We("USDZ Exporter enabled: " + this.name), (i = document.getElementById("open-in-ar")) == null || i.addEventListener("click", this.onClickedOpenInARElement),
|
|
29691
|
+
!this.button && (pi || t || e) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = Rb(this.context, t), this.link.addEventListener("message", this.lastCallback)), pi && We("USDZ Exporter enabled: " + this.name), (i = document.getElementById("open-in-ar")) == null || i.addEventListener("click", this.onClickedOpenInARElement), zc.registerExporter(this);
|
|
29683
29692
|
}
|
|
29684
29693
|
/** @internal */
|
|
29685
29694
|
onDisable() {
|
|
29686
29695
|
var t, e, i;
|
|
29687
|
-
(t = this.button) == null || t.remove(), (e = this.link) == null || e.removeEventListener("message", this.lastCallback), pi && We("USDZ Exporter disabled: " + this.name), (i = document.getElementById("open-in-ar")) == null || i.removeEventListener("click", this.onClickedOpenInARElement),
|
|
29696
|
+
(t = this.button) == null || t.remove(), (e = this.link) == null || e.removeEventListener("message", this.lastCallback), pi && We("USDZ Exporter disabled: " + this.name), (i = document.getElementById("open-in-ar")) == null || i.removeEventListener("click", this.onClickedOpenInARElement), zc.unregisterExporter(this);
|
|
29688
29697
|
}
|
|
29689
29698
|
/**
|
|
29690
29699
|
* Creates an USDZ file from the current scene or assigned objectToExport and opens it in QuickLook.
|
|
@@ -29870,7 +29879,7 @@ const Um = (hd = class extends I {
|
|
|
29870
29879
|
const e = So.getOrCreate().createQuicklookButton();
|
|
29871
29880
|
return e.parentNode || this.context.menu.appendChild(e), e;
|
|
29872
29881
|
}
|
|
29873
|
-
}, r(
|
|
29882
|
+
}, r(dd, "invertForwardMatrix", new se().makeRotationY(Math.PI)), r(dd, "invertForwardQuaternion", new W().setFromEuler(new Bt(0, Math.PI, 0))), dd);
|
|
29874
29883
|
let Ge = Um;
|
|
29875
29884
|
Et([
|
|
29876
29885
|
f(L)
|
|
@@ -29916,7 +29925,7 @@ var K2 = Object.defineProperty, Z2 = Object.getOwnPropertyDescriptor, oy = (s, t
|
|
|
29916
29925
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29917
29926
|
return i && n && K2(t, e, n), n;
|
|
29918
29927
|
};
|
|
29919
|
-
class
|
|
29928
|
+
class mh extends I {
|
|
29920
29929
|
constructor() {
|
|
29921
29930
|
super(...arguments);
|
|
29922
29931
|
r(this, "_fog");
|
|
@@ -29954,13 +29963,13 @@ class ph extends I {
|
|
|
29954
29963
|
}
|
|
29955
29964
|
oy([
|
|
29956
29965
|
f()
|
|
29957
|
-
],
|
|
29966
|
+
], mh.prototype, "near", 1);
|
|
29958
29967
|
oy([
|
|
29959
29968
|
f()
|
|
29960
|
-
],
|
|
29969
|
+
], mh.prototype, "far", 1);
|
|
29961
29970
|
oy([
|
|
29962
29971
|
f(le)
|
|
29963
|
-
],
|
|
29972
|
+
], mh.prototype, "color", 1);
|
|
29964
29973
|
var J2 = Object.defineProperty, eT = Object.getOwnPropertyDescriptor, ry = (s, t, e, i) => {
|
|
29965
29974
|
for (var n = i > 1 ? void 0 : i ? eT(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29966
29975
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
@@ -29976,7 +29985,7 @@ class ll extends I {
|
|
|
29976
29985
|
r(this, "_boxHelper", null);
|
|
29977
29986
|
}
|
|
29978
29987
|
onEnable() {
|
|
29979
|
-
this.isGizmo && !
|
|
29988
|
+
this.isGizmo && !Kc || (this._gizmoObject || (this.objectBounds ? this._gizmoObject = new R1(this.gameObject, this.color ?? 16776960) : (this.objectBounds = !1, this._gizmoObject = Og(this.color ?? 16776960))), this.objectBounds ? (this.scene.add(this._gizmoObject), this._boxHelper = this._gizmoObject, this.startCoroutine(this.syncObjectBounds(), Re.OnBeforeRender)) : this.gameObject.add(this._gizmoObject));
|
|
29980
29989
|
}
|
|
29981
29990
|
onDisable() {
|
|
29982
29991
|
this._gizmoObject && this.gameObject.remove(this._gizmoObject);
|
|
@@ -30001,7 +30010,7 @@ var tT = Object.defineProperty, iT = Object.getOwnPropertyDescriptor, ay = (s, t
|
|
|
30001
30010
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
30002
30011
|
return i && n && tT(t, e, n), n;
|
|
30003
30012
|
};
|
|
30004
|
-
class
|
|
30013
|
+
class gh extends I {
|
|
30005
30014
|
constructor() {
|
|
30006
30015
|
super(...arguments);
|
|
30007
30016
|
r(this, "isGizmo", !1);
|
|
@@ -30014,7 +30023,7 @@ class mh extends I {
|
|
|
30014
30023
|
}
|
|
30015
30024
|
/** @internal */
|
|
30016
30025
|
onEnable() {
|
|
30017
|
-
if (this.isGizmo && !
|
|
30026
|
+
if (this.isGizmo && !Kc)
|
|
30018
30027
|
return;
|
|
30019
30028
|
const e = this.size, i = this.divisions;
|
|
30020
30029
|
this.gridHelper || (this.gridHelper = new ng(e, i, this.color0 ?? new le(0.4, 0.4, 0.4), this.color1 ?? new le(0.6, 0.6, 0.6)), this.offset !== void 0 && (this.gridHelper.position.y += this.offset)), this.gridHelper && this.gameObject.add(this.gridHelper);
|
|
@@ -30026,13 +30035,13 @@ class mh extends I {
|
|
|
30026
30035
|
}
|
|
30027
30036
|
ay([
|
|
30028
30037
|
f()
|
|
30029
|
-
],
|
|
30038
|
+
], gh.prototype, "isGizmo", 2);
|
|
30030
30039
|
ay([
|
|
30031
30040
|
f(le)
|
|
30032
|
-
],
|
|
30041
|
+
], gh.prototype, "color0", 2);
|
|
30033
30042
|
ay([
|
|
30034
30043
|
f(le)
|
|
30035
|
-
],
|
|
30044
|
+
], gh.prototype, "color1", 2);
|
|
30036
30045
|
var nT = Object.defineProperty, sT = Object.getOwnPropertyDescriptor, ly = (s, t, e, i) => {
|
|
30037
30046
|
for (var n = i > 1 ? void 0 : i ? sT(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
30038
30047
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
@@ -30365,28 +30374,28 @@ Zn([
|
|
|
30365
30374
|
f()
|
|
30366
30375
|
], Di.prototype, "shadowResolution", 1);
|
|
30367
30376
|
new v(0, 0, 0);
|
|
30368
|
-
var aT = Object.defineProperty, lT = Object.getOwnPropertyDescriptor,
|
|
30377
|
+
var aT = Object.defineProperty, lT = Object.getOwnPropertyDescriptor, yh = (s, t, e, i) => {
|
|
30369
30378
|
for (var n = i > 1 ? void 0 : i ? lT(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
30370
30379
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
30371
30380
|
return i && n && aT(t, e, n), n;
|
|
30372
30381
|
};
|
|
30373
30382
|
const wp = x("debuglods"), cT = x("nolods");
|
|
30374
|
-
class
|
|
30383
|
+
class _h {
|
|
30375
30384
|
constructor() {
|
|
30376
30385
|
r(this, "screenRelativeTransitionHeight");
|
|
30377
30386
|
r(this, "distance");
|
|
30378
30387
|
r(this, "renderers");
|
|
30379
30388
|
}
|
|
30380
30389
|
}
|
|
30381
|
-
|
|
30390
|
+
yh([
|
|
30382
30391
|
f()
|
|
30383
|
-
],
|
|
30384
|
-
|
|
30392
|
+
], _h.prototype, "screenRelativeTransitionHeight", 2);
|
|
30393
|
+
yh([
|
|
30385
30394
|
f()
|
|
30386
|
-
],
|
|
30387
|
-
|
|
30395
|
+
], _h.prototype, "distance", 2);
|
|
30396
|
+
yh([
|
|
30388
30397
|
f(Je)
|
|
30389
|
-
],
|
|
30398
|
+
], _h.prototype, "renderers", 2);
|
|
30390
30399
|
class hT {
|
|
30391
30400
|
constructor(t) {
|
|
30392
30401
|
r(this, "model");
|
|
@@ -30472,18 +30481,18 @@ class rf extends I {
|
|
|
30472
30481
|
}
|
|
30473
30482
|
}
|
|
30474
30483
|
}
|
|
30475
|
-
|
|
30484
|
+
yh([
|
|
30476
30485
|
f(v)
|
|
30477
30486
|
], rf.prototype, "localReferencePoint", 2);
|
|
30478
|
-
|
|
30479
|
-
f(
|
|
30487
|
+
yh([
|
|
30488
|
+
f(_h)
|
|
30480
30489
|
], rf.prototype, "lodModels", 2);
|
|
30481
30490
|
var dT = Object.defineProperty, uT = Object.getOwnPropertyDescriptor, fT = (s, t, e, i) => {
|
|
30482
30491
|
for (var n = i > 1 ? void 0 : i ? uT(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
30483
30492
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
30484
30493
|
return i && n && dT(t, e, n), n;
|
|
30485
30494
|
};
|
|
30486
|
-
const
|
|
30495
|
+
const id = x("debugnestedgltf");
|
|
30487
30496
|
class hy extends I {
|
|
30488
30497
|
constructor() {
|
|
30489
30498
|
super(...arguments);
|
|
@@ -30509,16 +30518,16 @@ class hy extends I {
|
|
|
30509
30518
|
var i, n, o, a, l;
|
|
30510
30519
|
if (this._isLoadingOrDoneLoading)
|
|
30511
30520
|
return;
|
|
30512
|
-
|
|
30521
|
+
id && console.log(this, this.guid);
|
|
30513
30522
|
const e = this.gameObject.parent;
|
|
30514
30523
|
if (e) {
|
|
30515
30524
|
this._isLoadingOrDoneLoading = !0;
|
|
30516
30525
|
const c = new Qn();
|
|
30517
30526
|
c.idProvider = new Ft(this.hash(this.guid)), c.parent = this.loadAssetInParent !== !1 ? e : this.gameObject, this.gameObject.updateMatrix();
|
|
30518
30527
|
const h = this.gameObject.matrix;
|
|
30519
|
-
|
|
30528
|
+
id && console.log("Load nested:", ((i = this.filePath) == null ? void 0 : i.url) ?? this.filePath, this.gameObject.position);
|
|
30520
30529
|
const d = await ((o = (n = this.filePath) == null ? void 0 : n.instantiate) == null ? void 0 : o.call(this.filePath, c));
|
|
30521
|
-
|
|
30530
|
+
id && console.log("Nested loaded:", ((a = this.filePath) == null ? void 0 : a.url) ?? this.filePath, d), d && this.loadAssetInParent !== !1 && (d.matrixAutoUpdate = !1, d.matrix.identity(), d.applyMatrix4(h), d.matrixAutoUpdate = !0, d.layers.disableAll(), d.layers.set(this.layer), this.dispatchEvent(new CustomEvent("loaded", { detail: { instance: d, assetReference: this.filePath } }))), id && console.log("Nested loading done:", ((l = this.filePath) == null ? void 0 : l.url) ?? this.filePath, d);
|
|
30522
30531
|
}
|
|
30523
30532
|
}
|
|
30524
30533
|
/** @internal */
|
|
@@ -30597,16 +30606,16 @@ const gT = x("debugnet"), Nm = class extends I {
|
|
|
30597
30606
|
return ui(t);
|
|
30598
30607
|
}
|
|
30599
30608
|
};
|
|
30600
|
-
let
|
|
30609
|
+
let bh = Nm;
|
|
30601
30610
|
dy([
|
|
30602
30611
|
f()
|
|
30603
|
-
],
|
|
30612
|
+
], bh.prototype, "url", 2);
|
|
30604
30613
|
dy([
|
|
30605
30614
|
f()
|
|
30606
|
-
],
|
|
30615
|
+
], bh.prototype, "urlParameterName", 2);
|
|
30607
30616
|
dy([
|
|
30608
30617
|
f()
|
|
30609
|
-
],
|
|
30618
|
+
], bh.prototype, "localhost", 2);
|
|
30610
30619
|
var yT = Object.defineProperty, _T = Object.getOwnPropertyDescriptor, af = (s, t, e, i) => {
|
|
30611
30620
|
for (var n = i > 1 ? void 0 : i ? _T(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
30612
30621
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
@@ -30757,16 +30766,16 @@ const ic = class {
|
|
|
30757
30766
|
return p * w + m * b + g * _ + y;
|
|
30758
30767
|
}
|
|
30759
30768
|
};
|
|
30760
|
-
let
|
|
30769
|
+
let vh = ic;
|
|
30761
30770
|
Do([
|
|
30762
30771
|
f(Pi)
|
|
30763
|
-
],
|
|
30772
|
+
], vh.prototype, "keys", 2);
|
|
30764
30773
|
var wT = Object.defineProperty, xT = Object.getOwnPropertyDescriptor, P = (s, t, e, i) => {
|
|
30765
30774
|
for (var n = i > 1 ? void 0 : i ? xT(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
30766
30775
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
30767
30776
|
return i && n && wT(t, e, n), n;
|
|
30768
30777
|
};
|
|
30769
|
-
const
|
|
30778
|
+
const nd = x("debugparticles");
|
|
30770
30779
|
var gs = /* @__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))(gs || {});
|
|
30771
30780
|
class hl {
|
|
30772
30781
|
constructor() {
|
|
@@ -30807,7 +30816,7 @@ P([
|
|
|
30807
30816
|
P([
|
|
30808
30817
|
f()
|
|
30809
30818
|
], hl.prototype, "colorKeys", 2);
|
|
30810
|
-
var
|
|
30819
|
+
var Gc = /* @__PURE__ */ ((s) => (s[s.Local = 0] = "Local", s[s.World = 1] = "World", s[s.Custom = 2] = "Custom", s))(Gc || {}), $m = /* @__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))($m || {});
|
|
30811
30820
|
const nc = class {
|
|
30812
30821
|
constructor() {
|
|
30813
30822
|
r(this, "mode", "Constant");
|
|
@@ -30910,19 +30919,19 @@ P([
|
|
|
30910
30919
|
f()
|
|
30911
30920
|
], Q.prototype, "constantMax", 2);
|
|
30912
30921
|
P([
|
|
30913
|
-
f(
|
|
30922
|
+
f(vh)
|
|
30914
30923
|
], Q.prototype, "curve", 2);
|
|
30915
30924
|
P([
|
|
30916
|
-
f(
|
|
30925
|
+
f(vh)
|
|
30917
30926
|
], Q.prototype, "curveMin", 2);
|
|
30918
30927
|
P([
|
|
30919
|
-
f(
|
|
30928
|
+
f(vh)
|
|
30920
30929
|
], Q.prototype, "curveMax", 2);
|
|
30921
30930
|
P([
|
|
30922
30931
|
f()
|
|
30923
30932
|
], Q.prototype, "curveMultiplier", 2);
|
|
30924
|
-
var
|
|
30925
|
-
const kt = (
|
|
30933
|
+
var ud;
|
|
30934
|
+
const kt = (ud = class {
|
|
30926
30935
|
constructor() {
|
|
30927
30936
|
r(this, "mode", 0);
|
|
30928
30937
|
r(this, "color");
|
|
@@ -30968,7 +30977,7 @@ const kt = (dd = class {
|
|
|
30968
30977
|
}
|
|
30969
30978
|
return kt._temp.set(16777215), kt._temp.alpha = 1, kt._temp;
|
|
30970
30979
|
}
|
|
30971
|
-
}, r(
|
|
30980
|
+
}, r(ud, "_temp", new ce(0, 0, 0, 1)), r(ud, "_temp2", new ce(0, 0, 0, 1)), ud);
|
|
30972
30981
|
let ji = kt;
|
|
30973
30982
|
P([
|
|
30974
30983
|
f()
|
|
@@ -31212,8 +31221,8 @@ P([
|
|
|
31212
31221
|
P([
|
|
31213
31222
|
f(Q)
|
|
31214
31223
|
], dl.prototype, "z", 2);
|
|
31215
|
-
var
|
|
31216
|
-
const sc = (
|
|
31224
|
+
var fd;
|
|
31225
|
+
const sc = (fd = class {
|
|
31217
31226
|
constructor() {
|
|
31218
31227
|
r(this, "shapeType", 5);
|
|
31219
31228
|
r(this, "enabled", !0);
|
|
@@ -31249,7 +31258,7 @@ const sc = (ud = class {
|
|
|
31249
31258
|
r(this, "_dir", new v());
|
|
31250
31259
|
r(this, "_loopTime", 0);
|
|
31251
31260
|
r(this, "_loopDirection", 1);
|
|
31252
|
-
|
|
31261
|
+
nd && console.log(this);
|
|
31253
31262
|
}
|
|
31254
31263
|
// Emittershape start
|
|
31255
31264
|
get type() {
|
|
@@ -31284,7 +31293,7 @@ const sc = (ud = class {
|
|
|
31284
31293
|
if (e && (i *= this.system.worldScale.x), this.enabled) {
|
|
31285
31294
|
switch (this.shapeType) {
|
|
31286
31295
|
case 5:
|
|
31287
|
-
|
|
31296
|
+
nd && V.DrawWireBox(this.position, this.scale, 14540253, 1), this._vector.x = Math.random() * this.scale.x - this.scale.x / 2, this._vector.y = Math.random() * this.scale.y - this.scale.y / 2, this._vector.z = Math.random() * this.scale.z - this.scale.z / 2, this._vector.add(t);
|
|
31288
31297
|
break;
|
|
31289
31298
|
case 4:
|
|
31290
31299
|
this.randomConePoint(this.position, this.angle, i, this.radiusThickness, this.arc, this.arcMode, this._vector);
|
|
@@ -31331,7 +31340,7 @@ const sc = (ud = class {
|
|
|
31331
31340
|
}
|
|
31332
31341
|
this.randomizePosition(this._vector, this.randomPositionAmount);
|
|
31333
31342
|
}
|
|
31334
|
-
this.applyRotation(this._vector), e && (this._vector.applyQuaternion(this.system.worldQuaternion), this._vector.add(this.system.worldPos)),
|
|
31343
|
+
this.applyRotation(this._vector), e && (this._vector.applyQuaternion(this.system.worldQuaternion), this._vector.add(this.system.worldPos)), nd && V.DrawSphere(this._vector, 0.03, 16711680, 0.5, !0);
|
|
31335
31344
|
}
|
|
31336
31345
|
getDirection(s, t) {
|
|
31337
31346
|
var e;
|
|
@@ -31378,7 +31387,7 @@ const sc = (ud = class {
|
|
|
31378
31387
|
this._dir.set(0, 0, 1);
|
|
31379
31388
|
break;
|
|
31380
31389
|
}
|
|
31381
|
-
return this._space === 1 && this._dir.applyQuaternion(this.system.worldQuaternion), this.applyRotation(this._dir), this._dir.normalize(), this.spherizeDirection(this._dir, this.sphericalDirectionAmount), this.randomizeDirection(this._dir, this.randomDirectionAmount),
|
|
31390
|
+
return this._space === 1 && this._dir.applyQuaternion(this.system.worldQuaternion), this.applyRotation(this._dir), this._dir.normalize(), this.spherizeDirection(this._dir, this.sphericalDirectionAmount), this.randomizeDirection(this._dir, this.randomDirectionAmount), nd && (V.DrawSphere(t, 0.01, 8925952, 0.5, !0), V.DrawDirection(t, this._dir, 8925952, 0.5, !0)), this._dir;
|
|
31382
31391
|
}
|
|
31383
31392
|
randomizePosition(s, t) {
|
|
31384
31393
|
if (t <= 0)
|
|
@@ -31428,7 +31437,7 @@ const sc = (ud = class {
|
|
|
31428
31437
|
const d = Math.acos(2 * c - 1), u = $.lerp(1, 1 - Math.pow(1 - Math.random(), Math.PI), i) * e, p = s.x + -u * Math.sin(d) * Math.cos(h), m = s.y + u * Math.sin(d) * Math.sin(h), g = s.z;
|
|
31429
31438
|
a.x = p * this.scale.x, a.y = m * this.scale.y, a.z = g * this.scale.z;
|
|
31430
31439
|
}
|
|
31431
|
-
}, r(
|
|
31440
|
+
}, r(fd, "_randomQuat", new W()), r(fd, "_tempVec", new v()), fd);
|
|
31432
31441
|
let tt = sc;
|
|
31433
31442
|
P([
|
|
31434
31443
|
f()
|
|
@@ -32167,7 +32176,7 @@ P([
|
|
|
32167
32176
|
P([
|
|
32168
32177
|
f()
|
|
32169
32178
|
], Bi.prototype, "zMultiplier", 2);
|
|
32170
|
-
class
|
|
32179
|
+
class wh {
|
|
32171
32180
|
constructor() {
|
|
32172
32181
|
r(this, "enabled");
|
|
32173
32182
|
r(this, "range");
|
|
@@ -32180,13 +32189,13 @@ class vh {
|
|
|
32180
32189
|
}
|
|
32181
32190
|
P([
|
|
32182
32191
|
f()
|
|
32183
|
-
],
|
|
32192
|
+
], wh.prototype, "enabled", 2);
|
|
32184
32193
|
P([
|
|
32185
32194
|
f(oe)
|
|
32186
|
-
],
|
|
32195
|
+
], wh.prototype, "range", 2);
|
|
32187
32196
|
P([
|
|
32188
32197
|
f(ji)
|
|
32189
|
-
],
|
|
32198
|
+
], wh.prototype, "color", 2);
|
|
32190
32199
|
new v(1, 1, 1);
|
|
32191
32200
|
new v(0, 0, 1);
|
|
32192
32201
|
class zw {
|
|
@@ -32335,7 +32344,7 @@ He([
|
|
|
32335
32344
|
He([
|
|
32336
32345
|
f()
|
|
32337
32346
|
], On.prototype, "lengthScale", 2);
|
|
32338
|
-
class
|
|
32347
|
+
class sd {
|
|
32339
32348
|
constructor(t, e = 1) {
|
|
32340
32349
|
r(this, "_curve");
|
|
32341
32350
|
r(this, "_factor");
|
|
@@ -32516,7 +32525,7 @@ class LT extends Fr {
|
|
|
32516
32525
|
}
|
|
32517
32526
|
}
|
|
32518
32527
|
}
|
|
32519
|
-
const
|
|
32528
|
+
const od = Symbol("startVelocity"), Ib = Symbol("gravityModifier"), Cp = Symbol("gravitySpeed"), rd = Symbol("velocity lerp factor"), Gm = new v();
|
|
32520
32529
|
class DT extends Fr {
|
|
32521
32530
|
constructor() {
|
|
32522
32531
|
super(...arguments);
|
|
@@ -32528,26 +32537,26 @@ class DT extends Fr {
|
|
|
32528
32537
|
const i = this.system.main.simulationSpeed;
|
|
32529
32538
|
e.startSpeed = this.system.main.startSpeed.evaluate(Math.random(), Math.random());
|
|
32530
32539
|
const n = this.system.shape.getDirection(e, e.position);
|
|
32531
|
-
e.velocity.x = n.x * e.startSpeed, e.velocity.y = n.y * e.startSpeed, e.velocity.z = n.z * e.startSpeed, (a = this.system.inheritVelocity) != null && a.enabled && this.system.inheritVelocity.applyInitial(e.velocity), e[
|
|
32540
|
+
e.velocity.x = n.x * e.startSpeed, e.velocity.y = n.y * e.startSpeed, e.velocity.z = n.z * e.startSpeed, (a = this.system.inheritVelocity) != null && a.enabled && this.system.inheritVelocity.applyInitial(e.velocity), e[od] ? e[od].copy(e.velocity) : e[od] = e.velocity.clone();
|
|
32532
32541
|
const o = this.system.main.gravityModifier.evaluate(Math.random(), Math.random());
|
|
32533
|
-
e[Ib] = o * i, e[Cp] = o * i * 0.5, e[
|
|
32542
|
+
e[Ib] = o * i, e[Cp] = o * i * 0.5, e[rd] = Math.random(), (l = this.system.velocityOverLifetime) == null || l.init(e), this._gravityDirection.set(0, -1, 0), this.system.main.simulationSpace === Gc.Local && this._gravityDirection.applyQuaternion(this.system.worldQuaternionInverted).normalize();
|
|
32534
32543
|
}
|
|
32535
32544
|
update(e, i) {
|
|
32536
32545
|
var p;
|
|
32537
|
-
const n = e[
|
|
32546
|
+
const n = e[od], o = e[Ib];
|
|
32538
32547
|
if (o !== 0) {
|
|
32539
32548
|
const m = o * e[Cp];
|
|
32540
32549
|
Gm.copy(this._gravityDirection).multiplyScalar(m), e[Cp] += i * 0.05, n.add(Gm);
|
|
32541
32550
|
}
|
|
32542
32551
|
e.velocity.copy(n);
|
|
32543
32552
|
const a = e.age / e.life;
|
|
32544
|
-
(p = this.system.inheritVelocity) != null && p.enabled && this.system.inheritVelocity.applyCurrent(e.velocity, a, e[
|
|
32553
|
+
(p = this.system.inheritVelocity) != null && p.enabled && this.system.inheritVelocity.applyCurrent(e.velocity, a, e[rd]);
|
|
32545
32554
|
const l = this.system.noise;
|
|
32546
32555
|
l.enabled && l.apply(0, e.position, e.velocity, i, e.age, e.life);
|
|
32547
32556
|
const c = this.system.sizeBySpeed;
|
|
32548
|
-
c != null && c.enabled && (e.size = c.evaluate(e.velocity, a, e[
|
|
32557
|
+
c != null && c.enabled && (e.size = c.evaluate(e.velocity, a, e[rd], e.size));
|
|
32549
32558
|
const h = this.system.colorBySpeed;
|
|
32550
|
-
h != null && h.enabled && h.evaluate(e.velocity, e[
|
|
32559
|
+
h != null && h.enabled && h.evaluate(e.velocity, e[rd], e.color);
|
|
32551
32560
|
const d = this.system.velocityOverLifetime;
|
|
32552
32561
|
d.enabled && d.apply(e, 0, e.position, e.velocity, i, e.age, e.life);
|
|
32553
32562
|
const u = this.system.limitVelocityOverLifetime;
|
|
@@ -32621,16 +32630,16 @@ class BT {
|
|
|
32621
32630
|
return this.system.shape;
|
|
32622
32631
|
}
|
|
32623
32632
|
get startLife() {
|
|
32624
|
-
return new
|
|
32633
|
+
return new sd(this.system.main.startLifetime);
|
|
32625
32634
|
}
|
|
32626
32635
|
get startSpeed() {
|
|
32627
|
-
return new
|
|
32636
|
+
return new sd(this.system.main.startSpeed);
|
|
32628
32637
|
}
|
|
32629
32638
|
get startRotation() {
|
|
32630
|
-
return new
|
|
32639
|
+
return new sd(this.system.main.startRotation);
|
|
32631
32640
|
}
|
|
32632
32641
|
get startSize() {
|
|
32633
|
-
return new
|
|
32642
|
+
return new sd(this.system.main.startSize);
|
|
32634
32643
|
}
|
|
32635
32644
|
/** start length is for trails */
|
|
32636
32645
|
get startColor() {
|
|
@@ -32702,7 +32711,7 @@ class BT {
|
|
|
32702
32711
|
return this.system.renderer.transparent;
|
|
32703
32712
|
}
|
|
32704
32713
|
get worldSpace() {
|
|
32705
|
-
return this.system.main.simulationSpace ===
|
|
32714
|
+
return this.system.main.simulationSpace === Gc.World;
|
|
32706
32715
|
}
|
|
32707
32716
|
}
|
|
32708
32717
|
class FT {
|
|
@@ -32718,7 +32727,7 @@ class FT {
|
|
|
32718
32727
|
r(this, "waitEmiting", 0);
|
|
32719
32728
|
}
|
|
32720
32729
|
}
|
|
32721
|
-
const
|
|
32730
|
+
const Td = class extends I {
|
|
32722
32731
|
constructor() {
|
|
32723
32732
|
super(...arguments);
|
|
32724
32733
|
r(this, "_state");
|
|
@@ -32762,18 +32771,18 @@ const kd = class extends I {
|
|
|
32762
32771
|
play(t = !1) {
|
|
32763
32772
|
var e;
|
|
32764
32773
|
t && S.foreachComponent(this.gameObject, (i) => {
|
|
32765
|
-
i instanceof
|
|
32774
|
+
i instanceof Td && i !== this && i.play(!1);
|
|
32766
32775
|
}, !0), this._isPlaying = !0, this._particleSystem && (this._particleSystem.emissionState.time = 0, this._particleSystem.emitEnded = !1), (e = this.emission) == null || e.reset();
|
|
32767
32776
|
}
|
|
32768
32777
|
pause(t = !0) {
|
|
32769
32778
|
t && S.foreachComponent(this.gameObject, (e) => {
|
|
32770
|
-
e instanceof
|
|
32779
|
+
e instanceof Td && e !== this && e.pause(!1);
|
|
32771
32780
|
}, !0), this._isPlaying = !1;
|
|
32772
32781
|
}
|
|
32773
32782
|
/** clear=true removes all emitted particles */
|
|
32774
32783
|
stop(t = !0, e = !1) {
|
|
32775
32784
|
t && S.foreachComponent(this.gameObject, (i) => {
|
|
32776
|
-
i instanceof
|
|
32785
|
+
i instanceof Td && i !== this && i.stop(!1, e);
|
|
32777
32786
|
}, !0), this._isPlaying = !1, this._time = 0, e && this.reset();
|
|
32778
32787
|
}
|
|
32779
32788
|
/** remove emitted particles and reset time */
|
|
@@ -32826,10 +32835,10 @@ const kd = class extends I {
|
|
|
32826
32835
|
return this._container;
|
|
32827
32836
|
}
|
|
32828
32837
|
get worldspace() {
|
|
32829
|
-
return this.main.simulationSpace ===
|
|
32838
|
+
return this.main.simulationSpace === Gc.World;
|
|
32830
32839
|
}
|
|
32831
32840
|
get localspace() {
|
|
32832
|
-
return this.main.simulationSpace ===
|
|
32841
|
+
return this.main.simulationSpace === Gc.Local;
|
|
32833
32842
|
}
|
|
32834
32843
|
get worldQuaternion() {
|
|
32835
32844
|
return this.__worldQuaternion;
|
|
@@ -33015,7 +33024,7 @@ const kd = class extends I {
|
|
|
33015
33024
|
}
|
|
33016
33025
|
}
|
|
33017
33026
|
};
|
|
33018
|
-
let ut =
|
|
33027
|
+
let ut = Td;
|
|
33019
33028
|
He([
|
|
33020
33029
|
f(uy)
|
|
33021
33030
|
], ut.prototype, "colorOverLifetime", 2);
|
|
@@ -33047,7 +33056,7 @@ He([
|
|
|
33047
33056
|
f(ul)
|
|
33048
33057
|
], ut.prototype, "inheritVelocity", 2);
|
|
33049
33058
|
He([
|
|
33050
|
-
f(
|
|
33059
|
+
f(wh)
|
|
33051
33060
|
], ut.prototype, "colorBySpeed", 2);
|
|
33052
33061
|
He([
|
|
33053
33062
|
f(ri)
|
|
@@ -33093,7 +33102,7 @@ function Uw(s, t) {
|
|
|
33093
33102
|
}
|
|
33094
33103
|
return t;
|
|
33095
33104
|
}
|
|
33096
|
-
class
|
|
33105
|
+
class qc extends I {
|
|
33097
33106
|
constructor() {
|
|
33098
33107
|
super(...arguments);
|
|
33099
33108
|
r(this, "_didAssignPlayerColor", !1);
|
|
@@ -33116,7 +33125,7 @@ class Gc extends I {
|
|
|
33116
33125
|
;
|
|
33117
33126
|
}
|
|
33118
33127
|
assignUserColor(e) {
|
|
33119
|
-
const i =
|
|
33128
|
+
const i = qc.hashCode(e), n = qc.colorFromHashCode(i);
|
|
33120
33129
|
if (this.gameObject.type === "Mesh") {
|
|
33121
33130
|
const o = this.gameObject;
|
|
33122
33131
|
this.assignColor(n, e, o);
|
|
@@ -33485,7 +33494,7 @@ var lA = Object.defineProperty, cA = Object.getOwnPropertyDescriptor, Vw = (s, t
|
|
|
33485
33494
|
return i && n && lA(t, e, n), n;
|
|
33486
33495
|
};
|
|
33487
33496
|
const jb = x("debugpost");
|
|
33488
|
-
var
|
|
33497
|
+
var Ad = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.Neutral = 1] = "Neutral", s[s.ACES = 2] = "ACES", s[s.AgX = 3] = "AgX", s[s.KhronosNeutral = 4] = "KhronosNeutral", s))(Ad || {});
|
|
33489
33498
|
function Op(s) {
|
|
33490
33499
|
switch (s) {
|
|
33491
33500
|
case 0:
|
|
@@ -33497,9 +33506,9 @@ function Op(s) {
|
|
|
33497
33506
|
case 3:
|
|
33498
33507
|
return Mu;
|
|
33499
33508
|
case 4:
|
|
33500
|
-
return
|
|
33509
|
+
return Dc;
|
|
33501
33510
|
default:
|
|
33502
|
-
return
|
|
33511
|
+
return Dc;
|
|
33503
33512
|
}
|
|
33504
33513
|
}
|
|
33505
33514
|
function hA(s) {
|
|
@@ -33510,7 +33519,7 @@ function hA(s) {
|
|
|
33510
33519
|
return 2;
|
|
33511
33520
|
case Mu:
|
|
33512
33521
|
return 3;
|
|
33513
|
-
case
|
|
33522
|
+
case Dc:
|
|
33514
33523
|
return 1;
|
|
33515
33524
|
case dg:
|
|
33516
33525
|
return 1;
|
|
@@ -33526,7 +33535,7 @@ function Bb(s) {
|
|
|
33526
33535
|
return D.POSTPROCESSING.MODULE.ToneMappingMode.ACES_FILMIC;
|
|
33527
33536
|
case Mu:
|
|
33528
33537
|
return D.POSTPROCESSING.MODULE.ToneMappingMode.AGX;
|
|
33529
|
-
case
|
|
33538
|
+
case Dc:
|
|
33530
33539
|
return D.POSTPROCESSING.MODULE.ToneMappingMode.NEUTRAL;
|
|
33531
33540
|
case dg:
|
|
33532
33541
|
return D.POSTPROCESSING.MODULE.ToneMappingMode.REINHARD;
|
|
@@ -33545,7 +33554,7 @@ const Hw = class extends dt {
|
|
|
33545
33554
|
}
|
|
33546
33555
|
/** Set the tonemapping mode to e.g. "agx" */
|
|
33547
33556
|
setMode(t) {
|
|
33548
|
-
const e =
|
|
33557
|
+
const e = Ad[t];
|
|
33549
33558
|
return e === void 0 ? (console.error("Invalid ToneMapping mode", t), this) : (this.mode.value = e, this);
|
|
33550
33559
|
}
|
|
33551
33560
|
get isToneMapping() {
|
|
@@ -33574,8 +33583,8 @@ const Hw = class extends dt {
|
|
|
33574
33583
|
});
|
|
33575
33584
|
return this.mode.onValueChanged = (i) => {
|
|
33576
33585
|
const n = Op(i);
|
|
33577
|
-
e.mode = Bb(n), jb && console.log("ToneMapping mode changed to",
|
|
33578
|
-
}, jb && console.log("Use ToneMapping",
|
|
33586
|
+
e.mode = Bb(n), jb && console.log("ToneMapping mode changed to", Ad[i], n, e.mode);
|
|
33587
|
+
}, jb && console.log("Use ToneMapping", Ad[this.mode.value], t, e.mode, "renderer.tonemapping: " + this.context.renderer.toneMapping), this.exposure.onValueChanged = (i) => {
|
|
33579
33588
|
this.context.renderer.toneMappingExposure = i;
|
|
33580
33589
|
}, e;
|
|
33581
33590
|
}
|
|
@@ -33748,7 +33757,7 @@ _A([
|
|
|
33748
33757
|
f(N)
|
|
33749
33758
|
], df.prototype, "granularity", 2);
|
|
33750
33759
|
Mn("PixelationEffect", df);
|
|
33751
|
-
var bA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor,
|
|
33760
|
+
var bA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, xh = (s, t, e, i) => {
|
|
33752
33761
|
for (var n = i > 1 ? void 0 : i ? vA(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
33753
33762
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
33754
33763
|
return i && n && bA(t, e, n), n;
|
|
@@ -33803,19 +33812,19 @@ class Bo extends dt {
|
|
|
33803
33812
|
return a.push(i), a.push(n), a.push(o), a;
|
|
33804
33813
|
}
|
|
33805
33814
|
}
|
|
33806
|
-
|
|
33815
|
+
xh([
|
|
33807
33816
|
f(N)
|
|
33808
33817
|
], Bo.prototype, "intensity", 2);
|
|
33809
|
-
|
|
33818
|
+
xh([
|
|
33810
33819
|
f(N)
|
|
33811
33820
|
], Bo.prototype, "falloff", 2);
|
|
33812
|
-
|
|
33821
|
+
xh([
|
|
33813
33822
|
f(N)
|
|
33814
33823
|
], Bo.prototype, "samples", 2);
|
|
33815
|
-
|
|
33824
|
+
xh([
|
|
33816
33825
|
f(N)
|
|
33817
33826
|
], Bo.prototype, "color", 2);
|
|
33818
|
-
|
|
33827
|
+
xh([
|
|
33819
33828
|
f(N)
|
|
33820
33829
|
], Bo.prototype, "luminanceInfluence", 2);
|
|
33821
33830
|
Mn("ScreenSpaceAmbientOcclusion", Bo);
|
|
@@ -34280,7 +34289,7 @@ var EA = Object.defineProperty, IA = Object.getOwnPropertyDescriptor, Xw = (s, t
|
|
|
34280
34289
|
return i && n && EA(t, e, n), n;
|
|
34281
34290
|
};
|
|
34282
34291
|
const Zr = x("debugpost");
|
|
34283
|
-
class
|
|
34292
|
+
class Sh extends I {
|
|
34284
34293
|
constructor() {
|
|
34285
34294
|
super(...arguments);
|
|
34286
34295
|
r(this, "sharedProfile");
|
|
@@ -34421,15 +34430,15 @@ class xh extends I {
|
|
|
34421
34430
|
c.active = e.value, this.scheduleRecreate();
|
|
34422
34431
|
return;
|
|
34423
34432
|
}
|
|
34424
|
-
if (!
|
|
34433
|
+
if (!ad.has(a)) {
|
|
34425
34434
|
const h = new Array();
|
|
34426
|
-
|
|
34435
|
+
ad.set(a, h);
|
|
34427
34436
|
const d = Object.keys(c);
|
|
34428
34437
|
for (const u of d)
|
|
34429
34438
|
c[u] instanceof N && h.push(u);
|
|
34430
34439
|
}
|
|
34431
|
-
if (
|
|
34432
|
-
const h = l.toLowerCase(), d =
|
|
34440
|
+
if (ad.has(a)) {
|
|
34441
|
+
const h = l.toLowerCase(), d = ad.get(a);
|
|
34433
34442
|
for (const u of d)
|
|
34434
34443
|
if (u.toLowerCase() === h) {
|
|
34435
34444
|
const p = c[u];
|
|
@@ -34454,12 +34463,12 @@ class xh extends I {
|
|
|
34454
34463
|
}
|
|
34455
34464
|
Xw([
|
|
34456
34465
|
Qa(py)
|
|
34457
|
-
],
|
|
34466
|
+
], Sh.prototype, "sharedProfile", 2);
|
|
34458
34467
|
Xw([
|
|
34459
34468
|
Qa()
|
|
34460
|
-
],
|
|
34461
|
-
const
|
|
34462
|
-
UT(
|
|
34469
|
+
], Sh.prototype, "multisampling", 2);
|
|
34470
|
+
const ad = /* @__PURE__ */ new Map();
|
|
34471
|
+
UT(Sh);
|
|
34463
34472
|
async function yy(s) {
|
|
34464
34473
|
const { NeedleEngineHTMLElement: t } = await Promise.resolve().then(() => RI);
|
|
34465
34474
|
t.observedAttributes.includes(s) || t.observedAttributes.push(s);
|
|
@@ -34469,8 +34478,8 @@ var LA = Object.defineProperty, DA = Object.getOwnPropertyDescriptor, St = (s, t
|
|
|
34469
34478
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
34470
34479
|
return i && n && LA(t, e, n), n;
|
|
34471
34480
|
};
|
|
34472
|
-
const Lt = x("debugsceneswitcher"), jA = x("sceneswitcher:clearscene"),
|
|
34473
|
-
yy(
|
|
34481
|
+
const Lt = x("debugsceneswitcher"), jA = x("sceneswitcher:clearscene"), Ed = "scene";
|
|
34482
|
+
yy(Ed);
|
|
34474
34483
|
const Zs = Promise.resolve(!1);
|
|
34475
34484
|
class rt extends I {
|
|
34476
34485
|
constructor() {
|
|
@@ -34593,14 +34602,14 @@ class rt extends I {
|
|
|
34593
34602
|
async onEnable() {
|
|
34594
34603
|
if (globalThis.addEventListener("popstate", this.onPopState), this.context.input.addEventListener(Ne.KeyDown, this.onInputKeyDown), this.context.input.addEventListener(Ne.PointerMove, this.onInputPointerMove), this.context.input.addEventListener(Ne.PointerUp, this.onInputPointerUp), this._engineElementOverserver || (this._engineElementOverserver = new MutationObserver((e) => {
|
|
34595
34604
|
for (const i of e)
|
|
34596
|
-
if (i.type === "attributes" && i.attributeName ===
|
|
34597
|
-
const n = this.context.domElement.getAttribute(
|
|
34605
|
+
if (i.type === "attributes" && i.attributeName === Ed) {
|
|
34606
|
+
const n = this.context.domElement.getAttribute(Ed);
|
|
34598
34607
|
n !== null && this.trySelectSceneFromValue(n);
|
|
34599
34608
|
}
|
|
34600
34609
|
})), this._engineElementOverserver.observe(this.context.domElement, {
|
|
34601
34610
|
attributes: !0
|
|
34602
34611
|
}), this._preloadScheduler || (this._preloadScheduler = new BA(this)), this._preloadScheduler.maxLoadAhead = this.preloadNext, this._preloadScheduler.maxLoadBehind = this.preloadPrevious, this._preloadScheduler.maxConcurrent = this.preloadConcurrent, this._preloadScheduler.begin(2e3), this.autoLoadFirstScene && this._currentIndex === -1 && !await this.tryLoadFromQueryParam()) {
|
|
34603
|
-
const e = this.context.domElement.getAttribute(
|
|
34612
|
+
const e = this.context.domElement.getAttribute(Ed);
|
|
34604
34613
|
try {
|
|
34605
34614
|
(e === null || !await this.trySelectSceneFromValue(e)) && this._currentIndex === -1 && this.select(0);
|
|
34606
34615
|
} finally {
|
|
@@ -35678,7 +35687,7 @@ class HA extends wn {
|
|
|
35678
35687
|
this.offset = this.offset.set(0, 0), this.zoom = 1, this.needsUpdate = !0;
|
|
35679
35688
|
}
|
|
35680
35689
|
}
|
|
35681
|
-
var GA = Object.defineProperty, qA = Object.getOwnPropertyDescriptor,
|
|
35690
|
+
var GA = Object.defineProperty, qA = Object.getOwnPropertyDescriptor, Ch = (s, t, e, i) => {
|
|
35682
35691
|
for (var n = i > 1 ? void 0 : i ? qA(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
35683
35692
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
35684
35693
|
return i && n && GA(t, e, n), n;
|
|
@@ -35964,19 +35973,19 @@ class $r extends I {
|
|
|
35964
35973
|
// private openWindowToSelectCamera(){
|
|
35965
35974
|
// }
|
|
35966
35975
|
}
|
|
35967
|
-
|
|
35976
|
+
Ch([
|
|
35968
35977
|
f()
|
|
35969
35978
|
], $r.prototype, "allowStartOnClick", 2);
|
|
35970
|
-
|
|
35979
|
+
Ch([
|
|
35971
35980
|
f()
|
|
35972
35981
|
], $r.prototype, "autoConnect", 2);
|
|
35973
|
-
|
|
35982
|
+
Ch([
|
|
35974
35983
|
f(bt)
|
|
35975
35984
|
], $r.prototype, "videoPlayer", 1);
|
|
35976
|
-
|
|
35985
|
+
Ch([
|
|
35977
35986
|
f()
|
|
35978
35987
|
], $r.prototype, "device", 2);
|
|
35979
|
-
|
|
35988
|
+
Ch([
|
|
35980
35989
|
f()
|
|
35981
35990
|
], $r.prototype, "deviceName", 2);
|
|
35982
35991
|
var XA = Object.defineProperty, QA = Object.getOwnPropertyDescriptor, Jw = (s, t, e, i) => {
|
|
@@ -36084,7 +36093,7 @@ Jw([
|
|
|
36084
36093
|
Jw([
|
|
36085
36094
|
f(ce)
|
|
36086
36095
|
], ff.prototype, "shadowColor", 2);
|
|
36087
|
-
var YA = Object.defineProperty, KA = Object.getOwnPropertyDescriptor,
|
|
36096
|
+
var YA = Object.defineProperty, KA = Object.getOwnPropertyDescriptor, Ph = (s, t, e, i) => {
|
|
36088
36097
|
for (var n = i > 1 ? void 0 : i ? KA(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
36089
36098
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
36090
36099
|
return i && n && YA(t, e, n), n;
|
|
@@ -36285,20 +36294,20 @@ class Fs extends I {
|
|
|
36285
36294
|
this.context.domElement.removeEventListener("dragover", this.onDragOverEvent), this.context.domElement.removeEventListener("drop", this.onDrop);
|
|
36286
36295
|
}
|
|
36287
36296
|
}
|
|
36288
|
-
|
|
36297
|
+
Ph([
|
|
36289
36298
|
xw(Fs.prototype.urlChangedSyncField),
|
|
36290
36299
|
f(URL)
|
|
36291
36300
|
], Fs.prototype, "url", 2);
|
|
36292
|
-
|
|
36301
|
+
Ph([
|
|
36293
36302
|
f()
|
|
36294
36303
|
], Fs.prototype, "allowDrop", 2);
|
|
36295
|
-
|
|
36304
|
+
Ph([
|
|
36296
36305
|
f()
|
|
36297
36306
|
], Fs.prototype, "background", 2);
|
|
36298
|
-
|
|
36307
|
+
Ph([
|
|
36299
36308
|
f()
|
|
36300
36309
|
], Fs.prototype, "environment", 2);
|
|
36301
|
-
|
|
36310
|
+
Ph([
|
|
36302
36311
|
f()
|
|
36303
36312
|
], Fs.prototype, "allowNetworking", 2);
|
|
36304
36313
|
function eE(s, t, e) {
|
|
@@ -36365,12 +36374,12 @@ pf([
|
|
|
36365
36374
|
pf([
|
|
36366
36375
|
f()
|
|
36367
36376
|
], Wr.prototype, "positionAxes", 2);
|
|
36368
|
-
var nE = Object.defineProperty, sE = Object.getOwnPropertyDescriptor,
|
|
36377
|
+
var nE = Object.defineProperty, sE = Object.getOwnPropertyDescriptor, Oh = (s, t, e, i) => {
|
|
36369
36378
|
for (var n = i > 1 ? void 0 : i ? sE(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
36370
36379
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
36371
36380
|
return i && n && nE(t, e, n), n;
|
|
36372
36381
|
};
|
|
36373
|
-
const
|
|
36382
|
+
const xc = x("debugspatialtrigger"), Nb = new Co(), $b = new Co();
|
|
36374
36383
|
function oE(s, t) {
|
|
36375
36384
|
return Nb.mask = s, $b.mask = t, Nb.test($b);
|
|
36376
36385
|
}
|
|
@@ -36391,7 +36400,7 @@ class Ts extends I {
|
|
|
36391
36400
|
* @internal
|
|
36392
36401
|
*/
|
|
36393
36402
|
start() {
|
|
36394
|
-
|
|
36403
|
+
xc && console.log(this.name, this.triggerMask, this);
|
|
36395
36404
|
}
|
|
36396
36405
|
/**
|
|
36397
36406
|
* Checks for intersections with spatial triggers and fires appropriate events
|
|
@@ -36416,7 +36425,7 @@ class Ts extends I {
|
|
|
36416
36425
|
*/
|
|
36417
36426
|
onEnterTrigger(e) {
|
|
36418
36427
|
var i;
|
|
36419
|
-
|
|
36428
|
+
xc && console.log("ENTER TRIGGER", this.name, e.name, this, e), e.raiseOnEnterEvent(this), (i = this.onEnter) == null || i.invoke();
|
|
36420
36429
|
}
|
|
36421
36430
|
/**
|
|
36422
36431
|
* Handles trigger exit events.
|
|
@@ -36424,7 +36433,7 @@ class Ts extends I {
|
|
|
36424
36433
|
*/
|
|
36425
36434
|
onExitTrigger(e) {
|
|
36426
36435
|
var i;
|
|
36427
|
-
|
|
36436
|
+
xc && console.log("EXIT TRIGGER", this.name, e.name), e.raiseOnExitEvent(this), (i = this.onExit) == null || i.invoke();
|
|
36428
36437
|
}
|
|
36429
36438
|
/**
|
|
36430
36439
|
* Handles trigger stay events.
|
|
@@ -36435,20 +36444,20 @@ class Ts extends I {
|
|
|
36435
36444
|
e.raiseOnStayEvent(this), (i = this.onStay) == null || i.invoke();
|
|
36436
36445
|
}
|
|
36437
36446
|
}
|
|
36438
|
-
|
|
36447
|
+
Oh([
|
|
36439
36448
|
f()
|
|
36440
36449
|
], Ts.prototype, "triggerMask", 2);
|
|
36441
|
-
|
|
36450
|
+
Oh([
|
|
36442
36451
|
f(xe)
|
|
36443
36452
|
], Ts.prototype, "onEnter", 2);
|
|
36444
|
-
|
|
36453
|
+
Oh([
|
|
36445
36454
|
f(xe)
|
|
36446
36455
|
], Ts.prototype, "onStay", 2);
|
|
36447
|
-
|
|
36456
|
+
Oh([
|
|
36448
36457
|
f(xe)
|
|
36449
36458
|
], Ts.prototype, "onExit", 2);
|
|
36450
36459
|
var Vp;
|
|
36451
|
-
const
|
|
36460
|
+
const Id = (Vp = class extends I {
|
|
36452
36461
|
constructor() {
|
|
36453
36462
|
super(...arguments);
|
|
36454
36463
|
r(this, "triggerMask");
|
|
@@ -36459,20 +36468,20 @@ const Ed = (Vp = class extends I {
|
|
|
36459
36468
|
* Initializes the trigger and logs debug info if enabled
|
|
36460
36469
|
*/
|
|
36461
36470
|
start() {
|
|
36462
|
-
|
|
36471
|
+
xc && console.log(this.name, this.triggerMask, this);
|
|
36463
36472
|
}
|
|
36464
36473
|
/**
|
|
36465
36474
|
* Registers this trigger in the global registry and sets up debug visualization if enabled
|
|
36466
36475
|
*/
|
|
36467
36476
|
onEnable() {
|
|
36468
36477
|
var t;
|
|
36469
|
-
|
|
36478
|
+
Id.triggers.push(this), this.boxHelper || (this.boxHelper = S.addComponent(this.gameObject, wi), (t = this.boxHelper) == null || t.showHelper(null, xc));
|
|
36470
36479
|
}
|
|
36471
36480
|
/**
|
|
36472
36481
|
* Removes this trigger from the global registry when disabled
|
|
36473
36482
|
*/
|
|
36474
36483
|
onDisable() {
|
|
36475
|
-
|
|
36484
|
+
Id.triggers.splice(Id.triggers.indexOf(this), 1);
|
|
36476
36485
|
}
|
|
36477
36486
|
/**
|
|
36478
36487
|
* Tests if an object is inside this trigger's box
|
|
@@ -36512,8 +36521,8 @@ const Ed = (Vp = class extends I {
|
|
|
36512
36521
|
}
|
|
36513
36522
|
}, /** Global registry of all active spatial triggers in the scene */
|
|
36514
36523
|
r(Vp, "triggers", []), Vp);
|
|
36515
|
-
let mf =
|
|
36516
|
-
|
|
36524
|
+
let mf = Id;
|
|
36525
|
+
Oh([
|
|
36517
36526
|
f()
|
|
36518
36527
|
], mf.prototype, "triggerMask", 2);
|
|
36519
36528
|
var rE = Object.defineProperty, aE = Object.getOwnPropertyDescriptor, lE = (s, t, e, i) => {
|
|
@@ -37367,7 +37376,7 @@ class nx extends I {
|
|
|
37367
37376
|
}
|
|
37368
37377
|
awake() {
|
|
37369
37378
|
if (this.useFlatbuffers)
|
|
37370
|
-
this.context.connection.beginListenBinary(
|
|
37379
|
+
this.context.connection.beginListenBinary(Vc, (e) => {
|
|
37371
37380
|
});
|
|
37372
37381
|
else {
|
|
37373
37382
|
this.models = [];
|
|
@@ -37514,10 +37523,10 @@ const ds = (Gp = class extends I {
|
|
|
37514
37523
|
// }
|
|
37515
37524
|
// }
|
|
37516
37525
|
}, r(Gp, "receivers", {}), Gp);
|
|
37517
|
-
let
|
|
37526
|
+
let Mh = ds;
|
|
37518
37527
|
gf([
|
|
37519
37528
|
f(yf)
|
|
37520
|
-
],
|
|
37529
|
+
], Mh.prototype, "events", 2);
|
|
37521
37530
|
var Gi = /* @__PURE__ */ ((s) => (s.Activation = "ActivationTrack", s.Animation = "AnimationTrack", s.Audio = "AudioTrack", s.Control = "ControlTrack", s.Marker = "MarkerTrack", s.Signal = "SignalTrack", s))(Gi || {}), us = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.Hold = 1] = "Hold", s[s.Loop = 2] = "Loop", s[s.PingPong = 3] = "PingPong", s[s.Continue = 4] = "Continue", s))(us || {}), ox = /* @__PURE__ */ ((s) => (s.Signal = "SignalEmitter", s))(ox || {});
|
|
37522
37531
|
const $n = x("debugtimeline");
|
|
37523
37532
|
class _f {
|
|
@@ -37964,7 +37973,7 @@ class cu extends _f {
|
|
|
37964
37973
|
if (h) {
|
|
37965
37974
|
if (!l)
|
|
37966
37975
|
if ($n && console.log("Trigger signal", e, a.time, a), this.didTrigger[o] = !0, ((n = this.receivers) == null ? void 0 : n.length) <= 0)
|
|
37967
|
-
|
|
37976
|
+
Mh.invoke(a.asset);
|
|
37968
37977
|
else
|
|
37969
37978
|
for (const d of this.receivers)
|
|
37970
37979
|
d && d.invoke(a.asset);
|
|
@@ -38404,7 +38413,7 @@ const Zm = (qp = class extends I {
|
|
|
38404
38413
|
break;
|
|
38405
38414
|
}
|
|
38406
38415
|
if (c !== null && c.models.length > 0) {
|
|
38407
|
-
const h = S.getComponent(this.gameObject,
|
|
38416
|
+
const h = S.getComponent(this.gameObject, Mh);
|
|
38408
38417
|
h && (c.receivers.push(h), this._signalTracks.push(c));
|
|
38409
38418
|
}
|
|
38410
38419
|
} else if (o.type === Gi.Signal) {
|
|
@@ -38547,7 +38556,7 @@ class gl extends I {
|
|
|
38547
38556
|
/** @internal */
|
|
38548
38557
|
onEnable() {
|
|
38549
38558
|
var e;
|
|
38550
|
-
if (!(this.isGizmo && !
|
|
38559
|
+
if (!(this.isGizmo && !Kc) && this.context.mainCamera && (this._control || (this._control = new dS(this.context.mainCamera, this.context.renderer.domElement), this._control.enabled = !0, this._control.getRaycaster().layers.set(2), this._control.size = 1, ("_root" in this._control ? this._control._root : this._control).traverse((n) => {
|
|
38551
38560
|
const o = n;
|
|
38552
38561
|
if (o.layers.set(2), o) {
|
|
38553
38562
|
const a = o.material;
|
|
@@ -38604,7 +38613,7 @@ class Sy {
|
|
|
38604
38613
|
vf([
|
|
38605
38614
|
f(Fe)
|
|
38606
38615
|
], Sy.prototype, "texture", 2);
|
|
38607
|
-
let
|
|
38616
|
+
let Rh = class extends sf {
|
|
38608
38617
|
constructor() {
|
|
38609
38618
|
super(...arguments);
|
|
38610
38619
|
r(this, "_sprite");
|
|
@@ -38645,10 +38654,10 @@ let Mh = class extends sf {
|
|
|
38645
38654
|
};
|
|
38646
38655
|
vf([
|
|
38647
38656
|
f(Sy)
|
|
38648
|
-
],
|
|
38657
|
+
], Rh.prototype, "sprite", 1);
|
|
38649
38658
|
vf([
|
|
38650
38659
|
f()
|
|
38651
|
-
],
|
|
38660
|
+
], Rh.prototype, "pixelsPerUnitMultiplier", 2);
|
|
38652
38661
|
class Cy extends sf {
|
|
38653
38662
|
constructor() {
|
|
38654
38663
|
super(...arguments);
|
|
@@ -38785,7 +38794,7 @@ class Uo extends I {
|
|
|
38785
38794
|
this._requestedAnimatorTrigger = e, yield, yield, this._requestedAnimatorTrigger == e && ((i = this.animator) == null || i.setTrigger(e));
|
|
38786
38795
|
}
|
|
38787
38796
|
init() {
|
|
38788
|
-
this._isInit || (this._isInit = !0, this._image = S.getComponent(this.gameObject,
|
|
38797
|
+
this._isInit || (this._isInit = !0, this._image = S.getComponent(this.gameObject, Rh), this._image && (this.stateSetup(this._image), this.interactable ? this._image.setState("normal") : this._image.setState("disabled")));
|
|
38789
38798
|
}
|
|
38790
38799
|
stateSetup(e) {
|
|
38791
38800
|
var m, g, y, _, b;
|
|
@@ -39329,7 +39338,7 @@ var HE = Object.defineProperty, GE = Object.getOwnPropertyDescriptor, Oy = (s, t
|
|
|
39329
39338
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
39330
39339
|
return i && n && HE(t, e, n), n;
|
|
39331
39340
|
};
|
|
39332
|
-
class
|
|
39341
|
+
class kh extends I {
|
|
39333
39342
|
constructor() {
|
|
39334
39343
|
super(...arguments);
|
|
39335
39344
|
r(this, "url");
|
|
@@ -39381,13 +39390,13 @@ class Rh extends I {
|
|
|
39381
39390
|
}
|
|
39382
39391
|
Oy([
|
|
39383
39392
|
f()
|
|
39384
|
-
],
|
|
39393
|
+
], kh.prototype, "url", 2);
|
|
39385
39394
|
Oy([
|
|
39386
39395
|
f()
|
|
39387
|
-
],
|
|
39396
|
+
], kh.prototype, "mode", 2);
|
|
39388
39397
|
Oy([
|
|
39389
39398
|
f()
|
|
39390
|
-
],
|
|
39399
|
+
], kh.prototype, "clickable", 2);
|
|
39391
39400
|
var qE = Object.defineProperty, XE = Object.getOwnPropertyDescriptor, bl = (s, t, e, i) => {
|
|
39392
39401
|
for (var n = i > 1 ? void 0 : i ? XE(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
39393
39402
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
@@ -39529,7 +39538,7 @@ function hx(s) {
|
|
|
39529
39538
|
const _ = l.getRenderTarget(), b = l.getClearColor(new le()), w = l.getClearAlpha(), C = i.scene.background, k = "aspect" in a ? a.aspect : null;
|
|
39530
39539
|
try {
|
|
39531
39540
|
const E = s.render_events !== !1, F = new Array();
|
|
39532
|
-
E && (
|
|
39541
|
+
E && (Zc(i.scene, Je, F), F.forEach((T) => {
|
|
39533
39542
|
var j;
|
|
39534
39543
|
if (T == null || T.onBeforeRender(), T.isInstancingActive && T.instances)
|
|
39535
39544
|
for (let H = 0; H < ((j = T.instances) == null ? void 0 : j.length); H++) {
|
|
@@ -40435,16 +40444,16 @@ M.add("Avatar_Brain_LookAt", iu);
|
|
|
40435
40444
|
M.add("Avatar_MouthShapes", qu);
|
|
40436
40445
|
M.add("Avatar_MustacheShake", Uv);
|
|
40437
40446
|
M.add("AvatarBlink_Simple", Ka);
|
|
40438
|
-
M.add("AvatarEyeLook_Rotation",
|
|
40439
|
-
M.add("AxesHelper",
|
|
40447
|
+
M.add("AvatarEyeLook_Rotation", ih);
|
|
40448
|
+
M.add("AxesHelper", nh);
|
|
40440
40449
|
M.add("BasicIKConstraint", Wv);
|
|
40441
40450
|
M.add("BoxHelperComponent", wi);
|
|
40442
40451
|
M.add("Camera", Pe);
|
|
40443
40452
|
M.add("CharacterController", Za);
|
|
40444
40453
|
M.add("CharacterControllerInput", To);
|
|
40445
40454
|
M.add("Collider", Ei);
|
|
40446
|
-
M.add("SphereCollider",
|
|
40447
|
-
M.add("BoxCollider",
|
|
40455
|
+
M.add("SphereCollider", sh);
|
|
40456
|
+
M.add("BoxCollider", oh);
|
|
40448
40457
|
M.add("MeshCollider", jr);
|
|
40449
40458
|
M.add("CapsuleCollider", Mo);
|
|
40450
40459
|
M.add("ContactShadows", Yn);
|
|
@@ -40454,27 +40463,27 @@ M.add("Deletable", qv);
|
|
|
40454
40463
|
M.add("DeviceFlag", qg);
|
|
40455
40464
|
M.add("DragControls", Ci);
|
|
40456
40465
|
M.add("DropListener", Ao);
|
|
40457
|
-
M.add("Duplicatable",
|
|
40466
|
+
M.add("Duplicatable", rh);
|
|
40458
40467
|
M.add("EventListEvent", Ug);
|
|
40459
40468
|
M.add("EventTrigger", Kg);
|
|
40460
40469
|
M.add("GltfExportBox", lw);
|
|
40461
40470
|
M.add("GltfExport", Ku);
|
|
40462
40471
|
M.add("VariantAction", bw);
|
|
40463
40472
|
M.add("ChangeTransformOnClick", il);
|
|
40464
|
-
M.add("ChangeMaterialOnClick",
|
|
40473
|
+
M.add("ChangeMaterialOnClick", ch);
|
|
40465
40474
|
M.add("SetActiveOnClick", nl);
|
|
40466
40475
|
M.add("HideOnStart", cr);
|
|
40467
|
-
M.add("EmphasizeOnClick",
|
|
40476
|
+
M.add("EmphasizeOnClick", hh);
|
|
40468
40477
|
M.add("PlayAudioOnClick", Cr);
|
|
40469
40478
|
M.add("PlayAnimationOnClick", Ga);
|
|
40470
|
-
M.add("PreliminaryAction",
|
|
40479
|
+
M.add("PreliminaryAction", dh);
|
|
40471
40480
|
M.add("PreliminaryTrigger", Zu);
|
|
40472
40481
|
M.add("VisibilityAction", Ju);
|
|
40473
40482
|
M.add("TapGestureTrigger", vw);
|
|
40474
40483
|
M.add("USDZExporter", Ge);
|
|
40475
|
-
M.add("Fog",
|
|
40484
|
+
M.add("Fog", mh);
|
|
40476
40485
|
M.add("BoxGizmo", ll);
|
|
40477
|
-
M.add("GridHelper",
|
|
40486
|
+
M.add("GridHelper", gh);
|
|
40478
40487
|
M.add("GroundProjectedEnv", Us);
|
|
40479
40488
|
M.add("UsageMarker", Qu);
|
|
40480
40489
|
M.add("Interactable", Gv);
|
|
@@ -40485,13 +40494,13 @@ M.add("LODGroup", rf);
|
|
|
40485
40494
|
M.add("LookAtConstraint", Ya);
|
|
40486
40495
|
M.add("NeedleMenu", Ws);
|
|
40487
40496
|
M.add("NestedGltf", hy);
|
|
40488
|
-
M.add("Networking",
|
|
40497
|
+
M.add("Networking", bh);
|
|
40489
40498
|
M.add("OffsetConstraint", cl);
|
|
40490
40499
|
M.add("CameraTargetReachedEvent", tu);
|
|
40491
40500
|
M.add("OrbitControls", we);
|
|
40492
40501
|
M.add("ParticleSystemRenderer", On);
|
|
40493
40502
|
M.add("ParticleSystem", ut);
|
|
40494
|
-
M.add("PlayerColor",
|
|
40503
|
+
M.add("PlayerColor", qc);
|
|
40495
40504
|
M.add("Antialiasing", lf);
|
|
40496
40505
|
M.add("BloomEffect", fl);
|
|
40497
40506
|
M.add("ChromaticAberration", cf);
|
|
@@ -40505,8 +40514,8 @@ M.add("SharpeningEffect", uf);
|
|
|
40505
40514
|
M.add("TiltShiftEffect", Hs);
|
|
40506
40515
|
M.add("ToneMappingEffect", Mr);
|
|
40507
40516
|
M.add("Vignette", ml);
|
|
40508
|
-
M.add("Volume",
|
|
40509
|
-
M.add("ReflectionProbe",
|
|
40517
|
+
M.add("Volume", Sh);
|
|
40518
|
+
M.add("ReflectionProbe", ah);
|
|
40510
40519
|
M.add("Renderer", Je);
|
|
40511
40520
|
M.add("MeshRenderer", Yu);
|
|
40512
40521
|
M.add("SkinnedMeshRenderer", rw);
|
|
@@ -40526,7 +40535,7 @@ M.add("SyncedTransform", js);
|
|
|
40526
40535
|
M.add("TestRunner", ix);
|
|
40527
40536
|
M.add("TestSimulateUserData", nx);
|
|
40528
40537
|
M.add("PlayableDirector", Rr);
|
|
40529
|
-
M.add("SignalReceiver",
|
|
40538
|
+
M.add("SignalReceiver", Mh);
|
|
40530
40539
|
M.add("AnimationTrackHandler", wy);
|
|
40531
40540
|
M.add("AudioTrackHandler", Ta);
|
|
40532
40541
|
M.add("SignalTrackHandler", cu);
|
|
@@ -40540,13 +40549,13 @@ M.add("CanvasGroup", Or);
|
|
|
40540
40549
|
M.add("EventSystem", di);
|
|
40541
40550
|
M.add("Graphic", ol);
|
|
40542
40551
|
M.add("MaskableGraphic", sf);
|
|
40543
|
-
M.add("Image",
|
|
40552
|
+
M.add("Image", Rh);
|
|
40544
40553
|
M.add("RawImage", Cy);
|
|
40545
40554
|
M.add("InputField", yl);
|
|
40546
40555
|
M.add("VerticalLayoutGroup", Aw);
|
|
40547
40556
|
M.add("HorizontalLayoutGroup", Ew);
|
|
40548
40557
|
M.add("GridLayoutGroup", Iw);
|
|
40549
|
-
M.add("Outline",
|
|
40558
|
+
M.add("Outline", ph);
|
|
40550
40559
|
M.add("ObjectRaycaster", on);
|
|
40551
40560
|
M.add("GraphicRaycaster", Ng);
|
|
40552
40561
|
M.add("SpatialGrabRaycaster", _r);
|
|
@@ -40555,7 +40564,7 @@ M.add("SpatialHtml", xf);
|
|
|
40555
40564
|
M.add("Text", si);
|
|
40556
40565
|
M.add("EnvironmentScene", Py);
|
|
40557
40566
|
M.add("LookAt", _l);
|
|
40558
|
-
M.add("OpenURL",
|
|
40567
|
+
M.add("OpenURL", kh);
|
|
40559
40568
|
M.add("VideoPlayer", bt);
|
|
40560
40569
|
M.add("Voip", Dr);
|
|
40561
40570
|
M.add("Avatar", Pr);
|
|
@@ -40571,10 +40580,10 @@ M.add("WebXRImageTracking", qa);
|
|
|
40571
40580
|
M.add("WebXRPlaneTracking", Vo);
|
|
40572
40581
|
M.add("XRRig", My);
|
|
40573
40582
|
M.add("XRFlag", Yi);
|
|
40574
|
-
M.add("PlayerSync",
|
|
40583
|
+
M.add("PlayerSync", uh);
|
|
40575
40584
|
M.add("PlayerState", en);
|
|
40576
40585
|
M.add("PresentationMode", hI);
|
|
40577
|
-
const
|
|
40586
|
+
const Sc = gt, dI = x("debugtypestore");
|
|
40578
40587
|
dI && console.log(M);
|
|
40579
40588
|
function uI(s, t) {
|
|
40580
40589
|
const i = WP(s, t);
|
|
@@ -40621,14 +40630,14 @@ function eg(s, t, e, i) {
|
|
|
40621
40630
|
if (t === null || !s)
|
|
40622
40631
|
return;
|
|
40623
40632
|
const n = s.guid, o = s.guid;
|
|
40624
|
-
o != null && o.length && (Jr.has(o) || (
|
|
40633
|
+
o != null && o.length && (Jr.has(o) || (Sc && console.log('Creating InstanceIdProvider with key "' + o + '" for object ' + s.name), Jr.set(o, new Ft(o))));
|
|
40625
40634
|
const a = o && Jr.get(o) || t;
|
|
40626
40635
|
if (s.guid = a.generateUUID(), n && n !== "invalid" && (e[n] = s.guid), s && s.userData && s.userData.components)
|
|
40627
40636
|
for (const l of s.userData.components) {
|
|
40628
40637
|
if (l === null)
|
|
40629
40638
|
continue;
|
|
40630
40639
|
const c = l.guid;
|
|
40631
|
-
c ? Jr.has(c) || (
|
|
40640
|
+
c ? Jr.has(c) || (Sc && console.log('Creating InstanceIdProvider with key "' + c + '" for component ' + l[Jm]), Jr.set(c, new Ft(c))) : Sc && console.warn("Can not create IdProvider: component " + l[Jm] + " has no guid", l.guid);
|
|
40632
40641
|
const h = Jr.get(c) || t, d = l.guid;
|
|
40633
40642
|
l.guid = h.generateUUID(), d && d !== "invalid" && (e[d] = l.guid), l.resolveGuids && i.push(l);
|
|
40634
40643
|
}
|
|
@@ -40652,9 +40661,9 @@ async function tg(s, t, e, i) {
|
|
|
40652
40661
|
const p = M.get(u.name);
|
|
40653
40662
|
if (p != null) {
|
|
40654
40663
|
const m = new p();
|
|
40655
|
-
m.sourceId = s.gltfId, Ua(m, u, s.implementationInformation), m.context = s.context, "guid" in u && (m[
|
|
40664
|
+
m.sourceId = s.gltfId, Ua(m, u, s.implementationInformation), m.context = s.context, "guid" in u && (m[gd] = u.guid), m[Jm] = u.name, Oa(t, m, !1), e.push({ instance: m, compData: u, obj: t }), m.isCamera && s.context && s.context.mainCamera === null && m.tag === "MainCamera" && s.context.setCurrentCamera(m), ((l = (a = (o = s.context) == null ? void 0 : o.physics) == null ? void 0 : a.engine) == null ? void 0 : l.isInitialized) === !1 && (m.isCollider || m.isRigidbody) && ((h = (c = s.context) == null ? void 0 : c.physics.engine) == null || h.initialize());
|
|
40656
40665
|
} else
|
|
40657
|
-
|
|
40666
|
+
Sc && console.debug("unknown component: " + u.name), Dl.includes(u.name) || Dl.push(u.name);
|
|
40658
40667
|
} catch (p) {
|
|
40659
40668
|
console.error(u.name + " - " + p.message, p);
|
|
40660
40669
|
}
|
|
@@ -40674,15 +40683,16 @@ This could mean you forgot to add a npmdef to your ExportInfo
|
|
|
40674
40683
|
}
|
|
40675
40684
|
function mI(s, t) {
|
|
40676
40685
|
const { instance: e, compData: i, obj: n } = s;
|
|
40677
|
-
t.object = n, t.target = e, bm(e, i, t),
|
|
40686
|
+
t.object = n, t.target = e, bm(e, i, t), Sc && console.debug("add " + i.name, i, e);
|
|
40678
40687
|
}
|
|
40679
|
-
const
|
|
40688
|
+
const rc = [], Ld = [];
|
|
40680
40689
|
var qb;
|
|
40681
40690
|
((s) => {
|
|
40682
|
-
function t(i) {
|
|
40683
|
-
|
|
40684
|
-
|
|
40685
|
-
|
|
40691
|
+
function t(i, n) {
|
|
40692
|
+
const o = { name: n == null ? void 0 : n.name, priority: (n == null ? void 0 : n.priority) ?? 0, callback: i };
|
|
40693
|
+
return rc.push(o), rc.sort((a, l) => a.priority === l.priority ? 0 : a.priority > l.priority ? -1 : 1), () => {
|
|
40694
|
+
const a = rc.indexOf(o);
|
|
40695
|
+
a >= 0 && rc.splice(a, 1);
|
|
40686
40696
|
};
|
|
40687
40697
|
}
|
|
40688
40698
|
s.onCreateCustomModelLoader = t;
|
|
@@ -40692,9 +40702,9 @@ var qb;
|
|
|
40692
40702
|
n >= 0 && Ld.splice(n, 1);
|
|
40693
40703
|
};
|
|
40694
40704
|
}
|
|
40695
|
-
s.
|
|
40705
|
+
s.onDetermineModelMimetype = e;
|
|
40696
40706
|
})(qb || (qb = {}));
|
|
40697
|
-
const
|
|
40707
|
+
const Cc = x("debugfileformat");
|
|
40698
40708
|
async function gI(s, t) {
|
|
40699
40709
|
var o;
|
|
40700
40710
|
const { useExtension: e = !0 } = t;
|
|
@@ -40702,23 +40712,23 @@ async function gI(s, t) {
|
|
|
40702
40712
|
const a = s, l = new URL(a, globalThis.location.origin);
|
|
40703
40713
|
let c = null;
|
|
40704
40714
|
const h = l.searchParams.get("filetype");
|
|
40705
|
-
switch (h && (c = h.toUpperCase()), c != null && c.length || (c = (o = l.pathname.split(".").pop()) == null ? void 0 : o.toUpperCase()),
|
|
40715
|
+
switch (h && (c = h.toUpperCase()), c != null && c.length || (c = (o = l.pathname.split(".").pop()) == null ? void 0 : o.toUpperCase()), Cc && console.debug("Use file extension to determine type: " + c), c) {
|
|
40706
40716
|
case "GLTF":
|
|
40707
|
-
return "gltf";
|
|
40717
|
+
return "model/gltf+json";
|
|
40708
40718
|
case "VRM":
|
|
40709
|
-
return "vrm";
|
|
40719
|
+
return "model/vrm";
|
|
40710
40720
|
case "GLB":
|
|
40711
|
-
return "
|
|
40721
|
+
return "model/gltf-binary";
|
|
40712
40722
|
case "FBX":
|
|
40713
|
-
return "fbx";
|
|
40723
|
+
return "model/fbx";
|
|
40714
40724
|
case "USD":
|
|
40715
|
-
return "usd";
|
|
40725
|
+
return "model/vnd.usd+zip";
|
|
40716
40726
|
case "USDA":
|
|
40717
|
-
return "usda";
|
|
40727
|
+
return "model/vnd.usda+zip";
|
|
40718
40728
|
case "USDZ":
|
|
40719
|
-
return "usdz";
|
|
40729
|
+
return "model/vnd.usdz+zip";
|
|
40720
40730
|
case "OBJ":
|
|
40721
|
-
return "obj";
|
|
40731
|
+
return "model/obj";
|
|
40722
40732
|
}
|
|
40723
40733
|
}
|
|
40724
40734
|
const i = s;
|
|
@@ -40734,7 +40744,7 @@ async function gI(s, t) {
|
|
|
40734
40744
|
}).catch((a) => null);
|
|
40735
40745
|
if (n != null && n.ok) {
|
|
40736
40746
|
const a = await n.arrayBuffer(), l = yI(i, a, n);
|
|
40737
|
-
return
|
|
40747
|
+
return Cc && console.log("Determined file type from header: " + l), l;
|
|
40738
40748
|
}
|
|
40739
40749
|
return "unknown";
|
|
40740
40750
|
}
|
|
@@ -40742,44 +40752,39 @@ function yI(s, t, e) {
|
|
|
40742
40752
|
if (t.byteLength < 4)
|
|
40743
40753
|
return "unknown";
|
|
40744
40754
|
const i = new Uint8Array(t);
|
|
40745
|
-
if (
|
|
40755
|
+
if (Cc && console.warn(`Trying to determine file type from binary data
|
|
40746
40756
|
`, '"' + new TextDecoder().decode(t) + `"
|
|
40747
|
-
`, i), i[0] == 103 && i[1] == 108 && i[2] == 84 && i[3] == 70)
|
|
40748
|
-
return console.debug("GLTF detected"), "
|
|
40757
|
+
`, i), i[0] == 103 && i[1] == 108 && i[2] == 84 && i[3] == 70 && i[4] == 10)
|
|
40758
|
+
return console.debug("GLTF detected"), "model/gltf+json";
|
|
40759
|
+
if (i[0] == 103 && i[1] == 108 && i[2] == 84 && i[3] == 70 && i[4] == 98)
|
|
40760
|
+
return console.debug("GLB detected"), "model/gltf-binary";
|
|
40749
40761
|
if (i[0] == 80 && i[1] == 75 && i[2] == 3 && i[3] == 4)
|
|
40750
|
-
return console.debug("USDZ detected"), "usdz";
|
|
40762
|
+
return console.debug("USDZ detected"), "model/vnd.usdz+zip";
|
|
40751
40763
|
if (i[0] == 80 && i[1] == 88 && i[2] == 82 && i[3] == 45 && i[4] == 85 && i[5] == 83 && i[6] == 68 && i[7] == 67)
|
|
40752
|
-
return console.debug("Binary USD detected"), "usd";
|
|
40764
|
+
return console.debug("Binary USD detected"), "model/vnd.usd+zip";
|
|
40753
40765
|
if (i[0] == 35 && i[1] == 117 && i[2] == 115 && i[3] == 100 && i[4] == 97)
|
|
40754
|
-
return console.debug("ASCII USD detected"), "usda";
|
|
40766
|
+
return console.debug("ASCII USD detected"), "model/vnd.usda+zip";
|
|
40755
40767
|
if (i[0] == 75 && i[1] == 97 && i[2] == 121 && i[3] == 100 && i[4] == 97 && i[5] == 114 && i[6] == 97 && i[7] == 32)
|
|
40756
|
-
return console.debug("Binary FBX detected"), "fbx";
|
|
40768
|
+
return console.debug("Binary FBX detected"), "model/fbx";
|
|
40757
40769
|
if (i[0] == 59 && i[1] == 32 && i[2] == 70 && i[3] == 66 && i[4] == 88 && i[5] == 32)
|
|
40758
|
-
return console.debug("ASCII FBX detected"), "fbx";
|
|
40770
|
+
return console.debug("ASCII FBX detected"), "model/fbx";
|
|
40759
40771
|
if (i[0] == 35 && i[1] == 32 && i[2] == 66 && i[3] == 108 && i[4] == 101 && i[5] == 110 && i[6] == 100 && i[7] == 101 && i[8] == 114 && i[9] == 32)
|
|
40760
|
-
return console.debug("OBJ detected"), "obj";
|
|
40772
|
+
return console.debug("OBJ detected"), "model/obj";
|
|
40761
40773
|
if (i[0] == 35 && i[1] == 32 && i[2] == 65 && i[3] == 108 && i[4] == 105 && i[5] == 97 && i[6] == 115 && i[7] == 32 && i[8] == 79 && i[9] == 66 && i[10] == 74)
|
|
40762
|
-
return console.debug("OBJ detected"), "obj";
|
|
40774
|
+
return console.debug("OBJ detected"), "model/obj";
|
|
40763
40775
|
if (e.headers.has("content-type")) {
|
|
40764
40776
|
const n = e.headers.get("content-type");
|
|
40765
40777
|
switch (console.debug("Content-Type: " + n), n) {
|
|
40766
40778
|
case "model/gltf+json":
|
|
40767
|
-
return "gltf";
|
|
40768
40779
|
case "model/gltf-binary":
|
|
40769
|
-
return "glb";
|
|
40770
40780
|
case "model/vrm":
|
|
40771
|
-
return "vrm";
|
|
40772
40781
|
case "model/vnd.usdz+zip":
|
|
40773
|
-
return "usdz";
|
|
40774
40782
|
case "model/vnd.usd+zip":
|
|
40775
|
-
return "usd";
|
|
40776
40783
|
case "model/vnd.usda+zip":
|
|
40777
|
-
return "usda";
|
|
40778
40784
|
case "model/fbx":
|
|
40779
40785
|
case "model/vnd.autodesk.fbx":
|
|
40780
|
-
return "fbx";
|
|
40781
40786
|
case "model/obj":
|
|
40782
|
-
return
|
|
40787
|
+
return n;
|
|
40783
40788
|
}
|
|
40784
40789
|
}
|
|
40785
40790
|
if (i[0] == 118 && i[1] == 32 || i[0] == 102 && i[1] == 32)
|
|
@@ -40796,9 +40801,9 @@ function yI(s, t, e) {
|
|
|
40796
40801
|
bytes: i
|
|
40797
40802
|
});
|
|
40798
40803
|
if (o)
|
|
40799
|
-
return
|
|
40804
|
+
return Cc && console.debug(`Mimetype callback returned: ${o}`), o;
|
|
40800
40805
|
}
|
|
40801
|
-
if (B() ||
|
|
40806
|
+
if (B() || Cc) {
|
|
40802
40807
|
const n = new TextDecoder().decode(t.slice(0, Math.min(t.byteLength, 32)));
|
|
40803
40808
|
console.warn(`Could not determine file type.
|
|
40804
40809
|
|
|
@@ -40830,30 +40835,32 @@ const ux = x("printGltf") || x("printgltf"), _I = x("debugfileformat");
|
|
|
40830
40835
|
async function fx(s, t) {
|
|
40831
40836
|
const e = await gI(s, { useExtension: !0 }) || "unknown";
|
|
40832
40837
|
_I && console.debug(`Determined file type: '${e}' for url '${s}'`);
|
|
40833
|
-
for (const i of
|
|
40834
|
-
const
|
|
40835
|
-
|
|
40836
|
-
|
|
40838
|
+
for (const i of rc) {
|
|
40839
|
+
const { callback: n } = i;
|
|
40840
|
+
let o = n({ context: t, url: s, mimetype: e });
|
|
40841
|
+
if (o instanceof Promise && await o, o)
|
|
40842
|
+
return console.debug(`Using custom loader (${i.name}) for url '${s}'`), o;
|
|
40837
40843
|
}
|
|
40838
40844
|
switch (e) {
|
|
40839
40845
|
default:
|
|
40840
|
-
console.warn(`Unknown file type: ${e}`);
|
|
40841
40846
|
case "unknown": {
|
|
40842
|
-
console.warn(
|
|
40847
|
+
console.warn(`Unknown file type (${e}). Needle Engine will fallback to the GLTFLoader - To support more model formats please create a Needle loader plugin.
|
|
40848
|
+
Use import { NeedleEngineModelLoader } from "@needle-tools/engine" namespace to register your loader.`, s);
|
|
40843
40849
|
const i = new Ls();
|
|
40844
40850
|
return await Lm(i, t, s), i;
|
|
40845
40851
|
}
|
|
40846
|
-
case "fbx":
|
|
40852
|
+
case "model/fbx":
|
|
40853
|
+
case "model/vnd.autodesk.fbx":
|
|
40847
40854
|
return new m0();
|
|
40848
|
-
case "obj":
|
|
40855
|
+
case "model/obj":
|
|
40849
40856
|
return new fg();
|
|
40850
|
-
case "
|
|
40851
|
-
case "
|
|
40852
|
-
case "
|
|
40857
|
+
case "model/vnd.usdz+zip":
|
|
40858
|
+
case "model/vnd.usd+zip":
|
|
40859
|
+
case "model/vnd.usda+zip":
|
|
40853
40860
|
return console.warn(e.toUpperCase() + " files are not supported."), null;
|
|
40854
|
-
case "gltf":
|
|
40855
|
-
case "
|
|
40856
|
-
case "vrm": {
|
|
40861
|
+
case "model/gltf+json":
|
|
40862
|
+
case "model/gltf-binary":
|
|
40863
|
+
case "model/vrm": {
|
|
40857
40864
|
const i = new Ls();
|
|
40858
40865
|
return await Lm(i, t, s), i;
|
|
40859
40866
|
}
|
|
@@ -40871,7 +40878,7 @@ async function bI(s, t, e, i) {
|
|
|
40871
40878
|
if (n instanceof fg) {
|
|
40872
40879
|
typeof t != "string" && (t = new TextDecoder().decode(t));
|
|
40873
40880
|
const l = n.parse(t);
|
|
40874
|
-
return await
|
|
40881
|
+
return await Pc(n, s, e, l, i, o);
|
|
40875
40882
|
}
|
|
40876
40883
|
if (!(n instanceof Ls)) {
|
|
40877
40884
|
if (n.parse === void 0) {
|
|
@@ -40879,14 +40886,14 @@ async function bI(s, t, e, i) {
|
|
|
40879
40886
|
return;
|
|
40880
40887
|
}
|
|
40881
40888
|
const l = n.parse(t, e);
|
|
40882
|
-
return await
|
|
40889
|
+
return await Pc(n, s, e, l, i, o);
|
|
40883
40890
|
}
|
|
40884
40891
|
return new Promise((l, c) => {
|
|
40885
40892
|
try {
|
|
40886
40893
|
let h = e.split("?")[0].trimEnd();
|
|
40887
40894
|
const d = h.split("/");
|
|
40888
40895
|
d.length > 0 && d[d.length - 1] !== "" && d.pop(), h = d.join("/"), h.endsWith("/") || (h += "/"), n.resourcePath = h, n.parse(t, "", async (u) => {
|
|
40889
|
-
const p = await
|
|
40896
|
+
const p = await Pc(n, s, e, u, i, o);
|
|
40890
40897
|
l(p);
|
|
40891
40898
|
}, (u) => {
|
|
40892
40899
|
console.error('Loading asset at "' + e + `" failed
|
|
@@ -40905,12 +40912,12 @@ async function px(s, t, e, i, n) {
|
|
|
40905
40912
|
const { componentsExtension: a } = mx(o, s);
|
|
40906
40913
|
if (!(o instanceof Ls)) {
|
|
40907
40914
|
const l = await o.loadAsync(t, n);
|
|
40908
|
-
return await
|
|
40915
|
+
return await Pc(o, s, t, l, i, a);
|
|
40909
40916
|
}
|
|
40910
40917
|
return new Promise((l, c) => {
|
|
40911
40918
|
try {
|
|
40912
40919
|
o.load(t, async (h) => {
|
|
40913
|
-
const d = await
|
|
40920
|
+
const d = await Pc(o, s, e, h, i, a);
|
|
40914
40921
|
l(d);
|
|
40915
40922
|
}, (h) => {
|
|
40916
40923
|
n == null || n.call(o, h);
|
|
@@ -40927,7 +40934,7 @@ function mx(s, t) {
|
|
|
40927
40934
|
const e = tw(s);
|
|
40928
40935
|
return s instanceof Ls && Bg(s, t), { componentsExtension: e };
|
|
40929
40936
|
}
|
|
40930
|
-
async function
|
|
40937
|
+
async function Pc(s, t, e, i, n, o) {
|
|
40931
40938
|
var a;
|
|
40932
40939
|
if (ux && console.warn("Loaded", e, i), i == null)
|
|
40933
40940
|
return console.error(`Loaded model is null '${e}' - please make sure the loader is registered correctly`), {
|
|
@@ -41470,7 +41477,7 @@ changed from "`, i, '" to "', n, '"'), this.onLoad();
|
|
|
41470
41477
|
break;
|
|
41471
41478
|
}
|
|
41472
41479
|
case "public-key": {
|
|
41473
|
-
n !=
|
|
41480
|
+
n != md && this.setPublicKey();
|
|
41474
41481
|
break;
|
|
41475
41482
|
}
|
|
41476
41483
|
case "version": {
|
|
@@ -41572,7 +41579,7 @@ Needle Engine: finished loading ` + i + `
|
|
|
41572
41579
|
this._context.renderer.toneMapping = Ru;
|
|
41573
41580
|
break;
|
|
41574
41581
|
case "neutral":
|
|
41575
|
-
this._context.renderer.toneMapping =
|
|
41582
|
+
this._context.renderer.toneMapping = Dc;
|
|
41576
41583
|
break;
|
|
41577
41584
|
case "agx":
|
|
41578
41585
|
this._context.renderer.toneMapping = Mu;
|
|
@@ -41639,7 +41646,7 @@ Needle Engine: finished loading ` + i + `
|
|
|
41639
41646
|
}
|
|
41640
41647
|
}
|
|
41641
41648
|
setPublicKey() {
|
|
41642
|
-
|
|
41649
|
+
md.length > 0 && this.setAttribute("public-key", md);
|
|
41643
41650
|
}
|
|
41644
41651
|
setVersion() {
|
|
41645
41652
|
Vn.length > 0 && this.setAttribute("version", Vn);
|
|
@@ -41775,7 +41782,7 @@ Qe && console.log("Use Rapier", !0, globalThis.true);
|
|
|
41775
41782
|
pe.registerCallback(me.ContextCreationStart, (s) => {
|
|
41776
41783
|
Qe && console.log("Register rapier physics backend"), s.context.physics.engine = new Ko(s.context);
|
|
41777
41784
|
});
|
|
41778
|
-
const
|
|
41785
|
+
const Ic = class {
|
|
41779
41786
|
constructor(t) {
|
|
41780
41787
|
r(this, "debugRenderColliders", !1);
|
|
41781
41788
|
r(this, "debugRenderRaycasts", !1);
|
|
@@ -42377,7 +42384,7 @@ Error:`, l), null;
|
|
|
42377
42384
|
i && t.gameObject && (i.x !== 0 || i.y !== 0 || i.z !== 0) && (this._tempCenterPos.x = i.x, this._tempCenterPos.y = i.y, this._tempCenterPos.z = i.z, Ke(t.gameObject, this._tempCenterVec), this._tempCenterPos.multiply(this._tempCenterVec), t.attachedRigidbody ? this._tempCenterPos.applyQuaternion(t.gameObject.quaternion) : (Ce(t.gameObject, this._tempCenterQuaternion), this._tempCenterPos.applyQuaternion(this._tempCenterQuaternion)), e.x += this._tempCenterPos.x, e.y += this._tempCenterPos.y, e.z += this._tempCenterPos.z);
|
|
42378
42385
|
}
|
|
42379
42386
|
getRigidbodyRelativeMatrix(t, e, i, n) {
|
|
42380
|
-
if (n === void 0 && (n =
|
|
42387
|
+
if (n === void 0 && (n = Ic._matricesBuffer, n.length = 0), t === e) {
|
|
42381
42388
|
const o = Ke(t, this._tempPosition);
|
|
42382
42389
|
i.makeScale(o.x, o.y, o.z);
|
|
42383
42390
|
for (let a = n.length - 1; a >= 0; a--)
|
|
@@ -42394,8 +42401,8 @@ Error:`, l), null;
|
|
|
42394
42401
|
const i = t[qt], n = e[qt];
|
|
42395
42402
|
this.calculateJointRelativeMatrices(t.gameObject, e.gameObject, this._tempMatrix), this._tempMatrix.decompose(this._tempPosition, this._tempQuaternion, this._tempScale);
|
|
42396
42403
|
const o = D.RAPIER_PHYSICS.MODULE.JointData.fixed(
|
|
42397
|
-
|
|
42398
|
-
|
|
42404
|
+
Ic.centerConnectionPos,
|
|
42405
|
+
Ic.centerConnectionRot,
|
|
42399
42406
|
this._tempPosition,
|
|
42400
42407
|
this._tempQuaternion
|
|
42401
42408
|
), a = this.world.createImpulseJoint(o, i, n, !0);
|
|
@@ -42418,7 +42425,7 @@ Error:`, l), null;
|
|
|
42418
42425
|
n.elements[0] = 1, n.elements[5] = 1, n.elements[10] = 1, o.elements[0] = 1, o.elements[5] = 1, o.elements[10] = 1, i.copy(o).premultiply(n.invert()).invert();
|
|
42419
42426
|
}
|
|
42420
42427
|
};
|
|
42421
|
-
let Ko =
|
|
42428
|
+
let Ko = Ic;
|
|
42422
42429
|
r(Ko, "_didLoadPhysicsEngine", !1), r(Ko, "_matricesBuffer", []), r(Ko, "centerConnectionPos", { x: 0, y: 0, z: 0 }), r(Ko, "centerConnectionRot", { x: 0, y: 0, z: 0, w: 1 });
|
|
42423
42430
|
class AI {
|
|
42424
42431
|
constructor(t, e) {
|
|
@@ -42643,7 +42650,7 @@ class II {
|
|
|
42643
42650
|
}
|
|
42644
42651
|
onBeforeExport(t) {
|
|
42645
42652
|
t.context.animations.mixers.forEach((e) => {
|
|
42646
|
-
const i =
|
|
42653
|
+
const i = $c.tryGetActionsFromMixer(e);
|
|
42647
42654
|
if (i)
|
|
42648
42655
|
for (let n = 0; n < i.length; n++) {
|
|
42649
42656
|
const o = i[n];
|
|
@@ -42665,7 +42672,7 @@ class II {
|
|
|
42665
42672
|
}
|
|
42666
42673
|
function LI(s, t, e) {
|
|
42667
42674
|
s.animations.mixers.forEach((n) => {
|
|
42668
|
-
const o =
|
|
42675
|
+
const o = $c.tryGetActionsFromMixer(n);
|
|
42669
42676
|
if (o)
|
|
42670
42677
|
for (let a = 0; a < o.length; a++) {
|
|
42671
42678
|
const c = o[a].getClip();
|
|
@@ -42673,12 +42680,12 @@ function LI(s, t, e) {
|
|
|
42673
42680
|
}
|
|
42674
42681
|
}), Array.isArray(t) || (t = [t]);
|
|
42675
42682
|
for (const n of t)
|
|
42676
|
-
|
|
42683
|
+
$c.tryGetAnimationClipsFromObjectHierarchy(n, e);
|
|
42677
42684
|
const i = new Set(e);
|
|
42678
42685
|
return Array.from(i);
|
|
42679
42686
|
}
|
|
42680
42687
|
const e0 = "needle-button", jp = B();
|
|
42681
|
-
var hr, dr, ur, Qt, ys, Aa, vu, xx, wu, Sx,
|
|
42688
|
+
var hr, dr, ur, Qt, ys, Aa, vu, xx, wu, Sx, Yc;
|
|
42682
42689
|
class wx extends HTMLElement {
|
|
42683
42690
|
constructor() {
|
|
42684
42691
|
super();
|
|
@@ -42693,10 +42700,10 @@ class wx extends HTMLElement {
|
|
|
42693
42700
|
/** If AR or VR is requested we create and use the webxr button factory to create a button with default behaviour */
|
|
42694
42701
|
Ui(this, ys, void 0);
|
|
42695
42702
|
Ui(this, Aa, void 0);
|
|
42696
|
-
Ui(this,
|
|
42703
|
+
Ui(this, Yc, (e) => {
|
|
42697
42704
|
jp && console.log("Needle Button clicked"), !e.defaultPrevented && fe(this, Qt) && fe(this, Qt).click();
|
|
42698
42705
|
});
|
|
42699
|
-
this.removeEventListener("click", fe(this,
|
|
42706
|
+
this.removeEventListener("click", fe(this, Yc)), this.addEventListener("click", fe(this, Yc));
|
|
42700
42707
|
}
|
|
42701
42708
|
attributeChangedCallback(e, i, n) {
|
|
42702
42709
|
Sl(this, vu, xx).call(this);
|
|
@@ -42751,7 +42758,7 @@ hr = new WeakMap(), dr = new WeakMap(), ur = new WeakMap(), Qt = new WeakMap(),
|
|
|
42751
42758
|
`), fe(this, dr).innerHTML = fe(this, Qt).innerHTML, fe(this, dr).style.cssText = "display: flex; align-items: center; justify-content: center;", fe(this, Qt).innerHTML = fe(this, dr).outerHTML, fe(this, hr).innerHTML = fe(this, Qt).outerHTML, fe(this, hr).prepend(fe(this, ur)), Yd(Om, { element: fe(this, hr) }), (n = fe(this, Aa)) == null || n.disconnect(), fe(this, Aa) ?? cn(this, Aa, new MutationObserver(() => Sl(this, wu, Sx).call(this))), fe(this, Aa).observe(fe(this, Qt), { attributes: !0 }), jp && console.log("Needle Button updated");
|
|
42752
42759
|
}, wu = new WeakSet(), Sx = function() {
|
|
42753
42760
|
fe(this, Qt) && (fe(this, Qt).style.display === "none" ? this.style.display = "none" : this.style.display === "none" && (this.style.display = ""));
|
|
42754
|
-
},
|
|
42761
|
+
}, Yc = new WeakMap(), r(wx, "observedAttributes", ["ar", "vr", "quicklook"]);
|
|
42755
42762
|
typeof window < "u" && !window.customElements.get(e0) && window.customElements.define(e0, wx);
|
|
42756
42763
|
const Nl = x("debugavatar");
|
|
42757
42764
|
class Cx {
|
|
@@ -42802,7 +42809,7 @@ class DI {
|
|
|
42802
42809
|
if (typeof e == "string") {
|
|
42803
42810
|
if (i = await this.loadAvatar(t, e), !i) {
|
|
42804
42811
|
const o = new Qn();
|
|
42805
|
-
i = S.instantiate(
|
|
42812
|
+
i = S.instantiate(jc(e, t.scene), o);
|
|
42806
42813
|
}
|
|
42807
42814
|
} else
|
|
42808
42815
|
i = e;
|
|
@@ -42928,7 +42935,7 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42928
42935
|
ActionModel: bi,
|
|
42929
42936
|
AlignmentConstraint: Wu,
|
|
42930
42937
|
Animation: ti,
|
|
42931
|
-
AnimationCurve:
|
|
42938
|
+
AnimationCurve: vh,
|
|
42932
42939
|
AnimationExtension: Jg,
|
|
42933
42940
|
AnimationTrackHandler: wy,
|
|
42934
42941
|
Animator: Ut,
|
|
@@ -42940,7 +42947,7 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42940
42947
|
AudioTrackHandler: Ta,
|
|
42941
42948
|
Avatar: Pr,
|
|
42942
42949
|
AvatarBlink_Simple: Ka,
|
|
42943
|
-
AvatarEyeLook_Rotation:
|
|
42950
|
+
AvatarEyeLook_Rotation: ih,
|
|
42944
42951
|
AvatarLoader: DI,
|
|
42945
42952
|
AvatarMarker: yt,
|
|
42946
42953
|
AvatarModel: Cx,
|
|
@@ -42948,13 +42955,13 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42948
42955
|
Avatar_MouthShapes: qu,
|
|
42949
42956
|
Avatar_MustacheShake: Uv,
|
|
42950
42957
|
Avatar_POI: wo,
|
|
42951
|
-
AxesHelper:
|
|
42958
|
+
AxesHelper: nh,
|
|
42952
42959
|
BaseUIComponent: Sn,
|
|
42953
42960
|
BasicIKConstraint: Wv,
|
|
42954
42961
|
BehaviorExtension: Cw,
|
|
42955
42962
|
BehaviorModel: At,
|
|
42956
42963
|
BloomEffect: fl,
|
|
42957
|
-
BoxCollider:
|
|
42964
|
+
BoxCollider: oh,
|
|
42958
42965
|
BoxGizmo: ll,
|
|
42959
42966
|
BoxHelperComponent: wi,
|
|
42960
42967
|
Button: Uo,
|
|
@@ -42964,14 +42971,14 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42964
42971
|
Canvas: Nt,
|
|
42965
42972
|
CanvasGroup: Or,
|
|
42966
42973
|
CapsuleCollider: Mo,
|
|
42967
|
-
ChangeMaterialOnClick:
|
|
42974
|
+
ChangeMaterialOnClick: ch,
|
|
42968
42975
|
ChangeTransformOnClick: il,
|
|
42969
42976
|
CharacterController: Za,
|
|
42970
42977
|
CharacterControllerInput: To,
|
|
42971
42978
|
ChromaticAberration: cf,
|
|
42972
42979
|
Collider: Ei,
|
|
42973
42980
|
ColorAdjustments: zr,
|
|
42974
|
-
ColorBySpeedModule:
|
|
42981
|
+
ColorBySpeedModule: wh,
|
|
42975
42982
|
ColorOverLifetimeModule: uy,
|
|
42976
42983
|
ContactShadows: Yn,
|
|
42977
42984
|
ControlTrackHandler: xy,
|
|
@@ -42983,10 +42990,10 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42983
42990
|
DocumentExtension: jI,
|
|
42984
42991
|
DragControls: Ci,
|
|
42985
42992
|
DropListener: Ao,
|
|
42986
|
-
Duplicatable:
|
|
42993
|
+
Duplicatable: rh,
|
|
42987
42994
|
EffectWrapper: ru,
|
|
42988
42995
|
EmissionModule: jo,
|
|
42989
|
-
EmphasizeOnClick:
|
|
42996
|
+
EmphasizeOnClick: hh,
|
|
42990
42997
|
EnvironmentScene: Py,
|
|
42991
42998
|
EventList: xe,
|
|
42992
42999
|
EventListEvent: Ug,
|
|
@@ -42994,28 +43001,28 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42994
43001
|
EventTrigger: Kg,
|
|
42995
43002
|
FieldWithDefault: Sk,
|
|
42996
43003
|
FixedJoint: Bw,
|
|
42997
|
-
Fog:
|
|
43004
|
+
Fog: mh,
|
|
42998
43005
|
GltfExport: Ku,
|
|
42999
43006
|
GltfExportBox: lw,
|
|
43000
43007
|
Gradient: hl,
|
|
43001
43008
|
Graphic: ol,
|
|
43002
43009
|
GraphicRaycaster: Ng,
|
|
43003
|
-
GridHelper:
|
|
43010
|
+
GridHelper: gh,
|
|
43004
43011
|
GridLayoutGroup: Iw,
|
|
43005
43012
|
GroundProjectedEnv: Us,
|
|
43006
43013
|
GroupActionModel: ar,
|
|
43007
43014
|
HideOnStart: cr,
|
|
43008
43015
|
HingeJoint: of,
|
|
43009
43016
|
HorizontalLayoutGroup: Ew,
|
|
43010
|
-
Image:
|
|
43017
|
+
Image: Rh,
|
|
43011
43018
|
InheritVelocityModule: ul,
|
|
43012
43019
|
InputField: yl,
|
|
43013
|
-
InstanceHandle:
|
|
43020
|
+
InstanceHandle: vc,
|
|
43014
43021
|
InstancingHandler: rr,
|
|
43015
43022
|
Interactable: Gv,
|
|
43016
43023
|
Keyframe: Pi,
|
|
43017
43024
|
LODGroup: rf,
|
|
43018
|
-
LODModel:
|
|
43025
|
+
LODModel: _h,
|
|
43019
43026
|
Light: Di,
|
|
43020
43027
|
LimitVelocityOverLifetimeModule: xt,
|
|
43021
43028
|
LogStats: Hv,
|
|
@@ -43029,13 +43036,13 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43029
43036
|
MinMaxGradient: ji,
|
|
43030
43037
|
NeedleMenu: Ws,
|
|
43031
43038
|
NestedGltf: hy,
|
|
43032
|
-
Networking:
|
|
43039
|
+
Networking: bh,
|
|
43033
43040
|
NoiseModule: Oe,
|
|
43034
43041
|
ObjectRaycaster: on,
|
|
43035
43042
|
OffsetConstraint: cl,
|
|
43036
|
-
OpenURL:
|
|
43043
|
+
OpenURL: kh,
|
|
43037
43044
|
OrbitControls: we,
|
|
43038
|
-
Outline:
|
|
43045
|
+
Outline: ph,
|
|
43039
43046
|
Padding: rl,
|
|
43040
43047
|
ParticleBurst: Vm,
|
|
43041
43048
|
ParticleSubEmitter: zw,
|
|
@@ -43046,15 +43053,15 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43046
43053
|
PlayAnimationOnClick: Ga,
|
|
43047
43054
|
PlayAudioOnClick: Cr,
|
|
43048
43055
|
PlayableDirector: Rr,
|
|
43049
|
-
PlayerColor:
|
|
43056
|
+
PlayerColor: qc,
|
|
43050
43057
|
PointerEventData: Hu,
|
|
43051
43058
|
PostProcessingHandler: qw,
|
|
43052
|
-
PreliminaryAction:
|
|
43059
|
+
PreliminaryAction: dh,
|
|
43053
43060
|
PreliminaryTrigger: Zu,
|
|
43054
43061
|
RawImage: Cy,
|
|
43055
43062
|
Rect: k2,
|
|
43056
43063
|
RectTransform: ii,
|
|
43057
|
-
ReflectionProbe:
|
|
43064
|
+
ReflectionProbe: ah,
|
|
43058
43065
|
RegisteredAnimationInfo: lr,
|
|
43059
43066
|
RemoteSkybox: Fs,
|
|
43060
43067
|
Renderer: Je,
|
|
@@ -43071,7 +43078,7 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43071
43078
|
ShapeModule: tt,
|
|
43072
43079
|
SharpeningEffect: uf,
|
|
43073
43080
|
SignalAsset: vy,
|
|
43074
|
-
SignalReceiver:
|
|
43081
|
+
SignalReceiver: Mh,
|
|
43075
43082
|
SignalReceiverEvent: yf,
|
|
43076
43083
|
SignalTrackHandler: cu,
|
|
43077
43084
|
Size: R2,
|
|
@@ -43084,11 +43091,11 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43084
43091
|
SpatialTrigger: mf,
|
|
43085
43092
|
SpatialTriggerReceiver: Ts,
|
|
43086
43093
|
SpectatorCamera: _y,
|
|
43087
|
-
SphereCollider:
|
|
43094
|
+
SphereCollider: sh,
|
|
43088
43095
|
Sprite: Eo,
|
|
43089
43096
|
SpriteData: wr,
|
|
43090
43097
|
SpriteRenderer: Ii,
|
|
43091
|
-
SpriteSheet:
|
|
43098
|
+
SpriteSheet: Hc,
|
|
43092
43099
|
SubEmitterSystem: qm,
|
|
43093
43100
|
SyncedCamera: by,
|
|
43094
43101
|
SyncedRoom: is,
|
|
@@ -43121,7 +43128,7 @@ const pD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43121
43128
|
Vignette: ml,
|
|
43122
43129
|
VisibilityAction: Ju,
|
|
43123
43130
|
Voip: Dr,
|
|
43124
|
-
Volume:
|
|
43131
|
+
Volume: Sh,
|
|
43125
43132
|
VolumeParameter: N,
|
|
43126
43133
|
VolumeProfile: py,
|
|
43127
43134
|
WebARCameraBackground: Cf,
|
|
@@ -43206,7 +43213,7 @@ pe.registerCallback(me.ContextCreated, (s) => {
|
|
|
43206
43213
|
if (n instanceof Rr)
|
|
43207
43214
|
return n.playOnAwake = !0, !0;
|
|
43208
43215
|
}
|
|
43209
|
-
}, !0) !== !0 &&
|
|
43216
|
+
}, !0) !== !0 && $c.assignAnimationsFromFile(e.file, {
|
|
43210
43217
|
createAnimationComponent: (n, o) => tn(n, ti)
|
|
43211
43218
|
});
|
|
43212
43219
|
});
|
|
@@ -43264,17 +43271,17 @@ export {
|
|
|
43264
43271
|
bi as ActionModel,
|
|
43265
43272
|
hO as Addressables,
|
|
43266
43273
|
Wu as AlignmentConstraint,
|
|
43267
|
-
|
|
43274
|
+
mc as AmbientMode,
|
|
43268
43275
|
ti as Animation,
|
|
43269
|
-
|
|
43276
|
+
vh as AnimationCurve,
|
|
43270
43277
|
Jg as AnimationExtension,
|
|
43271
43278
|
wy as AnimationTrackHandler,
|
|
43272
|
-
|
|
43279
|
+
$c as AnimationUtils,
|
|
43273
43280
|
Ut as Animator,
|
|
43274
43281
|
Yo as AnimatorConditionMode,
|
|
43275
43282
|
vn as AnimatorController,
|
|
43276
43283
|
Lv as AnimatorControllerParameterType,
|
|
43277
|
-
|
|
43284
|
+
Wh as AnimatorStateInfo,
|
|
43278
43285
|
lf as Antialiasing,
|
|
43279
43286
|
_n as Application,
|
|
43280
43287
|
fP as AssetDatabase,
|
|
@@ -43285,7 +43292,7 @@ export {
|
|
|
43285
43292
|
Ta as AudioTrackHandler,
|
|
43286
43293
|
Pr as Avatar,
|
|
43287
43294
|
Ka as AvatarBlink_Simple,
|
|
43288
|
-
|
|
43295
|
+
ih as AvatarEyeLook_Rotation,
|
|
43289
43296
|
DI as AvatarLoader,
|
|
43290
43297
|
yt as AvatarMarker,
|
|
43291
43298
|
Cx as AvatarModel,
|
|
@@ -43294,7 +43301,7 @@ export {
|
|
|
43294
43301
|
Uv as Avatar_MustacheShake,
|
|
43295
43302
|
wo as Avatar_POI,
|
|
43296
43303
|
Ql as Axes,
|
|
43297
|
-
|
|
43304
|
+
nh as AxesHelper,
|
|
43298
43305
|
U0 as BUILD_TIME,
|
|
43299
43306
|
Sn as BaseUIComponent,
|
|
43300
43307
|
Wv as BasicIKConstraint,
|
|
@@ -43302,7 +43309,7 @@ export {
|
|
|
43302
43309
|
At as BehaviorModel,
|
|
43303
43310
|
Va as BlobStorage,
|
|
43304
43311
|
fl as BloomEffect,
|
|
43305
|
-
|
|
43312
|
+
oh as BoxCollider,
|
|
43306
43313
|
ll as BoxGizmo,
|
|
43307
43314
|
wi as BoxHelperComponent,
|
|
43308
43315
|
Uo as Button,
|
|
@@ -43314,7 +43321,7 @@ export {
|
|
|
43314
43321
|
Nt as Canvas,
|
|
43315
43322
|
Or as CanvasGroup,
|
|
43316
43323
|
Mo as CapsuleCollider,
|
|
43317
|
-
|
|
43324
|
+
ch as ChangeMaterialOnClick,
|
|
43318
43325
|
il as ChangeTransformOnClick,
|
|
43319
43326
|
Za as CharacterController,
|
|
43320
43327
|
To as CharacterControllerInput,
|
|
@@ -43326,7 +43333,7 @@ export {
|
|
|
43326
43333
|
rR as Collision,
|
|
43327
43334
|
zg as CollisionDetectionMode,
|
|
43328
43335
|
zr as ColorAdjustments,
|
|
43329
|
-
|
|
43336
|
+
wh as ColorBySpeedModule,
|
|
43330
43337
|
uy as ColorOverLifetimeModule,
|
|
43331
43338
|
$L as Component,
|
|
43332
43339
|
I as Component$1,
|
|
@@ -43352,10 +43359,10 @@ export {
|
|
|
43352
43359
|
Ci as DragControls,
|
|
43353
43360
|
Xv as DragMode,
|
|
43354
43361
|
Ao as DropListener,
|
|
43355
|
-
|
|
43362
|
+
rh as Duplicatable,
|
|
43356
43363
|
ru as EffectWrapper,
|
|
43357
43364
|
jo as EmissionModule,
|
|
43358
|
-
|
|
43365
|
+
hh as EmphasizeOnClick,
|
|
43359
43366
|
Dd as EngineLoadingView,
|
|
43360
43367
|
Py as EnvironmentScene,
|
|
43361
43368
|
xe as EventList,
|
|
@@ -43363,12 +43370,12 @@ export {
|
|
|
43363
43370
|
di as EventSystem,
|
|
43364
43371
|
Kg as EventTrigger,
|
|
43365
43372
|
Sk as FieldWithDefault,
|
|
43366
|
-
|
|
43373
|
+
pc as FileReference,
|
|
43367
43374
|
pO as FileReferenceSerializer,
|
|
43368
43375
|
tD as FileSpawnModel,
|
|
43369
43376
|
WR as File_Event,
|
|
43370
43377
|
Bw as FixedJoint,
|
|
43371
|
-
|
|
43378
|
+
mh as Fog,
|
|
43372
43379
|
Re as FrameEvent,
|
|
43373
43380
|
bg as GENERATOR,
|
|
43374
43381
|
S as GameObject,
|
|
@@ -43379,7 +43386,7 @@ export {
|
|
|
43379
43386
|
ol as Graphic,
|
|
43380
43387
|
Ng as GraphicRaycaster,
|
|
43381
43388
|
mn as Graphics,
|
|
43382
|
-
|
|
43389
|
+
gh as GridHelper,
|
|
43383
43390
|
Iw as GridLayoutGroup,
|
|
43384
43391
|
Us as GroundProjectedEnv,
|
|
43385
43392
|
ar as GroupActionModel,
|
|
@@ -43388,15 +43395,15 @@ export {
|
|
|
43388
43395
|
of as HingeJoint,
|
|
43389
43396
|
Ew as HorizontalLayoutGroup,
|
|
43390
43397
|
LL as HostData,
|
|
43391
|
-
|
|
43392
|
-
|
|
43398
|
+
Rh as Image,
|
|
43399
|
+
fc as ImageReference,
|
|
43393
43400
|
fO as ImageReferenceSerializer,
|
|
43394
43401
|
ul as InheritVelocityModule,
|
|
43395
43402
|
DC as Input,
|
|
43396
43403
|
vi as InputEventQueue,
|
|
43397
43404
|
Ne as InputEvents,
|
|
43398
43405
|
yl as InputField,
|
|
43399
|
-
|
|
43406
|
+
vc as InstanceHandle,
|
|
43400
43407
|
rr as InstancingHandler,
|
|
43401
43408
|
bn as InstancingUtil,
|
|
43402
43409
|
CP as InstantiateEvent,
|
|
@@ -43408,7 +43415,7 @@ export {
|
|
|
43408
43415
|
PL as KeyEventArgs,
|
|
43409
43416
|
Pi as Keyframe,
|
|
43410
43417
|
rf as LODGroup,
|
|
43411
|
-
|
|
43418
|
+
_h as LODModel,
|
|
43412
43419
|
kL as LeftRoomResponse,
|
|
43413
43420
|
Di as Light,
|
|
43414
43421
|
TO as LightData,
|
|
@@ -43427,7 +43434,7 @@ export {
|
|
|
43427
43434
|
Yu as MeshRenderer,
|
|
43428
43435
|
Q as MinMaxCurve,
|
|
43429
43436
|
ji as MinMaxGradient,
|
|
43430
|
-
|
|
43437
|
+
Eh as NEKeyboardEvent,
|
|
43431
43438
|
eo as NEPointerEvent,
|
|
43432
43439
|
wx as NeedleButtonElement,
|
|
43433
43440
|
vx as NeedleEngineHTMLElement,
|
|
@@ -43442,7 +43449,7 @@ export {
|
|
|
43442
43449
|
YC as NetworkConnection,
|
|
43443
43450
|
xs as NetworkedStreamEvents,
|
|
43444
43451
|
Gu as NetworkedStreams,
|
|
43445
|
-
|
|
43452
|
+
bh as Networking,
|
|
43446
43453
|
MP as NewInstanceModel,
|
|
43447
43454
|
Oe as NoiseModule,
|
|
43448
43455
|
on as ObjectRaycaster,
|
|
@@ -43450,12 +43457,12 @@ export {
|
|
|
43450
43457
|
cl as OffsetConstraint,
|
|
43451
43458
|
Af as OneEuroFilter,
|
|
43452
43459
|
M0 as OneEuroFilterXYZ,
|
|
43453
|
-
|
|
43460
|
+
kh as OpenURL,
|
|
43454
43461
|
we as OrbitControls,
|
|
43455
|
-
|
|
43462
|
+
ph as Outline,
|
|
43456
43463
|
QC as OwnershipEvent,
|
|
43457
43464
|
Y0 as OwnershipModel,
|
|
43458
|
-
|
|
43465
|
+
md as PUBLIC_KEY,
|
|
43459
43466
|
rl as Padding,
|
|
43460
43467
|
Vm as ParticleBurst,
|
|
43461
43468
|
zw as ParticleSubEmitter,
|
|
@@ -43465,24 +43472,24 @@ export {
|
|
|
43465
43472
|
$m as ParticleSystemShapeType,
|
|
43466
43473
|
Ma as PeerHandle,
|
|
43467
43474
|
HC as PeerNetworking,
|
|
43468
|
-
|
|
43475
|
+
hc as Physics,
|
|
43469
43476
|
Pw as PhysicsExtension,
|
|
43470
43477
|
Mt as PhysicsMaterialCombine,
|
|
43471
43478
|
df as PixelationEffect,
|
|
43472
43479
|
Ga as PlayAnimationOnClick,
|
|
43473
43480
|
Cr as PlayAudioOnClick,
|
|
43474
43481
|
Rr as PlayableDirector,
|
|
43475
|
-
|
|
43482
|
+
qc as PlayerColor,
|
|
43476
43483
|
en as PlayerState,
|
|
43477
43484
|
u2 as PlayerStateEvent,
|
|
43478
|
-
|
|
43485
|
+
uh as PlayerSync,
|
|
43479
43486
|
wO as PlayerView,
|
|
43480
43487
|
xO as PlayerViewManager,
|
|
43481
43488
|
Hu as PointerEventData,
|
|
43482
43489
|
Sg as PointerType,
|
|
43483
43490
|
dt as PostProcessingEffect,
|
|
43484
43491
|
qw as PostProcessingHandler,
|
|
43485
|
-
|
|
43492
|
+
dh as PreliminaryAction,
|
|
43486
43493
|
Zu as PreliminaryTrigger,
|
|
43487
43494
|
er as PreviewHelper,
|
|
43488
43495
|
za as PrimitiveType,
|
|
@@ -43495,7 +43502,7 @@ export {
|
|
|
43495
43502
|
Ds as RaycastOptions,
|
|
43496
43503
|
k2 as Rect,
|
|
43497
43504
|
ii as RectTransform,
|
|
43498
|
-
|
|
43505
|
+
ah as ReflectionProbe,
|
|
43499
43506
|
lr as RegisteredAnimationInfo,
|
|
43500
43507
|
Fs as RemoteSkybox,
|
|
43501
43508
|
gr as RenderTexture,
|
|
@@ -43520,7 +43527,7 @@ export {
|
|
|
43520
43527
|
tt as ShapeModule,
|
|
43521
43528
|
uf as SharpeningEffect,
|
|
43522
43529
|
vy as SignalAsset,
|
|
43523
|
-
|
|
43530
|
+
Mh as SignalReceiver,
|
|
43524
43531
|
yf as SignalReceiverEvent,
|
|
43525
43532
|
cu as SignalTrackHandler,
|
|
43526
43533
|
R2 as Size,
|
|
@@ -43533,13 +43540,13 @@ export {
|
|
|
43533
43540
|
mf as SpatialTrigger,
|
|
43534
43541
|
Ts as SpatialTriggerReceiver,
|
|
43535
43542
|
_y as SpectatorCamera,
|
|
43536
|
-
|
|
43543
|
+
sh as SphereCollider,
|
|
43537
43544
|
Z0 as SphereIntersection,
|
|
43538
43545
|
aR as SphereOverlapResult,
|
|
43539
43546
|
Eo as Sprite,
|
|
43540
43547
|
wr as SpriteData,
|
|
43541
43548
|
Ii as SpriteRenderer,
|
|
43542
|
-
|
|
43549
|
+
Hc as SpriteSheet,
|
|
43543
43550
|
VL as StateMachineBehaviour,
|
|
43544
43551
|
Fv as StreamEndedEvent,
|
|
43545
43552
|
lR as StreamReceivedEvent,
|
|
@@ -43588,7 +43595,7 @@ export {
|
|
|
43588
43595
|
ml as Vignette,
|
|
43589
43596
|
Ju as VisibilityAction,
|
|
43590
43597
|
Dr as Voip,
|
|
43591
|
-
|
|
43598
|
+
Sh as Volume,
|
|
43592
43599
|
N as VolumeParameter,
|
|
43593
43600
|
py as VolumeProfile,
|
|
43594
43601
|
jL as WaitForFrames,
|
|
@@ -43634,7 +43641,7 @@ export {
|
|
|
43634
43641
|
uC as copyTexture,
|
|
43635
43642
|
fM as createMotion,
|
|
43636
43643
|
gi as debugNet,
|
|
43637
|
-
|
|
43644
|
+
Dh as debugOwner,
|
|
43638
43645
|
Bk as decompressGpuTexture,
|
|
43639
43646
|
Tu as deepClone,
|
|
43640
43647
|
Hn as delay,
|
|
@@ -43644,7 +43651,7 @@ export {
|
|
|
43644
43651
|
nO as destroyComponentInstance,
|
|
43645
43652
|
Ee as disposeObjectResources,
|
|
43646
43653
|
Ss as disposeStream,
|
|
43647
|
-
|
|
43654
|
+
gd as editorGuidKeyName,
|
|
43648
43655
|
xa as enableSpatialConsole,
|
|
43649
43656
|
ZL as euler,
|
|
43650
43657
|
JL as eventListSerializer,
|
|
@@ -43665,7 +43672,7 @@ export {
|
|
|
43665
43672
|
Uu as getComponentInChildren,
|
|
43666
43673
|
Xd as getComponentInParent,
|
|
43667
43674
|
zu as getComponents,
|
|
43668
|
-
|
|
43675
|
+
Zc as getComponentsInChildren,
|
|
43669
43676
|
Tg as getComponentsInParent,
|
|
43670
43677
|
Rk as getFormattedDate,
|
|
43671
43678
|
Dt as getIconElement,
|
|
@@ -43703,7 +43710,7 @@ export {
|
|
|
43703
43710
|
LC as invokeXRSessionEnd,
|
|
43704
43711
|
IC as invokeXRSessionStart,
|
|
43705
43712
|
oO as isActiveInHierarchy,
|
|
43706
|
-
|
|
43713
|
+
Jc as isActiveSelf,
|
|
43707
43714
|
nL as isAndroidDevice,
|
|
43708
43715
|
dC as isAnimationAction,
|
|
43709
43716
|
sR as isComponent,
|
|
@@ -43785,7 +43792,7 @@ export {
|
|
|
43785
43792
|
f as serializable,
|
|
43786
43793
|
WP as serializeObject,
|
|
43787
43794
|
Qa as serializeable,
|
|
43788
|
-
|
|
43795
|
+
xd as setActive,
|
|
43789
43796
|
WS as setAllowBalloonMessages,
|
|
43790
43797
|
fL as setAllowOverlayMessages,
|
|
43791
43798
|
om as setAutoFitEnabled,
|
|
@@ -43808,7 +43815,7 @@ export {
|
|
|
43808
43815
|
k0 as setWorldQuaternionXYZW,
|
|
43809
43816
|
hC as setWorldRotation,
|
|
43810
43817
|
Iu as setWorldRotationXYZ,
|
|
43811
|
-
|
|
43818
|
+
Fc as setWorldScale,
|
|
43812
43819
|
Lu as showBalloonError,
|
|
43813
43820
|
We as showBalloonMessage,
|
|
43814
43821
|
ve as showBalloonWarning,
|
|
@@ -43819,9 +43826,9 @@ export {
|
|
|
43819
43826
|
hv as syncInstantiate,
|
|
43820
43827
|
vL as textureToCanvas,
|
|
43821
43828
|
$C as tryCastBinary,
|
|
43822
|
-
yI as
|
|
43823
|
-
gI as
|
|
43824
|
-
|
|
43829
|
+
yI as tryDetermineMimetypeFromBinary,
|
|
43830
|
+
gI as tryDetermineMimetypeFromURL,
|
|
43831
|
+
jc as tryFindObject,
|
|
43825
43832
|
WC as tryGetGuid,
|
|
43826
43833
|
oM as unregisterHotReloadType,
|
|
43827
43834
|
v0 as unwatchWrite,
|