shop-components 0.4.13 → 0.4.14
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/dev/src/amr.d.ts +1 -0
- package/dist/dev/src/goods-box.d.ts +1 -0
- package/dist/shop-components.cjs +2 -2
- package/dist/shop-components.mjs +599 -585
- package/dist/test2.glb +0 -0
- package/dist/test3.glb +0 -0
- package/package.json +1 -1
package/dist/shop-components.mjs
CHANGED
|
@@ -10,26 +10,26 @@ var H = (o, e, t) => (nr(o, e, "read from private field"), t ? t.call(o) : e.get
|
|
|
10
10
|
e instanceof WeakSet ? e.add(o) : e.set(o, t);
|
|
11
11
|
}, Ie = (o, e, t, i) => (nr(o, e, "write to private field"), i ? i.call(o, t) : e.set(o, t), t);
|
|
12
12
|
import * as k from "three";
|
|
13
|
-
import { BufferAttribute as fe, BufferGeometry as le, Matrix4 as J, Matrix3 as un, Vector3 as b, Vector4 as it, MeshBasicMaterial as
|
|
13
|
+
import { BufferAttribute as fe, BufferGeometry as le, Matrix4 as J, Matrix3 as un, Vector3 as b, Vector4 as it, MeshBasicMaterial as oi, Mesh as X, ShaderMaterial as Bt, NoBlending as ri, WebGLRenderTarget as Oe, FloatType as pe, RGBAFormat as te, NearestFilter as ee, Vector2 as z, PerspectiveCamera as qi, DataUtils as Be, DataTexture as ze, HalfFloatType as Se, LinearFilter as Te, RepeatWrapping as et, RedFormat as ws, ClampToEdgeWrapping as We, Source as Qn, Quaternion as fn, DataArrayTexture as Yn, DoubleSide as ai, BackSide as dn, FrontSide as bs, Color as Z, WebGLArrayRenderTarget as Zn, UnsignedByteType as Vs, NoToneMapping as Kn, RGFormat as Xn, NormalBlending as pn, Spherical as Jn, EquirectangularReflectionMapping as Oi, LinearMipMapLinearFilter as $n, Clock as ji, Scene as As, AdditiveBlending as eo, Box3 as Q, Sphere as Qi, CompressedTexture as to, Texture as Qe, InterleavedBuffer as io, InterleavedBufferAttribute as so, TextureLoader as mn, MeshStandardMaterial as ro, Group as ge, LineSegments as Ts, LineBasicMaterial as or, Object3D as li, LineDashedMaterial as Ss, RingGeometry as ar, BoxGeometry as no, EdgesGeometry as oo, SRGBColorSpace as ni, AnimationMixer as lr, VideoTexture as ao, LoopRepeat as lo, LoopOnce as co, Plane as Gs, Line3 as Ue, Triangle as Xt, MathUtils as Ye, DirectionalLight as ho, NoColorSpace as cr, PlaneGeometry as zi, MeshLambertMaterial as uo, DirectionalLightHelper as fo, PlaneHelper as po, UniformsUtils as mo, WebGLRenderer as go, OrthographicCamera as Ms, Raycaster as vo, MeshPhysicalMaterial as _o, ACESFilmicToneMapping as yo, Euler as xo } from "three";
|
|
14
14
|
import { HDRLoader as hr } from "three/examples/jsm/loaders/HDRLoader.js";
|
|
15
|
-
import { OrbitControls as
|
|
16
|
-
import { CSS2DObject as He, CSS2DRenderer as
|
|
17
|
-
import { Font as
|
|
15
|
+
import { OrbitControls as wo } from "three/examples/jsm/controls/OrbitControls";
|
|
16
|
+
import { CSS2DObject as He, CSS2DRenderer as bo } from "three/examples/jsm/renderers/CSS2DRenderer";
|
|
17
|
+
import { Font as Ao } from "three/examples/jsm/loaders/FontLoader";
|
|
18
18
|
import { GLTFLoader as qs } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
19
|
-
import { MeshoptDecoder as
|
|
20
|
-
import { DRACOLoader as
|
|
21
|
-
import { GLTFLoader as
|
|
22
|
-
import { DRACOLoader as
|
|
23
|
-
import { DRACOExporter as
|
|
24
|
-
import { GLTFExporter as
|
|
19
|
+
import { MeshoptDecoder as To } from "three/examples/jsm/libs/meshopt_decoder.module.js";
|
|
20
|
+
import { DRACOLoader as So } from "three/examples/jsm/loaders/DRACOLoader.js";
|
|
21
|
+
import { GLTFLoader as Mo } from "three/examples/jsm/loaders/GLTFLoader";
|
|
22
|
+
import { DRACOLoader as Co } from "three/examples/jsm/loaders/DRACOLoader";
|
|
23
|
+
import { DRACOExporter as Io } from "three/examples/jsm/exporters/DRACOExporter";
|
|
24
|
+
import { GLTFExporter as Ro } from "three/examples/jsm/exporters/GLTFExporter";
|
|
25
25
|
import * as $i from "three/examples/jsm/utils/SkeletonUtils.js";
|
|
26
|
-
import { Line2 as
|
|
27
|
-
import { LineMaterial as
|
|
26
|
+
import { Line2 as Do } from "three/examples/jsm/lines/Line2.js";
|
|
27
|
+
import { LineMaterial as Po } from "three/examples/jsm/lines/LineMaterial.js";
|
|
28
28
|
import { LineGeometry as ur } from "three/examples/jsm/lines/LineGeometry.js";
|
|
29
|
-
import { CSS3DObject as
|
|
29
|
+
import { CSS3DObject as Lo } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
30
30
|
import "three/examples/jsm/utils/BufferGeometryUtils";
|
|
31
|
-
import { FullScreenQuad as
|
|
32
|
-
import { SAH as
|
|
31
|
+
import { FullScreenQuad as ui } from "three/examples/jsm/postprocessing/Pass";
|
|
32
|
+
import { SAH as Eo, MeshBVH as Fo, FloatVertexAttributeTexture as ko, MeshBVHUniformStruct as Bo, UIntVertexAttributeTexture as Oo, BVHShaderGLSL as es } from "three-mesh-bvh";
|
|
33
33
|
import { FullScreenQuad as Et } from "three/examples/jsm/postprocessing/Pass.js";
|
|
34
34
|
function gn(o, e, t = 0) {
|
|
35
35
|
if (o.isInterleavedBufferAttribute) {
|
|
@@ -55,7 +55,7 @@ function Mt(o, e) {
|
|
|
55
55
|
const t = o.count === e.count, i = o.normalized === e.normalized, s = o.array.constructor === e.array.constructor, a = o.itemSize === e.itemSize;
|
|
56
56
|
return !(!t || !i || !s || !a);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function zo(o) {
|
|
59
59
|
const e = o[0].index !== null, t = new Set(Object.keys(o[0].attributes));
|
|
60
60
|
if (!o[0].getAttribute("position"))
|
|
61
61
|
throw new Error("StaticGeometryGenerator: position attribute is required.");
|
|
@@ -73,34 +73,34 @@ function Oo(o) {
|
|
|
73
73
|
throw new Error("StaticGeometryGenerator: All geometries must have the same number of attributes.");
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Uo(o) {
|
|
77
77
|
let e = 0;
|
|
78
78
|
for (let t = 0, i = o.length; t < i; t++)
|
|
79
79
|
e += o[t].getIndex().count;
|
|
80
80
|
return e;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ho(o) {
|
|
83
83
|
let e = 0;
|
|
84
84
|
for (let t = 0, i = o.length; t < i; t++)
|
|
85
85
|
e += o[t].getAttribute("position").count;
|
|
86
86
|
return e;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Wo(o, e, t) {
|
|
89
89
|
o.index && o.index.count !== e && o.setIndex(null);
|
|
90
90
|
const i = o.attributes;
|
|
91
91
|
for (const s in i)
|
|
92
92
|
i[s].count !== t && o.deleteAttribute(s);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function No(o, e = {}, t = new le()) {
|
|
95
95
|
const {
|
|
96
96
|
useGroups: i = !1,
|
|
97
97
|
forceUpdate: s = !1,
|
|
98
98
|
skipAssigningAttributes: a = [],
|
|
99
99
|
overwriteIndex: n = !0
|
|
100
100
|
} = e;
|
|
101
|
-
|
|
102
|
-
const c = o[0].index !== null, h = c ?
|
|
103
|
-
if (
|
|
101
|
+
zo(o);
|
|
102
|
+
const c = o[0].index !== null, h = c ? Uo(o) : -1, f = Ho(o);
|
|
103
|
+
if (Wo(t, h, f), i) {
|
|
104
104
|
let r = 0;
|
|
105
105
|
for (let l = 0, u = o.length; l < u; l++) {
|
|
106
106
|
const m = o[l];
|
|
@@ -138,7 +138,7 @@ function Wo(o, e = {}, t = new le()) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Vo(o, e, t) {
|
|
142
142
|
const i = o.index, a = o.attributes.position.count, n = i ? i.count : a;
|
|
143
143
|
let c = o.groups;
|
|
144
144
|
c.length === 0 && (c = [{ count: n, start: 0, materialIndex: 0 }]);
|
|
@@ -156,7 +156,7 @@ function No(o, e, t) {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Go(o, e) {
|
|
160
160
|
if (!o.index) {
|
|
161
161
|
const t = o.attributes.position.count, i = new Array(t);
|
|
162
162
|
for (let s = 0; s < t; s++)
|
|
@@ -209,7 +209,7 @@ function dr(o) {
|
|
|
209
209
|
const e = o.skeleton;
|
|
210
210
|
return e ? (e.boneTexture || e.computeBoneTexture(), `${js(e.boneTexture.image.data.buffer)}_${e.boneTexture.uuid}`) : null;
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class qo {
|
|
213
213
|
constructor(e = null) {
|
|
214
214
|
this.matrixWorld = new J(), this.geometryHash = null, this.skeletonHash = null, this.primitiveCount = -1, e !== null && this.updateFrom(e);
|
|
215
215
|
}
|
|
@@ -222,33 +222,33 @@ class Go {
|
|
|
222
222
|
return !(this.matrixWorld.equals(e.matrixWorld) && this.geometryHash === fr(t) && this.skeletonHash === dr(e) && this.primitiveCount === i);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
const rt = /* @__PURE__ */ new b(), nt = /* @__PURE__ */ new b(), ot = /* @__PURE__ */ new b(), pr = /* @__PURE__ */ new it(),
|
|
225
|
+
const rt = /* @__PURE__ */ new b(), nt = /* @__PURE__ */ new b(), ot = /* @__PURE__ */ new b(), pr = /* @__PURE__ */ new it(), fi = /* @__PURE__ */ new b(), ts = /* @__PURE__ */ new b(), mr = /* @__PURE__ */ new it(), gr = /* @__PURE__ */ new it(), di = /* @__PURE__ */ new J(), vr = /* @__PURE__ */ new J();
|
|
226
226
|
function _r(o, e, t) {
|
|
227
227
|
const i = o.skeleton, s = o.geometry, a = i.bones, n = i.boneInverses;
|
|
228
|
-
mr.fromBufferAttribute(s.attributes.skinIndex, e), gr.fromBufferAttribute(s.attributes.skinWeight, e),
|
|
228
|
+
mr.fromBufferAttribute(s.attributes.skinIndex, e), gr.fromBufferAttribute(s.attributes.skinWeight, e), di.elements.fill(0);
|
|
229
229
|
for (let c = 0; c < 4; c++) {
|
|
230
230
|
const h = gr.getComponent(c);
|
|
231
231
|
if (h !== 0) {
|
|
232
232
|
const f = mr.getComponent(c);
|
|
233
|
-
vr.multiplyMatrices(a[f].matrixWorld, n[f]),
|
|
233
|
+
vr.multiplyMatrices(a[f].matrixWorld, n[f]), jo(di, vr, h);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
return
|
|
236
|
+
return di.multiply(o.bindMatrix).premultiply(o.bindMatrixInverse), t.transformDirection(di), t;
|
|
237
237
|
}
|
|
238
238
|
function is(o, e, t, i, s) {
|
|
239
|
-
|
|
239
|
+
fi.set(0, 0, 0);
|
|
240
240
|
for (let a = 0, n = o.length; a < n; a++) {
|
|
241
241
|
const c = e[a], h = o[a];
|
|
242
|
-
c !== 0 && (ts.fromBufferAttribute(h, i), t ?
|
|
242
|
+
c !== 0 && (ts.fromBufferAttribute(h, i), t ? fi.addScaledVector(ts, c) : fi.addScaledVector(ts.sub(s), c));
|
|
243
243
|
}
|
|
244
|
-
s.add(
|
|
244
|
+
s.add(fi);
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function jo(o, e, t) {
|
|
247
247
|
const i = o.elements, s = e.elements;
|
|
248
248
|
for (let a = 0, n = s.length; a < n; a++)
|
|
249
249
|
i[a] += s[a] * t;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Qo(o) {
|
|
252
252
|
const { index: e, attributes: t } = o;
|
|
253
253
|
if (e)
|
|
254
254
|
for (let i = 0, s = e.count; i < s; i += 3) {
|
|
@@ -266,7 +266,7 @@ function jo(o) {
|
|
|
266
266
|
}
|
|
267
267
|
return o;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Yo(o, e = {}, t = new le()) {
|
|
270
270
|
e = {
|
|
271
271
|
applyWorldTransforms: !0,
|
|
272
272
|
attributes: [],
|
|
@@ -284,11 +284,11 @@ function Qo(o, e = {}, t = new le()) {
|
|
|
284
284
|
const y = e.attributes[_];
|
|
285
285
|
y === "position" || y === "tangent" || y === "normal" || !(y in c) || (h[y] || t.setAttribute(y, Jt(c[y])), Mt(c[y], h[y]), gn(c[y], h[y]));
|
|
286
286
|
}
|
|
287
|
-
return o.matrixWorld.determinant() < 0 &&
|
|
287
|
+
return o.matrixWorld.determinant() < 0 && Qo(t), t;
|
|
288
288
|
}
|
|
289
|
-
class
|
|
289
|
+
class Zo extends le {
|
|
290
290
|
constructor() {
|
|
291
|
-
super(), this.version = 0, this.hash = null, this._diff = new
|
|
291
|
+
super(), this.version = 0, this.hash = null, this._diff = new qo();
|
|
292
292
|
}
|
|
293
293
|
// returns whether the passed mesh is compatible with this baked geometry
|
|
294
294
|
// such that it can be updated without resizing attributes
|
|
@@ -303,17 +303,17 @@ class Yo extends le {
|
|
|
303
303
|
}
|
|
304
304
|
updateFrom(e, t) {
|
|
305
305
|
const i = this._diff;
|
|
306
|
-
return i.didChange(e) ? (
|
|
306
|
+
return i.didChange(e) ? (Yo(e, t, this), i.updateFrom(e), this.version++, this.hash = `${this.uuid}_${this.version}`, !0) : !1;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
const Cs = 0, vn = 1, _n = 2;
|
|
310
|
-
function
|
|
310
|
+
function Ko(o, e) {
|
|
311
311
|
for (let t = 0, i = o.length; t < i; t++)
|
|
312
312
|
o[t].traverseVisible((a) => {
|
|
313
313
|
a.isMesh && e(a);
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Xo(o) {
|
|
317
317
|
const e = [];
|
|
318
318
|
for (let t = 0, i = o.length; t < i; t++) {
|
|
319
319
|
const s = o[t];
|
|
@@ -321,7 +321,7 @@ function Ko(o) {
|
|
|
321
321
|
}
|
|
322
322
|
return e;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Jo(o, e, t) {
|
|
325
325
|
if (o.length === 0) {
|
|
326
326
|
e.setIndex(null);
|
|
327
327
|
const i = e.attributes;
|
|
@@ -330,24 +330,24 @@ function Xo(o, e, t) {
|
|
|
330
330
|
for (const s in t.attributes)
|
|
331
331
|
e.setAttribute(t.attributes[s], new fe(new Float32Array(0), 4, !1));
|
|
332
332
|
} else
|
|
333
|
-
|
|
333
|
+
No(o, t, e);
|
|
334
334
|
for (const i in e.attributes)
|
|
335
335
|
e.attributes[i].needsUpdate = !0;
|
|
336
336
|
}
|
|
337
|
-
class
|
|
337
|
+
class $o {
|
|
338
338
|
constructor(e) {
|
|
339
339
|
this.objects = null, this.useGroups = !0, this.applyWorldTransforms = !0, this.generateMissingAttributes = !0, this.overwriteIndex = !0, this.attributes = ["position", "normal", "color", "tangent", "uv", "uv2"], this._intermediateGeometry = /* @__PURE__ */ new Map(), this._geometryMergeSets = /* @__PURE__ */ new WeakMap(), this._mergeOrder = [], this._dummyMesh = null, this.setObjects(e || []);
|
|
340
340
|
}
|
|
341
341
|
_getDummyMesh() {
|
|
342
342
|
if (!this._dummyMesh) {
|
|
343
|
-
const e = new
|
|
344
|
-
t.setAttribute("position", new fe(new Float32Array(9), 3)), this._dummyMesh = new
|
|
343
|
+
const e = new oi(), t = new le();
|
|
344
|
+
t.setAttribute("position", new fe(new Float32Array(9), 3)), this._dummyMesh = new X(t, e);
|
|
345
345
|
}
|
|
346
346
|
return this._dummyMesh;
|
|
347
347
|
}
|
|
348
348
|
_getMeshes() {
|
|
349
349
|
const e = [];
|
|
350
|
-
return
|
|
350
|
+
return Ko(this.objects, (t) => {
|
|
351
351
|
e.push(t);
|
|
352
352
|
}), e.sort((t, i) => t.uuid > i.uuid ? 1 : t.uuid < i.uuid ? -1 : 0), e.length === 0 && e.push(this._getDummyMesh()), e;
|
|
353
353
|
}
|
|
@@ -360,7 +360,7 @@ class Jo {
|
|
|
360
360
|
const c = t[a], h = c.uuid;
|
|
361
361
|
i.delete(h);
|
|
362
362
|
let f = e.get(h);
|
|
363
|
-
(!f || !f.isCompatible(c, this.attributes)) && (f && f.dispose(), f = new
|
|
363
|
+
(!f || !f.isCompatible(c, this.attributes)) && (f && f.dispose(), f = new Zo(), e.set(h, f)), f.updateFrom(c, s) && this.generateMissingAttributes && Go(f, this.attributes);
|
|
364
364
|
}
|
|
365
365
|
i.forEach((a) => {
|
|
366
366
|
e.delete(a);
|
|
@@ -380,19 +380,19 @@ class Jo {
|
|
|
380
380
|
const p = f[l];
|
|
381
381
|
!p || p.uuid !== v.uuid ? (c.push(!1), d = !0) : p.version !== v.version ? c.push(!1) : c.push(!0);
|
|
382
382
|
}
|
|
383
|
-
|
|
383
|
+
Jo(h, e, { useGroups: t, forceUpdate: d, skipAssigningAttributes: c, overwriteIndex: i }), d && e.dispose(), a.set(e, h.map((l) => ({
|
|
384
384
|
version: l.version,
|
|
385
385
|
uuid: l.uuid
|
|
386
386
|
})));
|
|
387
387
|
let r = Cs;
|
|
388
388
|
return d ? r = _n : c.includes(!1) && (r = vn), {
|
|
389
389
|
changeType: r,
|
|
390
|
-
materials:
|
|
390
|
+
materials: Xo(n),
|
|
391
391
|
geometry: e
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function ea(o) {
|
|
396
396
|
const e = /* @__PURE__ */ new Set();
|
|
397
397
|
for (let t = 0, i = o.length; t < i; t++) {
|
|
398
398
|
const s = o[t];
|
|
@@ -403,7 +403,7 @@ function $o(o) {
|
|
|
403
403
|
}
|
|
404
404
|
return Array.from(e);
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function ta(o) {
|
|
407
407
|
const e = [], t = /* @__PURE__ */ new Set();
|
|
408
408
|
for (let s = 0, a = o.length; s < a; s++)
|
|
409
409
|
o[s].traverse((n) => {
|
|
@@ -412,12 +412,12 @@ function ea(o) {
|
|
|
412
412
|
const i = Array.from(t).sort((s, a) => s.uuid < a.uuid ? 1 : s.uuid > a.uuid ? -1 : 0);
|
|
413
413
|
return { lights: e, iesTextures: i };
|
|
414
414
|
}
|
|
415
|
-
class
|
|
415
|
+
class ia {
|
|
416
416
|
get initialized() {
|
|
417
417
|
return !!this.bvh;
|
|
418
418
|
}
|
|
419
419
|
constructor(e) {
|
|
420
|
-
this.bvhOptions = {}, this.attributes = ["position", "normal", "tangent", "color", "uv", "uv2"], this.generateBVH = !0, this.bvh = null, this.geometry = new le(), this.staticGeometryGenerator = new
|
|
420
|
+
this.bvhOptions = {}, this.attributes = ["position", "normal", "tangent", "color", "uv", "uv2"], this.generateBVH = !0, this.bvh = null, this.geometry = new le(), this.staticGeometryGenerator = new $o(e), this._bvhWorker = null, this._pendingGenerate = null, this._buildAsync = !1;
|
|
421
421
|
}
|
|
422
422
|
setObjects(e) {
|
|
423
423
|
this.staticGeometryGenerator.setObjects(e);
|
|
@@ -443,19 +443,19 @@ class ta {
|
|
|
443
443
|
l.isSkinnedMesh && l.skeleton && l.skeleton.update();
|
|
444
444
|
});
|
|
445
445
|
});
|
|
446
|
-
const n = t.generate(i), c = n.materials, h =
|
|
447
|
-
if (n.changeType !== Cs &&
|
|
446
|
+
const n = t.generate(i), c = n.materials, h = ea(c), { lights: f, iesTextures: d } = ta(a);
|
|
447
|
+
if (n.changeType !== Cs && Vo(i, c, c), this.generateBVH) {
|
|
448
448
|
if (this.bvh instanceof Promise)
|
|
449
449
|
throw new Error("PathTracingSceneGenerator: BVH is already building asynchronously.");
|
|
450
450
|
if (n.changeType === _n) {
|
|
451
451
|
const r = {
|
|
452
|
-
strategy:
|
|
452
|
+
strategy: Eo,
|
|
453
453
|
maxLeafTris: 1,
|
|
454
454
|
indirect: !0,
|
|
455
455
|
onProgress: e,
|
|
456
456
|
...this.bvhOptions
|
|
457
457
|
};
|
|
458
|
-
this._buildAsync ? this.bvh = this._bvhWorker.generate(i, r) : this.bvh = new
|
|
458
|
+
this._buildAsync ? this.bvh = this._bvhWorker.generate(i, r) : this.bvh = new Fo(i, r);
|
|
459
459
|
} else
|
|
460
460
|
n.changeType === vn && this.bvh.refit();
|
|
461
461
|
}
|
|
@@ -499,7 +499,7 @@ class Qs extends Bt {
|
|
|
499
499
|
return !1;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
class
|
|
502
|
+
class sa extends Qs {
|
|
503
503
|
constructor(e) {
|
|
504
504
|
super({
|
|
505
505
|
blending: ri,
|
|
@@ -556,7 +556,7 @@ class ia extends Qs {
|
|
|
556
556
|
}), this.setValues(e);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function pi(o = 1) {
|
|
560
560
|
let e = "uint";
|
|
561
561
|
return o > 1 && (e = "uvec" + o), /* glsl */
|
|
562
562
|
`
|
|
@@ -596,7 +596,7 @@ function di(o = 1) {
|
|
|
596
596
|
}
|
|
597
597
|
`;
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function mi(o = 1) {
|
|
600
600
|
let e = "uint", t = "float", i = "", s = ".r", a = "1u";
|
|
601
601
|
return o > 1 && (e = "uvec" + o, t = "vec" + o, i = o + "", o === 2 ? (s = ".rg", a = "uvec2( 1u, 2u )") : o === 3 ? (s = ".rgb", a = "uvec3( 1u, 2u, 3u )") : (s = "", a = "uvec4( 1u, 2u, 3u, 4u )")), /* glsl */
|
|
602
602
|
`
|
|
@@ -627,10 +627,10 @@ const yn = (
|
|
|
627
627
|
const float SOBOL_FACTOR = 1.0 / 16777216.0;
|
|
628
628
|
const uint SOBOL_MAX_POINTS = 256u * 256u;
|
|
629
629
|
|
|
630
|
-
${
|
|
631
|
-
${
|
|
632
|
-
${
|
|
633
|
-
${
|
|
630
|
+
${pi(1)}
|
|
631
|
+
${pi(2)}
|
|
632
|
+
${pi(3)}
|
|
633
|
+
${pi(4)}
|
|
634
634
|
|
|
635
635
|
uint sobolHash( uint x ) {
|
|
636
636
|
|
|
@@ -645,7 +645,7 @@ const yn = (
|
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
`
|
|
648
|
-
),
|
|
648
|
+
), ra = (
|
|
649
649
|
/* glsl */
|
|
650
650
|
`
|
|
651
651
|
|
|
@@ -726,7 +726,7 @@ const yn = (
|
|
|
726
726
|
}
|
|
727
727
|
|
|
728
728
|
`
|
|
729
|
-
),
|
|
729
|
+
), na = (
|
|
730
730
|
/* glsl */
|
|
731
731
|
`
|
|
732
732
|
|
|
@@ -766,14 +766,14 @@ const yn = (
|
|
|
766
766
|
|
|
767
767
|
}
|
|
768
768
|
|
|
769
|
-
${
|
|
770
|
-
${
|
|
771
|
-
${
|
|
772
|
-
${
|
|
769
|
+
${mi(1)}
|
|
770
|
+
${mi(2)}
|
|
771
|
+
${mi(3)}
|
|
772
|
+
${mi(4)}
|
|
773
773
|
|
|
774
774
|
`
|
|
775
775
|
);
|
|
776
|
-
class
|
|
776
|
+
class oa extends Qs {
|
|
777
777
|
constructor() {
|
|
778
778
|
super({
|
|
779
779
|
blending: ri,
|
|
@@ -798,7 +798,7 @@ class na extends Qs {
|
|
|
798
798
|
`
|
|
799
799
|
|
|
800
800
|
${yn}
|
|
801
|
-
${
|
|
801
|
+
${ra}
|
|
802
802
|
|
|
803
803
|
varying vec2 vUv;
|
|
804
804
|
uniform vec2 resolution;
|
|
@@ -813,7 +813,7 @@ class na extends Qs {
|
|
|
813
813
|
});
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
|
-
class
|
|
816
|
+
class aa {
|
|
817
817
|
generate(e, t = 256) {
|
|
818
818
|
const i = new Oe(t, t, {
|
|
819
819
|
type: pe,
|
|
@@ -823,11 +823,11 @@ class oa {
|
|
|
823
823
|
generateMipmaps: !1
|
|
824
824
|
}), s = e.getRenderTarget();
|
|
825
825
|
e.setRenderTarget(i);
|
|
826
|
-
const a = new Et(new
|
|
826
|
+
const a = new Et(new oa());
|
|
827
827
|
return a.material.resolution.set(t, t), a.render(e), e.setRenderTarget(s), a.dispose(), i;
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
|
-
class
|
|
830
|
+
class la extends qi {
|
|
831
831
|
set bokehSize(e) {
|
|
832
832
|
this.fStop = this.getFocalLength() / e;
|
|
833
833
|
}
|
|
@@ -841,12 +841,12 @@ class aa extends qi {
|
|
|
841
841
|
return super.copy(e, t), this.fStop = e.fStop, this.apertureBlades = e.apertureBlades, this.apertureRotation = e.apertureRotation, this.focusDistance = e.focusDistance, this.anamorphicRatio = e.anamorphicRatio, this;
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
|
-
class
|
|
844
|
+
class ca {
|
|
845
845
|
constructor() {
|
|
846
846
|
this.bokehSize = 0, this.apertureBlades = 0, this.apertureRotation = 0, this.focusDistance = 10, this.anamorphicRatio = 1;
|
|
847
847
|
}
|
|
848
848
|
updateFrom(e) {
|
|
849
|
-
e instanceof
|
|
849
|
+
e instanceof la ? (this.bokehSize = e.bokehSize, this.apertureBlades = e.apertureBlades, this.apertureRotation = e.apertureRotation, this.focusDistance = e.focusDistance, this.anamorphicRatio = e.anamorphicRatio) : (this.bokehSize = 0, this.apertureRotation = 0, this.apertureBlades = 0, this.focusDistance = 10, this.anamorphicRatio = 1);
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
852
|
function ss(o) {
|
|
@@ -863,10 +863,10 @@ function yr(o, e, t = 0, i = o.length) {
|
|
|
863
863
|
}
|
|
864
864
|
return s - t;
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function ha(o, e, t) {
|
|
867
867
|
return 0.2126 * o + 0.7152 * e + 0.0722 * t;
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function ua(o, e = Se) {
|
|
870
870
|
const t = o.clone();
|
|
871
871
|
t.source = new Qn({ ...t.image });
|
|
872
872
|
const { width: i, height: s, data: a } = t.image;
|
|
@@ -893,7 +893,7 @@ function ha(o, e = Se) {
|
|
|
893
893
|
}
|
|
894
894
|
return t;
|
|
895
895
|
}
|
|
896
|
-
class
|
|
896
|
+
class fa {
|
|
897
897
|
constructor() {
|
|
898
898
|
const e = new ze(ss(new Float32Array([0, 0, 0, 0])), 1, 1);
|
|
899
899
|
e.type = Se, e.format = te, e.minFilter = Te, e.magFilter = Te, e.wrapS = et, e.wrapT = et, e.generateMipmaps = !1, e.needsUpdate = !0;
|
|
@@ -906,14 +906,14 @@ class ua {
|
|
|
906
906
|
this.marginalWeights.dispose(), this.conditionalWeights.dispose(), this.map.dispose();
|
|
907
907
|
}
|
|
908
908
|
updateFrom(e) {
|
|
909
|
-
const t =
|
|
909
|
+
const t = ua(e);
|
|
910
910
|
t.wrapS = et, t.wrapT = We;
|
|
911
911
|
const { width: i, height: s, data: a } = t.image, n = new Float32Array(i * s), c = new Float32Array(i * s), h = new Float32Array(s), f = new Float32Array(s);
|
|
912
912
|
let d = 0, r = 0;
|
|
913
913
|
for (let p = 0; p < s; p++) {
|
|
914
914
|
let g = 0;
|
|
915
915
|
for (let _ = 0; _ < i; _++) {
|
|
916
|
-
const y = p * i + _, x = Be.fromHalfFloat(a[4 * y + 0]), w = Be.fromHalfFloat(a[4 * y + 1]), A = Be.fromHalfFloat(a[4 * y + 2]), S =
|
|
916
|
+
const y = p * i + _, x = Be.fromHalfFloat(a[4 * y + 0]), w = Be.fromHalfFloat(a[4 * y + 1]), A = Be.fromHalfFloat(a[4 * y + 2]), S = ha(x, w, A);
|
|
917
917
|
g += S, d += S, n[y] = S, c[y] = g;
|
|
918
918
|
}
|
|
919
919
|
if (g !== 0)
|
|
@@ -939,8 +939,8 @@ class ua {
|
|
|
939
939
|
m.image = { width: s, height: 1, data: l }, m.needsUpdate = !0, v.image = { width: i, height: s, data: u }, v.needsUpdate = !0, this.totalSum = d, this.map = t;
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
|
-
const rs = 6,
|
|
943
|
-
class
|
|
942
|
+
const rs = 6, da = 0, pa = 1, ma = 2, ga = 3, va = 4, we = new b(), ne = new b(), xr = new J(), dt = new fn(), wr = new b(), pt = new b(), _a = new b(0, 1, 0);
|
|
943
|
+
class ya {
|
|
944
944
|
constructor() {
|
|
945
945
|
const e = new ze(new Float32Array(4), 1, 1);
|
|
946
946
|
e.format = te, e.type = pe, e.wrapS = We, e.wrapT = We, e.generateMipmaps = !1, e.minFilter = ee, e.magFilter = ee, this.tex = e, this.count = 0;
|
|
@@ -955,12 +955,12 @@ class _a {
|
|
|
955
955
|
for (let m = 0; m < rs * 4; m++)
|
|
956
956
|
n[r + m] = 0;
|
|
957
957
|
d.getWorldPosition(ne), n[r + l++] = ne.x, n[r + l++] = ne.y, n[r + l++] = ne.z;
|
|
958
|
-
let u =
|
|
959
|
-
if (d.isRectAreaLight && d.isCircular ? u =
|
|
958
|
+
let u = da;
|
|
959
|
+
if (d.isRectAreaLight && d.isCircular ? u = pa : d.isSpotLight ? u = ma : d.isDirectionalLight ? u = ga : d.isPointLight && (u = va), n[r + l++] = u, n[r + l++] = d.color.r, n[r + l++] = d.color.g, n[r + l++] = d.color.b, n[r + l++] = d.intensity, d.getWorldQuaternion(dt), d.isRectAreaLight)
|
|
960
960
|
we.set(d.width, 0, 0).applyQuaternion(dt), n[r + l++] = we.x, n[r + l++] = we.y, n[r + l++] = we.z, l++, ne.set(0, d.height, 0).applyQuaternion(dt), n[r + l++] = ne.x, n[r + l++] = ne.y, n[r + l++] = ne.z, n[r + l++] = we.cross(ne).length() * (d.isCircular ? Math.PI / 4 : 1);
|
|
961
961
|
else if (d.isSpotLight) {
|
|
962
962
|
const m = d.radius || 0;
|
|
963
|
-
wr.setFromMatrixPosition(d.matrixWorld), pt.setFromMatrixPosition(d.target.matrixWorld), xr.lookAt(wr, pt,
|
|
963
|
+
wr.setFromMatrixPosition(d.matrixWorld), pt.setFromMatrixPosition(d.target.matrixWorld), xr.lookAt(wr, pt, _a), dt.setFromRotationMatrix(xr), we.set(1, 0, 0).applyQuaternion(dt), n[r + l++] = we.x, n[r + l++] = we.y, n[r + l++] = we.z, l++, ne.set(0, 1, 0).applyQuaternion(dt), n[r + l++] = ne.x, n[r + l++] = ne.y, n[r + l++] = ne.z, n[r + l++] = Math.PI * m * m, n[r + l++] = m, n[r + l++] = d.decay, n[r + l++] = d.distance, n[r + l++] = Math.cos(d.angle), n[r + l++] = Math.cos(d.angle * (1 - d.penumbra)), n[r + l++] = d.iesMap ? t.indexOf(d.iesMap) : -1;
|
|
964
964
|
} else if (d.isPointLight) {
|
|
965
965
|
const m = we.setFromMatrixPosition(d.matrixWorld);
|
|
966
966
|
n[r + l++] = m.x, n[r + l++] = m.y, n[r + l++] = m.z, l++, l += 4, l += 1, n[r + l++] = d.decay, n[r + l++] = d.distance;
|
|
@@ -997,7 +997,7 @@ function br(o, e, t, i, s) {
|
|
|
997
997
|
t[s + f + r] = e >= r + 1 ? o[d + r] / c : 0;
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
class
|
|
1000
|
+
class xa extends Yn {
|
|
1001
1001
|
constructor() {
|
|
1002
1002
|
super(), this._textures = [], this.type = pe, this.format = te, this.internalFormat = "RGBA32F";
|
|
1003
1003
|
}
|
|
@@ -1018,7 +1018,7 @@ class ya extends Yn {
|
|
|
1018
1018
|
throw new Error("FloatAttributeTextureArray: All attributes must have the same item count.");
|
|
1019
1019
|
const s = this._textures;
|
|
1020
1020
|
for (; s.length < i; ) {
|
|
1021
|
-
const r = new
|
|
1021
|
+
const r = new ko();
|
|
1022
1022
|
s.push(r);
|
|
1023
1023
|
}
|
|
1024
1024
|
for (; s.length > i; )
|
|
@@ -1036,7 +1036,7 @@ class ya extends Yn {
|
|
|
1036
1036
|
this.dispose(), this.needsUpdate = !0;
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
class
|
|
1039
|
+
class wa extends xa {
|
|
1040
1040
|
updateNormalAttribute(e) {
|
|
1041
1041
|
this.updateAttribute(0, e);
|
|
1042
1042
|
}
|
|
@@ -1059,7 +1059,7 @@ function Ys(o, e) {
|
|
|
1059
1059
|
function Is(o) {
|
|
1060
1060
|
return `${o.source.uuid}:${o.colorSpace}`;
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function ba(o) {
|
|
1063
1063
|
const e = /* @__PURE__ */ new Set(), t = [];
|
|
1064
1064
|
for (let i = 0, s = o.length; i < s; i++) {
|
|
1065
1065
|
const a = o[i], n = Is(a);
|
|
@@ -1067,11 +1067,11 @@ function wa(o) {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
return t;
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function Aa(o) {
|
|
1071
1071
|
const e = o.map((i) => i.iesMap || null).filter((i) => i), t = new Set(e);
|
|
1072
1072
|
return Array.from(t).sort(Ys);
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function Ta(o) {
|
|
1075
1075
|
const e = /* @__PURE__ */ new Set();
|
|
1076
1076
|
for (let i = 0, s = o.length; i < s; i++) {
|
|
1077
1077
|
const a = o[i];
|
|
@@ -1081,16 +1081,16 @@ function Aa(o) {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
const t = Array.from(e);
|
|
1084
|
-
return
|
|
1084
|
+
return ba(t).sort(Ys);
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function Sa(o) {
|
|
1087
1087
|
const e = [];
|
|
1088
1088
|
return o.traverse((t) => {
|
|
1089
1089
|
t.visible && (t.isRectAreaLight || t.isSpotLight || t.isPointLight || t.isDirectionalLight) && e.push(t);
|
|
1090
1090
|
}), e.sort(Ys);
|
|
1091
1091
|
}
|
|
1092
1092
|
const xn = 45, Ar = xn * 4;
|
|
1093
|
-
class
|
|
1093
|
+
class Ma {
|
|
1094
1094
|
constructor() {
|
|
1095
1095
|
this._features = {};
|
|
1096
1096
|
}
|
|
@@ -1104,9 +1104,9 @@ class Sa {
|
|
|
1104
1104
|
this._features = {};
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
|
-
class
|
|
1107
|
+
class Ca extends ze {
|
|
1108
1108
|
constructor() {
|
|
1109
|
-
super(new Float32Array(4), 1, 1), this.format = te, this.type = pe, this.wrapS = We, this.wrapT = We, this.minFilter = ee, this.magFilter = ee, this.generateMipmaps = !1, this.features = new
|
|
1109
|
+
super(new Float32Array(4), 1, 1), this.format = te, this.type = pe, this.wrapS = We, this.wrapT = We, this.minFilter = ee, this.magFilter = ee, this.generateMipmaps = !1, this.features = new Ma();
|
|
1110
1110
|
}
|
|
1111
1111
|
updateFrom(e, t) {
|
|
1112
1112
|
function i(m, v, p = -1) {
|
|
@@ -1159,7 +1159,7 @@ class Ma extends ze {
|
|
|
1159
1159
|
case dn:
|
|
1160
1160
|
l[n++] = -1;
|
|
1161
1161
|
break;
|
|
1162
|
-
case
|
|
1162
|
+
case ai:
|
|
1163
1163
|
l[n++] = 0;
|
|
1164
1164
|
break;
|
|
1165
1165
|
}
|
|
@@ -1169,11 +1169,11 @@ class Ma extends ze {
|
|
|
1169
1169
|
return this.hash !== u ? (this.hash = u, this.needsUpdate = !0, !0) : !1;
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
|
-
const Tr = new
|
|
1173
|
-
function
|
|
1172
|
+
const Tr = new Z();
|
|
1173
|
+
function Ia(o) {
|
|
1174
1174
|
return o ? `${o.uuid}:${o.version}` : null;
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function Ra(o, e) {
|
|
1177
1177
|
for (const t in e)
|
|
1178
1178
|
t in o && (o[t] = e[t]);
|
|
1179
1179
|
}
|
|
@@ -1189,10 +1189,10 @@ class Sr extends Zn {
|
|
|
1189
1189
|
generateMipmaps: !1,
|
|
1190
1190
|
...i
|
|
1191
1191
|
};
|
|
1192
|
-
super(e, t, 1, s),
|
|
1192
|
+
super(e, t, 1, s), Ra(this.texture, s), this.texture.setTextures = (...n) => {
|
|
1193
1193
|
this.setTextures(...n);
|
|
1194
1194
|
}, this.hashes = [null];
|
|
1195
|
-
const a = new Et(new
|
|
1195
|
+
const a = new Et(new Da());
|
|
1196
1196
|
this.fsQuad = a;
|
|
1197
1197
|
}
|
|
1198
1198
|
setTextures(e, t, i = this.width, s = this.height) {
|
|
@@ -1203,7 +1203,7 @@ class Sr extends Zn {
|
|
|
1203
1203
|
const f = this.fsQuad, d = this.hashes;
|
|
1204
1204
|
let r = !1;
|
|
1205
1205
|
for (let l = 0, u = h; l < u; l++) {
|
|
1206
|
-
const m = t[l], v =
|
|
1206
|
+
const m = t[l], v = Ia(m);
|
|
1207
1207
|
m && (d[l] !== v || m.isWebGLRenderTarget) && (m.matrixAutoUpdate = !1, m.matrix.identity(), f.material.map = m, e.setRenderTarget(this, l), f.render(e), m.updateMatrix(), m.matrixAutoUpdate = !0, d[l] = v, r = !0);
|
|
1208
1208
|
}
|
|
1209
1209
|
return f.material.map = null, e.setClearColor(Tr, c), e.setRenderTarget(a), e.toneMapping = n, r;
|
|
@@ -1212,7 +1212,7 @@ class Sr extends Zn {
|
|
|
1212
1212
|
super.dispose(), this.fsQuad.dispose();
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
|
-
class
|
|
1215
|
+
class Da extends Bt {
|
|
1216
1216
|
get map() {
|
|
1217
1217
|
return this.uniforms.map.value;
|
|
1218
1218
|
}
|
|
@@ -1251,14 +1251,14 @@ class Ra extends Bt {
|
|
|
1251
1251
|
});
|
|
1252
1252
|
}
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function Pa(o, e = Math.random()) {
|
|
1255
1255
|
for (let t = o.length - 1; t > 0; t--) {
|
|
1256
1256
|
const i = Math.floor(e() * (t + 1)), s = o[t];
|
|
1257
1257
|
o[t] = o[i], o[i] = s;
|
|
1258
1258
|
}
|
|
1259
1259
|
return o;
|
|
1260
1260
|
}
|
|
1261
|
-
class
|
|
1261
|
+
class La {
|
|
1262
1262
|
constructor(e, t, i = Math.random) {
|
|
1263
1263
|
const s = e ** t, a = new Uint16Array(s);
|
|
1264
1264
|
let n = s;
|
|
@@ -1272,7 +1272,7 @@ class Pa {
|
|
|
1272
1272
|
n = 0;
|
|
1273
1273
|
}, this.next = function() {
|
|
1274
1274
|
const { samples: c } = this;
|
|
1275
|
-
n >= a.length && (
|
|
1275
|
+
n >= a.length && (Pa(a, i), this.reshuffle());
|
|
1276
1276
|
let h = a[n++];
|
|
1277
1277
|
for (let f = 0; f < t; f++)
|
|
1278
1278
|
c[f] = (h % e + i()) / e, h = Math.floor(h / e);
|
|
@@ -1280,7 +1280,7 @@ class Pa {
|
|
|
1280
1280
|
};
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
|
-
class
|
|
1283
|
+
class Ea {
|
|
1284
1284
|
constructor(e, t, i = Math.random) {
|
|
1285
1285
|
let s = 0;
|
|
1286
1286
|
for (const h of t)
|
|
@@ -1288,7 +1288,7 @@ class La {
|
|
|
1288
1288
|
const a = new Float32Array(s), n = [];
|
|
1289
1289
|
let c = 0;
|
|
1290
1290
|
for (const h of t) {
|
|
1291
|
-
const f = new
|
|
1291
|
+
const f = new La(e, h, i);
|
|
1292
1292
|
f.samples = new Float32Array(a.buffer, c, f.samples.length), c += f.samples.length * 4, n.push(f);
|
|
1293
1293
|
}
|
|
1294
1294
|
this.samples = a, this.strataCount = e, this.next = function() {
|
|
@@ -1304,7 +1304,7 @@ class La {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
class
|
|
1307
|
+
class Fa {
|
|
1308
1308
|
constructor(e = 0) {
|
|
1309
1309
|
this.m = 2147483648, this.a = 1103515245, this.c = 12345, this.seed = e;
|
|
1310
1310
|
}
|
|
@@ -1315,15 +1315,15 @@ class Ea {
|
|
|
1315
1315
|
return this.nextInt() / (this.m - 1);
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
|
-
class
|
|
1318
|
+
class ka extends ze {
|
|
1319
1319
|
constructor(e = 1, t = 1, i = 8) {
|
|
1320
|
-
super(new Float32Array(1), 1, 1, te, pe), this.minFilter = ee, this.magFilter = ee, this.strata = i, this.sampler = null, this.generator = new
|
|
1320
|
+
super(new Float32Array(1), 1, 1, te, pe), this.minFilter = ee, this.magFilter = ee, this.strata = i, this.sampler = null, this.generator = new Fa(), this.stableNoise = !1, this.random = () => this.stableNoise ? this.generator.nextFloat() : Math.random(), this.init(e, t, i);
|
|
1321
1321
|
}
|
|
1322
1322
|
init(e = this.image.height, t = this.image.width, i = this.strata) {
|
|
1323
1323
|
const { image: s } = this;
|
|
1324
1324
|
if (s.width === t && s.height === e && this.sampler !== null)
|
|
1325
1325
|
return;
|
|
1326
|
-
const a = new Array(e * t).fill(4), n = new
|
|
1326
|
+
const a = new Array(e * t).fill(4), n = new Ea(i, a, this.random);
|
|
1327
1327
|
s.width = t, s.height = e, s.data = n.samples, this.sampler = n, this.dispose(), this.next();
|
|
1328
1328
|
}
|
|
1329
1329
|
next() {
|
|
@@ -1333,13 +1333,13 @@ class Fa extends ze {
|
|
|
1333
1333
|
this.sampler.reset(), this.generator.seed = 0;
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function Ba(o, e = Math.random) {
|
|
1337
1337
|
for (let t = o.length - 1; t > 0; t--) {
|
|
1338
1338
|
const i = ~~((e() - 1e-6) * t), s = o[t];
|
|
1339
1339
|
o[t] = o[i], o[i] = s;
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function Oa(o, e) {
|
|
1343
1343
|
o.fill(0);
|
|
1344
1344
|
for (let t = 0; t < e; t++)
|
|
1345
1345
|
o[t] = 1;
|
|
@@ -1421,7 +1421,7 @@ class Mr {
|
|
|
1421
1421
|
this.resize(e.size), this.score.set(e.score), this.binaryPattern.set(e.binaryPattern), this.setSigma(e.sigma), this.count = e.count;
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
class
|
|
1424
|
+
class za {
|
|
1425
1425
|
constructor() {
|
|
1426
1426
|
this.random = Math.random, this.sigma = 1.5, this.size = 64, this.majorityPointsRatio = 0.1, this.samples = new Mr(1), this.savedSamples = new Mr(1);
|
|
1427
1427
|
}
|
|
@@ -1435,7 +1435,7 @@ class Oa {
|
|
|
1435
1435
|
} = this;
|
|
1436
1436
|
e.resize(a), e.setSigma(i);
|
|
1437
1437
|
const n = Math.floor(a * a * s), c = e.binaryPattern;
|
|
1438
|
-
|
|
1438
|
+
Oa(c, n), Ba(c, this.random);
|
|
1439
1439
|
for (let r = 0, l = c.length; r < l; r++)
|
|
1440
1440
|
c[r] === 1 && e.addPointIndex(r);
|
|
1441
1441
|
for (; ; ) {
|
|
@@ -1467,10 +1467,10 @@ class Oa {
|
|
|
1467
1467
|
return { data: h, maxValue: d };
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1470
|
+
function Ua(o) {
|
|
1471
1471
|
return o >= 3 ? 4 : o;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function Ha(o) {
|
|
1474
1474
|
switch (o) {
|
|
1475
1475
|
case 1:
|
|
1476
1476
|
return ws;
|
|
@@ -1480,14 +1480,14 @@ function Ua(o) {
|
|
|
1480
1480
|
return te;
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
|
-
class
|
|
1483
|
+
class Wa extends ze {
|
|
1484
1484
|
constructor(e = 64, t = 1) {
|
|
1485
1485
|
super(new Float32Array(4), 1, 1, te, pe), this.minFilter = ee, this.magFilter = ee, this.size = e, this.channels = t, this.update();
|
|
1486
1486
|
}
|
|
1487
1487
|
update() {
|
|
1488
|
-
const e = this.channels, t = this.size, i = new
|
|
1488
|
+
const e = this.channels, t = this.size, i = new za();
|
|
1489
1489
|
i.channels = e, i.size = t;
|
|
1490
|
-
const s =
|
|
1490
|
+
const s = Ua(e), a = Ha(s);
|
|
1491
1491
|
(this.image.width !== t || a !== this.format) && (this.image.width = t, this.image.height = t, this.image.data = new Float32Array(t ** 2 * s), this.format = a, this.dispose());
|
|
1492
1492
|
const n = this.image.data;
|
|
1493
1493
|
for (let c = 0, h = e; c < h; c++) {
|
|
@@ -1500,7 +1500,7 @@ class Ha extends ze {
|
|
|
1500
1500
|
this.needsUpdate = !0;
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
|
-
const
|
|
1503
|
+
const Na = (
|
|
1504
1504
|
/* glsl */
|
|
1505
1505
|
`
|
|
1506
1506
|
|
|
@@ -1515,7 +1515,7 @@ const Wa = (
|
|
|
1515
1515
|
};
|
|
1516
1516
|
|
|
1517
1517
|
`
|
|
1518
|
-
),
|
|
1518
|
+
), Va = (
|
|
1519
1519
|
/* glsl */
|
|
1520
1520
|
`
|
|
1521
1521
|
|
|
@@ -1530,7 +1530,7 @@ const Wa = (
|
|
|
1530
1530
|
};
|
|
1531
1531
|
|
|
1532
1532
|
`
|
|
1533
|
-
),
|
|
1533
|
+
), Ga = (
|
|
1534
1534
|
/* glsl */
|
|
1535
1535
|
`
|
|
1536
1536
|
|
|
@@ -1619,7 +1619,7 @@ const Wa = (
|
|
|
1619
1619
|
}
|
|
1620
1620
|
|
|
1621
1621
|
`
|
|
1622
|
-
),
|
|
1622
|
+
), qa = (
|
|
1623
1623
|
/* glsl */
|
|
1624
1624
|
`
|
|
1625
1625
|
|
|
@@ -1829,7 +1829,7 @@ const Wa = (
|
|
|
1829
1829
|
}
|
|
1830
1830
|
|
|
1831
1831
|
`
|
|
1832
|
-
),
|
|
1832
|
+
), ja = (
|
|
1833
1833
|
/* glsl */
|
|
1834
1834
|
`
|
|
1835
1835
|
|
|
@@ -1894,7 +1894,7 @@ const Wa = (
|
|
|
1894
1894
|
};
|
|
1895
1895
|
|
|
1896
1896
|
`
|
|
1897
|
-
),
|
|
1897
|
+
), Qa = (
|
|
1898
1898
|
/* glsl */
|
|
1899
1899
|
`
|
|
1900
1900
|
|
|
@@ -1964,7 +1964,7 @@ const Wa = (
|
|
|
1964
1964
|
|
|
1965
1965
|
}
|
|
1966
1966
|
`
|
|
1967
|
-
),
|
|
1967
|
+
), Ya = (
|
|
1968
1968
|
/* glsl */
|
|
1969
1969
|
`
|
|
1970
1970
|
|
|
@@ -2182,7 +2182,7 @@ const Wa = (
|
|
|
2182
2182
|
}
|
|
2183
2183
|
|
|
2184
2184
|
`
|
|
2185
|
-
),
|
|
2185
|
+
), Za = (
|
|
2186
2186
|
/* glsl */
|
|
2187
2187
|
`
|
|
2188
2188
|
|
|
@@ -2270,7 +2270,7 @@ const Wa = (
|
|
|
2270
2270
|
|
|
2271
2271
|
|
|
2272
2272
|
`
|
|
2273
|
-
),
|
|
2273
|
+
), Ka = (
|
|
2274
2274
|
/* glsl */
|
|
2275
2275
|
`
|
|
2276
2276
|
|
|
@@ -2376,7 +2376,7 @@ const Wa = (
|
|
|
2376
2376
|
}
|
|
2377
2377
|
|
|
2378
2378
|
`
|
|
2379
|
-
),
|
|
2379
|
+
), Xa = (
|
|
2380
2380
|
/* glsl */
|
|
2381
2381
|
`
|
|
2382
2382
|
|
|
@@ -2459,7 +2459,7 @@ const Wa = (
|
|
|
2459
2459
|
}
|
|
2460
2460
|
|
|
2461
2461
|
`
|
|
2462
|
-
),
|
|
2462
|
+
), Ja = (
|
|
2463
2463
|
/* glsl */
|
|
2464
2464
|
`
|
|
2465
2465
|
|
|
@@ -2523,7 +2523,7 @@ const Wa = (
|
|
|
2523
2523
|
}
|
|
2524
2524
|
|
|
2525
2525
|
`
|
|
2526
|
-
),
|
|
2526
|
+
), $a = (
|
|
2527
2527
|
/*glsl */
|
|
2528
2528
|
`
|
|
2529
2529
|
|
|
@@ -2726,7 +2726,7 @@ const Wa = (
|
|
|
2726
2726
|
|
|
2727
2727
|
}
|
|
2728
2728
|
`
|
|
2729
|
-
),
|
|
2729
|
+
), el = (
|
|
2730
2730
|
/* glsl */
|
|
2731
2731
|
`
|
|
2732
2732
|
|
|
@@ -2778,7 +2778,7 @@ const Wa = (
|
|
|
2778
2778
|
}
|
|
2779
2779
|
|
|
2780
2780
|
`
|
|
2781
|
-
),
|
|
2781
|
+
), tl = (
|
|
2782
2782
|
/* glsl */
|
|
2783
2783
|
`
|
|
2784
2784
|
|
|
@@ -3219,7 +3219,7 @@ const Wa = (
|
|
|
3219
3219
|
}
|
|
3220
3220
|
|
|
3221
3221
|
`
|
|
3222
|
-
),
|
|
3222
|
+
), il = (
|
|
3223
3223
|
/* glsl */
|
|
3224
3224
|
`
|
|
3225
3225
|
|
|
@@ -3243,7 +3243,7 @@ const Wa = (
|
|
|
3243
3243
|
}
|
|
3244
3244
|
|
|
3245
3245
|
`
|
|
3246
|
-
),
|
|
3246
|
+
), sl = (
|
|
3247
3247
|
/* glsl */
|
|
3248
3248
|
`
|
|
3249
3249
|
|
|
@@ -3347,7 +3347,7 @@ const Wa = (
|
|
|
3347
3347
|
}
|
|
3348
3348
|
|
|
3349
3349
|
`
|
|
3350
|
-
),
|
|
3350
|
+
), rl = (
|
|
3351
3351
|
/* glsl */
|
|
3352
3352
|
`
|
|
3353
3353
|
|
|
@@ -3484,7 +3484,7 @@ const Wa = (
|
|
|
3484
3484
|
}
|
|
3485
3485
|
|
|
3486
3486
|
`
|
|
3487
|
-
),
|
|
3487
|
+
), nl = (
|
|
3488
3488
|
/* glsl */
|
|
3489
3489
|
`
|
|
3490
3490
|
|
|
@@ -3584,7 +3584,7 @@ const Wa = (
|
|
|
3584
3584
|
}
|
|
3585
3585
|
|
|
3586
3586
|
`
|
|
3587
|
-
),
|
|
3587
|
+
), ol = (
|
|
3588
3588
|
/* glsl */
|
|
3589
3589
|
`
|
|
3590
3590
|
|
|
@@ -3648,7 +3648,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
3648
3648
|
}
|
|
3649
3649
|
|
|
3650
3650
|
`
|
|
3651
|
-
),
|
|
3651
|
+
), al = (
|
|
3652
3652
|
/* glsl */
|
|
3653
3653
|
`
|
|
3654
3654
|
|
|
@@ -3828,7 +3828,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
3828
3828
|
}
|
|
3829
3829
|
|
|
3830
3830
|
`
|
|
3831
|
-
),
|
|
3831
|
+
), ll = (
|
|
3832
3832
|
/* glsl */
|
|
3833
3833
|
`
|
|
3834
3834
|
|
|
@@ -3914,7 +3914,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
3914
3914
|
}
|
|
3915
3915
|
|
|
3916
3916
|
`
|
|
3917
|
-
),
|
|
3917
|
+
), cl = (
|
|
3918
3918
|
/*glsl*/
|
|
3919
3919
|
`
|
|
3920
3920
|
|
|
@@ -4013,7 +4013,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
4013
4013
|
}
|
|
4014
4014
|
|
|
4015
4015
|
`
|
|
4016
|
-
),
|
|
4016
|
+
), hl = (
|
|
4017
4017
|
/* glsl */
|
|
4018
4018
|
`
|
|
4019
4019
|
|
|
@@ -4338,7 +4338,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
4338
4338
|
|
|
4339
4339
|
}
|
|
4340
4340
|
`
|
|
4341
|
-
),
|
|
4341
|
+
), ul = (
|
|
4342
4342
|
/* glsl */
|
|
4343
4343
|
`
|
|
4344
4344
|
|
|
@@ -4390,7 +4390,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
4390
4390
|
}
|
|
4391
4391
|
|
|
4392
4392
|
`
|
|
4393
|
-
),
|
|
4393
|
+
), fl = (
|
|
4394
4394
|
/* glsl */
|
|
4395
4395
|
`
|
|
4396
4396
|
|
|
@@ -4441,7 +4441,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
4441
4441
|
|
|
4442
4442
|
`
|
|
4443
4443
|
);
|
|
4444
|
-
class
|
|
4444
|
+
class dl extends Qs {
|
|
4445
4445
|
onBeforeRender() {
|
|
4446
4446
|
this.setDefine("FEATURE_DOF", this.physicalCamera.bokehSize === 0 ? 0 : 1), this.setDefine("FEATURE_BACKGROUND_MAP", this.backgroundMap ? 1 : 0), this.setDefine("FEATURE_FOG", this.materials.features.isUsed("FOG") ? 1 : 0);
|
|
4447
4447
|
}
|
|
@@ -4477,17 +4477,17 @@ class fl extends Qs {
|
|
|
4477
4477
|
transmissiveBounces: { value: 10 },
|
|
4478
4478
|
filterGlossyFactor: { value: 0 },
|
|
4479
4479
|
// camera uniforms
|
|
4480
|
-
physicalCamera: { value: new
|
|
4480
|
+
physicalCamera: { value: new ca() },
|
|
4481
4481
|
cameraWorldMatrix: { value: new J() },
|
|
4482
4482
|
invProjectionMatrix: { value: new J() },
|
|
4483
4483
|
// scene uniforms
|
|
4484
|
-
bvh: { value: new
|
|
4485
|
-
attributesArray: { value: new
|
|
4486
|
-
materialIndexAttribute: { value: new
|
|
4487
|
-
materials: { value: new
|
|
4484
|
+
bvh: { value: new Bo() },
|
|
4485
|
+
attributesArray: { value: new wa() },
|
|
4486
|
+
materialIndexAttribute: { value: new Oo() },
|
|
4487
|
+
materials: { value: new Ca() },
|
|
4488
4488
|
textures: { value: new Sr().texture },
|
|
4489
4489
|
// light uniforms
|
|
4490
|
-
lights: { value: new
|
|
4490
|
+
lights: { value: new ya() },
|
|
4491
4491
|
iesProfiles: { value: new Sr(360, 180, {
|
|
4492
4492
|
type: Se,
|
|
4493
4493
|
wrapS: We,
|
|
@@ -4495,7 +4495,7 @@ class fl extends Qs {
|
|
|
4495
4495
|
}).texture },
|
|
4496
4496
|
environmentIntensity: { value: 1 },
|
|
4497
4497
|
environmentRotation: { value: new J() },
|
|
4498
|
-
envMapInfo: { value: new
|
|
4498
|
+
envMapInfo: { value: new fa() },
|
|
4499
4499
|
// background uniforms
|
|
4500
4500
|
backgroundBlur: { value: 0 },
|
|
4501
4501
|
backgroundMap: { value: null },
|
|
@@ -4505,8 +4505,8 @@ class fl extends Qs {
|
|
|
4505
4505
|
// randomness uniforms
|
|
4506
4506
|
seed: { value: 0 },
|
|
4507
4507
|
sobolTexture: { value: null },
|
|
4508
|
-
stratifiedTexture: { value: new
|
|
4509
|
-
stratifiedOffsetTexture: { value: new
|
|
4508
|
+
stratifiedTexture: { value: new ka() },
|
|
4509
|
+
stratifiedOffsetTexture: { value: new Wa(64, 1) }
|
|
4510
4510
|
},
|
|
4511
4511
|
vertexShader: (
|
|
4512
4512
|
/* glsl */
|
|
@@ -4543,22 +4543,22 @@ class fl extends Qs {
|
|
|
4543
4543
|
${es.bvh_ray_functions}
|
|
4544
4544
|
|
|
4545
4545
|
// uniform structs
|
|
4546
|
-
${Wa}
|
|
4547
|
-
${Va}
|
|
4548
4546
|
${Na}
|
|
4549
4547
|
${Ga}
|
|
4548
|
+
${Va}
|
|
4550
4549
|
${qa}
|
|
4550
|
+
${ja}
|
|
4551
4551
|
|
|
4552
4552
|
// random
|
|
4553
4553
|
#if RANDOM_TYPE == 2 // Stratified List
|
|
4554
4554
|
|
|
4555
|
-
${
|
|
4555
|
+
${el}
|
|
4556
4556
|
|
|
4557
4557
|
#elif RANDOM_TYPE == 1 // Sobol
|
|
4558
4558
|
|
|
4559
4559
|
${Cr}
|
|
4560
4560
|
${yn}
|
|
4561
|
-
${
|
|
4561
|
+
${na}
|
|
4562
4562
|
|
|
4563
4563
|
#define rand(v) sobol(v)
|
|
4564
4564
|
#define rand2(v) sobol2(v)
|
|
@@ -4583,11 +4583,11 @@ class fl extends Qs {
|
|
|
4583
4583
|
#endif
|
|
4584
4584
|
|
|
4585
4585
|
// common
|
|
4586
|
-
${
|
|
4587
|
-
${Za}
|
|
4588
|
-
${wn}
|
|
4586
|
+
${$a}
|
|
4589
4587
|
${Ka}
|
|
4588
|
+
${wn}
|
|
4590
4589
|
${Xa}
|
|
4590
|
+
${Ja}
|
|
4591
4591
|
|
|
4592
4592
|
// environment
|
|
4593
4593
|
uniform EquirectHdrInfo envMapInfo;
|
|
@@ -4643,16 +4643,16 @@ class fl extends Qs {
|
|
|
4643
4643
|
float lightsDenom;
|
|
4644
4644
|
|
|
4645
4645
|
// sampling
|
|
4646
|
-
${
|
|
4647
|
-
${ja}
|
|
4646
|
+
${Za}
|
|
4648
4647
|
${Qa}
|
|
4648
|
+
${Ya}
|
|
4649
4649
|
|
|
4650
|
+
${ol}
|
|
4651
|
+
${sl}
|
|
4650
4652
|
${nl}
|
|
4651
|
-
${il}
|
|
4652
4653
|
${rl}
|
|
4653
|
-
${
|
|
4654
|
+
${il}
|
|
4654
4655
|
${tl}
|
|
4655
|
-
${el}
|
|
4656
4656
|
|
|
4657
4657
|
float applyFilteredGlossy( float roughness, float accumulatedRoughness ) {
|
|
4658
4658
|
|
|
@@ -4684,12 +4684,12 @@ class fl extends Qs {
|
|
|
4684
4684
|
|
|
4685
4685
|
}
|
|
4686
4686
|
|
|
4687
|
-
${hl}
|
|
4688
|
-
${al}
|
|
4689
4687
|
${ul}
|
|
4690
|
-
${ol}
|
|
4691
4688
|
${ll}
|
|
4689
|
+
${fl}
|
|
4690
|
+
${al}
|
|
4692
4691
|
${cl}
|
|
4692
|
+
${hl}
|
|
4693
4693
|
|
|
4694
4694
|
void main() {
|
|
4695
4695
|
|
|
@@ -4986,7 +4986,7 @@ class fl extends Qs {
|
|
|
4986
4986
|
}), this.setValues(e);
|
|
4987
4987
|
}
|
|
4988
4988
|
}
|
|
4989
|
-
function*
|
|
4989
|
+
function* pl() {
|
|
4990
4990
|
const {
|
|
4991
4991
|
_renderer: o,
|
|
4992
4992
|
_fsQuad: e,
|
|
@@ -5029,7 +5029,7 @@ function* dl() {
|
|
|
5029
5029
|
[l, u] = [u, l];
|
|
5030
5030
|
}
|
|
5031
5031
|
}
|
|
5032
|
-
const Ir = new
|
|
5032
|
+
const Ir = new Z();
|
|
5033
5033
|
class Rr {
|
|
5034
5034
|
get material() {
|
|
5035
5035
|
return this._fsQuad.material;
|
|
@@ -5050,7 +5050,7 @@ class Rr {
|
|
|
5050
5050
|
return !!this._compilePromise;
|
|
5051
5051
|
}
|
|
5052
5052
|
constructor(e) {
|
|
5053
|
-
this.camera = null, this.tiles = new z(3, 3), this.stableNoise = !1, this.stableTiles = !0, this.samples = 0, this._subframe = new it(0, 0, 1, 1), this._opacityFactor = 1, this._renderer = e, this._alpha = !1, this._fsQuad = new Et(new
|
|
5053
|
+
this.camera = null, this.tiles = new z(3, 3), this.stableNoise = !1, this.stableTiles = !0, this.samples = 0, this._subframe = new it(0, 0, 1, 1), this._opacityFactor = 1, this._renderer = e, this._alpha = !1, this._fsQuad = new Et(new dl()), this._blendQuad = new Et(new sa()), this._task = null, this._currentTile = 0, this._compilePromise = null, this._sobolTarget = new aa().generate(e), this._primaryTarget = new Oe(1, 1, {
|
|
5054
5054
|
format: te,
|
|
5055
5055
|
type: pe,
|
|
5056
5056
|
magFilter: ee,
|
|
@@ -5098,11 +5098,11 @@ class Rr {
|
|
|
5098
5098
|
e.getClearColor(Ir), e.setRenderTarget(t), e.setClearColor(0, 0), e.clearColor(), e.setRenderTarget(i[0]), e.setClearColor(0, 0), e.clearColor(), e.setRenderTarget(i[1]), e.setClearColor(0, 0), e.clearColor(), e.setClearColor(Ir, a), e.setRenderTarget(s), this.samples = 0, this._task = null, this.material.stratifiedTexture.stableNoise = this.stableNoise, this.stableNoise && (this.material.seed = 0, this.material.stratifiedTexture.reset());
|
|
5099
5099
|
}
|
|
5100
5100
|
update() {
|
|
5101
|
-
this.material.onBeforeRender(), !this.isCompiling && (this._task || (this._task =
|
|
5101
|
+
this.material.onBeforeRender(), !this.isCompiling && (this._task || (this._task = pl.call(this)), this._task.next());
|
|
5102
5102
|
}
|
|
5103
5103
|
}
|
|
5104
|
-
const at = new z(), Dr = new z(),
|
|
5105
|
-
class
|
|
5104
|
+
const at = new z(), Dr = new z(), gi = new Jn(), vi = new Z();
|
|
5105
|
+
class ml extends ze {
|
|
5106
5106
|
constructor(e = 512, t = 512) {
|
|
5107
5107
|
super(
|
|
5108
5108
|
new Float32Array(e * t * 4),
|
|
@@ -5110,7 +5110,7 @@ class pl extends ze {
|
|
|
5110
5110
|
t,
|
|
5111
5111
|
te,
|
|
5112
5112
|
pe,
|
|
5113
|
-
|
|
5113
|
+
Oi,
|
|
5114
5114
|
et,
|
|
5115
5115
|
We,
|
|
5116
5116
|
Te,
|
|
@@ -5122,9 +5122,9 @@ class pl extends ze {
|
|
|
5122
5122
|
const { data: e, width: t, height: i } = this.image;
|
|
5123
5123
|
for (let s = 0; s < t; s++)
|
|
5124
5124
|
for (let a = 0; a < i; a++) {
|
|
5125
|
-
Dr.set(t, i), at.set(s / t, a / i), at.x -= 0.5, at.y = 1 - at.y,
|
|
5125
|
+
Dr.set(t, i), at.set(s / t, a / i), at.x -= 0.5, at.y = 1 - at.y, gi.theta = at.x * 2 * Math.PI, gi.phi = at.y * Math.PI, gi.radius = 1, this.generationCallback(gi, at, Dr, vi);
|
|
5126
5126
|
const c = 4 * (a * t + s);
|
|
5127
|
-
e[c + 0] =
|
|
5127
|
+
e[c + 0] = vi.r, e[c + 1] = vi.g, e[c + 2] = vi.b, e[c + 3] = 1;
|
|
5128
5128
|
}
|
|
5129
5129
|
}
|
|
5130
5130
|
copy(e) {
|
|
@@ -5132,9 +5132,9 @@ class pl extends ze {
|
|
|
5132
5132
|
}
|
|
5133
5133
|
}
|
|
5134
5134
|
const Pr = new b();
|
|
5135
|
-
class
|
|
5135
|
+
class gl extends ml {
|
|
5136
5136
|
constructor(e = 512) {
|
|
5137
|
-
super(e, e), this.topColor = new
|
|
5137
|
+
super(e, e), this.topColor = new Z().set(16777215), this.bottomColor = new Z().set(0), this.exponent = 2, this.generationCallback = (t, i, s, a) => {
|
|
5138
5138
|
Pr.setFromSpherical(t);
|
|
5139
5139
|
const n = Pr.y * 0.5 + 0.5;
|
|
5140
5140
|
a.lerpColors(this.bottomColor, this.topColor, n ** this.exponent);
|
|
@@ -5144,7 +5144,7 @@ class ml extends pl {
|
|
|
5144
5144
|
return super.copy(e), this.topColor.copy(e.topColor), this.bottomColor.copy(e.bottomColor), this;
|
|
5145
5145
|
}
|
|
5146
5146
|
}
|
|
5147
|
-
class
|
|
5147
|
+
class vl extends Bt {
|
|
5148
5148
|
get map() {
|
|
5149
5149
|
return this.uniforms.map.value;
|
|
5150
5150
|
}
|
|
@@ -5231,7 +5231,7 @@ class gl extends Bt {
|
|
|
5231
5231
|
}), this.setValues(e);
|
|
5232
5232
|
}
|
|
5233
5233
|
}
|
|
5234
|
-
class
|
|
5234
|
+
class _l extends Bt {
|
|
5235
5235
|
constructor() {
|
|
5236
5236
|
super({
|
|
5237
5237
|
uniforms: {
|
|
@@ -5276,7 +5276,7 @@ class vl extends Bt {
|
|
|
5276
5276
|
}
|
|
5277
5277
|
class Lr {
|
|
5278
5278
|
constructor(e) {
|
|
5279
|
-
this._renderer = e, this._quad = new Et(new
|
|
5279
|
+
this._renderer = e, this._quad = new Et(new _l());
|
|
5280
5280
|
}
|
|
5281
5281
|
generate(e, t = null, i = null) {
|
|
5282
5282
|
if (!e.isCubeTexture)
|
|
@@ -5295,17 +5295,17 @@ class Lr {
|
|
|
5295
5295
|
for (let g = 0, _ = v.length; g < _; g++)
|
|
5296
5296
|
m[g] = Be.toHalfFloat(v[g]);
|
|
5297
5297
|
const p = new ze(m, t, i, te, Se);
|
|
5298
|
-
return p.minFilter = $n, p.magFilter = Te, p.wrapS = et, p.wrapT = et, p.mapping =
|
|
5298
|
+
return p.minFilter = $n, p.magFilter = Te, p.wrapS = et, p.wrapT = et, p.mapping = Oi, p.needsUpdate = !0, p;
|
|
5299
5299
|
}
|
|
5300
5300
|
dispose() {
|
|
5301
5301
|
this._quad.dispose();
|
|
5302
5302
|
}
|
|
5303
5303
|
}
|
|
5304
|
-
function
|
|
5304
|
+
function yl(o) {
|
|
5305
5305
|
return o.extensions.get("EXT_float_blend");
|
|
5306
5306
|
}
|
|
5307
5307
|
const mt = new z();
|
|
5308
|
-
class
|
|
5308
|
+
class xl {
|
|
5309
5309
|
get multipleImportanceSampling() {
|
|
5310
5310
|
return !!this._pathTracer.material.defines.FEATURE_MIS;
|
|
5311
5311
|
}
|
|
@@ -5349,7 +5349,7 @@ class yl {
|
|
|
5349
5349
|
return !!this._pathTracer.isCompiling;
|
|
5350
5350
|
}
|
|
5351
5351
|
constructor(e) {
|
|
5352
|
-
this._renderer = e, this._generator = new
|
|
5352
|
+
this._renderer = e, this._generator = new ia(), this._pathTracer = new Rr(e), this._queueReset = !1, this._clock = new ji(), this._compilePromise = null, this._lowResPathTracer = new Rr(e), this._lowResPathTracer.tiles.set(1, 1), this._quad = new Et(new vl({
|
|
5353
5353
|
map: null,
|
|
5354
5354
|
transparent: !0,
|
|
5355
5355
|
blending: ri,
|
|
@@ -5387,11 +5387,11 @@ class yl {
|
|
|
5387
5387
|
e.updateMatrixWorld(), this._pathTracer.setCamera(e), this._lowResPathTracer.setCamera(e), this.reset();
|
|
5388
5388
|
}
|
|
5389
5389
|
updateMaterials() {
|
|
5390
|
-
const e = this._pathTracer.material, t = this._renderer, i = this._materials, s = this.textureSize, a =
|
|
5390
|
+
const e = this._pathTracer.material, t = this._renderer, i = this._materials, s = this.textureSize, a = Ta(i);
|
|
5391
5391
|
e.textures.setTextures(t, a, s.x, s.y), e.materials.updateFrom(i, a), this.reset();
|
|
5392
5392
|
}
|
|
5393
5393
|
updateLights() {
|
|
5394
|
-
const e = this.scene, t = this._renderer, i = this._pathTracer.material, s =
|
|
5394
|
+
const e = this.scene, t = this._renderer, i = this._pathTracer.material, s = Sa(e), a = Aa(s);
|
|
5395
5395
|
i.lights.updateFrom(s, a), i.iesProfiles.setTextures(t, a), this.reset();
|
|
5396
5396
|
}
|
|
5397
5397
|
updateEnvironment() {
|
|
@@ -5399,7 +5399,7 @@ class yl {
|
|
|
5399
5399
|
if (this._internalBackground && (this._internalBackground.dispose(), this._internalBackground = null), t.backgroundBlur = e.backgroundBlurriness, t.backgroundIntensity = e.backgroundIntensity ?? 1, t.backgroundRotation.makeRotationFromEuler(e.backgroundRotation).invert(), e.background === null)
|
|
5400
5400
|
t.backgroundMap = null, t.backgroundAlpha = 0;
|
|
5401
5401
|
else if (e.background.isColor) {
|
|
5402
|
-
this._colorBackground = this._colorBackground || new
|
|
5402
|
+
this._colorBackground = this._colorBackground || new gl(16);
|
|
5403
5403
|
const i = this._colorBackground;
|
|
5404
5404
|
i.topColor.equals(e.background) || (i.topColor.set(e.background), i.bottomColor.set(e.background), i.update()), t.backgroundMap = i, t.backgroundAlpha = 1;
|
|
5405
5405
|
} else if (e.background.isCubeTexture) {
|
|
@@ -5440,7 +5440,7 @@ class yl {
|
|
|
5440
5440
|
const e = this._lowResPathTracer, t = this._pathTracer, i = this._renderer, s = this._clock, a = this._quad;
|
|
5441
5441
|
this._updateScale(), this._queueReset && (t.reset(), e.reset(), this._queueReset = !1, a.material.opacity = 0, s.start());
|
|
5442
5442
|
const n = s.getDelta() * 1e3, c = s.getElapsedTime() * 1e3;
|
|
5443
|
-
if (!this.pausePathTracing && this.enablePathTracing && this.renderDelay <= c && !this.isCompiling && t.update(), t.alpha = t.material.backgroundAlpha !== 1 || !
|
|
5443
|
+
if (!this.pausePathTracing && this.enablePathTracing && this.renderDelay <= c && !this.isCompiling && t.update(), t.alpha = t.material.backgroundAlpha !== 1 || !yl(i), e.alpha = t.alpha, this.renderToCanvas) {
|
|
5444
5444
|
const h = this._renderer, f = this.minSamples;
|
|
5445
5445
|
if (c >= this.renderDelay && this.samples >= this.minSamples && (this.fadeDuration !== 0 ? a.material.opacity = Math.min(a.material.opacity + n / this.fadeDuration, 1) : a.material.opacity = 1), !this.enablePathTracing || this.samples < f || a.material.opacity < 1) {
|
|
5446
5446
|
if (this.dynamicLowRes && !this.isCompiling) {
|
|
@@ -5470,11 +5470,11 @@ class yl {
|
|
|
5470
5470
|
}
|
|
5471
5471
|
}
|
|
5472
5472
|
}
|
|
5473
|
-
const
|
|
5474
|
-
globalThis.GLTF_PROGRESSIVE_VERSION =
|
|
5473
|
+
const wl = "";
|
|
5474
|
+
globalThis.GLTF_PROGRESSIVE_VERSION = wl;
|
|
5475
5475
|
console.debug("[gltf-progressive] version -");
|
|
5476
5476
|
let Me = "https://www.gstatic.com/draco/versioned/decoders/1.5.7/", Yi = "https://cdn.needle.tools/static/three/0.179.1/basis2/";
|
|
5477
|
-
const
|
|
5477
|
+
const bl = Me, Al = Yi, bn = new URL(Me + "draco_decoder.js");
|
|
5478
5478
|
bn.searchParams.append("range", "true");
|
|
5479
5479
|
fetch(bn, {
|
|
5480
5480
|
method: "GET",
|
|
@@ -5482,18 +5482,18 @@ fetch(bn, {
|
|
|
5482
5482
|
Range: "bytes=0-1"
|
|
5483
5483
|
}
|
|
5484
5484
|
}).catch((o) => {
|
|
5485
|
-
console.debug(`Failed to fetch remote Draco decoder from ${Me} (offline: ${typeof navigator < "u" ? navigator.onLine : "unknown"})`), Me ===
|
|
5485
|
+
console.debug(`Failed to fetch remote Draco decoder from ${Me} (offline: ${typeof navigator < "u" ? navigator.onLine : "unknown"})`), Me === bl && Sl("./include/draco/"), Yi === Al && Ml("./include/ktx2/");
|
|
5486
5486
|
}).finally(() => {
|
|
5487
5487
|
Tn();
|
|
5488
5488
|
});
|
|
5489
|
-
const
|
|
5489
|
+
const Tl = () => ({
|
|
5490
5490
|
dracoDecoderPath: Me,
|
|
5491
5491
|
ktx2TranscoderPath: Yi
|
|
5492
5492
|
});
|
|
5493
|
-
function
|
|
5493
|
+
function Sl(o) {
|
|
5494
5494
|
Me = o, ue && ue[Rs] != Me ? (console.debug("Updating Draco decoder path to " + o), ue[Rs] = Me, ue.setDecoderPath(Me), ue.preload()) : console.debug("Setting Draco decoder path to " + o);
|
|
5495
5495
|
}
|
|
5496
|
-
function
|
|
5496
|
+
function Ml(o) {
|
|
5497
5497
|
Yi = o;
|
|
5498
5498
|
}
|
|
5499
5499
|
function Zs(o) {
|
|
@@ -5505,7 +5505,7 @@ function An(o) {
|
|
|
5505
5505
|
const Rs = Symbol("dracoDecoderPath");
|
|
5506
5506
|
let ue, Ui;
|
|
5507
5507
|
function Tn() {
|
|
5508
|
-
ue || (ue = new
|
|
5508
|
+
ue || (ue = new So(), ue[Rs] = Me, ue.setDecoderPath(Me), ue.setDecoderConfig({ type: "js" }), ue.preload()), Ui || (Ui = To);
|
|
5509
5509
|
}
|
|
5510
5510
|
const Ds = /* @__PURE__ */ new WeakMap();
|
|
5511
5511
|
function Sn(o, e) {
|
|
@@ -5513,7 +5513,7 @@ function Sn(o, e) {
|
|
|
5513
5513
|
t ? t = Object.assign(t, e) : t = e, Ds.set(o, t);
|
|
5514
5514
|
}
|
|
5515
5515
|
const ns = qs.prototype.load;
|
|
5516
|
-
function
|
|
5516
|
+
function Cl(...o) {
|
|
5517
5517
|
const e = Ds.get(this);
|
|
5518
5518
|
let t = o[0];
|
|
5519
5519
|
const i = new URL(t, window.location.href);
|
|
@@ -5523,7 +5523,7 @@ function Ml(...o) {
|
|
|
5523
5523
|
}
|
|
5524
5524
|
return o[0] = t, ns == null ? void 0 : ns.call(this, ...o);
|
|
5525
5525
|
}
|
|
5526
|
-
qs.prototype.load =
|
|
5526
|
+
qs.prototype.load = Cl;
|
|
5527
5527
|
ut("debugprogressive");
|
|
5528
5528
|
function ut(o) {
|
|
5529
5529
|
if (typeof window > "u")
|
|
@@ -5531,7 +5531,7 @@ function ut(o) {
|
|
|
5531
5531
|
const t = new URL(window.location.href).searchParams.get(o);
|
|
5532
5532
|
return t == null || t === "0" || t === "false" ? !1 : t === "" ? !0 : t;
|
|
5533
5533
|
}
|
|
5534
|
-
function
|
|
5534
|
+
function Il(o, e) {
|
|
5535
5535
|
if (e === void 0 || o === void 0 || e.startsWith("./") || e.startsWith("http") || e.startsWith("data:") || e.startsWith("blob:"))
|
|
5536
5536
|
return e;
|
|
5537
5537
|
const t = o.lastIndexOf("/");
|
|
@@ -5553,7 +5553,7 @@ function Er() {
|
|
|
5553
5553
|
const o = new URL(window.location.href), e = o.hostname === "localhost" || /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(o.hostname);
|
|
5554
5554
|
return o.hostname === "127.0.0.1" || e;
|
|
5555
5555
|
}
|
|
5556
|
-
class
|
|
5556
|
+
class Rl {
|
|
5557
5557
|
constructor(e = 100, t = {}) {
|
|
5558
5558
|
L(this, "_running", /* @__PURE__ */ new Map());
|
|
5559
5559
|
L(this, "_queue", []);
|
|
@@ -5587,34 +5587,34 @@ class Il {
|
|
|
5587
5587
|
}
|
|
5588
5588
|
}
|
|
5589
5589
|
}
|
|
5590
|
-
const
|
|
5591
|
-
function
|
|
5590
|
+
const Dl = typeof window > "u" && typeof document > "u", Ps = Symbol("needle:raycast-mesh");
|
|
5591
|
+
function ci(o) {
|
|
5592
5592
|
return (o == null ? void 0 : o[Ps]) instanceof le ? o[Ps] : null;
|
|
5593
5593
|
}
|
|
5594
|
-
function
|
|
5595
|
-
if ((o.type === "Mesh" || o.type === "SkinnedMesh") && !
|
|
5596
|
-
const i =
|
|
5594
|
+
function Pl(o, e) {
|
|
5595
|
+
if ((o.type === "Mesh" || o.type === "SkinnedMesh") && !ci(o)) {
|
|
5596
|
+
const i = El(e);
|
|
5597
5597
|
i.userData = { isRaycastMesh: !0 }, o[Ps] = i;
|
|
5598
5598
|
}
|
|
5599
5599
|
}
|
|
5600
|
-
function
|
|
5600
|
+
function Ll(o = !0) {
|
|
5601
5601
|
if (o) {
|
|
5602
5602
|
if (Ht)
|
|
5603
5603
|
return;
|
|
5604
|
-
const e = Ht =
|
|
5605
|
-
|
|
5606
|
-
const s = this, a =
|
|
5604
|
+
const e = Ht = X.prototype.raycast;
|
|
5605
|
+
X.prototype.raycast = function(t, i) {
|
|
5606
|
+
const s = this, a = ci(s);
|
|
5607
5607
|
let n;
|
|
5608
5608
|
a && s.isMesh && (n = s.geometry, s.geometry = a), e.call(this, t, i), n && (s.geometry = n);
|
|
5609
5609
|
};
|
|
5610
5610
|
} else {
|
|
5611
5611
|
if (!Ht)
|
|
5612
5612
|
return;
|
|
5613
|
-
|
|
5613
|
+
X.prototype.raycast = Ht, Ht = null;
|
|
5614
5614
|
}
|
|
5615
5615
|
}
|
|
5616
5616
|
let Ht = null;
|
|
5617
|
-
function
|
|
5617
|
+
function El(o) {
|
|
5618
5618
|
const e = new le();
|
|
5619
5619
|
for (const t in o.attributes)
|
|
5620
5620
|
e.setAttribute(t, o.getAttribute(t));
|
|
@@ -5641,16 +5641,16 @@ function Cn(o) {
|
|
|
5641
5641
|
o && "wireframe" in o && (o.wireframe = ei === !0);
|
|
5642
5642
|
}
|
|
5643
5643
|
const Wt = new Array();
|
|
5644
|
-
let
|
|
5645
|
-
const
|
|
5646
|
-
function
|
|
5647
|
-
if (Wt.length <
|
|
5644
|
+
let Fl = 0;
|
|
5645
|
+
const kl = Mn() ? 2 : 10;
|
|
5646
|
+
function Bl(o) {
|
|
5647
|
+
if (Wt.length < kl) {
|
|
5648
5648
|
const i = Wt.length;
|
|
5649
5649
|
O && console.warn(`[Worker] Creating new worker #${i}`);
|
|
5650
5650
|
const s = Ks.createWorker(o || {});
|
|
5651
5651
|
return Wt.push(s), s;
|
|
5652
5652
|
}
|
|
5653
|
-
const e =
|
|
5653
|
+
const e = Fl++ % Wt.length;
|
|
5654
5654
|
return Wt[e];
|
|
5655
5655
|
}
|
|
5656
5656
|
class Ks {
|
|
@@ -5664,7 +5664,7 @@ class Ks {
|
|
|
5664
5664
|
case "loaded-gltf":
|
|
5665
5665
|
for (const a of this._running)
|
|
5666
5666
|
if (a.url === s.result.url) {
|
|
5667
|
-
|
|
5667
|
+
Ol(s.result), a.resolve(s.result);
|
|
5668
5668
|
const n = a.url;
|
|
5669
5669
|
n.startsWith("blob:") && URL.revokeObjectURL(n);
|
|
5670
5670
|
}
|
|
@@ -5682,7 +5682,7 @@ class Ks {
|
|
|
5682
5682
|
return new Ks(t, e);
|
|
5683
5683
|
}
|
|
5684
5684
|
async load(e, t) {
|
|
5685
|
-
const i =
|
|
5685
|
+
const i = Tl();
|
|
5686
5686
|
let s = t == null ? void 0 : t.renderer;
|
|
5687
5687
|
s || (this._webglRenderer ?? (this._webglRenderer = (async () => {
|
|
5688
5688
|
const { WebGLRenderer: f } = await import("three");
|
|
@@ -5705,7 +5705,7 @@ class Ks {
|
|
|
5705
5705
|
});
|
|
5706
5706
|
}
|
|
5707
5707
|
}
|
|
5708
|
-
function
|
|
5708
|
+
function Ol(o) {
|
|
5709
5709
|
var e, t, i, s, a, n, c, h, f, d, r, l, u, m, v, p;
|
|
5710
5710
|
for (const g of o.geometries) {
|
|
5711
5711
|
const _ = g.geometry, y = new le();
|
|
@@ -5791,7 +5791,7 @@ function os(o) {
|
|
|
5791
5791
|
"isBufferAttribute" in o && o.isBufferAttribute && (e = new fe(o.array, o.itemSize, o.normalized), e.usage = o.usage, e.gpuType = o.gpuType, e.updateRanges = o.updateRanges);
|
|
5792
5792
|
return e;
|
|
5793
5793
|
}
|
|
5794
|
-
const
|
|
5794
|
+
const zl = ut("gltf-progressive-worker"), Ul = ut("gltf-progressive-reduce-mipmaps"), as = Symbol("needle-progressive-texture"), Ee = "NEEDLE_progressive", B = class B {
|
|
5795
5795
|
constructor(e) {
|
|
5796
5796
|
L(this, "parser");
|
|
5797
5797
|
L(this, "url");
|
|
@@ -5917,7 +5917,7 @@ const Ol = ut("gltf-progressive-worker"), zl = ut("gltf-progressive-reduce-mipma
|
|
|
5917
5917
|
var i;
|
|
5918
5918
|
if (!e)
|
|
5919
5919
|
return Promise.resolve(null);
|
|
5920
|
-
if (e instanceof
|
|
5920
|
+
if (e instanceof X || e.isMesh === !0) {
|
|
5921
5921
|
const s = e.geometry, a = this.getAssignedLODInformation(s);
|
|
5922
5922
|
if (!a)
|
|
5923
5923
|
return Promise.resolve(null);
|
|
@@ -6002,7 +6002,7 @@ const Ol = ut("gltf-progressive-worker"), zl = ut("gltf-progressive-reduce-mipma
|
|
|
6002
6002
|
if (f && (f == null ? void 0 : f.level) < t)
|
|
6003
6003
|
return O === "verbose" && console.warn("Assigned texture level is already higher: ", f.level, t, i, h, a), null;
|
|
6004
6004
|
}
|
|
6005
|
-
if (
|
|
6005
|
+
if (Ul && a.mipmaps) {
|
|
6006
6006
|
const f = a.mipmaps.length;
|
|
6007
6007
|
a.mipmaps.length = Math.min(a.mipmaps.length, 3), f !== a.mipmaps.length && O && console.debug(`Reduced mipmap count from ${f} to ${a.mipmaps.length} for ${a.uuid}: ${(n = a.image) == null ? void 0 : n.width}x${(c = a.image) == null ? void 0 : c.height}.`);
|
|
6008
6008
|
}
|
|
@@ -6087,7 +6087,7 @@ const Ol = ut("gltf-progressive-worker"), zl = ut("gltf-progressive-reduce-mipma
|
|
|
6087
6087
|
const l = Array.isArray(n.lods) ? (h = n.lods[t]) == null ? void 0 : h.path : n.lods;
|
|
6088
6088
|
if (!l)
|
|
6089
6089
|
return O && !n["missing:uri"] && (n["missing:uri"] = !0, console.warn("Missing uri for progressive asset for LOD " + t, n)), null;
|
|
6090
|
-
const u =
|
|
6090
|
+
const u = Il(s.url, l);
|
|
6091
6091
|
if (u.endsWith(".glb") || u.endsWith(".gltf")) {
|
|
6092
6092
|
if (!n.guid)
|
|
6093
6093
|
return console.warn("missing pointer for glb/gltf texture", n), null;
|
|
@@ -6102,8 +6102,8 @@ const Ol = ut("gltf-progressive-worker"), zl = ut("gltf-progressive-reduce-mipma
|
|
|
6102
6102
|
if (!v.use)
|
|
6103
6103
|
return O && console.log(`LOD ${t} was aborted: ${u}`), null;
|
|
6104
6104
|
const g = n, _ = new Promise(async (x, w) => {
|
|
6105
|
-
if (
|
|
6106
|
-
const T = await (await
|
|
6105
|
+
if (zl) {
|
|
6106
|
+
const T = await (await Bl({})).load(u);
|
|
6107
6107
|
if (T.textures.length > 0)
|
|
6108
6108
|
for (const I of T.textures) {
|
|
6109
6109
|
let P = I.texture;
|
|
@@ -6197,7 +6197,7 @@ const Ol = ut("gltf-progressive-worker"), zl = ut("gltf-progressive-reduce-mipma
|
|
|
6197
6197
|
if (!t)
|
|
6198
6198
|
return;
|
|
6199
6199
|
t.userData || (t.userData = {});
|
|
6200
|
-
const n = new
|
|
6200
|
+
const n = new Hl(e, i, s, a);
|
|
6201
6201
|
t.userData.LODS = n, "source" in t && typeof t.source == "object" && (t.source.LODS = n);
|
|
6202
6202
|
}
|
|
6203
6203
|
static getAssignedLODInformation(e) {
|
|
@@ -6239,15 +6239,15 @@ L(B, "registerMesh", (e, t, i, s, a, n) => {
|
|
|
6239
6239
|
}
|
|
6240
6240
|
c.userData || (c.userData = {}), O && console.log("> Progressive: register mesh " + i.name, { index: a, uuid: i.uuid }, n, i), B.assignLODInformation(e, c, t, s, a), B.lodInfos.set(t, n);
|
|
6241
6241
|
let h = B.lowresCache.get(t);
|
|
6242
|
-
h ? h.push(i.geometry) : h = [i.geometry], B.lowresCache.set(t, h), s > 0 && !
|
|
6242
|
+
h ? h.push(i.geometry) : h = [i.geometry], B.lowresCache.set(t, h), s > 0 && !ci(i) && Pl(i, c);
|
|
6243
6243
|
for (const d of Ze)
|
|
6244
6244
|
(f = d.onRegisteredNewMesh) == null || f.call(d, i, n);
|
|
6245
6245
|
}), /** A map of key = asset uuid and value = LOD information */
|
|
6246
6246
|
L(B, "lodInfos", /* @__PURE__ */ new Map()), /** cache of already loaded mesh lods */
|
|
6247
6247
|
L(B, "previouslyLoaded", /* @__PURE__ */ new Map()), /** this contains the geometry/textures that were originally loaded */
|
|
6248
|
-
L(B, "lowresCache", /* @__PURE__ */ new Map()), L(B, "workers", []), L(B, "_workersIndex", 0), L(B, "maxConcurrent", 50), L(B, "queue", new
|
|
6248
|
+
L(B, "lowresCache", /* @__PURE__ */ new Map()), L(B, "workers", []), L(B, "_workersIndex", 0), L(B, "maxConcurrent", 50), L(B, "queue", new Rl(B.maxConcurrent, { debug: O != !1 }));
|
|
6249
6249
|
let Re = B;
|
|
6250
|
-
class
|
|
6250
|
+
class Hl {
|
|
6251
6251
|
constructor(e, t, i, s) {
|
|
6252
6252
|
L(this, "url");
|
|
6253
6253
|
/** the key to lookup the LOD information */
|
|
@@ -6258,7 +6258,7 @@ class Ul {
|
|
|
6258
6258
|
this.url = e, this.key = t, this.level = i, s != null && (this.index = s);
|
|
6259
6259
|
}
|
|
6260
6260
|
}
|
|
6261
|
-
class
|
|
6261
|
+
class Ei {
|
|
6262
6262
|
constructor(e, t) {
|
|
6263
6263
|
L(this, "ready");
|
|
6264
6264
|
L(this, "_resolve");
|
|
@@ -6332,12 +6332,12 @@ class Li {
|
|
|
6332
6332
|
});
|
|
6333
6333
|
}
|
|
6334
6334
|
}
|
|
6335
|
-
L(
|
|
6335
|
+
L(Ei, "addPromise", (e, t, i, s) => {
|
|
6336
6336
|
s.forEach((a) => {
|
|
6337
6337
|
a.add(e, t, i);
|
|
6338
6338
|
});
|
|
6339
6339
|
});
|
|
6340
|
-
const be = ut("debugprogressive"),
|
|
6340
|
+
const be = ut("debugprogressive"), Wl = ut("noprogressive"), ls = Symbol("Needle:LODSManager"), cs = Symbol("Needle:LODState"), qe = Symbol("Needle:CurrentLOD"), oe = { mesh_lod: -1, texture_lod: -1 };
|
|
6341
6341
|
var he, Fe, Vi, Xe, Lt, Gi, ke;
|
|
6342
6342
|
const N = class N {
|
|
6343
6343
|
// readonly plugins: NEEDLE_progressive_plugin[] = [];
|
|
@@ -6431,7 +6431,7 @@ const N = class N {
|
|
|
6431
6431
|
* Call to await LODs loading during the next render cycle.
|
|
6432
6432
|
*/
|
|
6433
6433
|
awaitLoading(e) {
|
|
6434
|
-
const t = this._promiseGroupIds++, i = new
|
|
6434
|
+
const t = this._promiseGroupIds++, i = new Ei(H(this, Xe), { ...e });
|
|
6435
6435
|
this._newPromiseGroups.push(i);
|
|
6436
6436
|
const s = performance.now();
|
|
6437
6437
|
return i.ready.finally(() => {
|
|
@@ -6489,7 +6489,7 @@ const N = class N {
|
|
|
6489
6489
|
(c.name === "EffectMaterial" || c.name === "CopyShader") && (n = !1);
|
|
6490
6490
|
}
|
|
6491
6491
|
if ((t.parent && t.parent.type === "CubeCamera" || i >= 1 && t.type === "OrthographicCamera") && (n = !1), n) {
|
|
6492
|
-
if (
|
|
6492
|
+
if (Wl || (this.updateInterval === "auto" ? H(this, ke) < 40 && H(this, he) < 10 ? (Ie(this, he, H(this, he) + 1), be && console.warn("↓ Reducing LOD updates", H(this, he), H(this, ke).toFixed(0))) : H(this, ke) >= 60 && H(this, he) > 1 && (Ie(this, he, H(this, he) - 1), be && console.warn("↑ Increasing LOD updates", H(this, he), H(this, ke).toFixed(0))) : Ie(this, he, this.updateInterval), H(this, he) > 0 && H(this, Xe) % H(this, he) != 0))
|
|
6493
6493
|
return;
|
|
6494
6494
|
this.internalUpdate(e, t), this._postprocessPromiseGroups();
|
|
6495
6495
|
}
|
|
@@ -6522,17 +6522,17 @@ const N = class N {
|
|
|
6522
6522
|
d.object.material = u;
|
|
6523
6523
|
}
|
|
6524
6524
|
const r = d.object;
|
|
6525
|
-
(r instanceof
|
|
6525
|
+
(r instanceof X || r.isMesh) && this.updateLODs(e, t, r, a);
|
|
6526
6526
|
}
|
|
6527
6527
|
const n = i.transparent;
|
|
6528
6528
|
for (const d of n) {
|
|
6529
6529
|
const r = d.object;
|
|
6530
|
-
(r instanceof
|
|
6530
|
+
(r instanceof X || r.isMesh) && this.updateLODs(e, t, r, a);
|
|
6531
6531
|
}
|
|
6532
6532
|
const c = i.transmissive;
|
|
6533
6533
|
for (const d of c) {
|
|
6534
6534
|
const r = d.object;
|
|
6535
|
-
(r instanceof
|
|
6535
|
+
(r instanceof X || r.isMesh) && this.updateLODs(e, t, r, a);
|
|
6536
6536
|
}
|
|
6537
6537
|
}
|
|
6538
6538
|
/** Update the LOD levels for the renderer. */
|
|
@@ -6540,7 +6540,7 @@ const N = class N {
|
|
|
6540
6540
|
var c, h;
|
|
6541
6541
|
i.userData || (i.userData = {});
|
|
6542
6542
|
let a = i[cs];
|
|
6543
|
-
if (a || (a = new
|
|
6543
|
+
if (a || (a = new Nl(), i[cs] = a), a.frames++ < 2)
|
|
6544
6544
|
return;
|
|
6545
6545
|
for (const f of Ze)
|
|
6546
6546
|
(c = f.onBeforeUpdateLOD) == null || c.call(f, this.renderer, e, t, i);
|
|
@@ -6569,7 +6569,7 @@ const N = class N {
|
|
|
6569
6569
|
const a = Re.assignTextureLOD(e, t).then((n) => {
|
|
6570
6570
|
this._lodchangedlisteners.forEach((c) => c({ type: "texture", level: t, object: e }));
|
|
6571
6571
|
});
|
|
6572
|
-
|
|
6572
|
+
Ei.addPromise("texture", e, a, this._newPromiseGroups);
|
|
6573
6573
|
}
|
|
6574
6574
|
}
|
|
6575
6575
|
/** Load progressive meshes for the given mesh
|
|
@@ -6586,7 +6586,7 @@ const N = class N {
|
|
|
6586
6586
|
if (s != null && (i = e[qe] != s, t = s), i) {
|
|
6587
6587
|
e[qe] = t;
|
|
6588
6588
|
const a = e.geometry, n = Re.assignMeshLOD(e, t).then((c) => (c && e[qe] == t && a != e.geometry && this._lodchangedlisteners.forEach((h) => h({ type: "mesh", level: t, object: e })), c));
|
|
6589
|
-
return
|
|
6589
|
+
return Ei.addPromise("mesh", e, n, this._newPromiseGroups), n;
|
|
6590
6590
|
}
|
|
6591
6591
|
return Promise.resolve(null);
|
|
6592
6592
|
}
|
|
@@ -6627,7 +6627,7 @@ const N = class N {
|
|
|
6627
6627
|
}
|
|
6628
6628
|
const w = x[N.$skinnedMeshBoundsOffset];
|
|
6629
6629
|
if ((i.frames + w) % this.skinnedMeshAutoUpdateBoundsInterval === 0) {
|
|
6630
|
-
const A =
|
|
6630
|
+
const A = ci(x), S = x.geometry;
|
|
6631
6631
|
A && (x.geometry = A), x.computeBoundingBox(), x.geometry = S;
|
|
6632
6632
|
}
|
|
6633
6633
|
}
|
|
@@ -6719,7 +6719,7 @@ he = new WeakMap(), Fe = new WeakMap(), Vi = new WeakMap(), Xe = new WeakMap(),
|
|
|
6719
6719
|
*/
|
|
6720
6720
|
L(N, "debugDrawLine"), L(N, "corner0", new b()), L(N, "corner1", new b()), L(N, "corner2", new b()), L(N, "corner3", new b()), L(N, "_tempPtInside", new b()), L(N, "skinnedMeshBoundsFrameOffsetCounter", 0), L(N, "$skinnedMeshBoundsOffset", Symbol("gltf-progressive-skinnedMeshBoundsOffset"));
|
|
6721
6721
|
let Ft = N;
|
|
6722
|
-
class
|
|
6722
|
+
class Nl {
|
|
6723
6723
|
constructor() {
|
|
6724
6724
|
L(this, "frames", 0);
|
|
6725
6725
|
L(this, "lastLodLevel_Mesh", -1);
|
|
@@ -6729,10 +6729,10 @@ class Wl {
|
|
|
6729
6729
|
L(this, "lastCentrality", 0);
|
|
6730
6730
|
}
|
|
6731
6731
|
}
|
|
6732
|
-
const Fr = Symbol("NEEDLE_mesh_lod"),
|
|
6732
|
+
const Fr = Symbol("NEEDLE_mesh_lod"), _i = Symbol("NEEDLE_texture_lod");
|
|
6733
6733
|
let Nt = null;
|
|
6734
6734
|
function In() {
|
|
6735
|
-
const o =
|
|
6735
|
+
const o = Vl();
|
|
6736
6736
|
o && (o.mapURLs(function(e) {
|
|
6737
6737
|
return kr(), e;
|
|
6738
6738
|
}), kr(), Nt == null || Nt.disconnect(), Nt = new MutationObserver((e) => {
|
|
@@ -6743,7 +6743,7 @@ function In() {
|
|
|
6743
6743
|
});
|
|
6744
6744
|
}), Nt.observe(document, { childList: !0, subtree: !0 }));
|
|
6745
6745
|
}
|
|
6746
|
-
function
|
|
6746
|
+
function Vl() {
|
|
6747
6747
|
if (typeof customElements > "u")
|
|
6748
6748
|
return null;
|
|
6749
6749
|
const o = customElements.get("model-viewer");
|
|
@@ -6759,11 +6759,11 @@ function kr() {
|
|
|
6759
6759
|
});
|
|
6760
6760
|
}
|
|
6761
6761
|
const Br = /* @__PURE__ */ new WeakSet();
|
|
6762
|
-
let
|
|
6762
|
+
let Gl = 0;
|
|
6763
6763
|
function Rn(o) {
|
|
6764
6764
|
if (!o || Br.has(o))
|
|
6765
6765
|
return null;
|
|
6766
|
-
Br.add(o), console.debug("[gltf-progressive] found new model-viewer..." + ++
|
|
6766
|
+
Br.add(o), console.debug("[gltf-progressive] found new model-viewer..." + ++Gl + `
|
|
6767
6767
|
`, o.getAttribute("src"));
|
|
6768
6768
|
let e = null, t = null, i = null;
|
|
6769
6769
|
for (let s = o; s != null; s = Object.getPrototypeOf(s)) {
|
|
@@ -6784,7 +6784,7 @@ function Rn(o) {
|
|
|
6784
6784
|
};
|
|
6785
6785
|
console.debug("[gltf-progressive] setup model-viewer");
|
|
6786
6786
|
const a = Ft.get(e, { engine: "model-viewer" });
|
|
6787
|
-
return Ft.addPlugin(new
|
|
6787
|
+
return Ft.addPlugin(new ql()), a.enable(), a.addEventListener("changed", () => {
|
|
6788
6788
|
i == null || i.call(o);
|
|
6789
6789
|
}), o.addEventListener("model-visibility", (n) => {
|
|
6790
6790
|
n.detail.visible && (i == null || i.call(o));
|
|
@@ -6796,7 +6796,7 @@ function Rn(o) {
|
|
|
6796
6796
|
}
|
|
6797
6797
|
return null;
|
|
6798
6798
|
}
|
|
6799
|
-
class
|
|
6799
|
+
class ql {
|
|
6800
6800
|
constructor() {
|
|
6801
6801
|
L(this, "_didWarnAboutMissingUrl", !1);
|
|
6802
6802
|
}
|
|
@@ -6816,16 +6816,16 @@ class Gl {
|
|
|
6816
6816
|
return e.element;
|
|
6817
6817
|
}
|
|
6818
6818
|
tryParseTextureLOD(e, t) {
|
|
6819
|
-
if (t[
|
|
6819
|
+
if (t[_i] == !0)
|
|
6820
6820
|
return;
|
|
6821
|
-
t[
|
|
6821
|
+
t[_i] = !0;
|
|
6822
6822
|
const i = this.tryGetCurrentGLTF(e), s = this.tryGetCurrentModelViewer(e), a = this.getUrl(s);
|
|
6823
6823
|
if (a && i && t.material) {
|
|
6824
6824
|
let n = function(h) {
|
|
6825
6825
|
var d, r, l;
|
|
6826
|
-
if (h[
|
|
6826
|
+
if (h[_i] == !0)
|
|
6827
6827
|
return;
|
|
6828
|
-
h[
|
|
6828
|
+
h[_i] = !0, h.userData && (h.userData.LOD = -1);
|
|
6829
6829
|
const f = Object.keys(h);
|
|
6830
6830
|
for (let u = 0; u < f.length; u++) {
|
|
6831
6831
|
const m = f[u], v = h[m];
|
|
@@ -6891,14 +6891,14 @@ function Dn(...o) {
|
|
|
6891
6891
|
return (s == null ? void 0 : s.enableLODsManager) !== !1 && a.enable(), a;
|
|
6892
6892
|
}
|
|
6893
6893
|
In();
|
|
6894
|
-
if (!
|
|
6894
|
+
if (!Dl) {
|
|
6895
6895
|
const o = {
|
|
6896
6896
|
gltfProgressive: {
|
|
6897
6897
|
useNeedleProgressive: Dn,
|
|
6898
6898
|
LODsManager: Ft,
|
|
6899
6899
|
configureLoader: Sn,
|
|
6900
|
-
getRaycastMesh:
|
|
6901
|
-
useRaycastMeshes:
|
|
6900
|
+
getRaycastMesh: ci,
|
|
6901
|
+
useRaycastMeshes: Ll
|
|
6902
6902
|
}
|
|
6903
6903
|
};
|
|
6904
6904
|
if (!globalThis.Needle)
|
|
@@ -7298,22 +7298,22 @@ var Dt = Object.freeze({
|
|
|
7298
7298
|
typeof i == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(i) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = t;
|
|
7299
7299
|
}, o;
|
|
7300
7300
|
}()
|
|
7301
|
-
),
|
|
7301
|
+
), jl = "23.1.3", Ql = Xs.nextId, Pe = Ls, Yl = Pe.getAll.bind(Pe), Zl = Pe.removeAll.bind(Pe), Kl = Pe.add.bind(Pe), Xl = Pe.remove.bind(Pe), Jl = Pe.update.bind(Pe), Je = {
|
|
7302
7302
|
Easing: Dt,
|
|
7303
7303
|
Group: Pn,
|
|
7304
7304
|
Interpolation: ht,
|
|
7305
7305
|
now: It,
|
|
7306
7306
|
Sequence: Xs,
|
|
7307
|
-
nextId:
|
|
7307
|
+
nextId: Ql,
|
|
7308
7308
|
Tween: Hi,
|
|
7309
|
-
VERSION:
|
|
7310
|
-
getAll:
|
|
7311
|
-
removeAll:
|
|
7312
|
-
add:
|
|
7313
|
-
remove:
|
|
7314
|
-
update:
|
|
7309
|
+
VERSION: jl,
|
|
7310
|
+
getAll: Yl,
|
|
7311
|
+
removeAll: Zl,
|
|
7312
|
+
add: Kl,
|
|
7313
|
+
remove: Xl,
|
|
7314
|
+
update: Jl
|
|
7315
7315
|
}, Vt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7316
|
-
function
|
|
7316
|
+
function $l(o) {
|
|
7317
7317
|
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
7318
7318
|
}
|
|
7319
7319
|
var Ln = { exports: {} };
|
|
@@ -7427,8 +7427,8 @@ var Ln = { exports: {} };
|
|
|
7427
7427
|
return f ? (d = t ? t + f : f, this._events[d] && n(this, d)) : (this._events = new i(), this._eventsCount = 0), this;
|
|
7428
7428
|
}, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = t, c.EventEmitter = c, o.exports = c;
|
|
7429
7429
|
})(Ln);
|
|
7430
|
-
var
|
|
7431
|
-
const Ot = /* @__PURE__ */
|
|
7430
|
+
var ec = Ln.exports;
|
|
7431
|
+
const Ot = /* @__PURE__ */ $l(ec);
|
|
7432
7432
|
var ti = function() {
|
|
7433
7433
|
var o = 0, e = document.createElement("div");
|
|
7434
7434
|
e.style.cssText = "position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000", e.addEventListener("click", function(r) {
|
|
@@ -7486,18 +7486,18 @@ ti.Panel = function(o, e, t) {
|
|
|
7486
7486
|
}
|
|
7487
7487
|
};
|
|
7488
7488
|
};
|
|
7489
|
-
function
|
|
7489
|
+
function Iu(o, e) {
|
|
7490
7490
|
const t = URL.createObjectURL(o), i = document.createElement("a");
|
|
7491
7491
|
i.href = t, i.download = e, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(t);
|
|
7492
7492
|
}
|
|
7493
|
-
function
|
|
7493
|
+
function tc(o) {
|
|
7494
7494
|
return o.length === 0 ? 0 : o.reduce((t, i) => t + i, 0) / o.length;
|
|
7495
7495
|
}
|
|
7496
7496
|
function Or(o, e) {
|
|
7497
7497
|
const t = new Blob([o], { type: e });
|
|
7498
7498
|
return URL.createObjectURL(t);
|
|
7499
7499
|
}
|
|
7500
|
-
function
|
|
7500
|
+
function ic() {
|
|
7501
7501
|
return /Mac|iPod|iPhone|iPad/.test(navigator == null ? void 0 : navigator.platform) || /Mac OS|iOS/.test(navigator == null ? void 0 : navigator.userAgent);
|
|
7502
7502
|
}
|
|
7503
7503
|
function zr(o) {
|
|
@@ -7505,7 +7505,7 @@ function zr(o) {
|
|
|
7505
7505
|
const t = e.getContext("2d");
|
|
7506
7506
|
return e.width = o.width, e.height = o.height, t ? (t.drawImage(o, 0, 0), e.toDataURL("image/png", 0.75)) : void 0;
|
|
7507
7507
|
}
|
|
7508
|
-
function
|
|
7508
|
+
function Ru(o, e = 43) {
|
|
7509
7509
|
const t = o * Math.PI / 180;
|
|
7510
7510
|
return e / (2 * Math.tan(t / 2));
|
|
7511
7511
|
}
|
|
@@ -8714,11 +8714,11 @@ var En = {};
|
|
|
8714
8714
|
};
|
|
8715
8715
|
})();
|
|
8716
8716
|
})(En);
|
|
8717
|
-
const
|
|
8718
|
-
let
|
|
8717
|
+
const sc = "data:audio/mpeg;base64,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";
|
|
8718
|
+
let rc = class {
|
|
8719
8719
|
constructor() {
|
|
8720
8720
|
this.sound = new En.Howl({
|
|
8721
|
-
src: [
|
|
8721
|
+
src: [sc]
|
|
8722
8722
|
});
|
|
8723
8723
|
}
|
|
8724
8724
|
play() {
|
|
@@ -8733,20 +8733,20 @@ const De = (o) => {
|
|
|
8733
8733
|
}
|
|
8734
8734
|
for (; o.children.length > 0; )
|
|
8735
8735
|
De(o.children[0]), (e = o.children[0]) == null || e.removeFromParent();
|
|
8736
|
-
if (o instanceof
|
|
8736
|
+
if (o instanceof X)
|
|
8737
8737
|
try {
|
|
8738
8738
|
(t = o.geometry) == null || t.dispose();
|
|
8739
8739
|
} catch {
|
|
8740
8740
|
}
|
|
8741
8741
|
};
|
|
8742
|
-
function
|
|
8742
|
+
function nc(o) {
|
|
8743
8743
|
return new b(o[0], o[1], o[2]);
|
|
8744
8744
|
}
|
|
8745
|
-
function
|
|
8745
|
+
function oc() {
|
|
8746
8746
|
let o = 3, e = Math.max(1 / window.devicePixelRatio, 0.5);
|
|
8747
8747
|
return window.innerWidth / window.innerHeight < 0.65 && (o = 4, e = 1 / window.devicePixelRatio), { tiles: o, renderScale: e };
|
|
8748
8748
|
}
|
|
8749
|
-
function
|
|
8749
|
+
function ac(o) {
|
|
8750
8750
|
let e = !1, t = !1, i = !1, s = 1 / 0, a = 1 / 0, n = 1 / 0, c = -1 / 0, h = -1 / 0, f = -1 / 0, d = 0, r = 0;
|
|
8751
8751
|
return o.traverse((u) => {
|
|
8752
8752
|
if (u.isMesh && u.geometry) {
|
|
@@ -8771,7 +8771,7 @@ function oc(o) {
|
|
|
8771
8771
|
}
|
|
8772
8772
|
}), { box: new Q(new b(s, a, n), new b(c, h, f)), maxRadius: d, height: r, hasWidth: t, hasLength: e, hasHeight: i };
|
|
8773
8773
|
}
|
|
8774
|
-
function
|
|
8774
|
+
function lc(o, e, t = null) {
|
|
8775
8775
|
let i = 0;
|
|
8776
8776
|
return function() {
|
|
8777
8777
|
let s = t || this, a = arguments;
|
|
@@ -8780,7 +8780,7 @@ function ac(o, e, t = null) {
|
|
|
8780
8780
|
}, e);
|
|
8781
8781
|
};
|
|
8782
8782
|
}
|
|
8783
|
-
class
|
|
8783
|
+
class cc {
|
|
8784
8784
|
constructor(e, t, i) {
|
|
8785
8785
|
this.length = e, this.width = t, this.height = i;
|
|
8786
8786
|
}
|
|
@@ -8799,12 +8799,12 @@ function Js() {
|
|
|
8799
8799
|
var e;
|
|
8800
8800
|
if (typeof navigator > "u")
|
|
8801
8801
|
return !1;
|
|
8802
|
-
if (
|
|
8802
|
+
if (hc())
|
|
8803
8803
|
return !0;
|
|
8804
8804
|
const o = (e = navigator.userAgent) == null ? void 0 : e.toLowerCase();
|
|
8805
8805
|
return /iphone|ipad|ipod|android|mobile|blackberry|iemobile|opera mini/.test(o);
|
|
8806
8806
|
}
|
|
8807
|
-
function
|
|
8807
|
+
function hc() {
|
|
8808
8808
|
try {
|
|
8809
8809
|
if (typeof wx < "u" && wx.getSystemInfo || typeof my < "u" && my.alert || typeof tt < "u" && tt.getSystemInfo || typeof swan < "u" && swan.getSystemInfo)
|
|
8810
8810
|
return !0;
|
|
@@ -8812,7 +8812,7 @@ function cc() {
|
|
|
8812
8812
|
}
|
|
8813
8813
|
return !1;
|
|
8814
8814
|
}
|
|
8815
|
-
const
|
|
8815
|
+
const uc = new Ro(), kt = new Mo(), Zi = new Co();
|
|
8816
8816
|
let Pt = "./draco/";
|
|
8817
8817
|
try {
|
|
8818
8818
|
Pt = new URL("./draco/", import.meta.url).href;
|
|
@@ -8824,8 +8824,8 @@ Zi.setDecoderConfig({ type: "wasm" });
|
|
|
8824
8824
|
Zi.setDecoderPath(Pt.endsWith("/") ? Pt : `${Pt}/`);
|
|
8825
8825
|
Zi.preload();
|
|
8826
8826
|
kt.setDRACOLoader(Zi);
|
|
8827
|
-
const
|
|
8828
|
-
function
|
|
8827
|
+
const Pu = new Io(), Hr = [115, 103, 108, 98];
|
|
8828
|
+
function Lu(o, e, t) {
|
|
8829
8829
|
const i = JSON.stringify(e), s = new TextEncoder().encode(i), a = new Uint8Array([115, 103, 108, 98]), n = new Uint8Array(2);
|
|
8830
8830
|
n[0] = t >> 8, n[1] = t & 255;
|
|
8831
8831
|
const c = new Uint8Array(4);
|
|
@@ -8834,7 +8834,7 @@ function Pu(o, e, t) {
|
|
|
8834
8834
|
let r = 0;
|
|
8835
8835
|
return d.set(a, r), r += a.length, d.set(n, r), r += n.length, d.set(c, r), r += c.length, d.set(s, r), r += s.length, d.set(h, r), d.buffer;
|
|
8836
8836
|
}
|
|
8837
|
-
function
|
|
8837
|
+
function fc(o) {
|
|
8838
8838
|
const e = new Uint8Array(o.slice(0, 4));
|
|
8839
8839
|
let t = !0;
|
|
8840
8840
|
for (let r = 0; r < Hr.length; r++)
|
|
@@ -8902,13 +8902,13 @@ class Wi {
|
|
|
8902
8902
|
}
|
|
8903
8903
|
}
|
|
8904
8904
|
parse(e) {
|
|
8905
|
-
return
|
|
8905
|
+
return fc(e);
|
|
8906
8906
|
}
|
|
8907
8907
|
clear() {
|
|
8908
8908
|
[...this.cache.values()];
|
|
8909
8909
|
}
|
|
8910
8910
|
}
|
|
8911
|
-
const fc = `*{box-sizing:border-box}.slot-item-container.is-mobile .main{pointer-events:none;border-width:1px;opacity:.8}.slot-item-container.is-mobile .main.focus{width:18px!important;height:18px!important;border-width:2px;opacity:1}.slot-item-container.is-mobile .main.filled{opacity:1;border-width:1px;width:14px!important;height:14px!important;background-image:none;border-radius:50%}.slot-item-container.is-mobile .main.to-be-installed{opacity:1;pointer-events:auto;width:38px!important;height:38px!important;border-color:#000;border-width:1px;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cg%3e%3cg%3e%3cpath%20d='M20,10.75L0,10.75L0,9.25L20,9.25L20,10.75Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3cg%20transform='matrix(0,1,1,0,10,-10)'%3e%3cpath%20d='M30,0.75L10,0.75L10,-0.75L30,-0.75L30,0.75Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-size:20px auto;background-repeat:no-repeat;background-position:center;background-color:#fff9}.slot-item-container.is-mobile .main.to-be-installed+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container.is-mobile .main.to-be-installed.filled{opacity:1;border-width:2px;width:18px!important;height:18px!important;background-image:none;border-radius:50%;border-color:#00ff95}.slot-item-container.is-mobile .main.to-be-installed.to-be-replaced{opacity:1;border-width:1px;pointer-events:auto;width:38px!important;height:38px!important;border-radius:50%;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_504_014299'%3e%3crect%20x='0'%20y='0'%20width='40'%20height='40'%20rx='20'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_504_014299)'%3e%3cg%3e%3cg%3e%3cpath%20d='M31.695414,17L26.009501,10.74549544L24.899591,11.75450456L28.304586,15.5L8.75,15.5L8.75,17L31.695414,17Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M8.3045862,23L13.9904997,29.2545042L15.10041,28.2454953L11.6954139,24.5L31.25,24.5L31.25,23L8.3045862,23Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-size:38px auto;border-color:#000}.slot-item-container.is-mobile .info{left:100%;margin-top:0;margin-left:4px}.slot-item-container.is-mobile .info .name-wrapper{margin-top:0;border-radius:0;background:#000;color:#fff}.slot-item-container.is-mobile .info>img{display:none}.slot-item-container .main{pointer-events:auto;cursor:pointer;font-size:12px;color:#fff;width:22px;height:22px;background:#fff0;border:1.5px solid #fff;border-radius:0;transition:background .2s,width .14s,height .14s,border .14s}.slot-item-container .main.disable{cursor:not-allowed}.slot-item-container .main.drag-over{border-color:red}.slot-item-container .main.can-install{position:relative;width:44px;height:44px;background:#0066ff1a;border-color:#06f}.slot-item-container .main.filled{border-color:#00ff95;border-radius:50%}.slot-item-container .main.selected{border-width:4px}.slot-item-container .main.selected+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .main.focus{border-color:#000}.slot-item-container .main.focus+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .main.has-error{border-color:red}.slot-item-container .main.hidden{display:none}.slot-item-container .main.hidden+.info{display:none}.slot-item-container .main:after{pointer-events:none;content:attr(data-name);transition:all .2s .3s;opacity:0;position:absolute;left:50%;bottom:100%;transform:translate3d(-50%,5px,0);white-space:nowrap;font-size:12px;color:#000;padding:2px 8px;border-radius:2px;background:#fff}.slot-item-container .main:hover{background:#ffffff80}.slot-item-container .main:hover+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .name{position:relative}.slot-item-container .name-wrapper{margin-top:-10px;white-space:nowrap;font-size:12px;color:#fff;padding:2px 8px;background:#000}.slot-item-container .functions-wrapper{z-index:20000;position:absolute;left:0;top:100%}.slot-item-container .functions-wrapper>.functions{display:inline-block;min-width:100px;padding:6px 0;border-left:1px solid #00ff95;border-radius:0 2px 2px 0;background:#0003;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.slot-item-container .functions-wrapper>.functions .btn-add{cursor:pointer;padding:2px 0;margin:0 8px;display:flex;justify-content:center;align-content:center;align-items:center;border:1px dashed #eee;font-size:12px;color:#eee;border-radius:2px;-webkit-backdrop-filter:none;backdrop-filter:none;background:#00050a80}.slot-item-container .functions-wrapper>.functions .btn-add.btn-not-allowed{cursor:not-allowed}.slot-item-container .functions-wrapper>.functions .function{display:flex;justify-content:space-between;white-space:nowrap;margin-bottom:6px;padding:0 8px;font-size:12px;color:#fff}.slot-item-container .functions-wrapper>.functions .function span{margin-right:4px}.slot-item-container .functions-wrapper>.functions .function .btn-remove{pointer-events:none;opacity:0;cursor:pointer;align-self:center;margin-right:0;height:14px;width:14px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAACnSURBVEiJxZaxFcMgDETPTuUtWCWTM4pZAq5RojRpnOfEyEKxSnh3HySeBEhNjZJJTRgUG89GyZWilbKOgJCaKmWtFG2UvFnwQr56jYAcengg3dozELPGIjh96x6hu26/DIa9vD0jq/nUA3nikQEkAOW9nACUGbf7skxlX2mIj1Ob0jK76QdxbYpGFNlk3rPnNndDQltFaLMLbdehAyd8ZP5l6Ed+W17xG7oN9QkytAAAAABJRU5ErkJggg==) center no-repeat;background-size:10px 10px}.slot-item-container .functions-wrapper>.functions .function:hover .btn-remove{pointer-events:auto;opacity:1;transform:scale(1.2)}.slot-item-container .device-name{position:relative;margin:2px 0;display:flex;min-width:120px;align-items:center;align-content:center;justify-content:space-between;white-space:nowrap;height:30px;padding:0 8px;font-size:14px;font-weight:700;color:#000;background:#fff}.slot-item-container .device-name .device-logo{margin-left:-8px;margin-right:4px;width:30px;height:30px;object-fit:contain}.slot-item-container .device-name span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:250px}.slot-item-container .device-name .btn-close{margin-left:8px;cursor:pointer;height:20px;width:20px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_504_017509'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_504_017509)'%3e%3cg%3e%3cpath%20d='M4.375,16.875L4.375,4.375L15.625,4.375L15.625,16.875L4.375,16.875ZM14.375,5.625L5.625,5.625L5.625,15.625L14.375,15.625L14.375,5.625Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M8.125,12.1875L8.125,8.125L9.375,8.125L9.375,12.1875L8.125,12.1875Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M10.625,12.1875L10.625,8.125L11.875,8.125L11.875,12.1875L10.625,12.1875Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M16.875,5.625L3.125,5.625L3.125,4.375L16.875,4.375L16.875,5.625Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M6.4446528999999995,5.625L13.545177899999999,5.625L11.8665838,2.5L8.15767372,2.5L6.4446528999999995,5.625ZM11.4548223,4.3749999L8.5553472,4.3749999L8.8979512,3.75L11.1191032,3.75L11.4548223,4.3749999Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e") center no-repeat;background-size:100% auto}.slot-item-container .device-name.empty{color:#000c;font-weight:400}.slot-item-container .device-name.empty .btn-close{display:none}.slot-item-container .device-name.empty:before{height:0}.slot-item-container .all-functions{opacity:0;pointer-events:none;min-width:80px;position:absolute;left:-10px;margin-left:100%;bottom:0;padding:6px 0;background:#fff;transition:all .3s}.slot-item-container .all-functions.show{opacity:1;pointer-events:auto;left:16px}.slot-item-container .all-functions label{margin-left:8px;margin-bottom:20px;color:#444e69;font-size:14px}.slot-item-container .all-functions .btn-close{cursor:pointer;position:absolute;right:7px;top:7px;height:16px;width:16px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAB4SURBVDiNpZPLEYAgDAUXe6MuoK4UpwdBwQkQJDcyb9+QnxORCOC9jyxE4Y78DiWxAIcmISKnxaSrtZhMNSOB+ZeacAS7ngl3k1JOBSBpk1INPib0YHjH+Du2S1DhlSZOYbPJ1iLtrLKrG2a9yJopYzTD8Jx+ArgAylOzjm1WpDwAAAAASUVORK5CYII=) center no-repeat;background-size:10px 10px}.slot-item-container .all-functions .functions{display:inline-block;max-height:200px;overflow-x:hidden;overflow-y:auto}.slot-item-container .all-functions .functions::-webkit-scrollbar{width:4px}.slot-item-container .all-functions .functions::-webkit-scrollbar-track{background-color:#fff}.slot-item-container .all-functions .functions::-webkit-scrollbar-thumb{background:#787878;border-radius:25px}.slot-item-container .all-functions .function{display:flex;justify-content:space-between;white-space:nowrap;padding:5px 10px;font-size:12px;color:#787878}.slot-item-container .all-functions .function span{display:flex;align-content:center;align-items:center;margin-right:4px}.slot-item-container .all-functions .function:hover{background:#444e6933}.slot-item-container .all-functions .btn-add{cursor:pointer;width:16px;font-size:16px;text-align:center;font-style:normal}.slot-item-container .info{overflow:hidden;margin-left:-2px;margin-top:-19px;position:absolute;left:100%;top:50%;transform:translateY(-50%);width:0;display:flex;align-items:flex-start;transition:all .3s}.slot-item-container .info>img{flex:0 0 auto;width:53px;height:29px}`, dc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAAA7CAYAAAB8MXT7AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGTSURBVHic7dxLbQNBEIThnigADGEhxAwcBoZgCIZgBoZgCIZgCIaQMIgZVC4daw/xXPLoqdX/3fbW0milUtfutMCdpCkiLhEx1U6CLkkvkt4k7atnQYekfR7US/Us6JB0yIOaqmfBA5JWks6SrhzUwCRN+TYdq2dBx+ygDtWzoEPSNg9qVz0LOmZBgsQ3sqUkvufqAf6SpFVEnCPiFhHr1tqteCR8hyBhYrY6OlTPgo5cHX1I2lbPgo6lBInFk3Rc+uroqXqAn8ogcc3H19bae+U8eIDEZ0LSJoMEZeHIWB2ZIPEZoCw0QVlogsRnYlYWsjoaGUHCRK6OOKiRfa2OMvWtqufBAwQJE5SFJmZl4aZ6FnSQ+Azk6mjxZeFv+/fycfbDWrTW1pSFgyLxmcjVEWXh6CgLTZD4DMzKwguro4ERJEywOjIhaUdZaIAgYYKy0ABloQkSnwlxKZUHcSmVBxKfgVwdnSgLB8d35iZIfCYoC01QFpog8Y3rftFWrotO+cilVKMiSJigLDSS30hQFhr4BEcKZN0LNhDxAAAAAElFTkSuQmCC", Wr = { name: "", isMobile: !1 }, pc = {
|
|
8911
|
+
const dc = `*{box-sizing:border-box}.slot-item-container.is-mobile .main{pointer-events:none;border-width:1px;opacity:.8}.slot-item-container.is-mobile .main.focus{width:18px!important;height:18px!important;border-width:2px;opacity:1}.slot-item-container.is-mobile .main.filled{opacity:1;border-width:1px;width:14px!important;height:14px!important;background-image:none;border-radius:50%}.slot-item-container.is-mobile .main.to-be-installed{opacity:1;pointer-events:auto;width:38px!important;height:38px!important;border-color:#000;border-width:1px;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cg%3e%3cg%3e%3cpath%20d='M20,10.75L0,10.75L0,9.25L20,9.25L20,10.75Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3cg%20transform='matrix(0,1,1,0,10,-10)'%3e%3cpath%20d='M30,0.75L10,0.75L10,-0.75L30,-0.75L30,0.75Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-size:20px auto;background-repeat:no-repeat;background-position:center;background-color:#fff9}.slot-item-container.is-mobile .main.to-be-installed+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container.is-mobile .main.to-be-installed.filled{opacity:1;border-width:2px;width:18px!important;height:18px!important;background-image:none;border-radius:50%;border-color:#00ff95}.slot-item-container.is-mobile .main.to-be-installed.to-be-replaced{opacity:1;border-width:1px;pointer-events:auto;width:38px!important;height:38px!important;border-radius:50%;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_504_014299'%3e%3crect%20x='0'%20y='0'%20width='40'%20height='40'%20rx='20'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_504_014299)'%3e%3cg%3e%3cg%3e%3cpath%20d='M31.695414,17L26.009501,10.74549544L24.899591,11.75450456L28.304586,15.5L8.75,15.5L8.75,17L31.695414,17Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M8.3045862,23L13.9904997,29.2545042L15.10041,28.2454953L11.6954139,24.5L31.25,24.5L31.25,23L8.3045862,23Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-size:38px auto;border-color:#000}.slot-item-container.is-mobile .info{left:100%;margin-top:0;margin-left:4px}.slot-item-container.is-mobile .info .name-wrapper{margin-top:0;border-radius:0;background:#000;color:#fff}.slot-item-container.is-mobile .info>img{display:none}.slot-item-container .main{pointer-events:auto;cursor:pointer;font-size:12px;color:#fff;width:22px;height:22px;background:#fff0;border:1.5px solid #fff;border-radius:0;transition:background .2s,width .14s,height .14s,border .14s}.slot-item-container .main.disable{cursor:not-allowed}.slot-item-container .main.drag-over{border-color:red}.slot-item-container .main.can-install{position:relative;width:44px;height:44px;background:#0066ff1a;border-color:#06f}.slot-item-container .main.filled{border-color:#00ff95;border-radius:50%}.slot-item-container .main.selected{border-width:4px}.slot-item-container .main.selected+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .main.focus{border-color:#000}.slot-item-container .main.focus+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .main.has-error{border-color:red}.slot-item-container .main.hidden{display:none}.slot-item-container .main.hidden+.info{display:none}.slot-item-container .main:after{pointer-events:none;content:attr(data-name);transition:all .2s .3s;opacity:0;position:absolute;left:50%;bottom:100%;transform:translate3d(-50%,5px,0);white-space:nowrap;font-size:12px;color:#000;padding:2px 8px;border-radius:2px;background:#fff}.slot-item-container .main:hover{background:#ffffff80}.slot-item-container .main:hover+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .name{position:relative}.slot-item-container .name-wrapper{margin-top:-10px;white-space:nowrap;font-size:12px;color:#fff;padding:2px 8px;background:#000}.slot-item-container .functions-wrapper{z-index:20000;position:absolute;left:0;top:100%}.slot-item-container .functions-wrapper>.functions{display:inline-block;min-width:100px;padding:6px 0;border-left:1px solid #00ff95;border-radius:0 2px 2px 0;background:#0003;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.slot-item-container .functions-wrapper>.functions .btn-add{cursor:pointer;padding:2px 0;margin:0 8px;display:flex;justify-content:center;align-content:center;align-items:center;border:1px dashed #eee;font-size:12px;color:#eee;border-radius:2px;-webkit-backdrop-filter:none;backdrop-filter:none;background:#00050a80}.slot-item-container .functions-wrapper>.functions .btn-add.btn-not-allowed{cursor:not-allowed}.slot-item-container .functions-wrapper>.functions .function{display:flex;justify-content:space-between;white-space:nowrap;margin-bottom:6px;padding:0 8px;font-size:12px;color:#fff}.slot-item-container .functions-wrapper>.functions .function span{margin-right:4px}.slot-item-container .functions-wrapper>.functions .function .btn-remove{pointer-events:none;opacity:0;cursor:pointer;align-self:center;margin-right:0;height:14px;width:14px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAACnSURBVEiJxZaxFcMgDETPTuUtWCWTM4pZAq5RojRpnOfEyEKxSnh3HySeBEhNjZJJTRgUG89GyZWilbKOgJCaKmWtFG2UvFnwQr56jYAcengg3dozELPGIjh96x6hu26/DIa9vD0jq/nUA3nikQEkAOW9nACUGbf7skxlX2mIj1Ob0jK76QdxbYpGFNlk3rPnNndDQltFaLMLbdehAyd8ZP5l6Ed+W17xG7oN9QkytAAAAABJRU5ErkJggg==) center no-repeat;background-size:10px 10px}.slot-item-container .functions-wrapper>.functions .function:hover .btn-remove{pointer-events:auto;opacity:1;transform:scale(1.2)}.slot-item-container .device-name{position:relative;margin:2px 0;display:flex;min-width:120px;align-items:center;align-content:center;justify-content:space-between;white-space:nowrap;height:30px;padding:0 8px;font-size:14px;font-weight:700;color:#000;background:#fff}.slot-item-container .device-name .device-logo{margin-left:-8px;margin-right:4px;width:30px;height:30px;object-fit:contain}.slot-item-container .device-name span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:250px}.slot-item-container .device-name .btn-close{margin-left:8px;cursor:pointer;height:20px;width:20px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_504_017509'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_504_017509)'%3e%3cg%3e%3cpath%20d='M4.375,16.875L4.375,4.375L15.625,4.375L15.625,16.875L4.375,16.875ZM14.375,5.625L5.625,5.625L5.625,15.625L14.375,15.625L14.375,5.625Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M8.125,12.1875L8.125,8.125L9.375,8.125L9.375,12.1875L8.125,12.1875Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M10.625,12.1875L10.625,8.125L11.875,8.125L11.875,12.1875L10.625,12.1875Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M16.875,5.625L3.125,5.625L3.125,4.375L16.875,4.375L16.875,5.625Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M6.4446528999999995,5.625L13.545177899999999,5.625L11.8665838,2.5L8.15767372,2.5L6.4446528999999995,5.625ZM11.4548223,4.3749999L8.5553472,4.3749999L8.8979512,3.75L11.1191032,3.75L11.4548223,4.3749999Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e") center no-repeat;background-size:100% auto}.slot-item-container .device-name.empty{color:#000c;font-weight:400}.slot-item-container .device-name.empty .btn-close{display:none}.slot-item-container .device-name.empty:before{height:0}.slot-item-container .all-functions{opacity:0;pointer-events:none;min-width:80px;position:absolute;left:-10px;margin-left:100%;bottom:0;padding:6px 0;background:#fff;transition:all .3s}.slot-item-container .all-functions.show{opacity:1;pointer-events:auto;left:16px}.slot-item-container .all-functions label{margin-left:8px;margin-bottom:20px;color:#444e69;font-size:14px}.slot-item-container .all-functions .btn-close{cursor:pointer;position:absolute;right:7px;top:7px;height:16px;width:16px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAB4SURBVDiNpZPLEYAgDAUXe6MuoK4UpwdBwQkQJDcyb9+QnxORCOC9jyxE4Y78DiWxAIcmISKnxaSrtZhMNSOB+ZeacAS7ngl3k1JOBSBpk1INPib0YHjH+Du2S1DhlSZOYbPJ1iLtrLKrG2a9yJopYzTD8Jx+ArgAylOzjm1WpDwAAAAASUVORK5CYII=) center no-repeat;background-size:10px 10px}.slot-item-container .all-functions .functions{display:inline-block;max-height:200px;overflow-x:hidden;overflow-y:auto}.slot-item-container .all-functions .functions::-webkit-scrollbar{width:4px}.slot-item-container .all-functions .functions::-webkit-scrollbar-track{background-color:#fff}.slot-item-container .all-functions .functions::-webkit-scrollbar-thumb{background:#787878;border-radius:25px}.slot-item-container .all-functions .function{display:flex;justify-content:space-between;white-space:nowrap;padding:5px 10px;font-size:12px;color:#787878}.slot-item-container .all-functions .function span{display:flex;align-content:center;align-items:center;margin-right:4px}.slot-item-container .all-functions .function:hover{background:#444e6933}.slot-item-container .all-functions .btn-add{cursor:pointer;width:16px;font-size:16px;text-align:center;font-style:normal}.slot-item-container .info{overflow:hidden;margin-left:-2px;margin-top:-19px;position:absolute;left:100%;top:50%;transform:translateY(-50%);width:0;display:flex;align-items:flex-start;transition:all .3s}.slot-item-container .info>img{flex:0 0 auto;width:53px;height:29px}`, pc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAAA7CAYAAAB8MXT7AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGTSURBVHic7dxLbQNBEIThnigADGEhxAwcBoZgCIZgBoZgCIZgCIaQMIgZVC4daw/xXPLoqdX/3fbW0milUtfutMCdpCkiLhEx1U6CLkkvkt4k7atnQYekfR7US/Us6JB0yIOaqmfBA5JWks6SrhzUwCRN+TYdq2dBx+ygDtWzoEPSNg9qVz0LOmZBgsQ3sqUkvufqAf6SpFVEnCPiFhHr1tqteCR8hyBhYrY6OlTPgo5cHX1I2lbPgo6lBInFk3Rc+uroqXqAn8ogcc3H19bae+U8eIDEZ0LSJoMEZeHIWB2ZIPEZoCw0QVlogsRnYlYWsjoaGUHCRK6OOKiRfa2OMvWtqufBAwQJE5SFJmZl4aZ6FnSQ+Azk6mjxZeFv+/fycfbDWrTW1pSFgyLxmcjVEWXh6CgLTZD4DMzKwguro4ERJEywOjIhaUdZaIAgYYKy0ABloQkSnwlxKZUHcSmVBxKfgVwdnSgLB8d35iZIfCYoC01QFpog8Y3rftFWrotO+cilVKMiSJigLDSS30hQFhr4BEcKZN0LNhDxAAAAAElFTkSuQmCC", Wr = { name: "", isMobile: !1 }, mc = {
|
|
8912
8912
|
"&": "&",
|
|
8913
8913
|
"<": "<",
|
|
8914
8914
|
">": ">",
|
|
@@ -8916,7 +8916,7 @@ const fc = `*{box-sizing:border-box}.slot-item-container.is-mobile .main{pointer
|
|
|
8916
8916
|
"'": "'"
|
|
8917
8917
|
};
|
|
8918
8918
|
function Gt(o) {
|
|
8919
|
-
return o == null ? "" : String(o).replace(/[&<>"']/g, (e) =>
|
|
8919
|
+
return o == null ? "" : String(o).replace(/[&<>"']/g, (e) => mc[e]);
|
|
8920
8920
|
}
|
|
8921
8921
|
function Nr(...o) {
|
|
8922
8922
|
return o.filter(Boolean).join(" ");
|
|
@@ -9093,11 +9093,11 @@ class Fn extends HTMLElement {
|
|
|
9093
9093
|
</div>
|
|
9094
9094
|
</div>` : "", c = this._deviceLogo ? `<img class="device-logo" src="${Gt(this._deviceLogo)}" alt="device logo">` : "", h = Gt(((d = this._slot) == null ? void 0 : d.name) ?? this._props.name ?? ""), f = Gt(this._deviceName || "待安装");
|
|
9095
9095
|
this.shadowRoot.innerHTML = `
|
|
9096
|
-
<style>${
|
|
9096
|
+
<style>${dc}</style>
|
|
9097
9097
|
<div class="${e}">
|
|
9098
9098
|
<div class="${t}" style="width:${this._size}px;height:${this._size}px"></div>
|
|
9099
9099
|
<div class="info">
|
|
9100
|
-
<img alt="" src="${
|
|
9100
|
+
<img alt="" src="${pc}">
|
|
9101
9101
|
<div class="name">
|
|
9102
9102
|
<div class="name-wrapper">${h}</div>
|
|
9103
9103
|
<div class="functions-wrapper">
|
|
@@ -9380,7 +9380,7 @@ class Vr extends He {
|
|
|
9380
9380
|
return new ge();
|
|
9381
9381
|
}
|
|
9382
9382
|
}
|
|
9383
|
-
class
|
|
9383
|
+
class gc extends He {
|
|
9384
9384
|
constructor(e) {
|
|
9385
9385
|
const t = document.createElement("div");
|
|
9386
9386
|
super(t), this._text = document.createElement("div");
|
|
@@ -9424,7 +9424,7 @@ class mc extends He {
|
|
|
9424
9424
|
this.element && this.element.parentNode && this.element.parentNode.removeChild(this.element);
|
|
9425
9425
|
}
|
|
9426
9426
|
}
|
|
9427
|
-
class
|
|
9427
|
+
class Fi extends ge {
|
|
9428
9428
|
constructor(e, t = !0, i = !0) {
|
|
9429
9429
|
super(), this._startWith = e, this._showText = t, this.useStartEnd = i, this._line2Length = 0.01, this._line = new Ts(
|
|
9430
9430
|
new le(),
|
|
@@ -9438,7 +9438,7 @@ class Ei extends ge {
|
|
|
9438
9438
|
color: "#666",
|
|
9439
9439
|
linewidth: 2
|
|
9440
9440
|
})
|
|
9441
|
-
), this._text = new
|
|
9441
|
+
), this._text = new gc(""), this._line.frustumCulled = !1, this.add(this._line, this._line2), this._showText && (this.add(this._text), this._text.onPointMove = () => {
|
|
9442
9442
|
this._line.material.color.set("#000"), this._line2.material.color.set("#000");
|
|
9443
9443
|
}, this._text.onPointLeave = () => {
|
|
9444
9444
|
this._line.material.color.set("#666"), this._line2.material.color.set("#666");
|
|
@@ -9475,17 +9475,17 @@ class Ei extends ge {
|
|
|
9475
9475
|
this._text.dispose(), this.children.forEach((e) => De(e)), this.removeFromParent();
|
|
9476
9476
|
}
|
|
9477
9477
|
}
|
|
9478
|
-
class kn extends
|
|
9478
|
+
class kn extends li {
|
|
9479
9479
|
// 上一次的角度
|
|
9480
9480
|
constructor(e, t) {
|
|
9481
|
-
super(), this.radius = e, this._text = new
|
|
9481
|
+
super(), this.radius = e, this._text = new vc(""), this._line = new Fi(void 0, !1, !1), this._box = new X(), this._arc = new Do(), this._previousPosition = null, this._updateTimer = null, this._updateDelay = 300, this._accumulatedAngle = 0, this._lastAngle = null, this._line.updateMaterial(new Ss({
|
|
9482
9482
|
color: "#555",
|
|
9483
9483
|
dashSize: 0.06,
|
|
9484
9484
|
gapSize: 0.06
|
|
9485
|
-
})), this._line.renderOrder = 0, this._box.geometry = new ar(e, e + 3e-3, 128), this._box.material = new
|
|
9485
|
+
})), this._line.renderOrder = 0, this._box.geometry = new ar(e, e + 3e-3, 128), this._box.material = new oi({
|
|
9486
9486
|
color: "#666",
|
|
9487
|
-
side:
|
|
9488
|
-
}), this._arc.geometry = new ur(), this._arc.geometry.setPositions([0, 0, 0, 0, 0, 0]), this._arc.geometry.instanceCount = 0, this._arc.material = new
|
|
9487
|
+
side: ai
|
|
9488
|
+
}), this._arc.geometry = new ur(), this._arc.geometry.setPositions([0, 0, 0, 0, 0, 0]), this._arc.geometry.instanceCount = 0, this._arc.material = new Po({
|
|
9489
9489
|
color: "#eee",
|
|
9490
9490
|
linewidth: 2,
|
|
9491
9491
|
// 像素单位的线宽
|
|
@@ -9545,7 +9545,7 @@ class kn extends ai {
|
|
|
9545
9545
|
return h.setPositions(s), h.instanceCount = Math.max(0, s.length / 3 - 1), h;
|
|
9546
9546
|
}
|
|
9547
9547
|
}
|
|
9548
|
-
class
|
|
9548
|
+
class vc extends He {
|
|
9549
9549
|
constructor(e) {
|
|
9550
9550
|
const t = document.createElement("div");
|
|
9551
9551
|
super(t), this._wrapper = document.createElement("div"), this._circle = document.createElement("div");
|
|
@@ -9567,7 +9567,7 @@ class gc extends He {
|
|
|
9567
9567
|
this._circle.style.background = e;
|
|
9568
9568
|
}
|
|
9569
9569
|
}
|
|
9570
|
-
const
|
|
9570
|
+
const _c = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAUCAYAAADY6P5TAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEvSURBVFiFzZdbFYMwEEQroRKQgAQkVEIlICEOkFAJlRAJSIgEJNx+sPS0nGxIaOhyv3nM7mTmwOViDHAFesADD+BqrakKQAcMwMQ3AWis9e1C3HLASJoAdNZ6sxG3/MZQMZy1dhWgFbfWRzDGlFjAwFlyyXdh5OD5OIqykBgBy1yiF0aMUQaJugLclOcEoP3nULmFgQgeyCwOoJGBYrijByspDM98ZIszJAt8Ks8dag/VUFYYLtetjHdruRz5JZf8WBg1Ae7KcgOluaSsMAKJwqgJ6Vz2WzcvhZHjVlFh1ESG1DQ67SYtyGs8OwujNpTkUtw4nVtbyLK1XDafF3aKW90Z3EpBbi5lE0u9n3qoNTKk9rHh3heZqqwA8Vw6a11VkVwuPK31HALzb5pfovYC2xSs5LCDIUcAAAAASUVORK5CYII=", yc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAKCAYAAACngj4SAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAChSURBVDiNrdJbFYMwEIRhJFQCEpCAhEqIhDhBAlKQgAQkIOHrSziHpmkbLvua7P4zO9s0FYUeM0b0NT2nC9FnLQho7wQ9MOwgQ3K4ZPDrrtGmFcKKkL0HTAXXw2HX6HYuFnR/hMWC6ykX+W1AzJqq1abDGguux6LoPK9aUGFOm1Y+F+Bh+7DlsSKehRXgnfdDm5od7GdeN8ADnpuKQ3ldqReHZFd3742nZgAAAABJRU5ErkJggg==", Gr = "data:image/png;base64,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", xc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAACsCAYAAABo4pvIAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAzYSURBVHic7d3hcdtIEobhD05gmYGRgbkRLDKwMjiGoBCUgeoi0F0Evo1AdASiIxAcgbkR9P1Aj9mESIm2QMwAeJ8qlihKomeXwHzsHgCsBBTOzGpJK7+pd7/2r3+ceCw69Vh8nkvt/fbW4/H7vaR//H4bfqeNX6uqij8DilPlHgCWxcxW6ibvNFmn+x/DY/Fn0mHyPXVLE7F0ejKOf3/SpRO1B9c55wJNOg6rfrD1/5v7/31pbN97j7WS9lVVnf3vAoZGYGAwPqHW6ia+tbrJce0/Tj+Lk176+k/4/ui2tAnRA/VUaNbqQjXdr8PvtDoOku/xeyoXDIXAwMXMbK1DGHzUcTikiatVN1l9Uy8YmLiG1wuY2r9+0vHrUuvwOux0/PrseF1wKQIDR06EQvw+TTatunexrXgXOwmh+ku31AJc6xAoMUxaESboITAWyoOhVjdhfAr307vQnbpQ2KlrDe2yDBSj8EBJ20S/Qml12B7S/XZp7UIQGLMX3lk2Og6Gnbqd/1u4zySAI+EghRQmH9VtS7W6bWYrKpLFIDBmJFQNf6nbwdOCc6oYvqqrFrY5xof56AXJJ53e3r5J2hIi80FgTFRoIcRwaP32Vb7TUjFgTCdaW426thYhMgMExgT4u7m1Dm2lxn+UqoatCAcUyrffRodqpPEfbcWbm0khMAoUdrBUPTTyUFC3g7UsQmPKvBJpdNzOiq3TLQFSHgKjAKGM/6xDOb+T9Le6d17bXGMDxmJmjY73g1aHRfX/ESD5ERgZhBbTZx2OOCEggOCVAEn7CQEyMgJjJL2Nv9Hxhr/NNS5gKnr7UK0uQNiHMH1mtjKzGzN7MLNnvz34Rg/gHXz/aszs3vetH75/bbyCB8pmZrVvsI/WeTSzWz8/AsCV+L536/vcj7Dv1bnHBvxkZmt/l/MUqogb3uUAefSqjx++X95R3SOLEBK0moDCER4Y3YmQuKfVBEyLh8dd2I8JDwzD+6J3hAQwP2fCo849LkyI9z/TwnVqNxESwIyF8IgL5qxD4jTfYB786KYvZnaTe0wAxudzQTraivVJdE60nDaUpACkn92GuxAed1QdCxSqCY5wAvCm3pFWj8wZM2eHk+p+VhO5xwRgWrzqSCcIPrHWMTMeFGltgmoCwCB6ax33tLMnzM+biG2nOveYAMxPWAulXTU1vUNiuRAZgFGERfJngqNwrE8AKEVoVz0xHxWEoABQqhAczE85ERQApiIEB62qMREUAKaK4BiJH4nwRFAAmDqC40rCeRQEBYBZ8Y5JumZVnXs8k9U7RO0u93gA4Br6cx2nAvyisE5B6gJYBA+OB684uFr2W3rtpzr3eABgbL31jTr3eIoUTq2/yz0WAMjNugsbPpvZbe6xFMOrimfSFACO+fyYzhhvco8nq1BVkKAAcIZXGz/M7D73WEYXqgoWtQHgAr1qo849nlGEvtwm91gAYGoWsbbBEVAAMIxw5YvH2Z23EVpQy+u/AcAV+Hkb9z63rnOPZxBhsWa+5RMAZDKbFlVIvzr3WABgrsbq4ny4xpOm/pqklaQ/q6pqr/HvAAAkn2P/lLSa1FFUIenuco8FAJYmXMiwzj2WVxEWAJBfCI0yF8PN7MYXtze5xwIASxeu+t3kHsuRMLAy0wwAFsjM1kW9kQ9hUeceCwDgWFgq2OQeSPp4wTrrQAAAZ3lo5Ks0QljQhgKAwmVrT1n3iVCEBQBMSAiNcebuUNrwmbMAMDF+ROv11539Ylf5F08AAL8tXH+qvuY/8sgVZwFg+vzkvqdrPfm9mT1e5ckBAKPz604NWwSM1vMCAIxm8HM0wiI3R0QBwMz4kVPDFAS+bjHtD+YAAJzli+DvW3IY5EkAAMV715XGaUUBwHKEOb/+nT/+wudaAMBy+KG2D7/6R42XJ6srjQsAUCCf+y+/kocvdDfXGxIAoETpIysu/eWGhW4AWK6Lz83w6oILCwLAQl1UZaS1i5HGBAAo1JtrGV5dbMYbEgCgRF5lnF6e8EuX/xh5TACAQvUvGfIh/OxW0n/GHhAAoFhbSS/bUp4kzdijAQCU6eS6dvqM7kxjAgAUKhYTqSW1Fu0oAMBLW3UZ0eHMbgDAKUcnc6ejo7huFACgzzPCpK4lVUvaV1W1zzoqAEBxPBt2ZtZ8UNeb2uYdEgCgYK2k9QdJnyR9yzsWAEDBvkr6mFpSbdahAABKtpNXGGtJrF8AAF6zSudhtDlHAQAo2l4hMAAAOGcvaaV0fC0AAOeYmVFhAAAu8kHSPl7vHACAyDOi/aDUmwIA4BUEBgDgLbV0CAwAAM5ZSdp9kJ/Bl3kwAIBy1fI1jO+S/so7FgBAwT5J+pYqjDrvWAAABWvUZUV3QgYfoAQA6IsfspdO3NuKdQwAwEtrSbuqqvYpMP6W9K+MAwIAlOmzuozo+Id8P+cbDwCgRN6OavoPPr94EACwWP1iIl588N+iLQUAOPgs6b8vHjWzmrYUACBJR0el739WGFVVtZJaM9tkGBcAoCCeBbuqqk5fPsrMbqgyAAAXrWv7L21GGREAoDhePDxe8osbqgwAWC4ze7z4qFmqDABYJj+U9u3qIvwBaxkAsDB+3ahfPyfPzB7M7O4qowIAFMfM7szsy+/8Ye3H4NbDDwsAUBIzW79rzve0oTUFADPnC923+Z8EAFAsM7v9pYXuV56o9kUQPi8DAGbm3a2oE0+48dAY5gkBANmFguBm6Ce+N7OnQZ8UAJCNLzncX+vJnzjUFgCmz4uA969bvPIPpPKFRXAAmKiwzLB6+7ff9w9dp+cFALg6v5LHeOfYhVV1jpwCgIkIc3cz9j+8ITQAYBpCWGxyDWAzamkDAPhl4VJPm9wD4RwNAChUWHfe5B6LJNpTAFAib0OVExaJf+hGeQMDgAUKb+TLPKI1pNld7rEAwFKlK40Xv1QQ+mV3uccCAEszmbBIPDSe/FP7rnsmIQAgfbzqg8+9de7x/DK/Vsl0kg4AJih0dq5zIcGx+AdzcP0pALgCn2N/zGaODYvh97SoAGAYs+3ieH/tcbL9NQAoRGhBPcx6PqVFBQC/L1xdYxlzaDiK6nHW6QgAA/F582GWLahLeP9tPos1AHAFYWH7LvdYsvJLilBtAECPVxWPi60qzmFtAwAO/IxtqopzQpo+2tifCAUABVjMEVBDscNnznJpEQCL0FvU3uQez6T4eRvpIlp3BAeAuWKuG0hI3fwfLwgAAwrnVNB+GpIfTcX6BoDJC0HBlS+uieAAMFUhKFinGBPBAWAqCIpChBeC4ABQFIKiUP7CPBEcAHIjKCYitKo4RA3AaPxUgNjx2OQeEy4UguOHB0ede0wA5qd3wt2Dma1zjwm/yV/MdFVc2lUABuFvSh+sw3kUc+Ll4m1Y57ilXQXgV/XXJwiKmeu1q+6pOgC8JlQTqe3U5B4TRmaH61WldhWL5AAk/Wxnx2qCtVB0wjsI1jqABbPuatlfwtpEk3tMKFRY64hHWDW5xwXgesxsHVpOj15Z0G3A5bwkTZcdfiY8gPnwkLin5YTBecuK8AAm7ERI3HPeBK6qFx4caQUUrHeEEyGBfM6FB/1PIA9fh7wJIfFESKA4vuYRF8wf/fs699iAOfNWU9r3LCxc17nHBrzJDhciS4fqplKY6gMYwIlW04NXFuxfV1LlHsBS+BrHWtJnSbWkVtLfknZVVW1zjQuYit4+1Ejain1oVARGBv4OKG74taSd2PiBn3oBsVb3Jmurw36yzzW2pSIwCuABciPpkwgQLNSZgIj7QZtrbOgQGAXyAGkk/aVux1mr23F2kr5J2rLzYMr8iKVah228UVc97CR9VbeNU0EUhsCYgNDCWqvbwRr/0VZdgOzEDoZChe230SEgpMP2uxUtpkkgMCbKDxds1LWxUpjsddgJW1HGY2Qn3tzUOrRYU/XAdjlRBMaMnAkR6bidtZPU8m4O7+VrDisdt06l43Boq6raZRkgBkdgzJyHSOoXx0X1Vl018l2HxUWCBEe8Yqj9tla3DaX7O3XbTmortVQO80ZgLFCYBFKQfAz39+omgr1obS2GL0KndlLaHtJjMRjSGwuqhgUiMHDkREWyCt+3OoRJqkxa8c6yeP66xttH/5pe3/S67tS9tjtJe4IBEYGBi4UwWek4TFLF0uplhbIPj+9peQ0vhMEqfP0Uvq91/Lq0IhTwGwgMDKb3Lnalw7vY9H0tDw4dqhPpUK1IIVy0wIDxduGpWy3pD70MhpWO/1/uJP2jEA5UfxgKgYFRhQmx1vGk99F/JT6WbvverfXf3aubHJM23E+/27//wqUT6htXPk1jTeoz9//Q6UCIf9/q5X/zd/WqNXGQAkZGYKB4YaLuf43300QsvZy8+9+/9fhrzoVP+8pjMdjiY0eBRiWA0v0fPGR4m68wwtkAAAAASUVORK5CYII=";
|
|
9571
9571
|
class qr extends He {
|
|
9572
9572
|
constructor(e, t) {
|
|
9573
9573
|
const i = document.createElement("div");
|
|
@@ -9611,11 +9611,11 @@ class qr extends He {
|
|
|
9611
9611
|
u.name === c.name && (l = u);
|
|
9612
9612
|
}), l)) {
|
|
9613
9613
|
const u = document.createElement("div");
|
|
9614
|
-
u.style.background = `url(${
|
|
9614
|
+
u.style.background = `url(${xc}) center no-repeat`, u.style.backgroundSize = "100% auto", u.style.position = "absolute", u.style.top = "-50%", u.style.left = "-50%", u.style.width = s ? "140px" : "160px", u.style.height = s ? "70px" : "80px", u.style.transform = "translateX(-50%) translateY(-50%)", i.append(u);
|
|
9615
9615
|
const m = document.createElement("div");
|
|
9616
|
-
m.style.background = `url(${
|
|
9616
|
+
m.style.background = `url(${yc}) center no-repeat`, m.style.backgroundSize = "100% auto", m.style.width = m.style.height = s ? "20px" : "26px", m.style.position = "absolute", m.style.top = "0", m.style.transform = "translateY(-50%)", m.style.marginBottom = "5px", m.setAttribute("data-direction", "left"), i.append(m);
|
|
9617
9617
|
const v = document.createElement("div");
|
|
9618
|
-
v.style.background = `url(${
|
|
9618
|
+
v.style.background = `url(${_c}) center no-repeat`, v.style.backgroundSize = "100% auto", v.style.width = v.style.height = s ? "20px" : "26px", v.style.position = "absolute", m.style.left = v.style.right = s ? "62px" : "69px", v.style.top = "0", v.style.transform = "translateY(-50%)", v.style.marginBottom = "5px", v.setAttribute("data-direction", "right"), i.append(v), Array.from([m, v]).forEach((p) => {
|
|
9619
9619
|
s || p.addEventListener("mousemove", () => {
|
|
9620
9620
|
p.style.filter = "invert(100%)";
|
|
9621
9621
|
}), p.addEventListener("mouseleave", () => {
|
|
@@ -9652,7 +9652,7 @@ class qr extends He {
|
|
|
9652
9652
|
this._emitter.removeAllListeners(), cancelAnimationFrame(this._looper), this.element.remove();
|
|
9653
9653
|
}
|
|
9654
9654
|
}
|
|
9655
|
-
class
|
|
9655
|
+
class wc extends Lo {
|
|
9656
9656
|
constructor(e) {
|
|
9657
9657
|
const t = document.createElement("div");
|
|
9658
9658
|
super(t), this.props = e, this._scale = 0.01, this._emitter = new Ot(), this.addEventListener = this._emitter.on.bind(this._emitter), this.removeEventListener = this._emitter.on.bind(this._emitter), this._mouseStart = new z(), this._targetSize = new z(), this._caches = [], this._sizeFlag = "width", this._direction = 1, this._lines = [], this._pointerdown = (h) => {
|
|
@@ -9683,9 +9683,9 @@ class xc extends Po {
|
|
|
9683
9683
|
this._lines.forEach((e) => e.dispose()), this._emitter.removeAllListeners(), this.endNode.removeEventListener("pointerdown", this._pointerdown), this.endNode.removeEventListener("pointermove", this._pointermove), this.endNode.removeEventListener("pointerup", this._pointercancel), this.element.remove(), this._caches.forEach((e) => e.clear()), this._caches = [];
|
|
9684
9684
|
}
|
|
9685
9685
|
}
|
|
9686
|
-
class
|
|
9686
|
+
class bc extends li {
|
|
9687
9687
|
constructor() {
|
|
9688
|
-
super(), this._box3 = new Q(), this._line11 = new
|
|
9688
|
+
super(), this._box3 = new Q(), this._line11 = new Fi("长:"), this._line12 = new Fi("宽:"), this._line13 = new Fi("高:"), this._outline = new kn(0, 0), this._radius = 0, this._hasWidthConfig = !1, this._hasLengthConfig = !1, this._hasHeightConfig = !1, this.follow = "", this.followOrigin = 0, this.followScale = 1, this.originOffset = 0, this.translateCache = 0, this.head = 0, this.tail = 0, this._change = () => {
|
|
9689
9689
|
if (!this._app)
|
|
9690
9690
|
return;
|
|
9691
9691
|
const e = this._app.camera;
|
|
@@ -9737,7 +9737,7 @@ class wc extends ai {
|
|
|
9737
9737
|
update(e = 0) {
|
|
9738
9738
|
if (!this._object)
|
|
9739
9739
|
return;
|
|
9740
|
-
const t = this._object, { box: i, maxRadius: s, hasLength: a, hasHeight: n, hasWidth: c } =
|
|
9740
|
+
const t = this._object, { box: i, maxRadius: s, hasLength: a, hasHeight: n, hasWidth: c } = ac(t);
|
|
9741
9741
|
this.tail = Math.abs(i.min.x), this.head = Math.abs(i.max.x), this._hasWidthConfig = c, this._hasLengthConfig = a, this._hasHeightConfig = n, this._box3.copy(i), this._radius = s, this.follow && e && (this.originOffset = (this.followOrigin - e) * this.followScale), this._outline.update(this._radius), this._change();
|
|
9742
9742
|
const h = this._box3.min.x, f = this._box3.max.x, d = this._box3.min.z, r = this._box3.max.z, l = this._box3.min.y, u = this._box3.max.y;
|
|
9743
9743
|
let m = 0.2;
|
|
@@ -9759,14 +9759,14 @@ class wc extends ai {
|
|
|
9759
9759
|
w.y -= m / 6, this._line13.update(x, w, this._radius);
|
|
9760
9760
|
}
|
|
9761
9761
|
}
|
|
9762
|
-
class ct extends
|
|
9762
|
+
class ct extends X {
|
|
9763
9763
|
constructor(e = 0.6, t = 0.4, i = 0.2) {
|
|
9764
9764
|
super(), this.isGoods = !0, this._lineMaterial = new Ss({
|
|
9765
|
-
color: new
|
|
9765
|
+
color: new Z("#000"),
|
|
9766
9766
|
dashSize: 0.015,
|
|
9767
9767
|
gapSize: 0.015
|
|
9768
|
-
}), this._currentLength = 0.6, this._currentWidth = 0.4, this._currentHeight = 0.2, this.material = new
|
|
9769
|
-
color: new
|
|
9768
|
+
}), this._currentLength = 0.6, this._currentWidth = 0.4, this._currentHeight = 0.2, this.material = new oi({
|
|
9769
|
+
color: new Z("#0f5fd5"),
|
|
9770
9770
|
transparent: !0,
|
|
9771
9771
|
opacity: 0.4
|
|
9772
9772
|
}), this._currentLength = e, this._currentWidth = t, this._currentHeight = i, this._generate(e, t, i);
|
|
@@ -9784,6 +9784,10 @@ class ct extends K {
|
|
|
9784
9784
|
var e, t;
|
|
9785
9785
|
this.clear(), (e = this.lineSegments) == null || e.geometry.dispose(), this._lineMaterial.dispose(), (t = this.lineSegments) == null || t.removeFromParent();
|
|
9786
9786
|
}
|
|
9787
|
+
// 兼容外部清理调用
|
|
9788
|
+
clearAll() {
|
|
9789
|
+
this.dispose();
|
|
9790
|
+
}
|
|
9787
9791
|
clone(e) {
|
|
9788
9792
|
const t = new ct(this._currentLength, this._currentWidth, this._currentHeight);
|
|
9789
9793
|
return t.position.copy(this.position), t.rotation.copy(this.rotation), t.scale.copy(this.scale), t.visible = this.visible, t.castShadow = this.castShadow, t.receiveShadow = this.receiveShadow, e && this.children.forEach((i) => {
|
|
@@ -9799,10 +9803,10 @@ class ct extends K {
|
|
|
9799
9803
|
this.lineSegments = new Ts(s, this._lineMaterial), this.add(this.lineSegments), this.lineSegments.geometry.dispose(), this.lineSegments.geometry = s, this.lineSegments.computeLineDistances();
|
|
9800
9804
|
}
|
|
9801
9805
|
}
|
|
9802
|
-
const
|
|
9806
|
+
const Ac = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAALSURBVAiZY2AAAgAABQABYlUyiAAAAABJRU5ErkJggg==";
|
|
9803
9807
|
class jr {
|
|
9804
9808
|
constructor(e) {
|
|
9805
|
-
this._props = e, this.name = "", this.transparentTexture = Bn.load(
|
|
9809
|
+
this._props = e, this.name = "", this.transparentTexture = Bn.load(Ac), this._offscreen = new OffscreenCanvas(0, 0), this._defaults = { ...e }, this.target = e.target, this.parent = this.target.parent, this.reset();
|
|
9806
9810
|
}
|
|
9807
9811
|
get imageSize() {
|
|
9808
9812
|
return this._props.imageSize;
|
|
@@ -9836,7 +9840,7 @@ class jr {
|
|
|
9836
9840
|
let n = window.devicePixelRatio * 2;
|
|
9837
9841
|
this._offscreen.width = a.width + n, this._offscreen.height = a.height + n;
|
|
9838
9842
|
const c = this._offscreen.getContext("2d");
|
|
9839
|
-
c == null || c.clearRect(0, 0, this._offscreen.width, this._offscreen.height), c == null || c.drawImage(a, n / 2, n / 2, a.width, a.height), s = new Qe(this._offscreen), s.minFilter = 1003, s.colorSpace =
|
|
9843
|
+
c == null || c.clearRect(0, 0, this._offscreen.width, this._offscreen.height), c == null || c.drawImage(a, n / 2, n / 2, a.width, a.height), s = new Qe(this._offscreen), s.minFilter = 1003, s.colorSpace = ni, s.wrapS = s.wrapT = We, s.repeat.set(1 / t.x, 1 / t.y), s.offset.set(i.x, i.y), s.flipY = !1, s.needsUpdate = !0;
|
|
9840
9844
|
const h = this._props.target;
|
|
9841
9845
|
h.material && ((f = h.material.map) == null || f.dispose(), s ? (h.material.map = s, h.material.opacity = 1) : (h.material.map = this.transparentTexture, h.material.opacity = 0));
|
|
9842
9846
|
};
|
|
@@ -9857,9 +9861,9 @@ function Qr(o) {
|
|
|
9857
9861
|
}
|
|
9858
9862
|
const Bn = new mn();
|
|
9859
9863
|
Bn.crossOrigin = "anonymous";
|
|
9860
|
-
class
|
|
9864
|
+
class Tc extends li {
|
|
9861
9865
|
constructor(e) {
|
|
9862
|
-
super(), this._props = e, this._emitter = new Ot(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new ge(), this.lines = new ge(), this._clips = [], this._actionsMap = /* @__PURE__ */ new Map(), this._animationClock = new ji(), this.sizeBox = new
|
|
9866
|
+
super(), this._props = e, this._emitter = new Ot(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new ge(), this.lines = new ge(), this._clips = [], this._actionsMap = /* @__PURE__ */ new Map(), this._animationClock = new ji(), this.sizeBox = new bc(), this._goodsSize = new cc(0, 0, 0), this._slots = [], this._logos = [], this._skins = [], this._levels = /* @__PURE__ */ new Map(), this._rollerLevel = /* @__PURE__ */ new Map(), this._liftBrackets = [], this._videoCache = /* @__PURE__ */ new Map(), this._rollerColumns = 1, this._bodyOpacity = 1, this._masts = /* @__PURE__ */ new Map(), this._liftMaxHeight = 0, this._jackMaxHeight = 0, this._forkMaxHeight = 0, this.controllers = [], this.goods = [], this._breathLights = [], this._shelves = /* @__PURE__ */ new Map(), this._shelfMaxLevel = 1, this._url = "", this._showController = !0, this._showSlots = !0, this._shapeKeys = /* @__PURE__ */ new Map(), this._shapeKeyTargets = /* @__PURE__ */ new Map(), this._shapeKeyTimer = 0, this._shapeKeyCache = "", this._materialsCache = /* @__PURE__ */ new Map(), this.opacityCache = void 0, this.actions = [], this._useCenterModel = !1, this._useLift = !1, this._columnCount = 1, this._levelCount = 1, this._currentAction = null, this._pendingFinishedCallback = null, this._url = e.url || "", this._url && this.load(this._url).then(), this.add(this._container, this.lines), this._props.showSizeBox && this.add(this.sizeBox), this.showController = typeof e.showController == "boolean" ? e.showController : !0, this._showSlots = typeof e.showSlots == "boolean" ? e.showSlots : !0;
|
|
9863
9867
|
}
|
|
9864
9868
|
get shapeKeys() {
|
|
9865
9869
|
return this._shapeKeys;
|
|
@@ -9926,7 +9930,7 @@ class Ac extends ai {
|
|
|
9926
9930
|
}
|
|
9927
9931
|
set bodyOpacity(e) {
|
|
9928
9932
|
this._bodyOpacity = e, e < 1 ? this._materialsCache.forEach((t) => {
|
|
9929
|
-
t.mat.transparent = !0, t.mat.opacity = e, t.mat.metalness = 0, t.mat.roughness = 1, t.mat.color = new
|
|
9933
|
+
t.mat.transparent = !0, t.mat.opacity = e, t.mat.metalness = 0, t.mat.roughness = 1, t.mat.color = new Z("#3859be"), t.mat.needsUpdate = !0;
|
|
9930
9934
|
}) : this._materialsCache.forEach((t) => {
|
|
9931
9935
|
t.mat.transparent = t.transparent, t.mat.opacity = t.opacity, t.mat.metalness = t.metalness, t.mat.roughness = t.roughness, t.mat.color = t.color, t.mat.needsUpdate = !0;
|
|
9932
9936
|
});
|
|
@@ -9940,7 +9944,7 @@ class Ac extends ai {
|
|
|
9940
9944
|
this._animationClock.getDelta();
|
|
9941
9945
|
}, this._app.renderer.domElement.addEventListener("ticker", this._onTicker), this.addEventListener("shape-key-changed", (t, i) => {
|
|
9942
9946
|
if (this._slots.forEach((s) => s.shapeKeyChanged(t, i)), this.sizeBox.follow === t ? (this.sizeBox.generate(this._container, i), this.sizeBox.originOffset && (this._container.traverse((s) => {
|
|
9943
|
-
s instanceof
|
|
9947
|
+
s instanceof X && !s.userData.isDevice && !s.userData.isBracket && s.geometry.translate(this.sizeBox.originOffset - this.sizeBox.translateCache, 0, 0), s instanceof Vr && !s.props.slot.userData.ignoreOriginChanged && s.parent && s.parent.position.add(new b(this.sizeBox.originOffset - this.sizeBox.translateCache, 0, 0));
|
|
9944
9948
|
}), this.sizeBox.translateCache = this.sizeBox.originOffset, this.sizeBox.generate(this._container))) : this.sizeBox.generate(this._container), ["width", "length", "height"].includes(t) && this._emitter.emit("size-changed", t, i), t === "goodsLength") {
|
|
9945
9949
|
const s = i + 0.14 - 0.54;
|
|
9946
9950
|
this.setShapeKey("boxLength", s);
|
|
@@ -10054,7 +10058,7 @@ class Ac extends ai {
|
|
|
10054
10058
|
let n = t;
|
|
10055
10059
|
a.userData[`origin_${e}`] && (n -= a.userData[`origin_${e}`]);
|
|
10056
10060
|
const c = (h = a.morphTargetDictionary) == null ? void 0 : h[e];
|
|
10057
|
-
c !== void 0 && a.morphTargetInfluences && (a.morphTargetInfluences[c] = n), a instanceof
|
|
10061
|
+
c !== void 0 && a.morphTargetInfluences && (a.morphTargetInfluences[c] = n), a instanceof X && a.geometry.translate(0, 0, 1e-9);
|
|
10058
10062
|
}), i && this._emitter.emit("shape-key-changed", e, t);
|
|
10059
10063
|
}, 0);
|
|
10060
10064
|
}
|
|
@@ -10075,7 +10079,7 @@ class Ac extends ai {
|
|
|
10075
10079
|
n ? n.push(i) : this._shapeKeyTargets.set(s, [i]);
|
|
10076
10080
|
});
|
|
10077
10081
|
}), e.traverse((i) => {
|
|
10078
|
-
if (i instanceof
|
|
10082
|
+
if (i instanceof X) {
|
|
10079
10083
|
if (i.castShadow = !0, i.receiveShadow = !0, i.material)
|
|
10080
10084
|
if (Array.isArray(i.material))
|
|
10081
10085
|
i.material.forEach((a) => {
|
|
@@ -10085,8 +10089,16 @@ class Ac extends ai {
|
|
|
10085
10089
|
})));
|
|
10086
10090
|
});
|
|
10087
10091
|
else {
|
|
10092
|
+
if (i.material.userData.isVideo && i.material.userData.video) {
|
|
10093
|
+
const a = i.material.userData.video;
|
|
10094
|
+
let n = this._videoCache.get(a);
|
|
10095
|
+
n || (n = document.createElement("video"), n.src = a, n.crossOrigin = "anonymous", n.loop = !0, n.muted = !0, n.playsInline = !0, n.autoplay = !0, n.preload = "auto", this._videoCache.set(a, n)), n.play().catch(() => {
|
|
10096
|
+
}), i.material.map && i.material.map.dispose(), i.material.emissiveMap && i.material.emissiveMap.dispose();
|
|
10097
|
+
const c = new ao(n);
|
|
10098
|
+
c.colorSpace = ni, i.material.map = c, i.material.emissiveMap = c, i.material.emissive || (i.material.emissive = new Z(16777215)), i.material.emissiveIntensity = 1, i.material.needsUpdate = !0;
|
|
10099
|
+
}
|
|
10088
10100
|
if (i.material.userData.isBreathLight && i.material.emissiveIntensity) {
|
|
10089
|
-
i.material.emissive || (i.material.emissive = new
|
|
10101
|
+
i.material.emissive || (i.material.emissive = new Z(16777215)), i.material.emissiveIntensity = 2, i.material.toneMapped = !1;
|
|
10090
10102
|
const a = 1e3, n = new Je.Tween(i.material).to({ emissiveIntensity: 0.2 }).easing(Je.Easing.Quintic.InOut).duration(a), c = new Je.Tween(i.material).to({ emissiveIntensity: 2 }).easing(Je.Easing.Quintic.InOut).duration(a);
|
|
10091
10103
|
n.onComplete(() => c.start()), c.onComplete(() => n.start()), n.start(), this._breathLights.push(n, c);
|
|
10092
10104
|
}
|
|
@@ -10105,7 +10117,7 @@ class Ac extends ai {
|
|
|
10105
10117
|
width: 0,
|
|
10106
10118
|
height: 0
|
|
10107
10119
|
};
|
|
10108
|
-
i.material.map && i.material.map.image && (h.width = i.material.map.image.width, h.height = i.material.map.image.height, c = zr(i.material.map.image));
|
|
10120
|
+
i.material.map && i.material.map.image && (h.width = i.material.map.image.width, h.height = i.material.map.image.height, c = zr(i.material.map.image)), i.material.needsUpdate = !0;
|
|
10109
10121
|
const f = new jr({
|
|
10110
10122
|
name: n.userData.name,
|
|
10111
10123
|
target: i,
|
|
@@ -10443,11 +10455,11 @@ class Ac extends ai {
|
|
|
10443
10455
|
}
|
|
10444
10456
|
generateDimension(e, t) {
|
|
10445
10457
|
if (e.userData.isDimension) {
|
|
10446
|
-
const i = e.userData.divider, s =
|
|
10458
|
+
const i = e.userData.divider, s = nc(e.userData.startOrigin), a = e.userData.axios;
|
|
10447
10459
|
let n, c;
|
|
10448
10460
|
if (a === "x" ? (n = new b(e.userData.start - e.position.x, 0, 0), c = n.clone().setX(e.userData.end - e.position.x)) : a === "z" ? (n = new b(0, e.userData.start - e.position.y, 0), c = n.clone().setY(e.userData.end - e.position.y)) : (n = new b(0, 0, e.userData.start - e.position.z), c = n.clone().setZ(e.userData.end - e.position.z)), !Object.keys(e.userData).flatMap((r) => r.startsWith("target") ? e.userData[r].name : []).length)
|
|
10449
10461
|
return;
|
|
10450
|
-
const d = new
|
|
10462
|
+
const d = new wc({
|
|
10451
10463
|
start: n,
|
|
10452
10464
|
end: c,
|
|
10453
10465
|
startOrigin: s,
|
|
@@ -10525,8 +10537,10 @@ class Ac extends ai {
|
|
|
10525
10537
|
}
|
|
10526
10538
|
clean() {
|
|
10527
10539
|
this._emitter.removeAllListeners(), this.controllers.forEach((e) => e.dispose()), this.controllers = [], this._levels.forEach((e) => e.destroy()), this._levels.clear(), this._rollerLevel.clear(), De(this._container), this._slots = [], this._logos = [], this._skins = [], this._materialsCache.clear(), this.opacityCache = void 0, this._breathLights.forEach((e) => e.stop()), this._breathLights = [], this.sizeBox.reset(), this._shapeKeyTargets.clear(), this._shapeKeys.clear(), this._shapeKeyTimer && (clearTimeout(this._shapeKeyTimer), this._shapeKeyTimer = 0), this._currentAction = null, this._pendingFinishedCallback && this._mixer && (this._mixer.removeEventListener("finished", this._pendingFinishedCallback), this._pendingFinishedCallback = null), this._mixer && (this._mixer.stopAllAction(), this._modelRoot && this._mixer.uncacheRoot(this._modelRoot)), this._mixer = void 0, this._clips = [], this._actionsMap.clear(), this.actions = [], this._lift = void 0, this._fork = void 0, this._jack = void 0, this._roller = void 0, this._rollerBaffle = void 0, this._rollerTop = void 0, this._shelf = void 0, this._rollerGoodsBox = void 0, this._modelRoot = void 0, this.goods.forEach((e) => {
|
|
10528
|
-
e.
|
|
10529
|
-
}), this.goods = [], this._liftBrackets = [], this.
|
|
10540
|
+
e.dispose(), e.parent && e.removeFromParent();
|
|
10541
|
+
}), this.goods = [], this._liftBrackets = [], this._videoCache.forEach((e) => {
|
|
10542
|
+
e.pause(), e.removeAttribute("src"), e.load(), e.remove();
|
|
10543
|
+
}), this._videoCache.clear(), this._masts.clear(), this._shelves.clear(), this._outline && (this._outline.removeFromParent(), this._outline = void 0), this._app && this._onTicker && this._app.renderer.domElement.removeEventListener("ticker", this._onTicker), this._onTicker = void 0;
|
|
10530
10544
|
}
|
|
10531
10545
|
destroy() {
|
|
10532
10546
|
this.clean(), this.sizeBox.destroy();
|
|
@@ -10542,7 +10556,7 @@ class Ac extends ai {
|
|
|
10542
10556
|
r !== s && r !== a && (r.stopFading(), r.setEffectiveWeight(0), r.stop());
|
|
10543
10557
|
});
|
|
10544
10558
|
const f = (t == null ? void 0 : t.loop) ?? !1;
|
|
10545
|
-
(i || !s.isRunning()) && s.reset(), s.enabled = !0, s.setEffectiveTimeScale((t == null ? void 0 : t.timeScale) ?? 1), s.setEffectiveWeight(1), s.paused = !1, s.setLoop(f ?
|
|
10559
|
+
(i || !s.isRunning()) && s.reset(), s.enabled = !0, s.setEffectiveTimeScale((t == null ? void 0 : t.timeScale) ?? 1), s.setEffectiveWeight(1), s.paused = !1, s.setLoop(f ? lo : co, f ? 1 / 0 : 1), s.clampWhenFinished = (t == null ? void 0 : t.clampWhenFinished) ?? !f, s.play();
|
|
10546
10560
|
const d = (t == null ? void 0 : t.timeScale) ?? 1;
|
|
10547
10561
|
return h ? (a.stopFading(), a.enabled = !0, a.setEffectiveWeight(1), a.crossFadeTo(s, c, !1)) : c > 0 && s.fadeIn(c), s.setEffectiveTimeScale(d), this._currentAction = s, new Promise((r) => {
|
|
10548
10562
|
this._pendingFinishedCallback && this._mixer && this._mixer.removeEventListener("finished", this._pendingFinishedCallback);
|
|
@@ -10585,19 +10599,19 @@ class Ac extends ai {
|
|
|
10585
10599
|
})) : (this._mixer.stopAllAction(), Promise.resolve())) : Promise.resolve();
|
|
10586
10600
|
}
|
|
10587
10601
|
}
|
|
10588
|
-
const On = 0,
|
|
10589
|
-
function
|
|
10602
|
+
const On = 0, Sc = 1, Mc = 2, Yr = 2, hs = 1.25, Zr = 1, ii = 6 * 4 + 4 + 4, Ki = 65535, Cc = Math.pow(2, -24), us = Symbol("SKIP_GENERATION");
|
|
10603
|
+
function Ic(o) {
|
|
10590
10604
|
return o.index ? o.index.count : o.attributes.position.count;
|
|
10591
10605
|
}
|
|
10592
10606
|
function zt(o) {
|
|
10593
|
-
return
|
|
10607
|
+
return Ic(o) / 3;
|
|
10594
10608
|
}
|
|
10595
|
-
function
|
|
10609
|
+
function Rc(o, e = ArrayBuffer) {
|
|
10596
10610
|
return o > 65535 ? new Uint32Array(new e(4 * o)) : new Uint16Array(new e(2 * o));
|
|
10597
10611
|
}
|
|
10598
|
-
function
|
|
10612
|
+
function Dc(o, e) {
|
|
10599
10613
|
if (!o.index) {
|
|
10600
|
-
const t = o.attributes.position.count, i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s =
|
|
10614
|
+
const t = o.attributes.position.count, i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = Rc(t, i);
|
|
10601
10615
|
o.setIndex(new fe(s, 1));
|
|
10602
10616
|
for (let a = 0; a < t; a++)
|
|
10603
10617
|
s[a] = a;
|
|
@@ -10628,7 +10642,7 @@ function Un(o) {
|
|
|
10628
10642
|
}
|
|
10629
10643
|
return e;
|
|
10630
10644
|
}
|
|
10631
|
-
function
|
|
10645
|
+
function Pc(o) {
|
|
10632
10646
|
if (o.groups.length === 0)
|
|
10633
10647
|
return !1;
|
|
10634
10648
|
const e = zt(o), t = Un(o).sort((a, n) => a.offset - n.offset), i = t[t.length - 1];
|
|
@@ -10648,7 +10662,7 @@ function fs(o, e, t, i, s) {
|
|
|
10648
10662
|
}
|
|
10649
10663
|
i[0] = a, i[1] = n, i[2] = c, i[3] = h, i[4] = f, i[5] = d, s[0] = r, s[1] = l, s[2] = u, s[3] = m, s[4] = v, s[5] = p;
|
|
10650
10664
|
}
|
|
10651
|
-
function
|
|
10665
|
+
function Lc(o, e = null, t = null, i = null) {
|
|
10652
10666
|
const s = o.attributes.position, a = o.index ? o.index.array : null, n = zt(o), c = s.normalized;
|
|
10653
10667
|
let h;
|
|
10654
10668
|
e === null ? (h = new Float32Array(n * 6 * 4), t = 0, i = n) : (h = e, t = t || 0, i = i || n);
|
|
@@ -10668,7 +10682,7 @@ function Pc(o, e = null, t = null, i = null) {
|
|
|
10668
10682
|
let C = x;
|
|
10669
10683
|
w > C && (C = w), A > C && (C = A);
|
|
10670
10684
|
const M = (C - S) / 2, R = y * 2;
|
|
10671
|
-
h[v + R + 0] = S + M, h[v + R + 1] = M + (Math.abs(S) + M) *
|
|
10685
|
+
h[v + R + 0] = S + M, h[v + R + 1] = M + (Math.abs(S) + M) * Cc;
|
|
10672
10686
|
}
|
|
10673
10687
|
}
|
|
10674
10688
|
return h;
|
|
@@ -10694,7 +10708,7 @@ function Jr(o, e, t) {
|
|
|
10694
10708
|
i = o[a], s = e[a], t[a] = i < s ? i : s, i = o[n], s = e[n], t[n] = i > s ? i : s;
|
|
10695
10709
|
}
|
|
10696
10710
|
}
|
|
10697
|
-
function
|
|
10711
|
+
function yi(o, e, t) {
|
|
10698
10712
|
for (let i = 0; i < 3; i++) {
|
|
10699
10713
|
const s = e[o + 2 * i], a = e[o + 2 * i + 1], n = s - a, c = s + a;
|
|
10700
10714
|
n < t[i] && (t[i] = n), c > t[i + 3] && (t[i + 3] = c);
|
|
@@ -10704,20 +10718,20 @@ function qt(o) {
|
|
|
10704
10718
|
const e = o[3] - o[0], t = o[4] - o[1], i = o[5] - o[2];
|
|
10705
10719
|
return 2 * (e * t + t * i + i * e);
|
|
10706
10720
|
}
|
|
10707
|
-
const Le = 32,
|
|
10721
|
+
const Le = 32, Ec = (o, e) => o.candidate - e.candidate, je = new Array(Le).fill().map(() => ({
|
|
10708
10722
|
count: 0,
|
|
10709
10723
|
bounds: new Float32Array(6),
|
|
10710
10724
|
rightCacheBounds: new Float32Array(6),
|
|
10711
10725
|
leftCacheBounds: new Float32Array(6),
|
|
10712
10726
|
candidate: 0
|
|
10713
|
-
})),
|
|
10714
|
-
function
|
|
10727
|
+
})), xi = new Float32Array(6);
|
|
10728
|
+
function Fc(o, e, t, i, s, a) {
|
|
10715
10729
|
let n = -1, c = 0;
|
|
10716
10730
|
if (a === On)
|
|
10717
10731
|
n = Kr(e), n !== -1 && (c = (e[n] + e[n + 3]) / 2);
|
|
10718
|
-
else if (a ===
|
|
10719
|
-
n = Kr(o), n !== -1 && (c =
|
|
10720
|
-
else if (a ===
|
|
10732
|
+
else if (a === Sc)
|
|
10733
|
+
n = Kr(o), n !== -1 && (c = kc(t, i, s, n));
|
|
10734
|
+
else if (a === Mc) {
|
|
10721
10735
|
const h = qt(o);
|
|
10722
10736
|
let f = hs * s;
|
|
10723
10737
|
const d = i * 6, r = (i + s) * 6;
|
|
@@ -10737,9 +10751,9 @@ function Ec(o, e, t, i, s, a) {
|
|
|
10737
10751
|
} = w;
|
|
10738
10752
|
for (let M = 0; M < 3; M++)
|
|
10739
10753
|
C[M] = 1 / 0, C[M + 3] = -1 / 0, S[M] = 1 / 0, S[M + 3] = -1 / 0, A[M] = 1 / 0, A[M + 3] = -1 / 0;
|
|
10740
|
-
|
|
10754
|
+
yi(x, t, A);
|
|
10741
10755
|
}
|
|
10742
|
-
g.sort(
|
|
10756
|
+
g.sort(Ec);
|
|
10743
10757
|
let y = s;
|
|
10744
10758
|
for (let x = 0; x < y; x++) {
|
|
10745
10759
|
const w = g[x];
|
|
@@ -10750,7 +10764,7 @@ function Ec(o, e, t, i, s, a) {
|
|
|
10750
10764
|
const w = t[x + 2 * l];
|
|
10751
10765
|
for (let A = 0; A < y; A++) {
|
|
10752
10766
|
const S = g[A];
|
|
10753
|
-
w >= S.candidate ?
|
|
10767
|
+
w >= S.candidate ? yi(x, t, S.rightCacheBounds) : (yi(x, t, S.leftCacheBounds), S.count++);
|
|
10754
10768
|
}
|
|
10755
10769
|
}
|
|
10756
10770
|
for (let x = 0; x < y; x++) {
|
|
@@ -10774,7 +10788,7 @@ function Ec(o, e, t, i, s, a) {
|
|
|
10774
10788
|
let A = ~~((t[y + 2 * l] - u) / p);
|
|
10775
10789
|
A >= Le && (A = Le - 1);
|
|
10776
10790
|
const S = je[A];
|
|
10777
|
-
S.count++,
|
|
10791
|
+
S.count++, yi(y, t, S.bounds);
|
|
10778
10792
|
}
|
|
10779
10793
|
const g = je[Le - 1];
|
|
10780
10794
|
Xr(g.bounds, g.rightCacheBounds);
|
|
@@ -10785,9 +10799,9 @@ function Ec(o, e, t, i, s, a) {
|
|
|
10785
10799
|
let _ = 0;
|
|
10786
10800
|
for (let y = 0; y < Le - 1; y++) {
|
|
10787
10801
|
const x = je[y], w = x.count, A = x.bounds, C = je[y + 1].rightCacheBounds;
|
|
10788
|
-
w !== 0 && (_ === 0 ? Xr(A,
|
|
10802
|
+
w !== 0 && (_ === 0 ? Xr(A, xi) : Jr(A, xi, xi)), _ += w;
|
|
10789
10803
|
let M = 0, R = 0;
|
|
10790
|
-
_ !== 0 && (M = qt(
|
|
10804
|
+
_ !== 0 && (M = qt(xi) / h);
|
|
10791
10805
|
const D = s - _;
|
|
10792
10806
|
D !== 0 && (R = qt(C) / h);
|
|
10793
10807
|
const T = Zr + hs * (M * _ + R * D);
|
|
@@ -10799,7 +10813,7 @@ function Ec(o, e, t, i, s, a) {
|
|
|
10799
10813
|
console.warn(`MeshBVH: Invalid build strategy value ${a} used.`);
|
|
10800
10814
|
return { axis: n, pos: c };
|
|
10801
10815
|
}
|
|
10802
|
-
function
|
|
10816
|
+
function kc(o, e, t, i) {
|
|
10803
10817
|
let s = 0;
|
|
10804
10818
|
for (let a = e, n = e + t; a < n; a++)
|
|
10805
10819
|
s += o[a * 6 + i * 2];
|
|
@@ -10810,7 +10824,7 @@ class ds {
|
|
|
10810
10824
|
this.boundingData = new Float32Array(6);
|
|
10811
10825
|
}
|
|
10812
10826
|
}
|
|
10813
|
-
function
|
|
10827
|
+
function Bc(o, e, t, i, s, a) {
|
|
10814
10828
|
let n = i, c = i + s - 1;
|
|
10815
10829
|
const h = a.pos, f = a.axis * 2;
|
|
10816
10830
|
for (; ; ) {
|
|
@@ -10832,7 +10846,7 @@ function kc(o, e, t, i, s, a) {
|
|
|
10832
10846
|
return n;
|
|
10833
10847
|
}
|
|
10834
10848
|
}
|
|
10835
|
-
function
|
|
10849
|
+
function Oc(o, e, t, i, s, a) {
|
|
10836
10850
|
let n = i, c = i + s - 1;
|
|
10837
10851
|
const h = a.pos, f = a.axis * 2;
|
|
10838
10852
|
for (; ; ) {
|
|
@@ -10870,13 +10884,13 @@ function ye(o, e) {
|
|
|
10870
10884
|
function Hn(o, e) {
|
|
10871
10885
|
return e[o + 7];
|
|
10872
10886
|
}
|
|
10873
|
-
let Wn, $t,
|
|
10874
|
-
const
|
|
10887
|
+
let Wn, $t, ki, Nn;
|
|
10888
|
+
const zc = Math.pow(2, 32);
|
|
10875
10889
|
function Es(o) {
|
|
10876
10890
|
return "count" in o ? 1 : 1 + Es(o.left) + Es(o.right);
|
|
10877
10891
|
}
|
|
10878
|
-
function
|
|
10879
|
-
return Wn = new Float32Array(t), $t = new Uint32Array(t),
|
|
10892
|
+
function Uc(o, e, t) {
|
|
10893
|
+
return Wn = new Float32Array(t), $t = new Uint32Array(t), ki = new Uint16Array(t), Nn = new Uint8Array(t), Fs(o, e);
|
|
10880
10894
|
}
|
|
10881
10895
|
function Fs(o, e) {
|
|
10882
10896
|
const t = o / 4, i = o / 2, s = "count" in e, a = e.boundingData;
|
|
@@ -10888,28 +10902,28 @@ function Fs(o, e) {
|
|
|
10888
10902
|
Nn.set(new Uint8Array(n), o);
|
|
10889
10903
|
for (let c = o, h = o + n.byteLength; c < h; c += ii) {
|
|
10890
10904
|
const f = c / 2;
|
|
10891
|
-
ae(f,
|
|
10905
|
+
ae(f, ki) || ($t[c / 4 + 6] += t);
|
|
10892
10906
|
}
|
|
10893
10907
|
return o + n.byteLength;
|
|
10894
10908
|
} else {
|
|
10895
10909
|
const n = e.offset, c = e.count;
|
|
10896
|
-
return $t[t + 6] = n,
|
|
10910
|
+
return $t[t + 6] = n, ki[i + 14] = c, ki[i + 15] = Ki, o + ii;
|
|
10897
10911
|
}
|
|
10898
10912
|
else {
|
|
10899
10913
|
const n = e.left, c = e.right, h = e.splitAxis;
|
|
10900
10914
|
let f;
|
|
10901
|
-
if (f = Fs(o + ii, n), f / 4 >
|
|
10915
|
+
if (f = Fs(o + ii, n), f / 4 > zc)
|
|
10902
10916
|
throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
|
|
10903
10917
|
return $t[t + 6] = f / 4, f = Fs(f, c), $t[t + 7] = h, f;
|
|
10904
10918
|
}
|
|
10905
10919
|
}
|
|
10906
|
-
function
|
|
10920
|
+
function Hc(o, e) {
|
|
10907
10921
|
const t = (o.index ? o.index.count : o.attributes.position.count) / 3, i = t > 2 ** 16, s = i ? 4 : 2, a = e ? new SharedArrayBuffer(t * s) : new ArrayBuffer(t * s), n = i ? new Uint32Array(a) : new Uint16Array(a);
|
|
10908
10922
|
for (let c = 0, h = n.length; c < h; c++)
|
|
10909
10923
|
n[c] = c;
|
|
10910
10924
|
return n;
|
|
10911
10925
|
}
|
|
10912
|
-
function
|
|
10926
|
+
function Wc(o, e, t, i, s) {
|
|
10913
10927
|
const {
|
|
10914
10928
|
maxDepth: a,
|
|
10915
10929
|
verbose: n,
|
|
@@ -10917,7 +10931,7 @@ function Hc(o, e, t, i, s) {
|
|
|
10917
10931
|
strategy: h,
|
|
10918
10932
|
onProgress: f,
|
|
10919
10933
|
indirect: d
|
|
10920
|
-
} = s, r = o._indirectBuffer, l = o.geometry, u = l.index ? l.index.array : null, m = d ?
|
|
10934
|
+
} = s, r = o._indirectBuffer, l = o.geometry, u = l.index ? l.index.array : null, m = d ? Oc : Bc, v = zt(l), p = new Float32Array(6);
|
|
10921
10935
|
let g = !1;
|
|
10922
10936
|
const _ = new ds();
|
|
10923
10937
|
return fs(e, t, i, _.boundingData, p), x(_, t, i, p), _;
|
|
@@ -10927,7 +10941,7 @@ function Hc(o, e, t, i, s) {
|
|
|
10927
10941
|
function x(w, A, S, C = null, M = 0) {
|
|
10928
10942
|
if (!g && M >= a && (g = !0, n && (console.warn(`MeshBVH: Max depth of ${a} reached when generating BVH. Consider increasing maxDepth.`), console.warn(l))), S <= c || M >= a)
|
|
10929
10943
|
return y(A + S), w.offset = A, w.count = S, w;
|
|
10930
|
-
const R =
|
|
10944
|
+
const R = Fc(w.boundingData, C, e, A, S, h);
|
|
10931
10945
|
if (R.axis === -1)
|
|
10932
10946
|
return y(A + S), w.offset = A, w.count = S, w;
|
|
10933
10947
|
const D = m(r, u, e, A, S, R);
|
|
@@ -10943,15 +10957,15 @@ function Hc(o, e, t, i, s) {
|
|
|
10943
10957
|
return w;
|
|
10944
10958
|
}
|
|
10945
10959
|
}
|
|
10946
|
-
function
|
|
10960
|
+
function Nc(o, e) {
|
|
10947
10961
|
const t = o.geometry;
|
|
10948
|
-
e.indirect && (o._indirectBuffer =
|
|
10962
|
+
e.indirect && (o._indirectBuffer = Hc(t, e.useSharedArrayBuffer), Pc(t) && !e.verbose && console.warn(
|
|
10949
10963
|
'MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.'
|
|
10950
|
-
)), o._indirectBuffer ||
|
|
10951
|
-
const i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s =
|
|
10964
|
+
)), o._indirectBuffer || Dc(t, e);
|
|
10965
|
+
const i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = Lc(t), a = e.indirect ? zn(t) : Un(t);
|
|
10952
10966
|
o._roots = a.map((n) => {
|
|
10953
|
-
const c =
|
|
10954
|
-
return
|
|
10967
|
+
const c = Wc(o, s, n.offset, n.count, e), h = Es(c), f = new i(ii * h);
|
|
10968
|
+
return Uc(0, c, f), f;
|
|
10955
10969
|
});
|
|
10956
10970
|
}
|
|
10957
10971
|
class Ne {
|
|
@@ -10993,7 +11007,7 @@ Ne.prototype.setFromBox = function() {
|
|
|
10993
11007
|
this.min = n, this.max = c;
|
|
10994
11008
|
};
|
|
10995
11009
|
}();
|
|
10996
|
-
const
|
|
11010
|
+
const Vc = function() {
|
|
10997
11011
|
const o = new b(), e = new b(), t = new b();
|
|
10998
11012
|
return function(s, a, n) {
|
|
10999
11013
|
const c = s.start, h = o, f = a.start, d = e;
|
|
@@ -11005,7 +11019,7 @@ const Nc = function() {
|
|
|
11005
11019
|
}(), $s = function() {
|
|
11006
11020
|
const o = new z(), e = new b(), t = new b();
|
|
11007
11021
|
return function(s, a, n, c) {
|
|
11008
|
-
|
|
11022
|
+
Vc(s, a, o);
|
|
11009
11023
|
let h = o.x, f = o.y;
|
|
11010
11024
|
if (h >= 0 && h <= 1 && f >= 0 && f <= 1) {
|
|
11011
11025
|
s.at(h, n), a.at(f, c);
|
|
@@ -11031,7 +11045,7 @@ const Nc = function() {
|
|
|
11031
11045
|
}
|
|
11032
11046
|
}
|
|
11033
11047
|
};
|
|
11034
|
-
}(),
|
|
11048
|
+
}(), Gc = function() {
|
|
11035
11049
|
const o = new b(), e = new b(), t = new Gs(), i = new Ue();
|
|
11036
11050
|
return function(a, n) {
|
|
11037
11051
|
const { radius: c, center: h } = a, { a: f, b: d, c: r } = n;
|
|
@@ -11045,16 +11059,16 @@ const Nc = function() {
|
|
|
11045
11059
|
}
|
|
11046
11060
|
return !1;
|
|
11047
11061
|
};
|
|
11048
|
-
}(),
|
|
11062
|
+
}(), qc = 1e-15;
|
|
11049
11063
|
function ps(o) {
|
|
11050
|
-
return Math.abs(o) <
|
|
11064
|
+
return Math.abs(o) < qc;
|
|
11051
11065
|
}
|
|
11052
11066
|
class Ce extends Xt {
|
|
11053
11067
|
constructor(...e) {
|
|
11054
11068
|
super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new b()), this.satBounds = new Array(4).fill().map(() => new Ne()), this.points = [this.a, this.b, this.c], this.sphere = new Qi(), this.plane = new Gs(), this.needsUpdate = !0;
|
|
11055
11069
|
}
|
|
11056
11070
|
intersectsSphere(e) {
|
|
11057
|
-
return
|
|
11071
|
+
return Gc(e, this);
|
|
11058
11072
|
}
|
|
11059
11073
|
update() {
|
|
11060
11074
|
const e = this.a, t = this.b, i = this.c, s = this.points, a = this.satAxes, n = this.satBounds, c = a[0], h = n[0];
|
|
@@ -11325,13 +11339,13 @@ class er {
|
|
|
11325
11339
|
this._primitives.push(e);
|
|
11326
11340
|
}
|
|
11327
11341
|
}
|
|
11328
|
-
class
|
|
11342
|
+
class jc extends er {
|
|
11329
11343
|
constructor() {
|
|
11330
11344
|
super(() => new Ce());
|
|
11331
11345
|
}
|
|
11332
11346
|
}
|
|
11333
|
-
const xe = /* @__PURE__ */ new
|
|
11334
|
-
class
|
|
11347
|
+
const xe = /* @__PURE__ */ new jc();
|
|
11348
|
+
class Qc {
|
|
11335
11349
|
constructor() {
|
|
11336
11350
|
this.float32Array = null, this.uint16Array = null, this.uint32Array = null;
|
|
11337
11351
|
const e = [];
|
|
@@ -11343,13 +11357,13 @@ class jc {
|
|
|
11343
11357
|
};
|
|
11344
11358
|
}
|
|
11345
11359
|
}
|
|
11346
|
-
const V = new
|
|
11360
|
+
const V = new Qc();
|
|
11347
11361
|
let $e, Rt;
|
|
11348
|
-
const gt = [],
|
|
11349
|
-
function
|
|
11350
|
-
$e =
|
|
11362
|
+
const gt = [], wi = /* @__PURE__ */ new er(() => new Q());
|
|
11363
|
+
function Yc(o, e, t, i, s, a) {
|
|
11364
|
+
$e = wi.getPrimitive(), Rt = wi.getPrimitive(), gt.push($e, Rt), V.setBuffer(o._roots[e]);
|
|
11351
11365
|
const n = ks(0, o.geometry, t, i, s, a);
|
|
11352
|
-
V.clearBuffer(),
|
|
11366
|
+
V.clearBuffer(), wi.releasePrimitive($e), wi.releasePrimitive(Rt), gt.pop(), gt.pop();
|
|
11353
11367
|
const c = gt.length;
|
|
11354
11368
|
return c > 0 && (Rt = gt[c - 1], $e = gt[c - 2]), n;
|
|
11355
11369
|
}
|
|
@@ -11418,7 +11432,7 @@ function ks(o, e, t, i, s = null, a = 0, n = 0) {
|
|
|
11418
11432
|
}
|
|
11419
11433
|
}
|
|
11420
11434
|
const jt = /* @__PURE__ */ new b(), ms = /* @__PURE__ */ new b();
|
|
11421
|
-
function
|
|
11435
|
+
function Zc(o, e, t = {}, i = 0, s = 1 / 0) {
|
|
11422
11436
|
const a = i * i, n = s * s;
|
|
11423
11437
|
let c = 1 / 0, h = null;
|
|
11424
11438
|
if (o.shapecast(
|
|
@@ -11436,10 +11450,10 @@ function Yc(o, e, t = {}, i = 0, s = 1 / 0) {
|
|
|
11436
11450
|
const f = Math.sqrt(c);
|
|
11437
11451
|
return t.point ? t.point.copy(ms) : t.point = ms.clone(), t.distance = f, t.faceIndex = h, t;
|
|
11438
11452
|
}
|
|
11439
|
-
const vt = /* @__PURE__ */ new b(), _t = /* @__PURE__ */ new b(), yt = /* @__PURE__ */ new b(),
|
|
11440
|
-
function
|
|
11453
|
+
const vt = /* @__PURE__ */ new b(), _t = /* @__PURE__ */ new b(), yt = /* @__PURE__ */ new b(), bi = /* @__PURE__ */ new z(), Ai = /* @__PURE__ */ new z(), Ti = /* @__PURE__ */ new z(), $r = /* @__PURE__ */ new b(), en = /* @__PURE__ */ new b(), tn = /* @__PURE__ */ new b(), Si = /* @__PURE__ */ new b();
|
|
11454
|
+
function Kc(o, e, t, i, s, a, n, c) {
|
|
11441
11455
|
let h;
|
|
11442
|
-
if (a === dn ? h = o.intersectTriangle(i, t, e, !0, s) : h = o.intersectTriangle(e, t, i, a !==
|
|
11456
|
+
if (a === dn ? h = o.intersectTriangle(i, t, e, !0, s) : h = o.intersectTriangle(e, t, i, a !== ai, s), h === null)
|
|
11443
11457
|
return null;
|
|
11444
11458
|
const f = o.origin.distanceTo(s);
|
|
11445
11459
|
return f < n || f > c ? null : {
|
|
@@ -11447,11 +11461,11 @@ function Zc(o, e, t, i, s, a, n, c) {
|
|
|
11447
11461
|
point: s.clone()
|
|
11448
11462
|
};
|
|
11449
11463
|
}
|
|
11450
|
-
function
|
|
11464
|
+
function Xc(o, e, t, i, s, a, n, c, h, f, d) {
|
|
11451
11465
|
vt.fromBufferAttribute(e, a), _t.fromBufferAttribute(e, n), yt.fromBufferAttribute(e, c);
|
|
11452
|
-
const r =
|
|
11466
|
+
const r = Kc(o, vt, _t, yt, Si, h, f, d);
|
|
11453
11467
|
if (r) {
|
|
11454
|
-
i && (
|
|
11468
|
+
i && (bi.fromBufferAttribute(i, a), Ai.fromBufferAttribute(i, n), Ti.fromBufferAttribute(i, c), r.uv = Xt.getInterpolation(Si, vt, _t, yt, bi, Ai, Ti, new z())), s && (bi.fromBufferAttribute(s, a), Ai.fromBufferAttribute(s, n), Ti.fromBufferAttribute(s, c), r.uv1 = Xt.getInterpolation(Si, vt, _t, yt, bi, Ai, Ti, new z())), t && ($r.fromBufferAttribute(t, a), en.fromBufferAttribute(t, n), tn.fromBufferAttribute(t, c), r.normal = Xt.getInterpolation(Si, vt, _t, yt, $r, en, tn, new b()), r.normal.dot(o.direction) > 0 && r.normal.multiplyScalar(-1));
|
|
11455
11469
|
const l = {
|
|
11456
11470
|
a,
|
|
11457
11471
|
b: n,
|
|
@@ -11468,20 +11482,20 @@ function Xi(o, e, t, i, s, a, n) {
|
|
|
11468
11482
|
let h = c + 0, f = c + 1, d = c + 2;
|
|
11469
11483
|
const r = o.index;
|
|
11470
11484
|
o.index && (h = r.getX(h), f = r.getX(f), d = r.getX(d));
|
|
11471
|
-
const { position: l, normal: u, uv: m, uv1: v } = o.attributes, p =
|
|
11485
|
+
const { position: l, normal: u, uv: m, uv1: v } = o.attributes, p = Xc(t, l, u, m, v, h, f, d, e, a, n);
|
|
11472
11486
|
return p ? (p.faceIndex = i, s && s.push(p), p) : null;
|
|
11473
11487
|
}
|
|
11474
|
-
function
|
|
11488
|
+
function K(o, e, t, i) {
|
|
11475
11489
|
const s = o.a, a = o.b, n = o.c;
|
|
11476
11490
|
let c = e, h = e + 1, f = e + 2;
|
|
11477
11491
|
t && (c = t.getX(c), h = t.getX(h), f = t.getX(f)), s.x = i.getX(c), s.y = i.getY(c), s.z = i.getZ(c), a.x = i.getX(h), a.y = i.getY(h), a.z = i.getZ(h), n.x = i.getX(f), n.y = i.getY(f), n.z = i.getZ(f);
|
|
11478
11492
|
}
|
|
11479
|
-
function
|
|
11493
|
+
function Jc(o, e, t, i, s, a, n, c) {
|
|
11480
11494
|
const { geometry: h, _indirectBuffer: f } = o;
|
|
11481
11495
|
for (let d = i, r = i + s; d < r; d++)
|
|
11482
11496
|
Xi(h, e, t, d, a, n, c);
|
|
11483
11497
|
}
|
|
11484
|
-
function
|
|
11498
|
+
function $c(o, e, t, i, s, a, n) {
|
|
11485
11499
|
const { geometry: c, _indirectBuffer: h } = o;
|
|
11486
11500
|
let f = 1 / 0, d = null;
|
|
11487
11501
|
for (let r = i, l = i + s; r < l; r++) {
|
|
@@ -11490,16 +11504,16 @@ function Jc(o, e, t, i, s, a, n) {
|
|
|
11490
11504
|
}
|
|
11491
11505
|
return d;
|
|
11492
11506
|
}
|
|
11493
|
-
function
|
|
11507
|
+
function eh(o, e, t, i, s, a, n) {
|
|
11494
11508
|
const { geometry: c } = t, { index: h } = c, f = c.attributes.position;
|
|
11495
11509
|
for (let d = o, r = e + o; d < r; d++) {
|
|
11496
11510
|
let l;
|
|
11497
|
-
if (l = d,
|
|
11511
|
+
if (l = d, K(n, l * 3, h, f), n.needsUpdate = !0, i(n, l, s, a))
|
|
11498
11512
|
return !0;
|
|
11499
11513
|
}
|
|
11500
11514
|
return !1;
|
|
11501
11515
|
}
|
|
11502
|
-
function
|
|
11516
|
+
function th(o, e = null) {
|
|
11503
11517
|
e && Array.isArray(e) && (e = new Set(e));
|
|
11504
11518
|
const t = o.geometry, i = t.index ? t.index.array : null, s = t.attributes.position;
|
|
11505
11519
|
let a, n, c, h, f = 0;
|
|
@@ -11542,14 +11556,14 @@ function st(o, e, t, i, s) {
|
|
|
11542
11556
|
let g = e[o], _ = e[o + 3], y = e[o + 1], x = e[o + 3 + 1], w = e[o + 2], A = e[o + 3 + 2];
|
|
11543
11557
|
return r >= 0 ? (a = (g - m) * r, n = (_ - m) * r) : (a = (_ - m) * r, n = (g - m) * r), l >= 0 ? (c = (y - v) * l, h = (x - v) * l) : (c = (x - v) * l, h = (y - v) * l), a > h || c > n || ((c > a || isNaN(a)) && (a = c), (h < n || isNaN(n)) && (n = h), u >= 0 ? (f = (w - p) * u, d = (A - p) * u) : (f = (A - p) * u, d = (w - p) * u), a > d || f > n) ? !1 : ((f > a || a !== a) && (a = f), (d < n || n !== n) && (n = d), a <= s && n >= i);
|
|
11544
11558
|
}
|
|
11545
|
-
function
|
|
11559
|
+
function ih(o, e, t, i, s, a, n, c) {
|
|
11546
11560
|
const { geometry: h, _indirectBuffer: f } = o;
|
|
11547
11561
|
for (let d = i, r = i + s; d < r; d++) {
|
|
11548
11562
|
let l = f ? f[d] : d;
|
|
11549
11563
|
Xi(h, e, t, l, a, n, c);
|
|
11550
11564
|
}
|
|
11551
11565
|
}
|
|
11552
|
-
function
|
|
11566
|
+
function sh(o, e, t, i, s, a, n) {
|
|
11553
11567
|
const { geometry: c, _indirectBuffer: h } = o;
|
|
11554
11568
|
let f = 1 / 0, d = null;
|
|
11555
11569
|
for (let r = i, l = i + s; r < l; r++) {
|
|
@@ -11558,23 +11572,23 @@ function ih(o, e, t, i, s, a, n) {
|
|
|
11558
11572
|
}
|
|
11559
11573
|
return d;
|
|
11560
11574
|
}
|
|
11561
|
-
function
|
|
11575
|
+
function rh(o, e, t, i, s, a, n) {
|
|
11562
11576
|
const { geometry: c } = t, { index: h } = c, f = c.attributes.position;
|
|
11563
11577
|
for (let d = o, r = e + o; d < r; d++) {
|
|
11564
11578
|
let l;
|
|
11565
|
-
if (l = t.resolveTriangleIndex(d),
|
|
11579
|
+
if (l = t.resolveTriangleIndex(d), K(n, l * 3, h, f), n.needsUpdate = !0, i(n, l, s, a))
|
|
11566
11580
|
return !0;
|
|
11567
11581
|
}
|
|
11568
11582
|
return !1;
|
|
11569
11583
|
}
|
|
11570
|
-
function
|
|
11584
|
+
function nh(o, e, t, i, s, a, n) {
|
|
11571
11585
|
V.setBuffer(o._roots[e]), Bs(0, o, t, i, s, a, n), V.clearBuffer();
|
|
11572
11586
|
}
|
|
11573
11587
|
function Bs(o, e, t, i, s, a, n) {
|
|
11574
11588
|
const { float32Array: c, uint16Array: h, uint32Array: f } = V, d = o * 2;
|
|
11575
11589
|
if (ae(d, h)) {
|
|
11576
11590
|
const l = de(o, f), u = ve(d, h);
|
|
11577
|
-
|
|
11591
|
+
Jc(e, t, i, l, u, s, a, n);
|
|
11578
11592
|
} else {
|
|
11579
11593
|
const l = _e(o);
|
|
11580
11594
|
st(l, c, i, a, n) && Bs(l, e, t, i, s, a, n);
|
|
@@ -11582,8 +11596,8 @@ function Bs(o, e, t, i, s, a, n) {
|
|
|
11582
11596
|
st(u, c, i, a, n) && Bs(u, e, t, i, s, a, n);
|
|
11583
11597
|
}
|
|
11584
11598
|
}
|
|
11585
|
-
const
|
|
11586
|
-
function
|
|
11599
|
+
const oh = ["x", "y", "z"];
|
|
11600
|
+
function ah(o, e, t, i, s, a) {
|
|
11587
11601
|
V.setBuffer(o._roots[e]);
|
|
11588
11602
|
const n = Os(0, o, t, i, s, a);
|
|
11589
11603
|
return V.clearBuffer(), n;
|
|
@@ -11593,9 +11607,9 @@ function Os(o, e, t, i, s, a) {
|
|
|
11593
11607
|
let f = o * 2;
|
|
11594
11608
|
if (ae(f, c)) {
|
|
11595
11609
|
const r = de(o, h), l = ve(f, c);
|
|
11596
|
-
return
|
|
11610
|
+
return $c(e, t, i, r, l, s, a);
|
|
11597
11611
|
} else {
|
|
11598
|
-
const r = Hn(o, h), l =
|
|
11612
|
+
const r = Hn(o, h), l = oh[r], m = i.direction[l] >= 0;
|
|
11599
11613
|
let v, p;
|
|
11600
11614
|
m ? (v = _e(o), p = ye(o, h)) : (v = ye(o, h), p = _e(o));
|
|
11601
11615
|
const _ = st(v, n, i, s, a) ? Os(v, e, t, i, s, a) : null;
|
|
@@ -11611,8 +11625,8 @@ function Os(o, e, t, i, s, a) {
|
|
|
11611
11625
|
return _ && x ? _.distance <= x.distance ? _ : x : _ || x || null;
|
|
11612
11626
|
}
|
|
11613
11627
|
}
|
|
11614
|
-
const
|
|
11615
|
-
function
|
|
11628
|
+
const Mi = /* @__PURE__ */ new Q(), xt = /* @__PURE__ */ new Ce(), wt = /* @__PURE__ */ new Ce(), Qt = /* @__PURE__ */ new J(), sn = /* @__PURE__ */ new re(), Ci = /* @__PURE__ */ new re();
|
|
11629
|
+
function lh(o, e, t, i) {
|
|
11616
11630
|
V.setBuffer(o._roots[e]);
|
|
11617
11631
|
const s = zs(0, o, t, i);
|
|
11618
11632
|
return V.clearBuffer(), s;
|
|
@@ -11623,35 +11637,35 @@ function zs(o, e, t, i, s = null) {
|
|
|
11623
11637
|
if (s === null && (t.boundingBox || t.computeBoundingBox(), sn.set(t.boundingBox.min, t.boundingBox.max, i), s = sn), ae(h, n)) {
|
|
11624
11638
|
const d = e.geometry, r = d.index, l = d.attributes.position, u = t.index, m = t.attributes.position, v = de(o, c), p = ve(h, n);
|
|
11625
11639
|
if (Qt.copy(i).invert(), t.boundsTree)
|
|
11626
|
-
return j(o, a,
|
|
11627
|
-
intersectsBounds: (_) =>
|
|
11640
|
+
return j(o, a, Ci), Ci.matrix.copy(Qt), Ci.needsUpdate = !0, t.boundsTree.shapecast({
|
|
11641
|
+
intersectsBounds: (_) => Ci.intersectsBox(_),
|
|
11628
11642
|
intersectsTriangle: (_) => {
|
|
11629
11643
|
_.a.applyMatrix4(i), _.b.applyMatrix4(i), _.c.applyMatrix4(i), _.needsUpdate = !0;
|
|
11630
11644
|
for (let y = v * 3, x = (p + v) * 3; y < x; y += 3)
|
|
11631
|
-
if (
|
|
11645
|
+
if (K(wt, y, r, l), wt.needsUpdate = !0, _.intersectsTriangle(wt))
|
|
11632
11646
|
return !0;
|
|
11633
11647
|
return !1;
|
|
11634
11648
|
}
|
|
11635
11649
|
});
|
|
11636
11650
|
for (let g = v * 3, _ = (p + v) * 3; g < _; g += 3) {
|
|
11637
|
-
|
|
11651
|
+
K(xt, g, r, l), xt.a.applyMatrix4(Qt), xt.b.applyMatrix4(Qt), xt.c.applyMatrix4(Qt), xt.needsUpdate = !0;
|
|
11638
11652
|
for (let y = 0, x = u.count; y < x; y += 3)
|
|
11639
|
-
if (
|
|
11653
|
+
if (K(wt, y, u, m), wt.needsUpdate = !0, xt.intersectsTriangle(wt))
|
|
11640
11654
|
return !0;
|
|
11641
11655
|
}
|
|
11642
11656
|
} else {
|
|
11643
11657
|
const d = o + 8, r = c[o + 6];
|
|
11644
|
-
return j(d, a,
|
|
11658
|
+
return j(d, a, Mi), !!(s.intersectsBox(Mi) && zs(d, e, t, i, s) || (j(r, a, Mi), s.intersectsBox(Mi) && zs(r, e, t, i, s)));
|
|
11645
11659
|
}
|
|
11646
11660
|
}
|
|
11647
|
-
const
|
|
11648
|
-
function
|
|
11661
|
+
const Ii = /* @__PURE__ */ new J(), gs = /* @__PURE__ */ new re(), Yt = /* @__PURE__ */ new re(), ch = /* @__PURE__ */ new b(), hh = /* @__PURE__ */ new b(), uh = /* @__PURE__ */ new b(), fh = /* @__PURE__ */ new b();
|
|
11662
|
+
function dh(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
11649
11663
|
e.boundingBox || e.computeBoundingBox(), gs.set(e.boundingBox.min, e.boundingBox.max, t), gs.needsUpdate = !0;
|
|
11650
11664
|
const c = o.geometry, h = c.attributes.position, f = c.index, d = e.attributes.position, r = e.index, l = xe.getPrimitive(), u = xe.getPrimitive();
|
|
11651
|
-
let m =
|
|
11652
|
-
s && (p =
|
|
11665
|
+
let m = ch, v = hh, p = null, g = null;
|
|
11666
|
+
s && (p = uh, g = fh);
|
|
11653
11667
|
let _ = 1 / 0, y = null, x = null;
|
|
11654
|
-
return
|
|
11668
|
+
return Ii.copy(t).invert(), Yt.matrix.copy(Ii), o.shapecast(
|
|
11655
11669
|
{
|
|
11656
11670
|
boundsTraverseOrder: (w) => gs.distanceToBox(w),
|
|
11657
11671
|
intersectsBounds: (w, A, S) => S < _ && S < n ? (A && (Yt.min.copy(w.min), Yt.max.copy(w.max), Yt.needsUpdate = !0), !0) : !1,
|
|
@@ -11662,9 +11676,9 @@ function fh(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11662
11676
|
intersectsBounds: (C, M, R) => R < _ && R < n,
|
|
11663
11677
|
intersectsRange: (C, M) => {
|
|
11664
11678
|
for (let R = C, D = C + M; R < D; R++) {
|
|
11665
|
-
|
|
11679
|
+
K(u, 3 * R, r, d), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
11666
11680
|
for (let T = w, I = w + A; T < I; T++) {
|
|
11667
|
-
|
|
11681
|
+
K(l, 3 * T, f, h), l.needsUpdate = !0;
|
|
11668
11682
|
const P = l.distanceToTriangle(u, m, p);
|
|
11669
11683
|
if (P < _ && (v.copy(m), g && g.copy(p), _ = P, y = T, x = R), P < a)
|
|
11670
11684
|
return !0;
|
|
@@ -11675,9 +11689,9 @@ function fh(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11675
11689
|
{
|
|
11676
11690
|
const S = zt(e);
|
|
11677
11691
|
for (let C = 0, M = S; C < M; C++) {
|
|
11678
|
-
|
|
11692
|
+
K(u, 3 * C, r, d), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
11679
11693
|
for (let R = w, D = w + A; R < D; R++) {
|
|
11680
|
-
|
|
11694
|
+
K(l, 3 * R, f, h), l.needsUpdate = !0;
|
|
11681
11695
|
const T = l.distanceToTriangle(u, m, p);
|
|
11682
11696
|
if (T < _ && (v.copy(m), g && g.copy(p), _ = T, y = R, x = C), T < a)
|
|
11683
11697
|
return !0;
|
|
@@ -11686,9 +11700,9 @@ function fh(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11686
11700
|
}
|
|
11687
11701
|
}
|
|
11688
11702
|
}
|
|
11689
|
-
), xe.releasePrimitive(l), xe.releasePrimitive(u), _ === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = _, i.faceIndex = y, s && (s.point ? s.point.copy(g) : s.point = g.clone(), s.point.applyMatrix4(
|
|
11703
|
+
), xe.releasePrimitive(l), xe.releasePrimitive(u), _ === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = _, i.faceIndex = y, s && (s.point ? s.point.copy(g) : s.point = g.clone(), s.point.applyMatrix4(Ii), v.applyMatrix4(Ii), s.distance = v.sub(s.point).length(), s.faceIndex = x), i);
|
|
11690
11704
|
}
|
|
11691
|
-
function
|
|
11705
|
+
function ph(o, e = null) {
|
|
11692
11706
|
e && Array.isArray(e) && (e = new Set(e));
|
|
11693
11707
|
const t = o.geometry, i = t.index ? t.index.array : null, s = t.attributes.position;
|
|
11694
11708
|
let a, n, c, h, f = 0;
|
|
@@ -11729,14 +11743,14 @@ function dh(o, e = null) {
|
|
|
11729
11743
|
}
|
|
11730
11744
|
}
|
|
11731
11745
|
}
|
|
11732
|
-
function
|
|
11746
|
+
function mh(o, e, t, i, s, a, n) {
|
|
11733
11747
|
V.setBuffer(o._roots[e]), Us(0, o, t, i, s, a, n), V.clearBuffer();
|
|
11734
11748
|
}
|
|
11735
11749
|
function Us(o, e, t, i, s, a, n) {
|
|
11736
11750
|
const { float32Array: c, uint16Array: h, uint32Array: f } = V, d = o * 2;
|
|
11737
11751
|
if (ae(d, h)) {
|
|
11738
11752
|
const l = de(o, f), u = ve(d, h);
|
|
11739
|
-
|
|
11753
|
+
ih(e, t, i, l, u, s, a, n);
|
|
11740
11754
|
} else {
|
|
11741
11755
|
const l = _e(o);
|
|
11742
11756
|
st(l, c, i, a, n) && Us(l, e, t, i, s, a, n);
|
|
@@ -11744,8 +11758,8 @@ function Us(o, e, t, i, s, a, n) {
|
|
|
11744
11758
|
st(u, c, i, a, n) && Us(u, e, t, i, s, a, n);
|
|
11745
11759
|
}
|
|
11746
11760
|
}
|
|
11747
|
-
const
|
|
11748
|
-
function
|
|
11761
|
+
const gh = ["x", "y", "z"];
|
|
11762
|
+
function vh(o, e, t, i, s, a) {
|
|
11749
11763
|
V.setBuffer(o._roots[e]);
|
|
11750
11764
|
const n = Hs(0, o, t, i, s, a);
|
|
11751
11765
|
return V.clearBuffer(), n;
|
|
@@ -11755,9 +11769,9 @@ function Hs(o, e, t, i, s, a) {
|
|
|
11755
11769
|
let f = o * 2;
|
|
11756
11770
|
if (ae(f, c)) {
|
|
11757
11771
|
const r = de(o, h), l = ve(f, c);
|
|
11758
|
-
return
|
|
11772
|
+
return sh(e, t, i, r, l, s, a);
|
|
11759
11773
|
} else {
|
|
11760
|
-
const r = Hn(o, h), l =
|
|
11774
|
+
const r = Hn(o, h), l = gh[r], m = i.direction[l] >= 0;
|
|
11761
11775
|
let v, p;
|
|
11762
11776
|
m ? (v = _e(o), p = ye(o, h)) : (v = ye(o, h), p = _e(o));
|
|
11763
11777
|
const _ = st(v, n, i, s, a) ? Hs(v, e, t, i, s, a) : null;
|
|
@@ -11773,8 +11787,8 @@ function Hs(o, e, t, i, s, a) {
|
|
|
11773
11787
|
return _ && x ? _.distance <= x.distance ? _ : x : _ || x || null;
|
|
11774
11788
|
}
|
|
11775
11789
|
}
|
|
11776
|
-
const
|
|
11777
|
-
function
|
|
11790
|
+
const Ri = /* @__PURE__ */ new Q(), bt = /* @__PURE__ */ new Ce(), At = /* @__PURE__ */ new Ce(), Zt = /* @__PURE__ */ new J(), rn = /* @__PURE__ */ new re(), Di = /* @__PURE__ */ new re();
|
|
11791
|
+
function _h(o, e, t, i) {
|
|
11778
11792
|
V.setBuffer(o._roots[e]);
|
|
11779
11793
|
const s = Ws(0, o, t, i);
|
|
11780
11794
|
return V.clearBuffer(), s;
|
|
@@ -11785,36 +11799,36 @@ function Ws(o, e, t, i, s = null) {
|
|
|
11785
11799
|
if (s === null && (t.boundingBox || t.computeBoundingBox(), rn.set(t.boundingBox.min, t.boundingBox.max, i), s = rn), ae(h, n)) {
|
|
11786
11800
|
const d = e.geometry, r = d.index, l = d.attributes.position, u = t.index, m = t.attributes.position, v = de(o, c), p = ve(h, n);
|
|
11787
11801
|
if (Zt.copy(i).invert(), t.boundsTree)
|
|
11788
|
-
return j(o, a,
|
|
11789
|
-
intersectsBounds: (_) =>
|
|
11802
|
+
return j(o, a, Di), Di.matrix.copy(Zt), Di.needsUpdate = !0, t.boundsTree.shapecast({
|
|
11803
|
+
intersectsBounds: (_) => Di.intersectsBox(_),
|
|
11790
11804
|
intersectsTriangle: (_) => {
|
|
11791
11805
|
_.a.applyMatrix4(i), _.b.applyMatrix4(i), _.c.applyMatrix4(i), _.needsUpdate = !0;
|
|
11792
11806
|
for (let y = v, x = p + v; y < x; y++)
|
|
11793
|
-
if (
|
|
11807
|
+
if (K(At, 3 * e.resolveTriangleIndex(y), r, l), At.needsUpdate = !0, _.intersectsTriangle(At))
|
|
11794
11808
|
return !0;
|
|
11795
11809
|
return !1;
|
|
11796
11810
|
}
|
|
11797
11811
|
});
|
|
11798
11812
|
for (let g = v, _ = p + v; g < _; g++) {
|
|
11799
11813
|
const y = e.resolveTriangleIndex(g);
|
|
11800
|
-
|
|
11814
|
+
K(bt, 3 * y, r, l), bt.a.applyMatrix4(Zt), bt.b.applyMatrix4(Zt), bt.c.applyMatrix4(Zt), bt.needsUpdate = !0;
|
|
11801
11815
|
for (let x = 0, w = u.count; x < w; x += 3)
|
|
11802
|
-
if (
|
|
11816
|
+
if (K(At, x, u, m), At.needsUpdate = !0, bt.intersectsTriangle(At))
|
|
11803
11817
|
return !0;
|
|
11804
11818
|
}
|
|
11805
11819
|
} else {
|
|
11806
11820
|
const d = o + 8, r = c[o + 6];
|
|
11807
|
-
return j(d, a,
|
|
11821
|
+
return j(d, a, Ri), !!(s.intersectsBox(Ri) && Ws(d, e, t, i, s) || (j(r, a, Ri), s.intersectsBox(Ri) && Ws(r, e, t, i, s)));
|
|
11808
11822
|
}
|
|
11809
11823
|
}
|
|
11810
|
-
const
|
|
11811
|
-
function
|
|
11824
|
+
const Pi = /* @__PURE__ */ new J(), vs = /* @__PURE__ */ new re(), Kt = /* @__PURE__ */ new re(), yh = /* @__PURE__ */ new b(), xh = /* @__PURE__ */ new b(), wh = /* @__PURE__ */ new b(), bh = /* @__PURE__ */ new b();
|
|
11825
|
+
function Ah(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
11812
11826
|
e.boundingBox || e.computeBoundingBox(), vs.set(e.boundingBox.min, e.boundingBox.max, t), vs.needsUpdate = !0;
|
|
11813
11827
|
const c = o.geometry, h = c.attributes.position, f = c.index, d = e.attributes.position, r = e.index, l = xe.getPrimitive(), u = xe.getPrimitive();
|
|
11814
|
-
let m =
|
|
11815
|
-
s && (p =
|
|
11828
|
+
let m = yh, v = xh, p = null, g = null;
|
|
11829
|
+
s && (p = wh, g = bh);
|
|
11816
11830
|
let _ = 1 / 0, y = null, x = null;
|
|
11817
|
-
return
|
|
11831
|
+
return Pi.copy(t).invert(), Kt.matrix.copy(Pi), o.shapecast(
|
|
11818
11832
|
{
|
|
11819
11833
|
boundsTraverseOrder: (w) => vs.distanceToBox(w),
|
|
11820
11834
|
intersectsBounds: (w, A, S) => S < _ && S < n ? (A && (Kt.min.copy(w.min), Kt.max.copy(w.max), Kt.needsUpdate = !0), !0) : !1,
|
|
@@ -11827,10 +11841,10 @@ function bh(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11827
11841
|
intersectsRange: (C, M) => {
|
|
11828
11842
|
for (let R = C, D = C + M; R < D; R++) {
|
|
11829
11843
|
const T = S.resolveTriangleIndex(R);
|
|
11830
|
-
|
|
11844
|
+
K(u, 3 * T, r, d), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
11831
11845
|
for (let I = w, P = w + A; I < P; I++) {
|
|
11832
11846
|
const E = o.resolveTriangleIndex(I);
|
|
11833
|
-
|
|
11847
|
+
K(l, 3 * E, f, h), l.needsUpdate = !0;
|
|
11834
11848
|
const F = l.distanceToTriangle(u, m, p);
|
|
11835
11849
|
if (F < _ && (v.copy(m), g && g.copy(p), _ = F, y = I, x = R), F < a)
|
|
11836
11850
|
return !0;
|
|
@@ -11841,10 +11855,10 @@ function bh(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11841
11855
|
} else {
|
|
11842
11856
|
const S = zt(e);
|
|
11843
11857
|
for (let C = 0, M = S; C < M; C++) {
|
|
11844
|
-
|
|
11858
|
+
K(u, 3 * C, r, d), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
11845
11859
|
for (let R = w, D = w + A; R < D; R++) {
|
|
11846
11860
|
const T = o.resolveTriangleIndex(R);
|
|
11847
|
-
|
|
11861
|
+
K(l, 3 * T, f, h), l.needsUpdate = !0;
|
|
11848
11862
|
const I = l.distanceToTriangle(u, m, p);
|
|
11849
11863
|
if (I < _ && (v.copy(m), g && g.copy(p), _ = I, y = R, x = C), I < a)
|
|
11850
11864
|
return !0;
|
|
@@ -11853,14 +11867,14 @@ function bh(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11853
11867
|
}
|
|
11854
11868
|
}
|
|
11855
11869
|
}
|
|
11856
|
-
), xe.releasePrimitive(l), xe.releasePrimitive(u), _ === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = _, i.faceIndex = y, s && (s.point ? s.point.copy(g) : s.point = g.clone(), s.point.applyMatrix4(
|
|
11870
|
+
), xe.releasePrimitive(l), xe.releasePrimitive(u), _ === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = _, i.faceIndex = y, s && (s.point ? s.point.copy(g) : s.point = g.clone(), s.point.applyMatrix4(Pi), v.applyMatrix4(Pi), s.distance = v.sub(s.point).length(), s.faceIndex = x), i);
|
|
11857
11871
|
}
|
|
11858
|
-
function
|
|
11872
|
+
function Th() {
|
|
11859
11873
|
return typeof SharedArrayBuffer < "u";
|
|
11860
11874
|
}
|
|
11861
11875
|
const si = new V.constructor(), Ni = new V.constructor(), Ke = new er(() => new Q()), Tt = new Q(), St = new Q(), _s = new Q(), ys = new Q();
|
|
11862
11876
|
let xs = !1;
|
|
11863
|
-
function
|
|
11877
|
+
function Sh(o, e, t, i) {
|
|
11864
11878
|
if (xs)
|
|
11865
11879
|
throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
|
|
11866
11880
|
xs = !0;
|
|
@@ -12072,7 +12086,7 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, h = 0, f = null, d = !1) {
|
|
|
12072
12086
|
}
|
|
12073
12087
|
return S;
|
|
12074
12088
|
}
|
|
12075
|
-
const
|
|
12089
|
+
const Li = /* @__PURE__ */ new re(), nn = /* @__PURE__ */ new Q(), Mh = {
|
|
12076
12090
|
strategy: On,
|
|
12077
12091
|
maxDepth: 40,
|
|
12078
12092
|
maxLeafTris: 10,
|
|
@@ -12127,16 +12141,16 @@ class tr {
|
|
|
12127
12141
|
} else
|
|
12128
12142
|
throw new Error("MeshBVH: Only BufferGeometries are supported.");
|
|
12129
12143
|
if (t = Object.assign({
|
|
12130
|
-
...
|
|
12144
|
+
...Mh,
|
|
12131
12145
|
// undocumented options
|
|
12132
12146
|
// Whether to skip generating the tree. Used for deserialization.
|
|
12133
12147
|
[us]: !1
|
|
12134
|
-
}, t), t.useSharedArrayBuffer && !
|
|
12148
|
+
}, t), t.useSharedArrayBuffer && !Th())
|
|
12135
12149
|
throw new Error("MeshBVH: SharedArrayBuffer is not available.");
|
|
12136
|
-
this.geometry = e, this._roots = null, this._indirectBuffer = null, t[us] || (
|
|
12150
|
+
this.geometry = e, this._roots = null, this._indirectBuffer = null, t[us] || (Nc(this, t), !e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new Q()))), this.resolveTriangleIndex = t.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
|
|
12137
12151
|
}
|
|
12138
12152
|
refit(e = null) {
|
|
12139
|
-
return (this.indirect ?
|
|
12153
|
+
return (this.indirect ? ph : th)(this, e);
|
|
12140
12154
|
}
|
|
12141
12155
|
traverse(e, t = 0) {
|
|
12142
12156
|
const i = this._roots[t], s = new Uint32Array(i), a = new Uint16Array(i);
|
|
@@ -12154,7 +12168,7 @@ class tr {
|
|
|
12154
12168
|
}
|
|
12155
12169
|
/* Core Cast Functions */
|
|
12156
12170
|
raycast(e, t = bs, i = 0, s = 1 / 0) {
|
|
12157
|
-
const a = this._roots, n = this.geometry, c = [], h = t.isMaterial, f = Array.isArray(t), d = n.groups, r = h ? t.side : t, l = this.indirect ?
|
|
12171
|
+
const a = this._roots, n = this.geometry, c = [], h = t.isMaterial, f = Array.isArray(t), d = n.groups, r = h ? t.side : t, l = this.indirect ? mh : nh;
|
|
12158
12172
|
for (let u = 0, m = a.length; u < m; u++) {
|
|
12159
12173
|
const v = f ? t[d[u].materialIndex].side : r, p = c.length;
|
|
12160
12174
|
if (l(this, u, v, e, c, i, s), f) {
|
|
@@ -12168,7 +12182,7 @@ class tr {
|
|
|
12168
12182
|
raycastFirst(e, t = bs, i = 0, s = 1 / 0) {
|
|
12169
12183
|
const a = this._roots, n = this.geometry, c = t.isMaterial, h = Array.isArray(t);
|
|
12170
12184
|
let f = null;
|
|
12171
|
-
const d = n.groups, r = c ? t.side : t, l = this.indirect ?
|
|
12185
|
+
const d = n.groups, r = c ? t.side : t, l = this.indirect ? vh : ah;
|
|
12172
12186
|
for (let u = 0, m = a.length; u < m; u++) {
|
|
12173
12187
|
const v = h ? t[d[u].materialIndex].side : r, p = l(this, u, v, e, i, s);
|
|
12174
12188
|
p != null && (f == null || p.distance < f.distance) && (f = p, h && (p.face.materialIndex = d[u].materialIndex));
|
|
@@ -12177,13 +12191,13 @@ class tr {
|
|
|
12177
12191
|
}
|
|
12178
12192
|
intersectsGeometry(e, t) {
|
|
12179
12193
|
let i = !1;
|
|
12180
|
-
const s = this._roots, a = this.indirect ?
|
|
12194
|
+
const s = this._roots, a = this.indirect ? _h : lh;
|
|
12181
12195
|
for (let n = 0, c = s.length; n < c && (i = a(this, n, e, t), !i); n++)
|
|
12182
12196
|
;
|
|
12183
12197
|
return i;
|
|
12184
12198
|
}
|
|
12185
12199
|
shapecast(e) {
|
|
12186
|
-
const t = xe.getPrimitive(), i = this.indirect ?
|
|
12200
|
+
const t = xe.getPrimitive(), i = this.indirect ? rh : eh;
|
|
12187
12201
|
let {
|
|
12188
12202
|
boundsTraverseOrder: s,
|
|
12189
12203
|
intersectsBounds: a,
|
|
@@ -12199,7 +12213,7 @@ class tr {
|
|
|
12199
12213
|
const d = this._roots;
|
|
12200
12214
|
for (let r = 0, l = d.length; r < l; r++) {
|
|
12201
12215
|
const u = d[r];
|
|
12202
|
-
if (h =
|
|
12216
|
+
if (h = Yc(this, r, a, n, s, f), h)
|
|
12203
12217
|
break;
|
|
12204
12218
|
f += u.byteLength;
|
|
12205
12219
|
}
|
|
@@ -12212,14 +12226,14 @@ class tr {
|
|
|
12212
12226
|
} = i;
|
|
12213
12227
|
const n = xe.getPrimitive(), c = this.geometry.index, h = this.geometry.attributes.position, f = this.indirect ? (m) => {
|
|
12214
12228
|
const v = this.resolveTriangleIndex(m);
|
|
12215
|
-
|
|
12229
|
+
K(n, v * 3, c, h);
|
|
12216
12230
|
} : (m) => {
|
|
12217
|
-
|
|
12231
|
+
K(n, m * 3, c, h);
|
|
12218
12232
|
}, d = xe.getPrimitive(), r = e.geometry.index, l = e.geometry.attributes.position, u = e.indirect ? (m) => {
|
|
12219
12233
|
const v = e.resolveTriangleIndex(m);
|
|
12220
|
-
|
|
12234
|
+
K(d, v * 3, r, l);
|
|
12221
12235
|
} : (m) => {
|
|
12222
|
-
|
|
12236
|
+
K(d, m * 3, r, l);
|
|
12223
12237
|
};
|
|
12224
12238
|
if (a) {
|
|
12225
12239
|
const m = (v, p, g, _, y, x, w, A) => {
|
|
@@ -12239,14 +12253,14 @@ class tr {
|
|
|
12239
12253
|
} else
|
|
12240
12254
|
s = m;
|
|
12241
12255
|
}
|
|
12242
|
-
return
|
|
12256
|
+
return Sh(this, e, t, s);
|
|
12243
12257
|
}
|
|
12244
12258
|
/* Derived Cast Functions */
|
|
12245
12259
|
intersectsBox(e, t) {
|
|
12246
|
-
return
|
|
12260
|
+
return Li.set(e.min, e.max, t), Li.needsUpdate = !0, this.shapecast(
|
|
12247
12261
|
{
|
|
12248
|
-
intersectsBounds: (i) =>
|
|
12249
|
-
intersectsTriangle: (i) =>
|
|
12262
|
+
intersectsBounds: (i) => Li.intersectsBox(i),
|
|
12263
|
+
intersectsTriangle: (i) => Li.intersectsTriangle(i)
|
|
12250
12264
|
}
|
|
12251
12265
|
);
|
|
12252
12266
|
}
|
|
@@ -12259,7 +12273,7 @@ class tr {
|
|
|
12259
12273
|
);
|
|
12260
12274
|
}
|
|
12261
12275
|
closestPointToGeometry(e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
12262
|
-
return (this.indirect ?
|
|
12276
|
+
return (this.indirect ? Ah : dh)(
|
|
12263
12277
|
this,
|
|
12264
12278
|
e,
|
|
12265
12279
|
t,
|
|
@@ -12270,7 +12284,7 @@ class tr {
|
|
|
12270
12284
|
);
|
|
12271
12285
|
}
|
|
12272
12286
|
closestPointToPoint(e, t = {}, i = 0, s = 1 / 0) {
|
|
12273
|
-
return
|
|
12287
|
+
return Zc(
|
|
12274
12288
|
this,
|
|
12275
12289
|
e,
|
|
12276
12290
|
t,
|
|
@@ -12284,7 +12298,7 @@ class tr {
|
|
|
12284
12298
|
}), e;
|
|
12285
12299
|
}
|
|
12286
12300
|
}
|
|
12287
|
-
class
|
|
12301
|
+
class Ch {
|
|
12288
12302
|
constructor(e) {
|
|
12289
12303
|
this.name = "WorkerBase", this.running = !1, this.worker = e, this.worker.onerror = (t) => {
|
|
12290
12304
|
throw t.message ? new Error(`${this.name}: Could not create Web Worker with error "${t.message}"`) : new Error(`${this.name}: Could not create Web Worker.`);
|
|
@@ -12307,7 +12321,7 @@ class Mh {
|
|
|
12307
12321
|
this.worker.terminate(), this.worker = null;
|
|
12308
12322
|
}
|
|
12309
12323
|
}
|
|
12310
|
-
class
|
|
12324
|
+
class Ih extends Ch {
|
|
12311
12325
|
constructor(e) {
|
|
12312
12326
|
const t = new Worker(e || new URL("data:text/javascript;base64,aW1wb3J0IHsKCUJ1ZmZlckdlb21ldHJ5LAoJQnVmZmVyQXR0cmlidXRlLAp9IGZyb20gJ3RocmVlJzsKaW1wb3J0IHsgTWVzaEJWSCB9IGZyb20gJy4uL2NvcmUvTWVzaEJWSC5qcyc7Cgpvbm1lc3NhZ2UgPSAoIHsgZGF0YSB9ICkgPT4gewoKCWxldCBwcmV2VGltZSA9IHBlcmZvcm1hbmNlLm5vdygpOwoJZnVuY3Rpb24gb25Qcm9ncmVzc0NhbGxiYWNrKCBwcm9ncmVzcyApIHsKCgkJLy8gYWNjb3VudCBmb3IgZXJyb3IKCQlwcm9ncmVzcyA9IE1hdGgubWluKCBwcm9ncmVzcywgMSApOwoKCQljb25zdCBjdXJyVGltZSA9IHBlcmZvcm1hbmNlLm5vdygpOwoJCWlmICggY3VyclRpbWUgLSBwcmV2VGltZSA+PSAxMCAmJiBwcm9ncmVzcyAhPT0gMS4wICkgewoKCQkJcG9zdE1lc3NhZ2UoIHsKCgkJCQllcnJvcjogbnVsbCwKCQkJCXNlcmlhbGl6ZWQ6IG51bGwsCgkJCQlwb3NpdGlvbjogbnVsbCwKCQkJCXByb2dyZXNzLAoKCQkJfSApOwoJCQlwcmV2VGltZSA9IGN1cnJUaW1lOwoKCQl9CgoJfQoKCWNvbnN0IHsgaW5kZXgsIHBvc2l0aW9uLCBvcHRpb25zIH0gPSBkYXRhOwoJdHJ5IHsKCgkJY29uc3QgZ2VvbWV0cnkgPSBuZXcgQnVmZmVyR2VvbWV0cnkoKTsKCQlnZW9tZXRyeS5zZXRBdHRyaWJ1dGUoICdwb3NpdGlvbicsIG5ldyBCdWZmZXJBdHRyaWJ1dGUoIHBvc2l0aW9uLCAzLCBmYWxzZSApICk7CgkJaWYgKCBpbmRleCApIHsKCgkJCWdlb21ldHJ5LnNldEluZGV4KCBuZXcgQnVmZmVyQXR0cmlidXRlKCBpbmRleCwgMSwgZmFsc2UgKSApOwoKCQl9CgoJCWlmICggb3B0aW9ucy5pbmNsdWRlZFByb2dyZXNzQ2FsbGJhY2sgKSB7CgoJCQlvcHRpb25zLm9uUHJvZ3Jlc3MgPSBvblByb2dyZXNzQ2FsbGJhY2s7CgoJCX0KCgkJaWYgKCBvcHRpb25zLmdyb3VwcyApIHsKCgkJCWNvbnN0IGdyb3VwcyA9IG9wdGlvbnMuZ3JvdXBzOwoJCQlmb3IgKCBjb25zdCBpIGluIGdyb3VwcyApIHsKCgkJCQljb25zdCBncm91cCA9IGdyb3Vwc1sgaSBdOwoJCQkJZ2VvbWV0cnkuYWRkR3JvdXAoIGdyb3VwLnN0YXJ0LCBncm91cC5jb3VudCwgZ3JvdXAubWF0ZXJpYWxJbmRleCApOwoKCQkJfQoKCQl9CgoJCWNvbnN0IGJ2aCA9IG5ldyBNZXNoQlZIKCBnZW9tZXRyeSwgb3B0aW9ucyApOwoJCWNvbnN0IHNlcmlhbGl6ZWQgPSBNZXNoQlZILnNlcmlhbGl6ZSggYnZoLCB7IGNvcHlJbmRleEJ1ZmZlcjogZmFsc2UgfSApOwoJCWxldCB0b1RyYW5zZmVyID0gWyBwb3NpdGlvbi5idWZmZXIsIC4uLnNlcmlhbGl6ZWQucm9vdHMgXTsKCQlpZiAoIHNlcmlhbGl6ZWQuaW5kZXggKSB7CgoJCQl0b1RyYW5zZmVyLnB1c2goIHNlcmlhbGl6ZWQuaW5kZXguYnVmZmVyICk7CgoJCX0KCgkJdG9UcmFuc2ZlciA9IHRvVHJhbnNmZXIuZmlsdGVyKCB2ID0+ICggdHlwZW9mIFNoYXJlZEFycmF5QnVmZmVyID09PSAndW5kZWZpbmVkJyApIHx8ICEgKCB2IGluc3RhbmNlb2YgU2hhcmVkQXJyYXlCdWZmZXIgKSApOwoKCQlpZiAoIGJ2aC5faW5kaXJlY3RCdWZmZXIgKSB7CgoJCQl0b1RyYW5zZmVyLnB1c2goIHNlcmlhbGl6ZWQuaW5kaXJlY3RCdWZmZXIuYnVmZmVyICk7CgoJCX0KCgkJcG9zdE1lc3NhZ2UoIHsKCgkJCWVycm9yOiBudWxsLAoJCQlzZXJpYWxpemVkLAoJCQlwb3NpdGlvbiwKCQkJcHJvZ3Jlc3M6IDEsCgoJCX0sIHRvVHJhbnNmZXIgKTsKCgl9IGNhdGNoICggZXJyb3IgKSB7CgoJCXBvc3RNZXNzYWdlKCB7CgoJCQllcnJvciwKCQkJc2VyaWFsaXplZDogbnVsbCwKCQkJcG9zaXRpb246IG51bGwsCgkJCXByb2dyZXNzOiAxLAoKCQl9ICk7CgoJfQoKfTsK", import.meta.url), { type: "module" });
|
|
12313
12327
|
super(t), this.name = "GenerateMeshBVHWorker";
|
|
@@ -12351,7 +12365,7 @@ class Ch extends Mh {
|
|
|
12351
12365
|
});
|
|
12352
12366
|
}
|
|
12353
12367
|
}
|
|
12354
|
-
class
|
|
12368
|
+
class Rh {
|
|
12355
12369
|
constructor(e, t) {
|
|
12356
12370
|
this.lock = !1, this.lockX = !1, this.lockY = !1, this.invRotMat = new J(), this.mouse = new b(), this.rotateStart = new z(), this.rotateEnd = new z(), this.rotateDelta = new z(), this.selectedAxis = null, this.isDragging = !1, this.context = null, this.orbitState = !0, this._animator = 0, this._emitter = new Ot(), this.addListener = this._emitter.addListener.bind(this._emitter), this.removeAllListeners = this._emitter.removeAllListeners.bind(this._emitter), this._text = document.createElement("div"), this._textTimer = 0, this._update = () => {
|
|
12357
12371
|
this.lock || (this._textTimer && (window.clearTimeout(this._textTimer), this._textTimer = 0), this._textTimer = window.setTimeout(() => {
|
|
@@ -12536,7 +12550,7 @@ class Ih {
|
|
|
12536
12550
|
cancelAnimationFrame(this._animator), this.orbit.removeEventListener("change", this._update), this.orbit.enabled = this.orbitState, window.removeEventListener("pointermove", this.onDrag, !1), window.removeEventListener("pointerup", this.onPointerUp, !1), this._emitter.removeAllListeners(), this.domElement.removeEventListener("pointerdown", this.onPointerDown, !1), this.domElement.removeEventListener("pointerenter", this.onPointerEnter, !1), this.domElement.removeEventListener("pointermove", this.onPointerMove, !1), this.domElement.removeEventListener("click", this.onMouseClick, !1), this.domElement.remove(), window.clearTimeout(this._textTimer), this._text.remove();
|
|
12537
12551
|
}
|
|
12538
12552
|
}
|
|
12539
|
-
class
|
|
12553
|
+
class Dh {
|
|
12540
12554
|
// 阴影是否已完成累计渲染
|
|
12541
12555
|
get isFinished() {
|
|
12542
12556
|
return this.params ? this.framesDone >= this.params.frames : !0;
|
|
@@ -12571,20 +12585,20 @@ class Rh {
|
|
|
12571
12585
|
debugHelpers: !1,
|
|
12572
12586
|
size: c,
|
|
12573
12587
|
paused: l
|
|
12574
|
-
}, this.scene = t, this.renderer = e, this.buffer1Active = !1, this.dirLights = [], this.dirLightsHelpers = [], this.clearColor = new
|
|
12588
|
+
}, this.scene = t, this.renderer = e, this.buffer1Active = !1, this.dirLights = [], this.dirLightsHelpers = [], this.clearColor = new Z(), this.clearAlpha = 0, this.progress = 0, this.discardMaterial = new Lh(), this.lights = [], this.meshes = [], this.objectsToShow = [], this.autoHiddenObjects = [], this.objectsToShowSet = /* @__PURE__ */ new Set(), this.objectsToShowAncestors = /* @__PURE__ */ new Set(), this.framesDone = 0, this.fixedCamera = null, this.isRendering = !1, this.isZUp = li.DEFAULT_UP.z === 1, this.progShadowGrp = new ge(), this.progShadowGrp.name = "progressive_shadow_assets", this.scene.add(this.progShadowGrp), this.lightOrigin = new ge(), this.lightOrigin.name = "light_origin", this.isZUp ? this.lightOrigin.position.set(c, c, c * 1.5) : this.lightOrigin.position.set(c, c, c), this.progShadowGrp.add(this.lightOrigin), this.lightGroup = new ge(), this.lightGroup.name = "all_dir_lights", this.progShadowGrp.add(this.lightGroup);
|
|
12575
12589
|
const u = Math.PI;
|
|
12576
12590
|
for (let p = 0; p < n; p++) {
|
|
12577
|
-
const g = new
|
|
12591
|
+
const g = new ho(16777215, u / n);
|
|
12578
12592
|
g.name = "dir_light_" + p, g.castShadow = !0, g.shadow.bias = a, g.shadow.camera.near = 0.1, g.shadow.camera.far = 50, g.shadow.camera.right = c / 2, g.shadow.camera.left = -c / 2, g.shadow.camera.top = c / 2, g.shadow.camera.bottom = -c / 2, g.shadow.mapSize.width = s, g.shadow.mapSize.height = s, this.dirLights.push(g), this.lightGroup.add(g);
|
|
12579
12593
|
}
|
|
12580
12594
|
const m = /(Android|iPad|iPhone|iPod)/g.test(navigator == null ? void 0 : navigator.userAgent) ? Se : pe;
|
|
12581
|
-
this.progressiveLightMap1 = new Oe(i, i, { type: m }), this.progressiveLightMap2 = new Oe(i, i, { type: m }), this.progressiveLightMap1.texture.colorSpace = cr, this.progressiveLightMap2.texture.colorSpace = cr, this.shadowCatcherMaterial = new
|
|
12595
|
+
this.progressiveLightMap1 = new Oe(i, i, { type: m }), this.progressiveLightMap2 = new Oe(i, i, { type: m }), this.progressiveLightMap1.texture.colorSpace = cr, this.progressiveLightMap2.texture.colorSpace = cr, this.shadowCatcherMaterial = new Ph({
|
|
12582
12596
|
map: this.progressiveLightMap2.texture,
|
|
12583
12597
|
transparent: !0,
|
|
12584
12598
|
opacity: 1
|
|
12585
12599
|
});
|
|
12586
12600
|
const v = new zi(c, c);
|
|
12587
|
-
this.isZUp || v.rotateX(-Math.PI / 2), this.shadowCatcherMesh = new
|
|
12601
|
+
this.isZUp || v.rotateX(-Math.PI / 2), this.shadowCatcherMesh = new X(v, this.shadowCatcherMaterial), this.isZUp ? this.shadowCatcherMesh.position.z = 1e-3 : this.shadowCatcherMesh.position.y = 1e-3, this.shadowCatcherMesh.name = "shadowCatcherMesh", this.shadowCatcherMesh.receiveShadow = !0, this.progShadowGrp.add(this.shadowCatcherMesh), this.addObjectToShow(this.progShadowGrp), this.addObjectToShow(this.lightGroup), this.addObjectToShow(this.lightOrigin), this.addObjectToShow(this.shadowCatcherMesh), this.rebuildObjectsToShowAncestors(), this.debugHelpersGroup = new ge(), this.targetMat = new uo({ fog: !1 }), this.previousShadowMap = { value: this.progressiveLightMap1.texture }, this.averagingWindow = { value: h }, this.targetMat.onBeforeCompile = (p) => {
|
|
12588
12602
|
p.vertexShader = `varying vec2 vUv;
|
|
12589
12603
|
` + p.vertexShader.slice(0, -1) + "vUv = uv; gl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";
|
|
12590
12604
|
const g = p.fragmentShader.indexOf("void main() {");
|
|
@@ -12612,19 +12626,19 @@ vec3 texelOld = texture2D(previousShadowMap, vUv).rgb;
|
|
|
12612
12626
|
*/
|
|
12613
12627
|
showDebugHelpers(e) {
|
|
12614
12628
|
if (!this.debugHelpersGroup.children.length) {
|
|
12615
|
-
const t = new
|
|
12629
|
+
const t = new X(
|
|
12616
12630
|
new zi(2, 2),
|
|
12617
|
-
new
|
|
12631
|
+
new oi({
|
|
12618
12632
|
map: this.progressiveLightMap1.texture,
|
|
12619
|
-
side:
|
|
12633
|
+
side: ai
|
|
12620
12634
|
})
|
|
12621
12635
|
);
|
|
12622
12636
|
this.isZUp ? t.position.z = this.params.size / 2 : t.position.y = this.params.size / 2;
|
|
12623
12637
|
for (const a of this.dirLights) {
|
|
12624
|
-
const n = new
|
|
12638
|
+
const n = new fo(a);
|
|
12625
12639
|
this.dirLightsHelpers.push(n);
|
|
12626
12640
|
}
|
|
12627
|
-
const i = this.isZUp ? new b(0, 0, 1) : new b(0, 1, 0), s = new
|
|
12641
|
+
const i = this.isZUp ? new b(0, 0, 1) : new b(0, 1, 0), s = new po(new Gs(i, 1e-3), this.params.size, 16776960);
|
|
12628
12642
|
this.debugHelpersGroup.add(t, s, ...this.dirLightsHelpers);
|
|
12629
12643
|
}
|
|
12630
12644
|
e ? (this.progShadowGrp.add(this.debugHelpersGroup), this.dirLightsHelpers.forEach((t) => {
|
|
@@ -12784,7 +12798,7 @@ function Vn(o = {}, e, t, i = (s) => {
|
|
|
12784
12798
|
const n = Object.entries(o);
|
|
12785
12799
|
super({
|
|
12786
12800
|
uniforms: n.reduce((c, [h, f]) => {
|
|
12787
|
-
const d =
|
|
12801
|
+
const d = mo.clone({ [h]: { value: f } });
|
|
12788
12802
|
return {
|
|
12789
12803
|
...c,
|
|
12790
12804
|
...d
|
|
@@ -12802,10 +12816,10 @@ function Vn(o = {}, e, t, i = (s) => {
|
|
|
12802
12816
|
};
|
|
12803
12817
|
return s.key = Ye.generateUUID(), s;
|
|
12804
12818
|
}
|
|
12805
|
-
const
|
|
12819
|
+
const Ph = Vn(
|
|
12806
12820
|
{
|
|
12807
12821
|
transparent: !0,
|
|
12808
|
-
color: new
|
|
12822
|
+
color: new Z(0, 0, 0),
|
|
12809
12823
|
alphaTest: 0,
|
|
12810
12824
|
opacity: 1,
|
|
12811
12825
|
map: null,
|
|
@@ -12830,14 +12844,14 @@ const Dh = Vn(
|
|
|
12830
12844
|
#include <tonemapping_fragment>
|
|
12831
12845
|
#include <colorspace_fragment>
|
|
12832
12846
|
}`
|
|
12833
|
-
),
|
|
12834
|
-
class
|
|
12847
|
+
), Lh = Vn({}, "void main() { }", "void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }");
|
|
12848
|
+
class Eh extends He {
|
|
12835
12849
|
constructor(e) {
|
|
12836
12850
|
const t = document.createElement("div");
|
|
12837
12851
|
super(t), this._controls = e;
|
|
12838
12852
|
}
|
|
12839
12853
|
}
|
|
12840
|
-
class
|
|
12854
|
+
class Fh extends k.ShaderMaterial {
|
|
12841
12855
|
get source() {
|
|
12842
12856
|
return this.uniforms.source.value;
|
|
12843
12857
|
}
|
|
@@ -12917,7 +12931,7 @@ class on extends k.ShaderMaterial {
|
|
|
12917
12931
|
}), this.morphTargets = !0;
|
|
12918
12932
|
}
|
|
12919
12933
|
}
|
|
12920
|
-
class
|
|
12934
|
+
class kh extends k.ShaderMaterial {
|
|
12921
12935
|
get map() {
|
|
12922
12936
|
return this.uniforms.map.value;
|
|
12923
12937
|
}
|
|
@@ -13000,7 +13014,7 @@ class Fh extends k.ShaderMaterial {
|
|
|
13000
13014
|
});
|
|
13001
13015
|
}
|
|
13002
13016
|
}
|
|
13003
|
-
class
|
|
13017
|
+
class Bh extends k.ShaderMaterial {
|
|
13004
13018
|
get source() {
|
|
13005
13019
|
return this.uniforms.source.value;
|
|
13006
13020
|
}
|
|
@@ -13092,7 +13106,7 @@ class kh extends k.ShaderMaterial {
|
|
|
13092
13106
|
});
|
|
13093
13107
|
}
|
|
13094
13108
|
}
|
|
13095
|
-
class
|
|
13109
|
+
class Oh {
|
|
13096
13110
|
constructor(e, t, i, s) {
|
|
13097
13111
|
this.params = {
|
|
13098
13112
|
inside: !1,
|
|
@@ -13131,7 +13145,7 @@ class Bh {
|
|
|
13131
13145
|
wrapS: k.ClampToEdgeWrapping,
|
|
13132
13146
|
wrapT: k.ClampToEdgeWrapping
|
|
13133
13147
|
})
|
|
13134
|
-
], this.effectQuad = new
|
|
13148
|
+
], this.effectQuad = new ui(new kh()), this.jfaQuad = new ui(new Bh()), this.seedQuad = new ui(this.seedMaterial), this.expandQuad = new ui(new Fh()), this.setSize(window.innerWidth, window.innerHeight);
|
|
13135
13149
|
}
|
|
13136
13150
|
setSize(e, t) {
|
|
13137
13151
|
const i = this.renderer.getPixelRatio(), s = Math.floor(e * i), a = Math.floor(t * i);
|
|
@@ -13190,15 +13204,15 @@ class Bh {
|
|
|
13190
13204
|
}), s.layers.mask = c);
|
|
13191
13205
|
}
|
|
13192
13206
|
}
|
|
13193
|
-
class
|
|
13207
|
+
class zh extends X {
|
|
13194
13208
|
constructor(e = 200, t = 20, i = 0.8) {
|
|
13195
13209
|
const s = new zi(e, e), a = new Bt({
|
|
13196
|
-
side:
|
|
13210
|
+
side: ai,
|
|
13197
13211
|
transparent: !0,
|
|
13198
13212
|
depthWrite: !1,
|
|
13199
13213
|
// Avoid occluding other transparent objects if possible
|
|
13200
13214
|
uniforms: {
|
|
13201
|
-
uColor: { value: new
|
|
13215
|
+
uColor: { value: new Z(13619165) },
|
|
13202
13216
|
// Sci-fi Blue
|
|
13203
13217
|
uSize: { value: 1 },
|
|
13204
13218
|
// Grid cell size
|
|
@@ -13245,7 +13259,7 @@ class Oh extends K {
|
|
|
13245
13259
|
super(s, a), this.position.z = -0.02;
|
|
13246
13260
|
}
|
|
13247
13261
|
}
|
|
13248
|
-
const
|
|
13262
|
+
const Uh = "https://cdn2.seer-group.com/libs/hdr/aristea_wreck_512.hdr", Hh = "https://cdn2.seer-group.com/libs/hdr/lightroom_14b_512.hdr", Wh = "https://cdn2.seer-group.com/libs/fonts.type.json", Eu = new Ao(Wh);
|
|
13249
13263
|
class an {
|
|
13250
13264
|
constructor(e) {
|
|
13251
13265
|
var t;
|
|
@@ -13261,22 +13275,22 @@ class an {
|
|
|
13261
13275
|
this.change(this._defaults.color);
|
|
13262
13276
|
}
|
|
13263
13277
|
}
|
|
13264
|
-
var
|
|
13278
|
+
var Nh = /* @__PURE__ */ ((o) => (o[o.DEFAULT = 0] = "DEFAULT", o[o.CAN_INSTALL = 1] = "CAN_INSTALL", o))(Nh || {});
|
|
13265
13279
|
const ln = 0.15;
|
|
13266
|
-
|
|
13267
|
-
let Ct,
|
|
13268
|
-
const
|
|
13269
|
-
Ct = void 0,
|
|
13270
|
-
},
|
|
13271
|
-
class
|
|
13280
|
+
li.DEFAULT_UP.set(0, 0, 1);
|
|
13281
|
+
let Ct, Bi = 0, Ns = 0;
|
|
13282
|
+
const Vh = () => {
|
|
13283
|
+
Ct = void 0, Bi = 0, Ns = 0;
|
|
13284
|
+
}, Gh = new oi({ colorWrite: !1 });
|
|
13285
|
+
class Fu {
|
|
13272
13286
|
constructor(e) {
|
|
13273
|
-
this.props = e, this.stats = new ti(), this.scene = new As(), this.overlayScene = new As(), this.renderer = new
|
|
13287
|
+
this.props = e, this.stats = new ti(), this.scene = new As(), this.overlayScene = new As(), this.renderer = new go({
|
|
13274
13288
|
antialias: !0,
|
|
13275
13289
|
alpha: !0,
|
|
13276
13290
|
logarithmicDepthBuffer: !0,
|
|
13277
13291
|
powerPreference: "high-performance",
|
|
13278
13292
|
preserveDrawingBuffer: !0
|
|
13279
|
-
}), this.css2dRenderer = new
|
|
13293
|
+
}), this.css2dRenderer = new bo(), this.mousePos = new z(), this.mouseCoord = new z(), this.offset = new z(), this.size = new z(), this.amr = new Tc({ showSizeBox: !0, showController: !0 }), this._selectedForOutline = [], this._clock = new ji(!0), this._uiHiddenTime = this._clock.getElapsedTime(), this.camera = new qi(
|
|
13280
13294
|
39.6,
|
|
13281
13295
|
window.innerWidth / window.innerHeight,
|
|
13282
13296
|
0.1,
|
|
@@ -13288,19 +13302,19 @@ class Eu {
|
|
|
13288
13302
|
-this.d,
|
|
13289
13303
|
0.1,
|
|
13290
13304
|
1e3
|
|
13291
|
-
), this._axisMoving = !1, this._container = new ge(), this._raycaster = new
|
|
13305
|
+
), this._axisMoving = !1, this._container = new ge(), this._raycaster = new vo(), this._selected = [], this._pointerDownTimeout = 0, this._dragging = !1, this.maxSample = 1024 * 2, this.sampleCount = 0, this._usePathTracing = !1, this._fpsCache = [], this._fpsCacheMax = 20, this._emitter = new Ot(), this.sound = new rc(), this._rafId = null, this._destroyed = !1, this._ground = new X(
|
|
13292
13306
|
new zi(100, 100),
|
|
13293
|
-
new
|
|
13294
|
-
color: new
|
|
13307
|
+
new _o({
|
|
13308
|
+
color: new Z("#eee"),
|
|
13295
13309
|
metalness: 0.4,
|
|
13296
13310
|
roughness: 0.1,
|
|
13297
13311
|
clearcoat: 1,
|
|
13298
13312
|
clearcoatRoughness: 0.1
|
|
13299
13313
|
})
|
|
13300
|
-
), this._sciFiGrid = new
|
|
13314
|
+
), this._sciFiGrid = new zh(18, 40), this._amrRender = new Oe(1024, 1024, {
|
|
13301
13315
|
format: te,
|
|
13302
13316
|
type: Vs,
|
|
13303
|
-
colorSpace:
|
|
13317
|
+
colorSpace: ni,
|
|
13304
13318
|
samples: 8
|
|
13305
13319
|
}), this._lastTarget = new b(), this._shadowMode = !1, this.addEventListener = this._emitter.on.bind(this._emitter), this.removeEventListener = this._emitter.on.bind(this._emitter), this._showSlots = !0, this._showSize = !0, this._showControls = !0, this._drag = (c) => {
|
|
13306
13320
|
this._dragging = !0, this._pointermove(c);
|
|
@@ -13326,8 +13340,8 @@ class Eu {
|
|
|
13326
13340
|
};
|
|
13327
13341
|
this._pointerDownTimeout = window.setTimeout(h, 200);
|
|
13328
13342
|
}, this._detectTrackpad = () => {
|
|
13329
|
-
Ct || typeof Ct < "u" || (
|
|
13330
|
-
}, this.debounceForkHeightChange =
|
|
13343
|
+
Ct || typeof Ct < "u" || (Bi === 0 && (Ns = performance.now()), Bi++, performance.now() - Ns > 66 && (Bi > 5 ? Ct = !0 : Ct = !1, Ct ? this.controls.zoomSpeed = 0.2 : this.controls.zoomSpeed = 1, setTimeout(Vh, 2e3)));
|
|
13344
|
+
}, this.debounceForkHeightChange = lc(() => {
|
|
13331
13345
|
var c;
|
|
13332
13346
|
this._progressShadow.clear(), (c = this._progressShadow) == null || c.recalculate();
|
|
13333
13347
|
}, 300), this.focusObjects = (c, h) => {
|
|
@@ -13356,12 +13370,12 @@ class Eu {
|
|
|
13356
13370
|
l.set(0, 0, 0);
|
|
13357
13371
|
let Ji = 0;
|
|
13358
13372
|
for (let ft = 0; ft < ce.length; ft++) {
|
|
13359
|
-
const
|
|
13360
|
-
|
|
13373
|
+
const hi = ir[ft] || 0;
|
|
13374
|
+
hi && (Ji += hi, u.set(
|
|
13361
13375
|
ce[ft].getX(Ve),
|
|
13362
13376
|
ce[ft].getY(Ve),
|
|
13363
13377
|
ce[ft].getZ(Ve)
|
|
13364
|
-
), q.morphTargetsRelative, l.addScaledVector(u,
|
|
13378
|
+
), q.morphTargetsRelative, l.addScaledVector(u, hi));
|
|
13365
13379
|
}
|
|
13366
13380
|
q.morphTargetsRelative ? r.add(l) : Ji > 0 && (r.multiplyScalar(1 - Ji), r.add(l));
|
|
13367
13381
|
}
|
|
@@ -13371,7 +13385,7 @@ class Eu {
|
|
|
13371
13385
|
if (c.forEach((W) => {
|
|
13372
13386
|
W.traverse((q) => {
|
|
13373
13387
|
if (q.visible) {
|
|
13374
|
-
if (q instanceof
|
|
13388
|
+
if (q instanceof X) {
|
|
13375
13389
|
p(q);
|
|
13376
13390
|
return;
|
|
13377
13391
|
}
|
|
@@ -13509,7 +13523,7 @@ class Eu {
|
|
|
13509
13523
|
})), this._rafId = requestAnimationFrame(this.ticker), this.renderer.clear(), this.usePathTracing) {
|
|
13510
13524
|
this.hideAmrUI(), this.sampleCount < this.maxSample ? this.sampleCount++ : this.pathTracer.pausePathTracing = !0, this.pathTracer.renderSample();
|
|
13511
13525
|
const h = this.renderer.autoClear;
|
|
13512
|
-
this.renderer.autoClear = !1, this.scene.overrideMaterial =
|
|
13526
|
+
this.renderer.autoClear = !1, this.scene.overrideMaterial = Gh, this.renderer.clearDepth(), this.renderer.render(this.scene, this.mainCamera), this.scene.overrideMaterial = null, this.renderer.render(this.overlayScene, this.mainCamera), this.renderer.autoClear = h;
|
|
13513
13527
|
} else {
|
|
13514
13528
|
this._clock.getElapsedTime() - this._uiHiddenTime > 0.15 ? this.showControls && this.amr.controllers.forEach((d) => d.show()) : this.amr.controllers.forEach((d) => d.hide());
|
|
13515
13529
|
const f = this.stats.fps();
|
|
@@ -13522,12 +13536,12 @@ class Eu {
|
|
|
13522
13536
|
}
|
|
13523
13537
|
this.stats.end();
|
|
13524
13538
|
}
|
|
13525
|
-
}, this.stats.showPanel(0), this.hideState(), e.fov && (this.camera.fov = e.fov, this.camera.updateProjectionMatrix()), Dn(kt, this.renderer), this._ground.visible = !1, this.controls = new
|
|
13526
|
-
const { tiles: t } =
|
|
13527
|
-
this.pathTracer = new
|
|
13539
|
+
}, this.stats.showPanel(0), this.hideState(), e.fov && (this.camera.fov = e.fov, this.camera.updateProjectionMatrix()), Dn(kt, this.renderer), this._ground.visible = !1, this.controls = new wo(this.camera, this.renderer.domElement), this.controls.enablePan = !0, this.controls.rotateSpeed = this.props.isMobile ? 0.6 : 0.5, this.controls.dampingFactor = ln, this.controls.enableDamping = !0, this.controls.maxDistance = 10, this.controls.minDistance = 1, this.controls.zoomSpeed = this.props.isMobile ? 0.3 : ic() ? 0.2 : 1, this._cameraPositionUI = new Eh(this.controls), this.renderer.setPixelRatio(window.devicePixelRatio || 1), this.renderer.autoClear = !0, this.renderer.toneMapping = yo, this.renderer.toneMappingExposure = 1.4, this.renderer.outputColorSpace = ni, this.renderer.localClippingEnabled = !0, this.renderer.shadowMap.enabled = !0, this.css2dRenderer.domElement.style.pointerEvents = "none", this.css2dRenderer.domElement.style.position = "absolute", this.css2dRenderer.domElement.style.top = "0px", this.camera.position.set(10, -10, 5), this.camera.lookAt(new b());
|
|
13540
|
+
const { tiles: t } = oc();
|
|
13541
|
+
this.pathTracer = new xl(this.renderer), this.pathTracer.multipleImportanceSampling = !0, this.pathTracer.filterGlossyFactor = 0.6;
|
|
13528
13542
|
let i = window.devicePixelRatio;
|
|
13529
13543
|
i < 2 && (i = 2), this.pathTracer.renderScale = this.props.isMobile ? 1 : i, this.pathTracer.bounces = this.props.isMobile ? 8 : 10, this.pathTracer.transmissiveBounces = this.props.isMobile ? 1 : 3, this.pathTracer.tiles.set(t, t), this.pathTracer.minSamples = 10, this.pathTracer.dynamicLowRes = !0, this.pathTracer.lowResScale = 0.5, this.pathTracer.fadeDuration = 0;
|
|
13530
|
-
const s = new
|
|
13544
|
+
const s = new Ih(e.workerUrl), a = typeof navigator < "u" ? navigator.hardwareConcurrency : 4;
|
|
13531
13545
|
s.maxWorkerCount = a, this.pathTracer.setBVHWorker(s), this.orthographicCamera.left = -20, this.orthographicCamera.right = 20, this.orthographicCamera.top = -20, this.orthographicCamera.bottom = 20, this._lastTarget = this.controls.target.clone();
|
|
13532
13546
|
const n = () => {
|
|
13533
13547
|
let c = this._lastTarget.x, h = this._lastTarget.y;
|
|
@@ -13536,16 +13550,16 @@ class Eu {
|
|
|
13536
13550
|
this.controls.addEventListener("change", () => {
|
|
13537
13551
|
var c;
|
|
13538
13552
|
this.sampleCount = 0, n(), this._uiHiddenTime = this._clock.getElapsedTime(), this.orthographicCamera.position.copy(this.camera.position), this.orthographicCamera.lookAt(this.controls.target), this.usePathTracing && (this.pathTracer.pausePathTracing = !1, (c = this.pathTracer) == null || c.updateCamera()), this._updateCamera(), !(Math.abs(this.camera.position.x) < 1e-3 || Math.abs(this.camera.position.y) < 1e-3) && (this._axisMoving || (this.mainCamera = this.camera, this.usePathTracing && this.generateBVH().then()));
|
|
13539
|
-
}), this._mainCamera = this.camera, this._progressShadow = new
|
|
13553
|
+
}), this._mainCamera = this.camera, this._progressShadow = new Dh(this.renderer, this.scene, {
|
|
13540
13554
|
size: 8,
|
|
13541
13555
|
lightCount: e.isMobile ? 6 : 12,
|
|
13542
13556
|
frames: e.isMobile ? 80 : 120,
|
|
13543
13557
|
lightRadius: 8,
|
|
13544
13558
|
ambientWeight: 0.8
|
|
13545
|
-
}), this._progressShadow.lightOrigin.position.set(3, 2.5, 6), this._progressShadow.visible = !1, this._container.add(this.amr), this.scene.add(this._container), this.ticker(0), this._loadEnv(), this._initEvents(), this.scene.add(this._cameraPositionUI), this._ground.rotateX(-Math.PI / 2), this.scene.add(this._ground), this._jumpFlood = new
|
|
13559
|
+
}), this._progressShadow.lightOrigin.position.set(3, 2.5, 6), this._progressShadow.visible = !1, this._container.add(this.amr), this.scene.add(this._container), this.ticker(0), this._loadEnv(), this._initEvents(), this.scene.add(this._cameraPositionUI), this._ground.rotateX(-Math.PI / 2), this.scene.add(this._ground), this._jumpFlood = new Oh(this.renderer, this.scene, this.camera, {
|
|
13546
13560
|
thickness: 4,
|
|
13547
13561
|
color: "#fff"
|
|
13548
|
-
}), (typeof e.useAxisBall != "boolean" || e.useAxisBall) && (this._controlsGizmo = new
|
|
13562
|
+
}), (typeof e.useAxisBall != "boolean" || e.useAxisBall) && (this._controlsGizmo = new Rh(this.controls, {
|
|
13549
13563
|
size: 160,
|
|
13550
13564
|
padding: 12,
|
|
13551
13565
|
offset: e.axisBallOffset || new z(10, 10),
|
|
@@ -13572,15 +13586,15 @@ class Eu {
|
|
|
13572
13586
|
e ? (this._progressShadow.visible = !1, this.amr.bodyOpacity = 0.2) : (this._progressShadow.visible = !0, this.amr.bodyOpacity = 1, this._progressShadow.isFinished || this._progressShadow.recalculate().then()), this._shadowMode = e;
|
|
13573
13587
|
}
|
|
13574
13588
|
set usePathTracing(e) {
|
|
13575
|
-
this._clearAmrContent(), e ? (this.scene.background = new
|
|
13576
|
-
t.mapping =
|
|
13589
|
+
this._clearAmrContent(), e ? (this.scene.background = new Z("transparent"), this.renderer.toneMappingExposure = 1.8, this.overlayScene.add(this._progressShadow.shadowCatcherMesh), this.amr && (this.amr.bodyOpacity = 1), this.hideAmrUI(), this.pathTracer.renderToCanvas = !0, this.scene.background = null, this._ptEnvMap ? (this.scene.environment = this._ptEnvMap, this.pathTracer.updateEnvironment()) : new hr().load(Hh, (t) => {
|
|
13590
|
+
t.mapping = Oi, this._ptEnvMap = t, this.usePathTracing && (this.scene.environment = t, this.pathTracer.updateEnvironment());
|
|
13577
13591
|
})) : (this.renderer.toneMappingExposure = 1.4, this.scene.add(this._progressShadow.shadowCatcherMesh), this.pathTracer.renderToCanvas = !1, this.amr.logos.forEach((t) => {
|
|
13578
13592
|
var i;
|
|
13579
13593
|
(i = t.parent) == null || i.add(t.target);
|
|
13580
13594
|
}), this.showAmrUI(), this.amr && this.amr.opacityCache !== void 0 ? (this.amr.bodyOpacity = this.amr.opacityCache, this.amr.opacityCache = void 0) : this.amr && (this.amr.bodyOpacity = 1), this.pathTracer.reset(), this._ground.visible = !1, this._envMap && (this.scene.background = this._envMap, this.scene.environment = this._envMap)), this._usePathTracing = e, this.controls.dampingFactor = e ? 1 : ln, this.sampleCount = 0;
|
|
13581
13595
|
}
|
|
13582
13596
|
get fpsAverage() {
|
|
13583
|
-
return
|
|
13597
|
+
return tc(this._fpsCache);
|
|
13584
13598
|
}
|
|
13585
13599
|
get mainCamera() {
|
|
13586
13600
|
return this._mainCamera;
|
|
@@ -13623,8 +13637,8 @@ class Eu {
|
|
|
13623
13637
|
this.orthographicCamera.left = -t * i / 2, this.orthographicCamera.right = t * i / 2, this.orthographicCamera.top = t / 2, this.orthographicCamera.bottom = -t / 2, this.orthographicCamera.updateProjectionMatrix();
|
|
13624
13638
|
}
|
|
13625
13639
|
_loadEnv() {
|
|
13626
|
-
new hr().load(
|
|
13627
|
-
t.mapping =
|
|
13640
|
+
new hr().load(Uh, (t) => {
|
|
13641
|
+
t.mapping = Oi, this._envMap = t, this._usePathTracing || (this.scene.background = t, this.scene.backgroundBlurriness = 1, this.scene.backgroundIntensity = 1, this.scene.backgroundRotation = new xo(Math.PI / 2, 0, Math.PI * 0.98 * 0.8), this.scene.environment = t, this.overlayScene.environment = t, this.scene.environmentRotation = this.scene.backgroundRotation, this.overlayScene.environmentRotation = this.scene.environmentRotation, this.scene.environmentIntensity = 1.4, this.overlayScene.environmentIntensity = this.scene.environmentIntensity), this.pathTracer.updateEnvironment();
|
|
13628
13642
|
}, () => {
|
|
13629
13643
|
}, () => {
|
|
13630
13644
|
});
|
|
@@ -13683,7 +13697,7 @@ class Eu {
|
|
|
13683
13697
|
const t = (e == null ? void 0 : e.subject) ?? this._container;
|
|
13684
13698
|
(n = this._progressShadow) == null || n.visible;
|
|
13685
13699
|
const i = this.scene.background, s = this.showSize;
|
|
13686
|
-
return new
|
|
13700
|
+
return new qh({
|
|
13687
13701
|
renderer: this.renderer,
|
|
13688
13702
|
scene: this.scene,
|
|
13689
13703
|
overlayScene: this.overlayScene,
|
|
@@ -13703,7 +13717,7 @@ class Eu {
|
|
|
13703
13717
|
const e = this._container.clone(!0);
|
|
13704
13718
|
return e.traverse((t) => {
|
|
13705
13719
|
t.dispose && (t.dispose(), t.removeFromParent());
|
|
13706
|
-
}), await
|
|
13720
|
+
}), await uc.parseAsync(e, {
|
|
13707
13721
|
onlyVisible: !0,
|
|
13708
13722
|
binary: !0
|
|
13709
13723
|
});
|
|
@@ -13716,7 +13730,7 @@ class Eu {
|
|
|
13716
13730
|
let n = s;
|
|
13717
13731
|
a.userData[`origin_${i}`] && (n -= a.userData[`origin_${i}`]);
|
|
13718
13732
|
const c = a.morphTargetDictionary[i];
|
|
13719
|
-
a.morphTargetInfluences && (a.morphTargetInfluences[c] = n), a instanceof
|
|
13733
|
+
a.morphTargetInfluences && (a.morphTargetInfluences[c] = n), a instanceof X && a.geometry.translate(0, 0, 1e-5);
|
|
13720
13734
|
}), [
|
|
13721
13735
|
"width",
|
|
13722
13736
|
"length",
|
|
@@ -13790,7 +13804,7 @@ class Eu {
|
|
|
13790
13804
|
e && ((c = this._resizeObserver) == null || c.unobserve(e)), this.controls.dispose(), this.renderer.domElement.remove(), this.renderer.dispose(), De(this.scene), this.scene.clear();
|
|
13791
13805
|
}
|
|
13792
13806
|
}
|
|
13793
|
-
class
|
|
13807
|
+
class qh {
|
|
13794
13808
|
constructor(e) {
|
|
13795
13809
|
this.deps = e, this.canvas = null, this.pixelBuffer = null, this.orthoCamera = new Ms(-1, 1, 1, -1, 0.1, 1e3), this.orthoCamera.position.set(0, 0, 5), this.perspectiveCamera = new qi(45, 1, 0.1, 2e3);
|
|
13796
13810
|
}
|
|
@@ -13805,7 +13819,7 @@ class Gh {
|
|
|
13805
13819
|
format: te,
|
|
13806
13820
|
type: Vs
|
|
13807
13821
|
});
|
|
13808
|
-
r.texture.colorSpace =
|
|
13822
|
+
r.texture.colorSpace = ni, r.texture.generateMipmaps = !1, r.depthBuffer = !0;
|
|
13809
13823
|
const l = this.storeRendererState(t), u = {};
|
|
13810
13824
|
try {
|
|
13811
13825
|
(g = (p = this.deps).onBeforeCapture) == null || g.call(p);
|
|
@@ -13931,7 +13945,7 @@ class Gh {
|
|
|
13931
13945
|
e.getViewport(i);
|
|
13932
13946
|
const s = new it();
|
|
13933
13947
|
e.getScissor(s);
|
|
13934
|
-
const a = e.getClearColor(new
|
|
13948
|
+
const a = e.getClearColor(new Z()), n = e.getClearAlpha();
|
|
13935
13949
|
return {
|
|
13936
13950
|
size: t,
|
|
13937
13951
|
pixelRatio: e.getPixelRatio(),
|
|
@@ -13947,12 +13961,12 @@ class Gh {
|
|
|
13947
13961
|
applyRendererState(e, t, i, s) {
|
|
13948
13962
|
if (e.setPixelRatio(1), e.setSize(t, i, !1), e.setViewport(0, 0, t, i), e.setScissor(0, 0, t, i), e.setScissorTest(!1), e.autoClear = !0, s !== void 0)
|
|
13949
13963
|
if (s === null) {
|
|
13950
|
-
const a = e.getClearColor(new
|
|
13964
|
+
const a = e.getClearColor(new Z());
|
|
13951
13965
|
e.setClearColor(a, 0);
|
|
13952
13966
|
} else
|
|
13953
|
-
s instanceof
|
|
13967
|
+
s instanceof Z ? e.setClearColor(s, 1) : e.setClearColor(new Z(s), 1);
|
|
13954
13968
|
else {
|
|
13955
|
-
const a = e.getClearColor(new
|
|
13969
|
+
const a = e.getClearColor(new Z());
|
|
13956
13970
|
e.setClearColor(a, 0);
|
|
13957
13971
|
}
|
|
13958
13972
|
}
|
|
@@ -13978,22 +13992,22 @@ class Gh {
|
|
|
13978
13992
|
return this.canvas || (this.canvas = document.createElement("canvas")), (this.canvas.width !== e || this.canvas.height !== t) && (this.canvas.width = e, this.canvas.height = t), this.canvas;
|
|
13979
13993
|
}
|
|
13980
13994
|
}
|
|
13981
|
-
const
|
|
13995
|
+
const jh = "shop-components", Qh = "0.4.14", Yh = "Shop components", Zh = "dist/shop-components.umd.js", Kh = "dist/shop-components.mjs", Xh = "dist/main.d.ts", Jh = {
|
|
13982
13996
|
dts: "tsc --emitDeclarationOnly & tsc & storybook build -o dist",
|
|
13983
13997
|
dev: "vite dev",
|
|
13984
13998
|
build: "vite build",
|
|
13985
13999
|
v: "auto-changelog -p && git add CHANGELOG.md"
|
|
13986
|
-
},
|
|
14000
|
+
}, $h = [
|
|
13987
14001
|
"dist",
|
|
13988
14002
|
"package.json"
|
|
13989
|
-
],
|
|
14003
|
+
], eu = [], tu = "machengda<machengda@seer-group.com>", iu = "ISC", su = {
|
|
13990
14004
|
"@needle-tools/gltf-progressive": "^3.3.5",
|
|
13991
14005
|
"auto-changelog": "^2.4.0",
|
|
13992
14006
|
vite: "5.1.6",
|
|
13993
14007
|
"vite-plugin-dts": "^3.7.3"
|
|
13994
|
-
}, su = {
|
|
13995
|
-
"string-width": "4.2.3"
|
|
13996
14008
|
}, ru = {
|
|
14009
|
+
"string-width": "4.2.3"
|
|
14010
|
+
}, nu = {
|
|
13997
14011
|
"@nodetoy/three-nodetoy": "^0.1.36",
|
|
13998
14012
|
"@tweakpane/core": "^2.0.3",
|
|
13999
14013
|
"@tweenjs/tween.js": "^23.1.2",
|
|
@@ -14011,24 +14025,24 @@ const qh = "shop-components", jh = "0.4.13", Qh = "Shop components", Yh = "dist/
|
|
|
14011
14025
|
"three-mesh-bvh": "^0.7.5",
|
|
14012
14026
|
"troika-three-text": "^0.49.1",
|
|
14013
14027
|
tweakpane: "^4.0.3"
|
|
14014
|
-
},
|
|
14015
|
-
name:
|
|
14016
|
-
version:
|
|
14017
|
-
description:
|
|
14018
|
-
main:
|
|
14019
|
-
module:
|
|
14020
|
-
types:
|
|
14021
|
-
scripts:
|
|
14022
|
-
files:
|
|
14023
|
-
keywords:
|
|
14024
|
-
author:
|
|
14025
|
-
license:
|
|
14026
|
-
devDependencies:
|
|
14027
|
-
resolutions:
|
|
14028
|
-
dependencies:
|
|
14028
|
+
}, ou = {
|
|
14029
|
+
name: jh,
|
|
14030
|
+
version: Qh,
|
|
14031
|
+
description: Yh,
|
|
14032
|
+
main: Zh,
|
|
14033
|
+
module: Kh,
|
|
14034
|
+
types: Xh,
|
|
14035
|
+
scripts: Jh,
|
|
14036
|
+
files: $h,
|
|
14037
|
+
keywords: eu,
|
|
14038
|
+
author: tu,
|
|
14039
|
+
license: iu,
|
|
14040
|
+
devDependencies: su,
|
|
14041
|
+
resolutions: ru,
|
|
14042
|
+
dependencies: nu
|
|
14029
14043
|
};
|
|
14030
14044
|
function cn() {
|
|
14031
|
-
const o = "Nebula Engin", e =
|
|
14045
|
+
const o = "Nebula Engin", e = ou.version, t = `%c ${o} %c v${e} `;
|
|
14032
14046
|
console.log(t, "background:#111827;color:#ffffff;padding:4px 10px;border-radius:4px 0 0 4px;font-weight:700;", "background:#10B981;color:#ffffff;padding:4px 10px;border-radius:0 4px 4px 0;font-weight:700;");
|
|
14033
14047
|
}
|
|
14034
14048
|
const hn = "__SHOP_COMPONENTS_BANNER_PRINTED__";
|
|
@@ -14039,25 +14053,25 @@ try {
|
|
|
14039
14053
|
cn();
|
|
14040
14054
|
}
|
|
14041
14055
|
export {
|
|
14042
|
-
|
|
14056
|
+
Tc as Amr,
|
|
14043
14057
|
jr as Logo,
|
|
14044
14058
|
Wi as SGLBLoader,
|
|
14045
14059
|
$ as SLOT_EVENTS,
|
|
14046
|
-
|
|
14060
|
+
Fu as Scene3D,
|
|
14047
14061
|
an as Skin,
|
|
14048
14062
|
Vr as Slot,
|
|
14049
|
-
|
|
14050
|
-
|
|
14063
|
+
Nh as SlotState,
|
|
14064
|
+
qh as TriViewCapture,
|
|
14051
14065
|
Or as arrayBufferToUrl,
|
|
14052
|
-
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14066
|
+
tc as calculateArrayAverage,
|
|
14067
|
+
Ru as calculateFocalLength,
|
|
14068
|
+
Lu as createSGLBFile,
|
|
14069
|
+
Iu as downloadBlob,
|
|
14070
|
+
Pu as dracoExporter,
|
|
14071
|
+
Eu as font,
|
|
14072
|
+
uc as gltfExporter,
|
|
14059
14073
|
kt as gltfLoader,
|
|
14060
14074
|
zr as imageBitmapToUrl,
|
|
14061
|
-
|
|
14075
|
+
ic as isAppleDevice,
|
|
14062
14076
|
Bn as textureLoader
|
|
14063
14077
|
};
|