@needle-tools/engine 5.1.0-alpha.8 → 5.1.0-alpha.9
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 +17 -0
- package/components.needle.json +1 -1
- package/dist/{materialx-CE2sUv2B.umd.cjs → materialx-B47Bz-xs.umd.cjs} +1 -1
- package/dist/{materialx-u1EqYrhu.min.js → materialx-B85WjP7E.min.js} +1 -1
- package/dist/{materialx-vyB2Zbt4.js → materialx-jkHmVPez.js} +1 -1
- package/dist/{needle-engine.bundle-BuI2pjv1.min.js → needle-engine.bundle-BotdnwVF.min.js} +172 -172
- package/dist/{needle-engine.bundle-DQy9vQdJ.umd.cjs → needle-engine.bundle-DagaNrZK.umd.cjs} +145 -145
- package/dist/{needle-engine.bundle-3LOy9tj8.js → needle-engine.bundle-mtqHZ45d.js} +6580 -6392
- package/dist/needle-engine.d.ts +295 -23
- package/dist/needle-engine.js +592 -582
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/{vendor-ButPLzor.umd.cjs → vendor-1UvpPPSB.umd.cjs} +2 -2
- package/dist/{vendor-DqZC4Is7.min.js → vendor-BQ2Vuntm.min.js} +4 -4
- package/dist/{vendor-DkWSNjMV.js → vendor-BslSKZPo.js} +113 -106
- package/lib/engine/api.d.ts +1 -1
- package/lib/engine/api.js +1 -1
- package/lib/engine/api.js.map +1 -1
- package/lib/engine/engine_audio.d.ts +30 -1
- package/lib/engine/engine_audio.js +57 -13
- package/lib/engine/engine_audio.js.map +1 -1
- package/lib/engine/engine_init.js +2 -2
- package/lib/engine/engine_init.js.map +1 -1
- package/lib/engine/engine_license.d.ts +7 -7
- package/lib/engine/engine_license.js +72 -72
- package/lib/engine/engine_license.js.map +1 -1
- package/lib/engine/engine_math.d.ts +1 -1
- package/lib/engine/engine_math.js +10 -4
- package/lib/engine/engine_math.js.map +1 -1
- package/lib/engine/engine_networking_blob.js +3 -3
- package/lib/engine/engine_networking_blob.js.map +1 -1
- package/lib/engine/engine_scenedata.js +7 -0
- package/lib/engine/engine_scenedata.js.map +1 -1
- package/lib/engine/engine_serialization_core.js +7 -2
- package/lib/engine/engine_serialization_core.js.map +1 -1
- package/lib/engine/engine_time_utils.d.ts +10 -6
- package/lib/engine/engine_time_utils.js +10 -6
- package/lib/engine/engine_time_utils.js.map +1 -1
- package/lib/engine/engine_utils_qrcode.js +2 -2
- package/lib/engine/engine_utils_qrcode.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js +2 -2
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.js +5 -5
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.js +2 -2
- package/lib/engine/webcomponents/needle-engine.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.loading.js +2 -2
- package/lib/engine/webcomponents/needle-engine.loading.js.map +1 -1
- package/lib/engine/xr/TempXRContext.js +2 -2
- package/lib/engine/xr/TempXRContext.js.map +1 -1
- package/lib/engine-components/AudioSource.d.ts +46 -2
- package/lib/engine-components/AudioSource.js +268 -60
- package/lib/engine-components/AudioSource.js.map +1 -1
- package/lib/engine-components/DragControls.js +2 -2
- package/lib/engine-components/DragControls.js.map +1 -1
- package/lib/engine-components/DragControlsConstraints.d.ts +0 -15
- package/lib/engine-components/DragControlsConstraints.js +14 -8
- package/lib/engine-components/DragControlsConstraints.js.map +1 -1
- package/lib/engine-components/EventList.js +1 -1
- package/lib/engine-components/EventList.js.map +1 -1
- package/lib/engine-components/SceneSwitcher.js +17 -2
- package/lib/engine-components/SceneSwitcher.js.map +1 -1
- package/lib/engine-components/codegen/components.d.ts +10 -0
- package/lib/engine-components/codegen/components.js +10 -0
- package/lib/engine-components/codegen/components.js.map +1 -1
- package/lib/engine-components/export/usdz/USDZExporter.js +4 -4
- package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
- package/lib/engine-components/timeline/PlayableDirector.js +1 -1
- package/lib/engine-components/timeline/PlayableDirector.js.map +1 -1
- package/lib/engine-components/web/ScrollFollow.d.ts +33 -0
- package/lib/engine-components/web/ScrollFollow.js +164 -22
- package/lib/engine-components/web/ScrollFollow.js.map +1 -1
- package/lib/needle-app.d.ts +18 -0
- package/lib/needle-app.js +19 -0
- package/lib/needle-app.js.map +1 -0
- package/package.json +3 -2
- package/plugins/common/license.js +25 -4
- package/plugins/common/needle-engine.js +5 -2
- package/plugins/types/userconfig.d.ts +22 -0
- package/plugins/vite/dts-generator.d.ts +24 -0
- package/plugins/vite/dts-generator.js +40 -7
- package/plugins/vite/index.d.ts +2 -0
- package/plugins/vite/index.js +17 -0
- package/plugins/vite/license.js +4 -4
- package/plugins/vite/needle-app.js +78 -5
- package/plugins/vite/remote.d.ts +28 -0
- package/plugins/vite/remote.js +124 -0
- package/src/engine/api.ts +1 -1
- package/src/engine/engine_audio.ts +68 -15
- package/src/engine/engine_init.ts +2 -2
- package/src/engine/engine_license.ts +69 -69
- package/src/engine/engine_math.ts +11 -4
- package/src/engine/engine_networking_blob.ts +3 -3
- package/src/engine/engine_scenedata.ts +7 -2
- package/src/engine/engine_serialization_core.ts +7 -2
- package/src/engine/engine_time_utils.ts +10 -6
- package/src/engine/engine_utils_qrcode.ts +2 -2
- package/src/engine/webcomponents/needle menu/needle-menu-spatial.ts +2 -2
- package/src/engine/webcomponents/needle menu/needle-menu.ts +5 -5
- package/src/engine/webcomponents/needle-engine.loading.ts +6 -6
- package/src/engine/webcomponents/needle-engine.ts +2 -2
- package/src/engine/xr/TempXRContext.ts +2 -2
- package/src/engine-components/AudioSource.ts +256 -55
- package/src/engine-components/DragControls.ts +3 -2
- package/src/engine-components/DragControlsConstraints.ts +16 -8
- package/src/engine-components/EventList.ts +1 -1
- package/src/engine-components/SceneSwitcher.ts +14 -2
- package/src/engine-components/codegen/components.ts +10 -0
- package/src/engine-components/export/usdz/USDZExporter.ts +4 -4
- package/src/engine-components/timeline/PlayableDirector.ts +1 -1
- package/src/engine-components/web/ScrollFollow.ts +168 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Object3D as cc, PlaneGeometry as lc, Layers as Br, MeshBasicMaterial as ea, DoubleSide as Gs, AdditiveBlending as uc, InstancedBufferAttribute as
|
|
1
|
+
import { Object3D as cc, PlaneGeometry as lc, Layers as Br, MeshBasicMaterial as ea, DoubleSide as Gs, AdditiveBlending as uc, InstancedBufferAttribute as yn, DynamicDrawUsage as ee, InstancedBufferGeometry as jl, Uniform$1 as Re, ShaderMaterial as Ws, BufferGeometry as yi, BufferAttribute as he, Mesh as Zr, MeshStandardMaterial as Gl, MeshPhysicalMaterial as Wl, ShaderChunk as $l, Triangle as Mn, Vector3 as H, Box3 as Fe, Matrix4 as Oe, Line3 as tn, Plane as hc, Vector2 as fn, BackSide as Hl, REVISION as fc, Ray as ql, FrontSide as na, LineSegments as dc, LineLoop as pc, Line as mc, Points as yc, Sphere as Xl, BatchedMesh as Yl, Matrix3 as Zl, Vector4 as vo, SkinnedMesh as Kl, InterpolateDiscrete as Ql, InterpolateLinear as gc, AnimationClip as tu, QuaternionKeyframeTrack as eu, ColorKeyframeTrack as nu, VectorKeyframeTrack as iu, BooleanKeyframeTrack as ru, NumberKeyframeTrack as su, PropertyBinding as ia } from "./three.js";
|
|
2
2
|
const ou = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
3
3
|
function au(r) {
|
|
4
4
|
return typeof r == "string" && ou.test(r);
|
|
@@ -91,7 +91,7 @@ function mu(r) {
|
|
|
91
91
|
}
|
|
92
92
|
return [e[0] >> 24 & 255, e[0] >> 16 & 255, e[0] >> 8 & 255, e[0] & 255, e[1] >> 24 & 255, e[1] >> 16 & 255, e[1] >> 8 & 255, e[1] & 255, e[2] >> 24 & 255, e[2] >> 16 & 255, e[2] >> 8 & 255, e[2] & 255, e[3] >> 24 & 255, e[3] >> 16 & 255, e[3] >> 8 & 255, e[3] & 255, e[4] >> 24 & 255, e[4] >> 16 & 255, e[4] >> 8 & 255, e[4] & 255];
|
|
93
93
|
}
|
|
94
|
-
const Cd = du("v5", 80, mu), vs = 2, Ue = 4, Ze = 4, yu = 4,
|
|
94
|
+
const Cd = du("v5", 80, mu), vs = 2, Ue = 4, Ze = 4, yu = 4, cn = new Int32Array(2), ra = new Float32Array(cn.buffer), sa = new Float64Array(cn.buffer), cr = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;
|
|
95
95
|
class Qe {
|
|
96
96
|
constructor(t, e) {
|
|
97
97
|
this.low = t | 0, this.high = e | 0;
|
|
@@ -176,10 +176,10 @@ class Jr {
|
|
|
176
176
|
return new Qe(this.readUint32(t), this.readUint32(t + 4));
|
|
177
177
|
}
|
|
178
178
|
readFloat32(t) {
|
|
179
|
-
return
|
|
179
|
+
return cn[0] = this.readInt32(t), ra[0];
|
|
180
180
|
}
|
|
181
181
|
readFloat64(t) {
|
|
182
|
-
return
|
|
182
|
+
return cn[cr ? 0 : 1] = this.readInt32(t), cn[cr ? 1 : 0] = this.readInt32(t + 4), sa[0];
|
|
183
183
|
}
|
|
184
184
|
writeInt8(t, e) {
|
|
185
185
|
this.bytes_[t] = e;
|
|
@@ -206,10 +206,10 @@ class Jr {
|
|
|
206
206
|
this.writeUint32(t, e.low), this.writeUint32(t + 4, e.high);
|
|
207
207
|
}
|
|
208
208
|
writeFloat32(t, e) {
|
|
209
|
-
ra[0] = e, this.writeInt32(t,
|
|
209
|
+
ra[0] = e, this.writeInt32(t, cn[0]);
|
|
210
210
|
}
|
|
211
211
|
writeFloat64(t, e) {
|
|
212
|
-
sa[0] = e, this.writeInt32(t,
|
|
212
|
+
sa[0] = e, this.writeInt32(t, cn[cr ? 0 : 1]), this.writeInt32(t + 4, cn[cr ? 1 : 0]);
|
|
213
213
|
}
|
|
214
214
|
/**
|
|
215
215
|
* Return the file identifier. Behavior is undefined for FlatBuffers whose
|
|
@@ -2459,7 +2459,7 @@ class qn {
|
|
|
2459
2459
|
return new qn(this.a.clone(), this.b.clone());
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
|
-
class
|
|
2462
|
+
class un {
|
|
2463
2463
|
constructor(t, e) {
|
|
2464
2464
|
this.subType = e, this.type = "function", this.keys = t;
|
|
2465
2465
|
}
|
|
@@ -2495,10 +2495,10 @@ class ln {
|
|
|
2495
2495
|
};
|
|
2496
2496
|
}
|
|
2497
2497
|
static fromJSON(t) {
|
|
2498
|
-
return new
|
|
2498
|
+
return new un(t.keys.map((e) => [ju(e.value, t.subType), e.pos]), t.subType);
|
|
2499
2499
|
}
|
|
2500
2500
|
clone() {
|
|
2501
|
-
return this.subType === "Number" ? new
|
|
2501
|
+
return this.subType === "Number" ? new un(this.keys.map(([t, e]) => [t, e]), this.subType) : new un(this.keys.map(([t, e]) => [t.clone(), e]), this.subType);
|
|
2502
2502
|
}
|
|
2503
2503
|
}
|
|
2504
2504
|
const hr = new G();
|
|
@@ -2510,7 +2510,7 @@ class Pn {
|
|
|
2510
2510
|
[1, 0],
|
|
2511
2511
|
[1, 1]
|
|
2512
2512
|
]) {
|
|
2513
|
-
this.type = "function", this.color = new
|
|
2513
|
+
this.type = "function", this.color = new un(t, "Color"), this.alpha = new un(e, "Number");
|
|
2514
2514
|
}
|
|
2515
2515
|
genColor(t, e, n) {
|
|
2516
2516
|
return this.color.genValue(hr, n), e.set(hr.x, hr.y, hr.z, this.alpha.genValue(1, n));
|
|
@@ -2528,7 +2528,7 @@ class Pn {
|
|
|
2528
2528
|
return t.functions.length > 0 && e.push([qn.fromJSON(t.functions[t.functions.length - 1].function).b, 1]), new Pn(e.map((n) => [new G(n[0].x, n[0].y, n[0].z), n[1]]), e.map((n) => [n[0].w, n[1]]));
|
|
2529
2529
|
} else {
|
|
2530
2530
|
const e = new Pn();
|
|
2531
|
-
return e.alpha =
|
|
2531
|
+
return e.alpha = un.fromJSON(t.alpha), e.color = un.fromJSON(t.color), e;
|
|
2532
2532
|
}
|
|
2533
2533
|
}
|
|
2534
2534
|
clone() {
|
|
@@ -5897,7 +5897,7 @@ class wh extends wc {
|
|
|
5897
5897
|
super(t), this.vector_ = new G(), this.vector2_ = new G(), this.vector3_ = new G(), this.quaternion_ = new rt(), this.quaternion2_ = new rt(), this.quaternion3_ = new rt(), this.rotationMat_ = new De(), this.rotationMat2_ = new De(), this.maxParticles = 1e3, this.setupBuffers(), this.rebuildMaterial();
|
|
5898
5898
|
}
|
|
5899
5899
|
buildExpandableBuffers() {
|
|
5900
|
-
this.offsetBuffer = new
|
|
5900
|
+
this.offsetBuffer = new yn(new Float32Array(this.maxParticles * 3), 3), this.offsetBuffer.setUsage(ee), this.geometry.setAttribute("offset", this.offsetBuffer), this.colorBuffer = new yn(new Float32Array(this.maxParticles * 4), 4), this.colorBuffer.setUsage(ee), this.geometry.setAttribute("color", this.colorBuffer), this.settings.renderMode === J.Mesh ? (this.rotationBuffer = new yn(new Float32Array(this.maxParticles * 4), 4), this.rotationBuffer.setUsage(ee), this.geometry.setAttribute("rotation", this.rotationBuffer)) : (this.settings.renderMode === J.BillBoard || this.settings.renderMode === J.HorizontalBillBoard || this.settings.renderMode === J.VerticalBillBoard || this.settings.renderMode === J.StretchedBillBoard) && (this.rotationBuffer = new yn(new Float32Array(this.maxParticles), 1), this.rotationBuffer.setUsage(ee), this.geometry.setAttribute("rotation", this.rotationBuffer)), this.sizeBuffer = new yn(new Float32Array(this.maxParticles * 3), 3), this.sizeBuffer.setUsage(ee), this.geometry.setAttribute("size", this.sizeBuffer), this.uvTileBuffer = new yn(new Float32Array(this.maxParticles), 1), this.uvTileBuffer.setUsage(ee), this.geometry.setAttribute("uvTile", this.uvTileBuffer), this.settings.renderMode === J.StretchedBillBoard && (this.velocityBuffer = new yn(new Float32Array(this.maxParticles * 4), 4), this.velocityBuffer.setUsage(ee), this.geometry.setAttribute("velocity", this.velocityBuffer));
|
|
5901
5901
|
}
|
|
5902
5902
|
setupBuffers() {
|
|
5903
5903
|
this.geometry && this.geometry.dispose(), this.geometry = new jl(), this.geometry.setIndex(this.settings.instancingGeometry.getIndex()), this.settings.instancingGeometry.hasAttribute("normal") && this.geometry.setAttribute("normal", this.settings.instancingGeometry.getAttribute("normal")), this.geometry.setAttribute("position", this.settings.instancingGeometry.getAttribute("position")), this.geometry.setAttribute("uv", this.settings.instancingGeometry.getAttribute("uv")), this.buildExpandableBuffers();
|
|
@@ -9723,7 +9723,7 @@ tr = qt;
|
|
|
9723
9723
|
var j = {};
|
|
9724
9724
|
Ve(j, "LogLevel", () => ce, (r) => ce = r);
|
|
9725
9725
|
Ve(j, "default", () => Ea, (r) => Ea = r);
|
|
9726
|
-
var
|
|
9726
|
+
var gn = function(r, t) {
|
|
9727
9727
|
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
|
9728
9728
|
if (!e) return r;
|
|
9729
9729
|
var n = e.call(r), i, s = [], a;
|
|
@@ -9741,7 +9741,7 @@ var yn = function(r, t) {
|
|
|
9741
9741
|
}
|
|
9742
9742
|
}
|
|
9743
9743
|
return s;
|
|
9744
|
-
},
|
|
9744
|
+
}, vn = function(r, t, e) {
|
|
9745
9745
|
if (e || arguments.length === 2)
|
|
9746
9746
|
for (var n = 0, i = t.length, s; n < i; n++) (s || !(n in t)) && (s || (s = Array.prototype.slice.call(t, 0, n)), s[n] = t[n]);
|
|
9747
9747
|
return r.concat(s || Array.prototype.slice.call(t));
|
|
@@ -9766,32 +9766,32 @@ var Yh = (
|
|
|
9766
9766
|
configurable: !0
|
|
9767
9767
|
}), r.prototype.log = function() {
|
|
9768
9768
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
9769
|
-
this._logLevel >= ce.All && this._print.apply(this,
|
|
9769
|
+
this._logLevel >= ce.All && this._print.apply(this, vn([
|
|
9770
9770
|
ce.All
|
|
9771
|
-
],
|
|
9771
|
+
], gn(t), !1));
|
|
9772
9772
|
}, r.prototype.warn = function() {
|
|
9773
9773
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
9774
|
-
this._logLevel >= ce.Warnings && this._print.apply(this,
|
|
9774
|
+
this._logLevel >= ce.Warnings && this._print.apply(this, vn([
|
|
9775
9775
|
ce.Warnings
|
|
9776
|
-
],
|
|
9776
|
+
], gn(t), !1));
|
|
9777
9777
|
}, r.prototype.error = function() {
|
|
9778
9778
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
9779
|
-
this._logLevel >= ce.Errors && this._print.apply(this,
|
|
9779
|
+
this._logLevel >= ce.Errors && this._print.apply(this, vn([
|
|
9780
9780
|
ce.Errors
|
|
9781
|
-
],
|
|
9781
|
+
], gn(t), !1));
|
|
9782
9782
|
}, r.prototype.setLogFunction = function(t) {
|
|
9783
9783
|
this._print = t;
|
|
9784
9784
|
}, r.prototype._print = function(t) {
|
|
9785
9785
|
for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
9786
|
-
var i =
|
|
9786
|
+
var i = vn([
|
|
9787
9787
|
Xh
|
|
9788
|
-
],
|
|
9788
|
+
], gn(e), !1);
|
|
9789
9789
|
for (var s in i) i[s] instanceof Error && (i[s] = "(" + i[s].name + ") " + i[s].message);
|
|
9790
|
-
t >= ce.All ? console.log.apply(console,
|
|
9790
|
+
t >= ce.All ? console.log.apply(console, vn([], gn(i), !1)) : t >= ce.Warnings ? console.warn.apply(console, vn([
|
|
9791
9791
|
"WARNING"
|
|
9792
|
-
],
|
|
9792
|
+
], gn(i), !1)) : t >= ce.Errors && console.error.apply(console, vn([
|
|
9793
9793
|
"ERROR"
|
|
9794
|
-
],
|
|
9794
|
+
], gn(i), !1));
|
|
9795
9795
|
}, r;
|
|
9796
9796
|
})()
|
|
9797
9797
|
), Ea = new Yh(), hl = {};
|
|
@@ -12135,21 +12135,21 @@ class _f {
|
|
|
12135
12135
|
}
|
|
12136
12136
|
}
|
|
12137
12137
|
const mt = /* @__PURE__ */ new _f();
|
|
12138
|
-
let
|
|
12138
|
+
let hn, $n;
|
|
12139
12139
|
const Nn = [], Sr = /* @__PURE__ */ new Ro(() => new Fe());
|
|
12140
12140
|
function bf(r, t, e, n, i, s) {
|
|
12141
|
-
|
|
12141
|
+
hn = Sr.getPrimitive(), $n = Sr.getPrimitive(), Nn.push(hn, $n), mt.setBuffer(r._roots[t]);
|
|
12142
12142
|
const a = uo(0, r.geometry, e, n, i, s);
|
|
12143
|
-
mt.clearBuffer(), Sr.releasePrimitive(
|
|
12143
|
+
mt.clearBuffer(), Sr.releasePrimitive(hn), Sr.releasePrimitive($n), Nn.pop(), Nn.pop();
|
|
12144
12144
|
const o = Nn.length;
|
|
12145
|
-
return o > 0 && ($n = Nn[o - 1],
|
|
12145
|
+
return o > 0 && ($n = Nn[o - 1], hn = Nn[o - 2]), a;
|
|
12146
12146
|
}
|
|
12147
12147
|
function uo(r, t, e, n, i = null, s = 0, a = 0) {
|
|
12148
12148
|
const { float32Array: o, uint16Array: c, uint32Array: l } = mt;
|
|
12149
12149
|
let h = r * 2;
|
|
12150
12150
|
if (kt(h, c)) {
|
|
12151
12151
|
const m = Ht(r, l), p = ie(h, c);
|
|
12152
|
-
return xt(r, o,
|
|
12152
|
+
return xt(r, o, hn), n(m, p, !1, a, s + r / Et, hn);
|
|
12153
12153
|
} else {
|
|
12154
12154
|
let R = function(A) {
|
|
12155
12155
|
const { uint16Array: N, uint32Array: L } = mt;
|
|
@@ -12166,12 +12166,12 @@ function uo(r, t, e, n, i = null, s = 0, a = 0) {
|
|
|
12166
12166
|
};
|
|
12167
12167
|
const m = Bt(r), p = Nt(r, l);
|
|
12168
12168
|
let b = m, T = p, g, v, x, _;
|
|
12169
|
-
if (i && (x =
|
|
12169
|
+
if (i && (x = hn, _ = $n, xt(b, o, x), xt(T, o, _), g = i(x), v = i(_), v < g)) {
|
|
12170
12170
|
b = p, T = m;
|
|
12171
12171
|
const A = g;
|
|
12172
12172
|
g = v, v = A, x = _;
|
|
12173
12173
|
}
|
|
12174
|
-
x || (x =
|
|
12174
|
+
x || (x = hn, xt(b, o, x));
|
|
12175
12175
|
const C = kt(b * 2, c), M = e(x, C, g, a + 1, s + b / Et);
|
|
12176
12176
|
let P;
|
|
12177
12177
|
if (M === oo) {
|
|
@@ -12207,7 +12207,7 @@ function uo(r, t, e, n, i = null, s = 0, a = 0) {
|
|
|
12207
12207
|
return !!z;
|
|
12208
12208
|
}
|
|
12209
12209
|
}
|
|
12210
|
-
const vi = /* @__PURE__ */ new mt.constructor(), Yr = /* @__PURE__ */ new mt.constructor(),
|
|
12210
|
+
const vi = /* @__PURE__ */ new mt.constructor(), Yr = /* @__PURE__ */ new mt.constructor(), ln = /* @__PURE__ */ new Ro(() => new Fe()), Un = /* @__PURE__ */ new Fe(), Dn = /* @__PURE__ */ new Fe(), Bs = /* @__PURE__ */ new Fe(), Ns = /* @__PURE__ */ new Fe();
|
|
12211
12211
|
let Us = !1;
|
|
12212
12212
|
function Tf(r, t, e, n) {
|
|
12213
12213
|
if (Us)
|
|
@@ -12218,7 +12218,7 @@ function Tf(r, t, e, n) {
|
|
|
12218
12218
|
const l = new Oe().copy(e).invert();
|
|
12219
12219
|
for (let h = 0, d = i.length; h < d; h++) {
|
|
12220
12220
|
vi.setBuffer(i[h]), c = 0;
|
|
12221
|
-
const m =
|
|
12221
|
+
const m = ln.getPrimitive();
|
|
12222
12222
|
xt(0, vi.float32Array, m), m.applyMatrix4(l);
|
|
12223
12223
|
for (let p = 0, b = s.length; p < b && (Yr.setBuffer(s[p]), a = ke(
|
|
12224
12224
|
0,
|
|
@@ -12233,7 +12233,7 @@ function Tf(r, t, e, n) {
|
|
|
12233
12233
|
m
|
|
12234
12234
|
), Yr.clearBuffer(), c += s[p].byteLength / $t, !a); p++)
|
|
12235
12235
|
;
|
|
12236
|
-
if (
|
|
12236
|
+
if (ln.releasePrimitive(m), vi.clearBuffer(), o += i[h].byteLength / $t, a)
|
|
12237
12237
|
break;
|
|
12238
12238
|
}
|
|
12239
12239
|
return Us = !1, a;
|
|
@@ -12264,7 +12264,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
|
|
|
12264
12264
|
a + t / Et
|
|
12265
12265
|
);
|
|
12266
12266
|
else if (P) {
|
|
12267
|
-
const O =
|
|
12267
|
+
const O = ln.getPrimitive();
|
|
12268
12268
|
xt(t, g, O), O.applyMatrix4(e);
|
|
12269
12269
|
const z = Bt(r), R = Nt(r, b);
|
|
12270
12270
|
xt(z, p, Un), xt(R, p, Dn);
|
|
@@ -12293,7 +12293,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
|
|
|
12293
12293
|
o + 1,
|
|
12294
12294
|
O,
|
|
12295
12295
|
!h
|
|
12296
|
-
),
|
|
12296
|
+
), ln.releasePrimitive(O);
|
|
12297
12297
|
} else {
|
|
12298
12298
|
const O = Bt(t), z = Nt(t, v);
|
|
12299
12299
|
xt(O, g, Bs), xt(z, g, Ns);
|
|
@@ -12340,7 +12340,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
|
|
|
12340
12340
|
h
|
|
12341
12341
|
);
|
|
12342
12342
|
else {
|
|
12343
|
-
const A =
|
|
12343
|
+
const A = ln.getPrimitive();
|
|
12344
12344
|
A.copy(Bs).applyMatrix4(e);
|
|
12345
12345
|
const N = Bt(r), L = Nt(r, b);
|
|
12346
12346
|
xt(N, p, Un), xt(L, p, Dn);
|
|
@@ -12369,7 +12369,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
|
|
|
12369
12369
|
o + 1,
|
|
12370
12370
|
A,
|
|
12371
12371
|
!h
|
|
12372
|
-
),
|
|
12372
|
+
), ln.releasePrimitive(A);
|
|
12373
12373
|
}
|
|
12374
12374
|
else if (B)
|
|
12375
12375
|
if (M)
|
|
@@ -12387,7 +12387,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
|
|
|
12387
12387
|
h
|
|
12388
12388
|
);
|
|
12389
12389
|
else {
|
|
12390
|
-
const A =
|
|
12390
|
+
const A = ln.getPrimitive();
|
|
12391
12391
|
A.copy(Ns).applyMatrix4(e);
|
|
12392
12392
|
const N = Bt(r), L = Nt(r, b);
|
|
12393
12393
|
xt(N, p, Un), xt(L, p, Dn);
|
|
@@ -12416,7 +12416,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
|
|
|
12416
12416
|
o + 1,
|
|
12417
12417
|
A,
|
|
12418
12418
|
!h
|
|
12419
|
-
),
|
|
12419
|
+
), ln.releasePrimitive(A);
|
|
12420
12420
|
}
|
|
12421
12421
|
}
|
|
12422
12422
|
return E;
|
|
@@ -12704,7 +12704,7 @@ const kf = /* @__PURE__ */ (function() {
|
|
|
12704
12704
|
g !== 0 ? v = (d * m - b * p) / g : v = 0, x = (d + v * m) / p, a.x = v, a.y = x;
|
|
12705
12705
|
};
|
|
12706
12706
|
})(), Oo = /* @__PURE__ */ (function() {
|
|
12707
|
-
const r = /* @__PURE__ */ new
|
|
12707
|
+
const r = /* @__PURE__ */ new fn(), t = /* @__PURE__ */ new H(), e = /* @__PURE__ */ new H();
|
|
12708
12708
|
return function(i, s, a, o) {
|
|
12709
12709
|
kf(i, s, r);
|
|
12710
12710
|
let c = r.x, l = r.y;
|
|
@@ -12781,7 +12781,7 @@ xe.prototype.closestPointToSegment = /* @__PURE__ */ (function() {
|
|
|
12781
12781
|
};
|
|
12782
12782
|
})();
|
|
12783
12783
|
xe.prototype.intersectsTriangle = /* @__PURE__ */ (function() {
|
|
12784
|
-
const r = /* @__PURE__ */ new xe(), t = /* @__PURE__ */ new en(), e = /* @__PURE__ */ new en(), n = /* @__PURE__ */ new H(), i = /* @__PURE__ */ new H(), s = /* @__PURE__ */ new H(), a = /* @__PURE__ */ new H(), o = /* @__PURE__ */ new tn(), c = /* @__PURE__ */ new tn(), l = /* @__PURE__ */ new H(), h = /* @__PURE__ */ new
|
|
12784
|
+
const r = /* @__PURE__ */ new xe(), t = /* @__PURE__ */ new en(), e = /* @__PURE__ */ new en(), n = /* @__PURE__ */ new H(), i = /* @__PURE__ */ new H(), s = /* @__PURE__ */ new H(), a = /* @__PURE__ */ new H(), o = /* @__PURE__ */ new tn(), c = /* @__PURE__ */ new tn(), l = /* @__PURE__ */ new H(), h = /* @__PURE__ */ new fn(), d = /* @__PURE__ */ new fn();
|
|
12785
12785
|
function m(_, C, M, P) {
|
|
12786
12786
|
const E = n;
|
|
12787
12787
|
!_.isDegenerateIntoPoint && !_.isDegenerateIntoSegment ? E.copy(_.plane.normal) : E.copy(C.plane.normal);
|
|
@@ -13066,7 +13066,7 @@ function zf(r, t, e = {}, n = 0, i = 1 / 0) {
|
|
|
13066
13066
|
const l = Math.sqrt(o);
|
|
13067
13067
|
return e.point ? e.point.copy(Ds) : e.point = Ds.clone(), e.distance = l, e.faceIndex = c, e;
|
|
13068
13068
|
}
|
|
13069
|
-
const xr = parseInt(fc) >= 169, If = parseInt(fc) <= 161,
|
|
13069
|
+
const xr = parseInt(fc) >= 169, If = parseInt(fc) <= 161, Sn = /* @__PURE__ */ new H(), xn = /* @__PURE__ */ new H(), _n = /* @__PURE__ */ new H(), _r = /* @__PURE__ */ new fn(), br = /* @__PURE__ */ new fn(), Tr = /* @__PURE__ */ new fn(), Wa = /* @__PURE__ */ new H(), $a = /* @__PURE__ */ new H(), Ha = /* @__PURE__ */ new H(), oi = /* @__PURE__ */ new H();
|
|
13070
13070
|
function Bf(r, t, e, n, i, s, a, o) {
|
|
13071
13071
|
let c;
|
|
13072
13072
|
if (s === Hl ? c = r.intersectTriangle(n, e, t, !0, i) : c = r.intersectTriangle(t, e, n, s !== Gs, i), c === null) return null;
|
|
@@ -13077,22 +13077,22 @@ function Bf(r, t, e, n, i, s, a, o) {
|
|
|
13077
13077
|
};
|
|
13078
13078
|
}
|
|
13079
13079
|
function qa(r, t, e, n, i, s, a, o, c, l, h) {
|
|
13080
|
-
|
|
13081
|
-
const d = Bf(r,
|
|
13080
|
+
Sn.fromBufferAttribute(t, s), xn.fromBufferAttribute(t, a), _n.fromBufferAttribute(t, o);
|
|
13081
|
+
const d = Bf(r, Sn, xn, _n, oi, c, l, h);
|
|
13082
13082
|
if (d) {
|
|
13083
13083
|
if (n) {
|
|
13084
|
-
_r.fromBufferAttribute(n, s), br.fromBufferAttribute(n, a), Tr.fromBufferAttribute(n, o), d.uv = new
|
|
13085
|
-
const p = Mn.getInterpolation(oi,
|
|
13084
|
+
_r.fromBufferAttribute(n, s), br.fromBufferAttribute(n, a), Tr.fromBufferAttribute(n, o), d.uv = new fn();
|
|
13085
|
+
const p = Mn.getInterpolation(oi, Sn, xn, _n, _r, br, Tr, d.uv);
|
|
13086
13086
|
xr || (d.uv = p);
|
|
13087
13087
|
}
|
|
13088
13088
|
if (i) {
|
|
13089
|
-
_r.fromBufferAttribute(i, s), br.fromBufferAttribute(i, a), Tr.fromBufferAttribute(i, o), d.uv1 = new
|
|
13090
|
-
const p = Mn.getInterpolation(oi,
|
|
13089
|
+
_r.fromBufferAttribute(i, s), br.fromBufferAttribute(i, a), Tr.fromBufferAttribute(i, o), d.uv1 = new fn();
|
|
13090
|
+
const p = Mn.getInterpolation(oi, Sn, xn, _n, _r, br, Tr, d.uv1);
|
|
13091
13091
|
xr || (d.uv1 = p), If && (d.uv2 = d.uv1);
|
|
13092
13092
|
}
|
|
13093
13093
|
if (e) {
|
|
13094
13094
|
Wa.fromBufferAttribute(e, s), $a.fromBufferAttribute(e, a), Ha.fromBufferAttribute(e, o), d.normal = new H();
|
|
13095
|
-
const p = Mn.getInterpolation(oi,
|
|
13095
|
+
const p = Mn.getInterpolation(oi, Sn, xn, _n, Wa, $a, Ha, d.normal);
|
|
13096
13096
|
d.normal.dot(r.direction) > 0 && d.normal.multiplyScalar(-1), xr || (d.normal = p);
|
|
13097
13097
|
}
|
|
13098
13098
|
const m = {
|
|
@@ -13102,9 +13102,9 @@ function qa(r, t, e, n, i, s, a, o, c, l, h) {
|
|
|
13102
13102
|
normal: new H(),
|
|
13103
13103
|
materialIndex: 0
|
|
13104
13104
|
};
|
|
13105
|
-
if (Mn.getNormal(
|
|
13105
|
+
if (Mn.getNormal(Sn, xn, _n, m.normal), d.face = m, d.faceIndex = s, xr) {
|
|
13106
13106
|
const p = new H();
|
|
13107
|
-
Mn.getBarycoord(oi,
|
|
13107
|
+
Mn.getBarycoord(oi, Sn, xn, _n, p), d.barycoord = p;
|
|
13108
13108
|
}
|
|
13109
13109
|
}
|
|
13110
13110
|
return d;
|
|
@@ -13212,7 +13212,7 @@ function Lf(r, t = null) {
|
|
|
13212
13212
|
}
|
|
13213
13213
|
}
|
|
13214
13214
|
}
|
|
13215
|
-
function
|
|
13215
|
+
function dn(r, t, e, n, i) {
|
|
13216
13216
|
let s, a, o, c, l, h;
|
|
13217
13217
|
const d = 1 / e.direction.x, m = 1 / e.direction.y, p = 1 / e.direction.z, b = e.origin.x, T = e.origin.y, g = e.origin.z;
|
|
13218
13218
|
let v = t[r], x = t[r + 3], _ = t[r + 1], C = t[r + 3 + 1], M = t[r + 2], P = t[r + 3 + 2];
|
|
@@ -13253,9 +13253,9 @@ function ho(r, t, e, n, i, s, a) {
|
|
|
13253
13253
|
Nf(t, e, n, m, p, i, s, a);
|
|
13254
13254
|
} else {
|
|
13255
13255
|
const m = Bt(r);
|
|
13256
|
-
|
|
13256
|
+
dn(m, o, n, s, a) && ho(m, t, e, n, i, s, a);
|
|
13257
13257
|
const p = Nt(r, l);
|
|
13258
|
-
|
|
13258
|
+
dn(p, o, n, s, a) && ho(p, t, e, n, i, s, a);
|
|
13259
13259
|
}
|
|
13260
13260
|
}
|
|
13261
13261
|
const Gf = ["x", "y", "z"];
|
|
@@ -13274,7 +13274,7 @@ function fo(r, t, e, n, i, s) {
|
|
|
13274
13274
|
const d = ko(r, c), m = Gf[d], b = n.direction[m] >= 0;
|
|
13275
13275
|
let T, g;
|
|
13276
13276
|
b ? (T = Bt(r), g = Nt(r, c)) : (T = Nt(r, c), g = Bt(r));
|
|
13277
|
-
const x =
|
|
13277
|
+
const x = dn(T, a, n, i, s) ? fo(T, t, e, n, i, s) : null;
|
|
13278
13278
|
if (x) {
|
|
13279
13279
|
const M = x.point[m];
|
|
13280
13280
|
if (b ? M <= a[g + d] : (
|
|
@@ -13283,7 +13283,7 @@ function fo(r, t, e, n, i, s) {
|
|
|
13283
13283
|
))
|
|
13284
13284
|
return x;
|
|
13285
13285
|
}
|
|
13286
|
-
const C =
|
|
13286
|
+
const C = dn(g, a, n, i, s) ? fo(g, t, e, n, i, s) : null;
|
|
13287
13287
|
return x && C ? x.distance <= C.distance ? x : C : x || C || null;
|
|
13288
13288
|
}
|
|
13289
13289
|
}
|
|
@@ -13424,9 +13424,9 @@ function mo(r, t, e, n, i, s, a) {
|
|
|
13424
13424
|
Ff(t, e, n, m, p, i, s, a);
|
|
13425
13425
|
} else {
|
|
13426
13426
|
const m = Bt(r);
|
|
13427
|
-
|
|
13427
|
+
dn(m, o, n, s, a) && mo(m, t, e, n, i, s, a);
|
|
13428
13428
|
const p = Nt(r, l);
|
|
13429
|
-
|
|
13429
|
+
dn(p, o, n, s, a) && mo(p, t, e, n, i, s, a);
|
|
13430
13430
|
}
|
|
13431
13431
|
}
|
|
13432
13432
|
const td = ["x", "y", "z"];
|
|
@@ -13445,7 +13445,7 @@ function yo(r, t, e, n, i, s) {
|
|
|
13445
13445
|
const d = ko(r, c), m = td[d], b = n.direction[m] >= 0;
|
|
13446
13446
|
let T, g;
|
|
13447
13447
|
b ? (T = Bt(r), g = Nt(r, c)) : (T = Nt(r, c), g = Bt(r));
|
|
13448
|
-
const x =
|
|
13448
|
+
const x = dn(T, a, n, i, s) ? yo(T, t, e, n, i, s) : null;
|
|
13449
13449
|
if (x) {
|
|
13450
13450
|
const M = x.point[m];
|
|
13451
13451
|
if (b ? M <= a[g + d] : (
|
|
@@ -13454,7 +13454,7 @@ function yo(r, t, e, n, i, s) {
|
|
|
13454
13454
|
))
|
|
13455
13455
|
return x;
|
|
13456
13456
|
}
|
|
13457
|
-
const C =
|
|
13457
|
+
const C = dn(g, a, n, i, s) ? yo(g, t, e, n, i, s) : null;
|
|
13458
13458
|
return x && C ? x.distance <= C.distance ? x : C : x || C || null;
|
|
13459
13459
|
}
|
|
13460
13460
|
}
|
|
@@ -13846,7 +13846,7 @@ function ud(r = {}) {
|
|
|
13846
13846
|
const { type: t = Ki } = r;
|
|
13847
13847
|
return this.boundsTree = new t(this, r), this.boundsTree;
|
|
13848
13848
|
}
|
|
13849
|
-
const
|
|
13849
|
+
const bn = /* @__PURE__ */ new H(), Tn = /* @__PURE__ */ new H(), Cn = /* @__PURE__ */ new H(), nc = /* @__PURE__ */ new vo(), zr = /* @__PURE__ */ new H(), Js = /* @__PURE__ */ new H(), ic = /* @__PURE__ */ new vo(), rc = /* @__PURE__ */ new vo(), Ir = /* @__PURE__ */ new Oe(), sc = /* @__PURE__ */ new Oe();
|
|
13850
13850
|
function hi(r, t) {
|
|
13851
13851
|
if (!r && !t)
|
|
13852
13852
|
return;
|
|
@@ -14047,7 +14047,7 @@ class yd {
|
|
|
14047
14047
|
const l = o.position, h = s ? o.normal : null, d = a ? o.tangent : null, m = n.morphAttributes.position, p = n.morphAttributes.normal, b = n.morphAttributes.tangent, T = n.morphTargetsRelative, g = t.morphTargetInfluences, v = new Zl();
|
|
14048
14048
|
v.getNormalMatrix(t.matrixWorld), n.index && e.index.array.set(n.index.array);
|
|
14049
14049
|
for (let x = 0, _ = o.position.count; x < _; x++)
|
|
14050
|
-
|
|
14050
|
+
bn.fromBufferAttribute(l, x), h && Tn.fromBufferAttribute(h, x), d && (nc.fromBufferAttribute(d, x), Cn.fromBufferAttribute(d, x)), g && (m && js(m, g, T, x, bn), p && js(p, g, T, x, Tn), b && js(b, g, T, x, Cn)), t.isSkinnedMesh && (t.applyBoneTransform(x, bn), h && oc(t, x, Tn), d && oc(t, x, Cn)), i && bn.applyMatrix4(t.matrixWorld), c.position.setXYZ(x, bn.x, bn.y, bn.z), h && (i && Tn.applyNormalMatrix(v), c.normal.setXYZ(x, Tn.x, Tn.y, Tn.z)), d && (i && Cn.transformDirection(t.matrixWorld), c.tangent.setXYZW(x, Cn.x, Cn.y, Cn.z, nc.w));
|
|
14051
14051
|
for (const x in this.attributes) {
|
|
14052
14052
|
const _ = this.attributes[x];
|
|
14053
14053
|
_ === "position" || _ === "tangent" || _ === "normal" || !(_ in o) || (c[_] || e.setAttribute(_, mi(o[_])), hi(o[_], c[_]), Cl(o[_], c[_]));
|
|
@@ -14100,7 +14100,7 @@ const ve = {
|
|
|
14100
14100
|
material: "material",
|
|
14101
14101
|
camera: "camera",
|
|
14102
14102
|
light: "light"
|
|
14103
|
-
},
|
|
14103
|
+
}, an = "KHR_animation_pointer", gd = {
|
|
14104
14104
|
// We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
|
|
14105
14105
|
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
14106
14106
|
CUBICSPLINE: void 0,
|
|
@@ -14110,7 +14110,7 @@ const ve = {
|
|
|
14110
14110
|
class vd {
|
|
14111
14111
|
/** @type {import("three/examples/jsm/loaders/GLTFLoader").GLTFParser} */
|
|
14112
14112
|
constructor(t) {
|
|
14113
|
-
this.name =
|
|
14113
|
+
this.name = an, this.parser = t, this.animationPointerResolver = null;
|
|
14114
14114
|
}
|
|
14115
14115
|
/**
|
|
14116
14116
|
* @param {import("..").AnimationPointerResolver | null} animationPointerResolver
|
|
@@ -14125,11 +14125,11 @@ class vd {
|
|
|
14125
14125
|
}
|
|
14126
14126
|
loadAnimationTargetFromChannelWithAnimationPointer(t) {
|
|
14127
14127
|
xd();
|
|
14128
|
-
const e = t.target, n = e.extensions && e.extensions[
|
|
14128
|
+
const e = t.target, n = e.extensions && e.extensions[an] && e.path && e.path === "pointer";
|
|
14129
14129
|
if (!n) return null;
|
|
14130
14130
|
let i, s = ve.node, a;
|
|
14131
14131
|
if (n) {
|
|
14132
|
-
const c = e.extensions[
|
|
14132
|
+
const c = e.extensions[an];
|
|
14133
14133
|
let l = c.pointer;
|
|
14134
14134
|
if (!l) {
|
|
14135
14135
|
console.warn("Invalid path", c, e);
|
|
@@ -14240,23 +14240,27 @@ class vd {
|
|
|
14240
14240
|
break;
|
|
14241
14241
|
case ve.node:
|
|
14242
14242
|
const m = ("/nodes/" + a.toString() + "/").length, p = l.substring(0, m);
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
|
|
14259
|
-
|
|
14243
|
+
if (i = l.substring(m), i.startsWith("weights/")) {
|
|
14244
|
+
const v = i.substring(8);
|
|
14245
|
+
/^\d+$/.test(v) ? i = "morphTargetInfluences[" + v + "]" : console.warn(an + ": invalid weight index", i, l);
|
|
14246
|
+
} else
|
|
14247
|
+
switch (i) {
|
|
14248
|
+
case "translation":
|
|
14249
|
+
i = "position";
|
|
14250
|
+
break;
|
|
14251
|
+
case "rotation":
|
|
14252
|
+
i = "quaternion";
|
|
14253
|
+
break;
|
|
14254
|
+
case "scale":
|
|
14255
|
+
i = "scale";
|
|
14256
|
+
break;
|
|
14257
|
+
case "weights":
|
|
14258
|
+
i = "morphTargetInfluences";
|
|
14259
|
+
break;
|
|
14260
|
+
case "extensions/KHR_node_visibility/visible":
|
|
14261
|
+
i = "visible";
|
|
14262
|
+
break;
|
|
14263
|
+
}
|
|
14260
14264
|
l = p + i;
|
|
14261
14265
|
break;
|
|
14262
14266
|
case ve.light:
|
|
@@ -14307,7 +14311,7 @@ class vd {
|
|
|
14307
14311
|
l = g + i;
|
|
14308
14312
|
break;
|
|
14309
14313
|
}
|
|
14310
|
-
this.animationPointerResolver?.resolvePath && (l = this.animationPointerResolver.resolvePath(l)), e.extensions[
|
|
14314
|
+
this.animationPointerResolver?.resolvePath && (l = this.animationPointerResolver.resolvePath(l)), e.extensions[an].pointer = l;
|
|
14311
14315
|
}
|
|
14312
14316
|
if (a == null || isNaN(a)) {
|
|
14313
14317
|
console.warn("Failed resolving animation node id: " + a, e);
|
|
@@ -14317,17 +14321,20 @@ class vd {
|
|
|
14317
14321
|
return s === ve.node ? o = this.parser.getDependency("node", a) : s === ve.material ? o = this.parser.getDependency("material", a) : s === ve.light ? o = this.parser.getDependency("light", a) : s === ve.camera ? o = this.parser.getDependency("camera", a) : console.error("Unhandled type", s), o;
|
|
14318
14322
|
}
|
|
14319
14323
|
createAnimationTracksWithAnimationPointer(t, e, n, i, s) {
|
|
14320
|
-
if (!(s.extensions && s.extensions[
|
|
14321
|
-
let o = s.extensions[
|
|
14324
|
+
if (!(s.extensions && s.extensions[an] && s.path && s.path === "pointer")) return null;
|
|
14325
|
+
let o = s.extensions[an].pointer;
|
|
14322
14326
|
if (!o) return null;
|
|
14323
14327
|
const c = [];
|
|
14324
14328
|
o = o.replaceAll("/", ".");
|
|
14325
14329
|
const l = o.split(".");
|
|
14326
14330
|
var d = t.name !== void 0 && t.name !== null ? t.name : t.uuid;
|
|
14327
|
-
if (l[2] = d, l[3]
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
+
if (l[2] = d, l[3]?.startsWith("morphTargetInfluences")) {
|
|
14332
|
+
const b = l[3];
|
|
14333
|
+
if (t.type === "Group") {
|
|
14334
|
+
for (const T of t.children)
|
|
14335
|
+
T instanceof Kl && T.morphTargetInfluences && (l[3] = T.name, l[4] = b, p(this.parser));
|
|
14336
|
+
return c;
|
|
14337
|
+
}
|
|
14331
14338
|
}
|
|
14332
14339
|
p(this.parser);
|
|
14333
14340
|
function m(b, T) {
|
|
@@ -14451,7 +14458,7 @@ function xd() {
|
|
|
14451
14458
|
}
|
|
14452
14459
|
if (!i) {
|
|
14453
14460
|
const s = r(t, n[2]);
|
|
14454
|
-
return s || console.warn(
|
|
14461
|
+
return s || console.warn(an + ": Property binding not found", e, t, t.name, n), s;
|
|
14455
14462
|
}
|
|
14456
14463
|
return i;
|
|
14457
14464
|
}
|
|
@@ -15169,7 +15176,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15169
15176
|
function Io(u) {
|
|
15170
15177
|
return u === document.scrollingElement ? document : u;
|
|
15171
15178
|
}
|
|
15172
|
-
function
|
|
15179
|
+
function pn(u) {
|
|
15173
15180
|
ss(u);
|
|
15174
15181
|
let f = Gt.get(u).animations;
|
|
15175
15182
|
if (f.length === 0) return;
|
|
@@ -15227,7 +15234,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15227
15234
|
f.updateScheduled || (setTimeout((() => {
|
|
15228
15235
|
for (const y of f.timelineRefs) {
|
|
15229
15236
|
const S = y.deref();
|
|
15230
|
-
S &&
|
|
15237
|
+
S && pn(S);
|
|
15231
15238
|
}
|
|
15232
15239
|
f.updateScheduled = !1;
|
|
15233
15240
|
})), f.updateScheduled = !0);
|
|
@@ -15261,7 +15268,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15261
15268
|
w.sourceMeasurements.scrollLeft = f.scrollLeft, w.sourceMeasurements.scrollTop = f.scrollTop;
|
|
15262
15269
|
for (const U of w.timelineRefs) {
|
|
15263
15270
|
const F = U.deref();
|
|
15264
|
-
F &&
|
|
15271
|
+
F && pn(F);
|
|
15265
15272
|
}
|
|
15266
15273
|
};
|
|
15267
15274
|
Io(f).addEventListener("scroll", D), w.disconnect = () => {
|
|
@@ -15280,7 +15287,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15280
15287
|
let S = Gt.get(u).animations;
|
|
15281
15288
|
for (let w = 0; w < S.length; w++) if (S[w].animation == f) return;
|
|
15282
15289
|
S.push({ animation: f, tickAnimation: y }), queueMicrotask((() => {
|
|
15283
|
-
|
|
15290
|
+
pn(u);
|
|
15284
15291
|
}));
|
|
15285
15292
|
}
|
|
15286
15293
|
class te {
|
|
@@ -15289,17 +15296,17 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15289
15296
|
if (!No(f.axis)) throw TypeError("Invalid axis");
|
|
15290
15297
|
Gt.get(this).axis = f.axis;
|
|
15291
15298
|
}
|
|
15292
|
-
|
|
15299
|
+
pn(this);
|
|
15293
15300
|
}
|
|
15294
15301
|
set source(f) {
|
|
15295
|
-
Rn(this, f),
|
|
15302
|
+
Rn(this, f), pn(this);
|
|
15296
15303
|
}
|
|
15297
15304
|
get source() {
|
|
15298
15305
|
return Gt.get(this).source;
|
|
15299
15306
|
}
|
|
15300
15307
|
set axis(f) {
|
|
15301
15308
|
if (!No(f)) throw TypeError("Invalid axis");
|
|
15302
|
-
Gt.get(this).axis = f,
|
|
15309
|
+
Gt.get(this).axis = f, pn(this);
|
|
15303
15310
|
}
|
|
15304
15311
|
get axis() {
|
|
15305
15312
|
return Gt.get(this).axis;
|
|
@@ -15471,7 +15478,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15471
15478
|
nr(y.source);
|
|
15472
15479
|
})).observe(y.subject), new MutationObserver((() => {
|
|
15473
15480
|
nr(y.source);
|
|
15474
|
-
})).observe(y.subject, { attributes: !0, attributeFilter: ["class", "style"] })), ss(this), y.subjectMeasurements = as(y.source, y.subject),
|
|
15481
|
+
})).observe(y.subject, { attributes: !0, attributeFilter: ["class", "style"] })), ss(this), y.subjectMeasurements = as(y.source, y.subject), pn(this);
|
|
15475
15482
|
}
|
|
15476
15483
|
get source() {
|
|
15477
15484
|
return ss(this), Gt.get(this).source;
|
|
@@ -15524,7 +15531,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15524
15531
|
function Jo() {
|
|
15525
15532
|
return new DOMException("The user aborted a request", "AbortError");
|
|
15526
15533
|
}
|
|
15527
|
-
function
|
|
15534
|
+
function mn(u, f) {
|
|
15528
15535
|
if (f === null) return f;
|
|
15529
15536
|
if (typeof f != "number") throw new DOMException(`Unexpected value: ${f}. Cannot convert to CssNumberish`, "InvalidStateError");
|
|
15530
15537
|
const y = u.rangeDuration ?? 100, S = $e(u), w = S ? y * f / S : 0;
|
|
@@ -15734,7 +15741,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15734
15741
|
const q = F.apply(S);
|
|
15735
15742
|
if (y.timeline) {
|
|
15736
15743
|
const Y = y.duration ?? 100;
|
|
15737
|
-
q.localTime =
|
|
15744
|
+
q.localTime = mn(y, q.localTime), q.endTime = mn(y, q.endTime), q.activeDuration = mn(y, q.activeDuration);
|
|
15738
15745
|
const Z = $e(y), pt = q.iterations ? (Z - q.delay - q.endDelay) / q.iterations : 0;
|
|
15739
15746
|
q.duration = Z ? CSS.percent(Y * pt / Z) : CSS.percent(0), y.timeline.currentTime === void 0 && (q.localTime = null);
|
|
15740
15747
|
}
|
|
@@ -15792,7 +15799,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15792
15799
|
}
|
|
15793
15800
|
get startTime() {
|
|
15794
15801
|
const f = X.get(this);
|
|
15795
|
-
return f.timeline ?
|
|
15802
|
+
return f.timeline ? mn(f, f.startTime) : f.animation.startTime;
|
|
15796
15803
|
}
|
|
15797
15804
|
set startTime(f) {
|
|
15798
15805
|
const y = X.get(this);
|
|
@@ -15803,7 +15810,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15803
15810
|
}
|
|
15804
15811
|
get currentTime() {
|
|
15805
15812
|
const f = X.get(this);
|
|
15806
|
-
return f.timeline ? f.holdTime != null ?
|
|
15813
|
+
return f.timeline ? f.holdTime != null ? mn(f, f.holdTime) : mn(f, $o(f)) : f.animation.currentTime;
|
|
15807
15814
|
}
|
|
15808
15815
|
set currentTime(f) {
|
|
15809
15816
|
const y = X.get(this);
|
|
@@ -15861,7 +15868,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
|
|
|
15861
15868
|
if (y > 0 && S == 1 / 0) throw new DOMException("Cannot finish Animation with an infinite target effect end.", "InvalidStateError");
|
|
15862
15869
|
ze(f);
|
|
15863
15870
|
const w = y < 0 ? 0 : S;
|
|
15864
|
-
this.currentTime =
|
|
15871
|
+
this.currentTime = mn(f, w);
|
|
15865
15872
|
const k = St(f, f.timeline.currentTime);
|
|
15866
15873
|
f.startTime === null && k !== null && (f.startTime = k - w / f.animation.playbackRate), f.pendingTask == "pause" && f.startTime !== null && (f.holdTime = null, f.pendingTask = null, f.readyPromise.resolve(this)), f.pendingTask == "play" && f.startTime !== null && (f.pendingTask = null, f.readyPromise.resolve(this)), We(f, !0, !0);
|
|
15867
15874
|
}
|