@tresjs/cientos 2.0.0-rc.0 → 2.0.0-rc.1
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/core/useEnvironment/index.d.ts +2 -2
- package/dist/trescientos.js +421 -421
- package/dist/trescientos.umd.cjs +9 -9
- package/package.json +1 -1
package/dist/trescientos.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/cientos
|
|
3
|
-
* version: v2.0.0-
|
|
3
|
+
* version: v2.0.0-rc.1
|
|
4
4
|
* (c) 2023
|
|
5
5
|
* description: Collection of useful helpers and fully functional, ready-made abstractions for Tres
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
@@ -10,8 +10,8 @@ var Jc = (f, i, r) => i in f ? Wc(f, i, { enumerable: !0, configurable: !0, writ
|
|
|
10
10
|
var Qr = (f, i, r) => (Jc(f, typeof i != "symbol" ? i + "" : i, r), r);
|
|
11
11
|
import { inject as pa, defineComponent as Ce, ref as nt, watch as vi, unref as Se, openBlock as ke, createElementBlock as Ae, createCommentVNode as es, getCurrentScope as eu, onScopeDispose as tu, getCurrentInstance as Pa, onMounted as yo, nextTick as nu, toRef as iu, readonly as su, customRef as ru, watchEffect as ss, computed as pn, shallowRef as Oe, onUnmounted as Ta, renderSlot as Ge, shallowReactive as ou, createElementVNode as be, normalizeProps as au, guardReactiveProps as lu, useSlots as cu, withAsyncContext as ka, mergeProps as He, Fragment as uu, renderList as pu } from "vue";
|
|
12
12
|
import { useTres as hu, useLogger as du, useRenderLoop as rs, useLoader as xo, useTexture as mu } from "@tresjs/core";
|
|
13
|
-
import { TrianglesDrawMode as fu, TriangleFanDrawMode as lo, TriangleStripDrawMode as Aa, Object3D as un, Raycaster as vu, Vector3 as $, Quaternion as Te, Euler as Fn, Matrix4 as ye, Color as Be, MeshBasicMaterial as zn, DoubleSide as Eo, LineBasicMaterial as Co, CylinderGeometry as yt, BoxGeometry as In, BufferGeometry as
|
|
14
|
-
function
|
|
13
|
+
import { TrianglesDrawMode as fu, TriangleFanDrawMode as lo, TriangleStripDrawMode as Aa, Object3D as un, Raycaster as vu, Vector3 as $, Quaternion as Te, Euler as Fn, Matrix4 as ye, Color as Be, MeshBasicMaterial as zn, DoubleSide as Eo, LineBasicMaterial as Co, CylinderGeometry as yt, BoxGeometry as In, BufferGeometry as jt, Float32BufferAttribute as zt, Mesh as Z, Line as ue, OctahedronGeometry as Dn, PlaneGeometry as Nn, TorusGeometry as Ns, SphereGeometry as bu, EventDispatcher as Ma, MOUSE as rn, TOUCH as on, PerspectiveCamera as an, Spherical as co, Vector2 as ht, OrthographicCamera as Qi, Loader as Ks, LoaderUtils as mi, FileLoader as fi, SpotLight as Sa, PointLight as uo, DirectionalLight as La, sRGBEncoding as Ut, MeshPhysicalMaterial as jn, InstancedMesh as gu, TextureLoader as Ra, ImageBitmapLoader as _u, BufferAttribute as Zi, InterleavedBuffer as wu, InterleavedBufferAttribute as yu, LinearFilter as Gs, LinearMipmapLinearFilter as Va, RepeatWrapping as ts, PointsMaterial as xu, Material as Zr, MeshStandardMaterial as Po, PropertyBinding as ns, SkinnedMesh as Ia, LineSegments as Eu, LineLoop as Cu, Points as Pu, Group as Wi, MathUtils as mt, Skeleton as Da, InterpolateLinear as Oa, AnimationClip as Na, Bone as po, NearestFilter as Tu, NearestMipmapNearestFilter as ku, LinearMipmapNearestFilter as Au, NearestMipmapLinearFilter as Mu, ClampToEdgeWrapping as ho, MirroredRepeatWrapping as Su, InterpolateDiscrete as Lu, FrontSide as Ru, Texture as Hs, VectorKeyframeTrack as Ba, QuaternionKeyframeTrack as mo, NumberKeyframeTrack as Fa, Box3 as Vu, Sphere as Iu, Interpolant as Du, ExtrudeGeometry as Ou, Vector4 as $s, Curve as Nu, MeshPhongMaterial as Wr, MeshLambertMaterial as Bu, EquirectangularReflectionMapping as za, AmbientLight as Fu, Uint16BufferAttribute as zu, Matrix3 as ju, ShapePath as Uu, DataTextureLoader as Gu, HalfFloatType as Bs, FloatType as Jr, DataUtils as Fs, LinearEncoding as ja, AnimationMixer as Hu, QuadraticBezierCurve3 as Ku, CubeReflectionMapping as $u, SRGBColorSpace as Xu, CubeTextureLoader as Yu } from "three";
|
|
14
|
+
function qu(f, i) {
|
|
15
15
|
for (var r = 0; r < i.length; r++) {
|
|
16
16
|
const s = i[r];
|
|
17
17
|
if (typeof s != "string" && !Array.isArray(s)) {
|
|
@@ -34,7 +34,7 @@ function is(f) {
|
|
|
34
34
|
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
|
35
35
|
}, is(f);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Qu(f, i) {
|
|
38
38
|
if (is(f) !== "object" || f === null)
|
|
39
39
|
return f;
|
|
40
40
|
var r = f[Symbol.toPrimitive];
|
|
@@ -46,12 +46,12 @@ function qu(f, i) {
|
|
|
46
46
|
}
|
|
47
47
|
return (i === "string" ? String : Number)(f);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
var i =
|
|
49
|
+
function Zu(f) {
|
|
50
|
+
var i = Qu(f, "string");
|
|
51
51
|
return is(i) === "symbol" ? i : String(i);
|
|
52
52
|
}
|
|
53
53
|
function P(f, i, r) {
|
|
54
|
-
return i =
|
|
54
|
+
return i = Zu(i), i in f ? Object.defineProperty(f, i, {
|
|
55
55
|
value: r,
|
|
56
56
|
enumerable: !0,
|
|
57
57
|
configurable: !0,
|
|
@@ -155,16 +155,16 @@ var ft = Uint8Array, cn = Uint16Array, fo = Uint32Array, Ua = new ft([
|
|
|
155
155
|
/* unused */
|
|
156
156
|
0,
|
|
157
157
|
0
|
|
158
|
-
]),
|
|
158
|
+
]), Wu = new ft([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Ha = function(f, i) {
|
|
159
159
|
for (var r = new cn(31), s = 0; s < 31; ++s)
|
|
160
160
|
r[s] = i += 1 << f[s - 1];
|
|
161
161
|
for (var o = new fo(r[30]), s = 1; s < 30; ++s)
|
|
162
162
|
for (var c = r[s]; c < r[s + 1]; ++c)
|
|
163
163
|
o[c] = c - r[s] << 5 | s;
|
|
164
164
|
return [r, o];
|
|
165
|
-
}, Ka = Ha(Ua, 2), $a = Ka[0],
|
|
166
|
-
$a[28] = 258,
|
|
167
|
-
var
|
|
165
|
+
}, Ka = Ha(Ua, 2), $a = Ka[0], Ju = Ka[1];
|
|
166
|
+
$a[28] = 258, Ju[258] = 28;
|
|
167
|
+
var ep = Ha(Ga, 0), tp = ep[0], vo = new cn(32768);
|
|
168
168
|
for (var Pe = 0; Pe < 32768; ++Pe) {
|
|
169
169
|
var nn = (Pe & 43690) >>> 1 | (Pe & 21845) << 1;
|
|
170
170
|
nn = (nn & 52428) >>> 2 | (nn & 13107) << 2, nn = (nn & 61680) >>> 4 | (nn & 3855) << 4, vo[Pe] = ((nn & 65280) >>> 8 | (nn & 255) << 8) >>> 1;
|
|
@@ -199,7 +199,7 @@ for (var Pe = 280; Pe < 288; ++Pe)
|
|
|
199
199
|
var Xa = new ft(32);
|
|
200
200
|
for (var Pe = 0; Pe < 32; ++Pe)
|
|
201
201
|
Xa[Pe] = 5;
|
|
202
|
-
var
|
|
202
|
+
var np = /* @__PURE__ */ Ji(os, 9, 1), ip = /* @__PURE__ */ Ji(Xa, 5, 1), eo = function(f) {
|
|
203
203
|
for (var i = f[0], r = 1; r < f.length; ++r)
|
|
204
204
|
f[r] > i && (i = f[r]);
|
|
205
205
|
return i;
|
|
@@ -209,13 +209,13 @@ var tp = /* @__PURE__ */ Ji(os, 9, 1), np = /* @__PURE__ */ Ji(Xa, 5, 1), eo = f
|
|
|
209
209
|
}, to = function(f, i) {
|
|
210
210
|
var r = i / 8 | 0;
|
|
211
211
|
return (f[r] | f[r + 1] << 8 | f[r + 2] << 16) >> (i & 7);
|
|
212
|
-
},
|
|
212
|
+
}, sp = function(f) {
|
|
213
213
|
return (f / 8 | 0) + (f & 7 && 1);
|
|
214
|
-
},
|
|
214
|
+
}, rp = function(f, i, r) {
|
|
215
215
|
(i == null || i < 0) && (i = 0), (r == null || r > f.length) && (r = f.length);
|
|
216
216
|
var s = new (f instanceof cn ? cn : f instanceof fo ? fo : ft)(r - i);
|
|
217
217
|
return s.set(f.subarray(i, r)), s;
|
|
218
|
-
},
|
|
218
|
+
}, op = function(f, i, r) {
|
|
219
219
|
var s = f.length;
|
|
220
220
|
if (!s || r && !r.l && s < 5)
|
|
221
221
|
return i || new ft(0);
|
|
@@ -234,12 +234,12 @@ var tp = /* @__PURE__ */ Ji(os, 9, 1), np = /* @__PURE__ */ Ji(Xa, 5, 1), eo = f
|
|
|
234
234
|
var S = xt(f, m + 1, 3);
|
|
235
235
|
if (m += 3, S)
|
|
236
236
|
if (S == 1)
|
|
237
|
-
_ =
|
|
237
|
+
_ = np, w = ip, y = 9, C = 5;
|
|
238
238
|
else if (S == 2) {
|
|
239
239
|
var I = xt(f, m, 31) + 257, D = xt(f, m + 10, 15) + 4, Y = I + xt(f, m + 5, 31) + 1;
|
|
240
240
|
m += 14;
|
|
241
241
|
for (var G = new ft(Y), F = new ft(19), B = 0; B < D; ++B)
|
|
242
|
-
F[
|
|
242
|
+
F[Wu[B]] = xt(f, m + B * 3, 7);
|
|
243
243
|
m += D * 3;
|
|
244
244
|
for (var H = eo(F), K = (1 << H) - 1, q = Ji(F, H, 1), B = 0; B < Y; ) {
|
|
245
245
|
var pe = q[xt(f, m, K)];
|
|
@@ -258,7 +258,7 @@ var tp = /* @__PURE__ */ Ji(os, 9, 1), np = /* @__PURE__ */ Ji(Xa, 5, 1), eo = f
|
|
|
258
258
|
} else
|
|
259
259
|
throw "invalid block type";
|
|
260
260
|
else {
|
|
261
|
-
var R =
|
|
261
|
+
var R = sp(m) + 4, O = f[R - 4] | f[R - 3] << 8, N = R + O;
|
|
262
262
|
if (N > s) {
|
|
263
263
|
if (c)
|
|
264
264
|
throw "unexpected EOF";
|
|
@@ -298,7 +298,7 @@ var tp = /* @__PURE__ */ Ji(os, 9, 1), np = /* @__PURE__ */ Ji(Xa, 5, 1), eo = f
|
|
|
298
298
|
if (!ge)
|
|
299
299
|
throw "invalid distance";
|
|
300
300
|
m += ge & 15;
|
|
301
|
-
var he =
|
|
301
|
+
var he = tp[A];
|
|
302
302
|
if (A > 3) {
|
|
303
303
|
var ne = Ga[A];
|
|
304
304
|
he += to(f, m) & (1 << ne) - 1, m += ne;
|
|
@@ -316,22 +316,22 @@ var tp = /* @__PURE__ */ Ji(os, 9, 1), np = /* @__PURE__ */ Ji(Xa, 5, 1), eo = f
|
|
|
316
316
|
}
|
|
317
317
|
r.l = _, r.p = Me, r.b = g, _ && (h = 1, r.m = y, r.d = w, r.n = C);
|
|
318
318
|
} while (!h);
|
|
319
|
-
return g == i.length ? i :
|
|
320
|
-
},
|
|
319
|
+
return g == i.length ? i : rp(i, 0, g);
|
|
320
|
+
}, ap = /* @__PURE__ */ new ft(0), lp = function(f) {
|
|
321
321
|
if ((f[0] & 15) != 8 || f[0] >>> 4 > 7 || (f[0] << 8 | f[1]) % 31)
|
|
322
322
|
throw "invalid zlib data";
|
|
323
323
|
if (f[1] & 32)
|
|
324
324
|
throw "invalid zlib data: preset dictionaries not supported";
|
|
325
325
|
};
|
|
326
|
-
function
|
|
327
|
-
return
|
|
326
|
+
function cp(f, i) {
|
|
327
|
+
return op((lp(f), f.subarray(2, -4)), i);
|
|
328
328
|
}
|
|
329
|
-
var
|
|
329
|
+
var up = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), pp = 0;
|
|
330
330
|
try {
|
|
331
|
-
|
|
331
|
+
up.decode(ap, { stream: !0 }), pp = 1;
|
|
332
332
|
} catch {
|
|
333
333
|
}
|
|
334
|
-
class
|
|
334
|
+
class hp extends un {
|
|
335
335
|
// events
|
|
336
336
|
constructor(i, r) {
|
|
337
337
|
super(), P(this, "isTransformControls", !0), P(this, "visible", !1), P(this, "domElement", void 0), P(this, "raycaster", new vu()), P(this, "gizmo", void 0), P(this, "plane", void 0), P(this, "tempVector", new $()), P(this, "tempVector2", new $()), P(this, "tempQuaternion", new Te()), P(this, "unit", {
|
|
@@ -455,7 +455,7 @@ class pp extends un {
|
|
|
455
455
|
const w = _;
|
|
456
456
|
w.geometry && w.geometry.dispose(), w.material && w.material.dispose();
|
|
457
457
|
});
|
|
458
|
-
}), this.domElement = r, this.camera = i, this.gizmo = new
|
|
458
|
+
}), this.domElement = r, this.camera = i, this.gizmo = new dp(), this.add(this.gizmo), this.plane = new mp(), this.add(this.plane);
|
|
459
459
|
const s = (o, c) => {
|
|
460
460
|
let p = c;
|
|
461
461
|
Object.defineProperty(this, o, {
|
|
@@ -473,7 +473,7 @@ class pp extends un {
|
|
|
473
473
|
s("camera", this.camera), s("object", this.object), s("enabled", this.enabled), s("axis", this.axis), s("mode", this.mode), s("translationSnap", this.translationSnap), s("rotationSnap", this.rotationSnap), s("scaleSnap", this.scaleSnap), s("space", this.space), s("size", this.size), s("dragging", this.dragging), s("showX", this.showX), s("showY", this.showY), s("showZ", this.showZ), s("worldPosition", this.worldPosition), s("worldPositionStart", this.worldPositionStart), s("worldQuaternion", this.worldQuaternion), s("worldQuaternionStart", this.worldQuaternionStart), s("cameraPosition", this.cameraPosition), s("cameraQuaternion", this.cameraQuaternion), s("pointStart", this.pointStart), s("pointEnd", this.pointEnd), s("rotationAxis", this.rotationAxis), s("rotationAngle", this.rotationAngle), s("eye", this.eye), r !== void 0 && this.connect(r);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
class
|
|
476
|
+
class dp extends un {
|
|
477
477
|
// these are set from parent class TransformControls
|
|
478
478
|
constructor() {
|
|
479
479
|
super(), P(this, "isTransformControlsGizmo", !0), P(this, "type", "TransformControlsGizmo"), P(this, "tempVector", new $(0, 0, 0)), P(this, "tempEuler", new Fn()), P(this, "alignVector", new $(0, 1, 0)), P(this, "zeroVector", new $(0, 0, 0)), P(this, "lookAtMatrix", new ye()), P(this, "tempQuaternion", new Te()), P(this, "tempQuaternion2", new Te()), P(this, "identityQuaternion", new Te()), P(this, "unitX", new $(1, 0, 0)), P(this, "unitY", new $(0, 1, 0)), P(this, "unitZ", new $(0, 0, 1)), P(this, "gizmo", void 0), P(this, "picker", void 0), P(this, "helper", void 0), P(this, "rotationAxis", new $()), P(this, "cameraPosition", new $()), P(this, "worldPositionStart", new $()), P(this, "worldQuaternionStart", new Te()), P(this, "worldPosition", new $()), P(this, "worldQuaternion", new Te()), P(this, "eye", new $()), P(this, "camera", null), P(this, "enabled", !0), P(this, "axis", null), P(this, "mode", "translate"), P(this, "space", "world"), P(this, "size", 1), P(this, "dragging", !1), P(this, "showX", !0), P(this, "showY", !0), P(this, "showZ", !0), P(this, "updateMatrixWorld", () => {
|
|
@@ -545,16 +545,16 @@ class hp extends un {
|
|
|
545
545
|
I.color.set(7895160);
|
|
546
546
|
const D = N.clone();
|
|
547
547
|
D.opacity = 0.25;
|
|
548
|
-
const Y = new yt(0, 0.05, 0.2, 12, 1, !1), G = new In(0.125, 0.125, 0.125), F = new
|
|
549
|
-
F.setAttribute("position", new
|
|
548
|
+
const Y = new yt(0, 0.05, 0.2, 12, 1, !1), G = new In(0.125, 0.125, 0.125), F = new jt();
|
|
549
|
+
F.setAttribute("position", new zt([0, 0, 0, 1, 0, 0], 3));
|
|
550
550
|
const B = (fe, oe) => {
|
|
551
|
-
const ne = new
|
|
551
|
+
const ne = new jt(), ge = [];
|
|
552
552
|
for (let A = 0; A <= 64 * oe; ++A)
|
|
553
553
|
ge.push(0, Math.cos(A / 32 * Math.PI) * fe, Math.sin(A / 32 * Math.PI) * fe);
|
|
554
|
-
return ne.setAttribute("position", new
|
|
554
|
+
return ne.setAttribute("position", new zt(ge, 3)), ne;
|
|
555
555
|
}, H = () => {
|
|
556
|
-
const fe = new
|
|
557
|
-
return fe.setAttribute("position", new
|
|
556
|
+
const fe = new jt();
|
|
557
|
+
return fe.setAttribute("position", new zt([0, 0, 0, 1, 1, 1], 3)), fe;
|
|
558
558
|
}, K = {
|
|
559
559
|
X: [[new Z(Y, c), [1, 0, 0], [0, 0, -Math.PI / 2], null, "fwd"], [new Z(Y, c), [1, 0, 0], [0, 0, Math.PI / 2], null, "bwd"], [new ue(F, C)]],
|
|
560
560
|
Y: [[new Z(Y, p), [0, 1, 0], null, null, "fwd"], [new Z(Y, p), [0, 1, 0], [Math.PI, 0, 0], null, "bwd"], [new ue(F, L), null, [0, 0, Math.PI / 2]]],
|
|
@@ -631,7 +631,7 @@ class hp extends un {
|
|
|
631
631
|
}
|
|
632
632
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
|
633
633
|
}
|
|
634
|
-
class
|
|
634
|
+
class mp extends Z {
|
|
635
635
|
constructor() {
|
|
636
636
|
super(new Nn(1e5, 1e5, 2, 2), new zn({
|
|
637
637
|
visible: !1,
|
|
@@ -678,22 +678,22 @@ class dp extends Z {
|
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
const ui = new Fn(0, 0, 0, "YXZ"), pi = new $(),
|
|
681
|
+
const ui = new Fn(0, 0, 0, "YXZ"), pi = new $(), fp = {
|
|
682
682
|
type: "change"
|
|
683
|
-
}, fp = {
|
|
684
|
-
type: "lock"
|
|
685
683
|
}, vp = {
|
|
684
|
+
type: "lock"
|
|
685
|
+
}, bp = {
|
|
686
686
|
type: "unlock"
|
|
687
687
|
}, da = Math.PI / 2;
|
|
688
|
-
class
|
|
688
|
+
class gp extends Ma {
|
|
689
689
|
constructor(i, r) {
|
|
690
690
|
super(), P(this, "camera", void 0), P(this, "domElement", void 0), P(this, "isLocked", void 0), P(this, "minPolarAngle", void 0), P(this, "maxPolarAngle", void 0), P(this, "pointerSpeed", void 0), P(this, "onMouseMove", (s) => {
|
|
691
691
|
if (!this.domElement || this.isLocked === !1)
|
|
692
692
|
return;
|
|
693
693
|
const o = s.movementX || s.mozMovementX || s.webkitMovementX || 0, c = s.movementY || s.mozMovementY || s.webkitMovementY || 0;
|
|
694
|
-
ui.setFromQuaternion(this.camera.quaternion), ui.y -= o * 2e-3 * this.pointerSpeed, ui.x -= c * 2e-3 * this.pointerSpeed, ui.x = Math.max(da - this.maxPolarAngle, Math.min(da - this.minPolarAngle, ui.x)), this.camera.quaternion.setFromEuler(ui), this.dispatchEvent(
|
|
694
|
+
ui.setFromQuaternion(this.camera.quaternion), ui.y -= o * 2e-3 * this.pointerSpeed, ui.x -= c * 2e-3 * this.pointerSpeed, ui.x = Math.max(da - this.maxPolarAngle, Math.min(da - this.minPolarAngle, ui.x)), this.camera.quaternion.setFromEuler(ui), this.dispatchEvent(fp);
|
|
695
695
|
}), P(this, "onPointerlockChange", () => {
|
|
696
|
-
this.domElement && (this.domElement.ownerDocument.pointerLockElement === this.domElement ? (this.dispatchEvent(
|
|
696
|
+
this.domElement && (this.domElement.ownerDocument.pointerLockElement === this.domElement ? (this.dispatchEvent(vp), this.isLocked = !0) : (this.dispatchEvent(bp), this.isLocked = !1));
|
|
697
697
|
}), P(this, "onPointerlockError", () => {
|
|
698
698
|
console.error("THREE.PointerLockControls: Unable to use Pointer Lock API");
|
|
699
699
|
}), P(this, "connect", (s) => {
|
|
@@ -920,7 +920,7 @@ class Ya extends Ma {
|
|
|
920
920
|
if (B.length == 1)
|
|
921
921
|
R.set(M.pageX, M.pageY);
|
|
922
922
|
else {
|
|
923
|
-
const W =
|
|
923
|
+
const W = Lt(M), ie = 0.5 * (M.pageX + W.x), Ee = 0.5 * (M.pageY + W.y);
|
|
924
924
|
R.set(ie, Ee);
|
|
925
925
|
}
|
|
926
926
|
O.subVectors(R, S).multiplyScalar(s.rotateSpeed);
|
|
@@ -931,16 +931,16 @@ class Ya extends Ma {
|
|
|
931
931
|
if (B.length == 1)
|
|
932
932
|
I.set(M.pageX, M.pageY);
|
|
933
933
|
else {
|
|
934
|
-
const U =
|
|
934
|
+
const U = Lt(M), W = 0.5 * (M.pageX + U.x), ie = 0.5 * (M.pageY + U.y);
|
|
935
935
|
I.set(W, ie);
|
|
936
936
|
}
|
|
937
937
|
D.subVectors(I, N).multiplyScalar(s.panSpeed), he(D.x, D.y), N.copy(I);
|
|
938
938
|
}
|
|
939
939
|
function vt(M) {
|
|
940
|
-
const U =
|
|
940
|
+
const U = Lt(M), W = M.pageX - U.x, ie = M.pageY - U.y, Ee = Math.sqrt(W * W + ie * ie);
|
|
941
941
|
G.set(0, Ee), F.set(0, Math.pow(G.y / Y.y, s.zoomSpeed)), ee(F.y), Y.copy(G);
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function Mt(M) {
|
|
944
944
|
s.enableZoom && vt(M), s.enablePan && hn(M);
|
|
945
945
|
}
|
|
946
946
|
function Ke(M) {
|
|
@@ -952,7 +952,7 @@ class Ya extends Ma {
|
|
|
952
952
|
var U, W;
|
|
953
953
|
(U = s.domElement) === null || U === void 0 || U.ownerDocument.addEventListener("pointermove", dn), (W = s.domElement) === null || W === void 0 || W.ownerDocument.addEventListener("pointerup", bt);
|
|
954
954
|
}
|
|
955
|
-
Yn(M), M.pointerType === "touch" ?
|
|
955
|
+
Yn(M), M.pointerType === "touch" ? St(M) : bi(M);
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
function dn(M) {
|
|
@@ -1042,7 +1042,7 @@ class Ya extends Ma {
|
|
|
1042
1042
|
function Ct(M) {
|
|
1043
1043
|
s.enabled === !1 || s.enablePan === !1 || Ne(M);
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function St(M) {
|
|
1046
1046
|
switch (gt(M), B.length) {
|
|
1047
1047
|
case 1:
|
|
1048
1048
|
switch (s.touches.ONE) {
|
|
@@ -1096,7 +1096,7 @@ class Ya extends Ma {
|
|
|
1096
1096
|
case h.TOUCH_DOLLY_PAN:
|
|
1097
1097
|
if (s.enableZoom === !1 && s.enablePan === !1)
|
|
1098
1098
|
return;
|
|
1099
|
-
|
|
1099
|
+
Mt(M), s.update();
|
|
1100
1100
|
break;
|
|
1101
1101
|
case h.TOUCH_DOLLY_ROTATE:
|
|
1102
1102
|
if (s.enableZoom === !1 && s.enableRotate === !1)
|
|
@@ -1125,48 +1125,48 @@ class Ya extends Ma {
|
|
|
1125
1125
|
let U = H[M.pointerId];
|
|
1126
1126
|
U === void 0 && (U = new ht(), H[M.pointerId] = U), U.set(M.pageX, M.pageY);
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function Lt(M) {
|
|
1129
1129
|
const U = M.pointerId === B[0].pointerId ? B[1] : B[0];
|
|
1130
1130
|
return H[U.pointerId];
|
|
1131
1131
|
}
|
|
1132
1132
|
r !== void 0 && this.connect(r), this.update();
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
|
-
class
|
|
1135
|
+
class _p extends Ya {
|
|
1136
1136
|
constructor(i, r) {
|
|
1137
1137
|
super(i, r), this.screenSpacePanning = !1, this.mouseButtons.LEFT = rn.PAN, this.mouseButtons.RIGHT = rn.ROTATE, this.touches.ONE = on.PAN, this.touches.TWO = on.DOLLY_ROTATE;
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
|
-
class
|
|
1140
|
+
class wp extends Ks {
|
|
1141
1141
|
constructor(i) {
|
|
1142
1142
|
super(i), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(r) {
|
|
1143
|
-
return new
|
|
1144
|
-
}), this.register(function(r) {
|
|
1145
|
-
return new Lp(r);
|
|
1143
|
+
return new Pp(r);
|
|
1146
1144
|
}), this.register(function(r) {
|
|
1147
1145
|
return new Rp(r);
|
|
1148
1146
|
}), this.register(function(r) {
|
|
1149
1147
|
return new Vp(r);
|
|
1150
1148
|
}), this.register(function(r) {
|
|
1151
|
-
return new
|
|
1149
|
+
return new Ip(r);
|
|
1152
1150
|
}), this.register(function(r) {
|
|
1153
1151
|
return new kp(r);
|
|
1154
1152
|
}), this.register(function(r) {
|
|
1155
1153
|
return new Ap(r);
|
|
1156
1154
|
}), this.register(function(r) {
|
|
1157
1155
|
return new Mp(r);
|
|
1158
|
-
}), this.register(function(r) {
|
|
1159
|
-
return new Ep(r);
|
|
1160
1156
|
}), this.register(function(r) {
|
|
1161
1157
|
return new Sp(r);
|
|
1162
1158
|
}), this.register(function(r) {
|
|
1163
|
-
return new
|
|
1159
|
+
return new Cp(r);
|
|
1160
|
+
}), this.register(function(r) {
|
|
1161
|
+
return new Lp(r);
|
|
1164
1162
|
}), this.register(function(r) {
|
|
1165
|
-
return new
|
|
1163
|
+
return new Tp(r);
|
|
1166
1164
|
}), this.register(function(r) {
|
|
1167
|
-
return new
|
|
1165
|
+
return new xp(r);
|
|
1168
1166
|
}), this.register(function(r) {
|
|
1169
1167
|
return new Dp(r);
|
|
1168
|
+
}), this.register(function(r) {
|
|
1169
|
+
return new Op(r);
|
|
1170
1170
|
});
|
|
1171
1171
|
}
|
|
1172
1172
|
load(i, r, s, o) {
|
|
@@ -1212,7 +1212,7 @@ class _p extends Ks {
|
|
|
1212
1212
|
else if (i instanceof ArrayBuffer)
|
|
1213
1213
|
if (m.decode(new Uint8Array(i, 0, 4)) === qa) {
|
|
1214
1214
|
try {
|
|
1215
|
-
p[le.KHR_BINARY_GLTF] = new
|
|
1215
|
+
p[le.KHR_BINARY_GLTF] = new Np(i);
|
|
1216
1216
|
} catch (w) {
|
|
1217
1217
|
o && o(w);
|
|
1218
1218
|
return;
|
|
@@ -1226,7 +1226,7 @@ class _p extends Ks {
|
|
|
1226
1226
|
o && o(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
|
|
1227
1227
|
return;
|
|
1228
1228
|
}
|
|
1229
|
-
const g = new
|
|
1229
|
+
const g = new Qp(c, {
|
|
1230
1230
|
path: r || this.resourcePath || "",
|
|
1231
1231
|
crossOrigin: this.crossOrigin,
|
|
1232
1232
|
requestHeader: this.requestHeader,
|
|
@@ -1244,16 +1244,16 @@ class _p extends Ks {
|
|
|
1244
1244
|
const w = c.extensionsUsed[_], y = c.extensionsRequired || [];
|
|
1245
1245
|
switch (w) {
|
|
1246
1246
|
case le.KHR_MATERIALS_UNLIT:
|
|
1247
|
-
p[w] = new
|
|
1247
|
+
p[w] = new Ep();
|
|
1248
1248
|
break;
|
|
1249
1249
|
case le.KHR_DRACO_MESH_COMPRESSION:
|
|
1250
|
-
p[w] = new
|
|
1250
|
+
p[w] = new Bp(c, this.dracoLoader);
|
|
1251
1251
|
break;
|
|
1252
1252
|
case le.KHR_TEXTURE_TRANSFORM:
|
|
1253
|
-
p[w] = new
|
|
1253
|
+
p[w] = new Fp();
|
|
1254
1254
|
break;
|
|
1255
1255
|
case le.KHR_MESH_QUANTIZATION:
|
|
1256
|
-
p[w] = new
|
|
1256
|
+
p[w] = new zp();
|
|
1257
1257
|
break;
|
|
1258
1258
|
default:
|
|
1259
1259
|
y.indexOf(w) >= 0 && h[w] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + w + '".');
|
|
@@ -1268,7 +1268,7 @@ class _p extends Ks {
|
|
|
1268
1268
|
});
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function yp() {
|
|
1272
1272
|
let f = {};
|
|
1273
1273
|
return {
|
|
1274
1274
|
get: function(i) {
|
|
@@ -1306,7 +1306,7 @@ const le = {
|
|
|
1306
1306
|
EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
|
|
1307
1307
|
EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
|
|
1308
1308
|
};
|
|
1309
|
-
class
|
|
1309
|
+
class xp {
|
|
1310
1310
|
constructor(i) {
|
|
1311
1311
|
this.parser = i, this.name = le.KHR_LIGHTS_PUNCTUAL, this.cache = {
|
|
1312
1312
|
refs: {},
|
|
@@ -1356,7 +1356,7 @@ class yp {
|
|
|
1356
1356
|
});
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
|
-
class
|
|
1359
|
+
class Ep {
|
|
1360
1360
|
constructor() {
|
|
1361
1361
|
this.name = le.KHR_MATERIALS_UNLIT;
|
|
1362
1362
|
}
|
|
@@ -1372,12 +1372,12 @@ class xp {
|
|
|
1372
1372
|
const p = c.baseColorFactor;
|
|
1373
1373
|
i.color.fromArray(p), i.opacity = p[3];
|
|
1374
1374
|
}
|
|
1375
|
-
c.baseColorTexture !== void 0 && o.push(s.assignTexture(i, "map", c.baseColorTexture,
|
|
1375
|
+
c.baseColorTexture !== void 0 && o.push(s.assignTexture(i, "map", c.baseColorTexture, Ut));
|
|
1376
1376
|
}
|
|
1377
1377
|
return Promise.all(o);
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
|
-
class
|
|
1380
|
+
class Cp {
|
|
1381
1381
|
constructor(i) {
|
|
1382
1382
|
this.parser = i, this.name = le.KHR_MATERIALS_EMISSIVE_STRENGTH;
|
|
1383
1383
|
}
|
|
@@ -1389,7 +1389,7 @@ class Ep {
|
|
|
1389
1389
|
return c !== void 0 && (r.emissiveIntensity = c), Promise.resolve();
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
|
-
class
|
|
1392
|
+
class Pp {
|
|
1393
1393
|
constructor(i) {
|
|
1394
1394
|
this.parser = i, this.name = le.KHR_MATERIALS_CLEARCOAT;
|
|
1395
1395
|
}
|
|
@@ -1409,7 +1409,7 @@ class Cp {
|
|
|
1409
1409
|
return Promise.all(c);
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
|
-
class
|
|
1412
|
+
class Tp {
|
|
1413
1413
|
constructor(i) {
|
|
1414
1414
|
this.parser = i, this.name = le.KHR_MATERIALS_IRIDESCENCE;
|
|
1415
1415
|
}
|
|
@@ -1425,7 +1425,7 @@ class Pp {
|
|
|
1425
1425
|
return p.iridescenceFactor !== void 0 && (r.iridescence = p.iridescenceFactor), p.iridescenceTexture !== void 0 && c.push(s.assignTexture(r, "iridescenceMap", p.iridescenceTexture)), p.iridescenceIor !== void 0 && (r.iridescenceIOR = p.iridescenceIor), r.iridescenceThicknessRange === void 0 && (r.iridescenceThicknessRange = [100, 400]), p.iridescenceThicknessMinimum !== void 0 && (r.iridescenceThicknessRange[0] = p.iridescenceThicknessMinimum), p.iridescenceThicknessMaximum !== void 0 && (r.iridescenceThicknessRange[1] = p.iridescenceThicknessMaximum), p.iridescenceThicknessTexture !== void 0 && c.push(s.assignTexture(r, "iridescenceThicknessMap", p.iridescenceThicknessTexture)), Promise.all(c);
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
|
-
class
|
|
1428
|
+
class kp {
|
|
1429
1429
|
constructor(i) {
|
|
1430
1430
|
this.parser = i, this.name = le.KHR_MATERIALS_SHEEN;
|
|
1431
1431
|
}
|
|
@@ -1440,10 +1440,10 @@ class Tp {
|
|
|
1440
1440
|
const c = [];
|
|
1441
1441
|
r.sheenColor = new Be(0, 0, 0), r.sheenRoughness = 0, r.sheen = 1;
|
|
1442
1442
|
const p = o.extensions[this.name];
|
|
1443
|
-
return p.sheenColorFactor !== void 0 && r.sheenColor.fromArray(p.sheenColorFactor), p.sheenRoughnessFactor !== void 0 && (r.sheenRoughness = p.sheenRoughnessFactor), p.sheenColorTexture !== void 0 && c.push(s.assignTexture(r, "sheenColorMap", p.sheenColorTexture,
|
|
1443
|
+
return p.sheenColorFactor !== void 0 && r.sheenColor.fromArray(p.sheenColorFactor), p.sheenRoughnessFactor !== void 0 && (r.sheenRoughness = p.sheenRoughnessFactor), p.sheenColorTexture !== void 0 && c.push(s.assignTexture(r, "sheenColorMap", p.sheenColorTexture, Ut)), p.sheenRoughnessTexture !== void 0 && c.push(s.assignTexture(r, "sheenRoughnessMap", p.sheenRoughnessTexture)), Promise.all(c);
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
|
-
class
|
|
1446
|
+
class Ap {
|
|
1447
1447
|
constructor(i) {
|
|
1448
1448
|
this.parser = i, this.name = le.KHR_MATERIALS_TRANSMISSION;
|
|
1449
1449
|
}
|
|
@@ -1459,7 +1459,7 @@ class kp {
|
|
|
1459
1459
|
return p.transmissionFactor !== void 0 && (r.transmission = p.transmissionFactor), p.transmissionTexture !== void 0 && c.push(s.assignTexture(r, "transmissionMap", p.transmissionTexture)), Promise.all(c);
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
|
-
class
|
|
1462
|
+
class Mp {
|
|
1463
1463
|
constructor(i) {
|
|
1464
1464
|
this.parser = i, this.name = le.KHR_MATERIALS_VOLUME;
|
|
1465
1465
|
}
|
|
@@ -1477,7 +1477,7 @@ class Ap {
|
|
|
1477
1477
|
return r.attenuationColor = new Be(h[0], h[1], h[2]), Promise.all(c);
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
|
-
class
|
|
1480
|
+
class Sp {
|
|
1481
1481
|
constructor(i) {
|
|
1482
1482
|
this.parser = i, this.name = le.KHR_MATERIALS_IOR;
|
|
1483
1483
|
}
|
|
@@ -1493,7 +1493,7 @@ class Mp {
|
|
|
1493
1493
|
return r.ior = c.ior !== void 0 ? c.ior : 1.5, Promise.resolve();
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
|
-
class
|
|
1496
|
+
class Lp {
|
|
1497
1497
|
constructor(i) {
|
|
1498
1498
|
this.parser = i, this.name = le.KHR_MATERIALS_SPECULAR;
|
|
1499
1499
|
}
|
|
@@ -1508,10 +1508,10 @@ class Sp {
|
|
|
1508
1508
|
const c = [], p = o.extensions[this.name];
|
|
1509
1509
|
r.specularIntensity = p.specularFactor !== void 0 ? p.specularFactor : 1, p.specularTexture !== void 0 && c.push(s.assignTexture(r, "specularIntensityMap", p.specularTexture));
|
|
1510
1510
|
const h = p.specularColorFactor || [1, 1, 1];
|
|
1511
|
-
return r.specularColor = new Be(h[0], h[1], h[2]), p.specularColorTexture !== void 0 && c.push(s.assignTexture(r, "specularColorMap", p.specularColorTexture,
|
|
1511
|
+
return r.specularColor = new Be(h[0], h[1], h[2]), p.specularColorTexture !== void 0 && c.push(s.assignTexture(r, "specularColorMap", p.specularColorTexture, Ut)), Promise.all(c);
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
|
-
class
|
|
1514
|
+
class Rp {
|
|
1515
1515
|
constructor(i) {
|
|
1516
1516
|
this.parser = i, this.name = le.KHR_TEXTURE_BASISU;
|
|
1517
1517
|
}
|
|
@@ -1528,7 +1528,7 @@ class Lp {
|
|
|
1528
1528
|
return r.loadTextureImage(i, c.source, p);
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
|
-
class
|
|
1531
|
+
class Vp {
|
|
1532
1532
|
constructor(i) {
|
|
1533
1533
|
this.parser = i, this.name = le.EXT_TEXTURE_WEBP, this.isSupported = null;
|
|
1534
1534
|
}
|
|
@@ -1559,7 +1559,7 @@ class Rp {
|
|
|
1559
1559
|
})), this.isSupported;
|
|
1560
1560
|
}
|
|
1561
1561
|
}
|
|
1562
|
-
class
|
|
1562
|
+
class Ip {
|
|
1563
1563
|
constructor(i) {
|
|
1564
1564
|
this.parser = i, this.name = le.EXT_TEXTURE_AVIF, this.isSupported = null;
|
|
1565
1565
|
}
|
|
@@ -1590,7 +1590,7 @@ class Vp {
|
|
|
1590
1590
|
})), this.isSupported;
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
|
-
class
|
|
1593
|
+
class Dp {
|
|
1594
1594
|
constructor(i) {
|
|
1595
1595
|
this.name = le.EXT_MESHOPT_COMPRESSION, this.parser = i;
|
|
1596
1596
|
}
|
|
@@ -1616,7 +1616,7 @@ class Ip {
|
|
|
1616
1616
|
return null;
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
|
-
class
|
|
1619
|
+
class Op {
|
|
1620
1620
|
constructor(i) {
|
|
1621
1621
|
this.name = le.EXT_MESH_GPU_INSTANCING, this.parser = i;
|
|
1622
1622
|
}
|
|
@@ -1649,7 +1649,7 @@ const qa = "glTF", Yi = 12, fa = {
|
|
|
1649
1649
|
JSON: 1313821514,
|
|
1650
1650
|
BIN: 5130562
|
|
1651
1651
|
};
|
|
1652
|
-
class
|
|
1652
|
+
class Np {
|
|
1653
1653
|
constructor(i) {
|
|
1654
1654
|
this.name = le.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
1655
1655
|
const r = new DataView(i, 0, Yi), s = new TextDecoder();
|
|
@@ -1680,7 +1680,7 @@ class Op {
|
|
|
1680
1680
|
throw new Error("THREE.GLTFLoader: JSON content not found.");
|
|
1681
1681
|
}
|
|
1682
1682
|
}
|
|
1683
|
-
class
|
|
1683
|
+
class Bp {
|
|
1684
1684
|
constructor(i, r) {
|
|
1685
1685
|
if (!r)
|
|
1686
1686
|
throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
|
|
@@ -1712,7 +1712,7 @@ class Np {
|
|
|
1712
1712
|
});
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
|
-
class
|
|
1715
|
+
class Fp {
|
|
1716
1716
|
constructor() {
|
|
1717
1717
|
this.name = le.KHR_TEXTURE_TRANSFORM;
|
|
1718
1718
|
}
|
|
@@ -1720,7 +1720,7 @@ class Bp {
|
|
|
1720
1720
|
return (r.texCoord === void 0 || r.texCoord === i.channel) && r.offset === void 0 && r.rotation === void 0 && r.scale === void 0 || (i = i.clone(), r.texCoord !== void 0 && (i.channel = r.texCoord), r.offset !== void 0 && i.offset.fromArray(r.offset), r.rotation !== void 0 && (i.rotation = r.rotation), r.scale !== void 0 && i.repeat.fromArray(r.scale), i.needsUpdate = !0), i;
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
|
-
class
|
|
1723
|
+
class zp {
|
|
1724
1724
|
constructor() {
|
|
1725
1725
|
this.name = le.KHR_MESH_QUANTIZATION;
|
|
1726
1726
|
}
|
|
@@ -1744,11 +1744,11 @@ class Qa extends Du {
|
|
|
1744
1744
|
return c;
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
|
-
const
|
|
1748
|
-
class
|
|
1747
|
+
const jp = new Te();
|
|
1748
|
+
class Up extends Qa {
|
|
1749
1749
|
interpolate_(i, r, s, o) {
|
|
1750
1750
|
const c = super.interpolate_(i, r, s, o);
|
|
1751
|
-
return
|
|
1751
|
+
return jp.fromArray(c).normalize().toArray(c), c;
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
const dt = {
|
|
@@ -1811,7 +1811,7 @@ const dt = {
|
|
|
1811
1811
|
translation: "position",
|
|
1812
1812
|
rotation: "quaternion",
|
|
1813
1813
|
weights: "morphTargetInfluences"
|
|
1814
|
-
},
|
|
1814
|
+
}, Gp = {
|
|
1815
1815
|
CUBICSPLINE: void 0,
|
|
1816
1816
|
// We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
|
|
1817
1817
|
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
@@ -1822,7 +1822,7 @@ const dt = {
|
|
|
1822
1822
|
MASK: "MASK",
|
|
1823
1823
|
BLEND: "BLEND"
|
|
1824
1824
|
};
|
|
1825
|
-
function
|
|
1825
|
+
function Hp(f) {
|
|
1826
1826
|
return f.DefaultMaterial === void 0 && (f.DefaultMaterial = new Po({
|
|
1827
1827
|
color: 16777215,
|
|
1828
1828
|
emissive: 0,
|
|
@@ -1840,7 +1840,7 @@ function qi(f, i, r) {
|
|
|
1840
1840
|
function ln(f, i) {
|
|
1841
1841
|
i.extras !== void 0 && (typeof i.extras == "object" ? Object.assign(f.userData, i.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + i.extras));
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function Kp(f, i, r) {
|
|
1844
1844
|
let s = !1, o = !1, c = !1;
|
|
1845
1845
|
for (let g = 0, _ = i.length; g < _; g++) {
|
|
1846
1846
|
const w = i[g];
|
|
@@ -1870,7 +1870,7 @@ function Hp(f, i, r) {
|
|
|
1870
1870
|
return s && (f.morphAttributes.position = _), o && (f.morphAttributes.normal = w), c && (f.morphAttributes.color = y), f.morphTargetsRelative = !0, f;
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function $p(f, i) {
|
|
1874
1874
|
if (f.updateMorphTargets(), i.weights !== void 0)
|
|
1875
1875
|
for (let r = 0, s = i.weights.length; r < s; r++)
|
|
1876
1876
|
f.morphTargetInfluences[r] = i.weights[r];
|
|
@@ -1884,7 +1884,7 @@ function Kp(f, i) {
|
|
|
1884
1884
|
console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1887
|
+
function Xp(f) {
|
|
1888
1888
|
const i = f.extensions && f.extensions[le.KHR_DRACO_MESH_COMPRESSION];
|
|
1889
1889
|
let r;
|
|
1890
1890
|
return i ? r = "draco:" + i.bufferView + ":" + i.indices + ":" + ga(i.attributes) : r = f.indices + ":" + ga(f.attributes) + ":" + f.mode, r;
|
|
@@ -1910,13 +1910,13 @@ function go(f) {
|
|
|
1910
1910
|
throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
|
-
function
|
|
1913
|
+
function Yp(f) {
|
|
1914
1914
|
return f.search(/\.jpe?g($|\?)/i) > 0 || f.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : f.search(/\.webp($|\?)/i) > 0 || f.search(/^data\:image\/webp/) === 0 ? "image/webp" : "image/png";
|
|
1915
1915
|
}
|
|
1916
|
-
const
|
|
1917
|
-
class
|
|
1916
|
+
const qp = new ye();
|
|
1917
|
+
class Qp {
|
|
1918
1918
|
constructor(i = {}, r = {}) {
|
|
1919
|
-
this.json = i, this.extensions = {}, this.plugins = {}, this.options = r, this.cache = new
|
|
1919
|
+
this.json = i, this.extensions = {}, this.plugins = {}, this.options = r, this.cache = new yp(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = {
|
|
1920
1920
|
refs: {},
|
|
1921
1921
|
uses: {}
|
|
1922
1922
|
}, this.cameraCache = {
|
|
@@ -2218,7 +2218,7 @@ class qp {
|
|
|
2218
2218
|
}), r.load(mi.resolveURL(w, c.path), L, void 0, C);
|
|
2219
2219
|
});
|
|
2220
2220
|
}).then(function(w) {
|
|
2221
|
-
return g === !0 && h.revokeObjectURL(m), w.userData.mimeType = p.mimeType ||
|
|
2221
|
+
return g === !0 && h.revokeObjectURL(m), w.userData.mimeType = p.mimeType || Yp(p.uri), w;
|
|
2222
2222
|
}).catch(function(w) {
|
|
2223
2223
|
throw console.error("THREE.GLTFLoader: Couldn't load texture", m), w;
|
|
2224
2224
|
});
|
|
@@ -2296,7 +2296,7 @@ class qp {
|
|
|
2296
2296
|
const y = w.baseColorFactor;
|
|
2297
2297
|
h.color.fromArray(y), h.opacity = y[3];
|
|
2298
2298
|
}
|
|
2299
|
-
w.baseColorTexture !== void 0 && g.push(r.assignTexture(h, "map", w.baseColorTexture,
|
|
2299
|
+
w.baseColorTexture !== void 0 && g.push(r.assignTexture(h, "map", w.baseColorTexture, Ut)), h.metalness = w.metallicFactor !== void 0 ? w.metallicFactor : 1, h.roughness = w.roughnessFactor !== void 0 ? w.roughnessFactor : 1, w.metallicRoughnessTexture !== void 0 && (g.push(r.assignTexture(h, "metalnessMap", w.metallicRoughnessTexture)), g.push(r.assignTexture(h, "roughnessMap", w.metallicRoughnessTexture))), p = this._invokeOne(function(y) {
|
|
2300
2300
|
return y.getMaterialType && y.getMaterialType(i);
|
|
2301
2301
|
}), g.push(Promise.all(this._invokeAll(function(y) {
|
|
2302
2302
|
return y.extendMaterialParams && y.extendMaterialParams(i, h);
|
|
@@ -2308,7 +2308,7 @@ class qp {
|
|
|
2308
2308
|
const w = c.normalTexture.scale;
|
|
2309
2309
|
h.normalScale.set(w, w);
|
|
2310
2310
|
}
|
|
2311
|
-
return c.occlusionTexture !== void 0 && p !== zn && (g.push(r.assignTexture(h, "aoMap", c.occlusionTexture)), c.occlusionTexture.strength !== void 0 && (h.aoMapIntensity = c.occlusionTexture.strength)), c.emissiveFactor !== void 0 && p !== zn && (h.emissive = new Be().fromArray(c.emissiveFactor)), c.emissiveTexture !== void 0 && p !== zn && g.push(r.assignTexture(h, "emissiveMap", c.emissiveTexture,
|
|
2311
|
+
return c.occlusionTexture !== void 0 && p !== zn && (g.push(r.assignTexture(h, "aoMap", c.occlusionTexture)), c.occlusionTexture.strength !== void 0 && (h.aoMapIntensity = c.occlusionTexture.strength)), c.emissiveFactor !== void 0 && p !== zn && (h.emissive = new Be().fromArray(c.emissiveFactor)), c.emissiveTexture !== void 0 && p !== zn && g.push(r.assignTexture(h, "emissiveMap", c.emissiveTexture, Ut)), Promise.all(g).then(function() {
|
|
2312
2312
|
const w = new p(h);
|
|
2313
2313
|
return c.name && (w.name = c.name), ln(w, c), r.associations.set(w, {
|
|
2314
2314
|
materials: i
|
|
@@ -2340,12 +2340,12 @@ class qp {
|
|
|
2340
2340
|
}
|
|
2341
2341
|
const p = [];
|
|
2342
2342
|
for (let h = 0, m = i.length; h < m; h++) {
|
|
2343
|
-
const g = i[h], _ =
|
|
2343
|
+
const g = i[h], _ = Xp(g), w = o[_];
|
|
2344
2344
|
if (w)
|
|
2345
2345
|
p.push(w.promise);
|
|
2346
2346
|
else {
|
|
2347
2347
|
let y;
|
|
2348
|
-
g.extensions && g.extensions[le.KHR_DRACO_MESH_COMPRESSION] ? y = c(g) : y = _a(new
|
|
2348
|
+
g.extensions && g.extensions[le.KHR_DRACO_MESH_COMPRESSION] ? y = c(g) : y = _a(new jt(), g, r), o[_] = {
|
|
2349
2349
|
primitive: g,
|
|
2350
2350
|
promise: y
|
|
2351
2351
|
}, p.push(y);
|
|
@@ -2361,7 +2361,7 @@ class qp {
|
|
|
2361
2361
|
loadMesh(i) {
|
|
2362
2362
|
const r = this, s = this.json, o = this.extensions, c = s.meshes[i], p = c.primitives, h = [];
|
|
2363
2363
|
for (let m = 0, g = p.length; m < g; m++) {
|
|
2364
|
-
const _ = p[m].material === void 0 ?
|
|
2364
|
+
const _ = p[m].material === void 0 ? Hp(this.cache) : this.getDependency("material", p[m].material);
|
|
2365
2365
|
h.push(_);
|
|
2366
2366
|
}
|
|
2367
2367
|
return h.push(r.loadGeometries(p)), Promise.all(h).then(function(m) {
|
|
@@ -2382,7 +2382,7 @@ class qp {
|
|
|
2382
2382
|
O = new Pu(S, N);
|
|
2383
2383
|
else
|
|
2384
2384
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + R.mode);
|
|
2385
|
-
Object.keys(O.geometry.morphAttributes).length > 0 &&
|
|
2385
|
+
Object.keys(O.geometry.morphAttributes).length > 0 && $p(O, c), O.name = r.createUniqueName(c.name || "mesh_" + i), ln(O, c), R.extensions && qi(o, O, R), r.assignFinalMaterial(O), w.push(O);
|
|
2386
2386
|
}
|
|
2387
2387
|
for (let C = 0, L = w.length; C < L; C++)
|
|
2388
2388
|
r.associations.set(w[C], {
|
|
@@ -2469,7 +2469,7 @@ class qp {
|
|
|
2469
2469
|
B = Ba;
|
|
2470
2470
|
break;
|
|
2471
2471
|
}
|
|
2472
|
-
const H = I.name ? I.name : I.uuid, K = G.interpolation !== void 0 ?
|
|
2472
|
+
const H = I.name ? I.name : I.uuid, K = G.interpolation !== void 0 ? Gp[G.interpolation] : Oa, q = [];
|
|
2473
2473
|
sn[F.path] === sn.weights ? I.traverse(function(_e) {
|
|
2474
2474
|
_e.morphTargetInfluences && q.push(_e.name ? _e.name : _e.uuid);
|
|
2475
2475
|
}) : q.push(H);
|
|
@@ -2483,7 +2483,7 @@ class qp {
|
|
|
2483
2483
|
for (let _e = 0, ce = q.length; _e < ce; _e++) {
|
|
2484
2484
|
const me = new B(q[_e] + "." + sn[F.path], D.array, pe, K);
|
|
2485
2485
|
G.interpolation === "CUBICSPLINE" && (me.createInterpolant = function(ee) {
|
|
2486
|
-
const X = this instanceof mo ?
|
|
2486
|
+
const X = this instanceof mo ? Up : Qa;
|
|
2487
2487
|
return new X(this.times, this.values, this.getValueSize() / 3, ee);
|
|
2488
2488
|
}, me.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0), R.push(me);
|
|
2489
2489
|
}
|
|
@@ -2515,7 +2515,7 @@ class qp {
|
|
|
2515
2515
|
return Promise.all([c, Promise.all(p), m]).then(function(g) {
|
|
2516
2516
|
const _ = g[0], w = g[1], y = g[2];
|
|
2517
2517
|
y !== null && _.traverse(function(C) {
|
|
2518
|
-
C.isSkinnedMesh && C.bind(y,
|
|
2518
|
+
C.isSkinnedMesh && C.bind(y, qp);
|
|
2519
2519
|
});
|
|
2520
2520
|
for (let C = 0, L = w.length; C < L; C++)
|
|
2521
2521
|
_.add(w[C]);
|
|
@@ -2577,7 +2577,7 @@ class qp {
|
|
|
2577
2577
|
});
|
|
2578
2578
|
}
|
|
2579
2579
|
}
|
|
2580
|
-
function
|
|
2580
|
+
function Zp(f, i, r) {
|
|
2581
2581
|
const s = i.attributes, o = new Vu();
|
|
2582
2582
|
if (s.POSITION !== void 0) {
|
|
2583
2583
|
const h = r.json.accessors[s.POSITION], m = h.min, g = h.max;
|
|
@@ -2632,8 +2632,8 @@ function _a(f, i, r) {
|
|
|
2632
2632
|
});
|
|
2633
2633
|
o.push(p);
|
|
2634
2634
|
}
|
|
2635
|
-
return ln(f, i),
|
|
2636
|
-
return i.targets !== void 0 ?
|
|
2635
|
+
return ln(f, i), Zp(f, i, r), Promise.all(o).then(function() {
|
|
2636
|
+
return i.targets !== void 0 ? Kp(f, i.targets, r) : f;
|
|
2637
2637
|
});
|
|
2638
2638
|
}
|
|
2639
2639
|
class wa extends Ou {
|
|
@@ -2678,7 +2678,7 @@ function Za(f, i, r) {
|
|
|
2678
2678
|
i < r[p] ? c = p : o = p, p = Math.floor((o + c) / 2);
|
|
2679
2679
|
return p;
|
|
2680
2680
|
}
|
|
2681
|
-
function
|
|
2681
|
+
function Wp(f, i, r, s) {
|
|
2682
2682
|
const o = [], c = [], p = [];
|
|
2683
2683
|
o[0] = 1;
|
|
2684
2684
|
for (let h = 1; h <= r; ++h) {
|
|
@@ -2692,15 +2692,15 @@ function Zp(f, i, r, s) {
|
|
|
2692
2692
|
}
|
|
2693
2693
|
return o;
|
|
2694
2694
|
}
|
|
2695
|
-
function
|
|
2696
|
-
const o = Za(f, s, i), c =
|
|
2695
|
+
function Jp(f, i, r, s) {
|
|
2696
|
+
const o = Za(f, s, i), c = Wp(o, s, f, i), p = new $s(0, 0, 0, 0);
|
|
2697
2697
|
for (let h = 0; h <= f; ++h) {
|
|
2698
2698
|
const m = r[o - f + h], g = c[h], _ = m.w * g;
|
|
2699
2699
|
p.x += m.x * _, p.y += m.y * _, p.z += m.z * _, p.w += m.w * g;
|
|
2700
2700
|
}
|
|
2701
2701
|
return p;
|
|
2702
2702
|
}
|
|
2703
|
-
function
|
|
2703
|
+
function eh(f, i, r, s, o) {
|
|
2704
2704
|
const c = [];
|
|
2705
2705
|
for (let y = 0; y <= r; ++y)
|
|
2706
2706
|
c[y] = 0;
|
|
@@ -2751,8 +2751,8 @@ function Jp(f, i, r, s, o) {
|
|
|
2751
2751
|
}
|
|
2752
2752
|
return p;
|
|
2753
2753
|
}
|
|
2754
|
-
function
|
|
2755
|
-
const c = o < f ? o : f, p = [], h = Za(f, s, i), m =
|
|
2754
|
+
function th(f, i, r, s, o) {
|
|
2755
|
+
const c = o < f ? o : f, p = [], h = Za(f, s, i), m = eh(h, s, f, c, i), g = [];
|
|
2756
2756
|
for (let w = 0; w < r.length; ++w) {
|
|
2757
2757
|
var _ = r[w].clone();
|
|
2758
2758
|
const y = _.w;
|
|
@@ -2768,7 +2768,7 @@ function eh(f, i, r, s, o) {
|
|
|
2768
2768
|
p[w] = new $s(0, 0, 0);
|
|
2769
2769
|
return p;
|
|
2770
2770
|
}
|
|
2771
|
-
function
|
|
2771
|
+
function nh(f, i) {
|
|
2772
2772
|
let r = 1;
|
|
2773
2773
|
for (let o = 2; o <= f; ++o)
|
|
2774
2774
|
r *= o;
|
|
@@ -2779,7 +2779,7 @@ function th(f, i) {
|
|
|
2779
2779
|
s *= o;
|
|
2780
2780
|
return r / s;
|
|
2781
2781
|
}
|
|
2782
|
-
function
|
|
2782
|
+
function ih(f) {
|
|
2783
2783
|
const i = f.length, r = [], s = [];
|
|
2784
2784
|
for (let c = 0; c < i; ++c) {
|
|
2785
2785
|
const p = f[c];
|
|
@@ -2789,14 +2789,14 @@ function nh(f) {
|
|
|
2789
2789
|
for (let c = 0; c < i; ++c) {
|
|
2790
2790
|
const p = r[c].clone();
|
|
2791
2791
|
for (let h = 1; h <= c; ++h)
|
|
2792
|
-
p.sub(o[c - h].clone().multiplyScalar(
|
|
2792
|
+
p.sub(o[c - h].clone().multiplyScalar(nh(c, h) * s[h]));
|
|
2793
2793
|
o[c] = p.divideScalar(s[0]);
|
|
2794
2794
|
}
|
|
2795
2795
|
return o;
|
|
2796
2796
|
}
|
|
2797
|
-
function
|
|
2798
|
-
const c =
|
|
2799
|
-
return
|
|
2797
|
+
function sh(f, i, r, s, o) {
|
|
2798
|
+
const c = th(f, i, r, s, o);
|
|
2799
|
+
return ih(c);
|
|
2800
2800
|
}
|
|
2801
2801
|
class ya extends Nu {
|
|
2802
2802
|
constructor(i, r, s, o, c) {
|
|
@@ -2807,16 +2807,16 @@ class ya extends Nu {
|
|
|
2807
2807
|
}
|
|
2808
2808
|
}
|
|
2809
2809
|
getPoint(i, r) {
|
|
2810
|
-
const s = r || new $(), o = this.knots[this.startKnot] + i * (this.knots[this.endKnot] - this.knots[this.startKnot]), c =
|
|
2810
|
+
const s = r || new $(), o = this.knots[this.startKnot] + i * (this.knots[this.endKnot] - this.knots[this.startKnot]), c = Jp(this.degree, this.knots, this.controlPoints, o);
|
|
2811
2811
|
return c.w != 1 && c.divideScalar(c.w), s.set(c.x, c.y, c.z);
|
|
2812
2812
|
}
|
|
2813
2813
|
getTangent(i, r) {
|
|
2814
|
-
const s = r || new $(), o = this.knots[0] + i * (this.knots[this.knots.length - 1] - this.knots[0]), c =
|
|
2814
|
+
const s = r || new $(), o = this.knots[0] + i * (this.knots[this.knots.length - 1] - this.knots[0]), c = sh(this.degree, this.knots, this.controlPoints, o, 1);
|
|
2815
2815
|
return s.copy(c[1]).normalize(), s;
|
|
2816
2816
|
}
|
|
2817
2817
|
}
|
|
2818
2818
|
let se, Ve, tt;
|
|
2819
|
-
class
|
|
2819
|
+
class rh extends Ks {
|
|
2820
2820
|
constructor(i) {
|
|
2821
2821
|
super(i);
|
|
2822
2822
|
}
|
|
@@ -2831,27 +2831,27 @@ class sh extends Ks {
|
|
|
2831
2831
|
}, s, o);
|
|
2832
2832
|
}
|
|
2833
2833
|
parse(i, r) {
|
|
2834
|
-
if (
|
|
2835
|
-
se = new
|
|
2834
|
+
if (ph(i))
|
|
2835
|
+
se = new uh().parse(i);
|
|
2836
2836
|
else {
|
|
2837
2837
|
const o = tl(i);
|
|
2838
|
-
if (!
|
|
2838
|
+
if (!hh(o))
|
|
2839
2839
|
throw new Error("THREE.FBXLoader: Unknown format.");
|
|
2840
2840
|
if (Ea(o) < 7e3)
|
|
2841
2841
|
throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: " + Ea(o));
|
|
2842
|
-
se = new
|
|
2842
|
+
se = new ch().parse(o);
|
|
2843
2843
|
}
|
|
2844
2844
|
const s = new Ra(this.manager).setPath(this.resourcePath || r).setCrossOrigin(this.crossOrigin);
|
|
2845
|
-
return new
|
|
2845
|
+
return new oh(s, this.manager).parse(se);
|
|
2846
2846
|
}
|
|
2847
2847
|
}
|
|
2848
|
-
class
|
|
2848
|
+
class oh {
|
|
2849
2849
|
constructor(i, r) {
|
|
2850
2850
|
this.textureLoader = i, this.manager = r;
|
|
2851
2851
|
}
|
|
2852
2852
|
parse() {
|
|
2853
2853
|
Ve = this.parseConnections();
|
|
2854
|
-
const i = this.parseImages(), r = this.parseTextures(i), s = this.parseMaterials(r), o = this.parseDeformers(), c = new
|
|
2854
|
+
const i = this.parseImages(), r = this.parseTextures(i), s = this.parseMaterials(r), o = this.parseDeformers(), c = new ah().parse(o);
|
|
2855
2855
|
return this.parseScene(o, c, s), tt;
|
|
2856
2856
|
}
|
|
2857
2857
|
// Parses FBXTree.Connections which holds parent-child connections between objects (e.g. material -> texture, model->geometry )
|
|
@@ -3028,23 +3028,23 @@ class rh {
|
|
|
3028
3028
|
break;
|
|
3029
3029
|
case "DiffuseColor":
|
|
3030
3030
|
case "Maya|TEX_color_map":
|
|
3031
|
-
o.map = c.getTexture(r, p.ID), o.map !== void 0 && (o.map.encoding =
|
|
3031
|
+
o.map = c.getTexture(r, p.ID), o.map !== void 0 && (o.map.encoding = Ut);
|
|
3032
3032
|
break;
|
|
3033
3033
|
case "DisplacementColor":
|
|
3034
3034
|
o.displacementMap = c.getTexture(r, p.ID);
|
|
3035
3035
|
break;
|
|
3036
3036
|
case "EmissiveColor":
|
|
3037
|
-
o.emissiveMap = c.getTexture(r, p.ID), o.emissiveMap !== void 0 && (o.emissiveMap.encoding =
|
|
3037
|
+
o.emissiveMap = c.getTexture(r, p.ID), o.emissiveMap !== void 0 && (o.emissiveMap.encoding = Ut);
|
|
3038
3038
|
break;
|
|
3039
3039
|
case "NormalMap":
|
|
3040
3040
|
case "Maya|TEX_normal_map":
|
|
3041
3041
|
o.normalMap = c.getTexture(r, p.ID);
|
|
3042
3042
|
break;
|
|
3043
3043
|
case "ReflectionColor":
|
|
3044
|
-
o.envMap = c.getTexture(r, p.ID), o.envMap !== void 0 && (o.envMap.mapping = za, o.envMap.encoding =
|
|
3044
|
+
o.envMap = c.getTexture(r, p.ID), o.envMap !== void 0 && (o.envMap.mapping = za, o.envMap.encoding = Ut);
|
|
3045
3045
|
break;
|
|
3046
3046
|
case "SpecularColor":
|
|
3047
|
-
o.specularMap = c.getTexture(r, p.ID), o.specularMap !== void 0 && (o.specularMap.encoding =
|
|
3047
|
+
o.specularMap = c.getTexture(r, p.ID), o.specularMap !== void 0 && (o.specularMap.encoding = Ut);
|
|
3048
3048
|
break;
|
|
3049
3049
|
case "TransparentColor":
|
|
3050
3050
|
case "TransparencyFactor":
|
|
@@ -3147,7 +3147,7 @@ class rh {
|
|
|
3147
3147
|
m.applyMatrix4(g), m.updateWorldMatrix();
|
|
3148
3148
|
}
|
|
3149
3149
|
});
|
|
3150
|
-
const h = new
|
|
3150
|
+
const h = new lh().parse();
|
|
3151
3151
|
tt.children.length === 1 && tt.children[0].isGroup && (tt.children[0].animations = h, tt = tt.children[0]), tt.animations = h;
|
|
3152
3152
|
}
|
|
3153
3153
|
// parse nodes in FBXTree.Objects.Model
|
|
@@ -3348,7 +3348,7 @@ class rh {
|
|
|
3348
3348
|
}
|
|
3349
3349
|
}
|
|
3350
3350
|
}
|
|
3351
|
-
class
|
|
3351
|
+
class ah {
|
|
3352
3352
|
// Parse nodes in FBXTree.Objects.Geometry
|
|
3353
3353
|
parse(i) {
|
|
3354
3354
|
const r = /* @__PURE__ */ new Map();
|
|
@@ -3390,16 +3390,16 @@ class oh {
|
|
|
3390
3390
|
}
|
|
3391
3391
|
// Generate a BufferGeometry from a node in FBXTree.Objects.Geometry
|
|
3392
3392
|
genGeometry(i, r, s, o) {
|
|
3393
|
-
const c = new
|
|
3393
|
+
const c = new jt();
|
|
3394
3394
|
i.attrName && (c.name = i.attrName);
|
|
3395
|
-
const p = this.parseGeoNode(i, r), h = this.genBuffers(p), m = new
|
|
3396
|
-
if (m.applyMatrix4(o), c.setAttribute("position", m), h.colors.length > 0 && c.setAttribute("color", new
|
|
3397
|
-
const g = new ju().getNormalMatrix(o), _ = new
|
|
3395
|
+
const p = this.parseGeoNode(i, r), h = this.genBuffers(p), m = new zt(h.vertex, 3);
|
|
3396
|
+
if (m.applyMatrix4(o), c.setAttribute("position", m), h.colors.length > 0 && c.setAttribute("color", new zt(h.colors, 3)), r && (c.setAttribute("skinIndex", new zu(h.weightsIndices, 4)), c.setAttribute("skinWeight", new zt(h.vertexWeights, 4)), c.FBX_Deformer = r), h.normal.length > 0) {
|
|
3397
|
+
const g = new ju().getNormalMatrix(o), _ = new zt(h.normal, 3);
|
|
3398
3398
|
_.applyNormalMatrix(g), c.setAttribute("normal", _);
|
|
3399
3399
|
}
|
|
3400
3400
|
if (h.uvs.forEach(function(g, _) {
|
|
3401
3401
|
let w = "uv" + (_ + 1).toString();
|
|
3402
|
-
_ === 0 && (w = "uv"), c.setAttribute(w, new
|
|
3402
|
+
_ === 0 && (w = "uv"), c.setAttribute(w, new zt(h.uvs[_], 2));
|
|
3403
3403
|
}), p.material && p.material.mappingType !== "AllSame") {
|
|
3404
3404
|
let g = h.materialIndex[0], _ = 0;
|
|
3405
3405
|
if (h.materialIndex.forEach(function(w, y) {
|
|
@@ -3513,7 +3513,7 @@ class oh {
|
|
|
3513
3513
|
const w = {
|
|
3514
3514
|
vertexIndices: p,
|
|
3515
3515
|
vertexPositions: _
|
|
3516
|
-
}, y = this.genBuffers(w), C = new
|
|
3516
|
+
}, y = this.genBuffers(w), C = new zt(y.vertex, 3);
|
|
3517
3517
|
C.name = c || s.attrName, C.applyMatrix4(o), i.morphAttributes.position.push(C);
|
|
3518
3518
|
}
|
|
3519
3519
|
// Parse normal from FBXTree.Objects.Geometry.LayerElementNormal if it exists
|
|
@@ -3577,10 +3577,10 @@ class oh {
|
|
|
3577
3577
|
// Generate a NurbGeometry from a node in FBXTree.Objects.Geometry
|
|
3578
3578
|
parseNurbsGeometry(i) {
|
|
3579
3579
|
if (ya === void 0)
|
|
3580
|
-
return console.error("THREE.FBXLoader: The loader relies on NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."), new
|
|
3580
|
+
return console.error("THREE.FBXLoader: The loader relies on NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."), new jt();
|
|
3581
3581
|
const r = parseInt(i.Order);
|
|
3582
3582
|
if (isNaN(r))
|
|
3583
|
-
return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s", i.Order, i.id), new
|
|
3583
|
+
return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s", i.Order, i.id), new jt();
|
|
3584
3584
|
const s = r - 1, o = i.KnotVector.a, c = [], p = i.Points.a;
|
|
3585
3585
|
for (let w = 0, y = p.length; w < y; w += 4)
|
|
3586
3586
|
c.push(new $s().fromArray(p, w));
|
|
@@ -3593,10 +3593,10 @@ class oh {
|
|
|
3593
3593
|
c.push(c[w]);
|
|
3594
3594
|
}
|
|
3595
3595
|
const _ = new ya(s, o, c, h, m).getPoints(c.length * 12);
|
|
3596
|
-
return new
|
|
3596
|
+
return new jt().setFromPoints(_);
|
|
3597
3597
|
}
|
|
3598
3598
|
}
|
|
3599
|
-
class
|
|
3599
|
+
class lh {
|
|
3600
3600
|
// take raw animation clips and turn them into three.js animation clips
|
|
3601
3601
|
parse() {
|
|
3602
3602
|
const i = [], r = this.parseClips();
|
|
@@ -3641,7 +3641,7 @@ class ah {
|
|
|
3641
3641
|
for (const s in r) {
|
|
3642
3642
|
const o = {
|
|
3643
3643
|
id: r[s].id,
|
|
3644
|
-
times: r[s].KeyTime.a.map(
|
|
3644
|
+
times: r[s].KeyTime.a.map(dh),
|
|
3645
3645
|
values: r[s].KeyValueFloat.a
|
|
3646
3646
|
}, c = Ve.get(o.id);
|
|
3647
3647
|
if (c !== void 0) {
|
|
@@ -3819,7 +3819,7 @@ class ah {
|
|
|
3819
3819
|
}
|
|
3820
3820
|
}
|
|
3821
3821
|
}
|
|
3822
|
-
class
|
|
3822
|
+
class ch {
|
|
3823
3823
|
getPrevNode() {
|
|
3824
3824
|
return this.nodeStack[this.currentIndent - 2];
|
|
3825
3825
|
}
|
|
@@ -3880,7 +3880,7 @@ class lh {
|
|
|
3880
3880
|
let w = c.split(",").slice(3);
|
|
3881
3881
|
w = w.map(function(y) {
|
|
3882
3882
|
return y.trim().replace(/^"/, "");
|
|
3883
|
-
}), o = "connections", c = [g, _],
|
|
3883
|
+
}), o = "connections", c = [g, _], fh(c, w), p[o] === void 0 && (p[o] = []);
|
|
3884
3884
|
}
|
|
3885
3885
|
o === "Node" && (p.id = c), o in p && Array.isArray(p[o]) ? p[o].push(c) : o !== "a" ? p[o] = c : p.a = c, this.setCurrentProp(p, o), o === "a" && c.slice(-1) !== "," && (p.a = ro(c));
|
|
3886
3886
|
}
|
|
@@ -3921,7 +3921,7 @@ class lh {
|
|
|
3921
3921
|
}, this.setCurrentProp(this.getPrevNode(), c);
|
|
3922
3922
|
}
|
|
3923
3923
|
}
|
|
3924
|
-
class
|
|
3924
|
+
class uh {
|
|
3925
3925
|
parse(i) {
|
|
3926
3926
|
const r = new xa(i);
|
|
3927
3927
|
r.skip(23);
|
|
@@ -4023,7 +4023,7 @@ class ch {
|
|
|
4023
4023
|
case "l":
|
|
4024
4024
|
return i.getInt64Array(o);
|
|
4025
4025
|
}
|
|
4026
|
-
const h =
|
|
4026
|
+
const h = cp(new Uint8Array(i.getArrayBuffer(p))), m = new xa(h.buffer);
|
|
4027
4027
|
switch (r) {
|
|
4028
4028
|
case "b":
|
|
4029
4029
|
case "c":
|
|
@@ -4146,11 +4146,11 @@ class Wa {
|
|
|
4146
4146
|
this[i] = r;
|
|
4147
4147
|
}
|
|
4148
4148
|
}
|
|
4149
|
-
function
|
|
4149
|
+
function ph(f) {
|
|
4150
4150
|
const i = "Kaydara FBX Binary \0";
|
|
4151
4151
|
return f.byteLength >= i.length && i === tl(f, 0, i.length);
|
|
4152
4152
|
}
|
|
4153
|
-
function
|
|
4153
|
+
function hh(f) {
|
|
4154
4154
|
const i = ["K", "a", "y", "d", "a", "r", "a", "\\", "F", "B", "X", "\\", "B", "i", "n", "a", "r", "y", "\\", "\\"];
|
|
4155
4155
|
let r = 0;
|
|
4156
4156
|
function s(o) {
|
|
@@ -4168,10 +4168,10 @@ function Ea(f) {
|
|
|
4168
4168
|
return parseInt(r[1]);
|
|
4169
4169
|
throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.");
|
|
4170
4170
|
}
|
|
4171
|
-
function
|
|
4171
|
+
function dh(f) {
|
|
4172
4172
|
return f / 46186158e3;
|
|
4173
4173
|
}
|
|
4174
|
-
const
|
|
4174
|
+
const mh = [];
|
|
4175
4175
|
function zs(f, i, r, s) {
|
|
4176
4176
|
let o;
|
|
4177
4177
|
switch (s.mappingType) {
|
|
@@ -4192,7 +4192,7 @@ function zs(f, i, r, s) {
|
|
|
4192
4192
|
}
|
|
4193
4193
|
s.referenceType === "IndexToDirect" && (o = s.indices[o]);
|
|
4194
4194
|
const c = o * s.dataSize, p = c + s.dataSize;
|
|
4195
|
-
return
|
|
4195
|
+
return vh(mh, s.buffer, c, p);
|
|
4196
4196
|
}
|
|
4197
4197
|
const so = new Fn(), hi = new $();
|
|
4198
4198
|
function Ja(f) {
|
|
@@ -4255,11 +4255,11 @@ function ro(f) {
|
|
|
4255
4255
|
function tl(f, i, r) {
|
|
4256
4256
|
return i === void 0 && (i = 0), r === void 0 && (r = f.byteLength), mi.decodeText(new Uint8Array(f, i, r));
|
|
4257
4257
|
}
|
|
4258
|
-
function
|
|
4258
|
+
function fh(f, i) {
|
|
4259
4259
|
for (let r = 0, s = f.length, o = i.length; r < o; r++, s++)
|
|
4260
4260
|
f[s] = i[r];
|
|
4261
4261
|
}
|
|
4262
|
-
function
|
|
4262
|
+
function vh(f, i, r, s) {
|
|
4263
4263
|
for (let o = r, c = 0; o < s; o++, c++)
|
|
4264
4264
|
f[c] = i[o];
|
|
4265
4265
|
return f;
|
|
@@ -4267,7 +4267,7 @@ function fh(f, i, r, s) {
|
|
|
4267
4267
|
function Ca(f, i, r) {
|
|
4268
4268
|
return f.slice(0, i).concat(r).concat(f.slice(i));
|
|
4269
4269
|
}
|
|
4270
|
-
class
|
|
4270
|
+
class bh extends Ks {
|
|
4271
4271
|
constructor(i) {
|
|
4272
4272
|
super(i);
|
|
4273
4273
|
}
|
|
@@ -4293,7 +4293,7 @@ class To {
|
|
|
4293
4293
|
letterSpacing: 0,
|
|
4294
4294
|
lineHeight: 1,
|
|
4295
4295
|
...s
|
|
4296
|
-
}, p =
|
|
4296
|
+
}, p = gh(i, r, this.data, c);
|
|
4297
4297
|
for (let h = 0, m = p.length; h < m; h++)
|
|
4298
4298
|
Array.prototype.push.apply(o, p[h].toShapes(!1));
|
|
4299
4299
|
return o;
|
|
@@ -4301,7 +4301,7 @@ class To {
|
|
|
4301
4301
|
}
|
|
4302
4302
|
P(To, "isFont", void 0);
|
|
4303
4303
|
P(To, "type", void 0);
|
|
4304
|
-
function
|
|
4304
|
+
function gh(f, i, r, s) {
|
|
4305
4305
|
const o = Array.from(f), c = i / r.resolution, p = (r.boundingBox.yMax - r.boundingBox.yMin + r.underlineThickness) * c, h = [];
|
|
4306
4306
|
let m = 0, g = 0;
|
|
4307
4307
|
for (let _ = 0; _ < o.length; _++) {
|
|
@@ -4310,13 +4310,13 @@ function bh(f, i, r, s) {
|
|
|
4310
4310
|
`)
|
|
4311
4311
|
m = 0, g -= p * s.lineHeight;
|
|
4312
4312
|
else {
|
|
4313
|
-
const y =
|
|
4313
|
+
const y = _h(w, c, m, g, r);
|
|
4314
4314
|
y && (m += y.offsetX + s.letterSpacing, h.push(y.path));
|
|
4315
4315
|
}
|
|
4316
4316
|
}
|
|
4317
4317
|
return h;
|
|
4318
4318
|
}
|
|
4319
|
-
function
|
|
4319
|
+
function _h(f, i, r, s, o) {
|
|
4320
4320
|
const c = o.glyphs[f] || o.glyphs["?"];
|
|
4321
4321
|
if (!c) {
|
|
4322
4322
|
console.error('THREE.Font: character "' + f + '" does not exists in font family ' + o.familyName + ".");
|
|
@@ -4348,10 +4348,10 @@ function gh(f, i, r, s, o) {
|
|
|
4348
4348
|
};
|
|
4349
4349
|
}
|
|
4350
4350
|
var nl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4351
|
-
function
|
|
4351
|
+
function wh(f) {
|
|
4352
4352
|
return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
|
|
4353
4353
|
}
|
|
4354
|
-
class
|
|
4354
|
+
class yh extends Gu {
|
|
4355
4355
|
constructor(i) {
|
|
4356
4356
|
super(i), this.type = Bs;
|
|
4357
4357
|
}
|
|
@@ -4514,7 +4514,7 @@ class wh extends Gu {
|
|
|
4514
4514
|
}
|
|
4515
4515
|
}
|
|
4516
4516
|
const oo = /* @__PURE__ */ new WeakMap();
|
|
4517
|
-
class
|
|
4517
|
+
class xh extends Ks {
|
|
4518
4518
|
constructor(i) {
|
|
4519
4519
|
super(i), this.decoderPath = "", this.decoderConfig = {}, this.decoderBinary = null, this.decoderPending = null, this.workerLimit = 4, this.workerPool = [], this.workerNextTaskID = 1, this.workerSourceURL = "", this.defaultAttributeIDs = {
|
|
4520
4520
|
position: "POSITION",
|
|
@@ -4590,7 +4590,7 @@ class yh extends Ks {
|
|
|
4590
4590
|
}), h;
|
|
4591
4591
|
}
|
|
4592
4592
|
_createGeometry(i) {
|
|
4593
|
-
const r = new
|
|
4593
|
+
const r = new jt();
|
|
4594
4594
|
i.index && r.setIndex(new Zi(i.index.array, 1));
|
|
4595
4595
|
for (let s = 0; s < i.attributes.length; s++) {
|
|
4596
4596
|
const o = i.attributes[s], c = o.name, p = o.array, h = o.itemSize;
|
|
@@ -4614,7 +4614,7 @@ class yh extends Ks {
|
|
|
4614
4614
|
return i ? r.push(this._loadLibrary("draco_decoder.js", "text")) : (r.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), r.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(r).then((s) => {
|
|
4615
4615
|
const o = s[0];
|
|
4616
4616
|
i || (this.decoderConfig.wasmBinary = s[1]);
|
|
4617
|
-
const c =
|
|
4617
|
+
const c = Eh.toString(), p = ["/* draco decoder */", o, "", "/* worker */", c.substring(c.indexOf("{") + 1, c.lastIndexOf("}"))].join(`
|
|
4618
4618
|
`);
|
|
4619
4619
|
this.workerSourceURL = URL.createObjectURL(new Blob([p]));
|
|
4620
4620
|
}), this.decoderPending;
|
|
@@ -4659,7 +4659,7 @@ class yh extends Ks {
|
|
|
4659
4659
|
return this.workerPool.length = 0, this;
|
|
4660
4660
|
}
|
|
4661
4661
|
}
|
|
4662
|
-
function
|
|
4662
|
+
function Eh() {
|
|
4663
4663
|
let f, i;
|
|
4664
4664
|
onmessage = function(p) {
|
|
4665
4665
|
const h = p.data;
|
|
@@ -4775,7 +4775,7 @@ function Et() {
|
|
|
4775
4775
|
extend: r
|
|
4776
4776
|
};
|
|
4777
4777
|
}
|
|
4778
|
-
const
|
|
4778
|
+
const Ch = ["args"], Vd = /* @__PURE__ */ Ce({
|
|
4779
4779
|
__name: "OrbitControls",
|
|
4780
4780
|
props: {
|
|
4781
4781
|
makeDefault: { type: Boolean, default: !1 },
|
|
@@ -4795,10 +4795,10 @@ const Eh = ["args"], Rd = /* @__PURE__ */ Ce({
|
|
|
4795
4795
|
ref_key: "controls",
|
|
4796
4796
|
ref: c,
|
|
4797
4797
|
args: [Se(r).camera || f.camera, ((m = Se(r).renderer) == null ? void 0 : m.domElement) || f.domElement]
|
|
4798
|
-
}, null, 8,
|
|
4798
|
+
}, null, 8, Ch)) : es("", !0);
|
|
4799
4799
|
};
|
|
4800
4800
|
}
|
|
4801
|
-
}),
|
|
4801
|
+
}), Ph = ["args"], Id = /* @__PURE__ */ Ce({
|
|
4802
4802
|
__name: "MapControls",
|
|
4803
4803
|
props: {
|
|
4804
4804
|
makeDefault: { type: Boolean, default: !1 },
|
|
@@ -4807,7 +4807,7 @@ const Eh = ["args"], Rd = /* @__PURE__ */ Ce({
|
|
|
4807
4807
|
},
|
|
4808
4808
|
setup(f) {
|
|
4809
4809
|
const i = f, { state: r, setState: s, extend: o } = Et(), c = nt(null);
|
|
4810
|
-
return o({ MapControls:
|
|
4810
|
+
return o({ MapControls: _p }), vi(c, (p) => {
|
|
4811
4811
|
p && i.makeDefault ? s("controls", p) : s("controls", null);
|
|
4812
4812
|
}), (p, h) => {
|
|
4813
4813
|
var m;
|
|
@@ -4816,7 +4816,7 @@ const Eh = ["args"], Rd = /* @__PURE__ */ Ce({
|
|
|
4816
4816
|
ref_key: "controls",
|
|
4817
4817
|
ref: c,
|
|
4818
4818
|
args: [Se(r).camera || f.camera, ((m = Se(r).renderer) == null ? void 0 : m.domElement) || f.domElement]
|
|
4819
|
-
}, null, 8,
|
|
4819
|
+
}, null, 8, Ph)) : es("", !0);
|
|
4820
4820
|
};
|
|
4821
4821
|
}
|
|
4822
4822
|
});
|
|
@@ -4826,23 +4826,23 @@ function il(f) {
|
|
|
4826
4826
|
function sl(f) {
|
|
4827
4827
|
return typeof f == "function" ? f() : Se(f);
|
|
4828
4828
|
}
|
|
4829
|
-
const
|
|
4829
|
+
const Th = typeof window < "u", rl = () => {
|
|
4830
4830
|
};
|
|
4831
|
-
function
|
|
4831
|
+
function kh(...f) {
|
|
4832
4832
|
if (f.length !== 1)
|
|
4833
4833
|
return iu(...f);
|
|
4834
4834
|
const i = f[0];
|
|
4835
4835
|
return typeof i == "function" ? su(ru(() => ({ get: i, set: rl }))) : nt(i);
|
|
4836
4836
|
}
|
|
4837
|
-
function
|
|
4837
|
+
function Ah(f, i = !0) {
|
|
4838
4838
|
Pa() ? yo(f) : i ? f() : nu(f);
|
|
4839
4839
|
}
|
|
4840
|
-
function
|
|
4840
|
+
function Mh(f) {
|
|
4841
4841
|
var i;
|
|
4842
4842
|
const r = sl(f);
|
|
4843
4843
|
return (i = r == null ? void 0 : r.$el) != null ? i : r;
|
|
4844
4844
|
}
|
|
4845
|
-
const Xs =
|
|
4845
|
+
const Xs = Th ? window : void 0;
|
|
4846
4846
|
function Bn(...f) {
|
|
4847
4847
|
let i, r, s, o;
|
|
4848
4848
|
if (typeof f[0] == "string" || Array.isArray(f[0]) ? ([r, s, o] = f, i = Xs) : [i, r, s, o] = f, !i)
|
|
@@ -4851,7 +4851,7 @@ function Bn(...f) {
|
|
|
4851
4851
|
const c = [], p = () => {
|
|
4852
4852
|
c.forEach((_) => _()), c.length = 0;
|
|
4853
4853
|
}, h = (_, w, y, C) => (_.addEventListener(w, y, C), () => _.removeEventListener(w, y, C)), m = vi(
|
|
4854
|
-
() => [
|
|
4854
|
+
() => [Mh(i), sl(o)],
|
|
4855
4855
|
([_, w]) => {
|
|
4856
4856
|
p(), _ && c.push(
|
|
4857
4857
|
...r.flatMap((y) => s.map((C) => h(_, y, C, w)))
|
|
@@ -4863,33 +4863,33 @@ function Bn(...f) {
|
|
|
4863
4863
|
};
|
|
4864
4864
|
return il(g), g;
|
|
4865
4865
|
}
|
|
4866
|
-
function
|
|
4866
|
+
function Sh() {
|
|
4867
4867
|
const f = nt(!1);
|
|
4868
4868
|
return Pa() && yo(() => {
|
|
4869
4869
|
f.value = !0;
|
|
4870
4870
|
}), f;
|
|
4871
4871
|
}
|
|
4872
|
-
function
|
|
4873
|
-
const i =
|
|
4872
|
+
function Lh(f) {
|
|
4873
|
+
const i = Sh();
|
|
4874
4874
|
return pn(() => (i.value, !!f()));
|
|
4875
4875
|
}
|
|
4876
|
-
function
|
|
4877
|
-
const { window: r = Xs } = i, s =
|
|
4876
|
+
function Rh(f, i = {}) {
|
|
4877
|
+
const { window: r = Xs } = i, s = Lh(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
4878
4878
|
let o;
|
|
4879
4879
|
const c = nt(!1), p = () => {
|
|
4880
4880
|
o && ("removeEventListener" in o ? o.removeEventListener("change", h) : o.removeListener(h));
|
|
4881
4881
|
}, h = () => {
|
|
4882
|
-
s.value && (p(), o = r.matchMedia(
|
|
4882
|
+
s.value && (p(), o = r.matchMedia(kh(f).value), c.value = !!(o != null && o.matches), o && ("addEventListener" in o ? o.addEventListener("change", h) : o.addListener(h)));
|
|
4883
4883
|
};
|
|
4884
4884
|
return ss(h), il(() => p()), c;
|
|
4885
4885
|
}
|
|
4886
|
-
const
|
|
4886
|
+
const Vh = {
|
|
4887
4887
|
page: (f) => [f.pageX, f.pageY],
|
|
4888
4888
|
client: (f) => [f.clientX, f.clientY],
|
|
4889
4889
|
screen: (f) => [f.screenX, f.screenY],
|
|
4890
4890
|
movement: (f) => f instanceof Touch ? null : [f.movementX, f.movementY]
|
|
4891
4891
|
};
|
|
4892
|
-
function
|
|
4892
|
+
function Ih(f = {}) {
|
|
4893
4893
|
const {
|
|
4894
4894
|
type: i = "page",
|
|
4895
4895
|
touch: r = !0,
|
|
@@ -4898,7 +4898,7 @@ function Vh(f = {}) {
|
|
|
4898
4898
|
window: c = Xs,
|
|
4899
4899
|
target: p = c,
|
|
4900
4900
|
eventFilter: h
|
|
4901
|
-
} = f, m = nt(o.x), g = nt(o.y), _ = nt(null), w = typeof i == "function" ? i :
|
|
4901
|
+
} = f, m = nt(o.x), g = nt(o.y), _ = nt(null), w = typeof i == "function" ? i : Vh[i], y = (O) => {
|
|
4902
4902
|
const N = w(O);
|
|
4903
4903
|
N && ([m.value, g.value] = N, _.value = "mouse");
|
|
4904
4904
|
}, C = (O) => {
|
|
@@ -4915,7 +4915,7 @@ function Vh(f = {}) {
|
|
|
4915
4915
|
sourceType: _
|
|
4916
4916
|
};
|
|
4917
4917
|
}
|
|
4918
|
-
function
|
|
4918
|
+
function Dh(f = {}) {
|
|
4919
4919
|
const {
|
|
4920
4920
|
window: i = Xs,
|
|
4921
4921
|
initialWidth: r = 1 / 0,
|
|
@@ -4925,13 +4925,13 @@ function Ih(f = {}) {
|
|
|
4925
4925
|
} = f, p = nt(r), h = nt(s), m = () => {
|
|
4926
4926
|
i && (c ? (p.value = i.innerWidth, h.value = i.innerHeight) : (p.value = i.document.documentElement.clientWidth, h.value = i.document.documentElement.clientHeight));
|
|
4927
4927
|
};
|
|
4928
|
-
if (m(),
|
|
4929
|
-
const g =
|
|
4928
|
+
if (m(), Ah(m), Bn("resize", m, { passive: !0 }), o) {
|
|
4929
|
+
const g = Rh("(orientation: portrait)");
|
|
4930
4930
|
vi(g, () => m());
|
|
4931
4931
|
}
|
|
4932
4932
|
return { width: p, height: h };
|
|
4933
4933
|
}
|
|
4934
|
-
const
|
|
4934
|
+
const Oh = ["args"], Dd = /* @__PURE__ */ Ce({
|
|
4935
4935
|
__name: "PointerLockControls",
|
|
4936
4936
|
props: {
|
|
4937
4937
|
makeDefault: { type: Boolean, default: !1 },
|
|
@@ -4942,7 +4942,7 @@ const Dh = ["args"], Id = /* @__PURE__ */ Ce({
|
|
|
4942
4942
|
setup(f, { expose: i }) {
|
|
4943
4943
|
const r = f, { state: s, setState: o, extend: c } = Et(), p = nt(null);
|
|
4944
4944
|
let h;
|
|
4945
|
-
return c({ PointerLockControls:
|
|
4945
|
+
return c({ PointerLockControls: gp }), vi(p, (m) => {
|
|
4946
4946
|
var _;
|
|
4947
4947
|
m && r.makeDefault ? o("controls", m) : o("controls", null);
|
|
4948
4948
|
const g = document.getElementById(r.selector || "");
|
|
@@ -4959,21 +4959,21 @@ const Dh = ["args"], Id = /* @__PURE__ */ Ce({
|
|
|
4959
4959
|
ref_key: "controls",
|
|
4960
4960
|
ref: p,
|
|
4961
4961
|
args: [Se(s).camera || f.camera, ((_ = Se(s).renderer) == null ? void 0 : _.domElement) || f.domElement]
|
|
4962
|
-
}, null, 8,
|
|
4962
|
+
}, null, 8, Oh)) : es("", !0);
|
|
4963
4963
|
};
|
|
4964
4964
|
}
|
|
4965
4965
|
});
|
|
4966
|
-
function
|
|
4966
|
+
function Nh(f, i) {
|
|
4967
4967
|
const r = {};
|
|
4968
4968
|
for (const s of i)
|
|
4969
4969
|
Object.prototype.hasOwnProperty.call(f, s) && (r[s] = f[s]);
|
|
4970
4970
|
return r;
|
|
4971
4971
|
}
|
|
4972
|
-
function
|
|
4972
|
+
function Bh(f, i) {
|
|
4973
4973
|
const r = `set${i[0].toUpperCase()}${i.slice(1)}`;
|
|
4974
4974
|
return f[r] !== void 0;
|
|
4975
4975
|
}
|
|
4976
|
-
const
|
|
4976
|
+
const Od = /* @__PURE__ */ Ce({
|
|
4977
4977
|
__name: "TransformControls",
|
|
4978
4978
|
props: {
|
|
4979
4979
|
object: null,
|
|
@@ -4994,7 +4994,7 @@ const Dd = /* @__PURE__ */ Ce({
|
|
|
4994
4994
|
const r = f;
|
|
4995
4995
|
let s = Oe();
|
|
4996
4996
|
const { state: o } = Et(), c = pn(
|
|
4997
|
-
() =>
|
|
4997
|
+
() => Nh(r, [
|
|
4998
4998
|
"enabled",
|
|
4999
4999
|
"axis",
|
|
5000
5000
|
"mode",
|
|
@@ -5014,14 +5014,14 @@ const Dd = /* @__PURE__ */ Ce({
|
|
|
5014
5014
|
y.addEventListener("dragging-changed", _), y.addEventListener("change", p), y.addEventListener("mouseDown", h), y.addEventListener("mouseUp", m), y.addEventListener("objectChange", g);
|
|
5015
5015
|
}
|
|
5016
5016
|
return ss(() => {
|
|
5017
|
-
o.camera && o.renderer && o.scene && r.object && (s.value = new
|
|
5017
|
+
o.camera && o.renderer && o.scene && r.object && (s.value = new hp(o.camera, o.renderer.domElement), s.value.attach(r.object), o.scene.add(s.value), w(s.value));
|
|
5018
5018
|
}), vi(
|
|
5019
5019
|
[c, s],
|
|
5020
5020
|
// TODO: properly type this
|
|
5021
5021
|
([y, C]) => {
|
|
5022
5022
|
if (y && C)
|
|
5023
5023
|
for (const L in y)
|
|
5024
|
-
if (!
|
|
5024
|
+
if (!Bh(C, L))
|
|
5025
5025
|
C[L] = y[L];
|
|
5026
5026
|
else {
|
|
5027
5027
|
const S = `set${L[0].toUpperCase()}${L.slice(1)}`;
|
|
@@ -5036,8 +5036,8 @@ const Dd = /* @__PURE__ */ Ce({
|
|
|
5036
5036
|
}), (y, C) => Ge(y.$slots, "default");
|
|
5037
5037
|
}
|
|
5038
5038
|
});
|
|
5039
|
-
function
|
|
5040
|
-
const { x: s, y: o } =
|
|
5039
|
+
function Fh(f = !1, i = 5, r) {
|
|
5040
|
+
const { x: s, y: o } = Ih(), { logWarning: c } = du(), { width: p, height: h } = Dh(), m = pn(() => (s.value / p.value - 0.5) * i), g = pn(() => -(o.value / h.value - 0.5) * i);
|
|
5041
5041
|
if (r) {
|
|
5042
5042
|
const { x: _, y: w } = r.position;
|
|
5043
5043
|
ss(() => {
|
|
@@ -5046,7 +5046,7 @@ function Bh(f = !1, i = 5, r) {
|
|
|
5046
5046
|
} else
|
|
5047
5047
|
c("Scene must contain a Camera component to use this composable");
|
|
5048
5048
|
}
|
|
5049
|
-
const
|
|
5049
|
+
const Nd = Ce({
|
|
5050
5050
|
name: "PamCameraMouse",
|
|
5051
5051
|
props: ["disabled", "factor"],
|
|
5052
5052
|
setup(f) {
|
|
@@ -5054,7 +5054,7 @@ const Od = Ce({
|
|
|
5054
5054
|
return ss(() => {
|
|
5055
5055
|
if (i != null && i.camera) {
|
|
5056
5056
|
const r = i == null ? void 0 : i.camera;
|
|
5057
|
-
|
|
5057
|
+
Fh(f.disabled, f.factor, r);
|
|
5058
5058
|
}
|
|
5059
5059
|
}), () => {
|
|
5060
5060
|
};
|
|
@@ -5574,7 +5574,7 @@ var _o = { exports: {} };
|
|
|
5574
5574
|
last: "lst",
|
|
5575
5575
|
verylast: "vlst"
|
|
5576
5576
|
};
|
|
5577
|
-
class
|
|
5577
|
+
class Mt {
|
|
5578
5578
|
constructor(e) {
|
|
5579
5579
|
this.parent_ = null, this.blade = e.blade, this.view = e.view, this.viewProps = e.viewProps;
|
|
5580
5580
|
const t = this.view.element;
|
|
@@ -5635,7 +5635,7 @@ var _o = { exports: {} };
|
|
|
5635
5635
|
const t = n.createElementNS(Ke, "svg");
|
|
5636
5636
|
return t.innerHTML = $n[e], t;
|
|
5637
5637
|
}
|
|
5638
|
-
function
|
|
5638
|
+
function St(n, e, t) {
|
|
5639
5639
|
n.insertBefore(e, n.children[t]);
|
|
5640
5640
|
}
|
|
5641
5641
|
function Xn(n) {
|
|
@@ -5653,7 +5653,7 @@ var _o = { exports: {} };
|
|
|
5653
5653
|
return n.relatedTarget ? n.relatedTarget : "explicitOriginalTarget" in n ? n.explicitOriginalTarget : null;
|
|
5654
5654
|
}
|
|
5655
5655
|
const gt = D("lbl");
|
|
5656
|
-
function
|
|
5656
|
+
function Lt(n, e) {
|
|
5657
5657
|
const t = n.createDocumentFragment();
|
|
5658
5658
|
return e.split(`
|
|
5659
5659
|
`).map((b) => n.createTextNode(b)).forEach((b, E) => {
|
|
@@ -5665,13 +5665,13 @@ var _o = { exports: {} };
|
|
|
5665
5665
|
this.element = e.createElement("div"), this.element.classList.add(gt()), t.viewProps.bindClassModifiers(this.element);
|
|
5666
5666
|
const l = e.createElement("div");
|
|
5667
5667
|
l.classList.add(gt("l")), B(t.props, "label", (E) => {
|
|
5668
|
-
w(E) ? this.element.classList.add(gt(void 0, "nol")) : (this.element.classList.remove(gt(void 0, "nol")), Yn(l), l.appendChild(
|
|
5668
|
+
w(E) ? this.element.classList.add(gt(void 0, "nol")) : (this.element.classList.remove(gt(void 0, "nol")), Yn(l), l.appendChild(Lt(e, E)));
|
|
5669
5669
|
}), this.element.appendChild(l), this.labelElement = l;
|
|
5670
5670
|
const b = e.createElement("div");
|
|
5671
5671
|
b.classList.add(gt("v")), this.element.appendChild(b), this.valueElement = b;
|
|
5672
5672
|
}
|
|
5673
5673
|
}
|
|
5674
|
-
class U extends
|
|
5674
|
+
class U extends Mt {
|
|
5675
5675
|
constructor(e, t) {
|
|
5676
5676
|
const l = t.valueController.viewProps;
|
|
5677
5677
|
super(Object.assign(Object.assign({}, t), { view: new M(e, {
|
|
@@ -5709,7 +5709,7 @@ var _o = { exports: {} };
|
|
|
5709
5709
|
return !(n.controller instanceof U) || !(n.controller.valueController instanceof ce) ? null : new O(n.controller);
|
|
5710
5710
|
}
|
|
5711
5711
|
};
|
|
5712
|
-
class ie extends
|
|
5712
|
+
class ie extends Mt {
|
|
5713
5713
|
constructor(e) {
|
|
5714
5714
|
super(e), this.value = e.value;
|
|
5715
5715
|
}
|
|
@@ -5795,7 +5795,7 @@ var _o = { exports: {} };
|
|
|
5795
5795
|
function gi(n, e) {
|
|
5796
5796
|
return n.addBlade(Object.assign(Object.assign({}, e), { view: "tab" }));
|
|
5797
5797
|
}
|
|
5798
|
-
class
|
|
5798
|
+
class Rt {
|
|
5799
5799
|
constructor(e) {
|
|
5800
5800
|
this.emitter = new N(), this.items_ = [], this.cache_ = /* @__PURE__ */ new Set(), this.onSubListAdd_ = this.onSubListAdd_.bind(this), this.onSubListRemove_ = this.onSubListRemove_.bind(this), this.extract_ = e;
|
|
5801
5801
|
}
|
|
@@ -5939,7 +5939,7 @@ var _o = { exports: {} };
|
|
|
5939
5939
|
}
|
|
5940
5940
|
class qn extends o {
|
|
5941
5941
|
constructor(e, t) {
|
|
5942
|
-
super(e), this.onRackAdd_ = this.onRackAdd_.bind(this), this.onRackRemove_ = this.onRackRemove_.bind(this), this.onRackInputChange_ = this.onRackInputChange_.bind(this), this.onRackMonitorUpdate_ = this.onRackMonitorUpdate_.bind(this), this.emitter_ = new N(), this.apiSet_ = new
|
|
5942
|
+
super(e), this.onRackAdd_ = this.onRackAdd_.bind(this), this.onRackRemove_ = this.onRackRemove_.bind(this), this.onRackInputChange_ = this.onRackInputChange_.bind(this), this.onRackMonitorUpdate_ = this.onRackMonitorUpdate_.bind(this), this.emitter_ = new N(), this.apiSet_ = new Rt(as), this.pool_ = t;
|
|
5943
5943
|
const l = this.controller_.rack;
|
|
5944
5944
|
l.emitter.on("add", this.onRackAdd_), l.emitter.on("remove", this.onRackRemove_), l.emitter.on("inputchange", this.onRackInputChange_), l.emitter.on("monitorupdate", this.onRackMonitorUpdate_), l.children.forEach((b) => {
|
|
5945
5945
|
this.setUpApi_(b);
|
|
@@ -6086,7 +6086,7 @@ var _o = { exports: {} };
|
|
|
6086
6086
|
}), this;
|
|
6087
6087
|
}
|
|
6088
6088
|
}
|
|
6089
|
-
class xi extends
|
|
6089
|
+
class xi extends Mt {
|
|
6090
6090
|
constructor(e) {
|
|
6091
6091
|
super({
|
|
6092
6092
|
blade: e.blade,
|
|
@@ -6135,7 +6135,7 @@ var _o = { exports: {} };
|
|
|
6135
6135
|
class nr {
|
|
6136
6136
|
constructor(e) {
|
|
6137
6137
|
var t, l;
|
|
6138
|
-
this.onBladePositionsChange_ = this.onBladePositionsChange_.bind(this), this.onSetAdd_ = this.onSetAdd_.bind(this), this.onSetRemove_ = this.onSetRemove_.bind(this), this.onChildDispose_ = this.onChildDispose_.bind(this), this.onChildPositionsChange_ = this.onChildPositionsChange_.bind(this), this.onChildInputChange_ = this.onChildInputChange_.bind(this), this.onChildMonitorUpdate_ = this.onChildMonitorUpdate_.bind(this), this.onChildValueChange_ = this.onChildValueChange_.bind(this), this.onChildViewPropsChange_ = this.onChildViewPropsChange_.bind(this), this.onDescendantLayout_ = this.onDescendantLayout_.bind(this), this.onDescendantInputChange_ = this.onDescendantInputChange_.bind(this), this.onDescendantMonitorUpdate_ = this.onDescendantMonitorUpdate_.bind(this), this.emitter = new N(), this.blade_ = (t = e.blade) !== null && t !== void 0 ? t : null, (l = this.blade_) === null || l === void 0 || l.value("positions").emitter.on("change", this.onBladePositionsChange_), this.viewProps = e.viewProps, this.bcSet_ = new
|
|
6138
|
+
this.onBladePositionsChange_ = this.onBladePositionsChange_.bind(this), this.onSetAdd_ = this.onSetAdd_.bind(this), this.onSetRemove_ = this.onSetRemove_.bind(this), this.onChildDispose_ = this.onChildDispose_.bind(this), this.onChildPositionsChange_ = this.onChildPositionsChange_.bind(this), this.onChildInputChange_ = this.onChildInputChange_.bind(this), this.onChildMonitorUpdate_ = this.onChildMonitorUpdate_.bind(this), this.onChildValueChange_ = this.onChildValueChange_.bind(this), this.onChildViewPropsChange_ = this.onChildViewPropsChange_.bind(this), this.onDescendantLayout_ = this.onDescendantLayout_.bind(this), this.onDescendantInputChange_ = this.onDescendantInputChange_.bind(this), this.onDescendantMonitorUpdate_ = this.onDescendantMonitorUpdate_.bind(this), this.emitter = new N(), this.blade_ = (t = e.blade) !== null && t !== void 0 ? t : null, (l = this.blade_) === null || l === void 0 || l.value("positions").emitter.on("change", this.onBladePositionsChange_), this.viewProps = e.viewProps, this.bcSet_ = new Rt(tr), this.bcSet_.emitter.on("add", this.onSetAdd_), this.bcSet_.emitter.on("remove", this.onSetRemove_);
|
|
6139
6139
|
}
|
|
6140
6140
|
get children() {
|
|
6141
6141
|
return this.bcSet_.items;
|
|
@@ -6280,7 +6280,7 @@ var _o = { exports: {} };
|
|
|
6280
6280
|
this.updatePositions_();
|
|
6281
6281
|
}
|
|
6282
6282
|
}
|
|
6283
|
-
class bn extends
|
|
6283
|
+
class bn extends Mt {
|
|
6284
6284
|
constructor(e, t) {
|
|
6285
6285
|
super(Object.assign(Object.assign({}, t), { view: new Zs(e, {
|
|
6286
6286
|
viewName: "brk",
|
|
@@ -6296,7 +6296,7 @@ var _o = { exports: {} };
|
|
|
6296
6296
|
});
|
|
6297
6297
|
}
|
|
6298
6298
|
onRackAdd_(e) {
|
|
6299
|
-
e.isRoot &&
|
|
6299
|
+
e.isRoot && St(this.view.element, e.bladeController.view.element, e.index);
|
|
6300
6300
|
}
|
|
6301
6301
|
onRackRemove_(e) {
|
|
6302
6302
|
e.isRoot && Xn(e.bladeController.view.element);
|
|
@@ -6392,7 +6392,7 @@ var _o = { exports: {} };
|
|
|
6392
6392
|
l.classList.add(Ci("r")), this.element.appendChild(l);
|
|
6393
6393
|
}
|
|
6394
6394
|
}
|
|
6395
|
-
class gn extends
|
|
6395
|
+
class gn extends Mt {
|
|
6396
6396
|
constructor(e, t) {
|
|
6397
6397
|
super(Object.assign(Object.assign({}, t), { view: new rr(e, {
|
|
6398
6398
|
viewProps: t.viewProps
|
|
@@ -6641,7 +6641,7 @@ var _o = { exports: {} };
|
|
|
6641
6641
|
empty: b.empty,
|
|
6642
6642
|
viewProps: t.viewProps
|
|
6643
6643
|
})
|
|
6644
|
-
}), this.onPageAdd_ = this.onPageAdd_.bind(this), this.onPageRemove_ = this.onPageRemove_.bind(this), this.pageSet_ = new
|
|
6644
|
+
}), this.onPageAdd_ = this.onPageAdd_.bind(this), this.onPageRemove_ = this.onPageRemove_.bind(this), this.pageSet_ = new Rt(() => null), this.pageSet_.emitter.on("add", this.onPageAdd_), this.pageSet_.emitter.on("remove", this.onPageRemove_), this.tab = b;
|
|
6645
6645
|
}
|
|
6646
6646
|
get pageSet() {
|
|
6647
6647
|
return this.pageSet_;
|
|
@@ -6654,7 +6654,7 @@ var _o = { exports: {} };
|
|
|
6654
6654
|
}
|
|
6655
6655
|
onPageAdd_(e) {
|
|
6656
6656
|
const t = e.item;
|
|
6657
|
-
|
|
6657
|
+
St(this.view.itemsElement, t.itemController.view.element, e.index), t.itemController.viewProps.set("parent", this.viewProps), this.rackController.rack.add(t.contentController, e.index), this.tab.add(t.props.value("selected"));
|
|
6658
6658
|
}
|
|
6659
6659
|
onPageRemove_(e) {
|
|
6660
6660
|
const t = e.item;
|
|
@@ -7041,7 +7041,7 @@ var _o = { exports: {} };
|
|
|
7041
7041
|
return "";
|
|
7042
7042
|
};
|
|
7043
7043
|
}
|
|
7044
|
-
function
|
|
7044
|
+
function Vt(n, e) {
|
|
7045
7045
|
var t;
|
|
7046
7046
|
const l = n.substr(e).match(/^\s+/);
|
|
7047
7047
|
return (t = l && l[0]) !== null && t !== void 0 ? t : "";
|
|
@@ -7163,7 +7163,7 @@ var _o = { exports: {} };
|
|
|
7163
7163
|
const l = ti(n, e);
|
|
7164
7164
|
if (!l)
|
|
7165
7165
|
return null;
|
|
7166
|
-
e = l.cursor, e +=
|
|
7166
|
+
e = l.cursor, e += Vt(n, e).length;
|
|
7167
7167
|
const b = n.substr(e, 1);
|
|
7168
7168
|
return e += b.length, b !== ")" ? null : {
|
|
7169
7169
|
evaluable: l.evaluable,
|
|
@@ -7188,14 +7188,14 @@ var _o = { exports: {} };
|
|
|
7188
7188
|
}) : null;
|
|
7189
7189
|
}
|
|
7190
7190
|
function kr(n, e, t) {
|
|
7191
|
-
t +=
|
|
7191
|
+
t += Vt(e, t).length;
|
|
7192
7192
|
const l = n.filter((b) => e.startsWith(b, t))[0];
|
|
7193
|
-
return l ? (t += l.length, t +=
|
|
7193
|
+
return l ? (t += l.length, t += Vt(e, t).length, {
|
|
7194
7194
|
cursor: t,
|
|
7195
7195
|
operator: l
|
|
7196
7196
|
}) : null;
|
|
7197
7197
|
}
|
|
7198
|
-
function
|
|
7198
|
+
function It(n, e) {
|
|
7199
7199
|
return (t, l) => {
|
|
7200
7200
|
const b = n(t, l);
|
|
7201
7201
|
if (!b)
|
|
@@ -7226,13 +7226,13 @@ var _o = { exports: {} };
|
|
|
7226
7226
|
["&"],
|
|
7227
7227
|
["^"],
|
|
7228
7228
|
["|"]
|
|
7229
|
-
].reduce((n, e) =>
|
|
7229
|
+
].reduce((n, e) => It(n, e), Vi);
|
|
7230
7230
|
function ti(n, e) {
|
|
7231
|
-
return e +=
|
|
7231
|
+
return e += Vt(n, e).length, ks(n, e);
|
|
7232
7232
|
}
|
|
7233
7233
|
function As(n) {
|
|
7234
7234
|
const e = ti(n, 0);
|
|
7235
|
-
return !e || e.cursor +
|
|
7235
|
+
return !e || e.cursor + Vt(n, e.cursor).length !== n.length ? null : e.evaluable;
|
|
7236
7236
|
}
|
|
7237
7237
|
function ct(n) {
|
|
7238
7238
|
var e;
|
|
@@ -7321,7 +7321,7 @@ var _o = { exports: {} };
|
|
|
7321
7321
|
y: n.pageY - (((l = b && b.scrollY) !== null && l !== void 0 ? l : 0) + E.top)
|
|
7322
7322
|
};
|
|
7323
7323
|
}
|
|
7324
|
-
class
|
|
7324
|
+
class Dt {
|
|
7325
7325
|
constructor(e) {
|
|
7326
7326
|
this.lastTouch_ = null, this.onDocumentMouseMove_ = this.onDocumentMouseMove_.bind(this), this.onDocumentMouseUp_ = this.onDocumentMouseUp_.bind(this), this.onMouseDown_ = this.onMouseDown_.bind(this), this.onTouchEnd_ = this.onTouchEnd_.bind(this), this.onTouchMove_ = this.onTouchMove_.bind(this), this.onTouchStart_ = this.onTouchStart_.bind(this), this.elem_ = e, this.emitter = new N(), e.addEventListener("touchstart", this.onTouchStart_, {
|
|
7327
7327
|
passive: !1
|
|
@@ -7468,7 +7468,7 @@ var _o = { exports: {} };
|
|
|
7468
7468
|
value: this.value,
|
|
7469
7469
|
viewProps: this.viewProps
|
|
7470
7470
|
}), this.view.inputElement.addEventListener("change", this.onInputChange_), this.view.inputElement.addEventListener("keydown", this.onInputKeyDown_), this.view.inputElement.addEventListener("keyup", this.onInputKeyUp_);
|
|
7471
|
-
const b = new
|
|
7471
|
+
const b = new Dt(this.view.knobElement);
|
|
7472
7472
|
b.emitter.on("down", this.onPointerDown_), b.emitter.on("move", this.onPointerMove_), b.emitter.on("up", this.onPointerUp_);
|
|
7473
7473
|
}
|
|
7474
7474
|
constrainValue_(e) {
|
|
@@ -7541,7 +7541,7 @@ var _o = { exports: {} };
|
|
|
7541
7541
|
props: this.props,
|
|
7542
7542
|
value: this.value,
|
|
7543
7543
|
viewProps: this.viewProps
|
|
7544
|
-
}), this.ptHandler_ = new
|
|
7544
|
+
}), this.ptHandler_ = new Dt(this.view.trackElement), this.ptHandler_.emitter.on("down", this.onPointerDownOrMove_), this.ptHandler_.emitter.on("move", this.onPointerDownOrMove_), this.ptHandler_.emitter.on("up", this.onPointerUp_), this.view.trackElement.addEventListener("keydown", this.onKeyDown_), this.view.trackElement.addEventListener("keyup", this.onKeyUp_);
|
|
7545
7545
|
}
|
|
7546
7546
|
handlePointerEvent_(e, t) {
|
|
7547
7547
|
e.point && this.value.setRawValue(we(Re(e.point.x, 0, e.bounds.width), 0, e.bounds.width, this.props.get("minValue"), this.props.get("maxValue")), t);
|
|
@@ -7652,11 +7652,11 @@ var _o = { exports: {} };
|
|
|
7652
7652
|
const t = n && it(n, Jn);
|
|
7653
7653
|
return t ? Oi(t.step) : Math.max(Oi(e), 2);
|
|
7654
7654
|
}
|
|
7655
|
-
function
|
|
7655
|
+
function Ot(n) {
|
|
7656
7656
|
const e = Mr(n);
|
|
7657
7657
|
return e ?? 1;
|
|
7658
7658
|
}
|
|
7659
|
-
function
|
|
7659
|
+
function Nt(n, e) {
|
|
7660
7660
|
var t;
|
|
7661
7661
|
const l = n && it(n, Jn), b = Math.abs((t = l == null ? void 0 : l.step) !== null && t !== void 0 ? t : e);
|
|
7662
7662
|
return b === 0 ? 0.1 : Math.pow(10, Math.floor(Math.log10(b)) - 1);
|
|
@@ -7729,18 +7729,18 @@ var _o = { exports: {} };
|
|
|
7729
7729
|
viewProps: n.viewProps
|
|
7730
7730
|
});
|
|
7731
7731
|
}
|
|
7732
|
-
},
|
|
7732
|
+
}, Bt = D("col");
|
|
7733
7733
|
class Gi {
|
|
7734
7734
|
constructor(e, t) {
|
|
7735
|
-
this.element = e.createElement("div"), this.element.classList.add(
|
|
7735
|
+
this.element = e.createElement("div"), this.element.classList.add(Bt()), t.foldable.bindExpandedClass(this.element, Bt(void 0, "expanded")), B(t.foldable, "completed", K(this.element, Bt(void 0, "cpl")));
|
|
7736
7736
|
const l = e.createElement("div");
|
|
7737
|
-
l.classList.add(
|
|
7737
|
+
l.classList.add(Bt("h")), this.element.appendChild(l);
|
|
7738
7738
|
const b = e.createElement("div");
|
|
7739
|
-
b.classList.add(
|
|
7739
|
+
b.classList.add(Bt("s")), l.appendChild(b), this.swatchElement = b;
|
|
7740
7740
|
const E = e.createElement("div");
|
|
7741
|
-
if (E.classList.add(
|
|
7741
|
+
if (E.classList.add(Bt("t")), l.appendChild(E), this.textElement = E, t.pickerLayout === "inline") {
|
|
7742
7742
|
const k = e.createElement("div");
|
|
7743
|
-
k.classList.add(
|
|
7743
|
+
k.classList.add(Bt("p")), this.element.appendChild(k), this.pickerElement = k;
|
|
7744
7744
|
} else
|
|
7745
7745
|
this.pickerElement = null;
|
|
7746
7746
|
}
|
|
@@ -8378,7 +8378,7 @@ var _o = { exports: {} };
|
|
|
8378
8378
|
this.onKeyDown_ = this.onKeyDown_.bind(this), this.onKeyUp_ = this.onKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new xl(e, {
|
|
8379
8379
|
value: this.value,
|
|
8380
8380
|
viewProps: this.viewProps
|
|
8381
|
-
}), this.ptHandler_ = new
|
|
8381
|
+
}), this.ptHandler_ = new Dt(this.view.element), this.ptHandler_.emitter.on("down", this.onPointerDown_), this.ptHandler_.emitter.on("move", this.onPointerMove_), this.ptHandler_.emitter.on("up", this.onPointerUp_), this.view.element.addEventListener("keydown", this.onKeyDown_), this.view.element.addEventListener("keyup", this.onKeyUp_);
|
|
8382
8382
|
}
|
|
8383
8383
|
handlePointerEvent_(e, t) {
|
|
8384
8384
|
if (!e.point)
|
|
@@ -8552,7 +8552,7 @@ var _o = { exports: {} };
|
|
|
8552
8552
|
this.onKeyDown_ = this.onKeyDown_.bind(this), this.onKeyUp_ = this.onKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new Ml(e, {
|
|
8553
8553
|
value: this.value,
|
|
8554
8554
|
viewProps: this.viewProps
|
|
8555
|
-
}), this.ptHandler_ = new
|
|
8555
|
+
}), this.ptHandler_ = new Dt(this.view.element), this.ptHandler_.emitter.on("down", this.onPointerDown_), this.ptHandler_.emitter.on("move", this.onPointerMove_), this.ptHandler_.emitter.on("up", this.onPointerUp_), this.view.element.addEventListener("keydown", this.onKeyDown_), this.view.element.addEventListener("keyup", this.onKeyUp_);
|
|
8556
8556
|
}
|
|
8557
8557
|
handlePointerEvent_(e, t) {
|
|
8558
8558
|
if (!e.point)
|
|
@@ -8629,7 +8629,7 @@ var _o = { exports: {} };
|
|
|
8629
8629
|
this.onKeyDown_ = this.onKeyDown_.bind(this), this.onKeyUp_ = this.onKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new Ll(e, {
|
|
8630
8630
|
value: this.value,
|
|
8631
8631
|
viewProps: this.viewProps
|
|
8632
|
-
}), this.ptHandler_ = new
|
|
8632
|
+
}), this.ptHandler_ = new Dt(this.view.element), this.ptHandler_.emitter.on("down", this.onPointerDown_), this.ptHandler_.emitter.on("move", this.onPointerMove_), this.ptHandler_.emitter.on("up", this.onPointerUp_), this.view.element.addEventListener("keydown", this.onKeyDown_), this.view.element.addEventListener("keyup", this.onKeyUp_);
|
|
8633
8633
|
}
|
|
8634
8634
|
handlePointerEvent_(e, t) {
|
|
8635
8635
|
if (!e.point)
|
|
@@ -9106,23 +9106,23 @@ var _o = { exports: {} };
|
|
|
9106
9106
|
});
|
|
9107
9107
|
const E = (e = "format" in n.params ? n.params.format : void 0) !== null && e !== void 0 ? e : De(si(l, t.rawValue)), k = l && it(l, Yt);
|
|
9108
9108
|
return k ? new ii(n.document, {
|
|
9109
|
-
baseStep:
|
|
9109
|
+
baseStep: Ot(l),
|
|
9110
9110
|
parser: ct,
|
|
9111
9111
|
sliderProps: new X({
|
|
9112
9112
|
maxValue: k.values.value("max"),
|
|
9113
9113
|
minValue: k.values.value("min")
|
|
9114
9114
|
}),
|
|
9115
9115
|
textProps: X.fromObject({
|
|
9116
|
-
draggingScale:
|
|
9116
|
+
draggingScale: Nt(l, t.rawValue),
|
|
9117
9117
|
formatter: E
|
|
9118
9118
|
}),
|
|
9119
9119
|
value: t,
|
|
9120
9120
|
viewProps: n.viewProps
|
|
9121
9121
|
}) : new Tn(n.document, {
|
|
9122
|
-
baseStep:
|
|
9122
|
+
baseStep: Ot(l),
|
|
9123
9123
|
parser: ct,
|
|
9124
9124
|
props: X.fromObject({
|
|
9125
|
-
draggingScale:
|
|
9125
|
+
draggingScale: Nt(l, t.rawValue),
|
|
9126
9126
|
formatter: E
|
|
9127
9127
|
}),
|
|
9128
9128
|
value: t,
|
|
@@ -9217,7 +9217,7 @@ var _o = { exports: {} };
|
|
|
9217
9217
|
maxValue: this.maxValue_,
|
|
9218
9218
|
value: this.value,
|
|
9219
9219
|
viewProps: this.viewProps
|
|
9220
|
-
}), this.ptHandler_ = new
|
|
9220
|
+
}), this.ptHandler_ = new Dt(this.view.padElement), this.ptHandler_.emitter.on("down", this.onPointerDown_), this.ptHandler_.emitter.on("move", this.onPointerMove_), this.ptHandler_.emitter.on("up", this.onPointerUp_), this.view.padElement.addEventListener("keydown", this.onPadKeyDown_), this.view.padElement.addEventListener("keyup", this.onPadKeyUp_);
|
|
9221
9221
|
}
|
|
9222
9222
|
handlePointerEvent_(e, t) {
|
|
9223
9223
|
if (!e.point)
|
|
@@ -9349,18 +9349,18 @@ var _o = { exports: {} };
|
|
|
9349
9349
|
return new Wt({
|
|
9350
9350
|
assembly: ea,
|
|
9351
9351
|
components: [
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9352
|
+
Ft("x" in n ? n.x : void 0, e.x),
|
|
9353
|
+
Ft("y" in n ? n.y : void 0, e.y),
|
|
9354
|
+
Ft("z" in n ? n.z : void 0, e.z)
|
|
9355
9355
|
]
|
|
9356
9356
|
});
|
|
9357
9357
|
}
|
|
9358
9358
|
function $r(n, e) {
|
|
9359
9359
|
return {
|
|
9360
|
-
baseStep:
|
|
9360
|
+
baseStep: Ot(e),
|
|
9361
9361
|
constraint: e,
|
|
9362
9362
|
textProps: X.fromObject({
|
|
9363
|
-
draggingScale:
|
|
9363
|
+
draggingScale: Nt(e, n),
|
|
9364
9364
|
formatter: De(si(e, n))
|
|
9365
9365
|
})
|
|
9366
9366
|
};
|
|
@@ -9443,19 +9443,19 @@ var _o = { exports: {} };
|
|
|
9443
9443
|
return new Wt({
|
|
9444
9444
|
assembly: ta,
|
|
9445
9445
|
components: [
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9446
|
+
Ft("x" in n ? n.x : void 0, e.x),
|
|
9447
|
+
Ft("y" in n ? n.y : void 0, e.y),
|
|
9448
|
+
Ft("z" in n ? n.z : void 0, e.z),
|
|
9449
|
+
Ft("w" in n ? n.w : void 0, e.w)
|
|
9450
9450
|
]
|
|
9451
9451
|
});
|
|
9452
9452
|
}
|
|
9453
9453
|
function gc(n, e) {
|
|
9454
9454
|
return {
|
|
9455
|
-
baseStep:
|
|
9455
|
+
baseStep: Ot(e),
|
|
9456
9456
|
constraint: e,
|
|
9457
9457
|
textProps: X.fromObject({
|
|
9458
|
-
draggingScale:
|
|
9458
|
+
draggingScale: Nt(e, n),
|
|
9459
9459
|
formatter: De(si(e, n))
|
|
9460
9460
|
})
|
|
9461
9461
|
};
|
|
@@ -9672,7 +9672,7 @@ var _o = { exports: {} };
|
|
|
9672
9672
|
}), !bt(e))
|
|
9673
9673
|
this.view.element.addEventListener("mousemove", this.onGraphMouseMove_), this.view.element.addEventListener("mouseleave", this.onGraphMouseLeave_);
|
|
9674
9674
|
else {
|
|
9675
|
-
const l = new
|
|
9675
|
+
const l = new Dt(this.view.element);
|
|
9676
9676
|
l.emitter.on("down", this.onGraphPointerDown_), l.emitter.on("move", this.onGraphPointerMove_), l.emitter.on("up", this.onGraphPointerUp_);
|
|
9677
9677
|
}
|
|
9678
9678
|
}
|
|
@@ -9972,7 +9972,7 @@ var _o = { exports: {} };
|
|
|
9972
9972
|
function Nc(n, e) {
|
|
9973
9973
|
n.writeProperty("x", e.x), n.writeProperty("y", e.y);
|
|
9974
9974
|
}
|
|
9975
|
-
function
|
|
9975
|
+
function Ft(n, e) {
|
|
9976
9976
|
if (!n)
|
|
9977
9977
|
return;
|
|
9978
9978
|
const t = [], l = Qo(n, e);
|
|
@@ -9984,8 +9984,8 @@ var _o = { exports: {} };
|
|
|
9984
9984
|
return new Wt({
|
|
9985
9985
|
assembly: Wo,
|
|
9986
9986
|
components: [
|
|
9987
|
-
|
|
9988
|
-
|
|
9987
|
+
Ft("x" in n ? n.x : void 0, e.x),
|
|
9988
|
+
Ft("y" in n ? n.y : void 0, e.y)
|
|
9989
9989
|
]
|
|
9990
9990
|
});
|
|
9991
9991
|
}
|
|
@@ -9993,7 +9993,7 @@ var _o = { exports: {} };
|
|
|
9993
9993
|
const [t, l] = n ? sc(n) : [];
|
|
9994
9994
|
if (!w(t) || !w(l))
|
|
9995
9995
|
return Math.max(Math.abs(t ?? 0), Math.abs(l ?? 0));
|
|
9996
|
-
const b =
|
|
9996
|
+
const b = Ot(n);
|
|
9997
9997
|
return Math.max(Math.abs(b) * 10, Math.abs(e) * 10);
|
|
9998
9998
|
}
|
|
9999
9999
|
function Fc(n, e) {
|
|
@@ -10002,10 +10002,10 @@ var _o = { exports: {} };
|
|
|
10002
10002
|
}
|
|
10003
10003
|
function oa(n, e) {
|
|
10004
10004
|
return {
|
|
10005
|
-
baseStep:
|
|
10005
|
+
baseStep: Ot(e),
|
|
10006
10006
|
constraint: e,
|
|
10007
10007
|
textProps: X.fromObject({
|
|
10008
|
-
draggingScale:
|
|
10008
|
+
draggingScale: Nt(e, n),
|
|
10009
10009
|
formatter: De(si(e, n))
|
|
10010
10010
|
})
|
|
10011
10011
|
};
|
|
@@ -10291,7 +10291,7 @@ var _o = { exports: {} };
|
|
|
10291
10291
|
minValue: b.values.value("min")
|
|
10292
10292
|
}),
|
|
10293
10293
|
textProps: X.fromObject({
|
|
10294
|
-
draggingScale:
|
|
10294
|
+
draggingScale: Nt(void 0, l),
|
|
10295
10295
|
formatter: (t = n.params.format) !== null && t !== void 0 ? t : Ar
|
|
10296
10296
|
}),
|
|
10297
10297
|
value: ee(l, {
|
|
@@ -10410,7 +10410,7 @@ var _o = { exports: {} };
|
|
|
10410
10410
|
r.BladeApi = o, r.ButtonApi = O, r.FolderApi = yi, r.InputBindingApi = _i, r.ListApi = aa, r.MonitorBindingApi = wi, r.Pane = Qc, r.SeparatorApi = us, r.SliderApi = la, r.TabApi = hs, r.TabPageApi = Pi, r.TextApi = ca, r.TpChangeEvent = p, r.VERSION = Zc, Object.defineProperty(r, "__esModule", { value: !0 });
|
|
10411
10411
|
});
|
|
10412
10412
|
})(_o, _o.exports);
|
|
10413
|
-
var
|
|
10413
|
+
var zh = _o.exports, wo = { exports: {} };
|
|
10414
10414
|
(function(f, i) {
|
|
10415
10415
|
(function(r, s) {
|
|
10416
10416
|
s(i);
|
|
@@ -10876,7 +10876,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
10876
10876
|
return d.relatedTarget ? d.relatedTarget : "explicitOriginalTarget" in d ? d.explicitOriginalTarget : null;
|
|
10877
10877
|
}
|
|
10878
10878
|
const vt = y("lbl");
|
|
10879
|
-
function
|
|
10879
|
+
function Mt(d, a) {
|
|
10880
10880
|
const u = d.createDocumentFragment();
|
|
10881
10881
|
return a.split(`
|
|
10882
10882
|
`).map((x) => d.createTextNode(x)).forEach((x, T) => {
|
|
@@ -10888,7 +10888,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
10888
10888
|
this.element = a.createElement("div"), this.element.classList.add(vt()), u.viewProps.bindClassModifiers(this.element);
|
|
10889
10889
|
const v = a.createElement("div");
|
|
10890
10890
|
v.classList.add(vt("l")), R(u.props, "label", (T) => {
|
|
10891
|
-
h(T) ? this.element.classList.add(vt(void 0, "nol")) : (this.element.classList.remove(vt(void 0, "nol")), Gn(v), v.appendChild(
|
|
10891
|
+
h(T) ? this.element.classList.add(vt(void 0, "nol")) : (this.element.classList.remove(vt(void 0, "nol")), Gn(v), v.appendChild(Mt(a, T)));
|
|
10892
10892
|
}), this.element.appendChild(v), this.labelElement = v;
|
|
10893
10893
|
const x = a.createElement("div");
|
|
10894
10894
|
x.classList.add(vt("v")), this.element.appendChild(x), this.valueElement = x;
|
|
@@ -10969,7 +10969,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
10969
10969
|
this.element = a.createElement("div"), this.element.classList.add(v()), u.viewProps.bindClassModifiers(this.element);
|
|
10970
10970
|
}
|
|
10971
10971
|
}
|
|
10972
|
-
class
|
|
10972
|
+
class St extends dn {
|
|
10973
10973
|
constructor(a, u) {
|
|
10974
10974
|
const v = u.valueController.viewProps;
|
|
10975
10975
|
super(Object.assign(Object.assign({}, u), { value: u.valueController.value, view: new Ke(a, {
|
|
@@ -11051,7 +11051,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
11051
11051
|
return Math.min(Math.max(a, v), u);
|
|
11052
11052
|
}
|
|
11053
11053
|
}
|
|
11054
|
-
class
|
|
11054
|
+
class Lt {
|
|
11055
11055
|
constructor(a) {
|
|
11056
11056
|
this.values = K.fromObject({
|
|
11057
11057
|
max: a.max,
|
|
@@ -11198,7 +11198,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
11198
11198
|
return "";
|
|
11199
11199
|
};
|
|
11200
11200
|
}
|
|
11201
|
-
function
|
|
11201
|
+
function Rt(d, a) {
|
|
11202
11202
|
var u;
|
|
11203
11203
|
const v = d.substr(a).match(/^\s+/);
|
|
11204
11204
|
return (u = v && v[0]) !== null && u !== void 0 ? u : "";
|
|
@@ -11320,7 +11320,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
11320
11320
|
const v = Ci(d, a);
|
|
11321
11321
|
if (!v)
|
|
11322
11322
|
return null;
|
|
11323
|
-
a = v.cursor, a +=
|
|
11323
|
+
a = v.cursor, a += Rt(d, a).length;
|
|
11324
11324
|
const x = d.substr(a, 1);
|
|
11325
11325
|
return a += x.length, x !== ")" ? null : {
|
|
11326
11326
|
evaluable: v.evaluable,
|
|
@@ -11345,9 +11345,9 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
11345
11345
|
}) : null;
|
|
11346
11346
|
}
|
|
11347
11347
|
function sr(d, a, u) {
|
|
11348
|
-
u +=
|
|
11348
|
+
u += Rt(a, u).length;
|
|
11349
11349
|
const v = d.filter((x) => a.startsWith(x, u))[0];
|
|
11350
|
-
return v ? (u += v.length, u +=
|
|
11350
|
+
return v ? (u += v.length, u += Rt(a, u).length, {
|
|
11351
11351
|
cursor: u,
|
|
11352
11352
|
operator: v
|
|
11353
11353
|
}) : null;
|
|
@@ -11385,11 +11385,11 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
11385
11385
|
["|"]
|
|
11386
11386
|
].reduce((d, a) => Ht(d, a), Qn);
|
|
11387
11387
|
function Ci(d, a) {
|
|
11388
|
-
return a +=
|
|
11388
|
+
return a += Rt(d, a).length, us(d, a);
|
|
11389
11389
|
}
|
|
11390
11390
|
function rr(d) {
|
|
11391
11391
|
const a = Ci(d, 0);
|
|
11392
|
-
return !a || a.cursor +
|
|
11392
|
+
return !a || a.cursor + Rt(d, a.cursor).length !== d.length ? null : a.evaluable;
|
|
11393
11393
|
}
|
|
11394
11394
|
function gn(d) {
|
|
11395
11395
|
var a;
|
|
@@ -11839,7 +11839,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
11839
11839
|
viewProps: a.viewProps
|
|
11840
11840
|
});
|
|
11841
11841
|
}
|
|
11842
|
-
class
|
|
11842
|
+
class Vt {
|
|
11843
11843
|
constructor(a, u) {
|
|
11844
11844
|
this.value = u.value, this.viewProps = u.viewProps, this.acs_ = u.axes.map((v, x) => Mi(a, u, x)), this.acs_.forEach((v, x) => {
|
|
11845
11845
|
Kt({
|
|
@@ -11863,7 +11863,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
11863
11863
|
return !h(d.max) && !h(d.min) ? new gt({
|
|
11864
11864
|
max: d.max,
|
|
11865
11865
|
min: d.min
|
|
11866
|
-
}) : !h(d.max) || !h(d.min) ? new
|
|
11866
|
+
}) : !h(d.max) || !h(d.min) ? new Lt({
|
|
11867
11867
|
max: d.max,
|
|
11868
11868
|
min: d.min
|
|
11869
11869
|
}) : null;
|
|
@@ -12151,20 +12151,20 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12151
12151
|
}, []);
|
|
12152
12152
|
return new Tt(...u ?? Vi);
|
|
12153
12153
|
}
|
|
12154
|
-
const
|
|
12154
|
+
const It = y("cbz");
|
|
12155
12155
|
class ks {
|
|
12156
12156
|
constructor(a, u) {
|
|
12157
|
-
this.element = a.createElement("div"), this.element.classList.add(
|
|
12157
|
+
this.element = a.createElement("div"), this.element.classList.add(It()), u.viewProps.bindClassModifiers(this.element), u.foldable.bindExpandedClass(this.element, It(void 0, "expanded")), R(u.foldable, "completed", N(this.element, It(void 0, "cpl")));
|
|
12158
12158
|
const v = a.createElement("div");
|
|
12159
|
-
v.classList.add(
|
|
12159
|
+
v.classList.add(It("h")), this.element.appendChild(v);
|
|
12160
12160
|
const x = a.createElement("button");
|
|
12161
|
-
x.classList.add(
|
|
12161
|
+
x.classList.add(It("b")), u.viewProps.bindDisabled(x);
|
|
12162
12162
|
const T = a.createElementNS(xe, "svg");
|
|
12163
12163
|
T.innerHTML = '<path d="M2 13C8 13 8 3 14 3"/>', x.appendChild(T), v.appendChild(x), this.buttonElement = x;
|
|
12164
12164
|
const V = a.createElement("div");
|
|
12165
|
-
if (V.classList.add(
|
|
12165
|
+
if (V.classList.add(It("t")), v.appendChild(V), this.textElement = V, u.pickerLayout === "inline") {
|
|
12166
12166
|
const j = a.createElement("div");
|
|
12167
|
-
j.classList.add(
|
|
12167
|
+
j.classList.add(It("p")), this.element.appendChild(j), this.pickerElement = j;
|
|
12168
12168
|
} else
|
|
12169
12169
|
this.pickerElement = null;
|
|
12170
12170
|
}
|
|
@@ -12389,8 +12389,8 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12389
12389
|
value: this.value,
|
|
12390
12390
|
viewProps: this.viewProps
|
|
12391
12391
|
}), this.view.graphElement.appendChild(this.gc_.view.element);
|
|
12392
|
-
const v = Object.assign(Object.assign({}, u.axis), { constraint: new
|
|
12393
|
-
this.tc_ = new
|
|
12392
|
+
const v = Object.assign(Object.assign({}, u.axis), { constraint: new Lt({ max: 1, min: 0 }) }), x = Object.assign(Object.assign({}, u.axis), { constraint: void 0 });
|
|
12393
|
+
this.tc_ = new Vt(a, {
|
|
12394
12394
|
assembly: Ri,
|
|
12395
12395
|
axes: [v, x, v, x],
|
|
12396
12396
|
parser: gn,
|
|
@@ -12462,13 +12462,13 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12462
12462
|
function Di() {
|
|
12463
12463
|
return new vr({
|
|
12464
12464
|
assembly: Ri,
|
|
12465
|
-
components: [0, 1, 2, 3].map((d) => d % 2 === 0 ? new
|
|
12465
|
+
components: [0, 1, 2, 3].map((d) => d % 2 === 0 ? new Lt({
|
|
12466
12466
|
min: 0,
|
|
12467
12467
|
max: 1
|
|
12468
12468
|
}) : void 0)
|
|
12469
12469
|
});
|
|
12470
12470
|
}
|
|
12471
|
-
const
|
|
12471
|
+
const Dt = {
|
|
12472
12472
|
id: "cubic-bezier",
|
|
12473
12473
|
type: "blade",
|
|
12474
12474
|
css: '.tp-cbzgv,.tp-radv_b,.tp-rslv_k,.tp-cbzv_b{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:rgba(0,0,0,0);border-width:0;font-family:inherit;font-size:inherit;font-weight:inherit;margin:0;outline:none;padding:0}.tp-radv_b,.tp-rslv_k,.tp-cbzv_b{background-color:var(--btn-bg);border-radius:var(--elm-br);color:var(--btn-fg);cursor:pointer;display:block;font-weight:bold;height:var(--bld-us);line-height:var(--bld-us);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-radv_b:hover,.tp-rslv_k:hover,.tp-cbzv_b:hover{background-color:var(--btn-bg-h)}.tp-radv_b:focus,.tp-rslv_k:focus,.tp-cbzv_b:focus{background-color:var(--btn-bg-f)}.tp-radv_b:active,.tp-rslv_k:active,.tp-cbzv_b:active{background-color:var(--btn-bg-a)}.tp-radv_b:disabled,.tp-rslv_k:disabled,.tp-cbzv_b:disabled{opacity:.5}.tp-cbzgv{background-color:var(--in-bg);border-radius:var(--elm-br);box-sizing:border-box;color:var(--in-fg);font-family:inherit;height:var(--bld-us);line-height:var(--bld-us);min-width:0;width:100%}.tp-cbzgv:hover{background-color:var(--in-bg-h)}.tp-cbzgv:focus{background-color:var(--in-bg-f)}.tp-cbzgv:active{background-color:var(--in-bg-a)}.tp-cbzgv:disabled{opacity:.5}.tp-btngridv{border-radius:var(--elm-br);display:grid;overflow:hidden;gap:2px}.tp-btngridv.tp-v-disabled{opacity:.5}.tp-btngridv .tp-btnv_b:disabled{opacity:1}.tp-btngridv .tp-btnv_b:disabled .tp-btnv_t{opacity:.5}.tp-btngridv .tp-btnv_b{border-radius:0}.tp-cbzv{position:relative}.tp-cbzv_h{display:flex}.tp-cbzv_b{margin-right:4px;position:relative;width:var(--bld-us)}.tp-cbzv_b svg{display:block;height:16px;left:50%;margin-left:-8px;margin-top:-8px;position:absolute;top:50%;width:16px}.tp-cbzv_b svg path{stroke:var(--bs-bg);stroke-width:2}.tp-cbzv_t{flex:1}.tp-cbzv_p{height:0;margin-top:0;opacity:0;overflow:hidden;transition:height .2s ease-in-out,opacity .2s linear,margin .2s ease-in-out}.tp-cbzv.tp-cbzv-expanded .tp-cbzv_p{margin-top:var(--bld-s);opacity:1}.tp-cbzv.tp-cbzv-cpl .tp-cbzv_p{overflow:visible}.tp-cbzv .tp-popv{left:calc(-1*var(--cnt-h-p));position:absolute;right:calc(-1*var(--cnt-h-p));top:var(--bld-us)}.tp-cbzpv_t{margin-top:var(--bld-s)}.tp-cbzgv{height:auto;overflow:hidden;position:relative}.tp-cbzgv.tp-v-disabled{opacity:.5}.tp-cbzgv_p{left:16px;position:absolute;right:16px;top:0}.tp-cbzgv_g{cursor:pointer;display:block;height:calc(var(--bld-us)*5);width:100%}.tp-cbzgv_u{opacity:.1;stroke:var(--in-fg);stroke-dasharray:1}.tp-cbzgv_l{fill:rgba(0,0,0,0);stroke:var(--in-fg)}.tp-cbzgv_v{opacity:.5;stroke:var(--in-fg);stroke-dasharray:1}.tp-cbzgv_h{border:var(--in-fg) solid 1px;border-radius:50%;box-sizing:border-box;height:4px;margin-left:-2px;margin-top:-2px;pointer-events:none;position:absolute;width:4px}.tp-cbzgv:focus .tp-cbzgv_h-sel{background-color:var(--in-fg);border-width:0}.tp-cbzprvv{cursor:pointer;height:4px;padding:4px 0;position:relative}.tp-cbzprvv_g{display:block;height:100%;overflow:visible;width:100%}.tp-cbzprvv_t{opacity:.5;stroke:var(--mo-fg)}.tp-cbzprvv_m{background-color:var(--mo-fg);border-radius:50%;height:4px;margin-left:-2px;margin-top:-2px;opacity:0;position:absolute;top:50%;transition:opacity .2s ease-out;width:4px}.tp-cbzprvv_m.tp-cbzprvv_m-a{opacity:1}.tp-fpsv{position:relative}.tp-fpsv_l{bottom:4px;color:var(--mo-fg);line-height:1;right:4px;pointer-events:none;position:absolute}.tp-fpsv_u{margin-left:.2em;opacity:.7}.tp-rslv{cursor:pointer;padding-left:8px;padding-right:8px}.tp-rslv.tp-v-disabled{opacity:.5}.tp-rslv_t{height:calc(var(--bld-us));position:relative}.tp-rslv_t::before{background-color:var(--in-bg);border-radius:1px;content:"";height:2px;margin-top:-1px;position:absolute;top:50%;left:-4px;right:-4px}.tp-rslv_b{bottom:0;top:0;position:absolute}.tp-rslv_b::before{background-color:var(--in-fg);content:"";height:2px;margin-top:-1px;position:absolute;top:50%;left:0;right:0}.tp-rslv_k{height:calc(var(--bld-us) - 8px);margin-top:calc((var(--bld-us) - 8px)/-2);position:absolute;top:50%;width:8px}.tp-rslv_k.tp-rslv_k-min{margin-left:-8px}.tp-rslv_k.tp-rslv_k-max{margin-left:0}.tp-rslv.tp-rslv-zero .tp-rslv_k.tp-rslv_k-min{border-bottom-right-radius:0;border-top-right-radius:0}.tp-rslv.tp-rslv-zero .tp-rslv_k.tp-rslv_k-max{border-bottom-left-radius:0;border-top-left-radius:0}.tp-rsltxtv{display:flex}.tp-rsltxtv_s{flex:1}.tp-rsltxtv_t{flex:1;margin-left:4px}.tp-radv_l{display:block;position:relative}.tp-radv_i{left:0;opacity:0;position:absolute;top:0}.tp-radv_b{opacity:.5}.tp-radv_i:hover+.tp-radv_b{background-color:var(--btn-bg-h)}.tp-radv_i:focus+.tp-radv_b{background-color:var(--btn-bg-f)}.tp-radv_i:active+.tp-radv_b{background-color:var(--btn-bg-a)}.tp-radv_i:checked+.tp-radv_b{opacity:1}.tp-radv_t{bottom:0;color:inherit;left:0;overflow:hidden;position:absolute;right:0;text-align:center;text-overflow:ellipsis;top:0}.tp-radv_i:disabled+.tp-radv_b>.tp-radv_t{opacity:.5}.tp-radgridv{border-radius:var(--elm-br);display:grid;overflow:hidden;gap:2px}.tp-radgridv.tp-v-disabled{opacity:.5}.tp-radgridv .tp-radv_b{border-radius:0}',
|
|
@@ -12500,7 +12500,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12500
12500
|
value: x,
|
|
12501
12501
|
viewProps: d.viewProps
|
|
12502
12502
|
});
|
|
12503
|
-
return new
|
|
12503
|
+
return new St(d.document, {
|
|
12504
12504
|
blade: d.blade,
|
|
12505
12505
|
props: K.fromObject({
|
|
12506
12506
|
label: d.params.label
|
|
@@ -12509,7 +12509,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12509
12509
|
});
|
|
12510
12510
|
},
|
|
12511
12511
|
api(d) {
|
|
12512
|
-
return !(d.controller instanceof
|
|
12512
|
+
return !(d.controller instanceof St) || !(d.controller.valueController instanceof ni) ? null : new Ts(d.controller);
|
|
12513
12513
|
}
|
|
12514
12514
|
};
|
|
12515
12515
|
class we extends s {
|
|
@@ -12788,7 +12788,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12788
12788
|
formatter: u.formatter
|
|
12789
12789
|
})
|
|
12790
12790
|
};
|
|
12791
|
-
this.tc_ = new
|
|
12791
|
+
this.tc_ = new Vt(a, {
|
|
12792
12792
|
assembly: Fi,
|
|
12793
12793
|
axes: [v, v],
|
|
12794
12794
|
parser: u.parser,
|
|
@@ -12867,7 +12867,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12867
12867
|
formatter: T
|
|
12868
12868
|
})
|
|
12869
12869
|
};
|
|
12870
|
-
return new
|
|
12870
|
+
return new Vt(d.document, {
|
|
12871
12871
|
assembly: Fi,
|
|
12872
12872
|
axes: [j, j],
|
|
12873
12873
|
parser: gn,
|
|
@@ -12876,7 +12876,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12876
12876
|
});
|
|
12877
12877
|
}
|
|
12878
12878
|
};
|
|
12879
|
-
class
|
|
12879
|
+
class Ot {
|
|
12880
12880
|
constructor(a) {
|
|
12881
12881
|
this.controller_ = a;
|
|
12882
12882
|
}
|
|
@@ -12894,7 +12894,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12894
12894
|
this.controller_.props.set("title", a);
|
|
12895
12895
|
}
|
|
12896
12896
|
}
|
|
12897
|
-
class
|
|
12897
|
+
class Nt extends c {
|
|
12898
12898
|
constructor(a, u, v, x, T) {
|
|
12899
12899
|
super(a, x, T), this.cell = u, this.index = v;
|
|
12900
12900
|
}
|
|
@@ -12902,7 +12902,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12902
12902
|
class Mn extends s {
|
|
12903
12903
|
constructor(a) {
|
|
12904
12904
|
super(a), this.cellToApiMap_ = /* @__PURE__ */ new Map(), this.controller_.valueController.cellControllers.forEach((v) => {
|
|
12905
|
-
const x = new
|
|
12905
|
+
const x = new Ot(v);
|
|
12906
12906
|
this.cellToApiMap_.set(v, x);
|
|
12907
12907
|
});
|
|
12908
12908
|
}
|
|
@@ -12923,7 +12923,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12923
12923
|
if (!j)
|
|
12924
12924
|
return;
|
|
12925
12925
|
const re = T.cellControllers.indexOf(V);
|
|
12926
|
-
v(new
|
|
12926
|
+
v(new Nt(this, j, [re % T.size[0], Math.floor(re / T.size[0])], x.rawValue, void 0));
|
|
12927
12927
|
});
|
|
12928
12928
|
}
|
|
12929
12929
|
}
|
|
@@ -12987,7 +12987,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
12987
12987
|
v < 0 || (this.value.rawValue = this.cellValues_[v]);
|
|
12988
12988
|
}
|
|
12989
12989
|
}
|
|
12990
|
-
const
|
|
12990
|
+
const Bt = function() {
|
|
12991
12991
|
return {
|
|
12992
12992
|
id: "radiogrid",
|
|
12993
12993
|
type: "blade",
|
|
@@ -13003,7 +13003,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
13003
13003
|
return u ? { params: u } : null;
|
|
13004
13004
|
},
|
|
13005
13005
|
controller(d) {
|
|
13006
|
-
return new
|
|
13006
|
+
return new St(d.document, {
|
|
13007
13007
|
blade: d.blade,
|
|
13008
13008
|
props: K.fromObject({
|
|
13009
13009
|
label: d.params.label
|
|
@@ -13017,7 +13017,7 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
13017
13017
|
});
|
|
13018
13018
|
},
|
|
13019
13019
|
api(d) {
|
|
13020
|
-
return !(d.controller instanceof
|
|
13020
|
+
return !(d.controller instanceof St) || !(d.controller.valueController instanceof ri) ? null : new Mn(d.controller);
|
|
13021
13021
|
}
|
|
13022
13022
|
};
|
|
13023
13023
|
}();
|
|
@@ -13068,27 +13068,27 @@ var Fh = _o.exports, wo = { exports: {} };
|
|
|
13068
13068
|
}
|
|
13069
13069
|
}), Is = [
|
|
13070
13070
|
xr,
|
|
13071
|
-
|
|
13071
|
+
Dt,
|
|
13072
13072
|
Bi,
|
|
13073
13073
|
si,
|
|
13074
|
-
|
|
13074
|
+
Bt,
|
|
13075
13075
|
Rr,
|
|
13076
13076
|
Sr,
|
|
13077
13077
|
Lr
|
|
13078
13078
|
];
|
|
13079
|
-
r.ButtonCellApi = Cs, r.ButtonGridApi = Ps, r.ButtonGridController = Si, r.CubicBezier = Tt, r.CubicBezierApi = Ts, r.CubicBezierAssembly = Ri, r.CubicBezierController = ni, r.CubicBezierGraphController = ut, r.CubicBezierGraphView = De, r.CubicBezierPickerController = Ss, r.CubicBezierPickerView = As, r.CubicBezierPreviewView = Qt, r.CubicBezierView = ks, r.FpsGraphBladeApi = we, r.FpsGraphController = Ni, r.FpsView = Ye, r.Fpswatch = Re, r.Interval = qe, r.IntervalAssembly = Fi, r.IntervalConstraint = kn, r.RadioCellApi =
|
|
13079
|
+
r.ButtonCellApi = Cs, r.ButtonGridApi = Ps, r.ButtonGridController = Si, r.CubicBezier = Tt, r.CubicBezierApi = Ts, r.CubicBezierAssembly = Ri, r.CubicBezierController = ni, r.CubicBezierGraphController = ut, r.CubicBezierGraphView = De, r.CubicBezierPickerController = Ss, r.CubicBezierPickerView = As, r.CubicBezierPreviewView = Qt, r.CubicBezierView = ks, r.FpsGraphBladeApi = we, r.FpsGraphController = Ni, r.FpsView = Ye, r.Fpswatch = Re, r.Interval = qe, r.IntervalAssembly = Fi, r.IntervalConstraint = kn, r.RadioCellApi = Ot, r.RadioController = Vs, r.RadioGridApi = Mn, r.RadioGridController = ri, r.RadioView = Rs, r.RangeSliderController = ji, r.RangeSliderTextController = wt, r.RangeSliderTextView = ii, r.RangeSliderView = An, r.TpRadioGridChangeEvent = Nt, r.plugins = Is, Object.defineProperty(r, "__esModule", { value: !0 });
|
|
13080
13080
|
});
|
|
13081
13081
|
})(wo, wo.exports);
|
|
13082
13082
|
var ol = wo.exports;
|
|
13083
|
-
const
|
|
13083
|
+
const jh = /* @__PURE__ */ wh(ol), Uh = /* @__PURE__ */ qu({
|
|
13084
13084
|
__proto__: null,
|
|
13085
|
-
default:
|
|
13085
|
+
default: jh
|
|
13086
13086
|
}, [ol]);
|
|
13087
13087
|
let On, js;
|
|
13088
|
-
const
|
|
13089
|
-
On || (On = new
|
|
13088
|
+
const Bd = (f = "tres-container") => {
|
|
13089
|
+
On || (On = new zh.Pane({
|
|
13090
13090
|
container: document.querySelector(f) || void 0
|
|
13091
|
-
}), On.registerPlugin(
|
|
13091
|
+
}), On.registerPlugin(Uh), js = On.addBlade({
|
|
13092
13092
|
view: "fpsgraph",
|
|
13093
13093
|
label: "fpsgraph"
|
|
13094
13094
|
}));
|
|
@@ -13102,7 +13102,7 @@ const Nd = (f = "tres-container") => {
|
|
|
13102
13102
|
i();
|
|
13103
13103
|
}), { pane: On, fpsGraph: js, disposeTweakPane: i };
|
|
13104
13104
|
};
|
|
13105
|
-
function
|
|
13105
|
+
function Fd(f, i) {
|
|
13106
13106
|
const r = nt(i), s = new Hu(r.value), o = ou({});
|
|
13107
13107
|
f.forEach((p) => {
|
|
13108
13108
|
const h = s.clipAction(p, r.value);
|
|
@@ -13117,31 +13117,31 @@ function Bd(f, i) {
|
|
|
13117
13117
|
};
|
|
13118
13118
|
}
|
|
13119
13119
|
let Us = null;
|
|
13120
|
-
function
|
|
13120
|
+
function Gh(f, i) {
|
|
13121
13121
|
return (r) => {
|
|
13122
|
-
i && i(r), f.draco && (Us || (Us = new
|
|
13122
|
+
i && i(r), f.draco && (Us || (Us = new xh()), Us.setDecoderPath(f.decoderPath || "https://www.gstatic.com/draco/versioned/decoders/1.4.3/"), r.setDRACOLoader(Us));
|
|
13123
13123
|
};
|
|
13124
13124
|
}
|
|
13125
|
-
async function
|
|
13125
|
+
async function Hh(f, i = {
|
|
13126
13126
|
draco: !1
|
|
13127
13127
|
}, r) {
|
|
13128
|
-
return await xo(
|
|
13128
|
+
return await xo(wp, f, Gh(i, r));
|
|
13129
13129
|
}
|
|
13130
|
-
const
|
|
13130
|
+
const zd = Ce({
|
|
13131
13131
|
name: "GLTFModel",
|
|
13132
13132
|
props: ["path", "draco", "decoderPath"],
|
|
13133
13133
|
async setup(f, { expose: i }) {
|
|
13134
13134
|
const { state: r } = Et(), s = nt();
|
|
13135
13135
|
i({ model: s });
|
|
13136
|
-
const { scene: o } = await
|
|
13136
|
+
const { scene: o } = await Hh(f.path, { draco: f.draco, decoderPath: f.decoderPath });
|
|
13137
13137
|
return s.value = o, r.scene && r.scene.add(o), () => {
|
|
13138
13138
|
};
|
|
13139
13139
|
}
|
|
13140
13140
|
});
|
|
13141
|
-
async function
|
|
13142
|
-
return await xo(
|
|
13141
|
+
async function Kh(f) {
|
|
13142
|
+
return await xo(rh, f);
|
|
13143
13143
|
}
|
|
13144
|
-
const
|
|
13144
|
+
const jd = Ce({
|
|
13145
13145
|
name: "FBXModel",
|
|
13146
13146
|
props: ["path"],
|
|
13147
13147
|
async setup(f, { expose: i }) {
|
|
@@ -13150,10 +13150,10 @@ const zd = Ce({
|
|
|
13150
13150
|
function o() {
|
|
13151
13151
|
return s;
|
|
13152
13152
|
}
|
|
13153
|
-
return i({ getModel: o }), s = await
|
|
13153
|
+
return i({ getModel: o }), s = await Kh(f.path), r.scene && s.isObject3D && r.scene.add(s), () => {
|
|
13154
13154
|
};
|
|
13155
13155
|
}
|
|
13156
|
-
}),
|
|
13156
|
+
}), $h = ["position", "a-scale"], Ud = /* @__PURE__ */ Ce({
|
|
13157
13157
|
__name: "Stars",
|
|
13158
13158
|
props: {
|
|
13159
13159
|
size: { default: 0.1 },
|
|
@@ -13188,11 +13188,11 @@ const zd = Ce({
|
|
|
13188
13188
|
be("TresBufferGeometry", {
|
|
13189
13189
|
position: [Se(m), 3],
|
|
13190
13190
|
"a-scale": [Se(g), 1]
|
|
13191
|
-
}, null, 8,
|
|
13191
|
+
}, null, 8, $h),
|
|
13192
13192
|
be("TresPointsMaterial", au(lu(Se(_))), null, 16)
|
|
13193
13193
|
], 512));
|
|
13194
13194
|
}
|
|
13195
|
-
}),
|
|
13195
|
+
}), Xh = ["args", "center"], Gd = /* @__PURE__ */ Ce({
|
|
13196
13196
|
__name: "Text3D",
|
|
13197
13197
|
props: {
|
|
13198
13198
|
font: null,
|
|
@@ -13212,7 +13212,7 @@ const zd = Ce({
|
|
|
13212
13212
|
let r, s;
|
|
13213
13213
|
const o = f, { extend: c } = Et();
|
|
13214
13214
|
c({ TextGeometry: wa });
|
|
13215
|
-
const p = new
|
|
13215
|
+
const p = new bh(), h = cu(), m = pn(() => {
|
|
13216
13216
|
var y;
|
|
13217
13217
|
return o.text ? o.text : h.default ? (y = h.default()[0].children) == null ? void 0 : y.trim() : o.needUpdates ? "" : "TresJS";
|
|
13218
13218
|
}), g = Oe();
|
|
@@ -13249,11 +13249,11 @@ const zd = Ce({
|
|
|
13249
13249
|
key: 0,
|
|
13250
13250
|
args: [Se(m), Se(w)],
|
|
13251
13251
|
center: f.center
|
|
13252
|
-
}, null, 8,
|
|
13252
|
+
}, null, 8, Xh)) : es("", !0),
|
|
13253
13253
|
Ge(y.$slots, "default")
|
|
13254
13254
|
], 512)) : es("", !0);
|
|
13255
13255
|
}
|
|
13256
|
-
}),
|
|
13256
|
+
}), Yh = ["rotation"], qh = ["args"], Qh = ["color"], Hd = /* @__PURE__ */ Ce({
|
|
13257
13257
|
__name: "Plane",
|
|
13258
13258
|
props: {
|
|
13259
13259
|
args: { default: () => [1, 1] },
|
|
@@ -13268,13 +13268,13 @@ const zd = Ce({
|
|
|
13268
13268
|
ref: r,
|
|
13269
13269
|
rotation: [-Math.PI / 2, 0, 0]
|
|
13270
13270
|
}, s.$attrs), [
|
|
13271
|
-
be("TresPlaneGeometry", { args: f.args }, null, 8,
|
|
13271
|
+
be("TresPlaneGeometry", { args: f.args }, null, 8, qh),
|
|
13272
13272
|
Ge(s.$slots, "default", {}, () => [
|
|
13273
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13273
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, Qh)
|
|
13274
13274
|
])
|
|
13275
|
-
], 16,
|
|
13275
|
+
], 16, Yh));
|
|
13276
13276
|
}
|
|
13277
|
-
}),
|
|
13277
|
+
}), Zh = ["args"], Wh = ["color"], Kd = /* @__PURE__ */ Ce({
|
|
13278
13278
|
__name: "Box",
|
|
13279
13279
|
props: {
|
|
13280
13280
|
args: { default: () => [1, 1, 1] },
|
|
@@ -13288,13 +13288,13 @@ const zd = Ce({
|
|
|
13288
13288
|
ref_key: "boxRef",
|
|
13289
13289
|
ref: r
|
|
13290
13290
|
}, s.$attrs), [
|
|
13291
|
-
be("TresBoxGeometry", { args: f.args }, null, 8,
|
|
13291
|
+
be("TresBoxGeometry", { args: f.args }, null, 8, Zh),
|
|
13292
13292
|
Ge(s.$slots, "default", {}, () => [
|
|
13293
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13293
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, Wh)
|
|
13294
13294
|
])
|
|
13295
13295
|
], 16));
|
|
13296
13296
|
}
|
|
13297
|
-
}),
|
|
13297
|
+
}), Jh = ["args"], ed = ["color"], $d = /* @__PURE__ */ Ce({
|
|
13298
13298
|
__name: "Sphere",
|
|
13299
13299
|
props: {
|
|
13300
13300
|
args: { default: () => [2, 32, 16] },
|
|
@@ -13308,13 +13308,13 @@ const zd = Ce({
|
|
|
13308
13308
|
ref_key: "sphereRef",
|
|
13309
13309
|
ref: r
|
|
13310
13310
|
}, s.$attrs), [
|
|
13311
|
-
be("TresSphereGeometry", { args: f.args }, null, 8,
|
|
13311
|
+
be("TresSphereGeometry", { args: f.args }, null, 8, Jh),
|
|
13312
13312
|
Ge(s.$slots, "default", {}, () => [
|
|
13313
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13313
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, ed)
|
|
13314
13314
|
])
|
|
13315
13315
|
], 16));
|
|
13316
13316
|
}
|
|
13317
|
-
}),
|
|
13317
|
+
}), td = ["args"], nd = ["color"], Xd = /* @__PURE__ */ Ce({
|
|
13318
13318
|
__name: "Torus",
|
|
13319
13319
|
props: {
|
|
13320
13320
|
args: { default: () => [1, 1, 16, 80] },
|
|
@@ -13328,13 +13328,13 @@ const zd = Ce({
|
|
|
13328
13328
|
ref_key: "torusRef",
|
|
13329
13329
|
ref: r
|
|
13330
13330
|
}, s.$attrs), [
|
|
13331
|
-
be("TresTorusGeometry", { args: f.args }, null, 8,
|
|
13331
|
+
be("TresTorusGeometry", { args: f.args }, null, 8, td),
|
|
13332
13332
|
Ge(s.$slots, "default", {}, () => [
|
|
13333
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13333
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, nd)
|
|
13334
13334
|
])
|
|
13335
13335
|
], 16));
|
|
13336
13336
|
}
|
|
13337
|
-
}),
|
|
13337
|
+
}), id = ["args"], sd = ["color"], Yd = /* @__PURE__ */ Ce({
|
|
13338
13338
|
__name: "TorusKnot",
|
|
13339
13339
|
props: {
|
|
13340
13340
|
args: { default: () => [1, 0.4, 64, 8] },
|
|
@@ -13348,13 +13348,13 @@ const zd = Ce({
|
|
|
13348
13348
|
ref_key: "torusKnotRef",
|
|
13349
13349
|
ref: r
|
|
13350
13350
|
}, s.$attrs), [
|
|
13351
|
-
be("TresTorusKnotGeometry", { args: f.args }, null, 8,
|
|
13351
|
+
be("TresTorusKnotGeometry", { args: f.args }, null, 8, id),
|
|
13352
13352
|
Ge(s.$slots, "default", {}, () => [
|
|
13353
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13353
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, sd)
|
|
13354
13354
|
])
|
|
13355
13355
|
], 16));
|
|
13356
13356
|
}
|
|
13357
|
-
}),
|
|
13357
|
+
}), rd = ["args"], od = ["color"], qd = /* @__PURE__ */ Ce({
|
|
13358
13358
|
__name: "Circle",
|
|
13359
13359
|
props: {
|
|
13360
13360
|
args: { default: () => [1, 32, 0, Math.PI * 2] },
|
|
@@ -13368,13 +13368,13 @@ const zd = Ce({
|
|
|
13368
13368
|
ref_key: "circleRef",
|
|
13369
13369
|
ref: r
|
|
13370
13370
|
}, s.$attrs), [
|
|
13371
|
-
be("TresCircleGeometry", { args: f.args }, null, 8,
|
|
13371
|
+
be("TresCircleGeometry", { args: f.args }, null, 8, rd),
|
|
13372
13372
|
Ge(s.$slots, "default", {}, () => [
|
|
13373
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13373
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, od)
|
|
13374
13374
|
])
|
|
13375
13375
|
], 16));
|
|
13376
13376
|
}
|
|
13377
|
-
}),
|
|
13377
|
+
}), ad = ["args"], ld = ["color"], Qd = /* @__PURE__ */ Ce({
|
|
13378
13378
|
__name: "Cone",
|
|
13379
13379
|
props: {
|
|
13380
13380
|
args: { default: () => [1, 1, 12, !1, 0, Math.PI * 2] },
|
|
@@ -13388,13 +13388,13 @@ const zd = Ce({
|
|
|
13388
13388
|
ref_key: "coneRef",
|
|
13389
13389
|
ref: r
|
|
13390
13390
|
}, s.$attrs), [
|
|
13391
|
-
be("TresConeGeometry", { args: f.args }, null, 8,
|
|
13391
|
+
be("TresConeGeometry", { args: f.args }, null, 8, ad),
|
|
13392
13392
|
Ge(s.$slots, "default", {}, () => [
|
|
13393
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13393
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, ld)
|
|
13394
13394
|
])
|
|
13395
13395
|
], 16));
|
|
13396
13396
|
}
|
|
13397
|
-
}),
|
|
13397
|
+
}), cd = ["args"], ud = ["color"], Zd = /* @__PURE__ */ Ce({
|
|
13398
13398
|
__name: "Tube",
|
|
13399
13399
|
props: {
|
|
13400
13400
|
args: { default: () => [
|
|
@@ -13414,13 +13414,13 @@ const zd = Ce({
|
|
|
13414
13414
|
ref_key: "tubeRef",
|
|
13415
13415
|
ref: r
|
|
13416
13416
|
}, s.$attrs), [
|
|
13417
|
-
be("TresTubeGeometry", { args: f.args }, null, 8,
|
|
13417
|
+
be("TresTubeGeometry", { args: f.args }, null, 8, cd),
|
|
13418
13418
|
Ge(s.$slots, "default", {}, () => [
|
|
13419
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13419
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, ud)
|
|
13420
13420
|
])
|
|
13421
13421
|
], 16));
|
|
13422
13422
|
}
|
|
13423
|
-
}),
|
|
13423
|
+
}), pd = ["args"], hd = ["color"], Wd = /* @__PURE__ */ Ce({
|
|
13424
13424
|
__name: "Ring",
|
|
13425
13425
|
props: {
|
|
13426
13426
|
args: { default: () => [0.5, 1, 32] },
|
|
@@ -13434,13 +13434,13 @@ const zd = Ce({
|
|
|
13434
13434
|
ref_key: "ringRef",
|
|
13435
13435
|
ref: r
|
|
13436
13436
|
}, s.$attrs), [
|
|
13437
|
-
be("TresRingGeometry", { args: f.args }, null, 8,
|
|
13437
|
+
be("TresRingGeometry", { args: f.args }, null, 8, pd),
|
|
13438
13438
|
Ge(s.$slots, "default", {}, () => [
|
|
13439
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13439
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, hd)
|
|
13440
13440
|
])
|
|
13441
13441
|
], 16));
|
|
13442
13442
|
}
|
|
13443
|
-
}),
|
|
13443
|
+
}), dd = ["rotation"], md = ["args"], fd = ["color"], Jd = /* @__PURE__ */ Ce({
|
|
13444
13444
|
__name: "Tetrahedron",
|
|
13445
13445
|
props: {
|
|
13446
13446
|
args: { default: () => [1, 0] },
|
|
@@ -13455,13 +13455,13 @@ const zd = Ce({
|
|
|
13455
13455
|
ref: r,
|
|
13456
13456
|
rotation: [-Math.PI / 2, 0, 0]
|
|
13457
13457
|
}, s.$attrs), [
|
|
13458
|
-
be("TresTetrahedronGeometry", { args: f.args }, null, 8,
|
|
13458
|
+
be("TresTetrahedronGeometry", { args: f.args }, null, 8, md),
|
|
13459
13459
|
Ge(s.$slots, "default", {}, () => [
|
|
13460
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13460
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, fd)
|
|
13461
13461
|
])
|
|
13462
|
-
], 16,
|
|
13462
|
+
], 16, dd));
|
|
13463
13463
|
}
|
|
13464
|
-
}),
|
|
13464
|
+
}), vd = ["args"], bd = ["color"], em = /* @__PURE__ */ Ce({
|
|
13465
13465
|
__name: "Icosahedron",
|
|
13466
13466
|
props: {
|
|
13467
13467
|
args: { default: () => [1, 0] },
|
|
@@ -13475,13 +13475,13 @@ const zd = Ce({
|
|
|
13475
13475
|
ref_key: "icosahedronRef",
|
|
13476
13476
|
ref: r
|
|
13477
13477
|
}, s.$attrs), [
|
|
13478
|
-
be("TresIcosahedronGeometry", { args: f.args }, null, 8,
|
|
13478
|
+
be("TresIcosahedronGeometry", { args: f.args }, null, 8, vd),
|
|
13479
13479
|
Ge(s.$slots, "default", {}, () => [
|
|
13480
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13480
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, bd)
|
|
13481
13481
|
])
|
|
13482
13482
|
], 16));
|
|
13483
13483
|
}
|
|
13484
|
-
}),
|
|
13484
|
+
}), gd = ["args"], _d = ["color"], tm = /* @__PURE__ */ Ce({
|
|
13485
13485
|
__name: "Octahedron",
|
|
13486
13486
|
props: {
|
|
13487
13487
|
args: { default: () => [1, 0] },
|
|
@@ -13495,13 +13495,13 @@ const zd = Ce({
|
|
|
13495
13495
|
ref_key: "octahedronRef",
|
|
13496
13496
|
ref: r
|
|
13497
13497
|
}, s.$attrs), [
|
|
13498
|
-
be("TresOctahedronGeometry", { args: f.args }, null, 8,
|
|
13498
|
+
be("TresOctahedronGeometry", { args: f.args }, null, 8, gd),
|
|
13499
13499
|
Ge(s.$slots, "default", {}, () => [
|
|
13500
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13500
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, _d)
|
|
13501
13501
|
])
|
|
13502
13502
|
], 16));
|
|
13503
13503
|
}
|
|
13504
|
-
}),
|
|
13504
|
+
}), wd = ["args"], yd = ["color"], nm = /* @__PURE__ */ Ce({
|
|
13505
13505
|
__name: "Dodecahedron",
|
|
13506
13506
|
props: {
|
|
13507
13507
|
args: { default: () => [1, 0] },
|
|
@@ -13515,22 +13515,22 @@ const zd = Ce({
|
|
|
13515
13515
|
ref_key: "dodecahedronRef",
|
|
13516
13516
|
ref: r
|
|
13517
13517
|
}, s.$attrs), [
|
|
13518
|
-
be("TresDodecahedronGeometry", { args: f.args }, null, 8,
|
|
13518
|
+
be("TresDodecahedronGeometry", { args: f.args }, null, 8, wd),
|
|
13519
13519
|
Ge(s.$slots, "default", {}, () => [
|
|
13520
|
-
be("TresMeshBasicMaterial", { color: f.color }, null, 8,
|
|
13520
|
+
be("TresMeshBasicMaterial", { color: f.color }, null, 8, yd)
|
|
13521
13521
|
])
|
|
13522
13522
|
], 16));
|
|
13523
13523
|
}
|
|
13524
13524
|
}), ao = {
|
|
13525
13525
|
sunset: "venice/venice_sunset_4k.hdr"
|
|
13526
13526
|
};
|
|
13527
|
-
async function
|
|
13527
|
+
async function xd({
|
|
13528
13528
|
files: f = ["/px.png", "/nx.png", "/py.png", "/ny.png", "/pz.png", "/nz.png"],
|
|
13529
13529
|
blur: i = 0,
|
|
13530
13530
|
background: r = !1,
|
|
13531
13531
|
path: s = "/",
|
|
13532
13532
|
preset: o = void 0,
|
|
13533
|
-
|
|
13533
|
+
colorSpace: c = void 0
|
|
13534
13534
|
}) {
|
|
13535
13535
|
const { state: p } = Et();
|
|
13536
13536
|
if (o) {
|
|
@@ -13539,23 +13539,23 @@ async function yd({
|
|
|
13539
13539
|
f = ao[o], s = "https://raw.githubusercontent.com/Tresjs/assets/main/textures/hdr/";
|
|
13540
13540
|
}
|
|
13541
13541
|
const h = Array.isArray(f), g = await xo(
|
|
13542
|
-
h ?
|
|
13542
|
+
h ? Yu : yh,
|
|
13543
13543
|
h ? [f] : f,
|
|
13544
13544
|
(w) => {
|
|
13545
|
-
s && w.setPath(s), c && (w.
|
|
13545
|
+
s && w.setPath(s), c && (w.colorSpace = c);
|
|
13546
13546
|
}
|
|
13547
13547
|
), _ = h ? g[0] : g;
|
|
13548
|
-
return _ && (_.mapping = h ? $u : za, _.
|
|
13548
|
+
return _ && (_.mapping = h ? $u : za, _.colorSpace = c ?? h ? Xu : ja), p.scene && (p.scene.environment = _, r !== void 0 && (p.scene.background = _), i && (p.scene.backgroundBlurriness = i | 0)), _;
|
|
13549
13549
|
}
|
|
13550
|
-
const
|
|
13550
|
+
const im = Ce({
|
|
13551
13551
|
name: "Environment",
|
|
13552
13552
|
props: ["background", "blur", "files", "encoding", "path", "preset"],
|
|
13553
13553
|
async setup(f, { expose: i }) {
|
|
13554
13554
|
let r = null;
|
|
13555
|
-
return i({ getTexture: () => r }), r = await
|
|
13555
|
+
return i({ getTexture: () => r }), r = await xd(f), () => {
|
|
13556
13556
|
};
|
|
13557
13557
|
}
|
|
13558
|
-
}),
|
|
13558
|
+
}), Ed = ["position"], Cd = ["position"], Pd = ["scale"], Td = ["map", "map-encoding", "depth-test", "color", "opacity"], sm = /* @__PURE__ */ Ce({
|
|
13559
13559
|
__name: "Smoke",
|
|
13560
13560
|
props: {
|
|
13561
13561
|
color: { default: "#ffffff" },
|
|
@@ -13581,7 +13581,7 @@ const nm = Ce({
|
|
|
13581
13581
|
rotation: Math.max(2e-3, 5e-3 * Math.random()) * o.speed
|
|
13582
13582
|
})), m = (C, L) => C / 6 * L * o.opacity, { map: g } = ([r, s] = ka(() => mu({ map: o.texture })), r = await r, s(), r), { state: _ } = Et(), w = pn(() => {
|
|
13583
13583
|
var C;
|
|
13584
|
-
return (C = _.renderer) == null ? void 0 : C.
|
|
13584
|
+
return (C = _.renderer) == null ? void 0 : C.outputColorSpace;
|
|
13585
13585
|
}), { onLoop: y } = rs();
|
|
13586
13586
|
return y(() => {
|
|
13587
13587
|
var C, L;
|
|
@@ -13604,7 +13604,7 @@ const nm = Ce({
|
|
|
13604
13604
|
be("TresPlaneGeometry", {
|
|
13605
13605
|
scale: [S, S, S],
|
|
13606
13606
|
rotation: [0, 0, 0]
|
|
13607
|
-
}, null, 8,
|
|
13607
|
+
}, null, 8, Pd),
|
|
13608
13608
|
be("TresMeshStandardMaterial", {
|
|
13609
13609
|
map: Se(g),
|
|
13610
13610
|
"map-encoding": Se(w),
|
|
@@ -13613,12 +13613,12 @@ const nm = Ce({
|
|
|
13613
13613
|
"depth-write": !1,
|
|
13614
13614
|
transparent: "",
|
|
13615
13615
|
opacity: m(S, N)
|
|
13616
|
-
}, null, 8,
|
|
13617
|
-
], 8,
|
|
13618
|
-
], 8,
|
|
13616
|
+
}, null, 8, Td)
|
|
13617
|
+
], 8, Cd))), 128))
|
|
13618
|
+
], 8, Ed)
|
|
13619
13619
|
], 16));
|
|
13620
13620
|
}
|
|
13621
|
-
}),
|
|
13621
|
+
}), rm = /* @__PURE__ */ Ce({
|
|
13622
13622
|
__name: "Levioso",
|
|
13623
13623
|
props: {
|
|
13624
13624
|
speed: { default: 1 },
|
|
@@ -13648,7 +13648,7 @@ const nm = Ce({
|
|
|
13648
13648
|
], 16));
|
|
13649
13649
|
}
|
|
13650
13650
|
});
|
|
13651
|
-
class
|
|
13651
|
+
class kd extends Po {
|
|
13652
13652
|
constructor(r = {}) {
|
|
13653
13653
|
super(r);
|
|
13654
13654
|
Qr(this, "_time");
|
|
@@ -13683,7 +13683,7 @@ class Td extends Po {
|
|
|
13683
13683
|
this._factor.value = r;
|
|
13684
13684
|
}
|
|
13685
13685
|
}
|
|
13686
|
-
const
|
|
13686
|
+
const Ad = ["factor"], om = /* @__PURE__ */ Ce({
|
|
13687
13687
|
__name: "index",
|
|
13688
13688
|
props: {
|
|
13689
13689
|
speed: { default: 1 },
|
|
@@ -13691,7 +13691,7 @@ const kd = ["factor"], rm = /* @__PURE__ */ Ce({
|
|
|
13691
13691
|
},
|
|
13692
13692
|
setup(f) {
|
|
13693
13693
|
const i = f, r = Oe(), { extend: s } = Et();
|
|
13694
|
-
s({ MeshWobbleMaterial:
|
|
13694
|
+
s({ MeshWobbleMaterial: kd });
|
|
13695
13695
|
const { onLoop: o } = rs();
|
|
13696
13696
|
return o(({ elapsed: c }) => {
|
|
13697
13697
|
r.value && (r.value.time = c * (i == null ? void 0 : i.speed));
|
|
@@ -13699,40 +13699,40 @@ const kd = ["factor"], rm = /* @__PURE__ */ Ce({
|
|
|
13699
13699
|
ref_key: "materialRef",
|
|
13700
13700
|
ref: r,
|
|
13701
13701
|
factor: f.factor
|
|
13702
|
-
}, c.$attrs), null, 16,
|
|
13702
|
+
}, c.$attrs), null, 16, Ad));
|
|
13703
13703
|
}
|
|
13704
13704
|
});
|
|
13705
13705
|
export {
|
|
13706
|
-
|
|
13707
|
-
|
|
13708
|
-
|
|
13709
|
-
|
|
13710
|
-
|
|
13711
|
-
|
|
13712
|
-
|
|
13713
|
-
|
|
13714
|
-
|
|
13715
|
-
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13706
|
+
Kd as Box,
|
|
13707
|
+
qd as Circle,
|
|
13708
|
+
Qd as Cone,
|
|
13709
|
+
nm as Dodecahedron,
|
|
13710
|
+
im as Environment,
|
|
13711
|
+
jd as FBXModel,
|
|
13712
|
+
zd as GLTFModel,
|
|
13713
|
+
em as Icosahedron,
|
|
13714
|
+
rm as Levioso,
|
|
13715
|
+
Id as MapControls,
|
|
13716
|
+
om as MeshWobbleMaterial,
|
|
13717
|
+
tm as Octahedron,
|
|
13718
|
+
Vd as OrbitControls,
|
|
13719
|
+
Nd as PamCameraMouse,
|
|
13720
|
+
Hd as Plane,
|
|
13721
|
+
Dd as PointerLockControls,
|
|
13722
|
+
Wd as Ring,
|
|
13723
|
+
sm as Smoke,
|
|
13724
|
+
$d as Sphere,
|
|
13725
|
+
Ud as Stars,
|
|
13726
|
+
Jd as Tetrahedron,
|
|
13727
|
+
Gd as Text3D,
|
|
13728
|
+
Xd as Torus,
|
|
13729
|
+
Yd as TorusKnot,
|
|
13730
|
+
Od as TransformControls,
|
|
13731
|
+
Zd as Tube,
|
|
13732
|
+
Fd as useAnimations,
|
|
13733
|
+
xd as useEnvironment,
|
|
13734
|
+
Kh as useFBX,
|
|
13735
|
+
Hh as useGLTF,
|
|
13736
|
+
Fh as usePamCameraMouse,
|
|
13737
|
+
Bd as useTweakPane
|
|
13738
13738
|
};
|