@needle-tools/engine 4.4.6-beta → 4.4.6-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{needle-engine.bundle-ad489836.light.js → needle-engine.bundle-17579ffe.light.js} +6 -6
- package/dist/{needle-engine.bundle-9def7e8b.light.min.js → needle-engine.bundle-313a5deb.light.min.js} +2 -2
- package/dist/{needle-engine.bundle-71861947.min.js → needle-engine.bundle-59089f07.min.js} +2 -2
- package/dist/{needle-engine.bundle-07e0eaf0.js → needle-engine.bundle-b4bc995a.js} +196 -196
- package/dist/{needle-engine.bundle-cb5d2462.light.umd.cjs → needle-engine.bundle-e63124e5.light.umd.cjs} +4 -4
- package/dist/{needle-engine.bundle-73459623.umd.cjs → needle-engine.bundle-eabe2b0e.umd.cjs} +4 -4
- package/dist/needle-engine.js +2 -2
- package/dist/needle-engine.light.js +2 -2
- 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/package.json +1 -1
|
@@ -1803,15 +1803,15 @@ function IC() {
|
|
|
1803
1803
|
return s || null;
|
|
1804
1804
|
}
|
|
1805
1805
|
const U0 = x("debugdefines");
|
|
1806
|
-
Mo('if(!globalThis[""4.4.6-beta""]) globalThis[""4.4.6-beta""] = "0.0.0";');
|
|
1806
|
+
Mo('if(!globalThis[""4.4.6-beta.2""]) globalThis[""4.4.6-beta.2""] = "0.0.0";');
|
|
1807
1807
|
Mo('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
1808
|
-
Mo('if(!globalThis[""Mon May 05 2025 18:
|
|
1808
|
+
Mo('if(!globalThis[""Mon May 05 2025 18:54:22 GMT+0700 (Indochina Time)""]) globalThis[""Mon May 05 2025 18:54:22 GMT+0700 (Indochina Time)""] = "unknown";');
|
|
1809
1809
|
Mo('if(!globalThis[""npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd""]) globalThis[""npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd""] = "unknown";');
|
|
1810
|
-
Mo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.6-beta";');
|
|
1810
|
+
Mo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.6-beta.2";');
|
|
1811
1811
|
Mo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1812
|
-
Mo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon May 05 2025 18:
|
|
1812
|
+
Mo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon May 05 2025 18:54:22 GMT+0700 (Indochina Time)";');
|
|
1813
1813
|
Mo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd";');
|
|
1814
|
-
const $n = "4.4.6-beta", vg = "undefined", N0 = "Mon May 05 2025 18:
|
|
1814
|
+
const $n = "4.4.6-beta.2", vg = "undefined", N0 = "Mon May 05 2025 18:54:22 GMT+0700 (Indochina Time)";
|
|
1815
1815
|
U0 && console.log(`Engine version: ${$n} (generator: ${vg})
|
|
1816
1816
|
Project built at ${N0}`);
|
|
1817
1817
|
const pd = "npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd", yo = "needle_isActiveInHierarchy", sa = "builtin_components", md = "needle_editor_guid";
|
|
@@ -20856,7 +20856,7 @@ function Im(s) {
|
|
|
20856
20856
|
return !(s.hideFlags & t);
|
|
20857
20857
|
}
|
|
20858
20858
|
const rp = x("debugexr");
|
|
20859
|
-
class
|
|
20859
|
+
class e2 {
|
|
20860
20860
|
constructor(t) {
|
|
20861
20861
|
r(this, "parser");
|
|
20862
20862
|
this.parser = t, rp && console.log(t);
|
|
@@ -20874,15 +20874,15 @@ class ek {
|
|
|
20874
20874
|
}
|
|
20875
20875
|
typeof window < "u" && window.addEventListener("unhandledrejection", (s) => {
|
|
20876
20876
|
});
|
|
20877
|
-
const ss = gt, Gh = "$___Export_Components",
|
|
20877
|
+
const ss = gt, Gh = "$___Export_Components", t2 = "NEEDLE_components";
|
|
20878
20878
|
var BI;
|
|
20879
|
-
class
|
|
20879
|
+
class i2 {
|
|
20880
20880
|
constructor() {
|
|
20881
20881
|
r(this, BI);
|
|
20882
20882
|
}
|
|
20883
20883
|
}
|
|
20884
20884
|
BI = sa;
|
|
20885
|
-
class
|
|
20885
|
+
class n2 {
|
|
20886
20886
|
constructor(t, e, i) {
|
|
20887
20887
|
r(this, "node");
|
|
20888
20888
|
r(this, "nodeIndex");
|
|
@@ -20904,7 +20904,7 @@ class Jv {
|
|
|
20904
20904
|
r(this, "writer");
|
|
20905
20905
|
}
|
|
20906
20906
|
get name() {
|
|
20907
|
-
return
|
|
20907
|
+
return t2;
|
|
20908
20908
|
}
|
|
20909
20909
|
registerExport(t) {
|
|
20910
20910
|
t.register((e) => {
|
|
@@ -20939,7 +20939,7 @@ class Jv {
|
|
|
20939
20939
|
writeNode(t, e) {
|
|
20940
20940
|
const i = this.writer.json.nodes.length;
|
|
20941
20941
|
ss && console.log(t.name, i, t.uuid);
|
|
20942
|
-
const n = new
|
|
20942
|
+
const n = new n2(t, i, e);
|
|
20943
20943
|
this.exportContext[i] = n, this.objectToNodeMap[t.uuid] = i;
|
|
20944
20944
|
}
|
|
20945
20945
|
afterParse(t) {
|
|
@@ -20949,7 +20949,7 @@ class Jv {
|
|
|
20949
20949
|
const n = this.exportContext[i], o = n.node, a = n.nodeDef, l = n.nodeIndex, c = (e = o.userData) == null ? void 0 : e.components;
|
|
20950
20950
|
if (!c || c.length <= 0)
|
|
20951
20951
|
continue;
|
|
20952
|
-
const h = new
|
|
20952
|
+
const h = new i2();
|
|
20953
20953
|
a.extensions = a.extensions || {}, a.extensions[this.name] = h, this.context.object = o, this.context.nodeId = l, this.context.objectToNode = this.objectToNodeMap;
|
|
20954
20954
|
const d = [];
|
|
20955
20955
|
for (const u of c) {
|
|
@@ -21044,7 +21044,7 @@ class Jv {
|
|
|
21044
21044
|
// }
|
|
21045
21045
|
}
|
|
21046
21046
|
const ub = "NEEDLE_gameobject_data";
|
|
21047
|
-
class
|
|
21047
|
+
class s2 {
|
|
21048
21048
|
constructor(t) {
|
|
21049
21049
|
r(this, "parser");
|
|
21050
21050
|
this.parser = t;
|
|
@@ -21089,7 +21089,7 @@ class sk {
|
|
|
21089
21089
|
}
|
|
21090
21090
|
}
|
|
21091
21091
|
const fb = "NEEDLE_lighting_settings", la = x("debugenvlight");
|
|
21092
|
-
class
|
|
21092
|
+
class o2 {
|
|
21093
21093
|
constructor(t, e, i) {
|
|
21094
21094
|
r(this, "parser");
|
|
21095
21095
|
r(this, "sourceId");
|
|
@@ -21183,10 +21183,10 @@ class Lm extends I {
|
|
|
21183
21183
|
}
|
|
21184
21184
|
}
|
|
21185
21185
|
const ap = x("debugstencil");
|
|
21186
|
-
function
|
|
21186
|
+
function r2(s, t) {
|
|
21187
21187
|
return (s & 1 << t.layer) != 0;
|
|
21188
21188
|
}
|
|
21189
|
-
const
|
|
21189
|
+
const a2 = Symbol("stencils"), nr = class {
|
|
21190
21190
|
constructor(t, e) {
|
|
21191
21191
|
r(this, "parser");
|
|
21192
21192
|
r(this, "source");
|
|
@@ -21205,13 +21205,13 @@ const ak = Symbol("stencils"), nr = class {
|
|
|
21205
21205
|
if (i)
|
|
21206
21206
|
for (let n = i.length - 1; n >= 0; n--) {
|
|
21207
21207
|
const o = i[n];
|
|
21208
|
-
if (
|
|
21208
|
+
if (r2(o.layer, t)) {
|
|
21209
21209
|
ap && console.log(o), setTimeout(() => {
|
|
21210
21210
|
ui() && Ig(t.gameObject) && (ve("Stencil not supported on instanced objects"), console.warn("Stencil not supported on instanced objects", t));
|
|
21211
21211
|
}, 500);
|
|
21212
21212
|
for (let a = 0; a < t.sharedMaterials.length; a++) {
|
|
21213
21213
|
let l = t.sharedMaterials[a];
|
|
21214
|
-
l && (l = l.clone(), l[
|
|
21214
|
+
l && (l = l.clone(), l[a2] = !0, l.stencilWrite = !0, l.stencilWriteMask = 255, l.stencilFuncMask = 255, l.stencilRef = o.value, l.stencilFunc = o.compareFunc, l.stencilZPass = o.passOp, l.stencilFail = o.failOp, l.stencilZFail = o.zFailOp, t.sharedMaterials[a] = l);
|
|
21215
21215
|
}
|
|
21216
21216
|
t.gameObject.renderOrder = o.event * 1e3 + o.index * 50;
|
|
21217
21217
|
break;
|
|
@@ -21221,14 +21221,14 @@ const ak = Symbol("stencils"), nr = class {
|
|
|
21221
21221
|
afterRoot(t) {
|
|
21222
21222
|
const e = this.parser.json.extensions;
|
|
21223
21223
|
if (e) {
|
|
21224
|
-
const i = e[
|
|
21224
|
+
const i = e[c2];
|
|
21225
21225
|
if (i) {
|
|
21226
21226
|
ap && console.log(i);
|
|
21227
21227
|
const n = i.stencil;
|
|
21228
21228
|
if (n && Array.isArray(n))
|
|
21229
21229
|
for (const o of n) {
|
|
21230
21230
|
const a = { ...o };
|
|
21231
|
-
a.compareFunc =
|
|
21231
|
+
a.compareFunc = l2(a.compareFunc), a.passOp = lp(a.passOp), a.failOp = lp(a.failOp), a.zFailOp = lp(a.zFailOp), nr.stencils[this.source] || (nr.stencils[this.source] = []), nr.stencils[this.source].push(a);
|
|
21232
21232
|
}
|
|
21233
21233
|
}
|
|
21234
21234
|
}
|
|
@@ -21258,7 +21258,7 @@ function lp(s) {
|
|
|
21258
21258
|
}
|
|
21259
21259
|
return 0;
|
|
21260
21260
|
}
|
|
21261
|
-
function
|
|
21261
|
+
function l2(s) {
|
|
21262
21262
|
switch (s) {
|
|
21263
21263
|
case 1:
|
|
21264
21264
|
return Uy;
|
|
@@ -21279,10 +21279,10 @@ function lk(s) {
|
|
|
21279
21279
|
}
|
|
21280
21280
|
return Uy;
|
|
21281
21281
|
}
|
|
21282
|
-
const
|
|
21282
|
+
const c2 = "NEEDLE_render_objects";
|
|
21283
21283
|
var ew = /* @__PURE__ */ ((s) => (s[s.INT = 5124] = "INT", s[s.FLOAT = 5126] = "FLOAT", s[s.FLOAT_VEC2 = 35664] = "FLOAT_VEC2", s[s.FLOAT_VEC3 = 35665] = "FLOAT_VEC3", s[s.FLOAT_VEC4 = 35666] = "FLOAT_VEC4", s[s.INT_VEC2 = 35667] = "INT_VEC2", s[s.INT_VEC3 = 35668] = "INT_VEC3", s[s.INT_VEC4 = 35669] = "INT_VEC4", s[s.BOOL = 35670] = "BOOL", s[s.BOOL_VEC2 = 35671] = "BOOL_VEC2", s[s.BOOL_VEC3 = 35672] = "BOOL_VEC3", s[s.BOOL_VEC4 = 35673] = "BOOL_VEC4", s[s.FLOAT_MAT2 = 35674] = "FLOAT_MAT2", s[s.FLOAT_MAT3 = 35675] = "FLOAT_MAT3", s[s.FLOAT_MAT4 = 35676] = "FLOAT_MAT4", s[s.SAMPLER_2D = 35678] = "SAMPLER_2D", s[s.SAMPLER_3D = 35680] = "SAMPLER_3D", s[s.SAMPLER_CUBE = 35681] = "SAMPLER_CUBE", s[s.UNKNOWN = 0] = "UNKNOWN", s))(ew || {});
|
|
21284
21284
|
const An = x("debugcustomshader"), qr = "NEEDLE_techniques_webgl";
|
|
21285
|
-
class
|
|
21285
|
+
class h2 {
|
|
21286
21286
|
constructor() {
|
|
21287
21287
|
r(this, "objectToWorldMatrix", new se());
|
|
21288
21288
|
r(this, "worldToObjectMatrix", new se());
|
|
@@ -21329,7 +21329,7 @@ const Be = class extends r0 {
|
|
|
21329
21329
|
r(this, "_worldToObjectName", "hlslcc_mtx4x4unity_WorldToObject");
|
|
21330
21330
|
r(this, "_viewProjectionName", "hlslcc_mtx4x4unity_MatrixVP");
|
|
21331
21331
|
r(this, "_viewMatrixName", "hlslcc_mtx4x4unity_MatrixV");
|
|
21332
|
-
r(this, "_rendererData", new
|
|
21332
|
+
r(this, "_rendererData", new h2());
|
|
21333
21333
|
this.identifier = e, An && console.log(this), this.type = "NEEDLE_CUSTOM_SHADER", this.uniforms[this._objToWorldName] || (this.uniforms[this._objToWorldName] = { value: [] }), this.uniforms[this._worldToObjectName] || (this.uniforms[this._worldToObjectName] = { value: [] }), this.uniforms[this._viewProjectionName] || (this.uniforms[this._viewProjectionName] = { value: [] }), this.uniforms[this._sphericalHarmonicsName], (this.depthTextureUniform || this.opaqueTextureUniform) && ee.Current.pre_render_callbacks.push(this.onBeforeRenderSceneCallback);
|
|
21334
21334
|
}
|
|
21335
21335
|
clone() {
|
|
@@ -21410,7 +21410,7 @@ const Be = class extends r0 {
|
|
|
21410
21410
|
};
|
|
21411
21411
|
let Hi = Be;
|
|
21412
21412
|
r(Hi, "viewProjection", new se()), r(Hi, "_viewProjectionValues", []), r(Hi, "viewMatrix", new se()), r(Hi, "_viewMatrixValues", []), r(Hi, "_worldSpaceCameraPosName", "_WorldSpaceCameraPos"), r(Hi, "_worldSpaceCameraPos", new v()), r(Hi, "_mainLightColor", new ge()), r(Hi, "_mainLightPosition", new v()), r(Hi, "_lightData", new ge());
|
|
21413
|
-
class
|
|
21413
|
+
class d2 {
|
|
21414
21414
|
constructor(t, e) {
|
|
21415
21415
|
r(this, "parser");
|
|
21416
21416
|
r(this, "identifier");
|
|
@@ -21591,9 +21591,9 @@ function tw(s) {
|
|
|
21591
21591
|
});
|
|
21592
21592
|
}
|
|
21593
21593
|
}
|
|
21594
|
-
const
|
|
21594
|
+
const u2 = x("debugextensions");
|
|
21595
21595
|
let nu;
|
|
21596
|
-
const
|
|
21596
|
+
const f2 = import("./three-examples-9070776e.js").then((s) => s.GLTFLoaderAnimationPointer).then(async (s) => (nu = s.GLTFAnimationPointerExtension, nu)).catch((s) => {
|
|
21597
21597
|
console.warn("Failed to import GLTFLoaderAnimationPointer. Please use @needle-tools/three for full KHR_animation support", s);
|
|
21598
21598
|
}), Sr = new Array();
|
|
21599
21599
|
function ZL(s) {
|
|
@@ -21607,20 +21607,20 @@ function Zg(s) {
|
|
|
21607
21607
|
const t = new Jv();
|
|
21608
21608
|
return s.register((e) => (t.parser = e, t)), t;
|
|
21609
21609
|
}
|
|
21610
|
-
class
|
|
21610
|
+
class p2 {
|
|
21611
21611
|
resolvePath(t) {
|
|
21612
21612
|
return t.includes("/extensions/builtin_components/") ? t.replace("/extensions/builtin_components/", "/userData/components/") : t.includes("extensions/builtin_components/") ? t.replace("extensions/builtin_components/", "/userData/components/") : t;
|
|
21613
21613
|
}
|
|
21614
21614
|
}
|
|
21615
21615
|
async function Dm(s, t, e) {
|
|
21616
21616
|
const i = e.indexOf("?");
|
|
21617
|
-
i >= 0 && (e = e.substring(0, i)), s.register((n) => new
|
|
21617
|
+
i >= 0 && (e = e.substring(0, i)), s.register((n) => new s2(n)), s.register((n) => new KP(n)), s.register((n) => new RO(n, t.lightmaps, e)), s.register((n) => new o2(n, e, t)), s.register((n) => new d2(n, e)), s.register((n) => new bc(n, e)), s.register((n) => new Ze(n, e)), s.register((n) => new e2(n)), PP() && s.register((n) => new uc(n)), await f2.catch((n) => {
|
|
21618
21618
|
}), s.register((n) => {
|
|
21619
21619
|
if (nu) {
|
|
21620
21620
|
const o = new nu(n);
|
|
21621
|
-
return o.setAnimationPointerResolver.bind(o)(new
|
|
21621
|
+
return o.setAnimationPointerResolver.bind(o)(new p2()), o;
|
|
21622
21622
|
} else
|
|
21623
|
-
return (
|
|
21623
|
+
return (u2 || z()) && console.error("Missing KHR_animation_pointer extension..."), {
|
|
21624
21624
|
name: "KHR_animation_pointer_NOT_AVAILABLE"
|
|
21625
21625
|
};
|
|
21626
21626
|
});
|
|
@@ -21659,12 +21659,12 @@ class sw {
|
|
|
21659
21659
|
}, n[this.name] = !0;
|
|
21660
21660
|
}
|
|
21661
21661
|
}
|
|
21662
|
-
var
|
|
21663
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
21662
|
+
var m2 = Object.defineProperty, g2 = Object.getOwnPropertyDescriptor, ow = (s, t, e, i) => {
|
|
21663
|
+
for (var n = i > 1 ? void 0 : i ? g2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
21664
21664
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
21665
|
-
return i && n &&
|
|
21665
|
+
return i && n && m2(t, e, n), n;
|
|
21666
21666
|
};
|
|
21667
|
-
const Dl = x("debugreflectionprobe"), pb = x("noreflectionprobe"),
|
|
21667
|
+
const Dl = x("debugreflectionprobe"), pb = x("noreflectionprobe"), y2 = Symbol("reflectionProbeKey"), _2 = Symbol("original material");
|
|
21668
21668
|
var ld;
|
|
21669
21669
|
const cs = (ld = class extends I {
|
|
21670
21670
|
constructor() {
|
|
@@ -21744,7 +21744,7 @@ const cs = (ld = class extends I {
|
|
|
21744
21744
|
d.version = o.version, a ? (a.copy = d, a.material = o) : (a = {
|
|
21745
21745
|
material: o,
|
|
21746
21746
|
copy: d
|
|
21747
|
-
}, e.push(a)), d[
|
|
21747
|
+
}, e.push(a)), d[y2] = this, d[_2] = o, Dl && console.log("Set reflection", t.name, t.guid);
|
|
21748
21748
|
}
|
|
21749
21749
|
a && a.copy && (a.copy.onBeforeCompile = o.onBeforeCompile);
|
|
21750
21750
|
const h = a == null ? void 0 : a.copy;
|
|
@@ -22253,20 +22253,20 @@ Texture:`, i), this.setLightmapDebugMaterial()) : Xr && console.log("Use debugli
|
|
|
22253
22253
|
});
|
|
22254
22254
|
}
|
|
22255
22255
|
}
|
|
22256
|
-
var
|
|
22257
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
22256
|
+
var b2 = Object.defineProperty, v2 = Object.getOwnPropertyDescriptor, Ns = (s, t, e, i) => {
|
|
22257
|
+
for (var n = i > 1 ? void 0 : i ? v2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
22258
22258
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
22259
|
-
return i && n &&
|
|
22259
|
+
return i && n && b2(t, e, n), n;
|
|
22260
22260
|
};
|
|
22261
|
-
const ec = x("debugrenderer"), gb = x("debugskinnedmesh"), yb = x("noinstancing"),
|
|
22262
|
-
class
|
|
22261
|
+
const ec = x("debugrenderer"), gb = x("debugskinnedmesh"), yb = x("noinstancing"), w2 = x("wireframe");
|
|
22262
|
+
class x2 {
|
|
22263
22263
|
constructor() {
|
|
22264
22264
|
r(this, "path", null);
|
|
22265
22265
|
r(this, "asset", null);
|
|
22266
22266
|
r(this, "default");
|
|
22267
22267
|
}
|
|
22268
22268
|
}
|
|
22269
|
-
class
|
|
22269
|
+
class S2 {
|
|
22270
22270
|
constructor(t, e) {
|
|
22271
22271
|
r(this, "_renderer");
|
|
22272
22272
|
r(this, "_targets", []);
|
|
@@ -22479,7 +22479,7 @@ const Md = class extends I {
|
|
|
22479
22479
|
}
|
|
22480
22480
|
//@ts-ignore
|
|
22481
22481
|
get sharedMaterials() {
|
|
22482
|
-
return (!this._sharedMaterials || !this._sharedMaterials.is(this)) && (this._originalMaterials || (this._originalMaterials = []), this._sharedMaterials = new
|
|
22482
|
+
return (!this._sharedMaterials || !this._sharedMaterials.is(this)) && (this._originalMaterials || (this._originalMaterials = []), this._sharedMaterials = new S2(this, this._originalMaterials)), this._sharedMaterials;
|
|
22483
22483
|
}
|
|
22484
22484
|
static get shouldSuppressInstancing() {
|
|
22485
22485
|
return yb;
|
|
@@ -22521,7 +22521,7 @@ const Md = class extends I {
|
|
|
22521
22521
|
}
|
|
22522
22522
|
} else
|
|
22523
22523
|
this.isMeshOrSkinnedMesh(this.gameObject) ? (this.context.addBeforeRenderListener(this.gameObject, this.onBeforeRenderThree), this.renderOrder !== void 0 && this.renderOrder.length > 0 && (this.gameObject.renderOrder = this.renderOrder[0])) : this.context.addBeforeRenderListener(this.gameObject, this.onBeforeRenderThree);
|
|
22524
|
-
if (this.applyLightmapping(),
|
|
22524
|
+
if (this.applyLightmapping(), w2)
|
|
22525
22525
|
for (let t = 0; t < this.sharedMaterials.length; t++) {
|
|
22526
22526
|
const e = this.sharedMaterials[t];
|
|
22527
22527
|
e && (e.wireframe = !0);
|
|
@@ -22755,10 +22755,10 @@ class aw extends Ku {
|
|
|
22755
22755
|
this._needUpdateBoundingSphere = !0;
|
|
22756
22756
|
}
|
|
22757
22757
|
}
|
|
22758
|
-
var
|
|
22759
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
22758
|
+
var C2 = Object.defineProperty, P2 = Object.getOwnPropertyDescriptor, lw = (s, t, e, i) => {
|
|
22759
|
+
for (var n = i > 1 ? void 0 : i ? P2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
22760
22760
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
22761
|
-
return i && n &&
|
|
22761
|
+
return i && n && C2(t, e, n), n;
|
|
22762
22762
|
};
|
|
22763
22763
|
const qh = x("debuggltfexport");
|
|
22764
22764
|
class cw extends wi {
|
|
@@ -22901,8 +22901,8 @@ typeof globalThis !== void 0 && !("OffscreenCanvas" in globalThis) && (globalThi
|
|
|
22901
22901
|
}), this.canvas;
|
|
22902
22902
|
}
|
|
22903
22903
|
});
|
|
22904
|
-
const
|
|
22905
|
-
function
|
|
22904
|
+
const O2 = x("debugprogress");
|
|
22905
|
+
function M2(s) {
|
|
22906
22906
|
s = s || /* @__PURE__ */ new Date();
|
|
22907
22907
|
const t = s.getMonth() + 1, e = s.getDate(), i = s.getHours(), n = s.getMinutes(), o = s.getSeconds(), a = (t < 10 ? "0" : "") + t, l = (e < 10 ? "0" : "") + e, c = (i < 10 ? "0" : "") + i, h = (n < 10 ? "0" : "") + n, d = (o < 10 ? "0" : "") + o;
|
|
22908
22908
|
return s.getFullYear() + a + l + "-" + c + h + d;
|
|
@@ -22950,7 +22950,7 @@ class de {
|
|
|
22950
22950
|
*/
|
|
22951
22951
|
static start(t, e) {
|
|
22952
22952
|
typeof e == "string" && (e = { parentScope: e });
|
|
22953
|
-
const i = new
|
|
22953
|
+
const i = new R2(t, e);
|
|
22954
22954
|
tc.set(t, i);
|
|
22955
22955
|
}
|
|
22956
22956
|
/** Report progress for a formerly started scope.
|
|
@@ -22989,7 +22989,7 @@ class de {
|
|
|
22989
22989
|
}
|
|
22990
22990
|
}
|
|
22991
22991
|
const tc = /* @__PURE__ */ new Map();
|
|
22992
|
-
class
|
|
22992
|
+
class R2 {
|
|
22993
22993
|
constructor(t, e) {
|
|
22994
22994
|
r(this, "scopeLabel");
|
|
22995
22995
|
r(this, "parentScope");
|
|
@@ -23004,7 +23004,7 @@ class Rk {
|
|
|
23004
23004
|
r(this, "totalProgress", 0);
|
|
23005
23005
|
r(this, "selfReports", 0);
|
|
23006
23006
|
r(this, "totalReports", 0);
|
|
23007
|
-
this.parentScope = e != null && e.parentScope ? tc.get(e.parentScope) : void 0, this.parentScope && (this.parentScope.childScopes.push(this), this.parentDepth = this.parentScope.parentDepth + 1), this.scopeLabel = " ".repeat(this.parentDepth * 2) + t, this.showLogs = (e == null ? void 0 : e.logTimings) ?? !!
|
|
23007
|
+
this.parentScope = e != null && e.parentScope ? tc.get(e.parentScope) : void 0, this.parentScope && (this.parentScope.childScopes.push(this), this.parentDepth = this.parentScope.parentDepth + 1), this.scopeLabel = " ".repeat(this.parentDepth * 2) + t, this.showLogs = (e == null ? void 0 : e.logTimings) ?? !!O2, this.showLogs && console.time(this.scopeLabel), this.onProgress = e == null ? void 0 : e.onProgress;
|
|
23008
23008
|
}
|
|
23009
23009
|
report(t, e = !1) {
|
|
23010
23010
|
if (t) {
|
|
@@ -23068,7 +23068,7 @@ function uw(s) {
|
|
|
23068
23068
|
}
|
|
23069
23069
|
return e;
|
|
23070
23070
|
}
|
|
23071
|
-
const
|
|
23071
|
+
const k2 = new v(), T2 = new W(), A2 = new v(1, 1, 1), sr = class {
|
|
23072
23072
|
constructor(t, e, i = null, n = null, o = null, a = null, l = null, c = null) {
|
|
23073
23073
|
r(this, "uuid");
|
|
23074
23074
|
r(this, "name");
|
|
@@ -23104,7 +23104,7 @@ const kk = new v(), Tk = new W(), Ak = new v(1, 1, 1), sr = class {
|
|
|
23104
23104
|
if (!this.transform)
|
|
23105
23105
|
return new se();
|
|
23106
23106
|
const { position: t, quaternion: e, scale: i } = this.transform, n = new se();
|
|
23107
|
-
return n.compose(t ||
|
|
23107
|
+
return n.compose(t || k2, e || T2, i || A2), n;
|
|
23108
23108
|
}
|
|
23109
23109
|
setMatrix(t) {
|
|
23110
23110
|
if (!t || !(t instanceof se)) {
|
|
@@ -23259,7 +23259,7 @@ ${d}
|
|
|
23259
23259
|
}
|
|
23260
23260
|
const Qr = `
|
|
23261
23261
|
`, Ht = "</StageRoot/Materials";
|
|
23262
|
-
class
|
|
23262
|
+
class E2 {
|
|
23263
23263
|
constructor() {
|
|
23264
23264
|
r(this, "str");
|
|
23265
23265
|
r(this, "indent");
|
|
@@ -23293,7 +23293,7 @@ class Ek {
|
|
|
23293
23293
|
return e + t;
|
|
23294
23294
|
}
|
|
23295
23295
|
}
|
|
23296
|
-
class
|
|
23296
|
+
class I2 {
|
|
23297
23297
|
constructor(t, e, i) {
|
|
23298
23298
|
r(this, "root");
|
|
23299
23299
|
r(this, "exporter");
|
|
@@ -23321,7 +23321,7 @@ class cp {
|
|
|
23321
23321
|
r(this, "exportInvisible", !1);
|
|
23322
23322
|
}
|
|
23323
23323
|
}
|
|
23324
|
-
let
|
|
23324
|
+
let L2 = class {
|
|
23325
23325
|
constructor() {
|
|
23326
23326
|
r(this, "debug");
|
|
23327
23327
|
r(this, "pruneUnusedNodes");
|
|
@@ -23334,7 +23334,7 @@ let Lk = class {
|
|
|
23334
23334
|
async parse(t, e = new cp()) {
|
|
23335
23335
|
var w, P;
|
|
23336
23336
|
e = Object.assign(new cp(), e), this.sceneAnchoringOptions = e;
|
|
23337
|
-
const i = new
|
|
23337
|
+
const i = new I2(t, this, e);
|
|
23338
23338
|
this.extensions = i.extensions;
|
|
23339
23339
|
const n = i.files, o = "model.usda";
|
|
23340
23340
|
n[o] = null;
|
|
@@ -23366,7 +23366,7 @@ let Lk = class {
|
|
|
23366
23366
|
this.debug && _b(i.document, "Hierarchy BEFORE pruning", k), mw(i.document, k), this.debug && _b(i.document, "Hierarchy AFTER pruning");
|
|
23367
23367
|
} else
|
|
23368
23368
|
this.debug && console.log("Pruning of empty nodes is disabled. This may result in a larger USDZ file.");
|
|
23369
|
-
de.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await
|
|
23369
|
+
de.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await D2(i, () => (de.report("export-usdz", "Building materials"), H2(a, l, e.quickLookCompatible))), de.report("export-usdz", "Invoking onAfterSerialize"), await Rd(i, "onAfterSerialize");
|
|
23370
23370
|
for (const k of c) {
|
|
23371
23371
|
const { object: O, originalParent: R, newParent: E } = k;
|
|
23372
23372
|
R && R.add(O);
|
|
@@ -23389,8 +23389,8 @@ let Lk = class {
|
|
|
23389
23389
|
};
|
|
23390
23390
|
de.report("export-usdz-textures", { message: "read back texture", autoStep: !0 });
|
|
23391
23391
|
const A = O.scale !== void 0 && O.scale.x !== 1 && O.scale.y !== 1 && O.scale.z !== 1 && O.scale.w !== 1;
|
|
23392
|
-
(R.isCompressedTexture || R.isRenderTargetTexture || A) && (B = await
|
|
23393
|
-
const F = await
|
|
23392
|
+
(R.isCompressedTexture || R.isRenderTargetTexture || A) && (B = await j2(R, e.maxTextureSize, g, O.scale)), de.report("export-usdz-textures", { message: "convert texture to canvas", autoStep: !0 });
|
|
23393
|
+
const F = await F2(B.imageBitmap || B.imageData, e.maxTextureSize).catch((U) => {
|
|
23394
23394
|
console.error("Error converting texture to canvas", R, U);
|
|
23395
23395
|
});
|
|
23396
23396
|
if (F) {
|
|
@@ -23491,7 +23491,7 @@ function mw(s, t) {
|
|
|
23491
23491
|
keptChilds: n
|
|
23492
23492
|
}), c;
|
|
23493
23493
|
}
|
|
23494
|
-
async function
|
|
23494
|
+
async function D2(s, t) {
|
|
23495
23495
|
de.start("export-usdz-resources", "export-usdz");
|
|
23496
23496
|
const e = [];
|
|
23497
23497
|
for (const c of s.document.children)
|
|
@@ -23502,7 +23502,7 @@ async function Dk(s, t) {
|
|
|
23502
23502
|
e[c](), h();
|
|
23503
23503
|
});
|
|
23504
23504
|
de.end("export-usdz-resources");
|
|
23505
|
-
const n = new
|
|
23505
|
+
const n = new E2(), o = s.exporter.sceneAnchoringOptions.ar;
|
|
23506
23506
|
n.beginBlock(`def Xform "${s.document.name}"`), n.beginBlock(`def Scope "Scenes" (
|
|
23507
23507
|
kind = "sceneLibrary"
|
|
23508
23508
|
)`), n.beginBlock('def Xform "Scene"', "(", !1), n.appendLine('apiSchemas = ["Preliminary_AnchoringAPI"]'), n.appendLine("customData = {"), n.appendLine(" bool preliminary_collidesWithEnvironment = 0"), n.appendLine(' string sceneName = "Scene"'), n.appendLine("}"), n.appendLine('sceneName = "Scene"'), n.closeBlock(")"), n.beginBlock(), n.appendLine(`token preliminary:anchoring:type = "${o.anchoring.type}"`), o.anchoring.type === "plane" && n.appendLine(`token preliminary:planeAnchoring:alignment = "${o.planeAnchoring.alignment}"`), o.anchoring.type === "image" && n.appendLine(`rel preliminary:imageAnchoring:referenceImage = </${s.document.name}/Scenes/Scene/AnchoringReferenceImage>`), n.appendLine();
|
|
@@ -23529,8 +23529,8 @@ function gw(s, t, e) {
|
|
|
23529
23529
|
if (!(o in t.files)) {
|
|
23530
23530
|
const a = () => {
|
|
23531
23531
|
var c, h;
|
|
23532
|
-
const l = $
|
|
23533
|
-
t.files[o] =
|
|
23532
|
+
const l = $2(i, (h = (c = s.skinnedMesh) == null ? void 0 : c.skeleton) == null ? void 0 : h.bones, t.quickLookCompatible);
|
|
23533
|
+
t.files[o] = N2(l);
|
|
23534
23534
|
};
|
|
23535
23535
|
e.push(a);
|
|
23536
23536
|
}
|
|
@@ -23550,7 +23550,7 @@ async function Rd(s, t, e = null) {
|
|
|
23550
23550
|
}
|
|
23551
23551
|
}
|
|
23552
23552
|
let Xh = null, Gt = null, hp, Yr, Qh;
|
|
23553
|
-
async function
|
|
23553
|
+
async function j2(s, t = 1 / 0, e = null, i = void 0) {
|
|
23554
23554
|
hp || (hp = new qn(2, 2, 1, 1)), Yr || (Yr = new vn({
|
|
23555
23555
|
uniforms: {
|
|
23556
23556
|
blitTexture: new fo(s),
|
|
@@ -23597,17 +23597,17 @@ async function jk(s, t = 1 / 0, e = null, i = void 0) {
|
|
|
23597
23597
|
imageBitmap: u
|
|
23598
23598
|
};
|
|
23599
23599
|
}
|
|
23600
|
-
function
|
|
23600
|
+
function B2(s) {
|
|
23601
23601
|
return typeof HTMLImageElement < "u" && s instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && s instanceof HTMLCanvasElement || typeof OffscreenCanvas < "u" && s instanceof OffscreenCanvas || typeof ImageBitmap < "u" && s instanceof ImageBitmap;
|
|
23602
23602
|
}
|
|
23603
|
-
async function
|
|
23603
|
+
async function F2(s, t = 4096) {
|
|
23604
23604
|
const e = t / Math.max(s.width, s.height), i = s.width * Math.min(1, e), n = s.height * Math.min(1, e), o = new OffscreenCanvas(i, n), a = { premultiplyAlpha: "none" };
|
|
23605
23605
|
s.width !== i && (a.resizeWidth = i), s.height !== n && (a.resizeHeight = n);
|
|
23606
23606
|
const l = await createImageBitmap(s, a), c = o.getContext("bitmaprenderer");
|
|
23607
23607
|
return c && c.transferFromImageBitmap(l), o;
|
|
23608
23608
|
}
|
|
23609
|
-
async function
|
|
23610
|
-
if (
|
|
23609
|
+
async function z2(s, t = void 0, e = !1, i = 4096) {
|
|
23610
|
+
if (B2(s)) {
|
|
23611
23611
|
const n = i / Math.max(s.width, s.height), o = new OffscreenCanvas(s.width * Math.min(1, n), s.height * Math.min(1, n)), a = o.getContext("2d", { alpha: !0, premultipliedAlpha: !1 });
|
|
23612
23612
|
if (!a)
|
|
23613
23613
|
throw new Error("Could not get canvas 2D context");
|
|
@@ -23622,7 +23622,7 @@ async function zk(s, t = void 0, e = !1, i = 4096) {
|
|
|
23622
23622
|
throw new Error("NeedleUSDZExporter: No valid image data found. Unable to process texture.");
|
|
23623
23623
|
}
|
|
23624
23624
|
const Le = 7;
|
|
23625
|
-
function
|
|
23625
|
+
function U2() {
|
|
23626
23626
|
return `#usda 1.0
|
|
23627
23627
|
(
|
|
23628
23628
|
customLayerData = {
|
|
@@ -23633,8 +23633,8 @@ function Uk() {
|
|
|
23633
23633
|
)
|
|
23634
23634
|
`;
|
|
23635
23635
|
}
|
|
23636
|
-
function
|
|
23637
|
-
let e =
|
|
23636
|
+
function N2(s, t) {
|
|
23637
|
+
let e = U2();
|
|
23638
23638
|
return e += s, f0(e);
|
|
23639
23639
|
}
|
|
23640
23640
|
function Yh(s) {
|
|
@@ -23694,13 +23694,13 @@ function vb(s) {
|
|
|
23694
23694
|
function Kh(s, t) {
|
|
23695
23695
|
return `(${he(s[t + 0])}, ${he(s[t + 1])}, ${he(s[t + 2])}, ${he(s[t + 3])})`;
|
|
23696
23696
|
}
|
|
23697
|
-
function $
|
|
23697
|
+
function $2(s, t = [], e = !0) {
|
|
23698
23698
|
return `
|
|
23699
23699
|
def "Geometry"
|
|
23700
|
-
${
|
|
23700
|
+
${W2(s, t, e)}
|
|
23701
23701
|
`;
|
|
23702
23702
|
}
|
|
23703
|
-
function
|
|
23703
|
+
function W2(s, t = [], e = !0) {
|
|
23704
23704
|
const i = "Geometry", n = s.attributes, o = n.position.count, a = t && t.length > 0, l = [], c = [];
|
|
23705
23705
|
let h = new Array(), d = n.skinIndex;
|
|
23706
23706
|
if (a) {
|
|
@@ -23817,7 +23817,7 @@ function fp(s, t) {
|
|
|
23817
23817
|
interpolation = "vertex"
|
|
23818
23818
|
)`;
|
|
23819
23819
|
case 4:
|
|
23820
|
-
return `double4[] primvars:${s} = [${
|
|
23820
|
+
return `double4[] primvars:${s} = [${V2(t, e)}] (
|
|
23821
23821
|
interpolation = "vertex"
|
|
23822
23822
|
)`;
|
|
23823
23823
|
default:
|
|
@@ -23834,7 +23834,7 @@ function kd(s, t) {
|
|
|
23834
23834
|
}
|
|
23835
23835
|
return e.join(", ");
|
|
23836
23836
|
}
|
|
23837
|
-
function
|
|
23837
|
+
function V2(s, t) {
|
|
23838
23838
|
if (s === void 0)
|
|
23839
23839
|
return console.warn("USDZExporter: Attribute is missing. Results may be undefined."), Array(t).fill("(0, 0, 0, 0)").join(", ");
|
|
23840
23840
|
const e = [];
|
|
@@ -23863,11 +23863,11 @@ function _w(s, t, e = !1) {
|
|
|
23863
23863
|
}
|
|
23864
23864
|
return i.join(", ");
|
|
23865
23865
|
}
|
|
23866
|
-
function
|
|
23866
|
+
function H2(s, t, e = !1) {
|
|
23867
23867
|
const i = [];
|
|
23868
23868
|
for (const n in s) {
|
|
23869
23869
|
const o = s[n];
|
|
23870
|
-
i.push(
|
|
23870
|
+
i.push(G2(o, t, e));
|
|
23871
23871
|
}
|
|
23872
23872
|
return `
|
|
23873
23873
|
def "Materials"
|
|
@@ -23875,7 +23875,7 @@ function Hk(s, t, e = !1) {
|
|
|
23875
23875
|
${i.join("")}
|
|
23876
23876
|
}`;
|
|
23877
23877
|
}
|
|
23878
|
-
function
|
|
23878
|
+
function G2(s, t, e = !1) {
|
|
23879
23879
|
var g, y, _;
|
|
23880
23880
|
const i = Jg(s);
|
|
23881
23881
|
if (s.colorWrite === !1 || ((g = s.userData) == null ? void 0 : g.isShadowCatcherMaterial) || ((y = s.userData) == null ? void 0 : y.isLightBlendMaterial)) {
|
|
@@ -24347,7 +24347,7 @@ class ye {
|
|
|
24347
24347
|
}
|
|
24348
24348
|
*/
|
|
24349
24349
|
}
|
|
24350
|
-
class
|
|
24350
|
+
class q2 {
|
|
24351
24351
|
constructor(t) {
|
|
24352
24352
|
r(this, "object");
|
|
24353
24353
|
r(this, "model");
|
|
@@ -24364,7 +24364,7 @@ class qk {
|
|
|
24364
24364
|
this.onApply(t);
|
|
24365
24365
|
}
|
|
24366
24366
|
}
|
|
24367
|
-
class vw extends
|
|
24367
|
+
class vw extends q2 {
|
|
24368
24368
|
constructor(e, i, n, o) {
|
|
24369
24369
|
super(e);
|
|
24370
24370
|
r(this, "matrix");
|
|
@@ -24390,7 +24390,7 @@ class vw extends qk {
|
|
|
24390
24390
|
return this._disableAction ? this._disableAction : (this._disableAction = ye.fadeAction(this.object, 0, !1), this._disableAction);
|
|
24391
24391
|
}
|
|
24392
24392
|
}
|
|
24393
|
-
class
|
|
24393
|
+
class X2 {
|
|
24394
24394
|
constructor(t) {
|
|
24395
24395
|
r(this, "actions");
|
|
24396
24396
|
r(this, "sortedActions");
|
|
@@ -24771,11 +24771,11 @@ class ey {
|
|
|
24771
24771
|
const a = o;
|
|
24772
24772
|
typeof a.createAnimation == "function" && a.createAnimation(this, e, i);
|
|
24773
24773
|
}, !1);
|
|
24774
|
-
const n = new
|
|
24774
|
+
const n = new Q2(t, this);
|
|
24775
24775
|
this.serializers.push(n), n.registerCallback(e);
|
|
24776
24776
|
}
|
|
24777
24777
|
}
|
|
24778
|
-
class
|
|
24778
|
+
class Q2 {
|
|
24779
24779
|
constructor(t, e) {
|
|
24780
24780
|
r(this, "model");
|
|
24781
24781
|
r(this, "object");
|
|
@@ -25027,7 +25027,7 @@ class Qk {
|
|
|
25027
25027
|
h(l, "position"), h(l, "rotation"), h(l, "scale");
|
|
25028
25028
|
}
|
|
25029
25029
|
}
|
|
25030
|
-
const
|
|
25030
|
+
const Y2 = x("debugusdz");
|
|
25031
25031
|
class nl {
|
|
25032
25032
|
constructor() {
|
|
25033
25033
|
r(this, "files", new Array());
|
|
@@ -25062,7 +25062,7 @@ class nl {
|
|
|
25062
25062
|
for (const e of this.files) {
|
|
25063
25063
|
const i = "audio/" + e.name;
|
|
25064
25064
|
if (t.files[i]) {
|
|
25065
|
-
|
|
25065
|
+
Y2 && console.warn("Audio file with name " + i + " already exists in the context. Skipping.");
|
|
25066
25066
|
continue;
|
|
25067
25067
|
}
|
|
25068
25068
|
const a = await (await (await fetch(e.path)).blob()).arrayBuffer(), l = new Uint8Array(a);
|
|
@@ -25070,10 +25070,10 @@ class nl {
|
|
|
25070
25070
|
}
|
|
25071
25071
|
}
|
|
25072
25072
|
}
|
|
25073
|
-
var
|
|
25074
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
25073
|
+
var K2 = Object.defineProperty, Z2 = Object.getOwnPropertyDescriptor, Ve = (s, t, e, i) => {
|
|
25074
|
+
for (var n = i > 1 ? void 0 : i ? Z2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
25075
25075
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
25076
|
-
return i && n &&
|
|
25076
|
+
return i && n && K2(t, e, n), n;
|
|
25077
25077
|
};
|
|
25078
25078
|
const Pb = x("debugusdzbehaviours");
|
|
25079
25079
|
function ah(s) {
|
|
@@ -25871,12 +25871,12 @@ const By = class {
|
|
|
25871
25871
|
};
|
|
25872
25872
|
let wo = By;
|
|
25873
25873
|
r(wo, "_instance");
|
|
25874
|
-
var
|
|
25875
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
25874
|
+
var J2 = Object.defineProperty, ek = Object.getOwnPropertyDescriptor, vt = (s, t, e, i) => {
|
|
25875
|
+
for (var n = i > 1 ? void 0 : i ? ek(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
25876
25876
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
25877
|
-
return i && n &&
|
|
25877
|
+
return i && n && J2(t, e, n), n;
|
|
25878
25878
|
};
|
|
25879
|
-
const su = x("debugspriterenderer"),
|
|
25879
|
+
const su = x("debugspriterenderer"), tk = x("wireframe"), yu = class {
|
|
25880
25880
|
static getOrCreateGeometry(t) {
|
|
25881
25881
|
if (t.__cached_geometry)
|
|
25882
25882
|
return t.__cached_geometry;
|
|
@@ -25896,7 +25896,7 @@ const su = x("debugspriterenderer"), t2 = x("wireframe"), yu = class {
|
|
|
25896
25896
|
};
|
|
25897
25897
|
let br = yu;
|
|
25898
25898
|
r(br, "cache", {});
|
|
25899
|
-
class
|
|
25899
|
+
class ik {
|
|
25900
25900
|
constructor() {
|
|
25901
25901
|
r(this, "x");
|
|
25902
25902
|
r(this, "y");
|
|
@@ -26121,7 +26121,7 @@ class Ii extends I {
|
|
|
26121
26121
|
this._currentSprite.geometry = br.getOrCreateGeometry(n), this._currentSprite.material.map = n.texture;
|
|
26122
26122
|
else {
|
|
26123
26123
|
const a = new Me({ color: 16777215, side: ki });
|
|
26124
|
-
if (
|
|
26124
|
+
if (tk && (a.wireframe = !0), this.color && (a.color || (a.color = new ce()), a.color.copy(this.color), a.opacity = this.color.alpha), a.transparent = !0, a.toneMapped = this.toneMapped, a.depthWrite = !1, n.texture && !a.wireframe) {
|
|
26125
26125
|
let l = n.texture;
|
|
26126
26126
|
l[pp] !== void 0 && l[pp] !== this && this.spriteFrames > 1 && (l = n.texture = l.clone()), l[pp] = this, a.map = l;
|
|
26127
26127
|
}
|
|
@@ -26134,7 +26134,7 @@ vt([
|
|
|
26134
26134
|
f()
|
|
26135
26135
|
], Ii.prototype, "drawMode", 2);
|
|
26136
26136
|
vt([
|
|
26137
|
-
f(
|
|
26137
|
+
f(ik)
|
|
26138
26138
|
], Ii.prototype, "size", 2);
|
|
26139
26139
|
vt([
|
|
26140
26140
|
f(le)
|
|
@@ -26160,7 +26160,7 @@ vt([
|
|
|
26160
26160
|
vt([
|
|
26161
26161
|
f(vr)
|
|
26162
26162
|
], Ii.prototype, "sprite", 1);
|
|
26163
|
-
const Ob = x("debugwebxr"),
|
|
26163
|
+
const Ob = x("debugwebxr"), nk = new se().makeRotationY(Math.PI), ba = class extends I {
|
|
26164
26164
|
constructor() {
|
|
26165
26165
|
super(...arguments);
|
|
26166
26166
|
r(this, "_arScale", 1);
|
|
@@ -26409,7 +26409,7 @@ const Ob = x("debugwebxr"), n2 = new se().makeRotationY(Math.PI), ba = class ext
|
|
|
26409
26409
|
return;
|
|
26410
26410
|
}
|
|
26411
26411
|
const n = i.parent || this.context.scene;
|
|
26412
|
-
this._rigPlacementMatrix ? (l = this._rigPlacementMatrix) == null || l.decompose(i.position, i.quaternion, i.scale) : this._rigPlacementMatrix = i.matrix.clone(), this.applyViewBasedTransform(e), e.updateMatrix(), this.context.scene.add(e), e.attach(i), e.removeFromParent(), i.scale.set(this.arScale, this.arScale, this.arScale), i.position.multiplyScalar(this.arScale), i.updateMatrix(), this.invertForward && i.matrix.premultiply(
|
|
26412
|
+
this._rigPlacementMatrix ? (l = this._rigPlacementMatrix) == null || l.decompose(i.position, i.quaternion, i.scale) : this._rigPlacementMatrix = i.matrix.clone(), this.applyViewBasedTransform(e), e.updateMatrix(), this.context.scene.add(e), e.attach(i), e.removeFromParent(), i.scale.set(this.arScale, this.arScale, this.arScale), i.position.multiplyScalar(this.arScale), i.updateMatrix(), this.invertForward && i.matrix.premultiply(nk), i.matrix.premultiply(this._startOffset), i.matrix.decompose(i.position, i.quaternion, i.scale), n.add(i);
|
|
26413
26413
|
}
|
|
26414
26414
|
};
|
|
26415
26415
|
let yn = ba;
|
|
@@ -26561,7 +26561,7 @@ const _u = class {
|
|
|
26561
26561
|
let ha = _u;
|
|
26562
26562
|
r(ha, "up", new v(0, 1, 0)), r(ha, "zero", new v(0, 0, 0)), r(ha, "one", new v(1, 1, 1));
|
|
26563
26563
|
const ao = x("debugautosync"), mp = Symbol("syncerId");
|
|
26564
|
-
class
|
|
26564
|
+
class sk {
|
|
26565
26565
|
constructor() {
|
|
26566
26566
|
r(this, "_syncers", {});
|
|
26567
26567
|
}
|
|
@@ -26570,15 +26570,15 @@ class s2 {
|
|
|
26570
26570
|
return null;
|
|
26571
26571
|
if (this._syncers[t.guid])
|
|
26572
26572
|
return this._syncers[t.guid];
|
|
26573
|
-
const e = new
|
|
26573
|
+
const e = new ok(t);
|
|
26574
26574
|
return e[mp] = t.guid, this._syncers[e[mp]] = e, e;
|
|
26575
26575
|
}
|
|
26576
26576
|
removeSyncer(t) {
|
|
26577
26577
|
delete this._syncers[t[mp]];
|
|
26578
26578
|
}
|
|
26579
26579
|
}
|
|
26580
|
-
const ty = new
|
|
26581
|
-
class
|
|
26580
|
+
const ty = new sk();
|
|
26581
|
+
class ok {
|
|
26582
26582
|
constructor(t) {
|
|
26583
26583
|
r(this, "comp");
|
|
26584
26584
|
// private getters: { [key: string]: Function } = {};
|
|
@@ -26631,18 +26631,18 @@ class o2 {
|
|
|
26631
26631
|
this._isReceiving || (ao && console.log("Property changed: " + t, e), this.hasChanges = !0, this.changedProperties[t] = e);
|
|
26632
26632
|
}
|
|
26633
26633
|
}
|
|
26634
|
-
function
|
|
26634
|
+
function rk(s, t) {
|
|
26635
26635
|
let e = t !== s;
|
|
26636
26636
|
return !e && s && t && (Array.isArray(s) && Array.isArray(t) || typeof s == "object" && typeof t == "object") && (e = !0), e;
|
|
26637
26637
|
}
|
|
26638
26638
|
const wc = Symbol("AutoSyncHandler");
|
|
26639
|
-
function
|
|
26639
|
+
function ak(s) {
|
|
26640
26640
|
if (s[wc])
|
|
26641
26641
|
return s[wc];
|
|
26642
26642
|
const t = ty.getOrCreateSyncer(s);
|
|
26643
26643
|
return t == null || t.init(s), s[wc] = t, t;
|
|
26644
26644
|
}
|
|
26645
|
-
function
|
|
26645
|
+
function lk(s) {
|
|
26646
26646
|
const t = s[wc];
|
|
26647
26647
|
t && (ty.removeSyncer(t), t.destroy(), delete s[wc]);
|
|
26648
26648
|
}
|
|
@@ -26677,8 +26677,8 @@ const Sw = function(s = null) {
|
|
|
26677
26677
|
}
|
|
26678
26678
|
p = !0;
|
|
26679
26679
|
try {
|
|
26680
|
-
const _ =
|
|
26681
|
-
ao && console.log("SyncField assignment", i, "changed?", _, m, o), _ && (o == null ? void 0 : o.call(this, m, g)) !== !1 && ((y =
|
|
26680
|
+
const _ = rk(m, g);
|
|
26681
|
+
ao && console.log("SyncField assignment", i, "changed?", _, m, o), _ && (o == null ? void 0 : o.call(this, m, g)) !== !1 && ((y = ak(this)) == null || y.notifyChanged(i, m));
|
|
26682
26682
|
} finally {
|
|
26683
26683
|
p = !1;
|
|
26684
26684
|
}
|
|
@@ -26694,14 +26694,14 @@ const Sw = function(s = null) {
|
|
|
26694
26694
|
};
|
|
26695
26695
|
const h = a.__internalDestroy;
|
|
26696
26696
|
a.__internalDestroy = function() {
|
|
26697
|
-
|
|
26697
|
+
lk(this), h.call(this);
|
|
26698
26698
|
};
|
|
26699
26699
|
};
|
|
26700
26700
|
};
|
|
26701
|
-
var
|
|
26702
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
26701
|
+
var ck = Object.defineProperty, hk = Object.getOwnPropertyDescriptor, tf = (s, t, e, i) => {
|
|
26702
|
+
for (var n = i > 1 ? void 0 : i ? hk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
26703
26703
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
26704
|
-
return i && n &&
|
|
26704
|
+
return i && n && ck(t, e, n), n;
|
|
26705
26705
|
};
|
|
26706
26706
|
const Yt = x("debugplayersync"), Cw = class extends I {
|
|
26707
26707
|
constructor() {
|
|
@@ -26804,7 +26804,7 @@ tf([
|
|
|
26804
26804
|
tf([
|
|
26805
26805
|
f(xe)
|
|
26806
26806
|
], dh.prototype, "onPlayerSpawned", 2);
|
|
26807
|
-
var
|
|
26807
|
+
var dk = /* @__PURE__ */ ((s) => (s.OwnerChanged = "ownerChanged", s))(dk || {}), Gl;
|
|
26808
26808
|
const Rt = (Gl = class extends I {
|
|
26809
26809
|
constructor() {
|
|
26810
26810
|
super(...arguments);
|
|
@@ -26938,10 +26938,10 @@ let en = Rt;
|
|
|
26938
26938
|
tf([
|
|
26939
26939
|
Sw(en.prototype.onOwnerChange)
|
|
26940
26940
|
], en.prototype, "owner", 2);
|
|
26941
|
-
var
|
|
26942
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
26941
|
+
var uk = Object.defineProperty, fk = Object.getOwnPropertyDescriptor, rl = (s, t, e, i) => {
|
|
26942
|
+
for (var n = i > 1 ? void 0 : i ? fk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
26943
26943
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
26944
|
-
return i && n &&
|
|
26944
|
+
return i && n && uk(t, e, n), n;
|
|
26945
26945
|
};
|
|
26946
26946
|
class $s extends I {
|
|
26947
26947
|
constructor() {
|
|
@@ -26985,10 +26985,10 @@ rl([
|
|
|
26985
26985
|
rl([
|
|
26986
26986
|
f()
|
|
26987
26987
|
], $s.prototype, "createQRCodeButton", 2);
|
|
26988
|
-
var
|
|
26989
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
26988
|
+
var pk = Object.defineProperty, mk = Object.getOwnPropertyDescriptor, iy = (s, t, e, i) => {
|
|
26989
|
+
for (var n = i > 1 ? void 0 : i ? mk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
26990
26990
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
26991
|
-
return i && n &&
|
|
26991
|
+
return i && n && pk(t, e, n), n;
|
|
26992
26992
|
};
|
|
26993
26993
|
const jl = x("debugwebxr"), Mb = new W().setFromAxisAngle(new v(0, 1, 0), Math.PI);
|
|
26994
26994
|
class Pr extends I {
|
|
@@ -27122,10 +27122,10 @@ iy([
|
|
|
27122
27122
|
iy([
|
|
27123
27123
|
f(re)
|
|
27124
27124
|
], Pr.prototype, "rightHand", 2);
|
|
27125
|
-
var
|
|
27126
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
27125
|
+
var gk = Object.defineProperty, yk = Object.getOwnPropertyDescriptor, nf = (s, t, e, i) => {
|
|
27126
|
+
for (var n = i > 1 ? void 0 : i ? yk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
27127
27127
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
27128
|
-
return i && n &&
|
|
27128
|
+
return i && n && gk(t, e, n), n;
|
|
27129
27129
|
};
|
|
27130
27130
|
const os = x("debugwebxr"), Xs = new Array();
|
|
27131
27131
|
class js extends I {
|
|
@@ -27281,10 +27281,10 @@ nf([
|
|
|
27281
27281
|
], js.prototype, "customRightHand", 2);
|
|
27282
27282
|
class ny extends I {
|
|
27283
27283
|
}
|
|
27284
|
-
var
|
|
27285
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
27284
|
+
var _k = Object.defineProperty, bk = Object.getOwnPropertyDescriptor, Eo = (s, t, e, i) => {
|
|
27285
|
+
for (var n = i > 1 ? void 0 : i ? bk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
27286
27286
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
27287
|
-
return i && n &&
|
|
27287
|
+
return i && n && _k(t, e, n), n;
|
|
27288
27288
|
};
|
|
27289
27289
|
const gp = x("debugwebxr");
|
|
27290
27290
|
class rn extends I {
|
|
@@ -27458,7 +27458,7 @@ class rn extends I {
|
|
|
27458
27458
|
if (u.normal) {
|
|
27459
27459
|
this.updateHitPointerPosition(o, a, u.distance);
|
|
27460
27460
|
const _ = u.normal.applyQuaternion(Ce(u.object));
|
|
27461
|
-
a.quaternion.setFromUnitVectors(
|
|
27461
|
+
a.quaternion.setFromUnitVectors(vk, _);
|
|
27462
27462
|
} else
|
|
27463
27463
|
this.updateHitPointerPosition(o, a, u.distance);
|
|
27464
27464
|
a.parent !== this.context.scene && this.context.scene.add(a);
|
|
@@ -27539,13 +27539,13 @@ Eo([
|
|
|
27539
27539
|
Eo([
|
|
27540
27540
|
f()
|
|
27541
27541
|
], rn.prototype, "showHits", 2);
|
|
27542
|
-
const
|
|
27543
|
-
var
|
|
27544
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
27542
|
+
const vk = new v(0, 1, 0);
|
|
27543
|
+
var wk = Object.defineProperty, xk = Object.getOwnPropertyDescriptor, wt = (s, t, e, i) => {
|
|
27544
|
+
for (var n = i > 1 ? void 0 : i ? xk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
27545
27545
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
27546
|
-
return i && n &&
|
|
27546
|
+
return i && n && wk(t, e, n), n;
|
|
27547
27547
|
};
|
|
27548
|
-
const Bl = x("debugwebxr"),
|
|
27548
|
+
const Bl = x("debugwebxr"), Sk = x("debugusdz");
|
|
27549
27549
|
var Np;
|
|
27550
27550
|
const da = (Np = class extends I {
|
|
27551
27551
|
constructor() {
|
|
@@ -27768,7 +27768,7 @@ const da = (Np = class extends I {
|
|
|
27768
27768
|
*/
|
|
27769
27769
|
handleCreatingHTML() {
|
|
27770
27770
|
if (this.createARButton || this.createVRButton || this.useQuicklookExport) {
|
|
27771
|
-
if ((X.isiOS() && X.isSafari() ||
|
|
27771
|
+
if ((X.isiOS() && X.isSafari() || Sk) && this.useQuicklookExport) {
|
|
27772
27772
|
const e = S.findObjectOfType(Ge);
|
|
27773
27773
|
if (!e || e && e.allowCreateQuicklookButton) {
|
|
27774
27774
|
const i = this.getButtonsFactory().createQuicklookButton();
|
|
@@ -28086,7 +28086,7 @@ class Ow {
|
|
|
28086
28086
|
}), o.length > 1 && console.log("WARNING: Multiple colliders detected. visionOS / iOS can only support objects with a single collider, only exporting the first collider: ", l));
|
|
28087
28087
|
}
|
|
28088
28088
|
}
|
|
28089
|
-
const
|
|
28089
|
+
const Ck = x("debugshadowcomponents");
|
|
28090
28090
|
y0.prototype.interactable = {
|
|
28091
28091
|
get() {
|
|
28092
28092
|
return this.interactive;
|
|
@@ -28166,7 +28166,7 @@ class xn extends I {
|
|
|
28166
28166
|
const l = this._parentComponent.shadowComponent;
|
|
28167
28167
|
l && (l == null || l.add(e), o = !0);
|
|
28168
28168
|
}
|
|
28169
|
-
this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent), Yc && e.add(new Mi(0.5)), this.onAfterAddedToScene(), o && TS(),
|
|
28169
|
+
this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent), Yc && e.add(new Mi(0.5)), this.onAfterAddedToScene(), o && TS(), Ck && console.warn("Added shadow component", this.shadowComponent);
|
|
28170
28170
|
}
|
|
28171
28171
|
setShadowComponentOwner(e) {
|
|
28172
28172
|
if (e && (e[xi] === void 0 || e[xi] === this) && (e[xi] = this, e.children))
|
|
@@ -28195,19 +28195,19 @@ class sf extends xn {
|
|
|
28195
28195
|
super.awake();
|
|
28196
28196
|
}
|
|
28197
28197
|
}
|
|
28198
|
-
var
|
|
28199
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
28198
|
+
var Pk = Object.defineProperty, Ok = Object.getOwnPropertyDescriptor, uh = (s, t, e, i) => {
|
|
28199
|
+
for (var n = i > 1 ? void 0 : i ? Ok(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28200
28200
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28201
|
-
return i && n &&
|
|
28201
|
+
return i && n && Pk(t, e, n), n;
|
|
28202
28202
|
};
|
|
28203
28203
|
const yp = x("debugui"), _p = x("debuguilayout");
|
|
28204
|
-
class
|
|
28204
|
+
class Mk {
|
|
28205
28205
|
constructor() {
|
|
28206
28206
|
r(this, "width");
|
|
28207
28207
|
r(this, "height");
|
|
28208
28208
|
}
|
|
28209
28209
|
}
|
|
28210
|
-
class
|
|
28210
|
+
class Rk {
|
|
28211
28211
|
constructor() {
|
|
28212
28212
|
r(this, "x");
|
|
28213
28213
|
r(this, "y");
|
|
@@ -28419,10 +28419,10 @@ uh([
|
|
|
28419
28419
|
uh([
|
|
28420
28420
|
f(oe)
|
|
28421
28421
|
], ii.prototype, "anchorMax", 2);
|
|
28422
|
-
var
|
|
28423
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
28422
|
+
var kk = Object.defineProperty, Tk = Object.getOwnPropertyDescriptor, Rw = (s, t, e, i) => {
|
|
28423
|
+
for (var n = i > 1 ? void 0 : i ? Tk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28424
28424
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28425
|
-
return i && n &&
|
|
28425
|
+
return i && n && kk(t, e, n), n;
|
|
28426
28426
|
};
|
|
28427
28427
|
class fh extends I {
|
|
28428
28428
|
constructor() {
|
|
@@ -28437,10 +28437,10 @@ Rw([
|
|
|
28437
28437
|
Rw([
|
|
28438
28438
|
f(oe)
|
|
28439
28439
|
], fh.prototype, "effectDistance", 2);
|
|
28440
|
-
var
|
|
28441
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
28440
|
+
var Ak = Object.defineProperty, Ek = Object.getOwnPropertyDescriptor, kw = (s, t, e, i) => {
|
|
28441
|
+
for (var n = i > 1 ? void 0 : i ? Ek(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28442
28442
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28443
|
-
return i && n &&
|
|
28443
|
+
return i && n && Ak(t, e, n), n;
|
|
28444
28444
|
};
|
|
28445
28445
|
const ed = {
|
|
28446
28446
|
backgroundColor: new ce(1, 1, 1),
|
|
@@ -28574,10 +28574,10 @@ class of extends al {
|
|
|
28574
28574
|
this.uiObject && !this._flippedObject && (this._flippedObject = !0, this.uiObject.scale.y *= -1);
|
|
28575
28575
|
}
|
|
28576
28576
|
}
|
|
28577
|
-
var
|
|
28578
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
28577
|
+
var Ik = Object.defineProperty, Lk = Object.getOwnPropertyDescriptor, Ws = (s, t, e, i) => {
|
|
28578
|
+
for (var n = i > 1 ? void 0 : i ? Lk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28579
28579
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28580
|
-
return i && n &&
|
|
28580
|
+
return i && n && Ik(t, e, n), n;
|
|
28581
28581
|
};
|
|
28582
28582
|
const Ho = x("debugtext");
|
|
28583
28583
|
var ct = /* @__PURE__ */ ((s) => (s[s.UpperLeft = 0] = "UpperLeft", s[s.UpperCenter = 1] = "UpperCenter", s[s.UpperRight = 2] = "UpperRight", s[s.MiddleLeft = 3] = "MiddleLeft", s[s.MiddleCenter = 4] = "MiddleCenter", s[s.MiddleRight = 5] = "MiddleRight", s[s.LowerLeft = 6] = "LowerLeft", s[s.LowerCenter = 7] = "LowerCenter", s[s.LowerRight = 8] = "LowerRight", s))(ct || {}), Tw = /* @__PURE__ */ ((s) => (s[s.Normal = 0] = "Normal", s[s.Bold = 1] = "Bold", s[s.Italic = 2] = "Italic", s[s.BoldAndItalic = 3] = "BoldAndItalic", s))(Tw || {});
|
|
@@ -28860,7 +28860,7 @@ class si extends al {
|
|
|
28860
28860
|
if (n < 0)
|
|
28861
28861
|
return e;
|
|
28862
28862
|
const o = (d = e.substring(n + 1)) == null ? void 0 : d.toLowerCase();
|
|
28863
|
-
if (
|
|
28863
|
+
if (Dk.includes(o))
|
|
28864
28864
|
return Ho && console.warn("Unsupported font style: " + o), e;
|
|
28865
28865
|
const a = e.lastIndexOf("/");
|
|
28866
28866
|
let l = e;
|
|
@@ -28914,7 +28914,7 @@ class bp {
|
|
|
28914
28914
|
this.tag = t, this.previousValues = e;
|
|
28915
28915
|
}
|
|
28916
28916
|
}
|
|
28917
|
-
const
|
|
28917
|
+
const Dk = [
|
|
28918
28918
|
"medium",
|
|
28919
28919
|
"mediumitalic",
|
|
28920
28920
|
"black",
|
|
@@ -28974,7 +28974,7 @@ class Aw {
|
|
|
28974
28974
|
return l.content = t, l.width = e, l.height = i, l.horizontalAlignment = n, l.verticalAlignment = o, a !== void 0 && (l.wrapMode = a), l;
|
|
28975
28975
|
}
|
|
28976
28976
|
}
|
|
28977
|
-
const
|
|
28977
|
+
const jk = new se().makeRotationY(Math.PI), Bk = new se().makeScale(-1, 1, -1);
|
|
28978
28978
|
class sy {
|
|
28979
28979
|
get extensionName() {
|
|
28980
28980
|
return "text";
|
|
@@ -28986,8 +28986,8 @@ class sy {
|
|
|
28986
28986
|
const o = S.getComponent(t, ii);
|
|
28987
28987
|
let a = 100, l = 100;
|
|
28988
28988
|
o && (a = o.width, l = o.height);
|
|
28989
|
-
const c =
|
|
28990
|
-
o && c.premultiply(
|
|
28989
|
+
const c = jk.clone();
|
|
28990
|
+
o && c.premultiply(Bk), e.setMatrix(c);
|
|
28991
28991
|
const h = n.color.clone();
|
|
28992
28992
|
e.material = new Lt({ color: h, emissive: h }), e.addEventListener("serialize", (d, u) => {
|
|
28993
28993
|
let p = n.text;
|
|
@@ -29047,10 +29047,10 @@ class sy {
|
|
|
29047
29047
|
}
|
|
29048
29048
|
}
|
|
29049
29049
|
}
|
|
29050
|
-
var
|
|
29051
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
29050
|
+
var Fk = Object.defineProperty, zk = Object.getOwnPropertyDescriptor, ot = (s, t, e, i) => {
|
|
29051
|
+
for (var n = i > 1 ? void 0 : i ? zk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29052
29052
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29053
|
-
return i && n &&
|
|
29053
|
+
return i && n && Fk(t, e, n), n;
|
|
29054
29054
|
};
|
|
29055
29055
|
const Rb = x("debuguilayout");
|
|
29056
29056
|
class ll {
|
|
@@ -29245,10 +29245,10 @@ class Lw extends Li {
|
|
|
29245
29245
|
onCalculateLayout() {
|
|
29246
29246
|
}
|
|
29247
29247
|
}
|
|
29248
|
-
var
|
|
29249
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
29248
|
+
var Uk = Object.defineProperty, Nk = Object.getOwnPropertyDescriptor, Yn = (s, t, e, i) => {
|
|
29249
|
+
for (var n = i > 1 ? void 0 : i ? Nk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29250
29250
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29251
|
-
return i && n &&
|
|
29251
|
+
return i && n && Uk(t, e, n), n;
|
|
29252
29252
|
}, Dw = /* @__PURE__ */ ((s) => (s[s.ScreenSpaceOverlay = 0] = "ScreenSpaceOverlay", s[s.ScreenSpaceCamera = 1] = "ScreenSpaceCamera", s[s.WorldSpace = 2] = "WorldSpace", s[s.Undefined = -1] = "Undefined", s))(Dw || {});
|
|
29253
29253
|
const vp = x("debuguilayout"), jw = class extends sf {
|
|
29254
29254
|
constructor() {
|
|
@@ -29484,10 +29484,10 @@ Yn([
|
|
|
29484
29484
|
Yn([
|
|
29485
29485
|
f()
|
|
29486
29486
|
], Nt.prototype, "planeDistance", 2);
|
|
29487
|
-
var $
|
|
29488
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
29487
|
+
var $k = Object.defineProperty, Wk = Object.getOwnPropertyDescriptor, oy = (s, t, e, i) => {
|
|
29488
|
+
for (var n = i > 1 ? void 0 : i ? Wk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29489
29489
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29490
|
-
return i && n && $
|
|
29490
|
+
return i && n && $k(t, e, n), n;
|
|
29491
29491
|
};
|
|
29492
29492
|
class Or extends I {
|
|
29493
29493
|
constructor() {
|
|
@@ -29619,7 +29619,7 @@ class Bw {
|
|
|
29619
29619
|
}
|
|
29620
29620
|
}
|
|
29621
29621
|
const nc = x("debugusdz");
|
|
29622
|
-
function
|
|
29622
|
+
function Vk(s, t) {
|
|
29623
29623
|
var l;
|
|
29624
29624
|
const e = [], i = S.getComponentsInChildren(s, Ut), n = S.getComponentsInChildren(s, ti), o = new Array(), a = new Array();
|
|
29625
29625
|
if (t.injectImplicitBehaviours)
|
|
@@ -29670,7 +29670,7 @@ function V2(s, t) {
|
|
|
29670
29670
|
t.registerAnimation(c.root, h);
|
|
29671
29671
|
return a;
|
|
29672
29672
|
}
|
|
29673
|
-
function
|
|
29673
|
+
function Hk(s, t) {
|
|
29674
29674
|
const e = S.getComponentsInChildren(s, qe), i = S.getComponentsInChildren(s, Cr), n = new Array(), o = new Array();
|
|
29675
29675
|
nc && console.log({ audioSources: e, playAudioOnClicks: i });
|
|
29676
29676
|
for (const a of i) {
|
|
@@ -29689,7 +29689,7 @@ function H2(s, t) {
|
|
|
29689
29689
|
}
|
|
29690
29690
|
return o;
|
|
29691
29691
|
}
|
|
29692
|
-
function
|
|
29692
|
+
function Gk(s) {
|
|
29693
29693
|
return new Tt(
|
|
29694
29694
|
"DisableAtStart",
|
|
29695
29695
|
zt.sceneStartTrigger(),
|
|
@@ -29709,12 +29709,12 @@ function kb(s, t) {
|
|
|
29709
29709
|
const a = document.createElement("img");
|
|
29710
29710
|
return a.id = "button", o.appendChild(a), s.domElement.shadowRoot.appendChild(i), o;
|
|
29711
29711
|
}
|
|
29712
|
-
var
|
|
29713
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
29712
|
+
var qk = Object.defineProperty, Xk = Object.getOwnPropertyDescriptor, At = (s, t, e, i) => {
|
|
29713
|
+
for (var n = i > 1 ? void 0 : i ? Xk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29714
29714
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29715
|
-
return i && n &&
|
|
29715
|
+
return i && n && qk(t, e, n), n;
|
|
29716
29716
|
};
|
|
29717
|
-
const pi = x("debugusdz"),
|
|
29717
|
+
const pi = x("debugusdz"), Qk = x("debugusdzpruning");
|
|
29718
29718
|
class cl {
|
|
29719
29719
|
constructor() {
|
|
29720
29720
|
r(this, "callToAction");
|
|
@@ -29807,7 +29807,7 @@ const Nm = (hd = class extends I {
|
|
|
29807
29807
|
async exportAndOpen() {
|
|
29808
29808
|
var i;
|
|
29809
29809
|
let t = this.exportFileName ?? ((i = this.objectToExport) == null ? void 0 : i.name) ?? this.name;
|
|
29810
|
-
if (t += "-" +
|
|
29810
|
+
if (t += "-" + M2(), Rs() || (t !== "" && (t += "-"), t += "MadeWithNeedle"), this.link || (this.link = kb(this.context, X.supportsQuickLookAR())), this.customUsdzFile)
|
|
29811
29811
|
return pi && console.log("Exporting custom usdz", this.customUsdzFile), this.openInQuickLook(this.customUsdzFile, t), null;
|
|
29812
29812
|
if (!this.objectToExport)
|
|
29813
29813
|
return console.warn("No object to export", this), null;
|
|
@@ -29861,14 +29861,14 @@ const Nm = (hd = class extends I {
|
|
|
29861
29861
|
pi && We("Progressive Loading: " + n.length), await Promise.all(n), pi && We("Progressive Loading: done"), de.end("export-usdz-textures");
|
|
29862
29862
|
const a = ei.Global.Mask;
|
|
29863
29863
|
ei.Global.Set(vs.AR);
|
|
29864
|
-
const l = new
|
|
29864
|
+
const l = new L2(), c = new ey(this.quickLookCompatible);
|
|
29865
29865
|
let h;
|
|
29866
29866
|
const d = [];
|
|
29867
29867
|
this.interactive && (d.push(new Pw()), d.push(new nl()), globalThis.true && S.getComponentsInChildren(t, _e).length > 0 && (this.physics ? (h = new Ow(), d.push(h)) : z() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), d.push(new sy()), d.push(new Bw()));
|
|
29868
29868
|
const u = [c, ...d, ...this.extensions], p = { self: this, exporter: l, extensions: u, object: t };
|
|
29869
29869
|
de.report("export-usdz", "Invoking before-export"), this.dispatchEvent(new CustomEvent("before-export", { detail: p })), this.applyWebARSessionRoot(), this._previousTimeScale = this.context.time.timeScale, this.context.time.timeScale = 0, de.report("export-usdz", "auto export animations and audio sources");
|
|
29870
29870
|
const m = new Array();
|
|
29871
|
-
this.autoExportAnimations && m.push(...
|
|
29871
|
+
this.autoExportAnimations && m.push(...Vk(t, c)), u.find((O) => O.extensionName === "Audio") && this.autoExportAudioSources && m.push(...Hk(t)), l.debug = pi, l.pruneUnusedNodes = !Qk;
|
|
29872
29872
|
const y = or.instance.objs.map((O) => O.batchedMesh);
|
|
29873
29873
|
l.keepObject = (O) => {
|
|
29874
29874
|
let R = !0;
|
|
@@ -29888,7 +29888,7 @@ const Nm = (hd = class extends I {
|
|
|
29888
29888
|
O.visible || _.push(O);
|
|
29889
29889
|
});
|
|
29890
29890
|
const b = u.find((O) => O.extensionName === "Behaviour");
|
|
29891
|
-
this.interactive && b && _.length > 0 && b.addBehavior(
|
|
29891
|
+
this.interactive && b && _.length > 0 && b.addBehavior(Gk(_));
|
|
29892
29892
|
let w = !0;
|
|
29893
29893
|
this.quickLookCompatible && !this.interactive && (w = !1), this.anchoringType !== "plane" && this.anchoringType !== "none" && this.anchoringType !== "image" && this.anchoringType !== "face" && (this.anchoringType = "plane"), this.planeAnchoringAlignment !== "horizontal" && this.planeAnchoringAlignment !== "vertical" && this.planeAnchoringAlignment !== "any" && (this.planeAnchoringAlignment = "horizontal"), de.report("export-usdz", "Invoking exporter.parse");
|
|
29894
29894
|
const P = await l.parse(this.objectToExport, {
|
|
@@ -30017,10 +30017,10 @@ At([
|
|
|
30017
30017
|
At([
|
|
30018
30018
|
f()
|
|
30019
30019
|
], Ge.prototype, "quickLookCompatible", 2);
|
|
30020
|
-
var
|
|
30021
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
30020
|
+
var Yk = Object.defineProperty, Kk = Object.getOwnPropertyDescriptor, ry = (s, t, e, i) => {
|
|
30021
|
+
for (var n = i > 1 ? void 0 : i ? Kk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
30022
30022
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
30023
|
-
return i && n &&
|
|
30023
|
+
return i && n && Yk(t, e, n), n;
|
|
30024
30024
|
};
|
|
30025
30025
|
class ph extends I {
|
|
30026
30026
|
constructor() {
|
|
@@ -30067,10 +30067,10 @@ ry([
|
|
|
30067
30067
|
ry([
|
|
30068
30068
|
f(ce)
|
|
30069
30069
|
], ph.prototype, "color", 1);
|
|
30070
|
-
var
|
|
30071
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
30070
|
+
var Zk = Object.defineProperty, Jk = Object.getOwnPropertyDescriptor, ay = (s, t, e, i) => {
|
|
30071
|
+
for (var n = i > 1 ? void 0 : i ? Jk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
30072
30072
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
30073
|
-
return i && n &&
|
|
30073
|
+
return i && n && Zk(t, e, n), n;
|
|
30074
30074
|
};
|
|
30075
30075
|
class hl extends I {
|
|
30076
30076
|
constructor() {
|
|
@@ -40089,7 +40089,7 @@ const ac = (Yp = class extends I {
|
|
|
40089
40089
|
i.src = e, i.addEventListener("load", async () => {
|
|
40090
40090
|
const n = await createImageBitmap(i);
|
|
40091
40091
|
ac._imageElements.set(e, n);
|
|
40092
|
-
const o = await
|
|
40092
|
+
const o = await z2(n);
|
|
40093
40093
|
if (o) {
|
|
40094
40094
|
const l = await (await o.convertToBlob({ type: "image/png" })).arrayBuffer(), c = S.findObjectOfType(Ge);
|
|
40095
40095
|
c && this.trackedImages && (c.extensions.push(
|
|
@@ -42860,7 +42860,7 @@ class LI {
|
|
|
42860
42860
|
const mD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42861
42861
|
__proto__: null,
|
|
42862
42862
|
ActionBuilder: ye,
|
|
42863
|
-
ActionCollection:
|
|
42863
|
+
ActionCollection: X2,
|
|
42864
42864
|
ActionModel: bi,
|
|
42865
42865
|
AlignmentConstraint: Vu,
|
|
42866
42866
|
Animation: ti,
|
|
@@ -42928,7 +42928,7 @@ const mD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42928
42928
|
EventListEvent: Ug,
|
|
42929
42929
|
EventSystem: di,
|
|
42930
42930
|
EventTrigger: Kg,
|
|
42931
|
-
FieldWithDefault:
|
|
42931
|
+
FieldWithDefault: x2,
|
|
42932
42932
|
FixedJoint: Fw,
|
|
42933
42933
|
Fog: ph,
|
|
42934
42934
|
GltfExport: Zu,
|
|
@@ -42988,7 +42988,7 @@ const mD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42988
42988
|
PreliminaryAction: hh,
|
|
42989
42989
|
PreliminaryTrigger: Ju,
|
|
42990
42990
|
RawImage: Py,
|
|
42991
|
-
Rect:
|
|
42991
|
+
Rect: Rk,
|
|
42992
42992
|
RectTransform: ii,
|
|
42993
42993
|
ReflectionProbe: rh,
|
|
42994
42994
|
RegisteredAnimationInfo: ar,
|
|
@@ -43010,7 +43010,7 @@ const mD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43010
43010
|
SignalReceiver: Oh,
|
|
43011
43011
|
SignalReceiverEvent: _f,
|
|
43012
43012
|
SignalTrackHandler: lu,
|
|
43013
|
-
Size:
|
|
43013
|
+
Size: Mk,
|
|
43014
43014
|
SizeBySpeedModule: Bi,
|
|
43015
43015
|
SizeOverLifetimeModule: fl,
|
|
43016
43016
|
SkinnedMeshRenderer: aw,
|
|
@@ -43148,7 +43148,7 @@ pe.registerCallback(me.ContextCreated, (s) => {
|
|
|
43148
43148
|
});
|
|
43149
43149
|
class DI extends RS {
|
|
43150
43150
|
constructor() {
|
|
43151
|
-
super(new Worker(new URL(
|
|
43151
|
+
super(new Worker(URL.createObjectURL(new Blob(["importScripts('`${new URL('./generateMeshBVH.worker-2bb9524d.js', import.meta.url).toString()}`');"], { type: 'text/javascript' })), { type: "module" })), this.name = "GenerateMeshBVHWorker";
|
|
43152
43152
|
}
|
|
43153
43153
|
runTask(t, e, i = {}) {
|
|
43154
43154
|
return new Promise((n, o) => {
|
|
@@ -43196,7 +43196,7 @@ const jI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43196
43196
|
export {
|
|
43197
43197
|
YL as $physicsKey,
|
|
43198
43198
|
ye as ActionBuilder,
|
|
43199
|
-
|
|
43199
|
+
X2 as ActionCollection,
|
|
43200
43200
|
bi as ActionModel,
|
|
43201
43201
|
wO as Addressables,
|
|
43202
43202
|
Vu as AlignmentConstraint,
|
|
@@ -43299,7 +43299,7 @@ export {
|
|
|
43299
43299
|
Ug as EventListEvent,
|
|
43300
43300
|
di as EventSystem,
|
|
43301
43301
|
Kg as EventTrigger,
|
|
43302
|
-
|
|
43302
|
+
x2 as FieldWithDefault,
|
|
43303
43303
|
mc as FileReference,
|
|
43304
43304
|
PO as FileReferenceSerializer,
|
|
43305
43305
|
KL as FileSpawnModel,
|
|
@@ -43413,7 +43413,7 @@ export {
|
|
|
43413
43413
|
Rr as PlayableDirector,
|
|
43414
43414
|
Hc as PlayerColor,
|
|
43415
43415
|
en as PlayerState,
|
|
43416
|
-
|
|
43416
|
+
dk as PlayerStateEvent,
|
|
43417
43417
|
dh as PlayerSync,
|
|
43418
43418
|
EO as PlayerView,
|
|
43419
43419
|
IO as PlayerViewManager,
|
|
@@ -43432,7 +43432,7 @@ export {
|
|
|
43432
43432
|
Yo as RapierPhysics,
|
|
43433
43433
|
Py as RawImage,
|
|
43434
43434
|
Ls as RaycastOptions,
|
|
43435
|
-
|
|
43435
|
+
Rk as Rect,
|
|
43436
43436
|
ii as RectTransform,
|
|
43437
43437
|
rh as ReflectionProbe,
|
|
43438
43438
|
ar as RegisteredAnimationInfo,
|
|
@@ -43462,7 +43462,7 @@ export {
|
|
|
43462
43462
|
Oh as SignalReceiver,
|
|
43463
43463
|
_f as SignalReceiverEvent,
|
|
43464
43464
|
lu as SignalTrackHandler,
|
|
43465
|
-
|
|
43465
|
+
Mk as Size,
|
|
43466
43466
|
Bi as SizeBySpeedModule,
|
|
43467
43467
|
fl as SizeOverLifetimeModule,
|
|
43468
43468
|
aw as SkinnedMeshRenderer,
|
|
@@ -43510,9 +43510,9 @@ export {
|
|
|
43510
43510
|
sf as UIRootComponent,
|
|
43511
43511
|
fw as USDDocument,
|
|
43512
43512
|
jt as USDObject,
|
|
43513
|
-
|
|
43513
|
+
E2 as USDWriter,
|
|
43514
43514
|
Ge as USDZExporter,
|
|
43515
|
-
|
|
43515
|
+
L2 as USDZExporter$1,
|
|
43516
43516
|
pa as USDZText,
|
|
43517
43517
|
Bw as USDZUIExtension,
|
|
43518
43518
|
NM as UriSerializer,
|
|
@@ -43576,7 +43576,7 @@ export {
|
|
|
43576
43576
|
pM as createMotion,
|
|
43577
43577
|
gi as debugNet,
|
|
43578
43578
|
Lh as debugOwner,
|
|
43579
|
-
|
|
43579
|
+
j2 as decompressGpuTexture,
|
|
43580
43580
|
Tu as deepClone,
|
|
43581
43581
|
Hn as delay,
|
|
43582
43582
|
Au as delayForFrames,
|
|
@@ -43608,7 +43608,7 @@ export {
|
|
|
43608
43608
|
zu as getComponents,
|
|
43609
43609
|
Kc as getComponentsInChildren,
|
|
43610
43610
|
Ag as getComponentsInParent,
|
|
43611
|
-
|
|
43611
|
+
M2 as getFormattedDate,
|
|
43612
43612
|
Dt as getIconElement,
|
|
43613
43613
|
q_ as getIconTexture,
|
|
43614
43614
|
lL as getIp,
|
|
@@ -43638,7 +43638,7 @@ export {
|
|
|
43638
43638
|
Am as hasPointerEventComponent,
|
|
43639
43639
|
Rs as hasProLicense,
|
|
43640
43640
|
OC as hideDebugConsole,
|
|
43641
|
-
|
|
43641
|
+
z2 as imageToCanvas,
|
|
43642
43642
|
Ha as instantiate,
|
|
43643
43643
|
nw as invokeAfterImportPluginHooks,
|
|
43644
43644
|
GC as invokeXRSessionEnd,
|