shop-components 0.4.5 → 0.4.7
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 +8 -1
- package/dist/shop-components.cjs +47 -47
- package/dist/shop-components.mjs +667 -630
- package/package.json +1 -1
- package/dist/test.glb +0 -0
package/dist/shop-components.mjs
CHANGED
|
@@ -10,26 +10,26 @@ var H = (o, e, t) => (rr(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) => (rr(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 ni, Mesh as X, ShaderMaterial as kt, NoBlending as ri, WebGLRenderTarget as Be, FloatType as pe, RGBAFormat as te, NearestFilter as ee, Vector2 as z, PerspectiveCamera as Gi, DataUtils as ke, DataTexture as Oe, HalfFloatType as Se, LinearFilter as Te, RepeatWrapping as et, RedFormat as xs, ClampToEdgeWrapping as He, Source as jn, Quaternion as hn, DataArrayTexture as Qn, DoubleSide as oi, BackSide as fn, FrontSide as ws, Color as K, WebGLArrayRenderTarget as Yn, UnsignedByteType as Vs, NoToneMapping as Zn, RGFormat as Xn, NormalBlending as dn, Spherical as Kn, EquirectangularReflectionMapping as ki, LinearMipMapLinearFilter as Jn, Clock as qi, Scene as bs, AdditiveBlending as $n, Box3 as Y, Sphere as ji, CompressedTexture as eo, Texture as Qe, InterleavedBuffer as to, InterleavedBufferAttribute as io, TextureLoader as pn, MeshStandardMaterial as so, Group as ge, LineSegments as As, LineBasicMaterial as nr, Object3D as Bt, LineDashedMaterial as Ts, RingGeometry as or, BoxGeometry as ro, EdgesGeometry as no, SRGBColorSpace as Bi, AnimationMixer as ar,
|
|
13
|
+
import { BufferAttribute as fe, BufferGeometry as le, Matrix4 as J, Matrix3 as un, Vector3 as b, Vector4 as it, MeshBasicMaterial as ni, Mesh as X, ShaderMaterial as kt, NoBlending as ri, WebGLRenderTarget as Be, FloatType as pe, RGBAFormat as te, NearestFilter as ee, Vector2 as z, PerspectiveCamera as Gi, DataUtils as ke, DataTexture as Oe, HalfFloatType as Se, LinearFilter as Te, RepeatWrapping as et, RedFormat as xs, ClampToEdgeWrapping as He, Source as jn, Quaternion as hn, DataArrayTexture as Qn, DoubleSide as oi, BackSide as fn, FrontSide as ws, Color as K, WebGLArrayRenderTarget as Yn, UnsignedByteType as Vs, NoToneMapping as Zn, RGFormat as Xn, NormalBlending as dn, Spherical as Kn, EquirectangularReflectionMapping as ki, LinearMipMapLinearFilter as Jn, Clock as qi, Scene as bs, AdditiveBlending as $n, Box3 as Y, Sphere as ji, CompressedTexture as eo, Texture as Qe, InterleavedBuffer as to, InterleavedBufferAttribute as io, TextureLoader as pn, MeshStandardMaterial as so, Group as ge, LineSegments as As, LineBasicMaterial as nr, Object3D as Bt, LineDashedMaterial as Ts, RingGeometry as or, BoxGeometry as ro, EdgesGeometry as no, SRGBColorSpace as Bi, AnimationMixer as ar, LoopRepeat as oo, LoopOnce as ao, Plane as Ns, Line3 as ze, Triangle as Kt, MathUtils as Ye, DirectionalLight as lo, NoColorSpace as lr, PlaneGeometry as Oi, MeshLambertMaterial as co, DirectionalLightHelper as uo, PlaneHelper as ho, UniformsUtils as fo, WebGLRenderer as po, OrthographicCamera as Ss, Raycaster as mo, MeshPhysicalMaterial as go, ACESFilmicToneMapping as vo, Euler as _o } from "three";
|
|
14
14
|
import { HDRLoader as cr } from "three/examples/jsm/loaders/HDRLoader.js";
|
|
15
|
-
import { OrbitControls as
|
|
16
|
-
import { CSS2DObject as Ue, CSS2DRenderer as
|
|
17
|
-
import { Font as
|
|
15
|
+
import { OrbitControls as yo } from "three/examples/jsm/controls/OrbitControls";
|
|
16
|
+
import { CSS2DObject as Ue, CSS2DRenderer as xo } from "three/examples/jsm/renderers/CSS2DRenderer";
|
|
17
|
+
import { Font as wo } from "three/examples/jsm/loaders/FontLoader";
|
|
18
18
|
import { GLTFLoader as Gs } 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 bo } from "three/examples/jsm/libs/meshopt_decoder.module.js";
|
|
20
|
+
import { DRACOLoader as Ao } from "three/examples/jsm/loaders/DRACOLoader.js";
|
|
21
|
+
import { GLTFLoader as To } from "three/examples/jsm/loaders/GLTFLoader";
|
|
22
|
+
import { DRACOLoader as So } from "three/examples/jsm/loaders/DRACOLoader";
|
|
23
|
+
import { DRACOExporter as Mo } from "three/examples/jsm/exporters/DRACOExporter";
|
|
24
|
+
import { GLTFExporter as Co } from "three/examples/jsm/exporters/GLTFExporter";
|
|
25
25
|
import * as Ji from "three/examples/jsm/utils/SkeletonUtils.js";
|
|
26
|
-
import { Line2 as
|
|
27
|
-
import { LineMaterial as
|
|
26
|
+
import { Line2 as Io } from "three/examples/jsm/lines/Line2.js";
|
|
27
|
+
import { LineMaterial as Ro } 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 Po } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
30
30
|
import "three/examples/jsm/utils/BufferGeometryUtils";
|
|
31
31
|
import { FullScreenQuad as ci } from "three/examples/jsm/postprocessing/Pass";
|
|
32
|
-
import { SAH as Do, MeshBVH as
|
|
32
|
+
import { SAH as Do, MeshBVH as Eo, FloatVertexAttributeTexture as Lo, MeshBVHUniformStruct as Fo, UIntVertexAttributeTexture as ko, BVHShaderGLSL as $i } from "three-mesh-bvh";
|
|
33
33
|
import { FullScreenQuad as Et } from "three/examples/jsm/postprocessing/Pass.js";
|
|
34
34
|
function mn(o, e, t = 0) {
|
|
35
35
|
if (o.isInterleavedBufferAttribute) {
|
|
@@ -55,7 +55,7 @@ function St(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 Bo(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 ko(o) {
|
|
|
73
73
|
throw new Error("StaticGeometryGenerator: All geometries must have the same number of attributes.");
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Oo(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 zo(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 Uo(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 Ho(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, u = c ?
|
|
103
|
-
if (
|
|
101
|
+
Bo(o);
|
|
102
|
+
const c = o[0].index !== null, u = c ? Oo(o) : -1, f = zo(o);
|
|
103
|
+
if (Uo(t, u, f), i) {
|
|
104
104
|
let r = 0;
|
|
105
105
|
for (let l = 0, h = o.length; l < h; l++) {
|
|
106
106
|
const m = o[l];
|
|
@@ -138,7 +138,7 @@ function Uo(o, e = {}, t = new le()) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Wo(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 Ho(o, e, t) {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Vo(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 fr(o) {
|
|
|
209
209
|
const e = o.skeleton;
|
|
210
210
|
return e ? (e.boneTexture || e.computeBoneTexture(), `${qs(e.boneTexture.image.data.buffer)}_${e.boneTexture.uuid}`) : null;
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class No {
|
|
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
|
}
|
|
@@ -230,7 +230,7 @@ function vr(o, e, t) {
|
|
|
230
230
|
const u = mr.getComponent(c);
|
|
231
231
|
if (u !== 0) {
|
|
232
232
|
const f = pr.getComponent(c);
|
|
233
|
-
gr.multiplyMatrices(a[f].matrixWorld, n[f]),
|
|
233
|
+
gr.multiplyMatrices(a[f].matrixWorld, n[f]), Go(hi, gr, u);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
return hi.multiply(o.bindMatrix).premultiply(o.bindMatrixInverse), t.transformDirection(hi), t;
|
|
@@ -243,12 +243,12 @@ function ts(o, e, t, i, s) {
|
|
|
243
243
|
}
|
|
244
244
|
s.add(ui);
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Go(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 Go(o) {
|
|
|
266
266
|
}
|
|
267
267
|
return o;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function jo(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) || (u[y] || t.setAttribute(y, Jt(c[y])), St(c[y], u[y]), mn(c[y], u[y]));
|
|
286
286
|
}
|
|
287
|
-
return o.matrixWorld.determinant() < 0 &&
|
|
287
|
+
return o.matrixWorld.determinant() < 0 && qo(t), t;
|
|
288
288
|
}
|
|
289
|
-
class
|
|
289
|
+
class Qo 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 No();
|
|
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 jo 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) ? (jo(e, t, this), i.updateFrom(e), this.version++, this.hash = `${this.uuid}_${this.version}`, !0) : !1;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
const Ms = 0, gn = 1, vn = 2;
|
|
310
|
-
function
|
|
310
|
+
function Yo(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 Zo(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 Yo(o) {
|
|
|
321
321
|
}
|
|
322
322
|
return e;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Xo(o, e, t) {
|
|
325
325
|
if (o.length === 0) {
|
|
326
326
|
e.setIndex(null);
|
|
327
327
|
const i = e.attributes;
|
|
@@ -330,11 +330,11 @@ function Zo(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
|
+
Ho(o, t, e);
|
|
334
334
|
for (const i in e.attributes)
|
|
335
335
|
e.attributes[i].needsUpdate = !0;
|
|
336
336
|
}
|
|
337
|
-
class
|
|
337
|
+
class Ko {
|
|
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
|
}
|
|
@@ -347,7 +347,7 @@ class Xo {
|
|
|
347
347
|
}
|
|
348
348
|
_getMeshes() {
|
|
349
349
|
const e = [];
|
|
350
|
-
return
|
|
350
|
+
return Yo(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 Xo {
|
|
|
360
360
|
const c = t[a], u = c.uuid;
|
|
361
361
|
i.delete(u);
|
|
362
362
|
let f = e.get(u);
|
|
363
|
-
(!f || !f.isCompatible(c, this.attributes)) && (f && f.dispose(), f = new
|
|
363
|
+
(!f || !f.isCompatible(c, this.attributes)) && (f && f.dispose(), f = new Qo(), e.set(u, f)), f.updateFrom(c, s) && this.generateMissingAttributes && Vo(f, this.attributes);
|
|
364
364
|
}
|
|
365
365
|
i.forEach((a) => {
|
|
366
366
|
e.delete(a);
|
|
@@ -380,19 +380,19 @@ class Xo {
|
|
|
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
|
+
Xo(u, e, { useGroups: t, forceUpdate: d, skipAssigningAttributes: c, overwriteIndex: i }), d && e.dispose(), a.set(e, u.map((l) => ({
|
|
384
384
|
version: l.version,
|
|
385
385
|
uuid: l.uuid
|
|
386
386
|
})));
|
|
387
387
|
let r = Ms;
|
|
388
388
|
return d ? r = vn : c.includes(!1) && (r = gn), {
|
|
389
389
|
changeType: r,
|
|
390
|
-
materials:
|
|
390
|
+
materials: Zo(n),
|
|
391
391
|
geometry: e
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function Jo(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 Ko(o) {
|
|
|
403
403
|
}
|
|
404
404
|
return Array.from(e);
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function $o(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 Jo(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 ea {
|
|
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 Ko(e), this._bvhWorker = null, this._pendingGenerate = null, this._buildAsync = !1;
|
|
421
421
|
}
|
|
422
422
|
setObjects(e) {
|
|
423
423
|
this.staticGeometryGenerator.setObjects(e);
|
|
@@ -443,8 +443,8 @@ class $o {
|
|
|
443
443
|
l.isSkinnedMesh && l.skeleton && l.skeleton.update();
|
|
444
444
|
});
|
|
445
445
|
});
|
|
446
|
-
const n = t.generate(i), c = n.materials, u =
|
|
447
|
-
if (n.changeType !== Ms &&
|
|
446
|
+
const n = t.generate(i), c = n.materials, u = Jo(c), { lights: f, iesTextures: d } = $o(a);
|
|
447
|
+
if (n.changeType !== Ms && Wo(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 === vn) {
|
|
@@ -455,7 +455,7 @@ class $o {
|
|
|
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 Eo(i, r);
|
|
459
459
|
} else
|
|
460
460
|
n.changeType === gn && this.bvh.refit();
|
|
461
461
|
}
|
|
@@ -499,7 +499,7 @@ class js extends kt {
|
|
|
499
499
|
return !1;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
class
|
|
502
|
+
class ta extends js {
|
|
503
503
|
constructor(e) {
|
|
504
504
|
super({
|
|
505
505
|
blending: ri,
|
|
@@ -645,7 +645,7 @@ const _n = (
|
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
`
|
|
648
|
-
),
|
|
648
|
+
), ia = (
|
|
649
649
|
/* glsl */
|
|
650
650
|
`
|
|
651
651
|
|
|
@@ -726,7 +726,7 @@ const _n = (
|
|
|
726
726
|
}
|
|
727
727
|
|
|
728
728
|
`
|
|
729
|
-
),
|
|
729
|
+
), sa = (
|
|
730
730
|
/* glsl */
|
|
731
731
|
`
|
|
732
732
|
|
|
@@ -773,7 +773,7 @@ const _n = (
|
|
|
773
773
|
|
|
774
774
|
`
|
|
775
775
|
);
|
|
776
|
-
class
|
|
776
|
+
class ra extends js {
|
|
777
777
|
constructor() {
|
|
778
778
|
super({
|
|
779
779
|
blending: ri,
|
|
@@ -798,7 +798,7 @@ class sa extends js {
|
|
|
798
798
|
`
|
|
799
799
|
|
|
800
800
|
${_n}
|
|
801
|
-
${
|
|
801
|
+
${ia}
|
|
802
802
|
|
|
803
803
|
varying vec2 vUv;
|
|
804
804
|
uniform vec2 resolution;
|
|
@@ -813,7 +813,7 @@ class sa extends js {
|
|
|
813
813
|
});
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
|
-
class
|
|
816
|
+
class na {
|
|
817
817
|
generate(e, t = 256) {
|
|
818
818
|
const i = new Be(t, t, {
|
|
819
819
|
type: pe,
|
|
@@ -823,11 +823,11 @@ class ra {
|
|
|
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 ra());
|
|
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 oa extends Gi {
|
|
831
831
|
set bokehSize(e) {
|
|
832
832
|
this.fStop = this.getFocalLength() / e;
|
|
833
833
|
}
|
|
@@ -841,12 +841,12 @@ class na extends Gi {
|
|
|
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 aa {
|
|
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 oa ? (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 is(o) {
|
|
@@ -863,10 +863,10 @@ function _r(o, e, t = 0, i = o.length) {
|
|
|
863
863
|
}
|
|
864
864
|
return s - t;
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function la(o, e, t) {
|
|
867
867
|
return 0.2126 * o + 0.7152 * e + 0.0722 * t;
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function ca(o, e = Se) {
|
|
870
870
|
const t = o.clone();
|
|
871
871
|
t.source = new jn({ ...t.image });
|
|
872
872
|
const { width: i, height: s, data: a } = t.image;
|
|
@@ -893,7 +893,7 @@ function la(o, e = Se) {
|
|
|
893
893
|
}
|
|
894
894
|
return t;
|
|
895
895
|
}
|
|
896
|
-
class
|
|
896
|
+
class ua {
|
|
897
897
|
constructor() {
|
|
898
898
|
const e = new Oe(is(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 ca {
|
|
|
906
906
|
this.marginalWeights.dispose(), this.conditionalWeights.dispose(), this.map.dispose();
|
|
907
907
|
}
|
|
908
908
|
updateFrom(e) {
|
|
909
|
-
const t =
|
|
909
|
+
const t = ca(e);
|
|
910
910
|
t.wrapS = et, t.wrapT = He;
|
|
911
911
|
const { width: i, height: s, data: a } = t.image, n = new Float32Array(i * s), c = new Float32Array(i * s), u = 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 = ke.fromHalfFloat(a[4 * y + 0]), w = ke.fromHalfFloat(a[4 * y + 1]), A = ke.fromHalfFloat(a[4 * y + 2]), S =
|
|
916
|
+
const y = p * i + _, x = ke.fromHalfFloat(a[4 * y + 0]), w = ke.fromHalfFloat(a[4 * y + 1]), A = ke.fromHalfFloat(a[4 * y + 2]), S = la(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 ca {
|
|
|
939
939
|
m.image = { width: s, height: 1, data: l }, m.needsUpdate = !0, v.image = { width: i, height: s, data: h }, v.needsUpdate = !0, this.totalSum = d, this.map = t;
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
|
-
const ss = 6,
|
|
943
|
-
class
|
|
942
|
+
const ss = 6, ha = 0, fa = 1, da = 2, pa = 3, ma = 4, we = new b(), ne = new b(), yr = new J(), ft = new hn(), xr = new b(), dt = new b(), ga = new b(0, 1, 0);
|
|
943
|
+
class va {
|
|
944
944
|
constructor() {
|
|
945
945
|
const e = new Oe(new Float32Array(4), 1, 1);
|
|
946
946
|
e.format = te, e.type = pe, e.wrapS = He, e.wrapT = He, e.generateMipmaps = !1, e.minFilter = ee, e.magFilter = ee, this.tex = e, this.count = 0;
|
|
@@ -955,12 +955,12 @@ class ga {
|
|
|
955
955
|
for (let m = 0; m < ss * 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 h =
|
|
959
|
-
if (d.isRectAreaLight && d.isCircular ? h =
|
|
958
|
+
let h = ha;
|
|
959
|
+
if (d.isRectAreaLight && d.isCircular ? h = fa : d.isSpotLight ? h = da : d.isDirectionalLight ? h = pa : d.isPointLight && (h = ma), n[r + l++] = h, 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(ft), d.isRectAreaLight)
|
|
960
960
|
we.set(d.width, 0, 0).applyQuaternion(ft), n[r + l++] = we.x, n[r + l++] = we.y, n[r + l++] = we.z, l++, ne.set(0, d.height, 0).applyQuaternion(ft), 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
|
-
xr.setFromMatrixPosition(d.matrixWorld), dt.setFromMatrixPosition(d.target.matrixWorld), yr.lookAt(xr, dt,
|
|
963
|
+
xr.setFromMatrixPosition(d.matrixWorld), dt.setFromMatrixPosition(d.target.matrixWorld), yr.lookAt(xr, dt, ga), ft.setFromRotationMatrix(yr), we.set(1, 0, 0).applyQuaternion(ft), n[r + l++] = we.x, n[r + l++] = we.y, n[r + l++] = we.z, l++, ne.set(0, 1, 0).applyQuaternion(ft), 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 wr(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 _a extends Qn {
|
|
1001
1001
|
constructor() {
|
|
1002
1002
|
super(), this._textures = [], this.type = pe, this.format = te, this.internalFormat = "RGBA32F";
|
|
1003
1003
|
}
|
|
@@ -1018,7 +1018,7 @@ class va extends Qn {
|
|
|
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 Lo();
|
|
1022
1022
|
s.push(r);
|
|
1023
1023
|
}
|
|
1024
1024
|
for (; s.length > i; )
|
|
@@ -1036,7 +1036,7 @@ class va extends Qn {
|
|
|
1036
1036
|
this.dispose(), this.needsUpdate = !0;
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
class
|
|
1039
|
+
class ya extends _a {
|
|
1040
1040
|
updateNormalAttribute(e) {
|
|
1041
1041
|
this.updateAttribute(0, e);
|
|
1042
1042
|
}
|
|
@@ -1059,7 +1059,7 @@ function Qs(o, e) {
|
|
|
1059
1059
|
function Cs(o) {
|
|
1060
1060
|
return `${o.source.uuid}:${o.colorSpace}`;
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function xa(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 = Cs(a);
|
|
@@ -1067,11 +1067,11 @@ function ya(o) {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
return t;
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function wa(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(Qs);
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function ba(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 wa(o) {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
const t = Array.from(e);
|
|
1084
|
-
return
|
|
1084
|
+
return xa(t).sort(Qs);
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function Aa(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(Qs);
|
|
1091
1091
|
}
|
|
1092
1092
|
const yn = 45, br = yn * 4;
|
|
1093
|
-
class
|
|
1093
|
+
class Ta {
|
|
1094
1094
|
constructor() {
|
|
1095
1095
|
this._features = {};
|
|
1096
1096
|
}
|
|
@@ -1104,9 +1104,9 @@ class Aa {
|
|
|
1104
1104
|
this._features = {};
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
|
-
class
|
|
1107
|
+
class Sa extends Oe {
|
|
1108
1108
|
constructor() {
|
|
1109
|
-
super(new Float32Array(4), 1, 1), this.format = te, this.type = pe, this.wrapS = He, this.wrapT = He, 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 = He, this.wrapT = He, this.minFilter = ee, this.magFilter = ee, this.generateMipmaps = !1, this.features = new Ta();
|
|
1110
1110
|
}
|
|
1111
1111
|
updateFrom(e, t) {
|
|
1112
1112
|
function i(m, v, p = -1) {
|
|
@@ -1170,10 +1170,10 @@ class Ta extends Oe {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
1172
|
const Ar = new K();
|
|
1173
|
-
function
|
|
1173
|
+
function Ma(o) {
|
|
1174
1174
|
return o ? `${o.uuid}:${o.version}` : null;
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function Ca(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 Tr extends Yn {
|
|
|
1189
1189
|
generateMipmaps: !1,
|
|
1190
1190
|
...i
|
|
1191
1191
|
};
|
|
1192
|
-
super(e, t, 1, s),
|
|
1192
|
+
super(e, t, 1, s), Ca(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 Ia());
|
|
1196
1196
|
this.fsQuad = a;
|
|
1197
1197
|
}
|
|
1198
1198
|
setTextures(e, t, i = this.width, s = this.height) {
|
|
@@ -1203,7 +1203,7 @@ class Tr extends Yn {
|
|
|
1203
1203
|
const f = this.fsQuad, d = this.hashes;
|
|
1204
1204
|
let r = !1;
|
|
1205
1205
|
for (let l = 0, h = u; l < h; l++) {
|
|
1206
|
-
const m = t[l], v =
|
|
1206
|
+
const m = t[l], v = Ma(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(Ar, c), e.setRenderTarget(a), e.toneMapping = n, r;
|
|
@@ -1212,7 +1212,7 @@ class Tr extends Yn {
|
|
|
1212
1212
|
super.dispose(), this.fsQuad.dispose();
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
|
-
class
|
|
1215
|
+
class Ia extends kt {
|
|
1216
1216
|
get map() {
|
|
1217
1217
|
return this.uniforms.map.value;
|
|
1218
1218
|
}
|
|
@@ -1251,14 +1251,14 @@ class Ca extends kt {
|
|
|
1251
1251
|
});
|
|
1252
1252
|
}
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function Ra(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 Pa {
|
|
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 Ra {
|
|
|
1272
1272
|
n = 0;
|
|
1273
1273
|
}, this.next = function() {
|
|
1274
1274
|
const { samples: c } = this;
|
|
1275
|
-
n >= a.length && (
|
|
1275
|
+
n >= a.length && (Ra(a, i), this.reshuffle());
|
|
1276
1276
|
let u = a[n++];
|
|
1277
1277
|
for (let f = 0; f < t; f++)
|
|
1278
1278
|
c[f] = (u % e + i()) / e, u = Math.floor(u / e);
|
|
@@ -1288,7 +1288,7 @@ class Da {
|
|
|
1288
1288
|
const a = new Float32Array(s), n = [];
|
|
1289
1289
|
let c = 0;
|
|
1290
1290
|
for (const u of t) {
|
|
1291
|
-
const f = new
|
|
1291
|
+
const f = new Pa(e, u, 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 Da {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
class
|
|
1307
|
+
class Ea {
|
|
1308
1308
|
constructor(e = 0) {
|
|
1309
1309
|
this.m = 2147483648, this.a = 1103515245, this.c = 12345, this.seed = e;
|
|
1310
1310
|
}
|
|
@@ -1315,9 +1315,9 @@ class Pa {
|
|
|
1315
1315
|
return this.nextInt() / (this.m - 1);
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
|
-
class
|
|
1318
|
+
class La extends Oe {
|
|
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 Ea(), 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;
|
|
@@ -1333,13 +1333,13 @@ class Ea extends Oe {
|
|
|
1333
1333
|
this.sampler.reset(), this.generator.seed = 0;
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function Fa(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 ka(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 Sr {
|
|
|
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 Ba {
|
|
1425
1425
|
constructor() {
|
|
1426
1426
|
this.random = Math.random, this.sigma = 1.5, this.size = 64, this.majorityPointsRatio = 0.1, this.samples = new Sr(1), this.savedSamples = new Sr(1);
|
|
1427
1427
|
}
|
|
@@ -1435,7 +1435,7 @@ class ka {
|
|
|
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
|
+
ka(c, n), Fa(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 ka {
|
|
|
1467
1467
|
return { data: u, maxValue: d };
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1470
|
+
function Oa(o) {
|
|
1471
1471
|
return o >= 3 ? 4 : o;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function za(o) {
|
|
1474
1474
|
switch (o) {
|
|
1475
1475
|
case 1:
|
|
1476
1476
|
return xs;
|
|
@@ -1480,14 +1480,14 @@ function Oa(o) {
|
|
|
1480
1480
|
return te;
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
|
-
class
|
|
1483
|
+
class Ua extends Oe {
|
|
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 Ba();
|
|
1489
1489
|
i.channels = e, i.size = t;
|
|
1490
|
-
const s =
|
|
1490
|
+
const s = Oa(e), a = za(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, u = e; c < u; c++) {
|
|
@@ -1500,7 +1500,7 @@ class za extends Oe {
|
|
|
1500
1500
|
this.needsUpdate = !0;
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
|
-
const
|
|
1503
|
+
const Ha = (
|
|
1504
1504
|
/* glsl */
|
|
1505
1505
|
`
|
|
1506
1506
|
|
|
@@ -1515,7 +1515,7 @@ const Ua = (
|
|
|
1515
1515
|
};
|
|
1516
1516
|
|
|
1517
1517
|
`
|
|
1518
|
-
),
|
|
1518
|
+
), Wa = (
|
|
1519
1519
|
/* glsl */
|
|
1520
1520
|
`
|
|
1521
1521
|
|
|
@@ -1530,7 +1530,7 @@ const Ua = (
|
|
|
1530
1530
|
};
|
|
1531
1531
|
|
|
1532
1532
|
`
|
|
1533
|
-
),
|
|
1533
|
+
), Va = (
|
|
1534
1534
|
/* glsl */
|
|
1535
1535
|
`
|
|
1536
1536
|
|
|
@@ -1619,7 +1619,7 @@ const Ua = (
|
|
|
1619
1619
|
}
|
|
1620
1620
|
|
|
1621
1621
|
`
|
|
1622
|
-
),
|
|
1622
|
+
), Na = (
|
|
1623
1623
|
/* glsl */
|
|
1624
1624
|
`
|
|
1625
1625
|
|
|
@@ -1829,7 +1829,7 @@ const Ua = (
|
|
|
1829
1829
|
}
|
|
1830
1830
|
|
|
1831
1831
|
`
|
|
1832
|
-
),
|
|
1832
|
+
), Ga = (
|
|
1833
1833
|
/* glsl */
|
|
1834
1834
|
`
|
|
1835
1835
|
|
|
@@ -1894,7 +1894,7 @@ const Ua = (
|
|
|
1894
1894
|
};
|
|
1895
1895
|
|
|
1896
1896
|
`
|
|
1897
|
-
),
|
|
1897
|
+
), qa = (
|
|
1898
1898
|
/* glsl */
|
|
1899
1899
|
`
|
|
1900
1900
|
|
|
@@ -1964,7 +1964,7 @@ const Ua = (
|
|
|
1964
1964
|
|
|
1965
1965
|
}
|
|
1966
1966
|
`
|
|
1967
|
-
),
|
|
1967
|
+
), ja = (
|
|
1968
1968
|
/* glsl */
|
|
1969
1969
|
`
|
|
1970
1970
|
|
|
@@ -2182,7 +2182,7 @@ const Ua = (
|
|
|
2182
2182
|
}
|
|
2183
2183
|
|
|
2184
2184
|
`
|
|
2185
|
-
),
|
|
2185
|
+
), Qa = (
|
|
2186
2186
|
/* glsl */
|
|
2187
2187
|
`
|
|
2188
2188
|
|
|
@@ -2270,7 +2270,7 @@ const Ua = (
|
|
|
2270
2270
|
|
|
2271
2271
|
|
|
2272
2272
|
`
|
|
2273
|
-
),
|
|
2273
|
+
), Ya = (
|
|
2274
2274
|
/* glsl */
|
|
2275
2275
|
`
|
|
2276
2276
|
|
|
@@ -2376,7 +2376,7 @@ const Ua = (
|
|
|
2376
2376
|
}
|
|
2377
2377
|
|
|
2378
2378
|
`
|
|
2379
|
-
),
|
|
2379
|
+
), Za = (
|
|
2380
2380
|
/* glsl */
|
|
2381
2381
|
`
|
|
2382
2382
|
|
|
@@ -2459,7 +2459,7 @@ const Ua = (
|
|
|
2459
2459
|
}
|
|
2460
2460
|
|
|
2461
2461
|
`
|
|
2462
|
-
),
|
|
2462
|
+
), Xa = (
|
|
2463
2463
|
/* glsl */
|
|
2464
2464
|
`
|
|
2465
2465
|
|
|
@@ -2523,7 +2523,7 @@ const Ua = (
|
|
|
2523
2523
|
}
|
|
2524
2524
|
|
|
2525
2525
|
`
|
|
2526
|
-
),
|
|
2526
|
+
), Ka = (
|
|
2527
2527
|
/*glsl */
|
|
2528
2528
|
`
|
|
2529
2529
|
|
|
@@ -2726,7 +2726,7 @@ const Ua = (
|
|
|
2726
2726
|
|
|
2727
2727
|
}
|
|
2728
2728
|
`
|
|
2729
|
-
),
|
|
2729
|
+
), Ja = (
|
|
2730
2730
|
/* glsl */
|
|
2731
2731
|
`
|
|
2732
2732
|
|
|
@@ -2778,7 +2778,7 @@ const Ua = (
|
|
|
2778
2778
|
}
|
|
2779
2779
|
|
|
2780
2780
|
`
|
|
2781
|
-
),
|
|
2781
|
+
), $a = (
|
|
2782
2782
|
/* glsl */
|
|
2783
2783
|
`
|
|
2784
2784
|
|
|
@@ -3219,7 +3219,7 @@ const Ua = (
|
|
|
3219
3219
|
}
|
|
3220
3220
|
|
|
3221
3221
|
`
|
|
3222
|
-
),
|
|
3222
|
+
), el = (
|
|
3223
3223
|
/* glsl */
|
|
3224
3224
|
`
|
|
3225
3225
|
|
|
@@ -3243,7 +3243,7 @@ const Ua = (
|
|
|
3243
3243
|
}
|
|
3244
3244
|
|
|
3245
3245
|
`
|
|
3246
|
-
),
|
|
3246
|
+
), tl = (
|
|
3247
3247
|
/* glsl */
|
|
3248
3248
|
`
|
|
3249
3249
|
|
|
@@ -3347,7 +3347,7 @@ const Ua = (
|
|
|
3347
3347
|
}
|
|
3348
3348
|
|
|
3349
3349
|
`
|
|
3350
|
-
),
|
|
3350
|
+
), il = (
|
|
3351
3351
|
/* glsl */
|
|
3352
3352
|
`
|
|
3353
3353
|
|
|
@@ -3484,7 +3484,7 @@ const Ua = (
|
|
|
3484
3484
|
}
|
|
3485
3485
|
|
|
3486
3486
|
`
|
|
3487
|
-
),
|
|
3487
|
+
), sl = (
|
|
3488
3488
|
/* glsl */
|
|
3489
3489
|
`
|
|
3490
3490
|
|
|
@@ -3584,7 +3584,7 @@ const Ua = (
|
|
|
3584
3584
|
}
|
|
3585
3585
|
|
|
3586
3586
|
`
|
|
3587
|
-
),
|
|
3587
|
+
), rl = (
|
|
3588
3588
|
/* glsl */
|
|
3589
3589
|
`
|
|
3590
3590
|
|
|
@@ -3648,7 +3648,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
3648
3648
|
}
|
|
3649
3649
|
|
|
3650
3650
|
`
|
|
3651
|
-
),
|
|
3651
|
+
), nl = (
|
|
3652
3652
|
/* glsl */
|
|
3653
3653
|
`
|
|
3654
3654
|
|
|
@@ -3828,7 +3828,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
3828
3828
|
}
|
|
3829
3829
|
|
|
3830
3830
|
`
|
|
3831
|
-
),
|
|
3831
|
+
), ol = (
|
|
3832
3832
|
/* glsl */
|
|
3833
3833
|
`
|
|
3834
3834
|
|
|
@@ -3914,7 +3914,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
3914
3914
|
}
|
|
3915
3915
|
|
|
3916
3916
|
`
|
|
3917
|
-
),
|
|
3917
|
+
), al = (
|
|
3918
3918
|
/*glsl*/
|
|
3919
3919
|
`
|
|
3920
3920
|
|
|
@@ -4013,7 +4013,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
4013
4013
|
}
|
|
4014
4014
|
|
|
4015
4015
|
`
|
|
4016
|
-
),
|
|
4016
|
+
), ll = (
|
|
4017
4017
|
/* glsl */
|
|
4018
4018
|
`
|
|
4019
4019
|
|
|
@@ -4338,7 +4338,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
4338
4338
|
|
|
4339
4339
|
}
|
|
4340
4340
|
`
|
|
4341
|
-
),
|
|
4341
|
+
), cl = (
|
|
4342
4342
|
/* glsl */
|
|
4343
4343
|
`
|
|
4344
4344
|
|
|
@@ -4390,7 +4390,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
4390
4390
|
}
|
|
4391
4391
|
|
|
4392
4392
|
`
|
|
4393
|
-
),
|
|
4393
|
+
), ul = (
|
|
4394
4394
|
/* glsl */
|
|
4395
4395
|
`
|
|
4396
4396
|
|
|
@@ -4441,7 +4441,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
4441
4441
|
|
|
4442
4442
|
`
|
|
4443
4443
|
);
|
|
4444
|
-
class
|
|
4444
|
+
class hl extends js {
|
|
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 ul extends js {
|
|
|
4477
4477
|
transmissiveBounces: { value: 10 },
|
|
4478
4478
|
filterGlossyFactor: { value: 0 },
|
|
4479
4479
|
// camera uniforms
|
|
4480
|
-
physicalCamera: { value: new
|
|
4480
|
+
physicalCamera: { value: new aa() },
|
|
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 Fo() },
|
|
4485
|
+
attributesArray: { value: new ya() },
|
|
4486
|
+
materialIndexAttribute: { value: new ko() },
|
|
4487
|
+
materials: { value: new Sa() },
|
|
4488
4488
|
textures: { value: new Tr().texture },
|
|
4489
4489
|
// light uniforms
|
|
4490
|
-
lights: { value: new
|
|
4490
|
+
lights: { value: new va() },
|
|
4491
4491
|
iesProfiles: { value: new Tr(360, 180, {
|
|
4492
4492
|
type: Se,
|
|
4493
4493
|
wrapS: He,
|
|
@@ -4495,7 +4495,7 @@ class ul extends js {
|
|
|
4495
4495
|
}).texture },
|
|
4496
4496
|
environmentIntensity: { value: 1 },
|
|
4497
4497
|
environmentRotation: { value: new J() },
|
|
4498
|
-
envMapInfo: { value: new
|
|
4498
|
+
envMapInfo: { value: new ua() },
|
|
4499
4499
|
// background uniforms
|
|
4500
4500
|
backgroundBlur: { value: 0 },
|
|
4501
4501
|
backgroundMap: { value: null },
|
|
@@ -4505,8 +4505,8 @@ class ul extends js {
|
|
|
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 La() },
|
|
4509
|
+
stratifiedOffsetTexture: { value: new Ua(64, 1) }
|
|
4510
4510
|
},
|
|
4511
4511
|
vertexShader: (
|
|
4512
4512
|
/* glsl */
|
|
@@ -4543,22 +4543,22 @@ class ul extends js {
|
|
|
4543
4543
|
${$i.bvh_ray_functions}
|
|
4544
4544
|
|
|
4545
4545
|
// uniform structs
|
|
4546
|
-
${Ua}
|
|
4547
|
-
${Wa}
|
|
4548
4546
|
${Ha}
|
|
4549
4547
|
${Va}
|
|
4548
|
+
${Wa}
|
|
4550
4549
|
${Na}
|
|
4550
|
+
${Ga}
|
|
4551
4551
|
|
|
4552
4552
|
// random
|
|
4553
4553
|
#if RANDOM_TYPE == 2 // Stratified List
|
|
4554
4554
|
|
|
4555
|
-
${
|
|
4555
|
+
${Ja}
|
|
4556
4556
|
|
|
4557
4557
|
#elif RANDOM_TYPE == 1 // Sobol
|
|
4558
4558
|
|
|
4559
4559
|
${Mr}
|
|
4560
4560
|
${_n}
|
|
4561
|
-
${
|
|
4561
|
+
${sa}
|
|
4562
4562
|
|
|
4563
4563
|
#define rand(v) sobol(v)
|
|
4564
4564
|
#define rand2(v) sobol2(v)
|
|
@@ -4583,11 +4583,11 @@ class ul extends js {
|
|
|
4583
4583
|
#endif
|
|
4584
4584
|
|
|
4585
4585
|
// common
|
|
4586
|
-
${
|
|
4587
|
-
${Qa}
|
|
4588
|
-
${xn}
|
|
4586
|
+
${Ka}
|
|
4589
4587
|
${Ya}
|
|
4588
|
+
${xn}
|
|
4590
4589
|
${Za}
|
|
4590
|
+
${Xa}
|
|
4591
4591
|
|
|
4592
4592
|
// environment
|
|
4593
4593
|
uniform EquirectHdrInfo envMapInfo;
|
|
@@ -4643,16 +4643,16 @@ class ul extends js {
|
|
|
4643
4643
|
float lightsDenom;
|
|
4644
4644
|
|
|
4645
4645
|
// sampling
|
|
4646
|
-
${
|
|
4647
|
-
${Ga}
|
|
4646
|
+
${Qa}
|
|
4648
4647
|
${qa}
|
|
4648
|
+
${ja}
|
|
4649
4649
|
|
|
4650
|
+
${rl}
|
|
4651
|
+
${tl}
|
|
4650
4652
|
${sl}
|
|
4651
|
-
${el}
|
|
4652
4653
|
${il}
|
|
4653
|
-
${
|
|
4654
|
+
${el}
|
|
4654
4655
|
${$a}
|
|
4655
|
-
${Ja}
|
|
4656
4656
|
|
|
4657
4657
|
float applyFilteredGlossy( float roughness, float accumulatedRoughness ) {
|
|
4658
4658
|
|
|
@@ -4684,12 +4684,12 @@ class ul extends js {
|
|
|
4684
4684
|
|
|
4685
4685
|
}
|
|
4686
4686
|
|
|
4687
|
-
${ll}
|
|
4688
|
-
${nl}
|
|
4689
4687
|
${cl}
|
|
4690
|
-
${rl}
|
|
4691
4688
|
${ol}
|
|
4689
|
+
${ul}
|
|
4690
|
+
${nl}
|
|
4692
4691
|
${al}
|
|
4692
|
+
${ll}
|
|
4693
4693
|
|
|
4694
4694
|
void main() {
|
|
4695
4695
|
|
|
@@ -4986,7 +4986,7 @@ class ul extends js {
|
|
|
4986
4986
|
}), this.setValues(e);
|
|
4987
4987
|
}
|
|
4988
4988
|
}
|
|
4989
|
-
function*
|
|
4989
|
+
function* fl() {
|
|
4990
4990
|
const {
|
|
4991
4991
|
_renderer: o,
|
|
4992
4992
|
_fsQuad: e,
|
|
@@ -5003,28 +5003,28 @@ function* hl() {
|
|
|
5003
5003
|
c ? (r.opacity = this._opacityFactor / (this.samples + 1), u.blending = ri, u.opacity = 1) : (u.opacity = this._opacityFactor / (this.samples + 1), u.blending = dn);
|
|
5004
5004
|
const [m, v, p, g] = n, _ = i.width, y = i.height;
|
|
5005
5005
|
u.resolution.set(_ * p, y * g), u.sobolTexture = a.texture, u.stratifiedTexture.init(20, u.bounces + u.transmissiveBounces + 5), u.stratifiedTexture.next(), u.seed++;
|
|
5006
|
-
const x = this.tiles.x || 1, w = this.tiles.y || 1, A = x * w, S = Math.ceil(_ * p), C = Math.ceil(y * g), M = Math.floor(m * _), R = Math.floor(v * y),
|
|
5006
|
+
const x = this.tiles.x || 1, w = this.tiles.y || 1, A = x * w, S = Math.ceil(_ * p), C = Math.ceil(y * g), M = Math.floor(m * _), R = Math.floor(v * y), P = Math.ceil(S / x), T = Math.ceil(C / w);
|
|
5007
5007
|
for (let I = 0; I < w; I++)
|
|
5008
|
-
for (let
|
|
5008
|
+
for (let D = 0; D < x; D++) {
|
|
5009
5009
|
const L = o.getRenderTarget(), F = o.autoClear, U = o.getScissorTest();
|
|
5010
5010
|
o.getScissor(f), o.getViewport(d);
|
|
5011
|
-
let G =
|
|
5011
|
+
let G = D, Q = I;
|
|
5012
5012
|
if (!this.stableTiles) {
|
|
5013
5013
|
const se = this._currentTile % (x * w);
|
|
5014
5014
|
G = se % x, Q = ~~(se / x), this._currentTile = se + 1;
|
|
5015
5015
|
}
|
|
5016
5016
|
const ie = w - Q - 1;
|
|
5017
5017
|
i.scissor.set(
|
|
5018
|
-
M + G *
|
|
5018
|
+
M + G * P,
|
|
5019
5019
|
R + ie * T,
|
|
5020
|
-
Math.min(
|
|
5020
|
+
Math.min(P, S - G * P),
|
|
5021
5021
|
Math.min(T, C - ie * T)
|
|
5022
5022
|
), i.viewport.set(
|
|
5023
5023
|
M,
|
|
5024
5024
|
R,
|
|
5025
5025
|
S,
|
|
5026
5026
|
C
|
|
5027
|
-
), o.setRenderTarget(i), o.setScissorTest(!0), o.autoClear = !1, e.render(o), o.setViewport(d), o.setScissor(f), o.setScissorTest(U), o.setRenderTarget(L), o.autoClear = F, c && (r.target1 = l.texture, r.target2 = i.texture, o.setRenderTarget(h), t.render(o), o.setRenderTarget(L)), this.samples += 1 / A,
|
|
5027
|
+
), o.setRenderTarget(i), o.setScissorTest(!0), o.autoClear = !1, e.render(o), o.setViewport(d), o.setScissor(f), o.setScissorTest(U), o.setRenderTarget(L), o.autoClear = F, c && (r.target1 = l.texture, r.target2 = i.texture, o.setRenderTarget(h), t.render(o), o.setRenderTarget(L)), this.samples += 1 / A, D === x - 1 && I === w - 1 && (this.samples = Math.round(this.samples)), yield;
|
|
5028
5028
|
}
|
|
5029
5029
|
[l, h] = [h, l];
|
|
5030
5030
|
}
|
|
@@ -5050,7 +5050,7 @@ class Ir {
|
|
|
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 hl()), this._blendQuad = new Et(new ta()), this._task = null, this._currentTile = 0, this._compilePromise = null, this._sobolTarget = new na().generate(e), this._primaryTarget = new Be(1, 1, {
|
|
5054
5054
|
format: te,
|
|
5055
5055
|
type: pe,
|
|
5056
5056
|
magFilter: ee,
|
|
@@ -5098,11 +5098,11 @@ class Ir {
|
|
|
5098
5098
|
e.getClearColor(Cr), 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(Cr, 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 = fl.call(this)), this._task.next());
|
|
5102
5102
|
}
|
|
5103
5103
|
}
|
|
5104
5104
|
const at = new z(), Rr = new z(), pi = new Kn(), mi = new K();
|
|
5105
|
-
class
|
|
5105
|
+
class dl extends Oe {
|
|
5106
5106
|
constructor(e = 512, t = 512) {
|
|
5107
5107
|
super(
|
|
5108
5108
|
new Float32Array(e * t * 4),
|
|
@@ -5131,12 +5131,12 @@ class fl extends Oe {
|
|
|
5131
5131
|
return super.copy(e), this.generationCallback = e.generationCallback, this;
|
|
5132
5132
|
}
|
|
5133
5133
|
}
|
|
5134
|
-
const
|
|
5135
|
-
class
|
|
5134
|
+
const Pr = new b();
|
|
5135
|
+
class pl extends dl {
|
|
5136
5136
|
constructor(e = 512) {
|
|
5137
5137
|
super(e, e), this.topColor = new K().set(16777215), this.bottomColor = new K().set(0), this.exponent = 2, this.generationCallback = (t, i, s, a) => {
|
|
5138
|
-
|
|
5139
|
-
const n =
|
|
5138
|
+
Pr.setFromSpherical(t);
|
|
5139
|
+
const n = Pr.y * 0.5 + 0.5;
|
|
5140
5140
|
a.lerpColors(this.bottomColor, this.topColor, n ** this.exponent);
|
|
5141
5141
|
};
|
|
5142
5142
|
}
|
|
@@ -5144,7 +5144,7 @@ class dl extends fl {
|
|
|
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 ml extends kt {
|
|
5148
5148
|
get map() {
|
|
5149
5149
|
return this.uniforms.map.value;
|
|
5150
5150
|
}
|
|
@@ -5231,7 +5231,7 @@ class pl extends kt {
|
|
|
5231
5231
|
}), this.setValues(e);
|
|
5232
5232
|
}
|
|
5233
5233
|
}
|
|
5234
|
-
class
|
|
5234
|
+
class gl extends kt {
|
|
5235
5235
|
constructor() {
|
|
5236
5236
|
super({
|
|
5237
5237
|
uniforms: {
|
|
@@ -5274,9 +5274,9 @@ class ml extends kt {
|
|
|
5274
5274
|
}), this.depthWrite = !1, this.depthTest = !1;
|
|
5275
5275
|
}
|
|
5276
5276
|
}
|
|
5277
|
-
class
|
|
5277
|
+
class Dr {
|
|
5278
5278
|
constructor(e) {
|
|
5279
|
-
this._renderer = e, this._quad = new Et(new
|
|
5279
|
+
this._renderer = e, this._quad = new Et(new gl());
|
|
5280
5280
|
}
|
|
5281
5281
|
generate(e, t = null, i = null) {
|
|
5282
5282
|
if (!e.isCubeTexture)
|
|
@@ -5301,11 +5301,11 @@ class Pr {
|
|
|
5301
5301
|
this._quad.dispose();
|
|
5302
5302
|
}
|
|
5303
5303
|
}
|
|
5304
|
-
function
|
|
5304
|
+
function vl(o) {
|
|
5305
5305
|
return o.extensions.get("EXT_float_blend");
|
|
5306
5306
|
}
|
|
5307
5307
|
const pt = new z();
|
|
5308
|
-
class
|
|
5308
|
+
class _l {
|
|
5309
5309
|
get multipleImportanceSampling() {
|
|
5310
5310
|
return !!this._pathTracer.material.defines.FEATURE_MIS;
|
|
5311
5311
|
}
|
|
@@ -5349,7 +5349,7 @@ class vl {
|
|
|
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 ea(), this._pathTracer = new Ir(e), this._queueReset = !1, this._clock = new qi(), this._compilePromise = null, this._lowResPathTracer = new Ir(e), this._lowResPathTracer.tiles.set(1, 1), this._quad = new Et(new ml({
|
|
5353
5353
|
map: null,
|
|
5354
5354
|
transparent: !0,
|
|
5355
5355
|
blending: ri,
|
|
@@ -5387,11 +5387,11 @@ class vl {
|
|
|
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 = ba(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 = Aa(e), a = wa(s);
|
|
5395
5395
|
i.lights.updateFrom(s, a), i.iesProfiles.setTextures(t, a), this.reset();
|
|
5396
5396
|
}
|
|
5397
5397
|
updateEnvironment() {
|
|
@@ -5399,12 +5399,12 @@ class vl {
|
|
|
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 pl(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) {
|
|
5406
5406
|
if (e.background !== this._previousBackground) {
|
|
5407
|
-
const i = new
|
|
5407
|
+
const i = new Dr(this._renderer).generate(e.background);
|
|
5408
5408
|
this._internalBackground = i, t.backgroundMap = i, t.backgroundAlpha = 1;
|
|
5409
5409
|
}
|
|
5410
5410
|
} else
|
|
@@ -5412,7 +5412,7 @@ class vl {
|
|
|
5412
5412
|
if (t.environmentIntensity = e.environmentIntensity ?? 1, t.environmentRotation.makeRotationFromEuler(e.environmentRotation).invert(), this._previousEnvironment !== e.environment)
|
|
5413
5413
|
if (e.environment !== null)
|
|
5414
5414
|
if (e.environment.isCubeTexture) {
|
|
5415
|
-
const i = new
|
|
5415
|
+
const i = new Dr(this._renderer).generate(e.environment);
|
|
5416
5416
|
t.envMapInfo.updateFrom(i);
|
|
5417
5417
|
} else
|
|
5418
5418
|
t.envMapInfo.updateFrom(e.environment);
|
|
@@ -5440,7 +5440,7 @@ class vl {
|
|
|
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 || !vl(i), e.alpha = t.alpha, this.renderToCanvas) {
|
|
5444
5444
|
const u = 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 vl {
|
|
|
5470
5470
|
}
|
|
5471
5471
|
}
|
|
5472
5472
|
}
|
|
5473
|
-
const
|
|
5474
|
-
globalThis.GLTF_PROGRESSIVE_VERSION =
|
|
5473
|
+
const yl = "";
|
|
5474
|
+
globalThis.GLTF_PROGRESSIVE_VERSION = yl;
|
|
5475
5475
|
console.debug("[gltf-progressive] version -");
|
|
5476
5476
|
let Me = "https://www.gstatic.com/draco/versioned/decoders/1.5.7/", Qi = "https://cdn.needle.tools/static/three/0.179.1/basis2/";
|
|
5477
|
-
const
|
|
5477
|
+
const xl = Me, wl = Qi, wn = new URL(Me + "draco_decoder.js");
|
|
5478
5478
|
wn.searchParams.append("range", "true");
|
|
5479
5479
|
fetch(wn, {
|
|
5480
5480
|
method: "GET",
|
|
@@ -5482,18 +5482,18 @@ fetch(wn, {
|
|
|
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 === xl && Al("./include/draco/"), Qi === wl && Tl("./include/ktx2/");
|
|
5486
5486
|
}).finally(() => {
|
|
5487
5487
|
An();
|
|
5488
5488
|
});
|
|
5489
|
-
const
|
|
5489
|
+
const bl = () => ({
|
|
5490
5490
|
dracoDecoderPath: Me,
|
|
5491
5491
|
ktx2TranscoderPath: Qi
|
|
5492
5492
|
});
|
|
5493
|
-
function
|
|
5493
|
+
function Al(o) {
|
|
5494
5494
|
Me = o, he && he[Is] != Me ? (console.debug("Updating Draco decoder path to " + o), he[Is] = Me, he.setDecoderPath(Me), he.preload()) : console.debug("Setting Draco decoder path to " + o);
|
|
5495
5495
|
}
|
|
5496
|
-
function
|
|
5496
|
+
function Tl(o) {
|
|
5497
5497
|
Qi = o;
|
|
5498
5498
|
}
|
|
5499
5499
|
function Ys(o) {
|
|
@@ -5505,7 +5505,7 @@ function bn(o) {
|
|
|
5505
5505
|
const Is = Symbol("dracoDecoderPath");
|
|
5506
5506
|
let he, zi;
|
|
5507
5507
|
function An() {
|
|
5508
|
-
he || (he = new
|
|
5508
|
+
he || (he = new Ao(), he[Is] = Me, he.setDecoderPath(Me), he.setDecoderConfig({ type: "js" }), he.preload()), zi || (zi = bo);
|
|
5509
5509
|
}
|
|
5510
5510
|
const Rs = /* @__PURE__ */ new WeakMap();
|
|
5511
5511
|
function Tn(o, e) {
|
|
@@ -5513,7 +5513,7 @@ function Tn(o, e) {
|
|
|
5513
5513
|
t ? t = Object.assign(t, e) : t = e, Rs.set(o, t);
|
|
5514
5514
|
}
|
|
5515
5515
|
const rs = Gs.prototype.load;
|
|
5516
|
-
function
|
|
5516
|
+
function Sl(...o) {
|
|
5517
5517
|
const e = Rs.get(this);
|
|
5518
5518
|
let t = o[0];
|
|
5519
5519
|
const i = new URL(t, window.location.href);
|
|
@@ -5523,7 +5523,7 @@ function Tl(...o) {
|
|
|
5523
5523
|
}
|
|
5524
5524
|
return o[0] = t, rs == null ? void 0 : rs.call(this, ...o);
|
|
5525
5525
|
}
|
|
5526
|
-
Gs.prototype.load =
|
|
5526
|
+
Gs.prototype.load = Sl;
|
|
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 Ml(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 Cl {
|
|
5557
5557
|
constructor(e = 100, t = {}) {
|
|
5558
5558
|
E(this, "_running", /* @__PURE__ */ new Map());
|
|
5559
5559
|
E(this, "_queue", []);
|
|
@@ -5587,17 +5587,17 @@ class Ml {
|
|
|
5587
5587
|
}
|
|
5588
5588
|
}
|
|
5589
5589
|
}
|
|
5590
|
-
const
|
|
5590
|
+
const Il = typeof window > "u" && typeof document > "u", Ps = Symbol("needle:raycast-mesh");
|
|
5591
5591
|
function ai(o) {
|
|
5592
|
-
return (o == null ? void 0 : o[
|
|
5592
|
+
return (o == null ? void 0 : o[Ps]) instanceof le ? o[Ps] : null;
|
|
5593
5593
|
}
|
|
5594
|
-
function
|
|
5594
|
+
function Rl(o, e) {
|
|
5595
5595
|
if ((o.type === "Mesh" || o.type === "SkinnedMesh") && !ai(o)) {
|
|
5596
5596
|
const i = Dl(e);
|
|
5597
|
-
i.userData = { isRaycastMesh: !0 }, o[
|
|
5597
|
+
i.userData = { isRaycastMesh: !0 }, o[Ps] = i;
|
|
5598
5598
|
}
|
|
5599
5599
|
}
|
|
5600
|
-
function
|
|
5600
|
+
function Pl(o = !0) {
|
|
5601
5601
|
if (o) {
|
|
5602
5602
|
if (Ht)
|
|
5603
5603
|
return;
|
|
@@ -5641,16 +5641,16 @@ function Mn(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 El = 0;
|
|
5645
|
+
const Ll = Sn() ? 2 : 10;
|
|
5646
|
+
function Fl(o) {
|
|
5647
|
+
if (Wt.length < Ll) {
|
|
5648
5648
|
const i = Wt.length;
|
|
5649
5649
|
O && console.warn(`[Worker] Creating new worker #${i}`);
|
|
5650
5650
|
const s = Zs.createWorker(o || {});
|
|
5651
5651
|
return Wt.push(s), s;
|
|
5652
5652
|
}
|
|
5653
|
-
const e =
|
|
5653
|
+
const e = El++ % Wt.length;
|
|
5654
5654
|
return Wt[e];
|
|
5655
5655
|
}
|
|
5656
5656
|
class Zs {
|
|
@@ -5664,7 +5664,7 @@ class Zs {
|
|
|
5664
5664
|
case "loaded-gltf":
|
|
5665
5665
|
for (const a of this._running)
|
|
5666
5666
|
if (a.url === s.result.url) {
|
|
5667
|
-
|
|
5667
|
+
kl(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 Zs {
|
|
|
5682
5682
|
return new Zs(t, e);
|
|
5683
5683
|
}
|
|
5684
5684
|
async load(e, t) {
|
|
5685
|
-
const i =
|
|
5685
|
+
const i = bl();
|
|
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 Zs {
|
|
|
5705
5705
|
});
|
|
5706
5706
|
}
|
|
5707
5707
|
}
|
|
5708
|
-
function
|
|
5708
|
+
function kl(o) {
|
|
5709
5709
|
var e, t, i, s, a, n, c, u, f, d, r, l, h, m, v, p;
|
|
5710
5710
|
for (const g of o.geometries) {
|
|
5711
5711
|
const _ = g.geometry, y = new le();
|
|
@@ -5791,7 +5791,7 @@ function ns(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 Bl = ut("gltf-progressive-worker"), Ol = ut("gltf-progressive-reduce-mipmaps"), os = Symbol("needle-progressive-texture"), Ee = "NEEDLE_progressive", B = class B {
|
|
5795
5795
|
constructor(e) {
|
|
5796
5796
|
E(this, "parser");
|
|
5797
5797
|
E(this, "url");
|
|
@@ -6002,7 +6002,7 @@ const kl = ut("gltf-progressive-worker"), Bl = 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, u, a), null;
|
|
6004
6004
|
}
|
|
6005
|
-
if (
|
|
6005
|
+
if (Ol && 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 kl = ut("gltf-progressive-worker"), Bl = ut("gltf-progressive-reduce-mipma
|
|
|
6087
6087
|
const l = Array.isArray(n.lods) ? (u = n.lods[t]) == null ? void 0 : u.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 h =
|
|
6090
|
+
const h = Ml(s.url, l);
|
|
6091
6091
|
if (h.endsWith(".glb") || h.endsWith(".gltf")) {
|
|
6092
6092
|
if (!n.guid)
|
|
6093
6093
|
return console.warn("missing pointer for glb/gltf texture", n), null;
|
|
@@ -6102,79 +6102,79 @@ const kl = ut("gltf-progressive-worker"), Bl = ut("gltf-progressive-reduce-mipma
|
|
|
6102
6102
|
if (!v.use)
|
|
6103
6103
|
return O && console.log(`LOD ${t} was aborted: ${h}`), null;
|
|
6104
6104
|
const g = n, _ = new Promise(async (x, w) => {
|
|
6105
|
-
if (
|
|
6106
|
-
const T = await (await
|
|
6105
|
+
if (Bl) {
|
|
6106
|
+
const T = await (await Fl({})).load(h);
|
|
6107
6107
|
if (T.textures.length > 0)
|
|
6108
6108
|
for (const I of T.textures) {
|
|
6109
|
-
let
|
|
6110
|
-
return B.assignLODInformation(s.url,
|
|
6109
|
+
let D = I.texture;
|
|
6110
|
+
return B.assignLODInformation(s.url, D, a, t, void 0), e instanceof Qe && (D = this.copySettings(e, D)), D && (D.guid = g.guid), x(D);
|
|
6111
6111
|
}
|
|
6112
6112
|
if (T.geometries.length > 0) {
|
|
6113
6113
|
const I = new Array();
|
|
6114
|
-
for (const
|
|
6115
|
-
const L =
|
|
6116
|
-
B.assignLODInformation(s.url, L, a, t,
|
|
6114
|
+
for (const D of T.geometries) {
|
|
6115
|
+
const L = D.geometry;
|
|
6116
|
+
B.assignLODInformation(s.url, L, a, t, D.primitiveIndex), I.push(L);
|
|
6117
6117
|
}
|
|
6118
6118
|
return x(I);
|
|
6119
6119
|
}
|
|
6120
6120
|
return x(null);
|
|
6121
6121
|
}
|
|
6122
6122
|
const A = new Gs();
|
|
6123
|
-
bn(A), O && (await new Promise((
|
|
6123
|
+
bn(A), O && (await new Promise((P) => setTimeout(P, 1e3)), i && console.warn("Start loading (delayed) " + h, g.guid));
|
|
6124
6124
|
let S = h;
|
|
6125
6125
|
if (g && Array.isArray(g.lods)) {
|
|
6126
|
-
const
|
|
6127
|
-
|
|
6126
|
+
const P = g.lods[t];
|
|
6127
|
+
P.hash && (S += "?v=" + P.hash);
|
|
6128
6128
|
}
|
|
6129
|
-
const C = await A.loadAsync(S).catch((
|
|
6130
|
-
`,
|
|
6129
|
+
const C = await A.loadAsync(S).catch((P) => (console.error(`Error loading LOD ${t} from ${h}
|
|
6130
|
+
`, P), x(null)));
|
|
6131
6131
|
if (!C)
|
|
6132
6132
|
return x(null);
|
|
6133
6133
|
const M = C.parser;
|
|
6134
6134
|
i && console.log("Loading finished " + h, g.guid);
|
|
6135
6135
|
let R = 0;
|
|
6136
6136
|
if (C.parser.json.textures) {
|
|
6137
|
-
let
|
|
6137
|
+
let P = !1;
|
|
6138
6138
|
for (const T of C.parser.json.textures) {
|
|
6139
6139
|
if (T != null && T.extensions) {
|
|
6140
6140
|
const I = T == null ? void 0 : T.extensions[Ee];
|
|
6141
6141
|
if (I != null && I.guid && I.guid === g.guid) {
|
|
6142
|
-
|
|
6142
|
+
P = !0;
|
|
6143
6143
|
break;
|
|
6144
6144
|
}
|
|
6145
6145
|
}
|
|
6146
6146
|
R++;
|
|
6147
6147
|
}
|
|
6148
|
-
if (
|
|
6148
|
+
if (P) {
|
|
6149
6149
|
let T = await M.getDependency("texture", R);
|
|
6150
6150
|
return T && B.assignLODInformation(s.url, T, a, t, void 0), i && console.log('change "' + e.name + '" → "' + T.name + '"', h, R, T, m), e instanceof Qe && (T = this.copySettings(e, T)), T && (T.guid = g.guid), x(T);
|
|
6151
6151
|
} else
|
|
6152
6152
|
O && console.warn("Could not find texture with guid", g.guid, C.parser.json);
|
|
6153
6153
|
}
|
|
6154
6154
|
if (R = 0, C.parser.json.meshes) {
|
|
6155
|
-
let
|
|
6155
|
+
let P = !1;
|
|
6156
6156
|
for (const T of C.parser.json.meshes) {
|
|
6157
6157
|
if (T != null && T.extensions) {
|
|
6158
6158
|
const I = T == null ? void 0 : T.extensions[Ee];
|
|
6159
6159
|
if (I != null && I.guid && I.guid === g.guid) {
|
|
6160
|
-
|
|
6160
|
+
P = !0;
|
|
6161
6161
|
break;
|
|
6162
6162
|
}
|
|
6163
6163
|
}
|
|
6164
6164
|
R++;
|
|
6165
6165
|
}
|
|
6166
|
-
if (
|
|
6166
|
+
if (P) {
|
|
6167
6167
|
const T = await M.getDependency("mesh", R);
|
|
6168
6168
|
if (i && console.log(`Loaded Mesh "${T.name}"`, h, R, T, m), T.isMesh === !0) {
|
|
6169
6169
|
const I = T.geometry;
|
|
6170
6170
|
return B.assignLODInformation(s.url, I, a, t, 0), x(I);
|
|
6171
6171
|
} else {
|
|
6172
6172
|
const I = new Array();
|
|
6173
|
-
for (let
|
|
6174
|
-
const L = T.children[
|
|
6173
|
+
for (let D = 0; D < T.children.length; D++) {
|
|
6174
|
+
const L = T.children[D];
|
|
6175
6175
|
if (L.isMesh === !0) {
|
|
6176
6176
|
const F = L.geometry;
|
|
6177
|
-
B.assignLODInformation(s.url, F, a, t,
|
|
6177
|
+
B.assignLODInformation(s.url, F, a, t, D), I.push(F);
|
|
6178
6178
|
}
|
|
6179
6179
|
}
|
|
6180
6180
|
return x(I);
|
|
@@ -6197,7 +6197,7 @@ const kl = ut("gltf-progressive-worker"), Bl = 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 zl(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 @@ E(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 u = B.lowresCache.get(t);
|
|
6242
|
-
u ? u.push(i.geometry) : u = [i.geometry], B.lowresCache.set(t, u), s > 0 && !ai(i) &&
|
|
6242
|
+
u ? u.push(i.geometry) : u = [i.geometry], B.lowresCache.set(t, u), s > 0 && !ai(i) && Rl(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
|
E(B, "lodInfos", /* @__PURE__ */ new Map()), /** cache of already loaded mesh lods */
|
|
6247
6247
|
E(B, "previouslyLoaded", /* @__PURE__ */ new Map()), /** this contains the geometry/textures that were originally loaded */
|
|
6248
|
-
E(B, "lowresCache", /* @__PURE__ */ new Map()), E(B, "workers", []), E(B, "_workersIndex", 0), E(B, "maxConcurrent", 50), E(B, "queue", new
|
|
6248
|
+
E(B, "lowresCache", /* @__PURE__ */ new Map()), E(B, "workers", []), E(B, "_workersIndex", 0), E(B, "maxConcurrent", 50), E(B, "queue", new Cl(B.maxConcurrent, { debug: O != !1 }));
|
|
6249
6249
|
let Re = B;
|
|
6250
|
-
class
|
|
6250
|
+
class zl {
|
|
6251
6251
|
constructor(e, t, i, s) {
|
|
6252
6252
|
E(this, "url");
|
|
6253
6253
|
/** the key to lookup the LOD information */
|
|
@@ -6258,7 +6258,7 @@ class Ol {
|
|
|
6258
6258
|
this.url = e, this.key = t, this.level = i, s != null && (this.index = s);
|
|
6259
6259
|
}
|
|
6260
6260
|
}
|
|
6261
|
-
class
|
|
6261
|
+
class Di {
|
|
6262
6262
|
constructor(e, t) {
|
|
6263
6263
|
E(this, "ready");
|
|
6264
6264
|
E(this, "_resolve");
|
|
@@ -6332,13 +6332,13 @@ class Pi {
|
|
|
6332
6332
|
});
|
|
6333
6333
|
}
|
|
6334
6334
|
}
|
|
6335
|
-
E(
|
|
6335
|
+
E(Di, "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"),
|
|
6341
|
-
var ue, Le, Vi, Ke,
|
|
6340
|
+
const be = ut("debugprogressive"), Ul = ut("noprogressive"), as = Symbol("Needle:LODSManager"), ls = Symbol("Needle:LODState"), qe = Symbol("Needle:CurrentLOD"), oe = { mesh_lod: -1, texture_lod: -1 };
|
|
6341
|
+
var ue, Le, Vi, Ke, Dt, Ni, Fe;
|
|
6342
6342
|
const V = class V {
|
|
6343
6343
|
// readonly plugins: NEEDLE_progressive_plugin[] = [];
|
|
6344
6344
|
constructor(e, t) {
|
|
@@ -6384,7 +6384,7 @@ const V = class V {
|
|
|
6384
6384
|
Ge(this, Le, void 0);
|
|
6385
6385
|
Ge(this, Vi, new qi());
|
|
6386
6386
|
Ge(this, Ke, 0);
|
|
6387
|
-
Ge(this,
|
|
6387
|
+
Ge(this, Dt, 0);
|
|
6388
6388
|
Ge(this, Ni, 0);
|
|
6389
6389
|
Ge(this, Fe, 0);
|
|
6390
6390
|
E(this, "_fpsBuffer", [60, 60, 60, 60, 60]);
|
|
@@ -6431,7 +6431,7 @@ const V = class V {
|
|
|
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 Di(H(this, Ke), { ...e });
|
|
6435
6435
|
this._newPromiseGroups.push(i);
|
|
6436
6436
|
const s = performance.now();
|
|
6437
6437
|
return i.ready.finally(() => {
|
|
@@ -6468,7 +6468,7 @@ const V = class V {
|
|
|
6468
6468
|
const t = this;
|
|
6469
6469
|
Ys(this.renderer), this.renderer.render = function(i, s) {
|
|
6470
6470
|
const a = t.renderer.getRenderTarget();
|
|
6471
|
-
(a == null || "isXRRenderTarget" in a && a.isXRRenderTarget) && (e = 0, Ie(t, Ke, H(t, Ke) + 1), Ie(t,
|
|
6471
|
+
(a == null || "isXRRenderTarget" in a && a.isXRRenderTarget) && (e = 0, Ie(t, Ke, H(t, Ke) + 1), Ie(t, Dt, H(t, Vi).getDelta()), Ie(t, Ni, H(t, Ni) + H(t, Dt)), t._fpsBuffer.shift(), t._fpsBuffer.push(1 / H(t, Dt)), Ie(t, Fe, t._fpsBuffer.reduce((c, u) => c + u) / t._fpsBuffer.length), be && H(t, Ke) % 200 === 0 && console.log("FPS", Math.round(H(t, Fe)), "Interval:", H(t, ue)));
|
|
6472
6472
|
const n = e++;
|
|
6473
6473
|
H(t, Le).call(this, i, s), t.onAfterRender(i, s, n);
|
|
6474
6474
|
};
|
|
@@ -6489,7 +6489,7 @@ const V = class V {
|
|
|
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 (Ul || (this.updateInterval === "auto" ? H(this, Fe) < 40 && H(this, ue) < 10 ? (Ie(this, ue, H(this, ue) + 1), be && console.warn("↓ Reducing LOD updates", H(this, ue), H(this, Fe).toFixed(0))) : H(this, Fe) >= 60 && H(this, ue) > 1 && (Ie(this, ue, H(this, ue) - 1), be && console.warn("↑ Increasing LOD updates", H(this, ue), H(this, Fe).toFixed(0))) : Ie(this, ue, this.updateInterval), H(this, ue) > 0 && H(this, Ke) % H(this, ue) != 0))
|
|
6493
6493
|
return;
|
|
6494
6494
|
this.internalUpdate(e, t), this._postprocessPromiseGroups();
|
|
6495
6495
|
}
|
|
@@ -6540,7 +6540,7 @@ const V = class V {
|
|
|
6540
6540
|
var c, u;
|
|
6541
6541
|
i.userData || (i.userData = {});
|
|
6542
6542
|
let a = i[ls];
|
|
6543
|
-
if (a || (a = new
|
|
6543
|
+
if (a || (a = new Hl(), i[ls] = 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 V = class V {
|
|
|
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
|
+
Di.addPromise("texture", e, a, this._newPromiseGroups);
|
|
6573
6573
|
}
|
|
6574
6574
|
}
|
|
6575
6575
|
/** Load progressive meshes for the given mesh
|
|
@@ -6586,7 +6586,7 @@ const V = class V {
|
|
|
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((u) => u({ type: "mesh", level: t, object: e })), c));
|
|
6589
|
-
return
|
|
6589
|
+
return Di.addPromise("mesh", e, n, this._newPromiseGroups), n;
|
|
6590
6590
|
}
|
|
6591
6591
|
return Promise.resolve(null);
|
|
6592
6592
|
}
|
|
@@ -6648,11 +6648,11 @@ const V = class V {
|
|
|
6648
6648
|
return;
|
|
6649
6649
|
}
|
|
6650
6650
|
if (this._tempBox.applyMatrix4(this.projectionScreenMatrix), this.renderer.xr.enabled && x.isPerspectiveCamera && x.fov > 70) {
|
|
6651
|
-
const I = this._tempBox.min,
|
|
6652
|
-
let L = I.x, F = I.y, U =
|
|
6653
|
-
const Q = 2, ie = 1.5, se = (I.x +
|
|
6651
|
+
const I = this._tempBox.min, D = this._tempBox.max;
|
|
6652
|
+
let L = I.x, F = I.y, U = D.x, G = D.y;
|
|
6653
|
+
const Q = 2, ie = 1.5, se = (I.x + D.x) * 0.5, W = (I.y + D.y) * 0.5;
|
|
6654
6654
|
L = (L - se) * Q + se, F = (F - W) * Q + W, U = (U - se) * Q + se, G = (G - W) * Q + W;
|
|
6655
|
-
const q = L < 0 && U > 0 ? 0 : Math.min(Math.abs(I.x), Math.abs(
|
|
6655
|
+
const q = L < 0 && U > 0 ? 0 : Math.min(Math.abs(I.x), Math.abs(D.x)), me = F < 0 && G > 0 ? 0 : Math.min(Math.abs(I.y), Math.abs(D.y)), ce = Math.max(q, me);
|
|
6656
6656
|
i.lastCentrality = (ie - ce) * (ie - ce) * (ie - ce);
|
|
6657
6657
|
} else
|
|
6658
6658
|
i.lastCentrality = 1;
|
|
@@ -6664,21 +6664,21 @@ const V = class V {
|
|
|
6664
6664
|
if (Math.max(w.x, w.y) != 0 && M != 0 && (w.z = C.z / Math.max(C.x, C.y) * Math.max(w.x, w.y)), i.lastScreenCoverage = Math.max(w.x, w.y, w.z), i.lastScreenspaceVolume.copy(w), i.lastScreenCoverage *= i.lastCentrality, be && V.debugDrawLine) {
|
|
6665
6665
|
const I = this.tempMatrix.copy(this.projectionScreenMatrix);
|
|
6666
6666
|
I.invert();
|
|
6667
|
-
const
|
|
6668
|
-
|
|
6669
|
-
const G = (
|
|
6670
|
-
|
|
6667
|
+
const D = V.corner0, L = V.corner1, F = V.corner2, U = V.corner3;
|
|
6668
|
+
D.copy(this._tempBox.min), L.copy(this._tempBox.max), L.x = D.x, F.copy(this._tempBox.max), F.y = D.y, U.copy(this._tempBox.max);
|
|
6669
|
+
const G = (D.z + U.z) * 0.5;
|
|
6670
|
+
D.z = L.z = F.z = U.z = G, D.applyMatrix4(I), L.applyMatrix4(I), F.applyMatrix4(I), U.applyMatrix4(I), V.debugDrawLine(D, L, 255), V.debugDrawLine(D, F, 255), V.debugDrawLine(L, U, 255), V.debugDrawLine(F, U, 255);
|
|
6671
6671
|
}
|
|
6672
|
-
let
|
|
6672
|
+
let P = 999;
|
|
6673
6673
|
if (f && i.lastScreenCoverage > 0)
|
|
6674
6674
|
for (let I = 0; I < f.length; I++) {
|
|
6675
|
-
const
|
|
6676
|
-
if (d > 0 && Er() && !
|
|
6677
|
-
|
|
6675
|
+
const D = f[I], F = (((g = D.densities) == null ? void 0 : g[d]) || D.density || 1e-5) / i.lastScreenCoverage;
|
|
6676
|
+
if (d > 0 && Er() && !D.densities && !globalThis["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] && (window["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] = !0, console.warn("[Needle Progressive] Detected usage of mesh without primitive densities. This might cause incorrect LOD level selection: Consider re-optimizing your model by updating your Needle Integration, Needle glTF Pipeline or running optimization again on Needle Cloud.")), F < s) {
|
|
6677
|
+
P = I;
|
|
6678
6678
|
break;
|
|
6679
6679
|
}
|
|
6680
6680
|
}
|
|
6681
|
-
|
|
6681
|
+
P < c && (c = P, u = !0);
|
|
6682
6682
|
}
|
|
6683
6683
|
if (u ? a.mesh_lod = c : a.mesh_lod = i.lastLodLevel_Mesh, be && a.mesh_lod != i.lastLodLevel_Mesh) {
|
|
6684
6684
|
const w = f == null ? void 0 : f[a.mesh_lod];
|
|
@@ -6698,10 +6698,10 @@ const V = class V {
|
|
|
6698
6698
|
const C = m / window.devicePixelRatio * A;
|
|
6699
6699
|
let M = !1;
|
|
6700
6700
|
for (let R = l.lods.length - 1; R >= 0; R--) {
|
|
6701
|
-
const
|
|
6702
|
-
if (!(x &&
|
|
6701
|
+
const P = l.lods[R];
|
|
6702
|
+
if (!(x && P.max_height >= 2048) && !(Sn() && P.max_height > 4096) && (P.max_height > C || !M && R === 0)) {
|
|
6703
6703
|
if (M = !0, a.texture_lod = R, be && a.texture_lod < i.lastLodLevel_Texture) {
|
|
6704
|
-
const T =
|
|
6704
|
+
const T = P.max_height;
|
|
6705
6705
|
console.log(`Texture LOD changed: ${i.lastLodLevel_Texture} → ${a.texture_lod} = ${T}px
|
|
6706
6706
|
Screensize: ${C.toFixed(0)}px, Coverage: ${(100 * i.lastScreenCoverage).toFixed(2)}%, Volume ${w.toFixed(1)}
|
|
6707
6707
|
${t.name}`);
|
|
@@ -6714,12 +6714,12 @@ ${t.name}`);
|
|
|
6714
6714
|
a.texture_lod = 0;
|
|
6715
6715
|
}
|
|
6716
6716
|
};
|
|
6717
|
-
ue = new WeakMap(), Le = new WeakMap(), Vi = new WeakMap(), Ke = new WeakMap(),
|
|
6717
|
+
ue = new WeakMap(), Le = new WeakMap(), Vi = new WeakMap(), Ke = new WeakMap(), Dt = new WeakMap(), Ni = new WeakMap(), Fe = new WeakMap(), /**
|
|
6718
6718
|
* Assign a function to draw debug lines for the LODs. This function will be called with the start and end position of the line and the color of the line when the `debugprogressive` query parameter is set.
|
|
6719
6719
|
*/
|
|
6720
6720
|
E(V, "debugDrawLine"), E(V, "corner0", new b()), E(V, "corner1", new b()), E(V, "corner2", new b()), E(V, "corner3", new b()), E(V, "_tempPtInside", new b()), E(V, "skinnedMeshBoundsFrameOffsetCounter", 0), E(V, "$skinnedMeshBoundsOffset", Symbol("gltf-progressive-skinnedMeshBoundsOffset"));
|
|
6721
6721
|
let Lt = V;
|
|
6722
|
-
class
|
|
6722
|
+
class Hl {
|
|
6723
6723
|
constructor() {
|
|
6724
6724
|
E(this, "frames", 0);
|
|
6725
6725
|
E(this, "lastLodLevel_Mesh", -1);
|
|
@@ -6732,7 +6732,7 @@ class Ul {
|
|
|
6732
6732
|
const Lr = Symbol("NEEDLE_mesh_lod"), gi = Symbol("NEEDLE_texture_lod");
|
|
6733
6733
|
let Vt = null;
|
|
6734
6734
|
function Cn() {
|
|
6735
|
-
const o =
|
|
6735
|
+
const o = Wl();
|
|
6736
6736
|
o && (o.mapURLs(function(e) {
|
|
6737
6737
|
return Fr(), e;
|
|
6738
6738
|
}), Fr(), Vt == null || Vt.disconnect(), Vt = new MutationObserver((e) => {
|
|
@@ -6743,7 +6743,7 @@ function Cn() {
|
|
|
6743
6743
|
});
|
|
6744
6744
|
}), Vt.observe(document, { childList: !0, subtree: !0 }));
|
|
6745
6745
|
}
|
|
6746
|
-
function
|
|
6746
|
+
function Wl() {
|
|
6747
6747
|
if (typeof customElements > "u")
|
|
6748
6748
|
return null;
|
|
6749
6749
|
const o = customElements.get("model-viewer");
|
|
@@ -6759,11 +6759,11 @@ function Fr() {
|
|
|
6759
6759
|
});
|
|
6760
6760
|
}
|
|
6761
6761
|
const kr = /* @__PURE__ */ new WeakSet();
|
|
6762
|
-
let
|
|
6762
|
+
let Vl = 0;
|
|
6763
6763
|
function In(o) {
|
|
6764
6764
|
if (!o || kr.has(o))
|
|
6765
6765
|
return null;
|
|
6766
|
-
kr.add(o), console.debug("[gltf-progressive] found new model-viewer..." + ++
|
|
6766
|
+
kr.add(o), console.debug("[gltf-progressive] found new model-viewer..." + ++Vl + `
|
|
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 In(o) {
|
|
|
6784
6784
|
};
|
|
6785
6785
|
console.debug("[gltf-progressive] setup model-viewer");
|
|
6786
6786
|
const a = Lt.get(e, { engine: "model-viewer" });
|
|
6787
|
-
return Lt.addPlugin(new
|
|
6787
|
+
return Lt.addPlugin(new Nl()), 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 In(o) {
|
|
|
6796
6796
|
}
|
|
6797
6797
|
return null;
|
|
6798
6798
|
}
|
|
6799
|
-
class
|
|
6799
|
+
class Nl {
|
|
6800
6800
|
constructor() {
|
|
6801
6801
|
E(this, "_didWarnAboutMissingUrl", !1);
|
|
6802
6802
|
}
|
|
@@ -6891,14 +6891,14 @@ function Rn(...o) {
|
|
|
6891
6891
|
return (s == null ? void 0 : s.enableLODsManager) !== !1 && a.enable(), a;
|
|
6892
6892
|
}
|
|
6893
6893
|
Cn();
|
|
6894
|
-
if (!
|
|
6894
|
+
if (!Il) {
|
|
6895
6895
|
const o = {
|
|
6896
6896
|
gltfProgressive: {
|
|
6897
6897
|
useNeedleProgressive: Rn,
|
|
6898
6898
|
LODsManager: Lt,
|
|
6899
6899
|
configureLoader: Tn,
|
|
6900
6900
|
getRaycastMesh: ai,
|
|
6901
|
-
useRaycastMeshes:
|
|
6901
|
+
useRaycastMeshes: Pl
|
|
6902
6902
|
}
|
|
6903
6903
|
};
|
|
6904
6904
|
if (!globalThis.Needle)
|
|
@@ -7050,7 +7050,7 @@ var Rt = Object.freeze({
|
|
|
7050
7050
|
}
|
|
7051
7051
|
}), Ct = function() {
|
|
7052
7052
|
return performance.now();
|
|
7053
|
-
},
|
|
7053
|
+
}, Pn = (
|
|
7054
7054
|
/** @class */
|
|
7055
7055
|
function() {
|
|
7056
7056
|
function o() {
|
|
@@ -7130,11 +7130,11 @@ var Rt = Object.freeze({
|
|
|
7130
7130
|
return o._nextId++;
|
|
7131
7131
|
}, o._nextId = 0, o;
|
|
7132
7132
|
}()
|
|
7133
|
-
),
|
|
7133
|
+
), Ds = new Pn(), Ui = (
|
|
7134
7134
|
/** @class */
|
|
7135
7135
|
function() {
|
|
7136
7136
|
function o(e, t) {
|
|
7137
|
-
t === void 0 && (t =
|
|
7137
|
+
t === void 0 && (t = Ds), this._object = e, this._group = t, this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = Rt.Linear.None, this._interpolationFunction = ct.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = Xs.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1;
|
|
7138
7138
|
}
|
|
7139
7139
|
return o.prototype.getId = function() {
|
|
7140
7140
|
return this._id;
|
|
@@ -7221,7 +7221,7 @@ var Rt = Object.freeze({
|
|
|
7221
7221
|
this._chainedTweens[e].stop();
|
|
7222
7222
|
return this;
|
|
7223
7223
|
}, o.prototype.group = function(e) {
|
|
7224
|
-
return e === void 0 && (e =
|
|
7224
|
+
return e === void 0 && (e = Ds), this._group = e, this;
|
|
7225
7225
|
}, o.prototype.delay = function(e) {
|
|
7226
7226
|
return e === void 0 && (e = 0), this._delayTime = e, this;
|
|
7227
7227
|
}, o.prototype.repeat = function(e) {
|
|
@@ -7298,25 +7298,25 @@ var Rt = 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
|
+
), Gl = "23.1.3", ql = Xs.nextId, Pe = Ds, jl = Pe.getAll.bind(Pe), Ql = Pe.removeAll.bind(Pe), Yl = Pe.add.bind(Pe), Zl = Pe.remove.bind(Pe), Xl = Pe.update.bind(Pe), Je = {
|
|
7302
7302
|
Easing: Rt,
|
|
7303
|
-
Group:
|
|
7303
|
+
Group: Pn,
|
|
7304
7304
|
Interpolation: ct,
|
|
7305
7305
|
now: Ct,
|
|
7306
7306
|
Sequence: Xs,
|
|
7307
|
-
nextId:
|
|
7307
|
+
nextId: ql,
|
|
7308
7308
|
Tween: Ui,
|
|
7309
|
-
VERSION:
|
|
7310
|
-
getAll:
|
|
7311
|
-
removeAll:
|
|
7312
|
-
add:
|
|
7313
|
-
remove:
|
|
7314
|
-
update:
|
|
7309
|
+
VERSION: Gl,
|
|
7310
|
+
getAll: jl,
|
|
7311
|
+
removeAll: Ql,
|
|
7312
|
+
add: Yl,
|
|
7313
|
+
remove: Zl,
|
|
7314
|
+
update: Xl
|
|
7315
7315
|
}, Nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7316
|
-
function
|
|
7316
|
+
function Kl(o) {
|
|
7317
7317
|
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
7318
7318
|
}
|
|
7319
|
-
var
|
|
7319
|
+
var Dn = { exports: {} };
|
|
7320
7320
|
(function(o) {
|
|
7321
7321
|
var e = Object.prototype.hasOwnProperty, t = "~";
|
|
7322
7322
|
function i() {
|
|
@@ -7426,9 +7426,9 @@ var Pn = { exports: {} };
|
|
|
7426
7426
|
var d;
|
|
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
|
-
})(
|
|
7430
|
-
var
|
|
7431
|
-
const Ot = /* @__PURE__ */
|
|
7429
|
+
})(Dn);
|
|
7430
|
+
var Jl = Dn.exports;
|
|
7431
|
+
const Ot = /* @__PURE__ */ Kl(Jl);
|
|
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 Ch(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 $l(o) {
|
|
7494
7494
|
return o.length === 0 ? 0 : o.reduce((t, i) => t + i, 0) / o.length;
|
|
7495
7495
|
}
|
|
7496
7496
|
function Br(o, e) {
|
|
7497
7497
|
const t = new Blob([o], { type: e });
|
|
7498
7498
|
return URL.createObjectURL(t);
|
|
7499
7499
|
}
|
|
7500
|
-
function
|
|
7500
|
+
function ec() {
|
|
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 Or(o) {
|
|
@@ -7505,7 +7505,7 @@ function Or(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 Ih(o, e = 43) {
|
|
7509
7509
|
const t = o * Math.PI / 180;
|
|
7510
7510
|
return e / (2 * Math.tan(t / 2));
|
|
7511
7511
|
}
|
|
@@ -7854,18 +7854,18 @@ var En = {};
|
|
|
7854
7854
|
if (h._webAudio) {
|
|
7855
7855
|
var R = function() {
|
|
7856
7856
|
h._playLock = !1, C(), h._refreshBuffer(g);
|
|
7857
|
-
var
|
|
7858
|
-
M.gain.setValueAtTime(
|
|
7857
|
+
var D = g._muted || h._muted ? 0 : g._volume;
|
|
7858
|
+
M.gain.setValueAtTime(D, t.ctx.currentTime), g._playStart = t.ctx.currentTime, typeof M.bufferSource.start > "u" ? g._loop ? M.bufferSource.noteGrainOn(0, y, 86400) : M.bufferSource.noteGrainOn(0, y, x) : g._loop ? M.bufferSource.start(0, y, 86400) : M.bufferSource.start(0, y, x), w !== 1 / 0 && (h._endTimers[g._id] = setTimeout(h._ended.bind(h, g), w)), l || setTimeout(function() {
|
|
7859
7859
|
h._emit("play", g._id), h._loadQueue();
|
|
7860
7860
|
}, 0);
|
|
7861
7861
|
};
|
|
7862
7862
|
t.state === "running" && t.ctx.state !== "interrupted" ? R() : (h._playLock = !0, h.once("resume", R), h._clearTimer(g._id));
|
|
7863
7863
|
} else {
|
|
7864
|
-
var
|
|
7864
|
+
var P = function() {
|
|
7865
7865
|
M.currentTime = y, M.muted = g._muted || h._muted || t._muted || M.muted, M.volume = g._volume * t.volume(), M.playbackRate = g._rate;
|
|
7866
7866
|
try {
|
|
7867
|
-
var
|
|
7868
|
-
if (
|
|
7867
|
+
var D = M.play();
|
|
7868
|
+
if (D && typeof Promise < "u" && (D instanceof Promise || typeof D.then == "function") ? (h._playLock = !0, C(), D.then(function() {
|
|
7869
7869
|
h._playLock = !1, M._unlocked = !0, l ? h._loadQueue() : h._emit("play", g._id);
|
|
7870
7870
|
}).catch(function() {
|
|
7871
7871
|
h._playLock = !1, h._emit("playerror", g._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), g._ended = !0, g._paused = !0;
|
|
@@ -7883,11 +7883,11 @@ var En = {};
|
|
|
7883
7883
|
M.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (M.src = h._src, M.load());
|
|
7884
7884
|
var T = window && window.ejecta || !M.readyState && t._navigator.isCocoonJS;
|
|
7885
7885
|
if (M.readyState >= 3 || T)
|
|
7886
|
-
|
|
7886
|
+
P();
|
|
7887
7887
|
else {
|
|
7888
7888
|
h._playLock = !0, h._state = "loading";
|
|
7889
7889
|
var I = function() {
|
|
7890
|
-
h._state = "loaded",
|
|
7890
|
+
h._state = "loaded", P(), M.removeEventListener(t._canPlayEvent, I, !1);
|
|
7891
7891
|
};
|
|
7892
7892
|
M.addEventListener(t._canPlayEvent, I, !1), h._clearTimer(g._id);
|
|
7893
7893
|
}
|
|
@@ -8714,11 +8714,11 @@ var En = {};
|
|
|
8714
8714
|
};
|
|
8715
8715
|
})();
|
|
8716
8716
|
})(En);
|
|
8717
|
-
const
|
|
8718
|
-
let
|
|
8717
|
+
const tc = "data:audio/mpeg;base64,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";
|
|
8718
|
+
let ic = class {
|
|
8719
8719
|
constructor() {
|
|
8720
8720
|
this.sound = new En.Howl({
|
|
8721
|
-
src: [
|
|
8721
|
+
src: [tc]
|
|
8722
8722
|
});
|
|
8723
8723
|
}
|
|
8724
8724
|
play() {
|
|
@@ -8739,14 +8739,14 @@ const We = (o) => {
|
|
|
8739
8739
|
} catch {
|
|
8740
8740
|
}
|
|
8741
8741
|
};
|
|
8742
|
-
function
|
|
8742
|
+
function sc(o) {
|
|
8743
8743
|
return new b(o[0], o[1], o[2]);
|
|
8744
8744
|
}
|
|
8745
|
-
function
|
|
8745
|
+
function rc() {
|
|
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 nc(o) {
|
|
8750
8750
|
let e = !1, t = !1, i = !1, s = 1 / 0, a = 1 / 0, n = 1 / 0, c = -1 / 0, u = -1 / 0, f = -1 / 0, d = 0, r = 0;
|
|
8751
8751
|
return o.traverse((h) => {
|
|
8752
8752
|
if (h.isMesh && h.geometry) {
|
|
@@ -8771,7 +8771,7 @@ function rc(o) {
|
|
|
8771
8771
|
}
|
|
8772
8772
|
}), { box: new Y(new b(s, a, n), new b(c, u, f)), maxRadius: d, height: r, hasWidth: t, hasLength: e, hasHeight: i };
|
|
8773
8773
|
}
|
|
8774
|
-
function
|
|
8774
|
+
function oc(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 nc(o, e, t = null) {
|
|
|
8780
8780
|
}, e);
|
|
8781
8781
|
};
|
|
8782
8782
|
}
|
|
8783
|
-
class
|
|
8783
|
+
class ac {
|
|
8784
8784
|
constructor(e, t, i) {
|
|
8785
8785
|
this.length = e, this.width = t, this.height = i;
|
|
8786
8786
|
}
|
|
@@ -8799,12 +8799,12 @@ function Ks() {
|
|
|
8799
8799
|
var e;
|
|
8800
8800
|
if (typeof navigator > "u")
|
|
8801
8801
|
return !1;
|
|
8802
|
-
if (
|
|
8802
|
+
if (lc())
|
|
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 lc() {
|
|
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,19 +8812,19 @@ function ac() {
|
|
|
8812
8812
|
}
|
|
8813
8813
|
return !1;
|
|
8814
8814
|
}
|
|
8815
|
-
const
|
|
8816
|
-
let
|
|
8815
|
+
const cc = new Co(), Ft = new To(), Yi = new So();
|
|
8816
|
+
let Pt = "./draco/";
|
|
8817
8817
|
try {
|
|
8818
|
-
|
|
8818
|
+
Pt = new URL("./draco/", import.meta.url).href;
|
|
8819
8819
|
} catch {
|
|
8820
|
-
|
|
8820
|
+
Pt = "./draco/";
|
|
8821
8821
|
}
|
|
8822
|
-
typeof window < "u" && window.dracoPath && (
|
|
8822
|
+
typeof window < "u" && window.dracoPath && (Pt = window.dracoPath);
|
|
8823
8823
|
Yi.setDecoderConfig({ type: "wasm" });
|
|
8824
|
-
Yi.setDecoderPath(
|
|
8824
|
+
Yi.setDecoderPath(Pt.endsWith("/") ? Pt : `${Pt}/`);
|
|
8825
8825
|
Yi.preload();
|
|
8826
8826
|
Ft.setDRACOLoader(Yi);
|
|
8827
|
-
const
|
|
8827
|
+
const Ph = new Mo(), Ur = [115, 103, 108, 98];
|
|
8828
8828
|
function Dh(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;
|
|
@@ -8834,7 +8834,7 @@ function Dh(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(u, r), d.buffer;
|
|
8836
8836
|
}
|
|
8837
|
-
function
|
|
8837
|
+
function uc(o) {
|
|
8838
8838
|
const e = new Uint8Array(o.slice(0, 4));
|
|
8839
8839
|
let t = !0;
|
|
8840
8840
|
for (let r = 0; r < Ur.length; r++)
|
|
@@ -8902,13 +8902,13 @@ class Hi {
|
|
|
8902
8902
|
}
|
|
8903
8903
|
}
|
|
8904
8904
|
parse(e) {
|
|
8905
|
-
return
|
|
8905
|
+
return uc(e);
|
|
8906
8906
|
}
|
|
8907
8907
|
clear() {
|
|
8908
8908
|
[...this.cache.values()];
|
|
8909
8909
|
}
|
|
8910
8910
|
}
|
|
8911
|
-
const uc = `*{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}`, hc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAAA7CAYAAAB8MXT7AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGTSURBVHic7dxLbQNBEIThnigADGEhxAwcBoZgCIZgBoZgCIZgCIaQMIgZVC4daw/xXPLoqdX/3fbW0milUtfutMCdpCkiLhEx1U6CLkkvkt4k7atnQYekfR7US/Us6JB0yIOaqmfBA5JWks6SrhzUwCRN+TYdq2dBx+ygDtWzoEPSNg9qVz0LOmZBgsQ3sqUkvufqAf6SpFVEnCPiFhHr1tqteCR8hyBhYrY6OlTPgo5cHX1I2lbPgo6lBInFk3Rc+uroqXqAn8ogcc3H19bae+U8eIDEZ0LSJoMEZeHIWB2ZIPEZoCw0QVlogsRnYlYWsjoaGUHCRK6OOKiRfa2OMvWtqufBAwQJE5SFJmZl4aZ6FnSQ+Azk6mjxZeFv+/fycfbDWrTW1pSFgyLxmcjVEWXh6CgLTZD4DMzKwguro4ERJEywOjIhaUdZaIAgYYKy0ABloQkSnwlxKZUHcSmVBxKfgVwdnSgLB8d35iZIfCYoC01QFpog8Y3rftFWrotO+cilVKMiSJigLDSS30hQFhr4BEcKZN0LNhDxAAAAAElFTkSuQmCC", Hr = { name: "", isMobile: !1 }, fc = {
|
|
8911
|
+
const hc = `*{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}`, fc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAAA7CAYAAAB8MXT7AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGTSURBVHic7dxLbQNBEIThnigADGEhxAwcBoZgCIZgBoZgCIZgCIaQMIgZVC4daw/xXPLoqdX/3fbW0milUtfutMCdpCkiLhEx1U6CLkkvkt4k7atnQYekfR7US/Us6JB0yIOaqmfBA5JWks6SrhzUwCRN+TYdq2dBx+ygDtWzoEPSNg9qVz0LOmZBgsQ3sqUkvufqAf6SpFVEnCPiFhHr1tqteCR8hyBhYrY6OlTPgo5cHX1I2lbPgo6lBInFk3Rc+uroqXqAn8ogcc3H19bae+U8eIDEZ0LSJoMEZeHIWB2ZIPEZoCw0QVlogsRnYlYWsjoaGUHCRK6OOKiRfa2OMvWtqufBAwQJE5SFJmZl4aZ6FnSQ+Azk6mjxZeFv+/fycfbDWrTW1pSFgyLxmcjVEWXh6CgLTZD4DMzKwguro4ERJEywOjIhaUdZaIAgYYKy0ABloQkSnwlxKZUHcSmVBxKfgVwdnSgLB8d35iZIfCYoC01QFpog8Y3rftFWrotO+cilVKMiSJigLDSS30hQFhr4BEcKZN0LNhDxAAAAAElFTkSuQmCC", Hr = { name: "", isMobile: !1 }, dc = {
|
|
8912
8912
|
"&": "&",
|
|
8913
8913
|
"<": "<",
|
|
8914
8914
|
">": ">",
|
|
@@ -8916,7 +8916,7 @@ const uc = `*{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) => dc[e]);
|
|
8920
8920
|
}
|
|
8921
8921
|
function Wr(...o) {
|
|
8922
8922
|
return o.filter(Boolean).join(" ");
|
|
@@ -9093,11 +9093,11 @@ class Ln extends HTMLElement {
|
|
|
9093
9093
|
</div>
|
|
9094
9094
|
</div>` : "", c = this._deviceLogo ? `<img class="device-logo" src="${Gt(this._deviceLogo)}" alt="device logo">` : "", u = 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>${hc}</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="${fc}">
|
|
9101
9101
|
<div class="name">
|
|
9102
9102
|
<div class="name-wrapper">${u}</div>
|
|
9103
9103
|
<div class="functions-wrapper">
|
|
@@ -9381,7 +9381,7 @@ class Vr extends Ue {
|
|
|
9381
9381
|
return new ge();
|
|
9382
9382
|
}
|
|
9383
9383
|
}
|
|
9384
|
-
class
|
|
9384
|
+
class pc extends Ue {
|
|
9385
9385
|
constructor(e) {
|
|
9386
9386
|
const t = document.createElement("div");
|
|
9387
9387
|
super(t), this._text = document.createElement("div");
|
|
@@ -9439,7 +9439,7 @@ class Ei extends ge {
|
|
|
9439
9439
|
color: "#666",
|
|
9440
9440
|
linewidth: 2
|
|
9441
9441
|
})
|
|
9442
|
-
), this._text = new
|
|
9442
|
+
), this._text = new pc(""), this._line.frustumCulled = !1, this.add(this._line, this._line2), this._showText && (this.add(this._text), this._text.onPointMove = () => {
|
|
9443
9443
|
this._line.material.color.set("#000"), this._line2.material.color.set("#000");
|
|
9444
9444
|
}, this._text.onPointLeave = () => {
|
|
9445
9445
|
this._line.material.color.set("#666"), this._line2.material.color.set("#666");
|
|
@@ -9479,14 +9479,14 @@ class Ei extends ge {
|
|
|
9479
9479
|
class Fn extends Bt {
|
|
9480
9480
|
// 上一次的角度
|
|
9481
9481
|
constructor(e, t) {
|
|
9482
|
-
super(), this.radius = e, this._text = new
|
|
9482
|
+
super(), this.radius = e, this._text = new mc(""), this._line = new Ei(void 0, !1, !1), this._box = new X(), this._arc = new Io(), this._previousPosition = null, this._updateTimer = null, this._updateDelay = 300, this._accumulatedAngle = 0, this._lastAngle = null, this._line.updateMaterial(new Ts({
|
|
9483
9483
|
color: "#555",
|
|
9484
9484
|
dashSize: 0.06,
|
|
9485
9485
|
gapSize: 0.06
|
|
9486
9486
|
})), this._line.renderOrder = 0, this._box.geometry = new or(e, e + 3e-3, 128), this._box.material = new ni({
|
|
9487
9487
|
color: "#666",
|
|
9488
9488
|
side: oi
|
|
9489
|
-
}), this._arc.geometry = new ur(), this._arc.geometry.setPositions([0, 0, 0, 0, 0, 0]), this._arc.geometry.instanceCount = 0, this._arc.material = new
|
|
9489
|
+
}), this._arc.geometry = new ur(), this._arc.geometry.setPositions([0, 0, 0, 0, 0, 0]), this._arc.geometry.instanceCount = 0, this._arc.material = new Ro({
|
|
9490
9490
|
color: "#eee",
|
|
9491
9491
|
linewidth: 2,
|
|
9492
9492
|
// 像素单位的线宽
|
|
@@ -9546,7 +9546,7 @@ class Fn extends Bt {
|
|
|
9546
9546
|
return u.setPositions(s), u.instanceCount = Math.max(0, s.length / 3 - 1), u;
|
|
9547
9547
|
}
|
|
9548
9548
|
}
|
|
9549
|
-
class
|
|
9549
|
+
class mc extends Ue {
|
|
9550
9550
|
constructor(e) {
|
|
9551
9551
|
const t = document.createElement("div");
|
|
9552
9552
|
super(t), this._wrapper = document.createElement("div"), this._circle = document.createElement("div");
|
|
@@ -9568,7 +9568,7 @@ class pc extends Ue {
|
|
|
9568
9568
|
this._circle.style.background = e;
|
|
9569
9569
|
}
|
|
9570
9570
|
}
|
|
9571
|
-
const
|
|
9571
|
+
const gc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAUCAYAAADY6P5TAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEvSURBVFiFzZdbFYMwEEQroRKQgAQkVEIlICEOkFAJlRAJSIgEJNx+sPS0nGxIaOhyv3nM7mTmwOViDHAFesADD+BqrakKQAcMwMQ3AWis9e1C3HLASJoAdNZ6sxG3/MZQMZy1dhWgFbfWRzDGlFjAwFlyyXdh5OD5OIqykBgBy1yiF0aMUQaJugLclOcEoP3nULmFgQgeyCwOoJGBYrijByspDM98ZIszJAt8Ks8dag/VUFYYLtetjHdruRz5JZf8WBg1Ae7KcgOluaSsMAKJwqgJ6Vz2WzcvhZHjVlFh1ESG1DQ67SYtyGs8OwujNpTkUtw4nVtbyLK1XDafF3aKW90Z3EpBbi5lE0u9n3qoNTKk9rHh3heZqqwA8Vw6a11VkVwuPK31HALzb5pfovYC2xSs5LCDIUcAAAAASUVORK5CYII=", vc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAKCAYAAACngj4SAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAChSURBVDiNrdJbFYMwEIRhJFQCEpCAhEqIhDhBAlKQgAQkIOHrSziHpmkbLvua7P4zO9s0FYUeM0b0NT2nC9FnLQho7wQ9MOwgQ3K4ZPDrrtGmFcKKkL0HTAXXw2HX6HYuFnR/hMWC6ykX+W1AzJqq1abDGguux6LoPK9aUGFOm1Y+F+Bh+7DlsSKehRXgnfdDm5od7GdeN8ADnpuKQ3ldqReHZFd3742nZgAAAABJRU5ErkJggg==", Nr = "data:image/png;base64,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", _c = "data:image/png;base64,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";
|
|
9572
9572
|
class Gr extends Ue {
|
|
9573
9573
|
constructor(e, t) {
|
|
9574
9574
|
const i = document.createElement("div");
|
|
@@ -9612,11 +9612,11 @@ class Gr extends Ue {
|
|
|
9612
9612
|
h.name === c.name && (l = h);
|
|
9613
9613
|
}), l)) {
|
|
9614
9614
|
const h = document.createElement("div");
|
|
9615
|
-
h.style.background = `url(${
|
|
9615
|
+
h.style.background = `url(${_c}) center no-repeat`, h.style.backgroundSize = "100% auto", h.style.position = "absolute", h.style.top = "-50%", h.style.left = "-50%", h.style.width = s ? "140px" : "160px", h.style.height = s ? "70px" : "80px", h.style.transform = "translateX(-50%) translateY(-50%)", i.append(h);
|
|
9616
9616
|
const m = document.createElement("div");
|
|
9617
|
-
m.style.background = `url(${
|
|
9617
|
+
m.style.background = `url(${vc}) 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);
|
|
9618
9618
|
const v = document.createElement("div");
|
|
9619
|
-
v.style.background = `url(${
|
|
9619
|
+
v.style.background = `url(${gc}) 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) => {
|
|
9620
9620
|
s || p.addEventListener("mousemove", () => {
|
|
9621
9621
|
p.style.filter = "invert(100%)";
|
|
9622
9622
|
}), p.addEventListener("mouseleave", () => {
|
|
@@ -9653,7 +9653,7 @@ class Gr extends Ue {
|
|
|
9653
9653
|
this._emitter.removeAllListeners(), cancelAnimationFrame(this._looper), this.element.remove();
|
|
9654
9654
|
}
|
|
9655
9655
|
}
|
|
9656
|
-
class
|
|
9656
|
+
class yc extends Po {
|
|
9657
9657
|
constructor(e) {
|
|
9658
9658
|
const t = document.createElement("div");
|
|
9659
9659
|
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 = (u) => {
|
|
@@ -9684,7 +9684,7 @@ class _c extends Ro {
|
|
|
9684
9684
|
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 = [];
|
|
9685
9685
|
}
|
|
9686
9686
|
}
|
|
9687
|
-
class
|
|
9687
|
+
class xc extends Bt {
|
|
9688
9688
|
constructor() {
|
|
9689
9689
|
super(), this._box3 = new Y(), this._line11 = new Ei("长:"), this._line12 = new Ei("宽:"), this._line13 = new Ei("高:"), this._outline = new Fn(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 = () => {
|
|
9690
9690
|
if (!this._app)
|
|
@@ -9738,7 +9738,7 @@ class yc extends Bt {
|
|
|
9738
9738
|
update(e = 0) {
|
|
9739
9739
|
if (!this._object)
|
|
9740
9740
|
return;
|
|
9741
|
-
const t = this._object, { box: i, maxRadius: s, hasLength: a, hasHeight: n, hasWidth: c } =
|
|
9741
|
+
const t = this._object, { box: i, maxRadius: s, hasLength: a, hasHeight: n, hasWidth: c } = nc(t);
|
|
9742
9742
|
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();
|
|
9743
9743
|
const u = this._box3.min.x, f = this._box3.max.x, d = this._box3.min.z, r = this._box3.max.z, l = this._box3.min.y, h = this._box3.max.y;
|
|
9744
9744
|
let m = 0.2;
|
|
@@ -9795,10 +9795,10 @@ class qr extends Bt {
|
|
|
9795
9795
|
c.computeLineDistances(), this.add(s, c);
|
|
9796
9796
|
}
|
|
9797
9797
|
}
|
|
9798
|
-
const
|
|
9798
|
+
const wc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAALSURBVAiZY2AAAgAABQABYlUyiAAAAABJRU5ErkJggg==";
|
|
9799
9799
|
class jr {
|
|
9800
9800
|
constructor(e) {
|
|
9801
|
-
this._props = e, this.name = "", this.transparentTexture = kn.load(
|
|
9801
|
+
this._props = e, this.name = "", this.transparentTexture = kn.load(wc), this._offscreen = new OffscreenCanvas(0, 0), this._defaults = { ...e }, this.target = e.target, this.parent = this.target.parent, this.reset();
|
|
9802
9802
|
}
|
|
9803
9803
|
get imageSize() {
|
|
9804
9804
|
return this._props.imageSize;
|
|
@@ -9848,14 +9848,14 @@ class jr {
|
|
|
9848
9848
|
this._offscreen = null;
|
|
9849
9849
|
}
|
|
9850
9850
|
}
|
|
9851
|
-
function
|
|
9851
|
+
function bc(o) {
|
|
9852
9852
|
return o.type ? o.type === "Mesh" : o.isMesh;
|
|
9853
9853
|
}
|
|
9854
9854
|
const kn = new pn();
|
|
9855
9855
|
kn.crossOrigin = "anonymous";
|
|
9856
|
-
class
|
|
9856
|
+
class Ac extends Bt {
|
|
9857
9857
|
constructor(e) {
|
|
9858
|
-
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 qi(), this.sizeBox = new
|
|
9858
|
+
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 qi(), this.sizeBox = new xc(), this._goodsSize = new ac(0, 0, 0), this._slots = [], this._logos = [], this._skins = [], this._levels = /* @__PURE__ */ new Map(), 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._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;
|
|
9859
9859
|
}
|
|
9860
9860
|
get shapeKeys() {
|
|
9861
9861
|
return this._shapeKeys;
|
|
@@ -10217,7 +10217,7 @@ class bc extends Bt {
|
|
|
10217
10217
|
if (!this._shelf)
|
|
10218
10218
|
return;
|
|
10219
10219
|
this._shelf.traverse((u) => {
|
|
10220
|
-
|
|
10220
|
+
bc(u) && (this.setShapeKeyToMesh(u, "goodsWidth", this._goodsSize.width), this.setShapeKeyToMesh(u, "goodsLength", this._goodsSize.length));
|
|
10221
10221
|
});
|
|
10222
10222
|
const n = this._shelf.clone(!0);
|
|
10223
10223
|
n.position.z += t * a, this._shelves.set(a, n), (s = this._shelf.parent) == null || s.add(n);
|
|
@@ -10283,11 +10283,11 @@ class bc extends Bt {
|
|
|
10283
10283
|
}
|
|
10284
10284
|
generateDimension(e, t) {
|
|
10285
10285
|
if (e.userData.isDimension) {
|
|
10286
|
-
const i = e.userData.divider, s =
|
|
10286
|
+
const i = e.userData.divider, s = sc(e.userData.startOrigin), a = e.userData.axios;
|
|
10287
10287
|
let n, c;
|
|
10288
10288
|
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)
|
|
10289
10289
|
return;
|
|
10290
|
-
const d = new
|
|
10290
|
+
const d = new yc({
|
|
10291
10291
|
start: n,
|
|
10292
10292
|
end: c,
|
|
10293
10293
|
startOrigin: s,
|
|
@@ -10363,41 +10363,78 @@ class bc extends Bt {
|
|
|
10363
10363
|
}
|
|
10364
10364
|
}
|
|
10365
10365
|
clean() {
|
|
10366
|
-
this._emitter.removeAllListeners(), this.controllers.forEach((e) => e.dispose()), this.controllers = [], We(this._container), this._levels.forEach((e) => e.destroy()), this._levels.clear(), 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._mixer && this._mixer.stopAllAction(), this._mixer = void 0, this._clips = [], this._actionsMap.clear(), this.actions = [], this._app && this._onTicker && this._app.renderer.domElement.removeEventListener("ticker", this._onTicker), this._onTicker = void 0;
|
|
10366
|
+
this._emitter.removeAllListeners(), this.controllers.forEach((e) => e.dispose()), this.controllers = [], We(this._container), this._levels.forEach((e) => e.destroy()), this._levels.clear(), 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._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._app && this._onTicker && this._app.renderer.domElement.removeEventListener("ticker", this._onTicker), this._onTicker = void 0;
|
|
10367
10367
|
}
|
|
10368
10368
|
destroy() {
|
|
10369
10369
|
this.clean(), this.sizeBox.destroy();
|
|
10370
10370
|
}
|
|
10371
|
-
playAction(e, t
|
|
10372
|
-
const s = this._actionsMap.get(e);
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10371
|
+
playAction(e, t) {
|
|
10372
|
+
const i = Object.keys(t || {}).includes("reset") ? t == null ? void 0 : t.reset : !0, s = this._actionsMap.get(e);
|
|
10373
|
+
if (!s || !this._mixer)
|
|
10374
|
+
return Promise.reject(new Error(`Action "${e}" not found or mixer not initialized.`));
|
|
10375
|
+
if (s.isRunning() && s === this._currentAction)
|
|
10376
|
+
return Promise.resolve();
|
|
10377
|
+
const a = this._currentAction, n = a === s, c = n ? 0 : (t == null ? void 0 : t.fadeIn) ?? (t == null ? void 0 : t.fadeOut) ?? 0.3, u = a && !n && a.isRunning();
|
|
10378
|
+
this._actionsMap.forEach((r) => {
|
|
10379
|
+
r !== s && r !== a && (r.stopFading(), r.setEffectiveWeight(0), r.stop());
|
|
10380
|
+
});
|
|
10381
|
+
const f = (t == null ? void 0 : t.loop) ?? !1;
|
|
10382
|
+
(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 ? oo : ao, f ? 1 / 0 : 1), s.clampWhenFinished = (t == null ? void 0 : t.clampWhenFinished) ?? !f, s.play();
|
|
10383
|
+
const d = (t == null ? void 0 : t.timeScale) ?? 1;
|
|
10384
|
+
return u ? (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) => {
|
|
10385
|
+
this._pendingFinishedCallback && this._mixer && this._mixer.removeEventListener("finished", this._pendingFinishedCallback);
|
|
10386
|
+
const l = (h) => {
|
|
10387
|
+
var m;
|
|
10388
|
+
h.action === s && ((m = this._mixer) == null || m.removeEventListener("finished", l), this._pendingFinishedCallback = null, r());
|
|
10379
10389
|
};
|
|
10380
|
-
this._mixer.addEventListener("finished",
|
|
10381
|
-
})
|
|
10390
|
+
this._pendingFinishedCallback = l, this._mixer.addEventListener("finished", l);
|
|
10391
|
+
});
|
|
10382
10392
|
}
|
|
10383
10393
|
pauseAction(e) {
|
|
10384
10394
|
const t = this._actionsMap.get(e);
|
|
10385
10395
|
t && (t.paused = !0);
|
|
10386
10396
|
}
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10397
|
+
/**
|
|
10398
|
+
* 停止指定动画
|
|
10399
|
+
* @param name 动画名称
|
|
10400
|
+
* @param fadeOut 淡出时间(秒),默认 0.3,设为 0 则立即停止
|
|
10401
|
+
*/
|
|
10402
|
+
stopAction(e, t = 0.3) {
|
|
10403
|
+
const i = this._actionsMap.get(e);
|
|
10404
|
+
return !i || !i.isRunning() ? Promise.resolve() : (this._currentAction === i && (this._currentAction = null), t > 0 ? (i.fadeOut(t), new Promise((s) => {
|
|
10405
|
+
setTimeout(() => {
|
|
10406
|
+
i.stop(), s();
|
|
10407
|
+
}, t * 1e3);
|
|
10408
|
+
})) : (i.stop(), Promise.resolve()));
|
|
10409
|
+
}
|
|
10410
|
+
/**
|
|
10411
|
+
* 停止所有动画
|
|
10412
|
+
* @param fadeOut 淡出时间(秒),默认 0.3,设为 0 则立即停止
|
|
10413
|
+
*/
|
|
10414
|
+
stopAllActions(e = 0.3) {
|
|
10415
|
+
return this._mixer ? (this._currentAction = null, e > 0 ? (this._actionsMap.forEach((t) => {
|
|
10416
|
+
t.isRunning() && t.fadeOut(e);
|
|
10417
|
+
}), new Promise((t) => {
|
|
10418
|
+
setTimeout(() => {
|
|
10419
|
+
var i;
|
|
10420
|
+
(i = this._mixer) == null || i.stopAllAction(), t();
|
|
10421
|
+
}, e * 1e3);
|
|
10422
|
+
})) : (this._mixer.stopAllAction(), Promise.resolve())) : Promise.resolve();
|
|
10423
|
+
}
|
|
10424
|
+
}
|
|
10425
|
+
const Bn = 0, Tc = 1, Sc = 2, Qr = 2, cs = 1.25, Yr = 1, ii = 6 * 4 + 4 + 4, Zi = 65535, Mc = Math.pow(2, -24), us = Symbol("SKIP_GENERATION");
|
|
10426
|
+
function Cc(o) {
|
|
10390
10427
|
return o.index ? o.index.count : o.attributes.position.count;
|
|
10391
10428
|
}
|
|
10392
10429
|
function zt(o) {
|
|
10393
|
-
return
|
|
10430
|
+
return Cc(o) / 3;
|
|
10394
10431
|
}
|
|
10395
|
-
function
|
|
10432
|
+
function Ic(o, e = ArrayBuffer) {
|
|
10396
10433
|
return o > 65535 ? new Uint32Array(new e(4 * o)) : new Uint16Array(new e(2 * o));
|
|
10397
10434
|
}
|
|
10398
|
-
function
|
|
10435
|
+
function Rc(o, e) {
|
|
10399
10436
|
if (!o.index) {
|
|
10400
|
-
const t = o.attributes.position.count, i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s =
|
|
10437
|
+
const t = o.attributes.position.count, i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = Ic(t, i);
|
|
10401
10438
|
o.setIndex(new fe(s, 1));
|
|
10402
10439
|
for (let a = 0; a < t; a++)
|
|
10403
10440
|
s[a] = a;
|
|
@@ -10428,7 +10465,7 @@ function zn(o) {
|
|
|
10428
10465
|
}
|
|
10429
10466
|
return e;
|
|
10430
10467
|
}
|
|
10431
|
-
function
|
|
10468
|
+
function Pc(o) {
|
|
10432
10469
|
if (o.groups.length === 0)
|
|
10433
10470
|
return !1;
|
|
10434
10471
|
const e = zt(o), t = zn(o).sort((a, n) => a.offset - n.offset), i = t[t.length - 1];
|
|
@@ -10443,8 +10480,8 @@ function hs(o, e, t, i, s) {
|
|
|
10443
10480
|
w < a && (a = w), A > u && (u = A), y < r && (r = y), y > m && (m = y);
|
|
10444
10481
|
const S = o[g + 2], C = o[g + 3], M = S - C, R = S + C;
|
|
10445
10482
|
M < n && (n = M), R > f && (f = R), S < l && (l = S), S > v && (v = S);
|
|
10446
|
-
const
|
|
10447
|
-
I < c && (c = I),
|
|
10483
|
+
const P = o[g + 4], T = o[g + 5], I = P - T, D = P + T;
|
|
10484
|
+
I < c && (c = I), D > d && (d = D), P < h && (h = P), P > p && (p = P);
|
|
10448
10485
|
}
|
|
10449
10486
|
i[0] = a, i[1] = n, i[2] = c, i[3] = u, i[4] = f, i[5] = d, s[0] = r, s[1] = l, s[2] = h, s[3] = m, s[4] = v, s[5] = p;
|
|
10450
10487
|
}
|
|
@@ -10468,7 +10505,7 @@ function Dc(o, e = null, t = null, i = null) {
|
|
|
10468
10505
|
let C = x;
|
|
10469
10506
|
w > C && (C = w), A > C && (C = A);
|
|
10470
10507
|
const M = (C - S) / 2, R = y * 2;
|
|
10471
|
-
u[v + R + 0] = S + M, u[v + R + 1] = M + (Math.abs(S) + M) *
|
|
10508
|
+
u[v + R + 0] = S + M, u[v + R + 1] = M + (Math.abs(S) + M) * Mc;
|
|
10472
10509
|
}
|
|
10473
10510
|
}
|
|
10474
10511
|
return u;
|
|
@@ -10504,26 +10541,26 @@ function qt(o) {
|
|
|
10504
10541
|
const e = o[3] - o[0], t = o[4] - o[1], i = o[5] - o[2];
|
|
10505
10542
|
return 2 * (e * t + t * i + i * e);
|
|
10506
10543
|
}
|
|
10507
|
-
const
|
|
10544
|
+
const De = 32, Ec = (o, e) => o.candidate - e.candidate, je = new Array(De).fill().map(() => ({
|
|
10508
10545
|
count: 0,
|
|
10509
10546
|
bounds: new Float32Array(6),
|
|
10510
10547
|
rightCacheBounds: new Float32Array(6),
|
|
10511
10548
|
leftCacheBounds: new Float32Array(6),
|
|
10512
10549
|
candidate: 0
|
|
10513
10550
|
})), _i = new Float32Array(6);
|
|
10514
|
-
function
|
|
10551
|
+
function Lc(o, e, t, i, s, a) {
|
|
10515
10552
|
let n = -1, c = 0;
|
|
10516
10553
|
if (a === Bn)
|
|
10517
10554
|
n = Zr(e), n !== -1 && (c = (e[n] + e[n + 3]) / 2);
|
|
10518
|
-
else if (a ===
|
|
10519
|
-
n = Zr(o), n !== -1 && (c =
|
|
10520
|
-
else if (a ===
|
|
10555
|
+
else if (a === Tc)
|
|
10556
|
+
n = Zr(o), n !== -1 && (c = Fc(t, i, s, n));
|
|
10557
|
+
else if (a === Sc) {
|
|
10521
10558
|
const u = qt(o);
|
|
10522
10559
|
let f = cs * s;
|
|
10523
10560
|
const d = i * 6, r = (i + s) * 6;
|
|
10524
10561
|
for (let l = 0; l < 3; l++) {
|
|
10525
|
-
const h = e[l], p = (e[l + 3] - h) /
|
|
10526
|
-
if (s <
|
|
10562
|
+
const h = e[l], p = (e[l + 3] - h) / De;
|
|
10563
|
+
if (s < De / 4) {
|
|
10527
10564
|
const g = [...je];
|
|
10528
10565
|
g.length = s;
|
|
10529
10566
|
let _ = 0;
|
|
@@ -10539,7 +10576,7 @@ function Ec(o, e, t, i, s, a) {
|
|
|
10539
10576
|
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;
|
|
10540
10577
|
vi(x, t, A);
|
|
10541
10578
|
}
|
|
10542
|
-
g.sort(
|
|
10579
|
+
g.sort(Ec);
|
|
10543
10580
|
let y = s;
|
|
10544
10581
|
for (let x = 0; x < y; x++) {
|
|
10545
10582
|
const w = g[x];
|
|
@@ -10557,13 +10594,13 @@ function Ec(o, e, t, i, s, a) {
|
|
|
10557
10594
|
const w = g[x], A = w.count, S = s - w.count, C = w.leftCacheBounds, M = w.rightCacheBounds;
|
|
10558
10595
|
let R = 0;
|
|
10559
10596
|
A !== 0 && (R = qt(C) / u);
|
|
10560
|
-
let
|
|
10561
|
-
S !== 0 && (
|
|
10562
|
-
const T = Yr + cs * (R * A +
|
|
10597
|
+
let P = 0;
|
|
10598
|
+
S !== 0 && (P = qt(M) / u);
|
|
10599
|
+
const T = Yr + cs * (R * A + P * S);
|
|
10563
10600
|
T < f && (n = l, f = T, c = w.candidate);
|
|
10564
10601
|
}
|
|
10565
10602
|
} else {
|
|
10566
|
-
for (let y = 0; y <
|
|
10603
|
+
for (let y = 0; y < De; y++) {
|
|
10567
10604
|
const x = je[y];
|
|
10568
10605
|
x.count = 0, x.candidate = h + p + y * p;
|
|
10569
10606
|
const w = x.bounds;
|
|
@@ -10572,25 +10609,25 @@ function Ec(o, e, t, i, s, a) {
|
|
|
10572
10609
|
}
|
|
10573
10610
|
for (let y = d; y < r; y += 6) {
|
|
10574
10611
|
let A = ~~((t[y + 2 * l] - h) / p);
|
|
10575
|
-
A >=
|
|
10612
|
+
A >= De && (A = De - 1);
|
|
10576
10613
|
const S = je[A];
|
|
10577
10614
|
S.count++, vi(y, t, S.bounds);
|
|
10578
10615
|
}
|
|
10579
|
-
const g = je[
|
|
10616
|
+
const g = je[De - 1];
|
|
10580
10617
|
Xr(g.bounds, g.rightCacheBounds);
|
|
10581
|
-
for (let y =
|
|
10618
|
+
for (let y = De - 2; y >= 0; y--) {
|
|
10582
10619
|
const x = je[y], w = je[y + 1];
|
|
10583
10620
|
Kr(x.bounds, w.rightCacheBounds, x.rightCacheBounds);
|
|
10584
10621
|
}
|
|
10585
10622
|
let _ = 0;
|
|
10586
|
-
for (let y = 0; y <
|
|
10623
|
+
for (let y = 0; y < De - 1; y++) {
|
|
10587
10624
|
const x = je[y], w = x.count, A = x.bounds, C = je[y + 1].rightCacheBounds;
|
|
10588
10625
|
w !== 0 && (_ === 0 ? Xr(A, _i) : Kr(A, _i, _i)), _ += w;
|
|
10589
10626
|
let M = 0, R = 0;
|
|
10590
10627
|
_ !== 0 && (M = qt(_i) / u);
|
|
10591
|
-
const
|
|
10592
|
-
|
|
10593
|
-
const T = Yr + cs * (M * _ + R *
|
|
10628
|
+
const P = s - _;
|
|
10629
|
+
P !== 0 && (R = qt(C) / u);
|
|
10630
|
+
const T = Yr + cs * (M * _ + R * P);
|
|
10594
10631
|
T < f && (n = l, f = T, c = x.candidate);
|
|
10595
10632
|
}
|
|
10596
10633
|
}
|
|
@@ -10599,7 +10636,7 @@ function Ec(o, e, t, i, s, a) {
|
|
|
10599
10636
|
console.warn(`MeshBVH: Invalid build strategy value ${a} used.`);
|
|
10600
10637
|
return { axis: n, pos: c };
|
|
10601
10638
|
}
|
|
10602
|
-
function
|
|
10639
|
+
function Fc(o, e, t, i) {
|
|
10603
10640
|
let s = 0;
|
|
10604
10641
|
for (let a = e, n = e + t; a < n; a++)
|
|
10605
10642
|
s += o[a * 6 + i * 2];
|
|
@@ -10610,7 +10647,7 @@ class fs {
|
|
|
10610
10647
|
this.boundingData = new Float32Array(6);
|
|
10611
10648
|
}
|
|
10612
10649
|
}
|
|
10613
|
-
function
|
|
10650
|
+
function kc(o, e, t, i, s, a) {
|
|
10614
10651
|
let n = i, c = i + s - 1;
|
|
10615
10652
|
const u = a.pos, f = a.axis * 2;
|
|
10616
10653
|
for (; ; ) {
|
|
@@ -10632,7 +10669,7 @@ function Fc(o, e, t, i, s, a) {
|
|
|
10632
10669
|
return n;
|
|
10633
10670
|
}
|
|
10634
10671
|
}
|
|
10635
|
-
function
|
|
10672
|
+
function Bc(o, e, t, i, s, a) {
|
|
10636
10673
|
let n = i, c = i + s - 1;
|
|
10637
10674
|
const u = a.pos, f = a.axis * 2;
|
|
10638
10675
|
for (; ; ) {
|
|
@@ -10671,11 +10708,11 @@ function Un(o, e) {
|
|
|
10671
10708
|
return e[o + 7];
|
|
10672
10709
|
}
|
|
10673
10710
|
let Hn, $t, Li, Wn;
|
|
10674
|
-
const
|
|
10711
|
+
const Oc = Math.pow(2, 32);
|
|
10675
10712
|
function Es(o) {
|
|
10676
10713
|
return "count" in o ? 1 : 1 + Es(o.left) + Es(o.right);
|
|
10677
10714
|
}
|
|
10678
|
-
function
|
|
10715
|
+
function zc(o, e, t) {
|
|
10679
10716
|
return Hn = new Float32Array(t), $t = new Uint32Array(t), Li = new Uint16Array(t), Wn = new Uint8Array(t), Ls(o, e);
|
|
10680
10717
|
}
|
|
10681
10718
|
function Ls(o, e) {
|
|
@@ -10698,18 +10735,18 @@ function Ls(o, e) {
|
|
|
10698
10735
|
else {
|
|
10699
10736
|
const n = e.left, c = e.right, u = e.splitAxis;
|
|
10700
10737
|
let f;
|
|
10701
|
-
if (f = Ls(o + ii, n), f / 4 >
|
|
10738
|
+
if (f = Ls(o + ii, n), f / 4 > Oc)
|
|
10702
10739
|
throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
|
|
10703
10740
|
return $t[t + 6] = f / 4, f = Ls(f, c), $t[t + 7] = u, f;
|
|
10704
10741
|
}
|
|
10705
10742
|
}
|
|
10706
|
-
function
|
|
10743
|
+
function Uc(o, e) {
|
|
10707
10744
|
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);
|
|
10708
10745
|
for (let c = 0, u = n.length; c < u; c++)
|
|
10709
10746
|
n[c] = c;
|
|
10710
10747
|
return n;
|
|
10711
10748
|
}
|
|
10712
|
-
function
|
|
10749
|
+
function Hc(o, e, t, i, s) {
|
|
10713
10750
|
const {
|
|
10714
10751
|
maxDepth: a,
|
|
10715
10752
|
verbose: n,
|
|
@@ -10717,7 +10754,7 @@ function Uc(o, e, t, i, s) {
|
|
|
10717
10754
|
strategy: u,
|
|
10718
10755
|
onProgress: f,
|
|
10719
10756
|
indirect: d
|
|
10720
|
-
} = s, r = o._indirectBuffer, l = o.geometry, h = l.index ? l.index.array : null, m = d ?
|
|
10757
|
+
} = s, r = o._indirectBuffer, l = o.geometry, h = l.index ? l.index.array : null, m = d ? Bc : kc, v = zt(l), p = new Float32Array(6);
|
|
10721
10758
|
let g = !1;
|
|
10722
10759
|
const _ = new fs();
|
|
10723
10760
|
return hs(e, t, i, _.boundingData, p), x(_, t, i, p), _;
|
|
@@ -10727,31 +10764,31 @@ function Uc(o, e, t, i, s) {
|
|
|
10727
10764
|
function x(w, A, S, C = null, M = 0) {
|
|
10728
10765
|
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)
|
|
10729
10766
|
return y(A + S), w.offset = A, w.count = S, w;
|
|
10730
|
-
const R =
|
|
10767
|
+
const R = Lc(w.boundingData, C, e, A, S, u);
|
|
10731
10768
|
if (R.axis === -1)
|
|
10732
10769
|
return y(A + S), w.offset = A, w.count = S, w;
|
|
10733
|
-
const
|
|
10734
|
-
if (
|
|
10770
|
+
const P = m(r, h, e, A, S, R);
|
|
10771
|
+
if (P === A || P === A + S)
|
|
10735
10772
|
y(A + S), w.offset = A, w.count = S;
|
|
10736
10773
|
else {
|
|
10737
10774
|
w.splitAxis = R.axis;
|
|
10738
|
-
const T = new fs(), I = A,
|
|
10739
|
-
w.left = T, hs(e, I,
|
|
10740
|
-
const L = new fs(), F =
|
|
10775
|
+
const T = new fs(), I = A, D = P - A;
|
|
10776
|
+
w.left = T, hs(e, I, D, T.boundingData, p), x(T, I, D, p, M + 1);
|
|
10777
|
+
const L = new fs(), F = P, U = S - D;
|
|
10741
10778
|
w.right = L, hs(e, F, U, L.boundingData, p), x(L, F, U, p, M + 1);
|
|
10742
10779
|
}
|
|
10743
10780
|
return w;
|
|
10744
10781
|
}
|
|
10745
10782
|
}
|
|
10746
|
-
function
|
|
10783
|
+
function Wc(o, e) {
|
|
10747
10784
|
const t = o.geometry;
|
|
10748
|
-
e.indirect && (o._indirectBuffer =
|
|
10785
|
+
e.indirect && (o._indirectBuffer = Uc(t, e.useSharedArrayBuffer), Pc(t) && !e.verbose && console.warn(
|
|
10749
10786
|
'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.'
|
|
10750
|
-
)), o._indirectBuffer ||
|
|
10787
|
+
)), o._indirectBuffer || Rc(t, e);
|
|
10751
10788
|
const i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = Dc(t), a = e.indirect ? On(t) : zn(t);
|
|
10752
10789
|
o._roots = a.map((n) => {
|
|
10753
|
-
const c =
|
|
10754
|
-
return
|
|
10790
|
+
const c = Hc(o, s, n.offset, n.count, e), u = Es(c), f = new i(ii * u);
|
|
10791
|
+
return zc(0, c, f), f;
|
|
10755
10792
|
});
|
|
10756
10793
|
}
|
|
10757
10794
|
class Ve {
|
|
@@ -10793,7 +10830,7 @@ Ve.prototype.setFromBox = function() {
|
|
|
10793
10830
|
this.min = n, this.max = c;
|
|
10794
10831
|
};
|
|
10795
10832
|
}();
|
|
10796
|
-
const
|
|
10833
|
+
const Vc = function() {
|
|
10797
10834
|
const o = new b(), e = new b(), t = new b();
|
|
10798
10835
|
return function(s, a, n) {
|
|
10799
10836
|
const c = s.start, u = o, f = a.start, d = e;
|
|
@@ -10805,7 +10842,7 @@ const Wc = function() {
|
|
|
10805
10842
|
}(), Js = function() {
|
|
10806
10843
|
const o = new z(), e = new b(), t = new b();
|
|
10807
10844
|
return function(s, a, n, c) {
|
|
10808
|
-
|
|
10845
|
+
Vc(s, a, o);
|
|
10809
10846
|
let u = o.x, f = o.y;
|
|
10810
10847
|
if (u >= 0 && u <= 1 && f >= 0 && f <= 1) {
|
|
10811
10848
|
s.at(u, n), a.at(f, c);
|
|
@@ -10831,7 +10868,7 @@ const Wc = function() {
|
|
|
10831
10868
|
}
|
|
10832
10869
|
}
|
|
10833
10870
|
};
|
|
10834
|
-
}(),
|
|
10871
|
+
}(), Nc = function() {
|
|
10835
10872
|
const o = new b(), e = new b(), t = new Ns(), i = new ze();
|
|
10836
10873
|
return function(a, n) {
|
|
10837
10874
|
const { radius: c, center: u } = a, { a: f, b: d, c: r } = n;
|
|
@@ -10845,16 +10882,16 @@ const Wc = function() {
|
|
|
10845
10882
|
}
|
|
10846
10883
|
return !1;
|
|
10847
10884
|
};
|
|
10848
|
-
}(),
|
|
10885
|
+
}(), Gc = 1e-15;
|
|
10849
10886
|
function ds(o) {
|
|
10850
|
-
return Math.abs(o) <
|
|
10887
|
+
return Math.abs(o) < Gc;
|
|
10851
10888
|
}
|
|
10852
10889
|
class Ce extends Kt {
|
|
10853
10890
|
constructor(...e) {
|
|
10854
10891
|
super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new b()), this.satBounds = new Array(4).fill().map(() => new Ve()), this.points = [this.a, this.b, this.c], this.sphere = new ji(), this.plane = new Ns(), this.needsUpdate = !0;
|
|
10855
10892
|
}
|
|
10856
10893
|
intersectsSphere(e) {
|
|
10857
|
-
return
|
|
10894
|
+
return Nc(e, this);
|
|
10858
10895
|
}
|
|
10859
10896
|
update() {
|
|
10860
10897
|
const e = this.a, t = this.b, i = this.c, s = this.points, a = this.satAxes, n = this.satBounds, c = a[0], u = n[0];
|
|
@@ -10913,21 +10950,21 @@ Ce.prototype.intersectsTriangle = function() {
|
|
|
10913
10950
|
const w = this.satBounds, A = this.satAxes;
|
|
10914
10951
|
t[0] = p.a, t[1] = p.b, t[2] = p.c;
|
|
10915
10952
|
for (let M = 0; M < 4; M++) {
|
|
10916
|
-
const R = w[M],
|
|
10917
|
-
if (i.setFromPoints(
|
|
10953
|
+
const R = w[M], P = A[M];
|
|
10954
|
+
if (i.setFromPoints(P, t), R.isSeparated(i))
|
|
10918
10955
|
return !1;
|
|
10919
10956
|
}
|
|
10920
10957
|
const S = p.satBounds, C = p.satAxes;
|
|
10921
10958
|
e[0] = this.a, e[1] = this.b, e[2] = this.c;
|
|
10922
10959
|
for (let M = 0; M < 4; M++) {
|
|
10923
|
-
const R = S[M],
|
|
10924
|
-
if (i.setFromPoints(
|
|
10960
|
+
const R = S[M], P = C[M];
|
|
10961
|
+
if (i.setFromPoints(P, e), R.isSeparated(i))
|
|
10925
10962
|
return !1;
|
|
10926
10963
|
}
|
|
10927
10964
|
for (let M = 0; M < 4; M++) {
|
|
10928
10965
|
const R = A[M];
|
|
10929
|
-
for (let
|
|
10930
|
-
const T = C[
|
|
10966
|
+
for (let P = 0; P < 4; P++) {
|
|
10967
|
+
const T = C[P];
|
|
10931
10968
|
if (a.crossVectors(R, T), i.setFromPoints(a, e), s.setFromPoints(a, t), i.isSeparated(s))
|
|
10932
10969
|
return !1;
|
|
10933
10970
|
}
|
|
@@ -10948,8 +10985,8 @@ Ce.prototype.intersectsTriangle = function() {
|
|
|
10948
10985
|
let I = l.start;
|
|
10949
10986
|
l.start = l.end, l.end = I;
|
|
10950
10987
|
}
|
|
10951
|
-
const S = r.start.dot(c), C = r.end.dot(c), M = l.start.dot(c), R = l.end.dot(c),
|
|
10952
|
-
return S !== R && M !== C &&
|
|
10988
|
+
const S = r.start.dot(c), C = r.end.dot(c), M = l.start.dot(c), R = l.end.dot(c), P = C < M, T = S < R;
|
|
10989
|
+
return S !== R && M !== C && P === T ? !1 : (g && (f.subVectors(r.start, l.start), f.dot(c) > 0 ? g.start.copy(r.start) : g.start.copy(l.start), f.subVectors(r.end, l.end), f.dot(c) < 0 ? g.end.copy(r.end) : g.end.copy(l.end)), !0);
|
|
10953
10990
|
}
|
|
10954
10991
|
};
|
|
10955
10992
|
}();
|
|
@@ -11089,8 +11126,8 @@ re.prototype.distanceToBox = function() {
|
|
|
11089
11126
|
for (let _ = 0; _ <= 1; _++) {
|
|
11090
11127
|
const y = (p + 1) % 3, x = (p + 2) % 3, w = g << y | _ << x, A = 1 << p | g << y | _ << x, S = h[w], C = h[A];
|
|
11091
11128
|
e[v].set(S, C);
|
|
11092
|
-
const R = o[p],
|
|
11093
|
-
|
|
11129
|
+
const R = o[p], P = o[y], T = o[x], I = t[v], D = I.start, L = I.end;
|
|
11130
|
+
D[R] = r[R], D[P] = g ? r[P] : l[P], D[T] = _ ? r[T] : l[P], L[R] = l[R], L[P] = g ? r[P] : l[P], L[T] = _ ? r[T] : l[P], v++;
|
|
11094
11131
|
}
|
|
11095
11132
|
for (let p = 0; p <= 1; p++)
|
|
11096
11133
|
for (let g = 0; g <= 1; g++)
|
|
@@ -11125,13 +11162,13 @@ class $s {
|
|
|
11125
11162
|
this._primitives.push(e);
|
|
11126
11163
|
}
|
|
11127
11164
|
}
|
|
11128
|
-
class
|
|
11165
|
+
class qc extends $s {
|
|
11129
11166
|
constructor() {
|
|
11130
11167
|
super(() => new Ce());
|
|
11131
11168
|
}
|
|
11132
11169
|
}
|
|
11133
|
-
const xe = /* @__PURE__ */ new
|
|
11134
|
-
class
|
|
11170
|
+
const xe = /* @__PURE__ */ new qc();
|
|
11171
|
+
class jc {
|
|
11135
11172
|
constructor() {
|
|
11136
11173
|
this.float32Array = null, this.uint16Array = null, this.uint32Array = null;
|
|
11137
11174
|
const e = [];
|
|
@@ -11143,10 +11180,10 @@ class qc {
|
|
|
11143
11180
|
};
|
|
11144
11181
|
}
|
|
11145
11182
|
}
|
|
11146
|
-
const N = new
|
|
11183
|
+
const N = new jc();
|
|
11147
11184
|
let $e, It;
|
|
11148
11185
|
const mt = [], yi = /* @__PURE__ */ new $s(() => new Y());
|
|
11149
|
-
function
|
|
11186
|
+
function Qc(o, e, t, i, s, a) {
|
|
11150
11187
|
$e = yi.getPrimitive(), It = yi.getPrimitive(), mt.push($e, It), N.setBuffer(o._roots[e]);
|
|
11151
11188
|
const n = Fs(0, o.geometry, t, i, s, a);
|
|
11152
11189
|
N.clearBuffer(), yi.releasePrimitive($e), yi.releasePrimitive(It), mt.pop(), mt.pop();
|
|
@@ -11161,17 +11198,17 @@ function Fs(o, e, t, i, s = null, a = 0, n = 0) {
|
|
|
11161
11198
|
return j(o, c, $e), i(l, h, !1, n, a + o, $e);
|
|
11162
11199
|
} else {
|
|
11163
11200
|
let R = function(T) {
|
|
11164
|
-
const { uint16Array: I, uint32Array:
|
|
11201
|
+
const { uint16Array: I, uint32Array: D } = N;
|
|
11165
11202
|
let L = T * 2;
|
|
11166
11203
|
for (; !ae(L, I); )
|
|
11167
11204
|
T = _e(T), L = T * 2;
|
|
11168
|
-
return de(T,
|
|
11169
|
-
},
|
|
11170
|
-
const { uint16Array: I, uint32Array:
|
|
11205
|
+
return de(T, D);
|
|
11206
|
+
}, P = function(T) {
|
|
11207
|
+
const { uint16Array: I, uint32Array: D } = N;
|
|
11171
11208
|
let L = T * 2;
|
|
11172
11209
|
for (; !ae(L, I); )
|
|
11173
|
-
T = ye(T,
|
|
11174
|
-
return de(T,
|
|
11210
|
+
T = ye(T, D), L = T * 2;
|
|
11211
|
+
return de(T, D) + ve(L, I);
|
|
11175
11212
|
};
|
|
11176
11213
|
const l = _e(o), h = ye(o, f);
|
|
11177
11214
|
let m = l, v = h, p, g, _, y;
|
|
@@ -11184,8 +11221,8 @@ function Fs(o, e, t, i, s = null, a = 0, n = 0) {
|
|
|
11184
11221
|
const x = ae(m * 2, u), w = t(_, x, p, n + 1, a + m);
|
|
11185
11222
|
let A;
|
|
11186
11223
|
if (w === Qr) {
|
|
11187
|
-
const T = R(m),
|
|
11188
|
-
A = i(T,
|
|
11224
|
+
const T = R(m), D = P(m) - T;
|
|
11225
|
+
A = i(T, D, !0, n + 1, a + m, _);
|
|
11189
11226
|
} else
|
|
11190
11227
|
A = w && Fs(
|
|
11191
11228
|
m,
|
|
@@ -11202,8 +11239,8 @@ function Fs(o, e, t, i, s = null, a = 0, n = 0) {
|
|
|
11202
11239
|
const S = ae(v * 2, u), C = t(y, S, g, n + 1, a + v);
|
|
11203
11240
|
let M;
|
|
11204
11241
|
if (C === Qr) {
|
|
11205
|
-
const T = R(v),
|
|
11206
|
-
M = i(T,
|
|
11242
|
+
const T = R(v), D = P(v) - T;
|
|
11243
|
+
M = i(T, D, !0, n + 1, a + v, y);
|
|
11207
11244
|
} else
|
|
11208
11245
|
M = C && Fs(
|
|
11209
11246
|
v,
|
|
@@ -11218,7 +11255,7 @@ function Fs(o, e, t, i, s = null, a = 0, n = 0) {
|
|
|
11218
11255
|
}
|
|
11219
11256
|
}
|
|
11220
11257
|
const jt = /* @__PURE__ */ new b(), ps = /* @__PURE__ */ new b();
|
|
11221
|
-
function
|
|
11258
|
+
function Yc(o, e, t = {}, i = 0, s = 1 / 0) {
|
|
11222
11259
|
const a = i * i, n = s * s;
|
|
11223
11260
|
let c = 1 / 0, u = null;
|
|
11224
11261
|
if (o.shapecast(
|
|
@@ -11237,7 +11274,7 @@ function Qc(o, e, t = {}, i = 0, s = 1 / 0) {
|
|
|
11237
11274
|
return t.point ? t.point.copy(ps) : t.point = ps.clone(), t.distance = f, t.faceIndex = u, t;
|
|
11238
11275
|
}
|
|
11239
11276
|
const gt = /* @__PURE__ */ new b(), vt = /* @__PURE__ */ new b(), _t = /* @__PURE__ */ new b(), xi = /* @__PURE__ */ new z(), wi = /* @__PURE__ */ new z(), bi = /* @__PURE__ */ new z(), Jr = /* @__PURE__ */ new b(), $r = /* @__PURE__ */ new b(), en = /* @__PURE__ */ new b(), Ai = /* @__PURE__ */ new b();
|
|
11240
|
-
function
|
|
11277
|
+
function Zc(o, e, t, i, s, a, n, c) {
|
|
11241
11278
|
let u;
|
|
11242
11279
|
if (a === fn ? u = o.intersectTriangle(i, t, e, !0, s) : u = o.intersectTriangle(e, t, i, a !== oi, s), u === null)
|
|
11243
11280
|
return null;
|
|
@@ -11247,9 +11284,9 @@ function Yc(o, e, t, i, s, a, n, c) {
|
|
|
11247
11284
|
point: s.clone()
|
|
11248
11285
|
};
|
|
11249
11286
|
}
|
|
11250
|
-
function
|
|
11287
|
+
function Xc(o, e, t, i, s, a, n, c, u, f, d) {
|
|
11251
11288
|
gt.fromBufferAttribute(e, a), vt.fromBufferAttribute(e, n), _t.fromBufferAttribute(e, c);
|
|
11252
|
-
const r =
|
|
11289
|
+
const r = Zc(o, gt, vt, _t, Ai, u, f, d);
|
|
11253
11290
|
if (r) {
|
|
11254
11291
|
i && (xi.fromBufferAttribute(i, a), wi.fromBufferAttribute(i, n), bi.fromBufferAttribute(i, c), r.uv = Kt.getInterpolation(Ai, gt, vt, _t, xi, wi, bi, new z())), s && (xi.fromBufferAttribute(s, a), wi.fromBufferAttribute(s, n), bi.fromBufferAttribute(s, c), r.uv1 = Kt.getInterpolation(Ai, gt, vt, _t, xi, wi, bi, new z())), t && (Jr.fromBufferAttribute(t, a), $r.fromBufferAttribute(t, n), en.fromBufferAttribute(t, c), r.normal = Kt.getInterpolation(Ai, gt, vt, _t, Jr, $r, en, new b()), r.normal.dot(o.direction) > 0 && r.normal.multiplyScalar(-1));
|
|
11255
11292
|
const l = {
|
|
@@ -11268,7 +11305,7 @@ function Xi(o, e, t, i, s, a, n) {
|
|
|
11268
11305
|
let u = c + 0, f = c + 1, d = c + 2;
|
|
11269
11306
|
const r = o.index;
|
|
11270
11307
|
o.index && (u = r.getX(u), f = r.getX(f), d = r.getX(d));
|
|
11271
|
-
const { position: l, normal: h, uv: m, uv1: v } = o.attributes, p =
|
|
11308
|
+
const { position: l, normal: h, uv: m, uv1: v } = o.attributes, p = Xc(t, l, h, m, v, u, f, d, e, a, n);
|
|
11272
11309
|
return p ? (p.faceIndex = i, s && s.push(p), p) : null;
|
|
11273
11310
|
}
|
|
11274
11311
|
function Z(o, e, t, i) {
|
|
@@ -11276,12 +11313,12 @@ function Z(o, e, t, i) {
|
|
|
11276
11313
|
let c = e, u = e + 1, f = e + 2;
|
|
11277
11314
|
t && (c = t.getX(c), u = t.getX(u), f = t.getX(f)), s.x = i.getX(c), s.y = i.getY(c), s.z = i.getZ(c), a.x = i.getX(u), a.y = i.getY(u), a.z = i.getZ(u), n.x = i.getX(f), n.y = i.getY(f), n.z = i.getZ(f);
|
|
11278
11315
|
}
|
|
11279
|
-
function
|
|
11316
|
+
function Kc(o, e, t, i, s, a, n, c) {
|
|
11280
11317
|
const { geometry: u, _indirectBuffer: f } = o;
|
|
11281
11318
|
for (let d = i, r = i + s; d < r; d++)
|
|
11282
11319
|
Xi(u, e, t, d, a, n, c);
|
|
11283
11320
|
}
|
|
11284
|
-
function
|
|
11321
|
+
function Jc(o, e, t, i, s, a, n) {
|
|
11285
11322
|
const { geometry: c, _indirectBuffer: u } = o;
|
|
11286
11323
|
let f = 1 / 0, d = null;
|
|
11287
11324
|
for (let r = i, l = i + s; r < l; r++) {
|
|
@@ -11290,7 +11327,7 @@ function Kc(o, e, t, i, s, a, n) {
|
|
|
11290
11327
|
}
|
|
11291
11328
|
return d;
|
|
11292
11329
|
}
|
|
11293
|
-
function
|
|
11330
|
+
function $c(o, e, t, i, s, a, n) {
|
|
11294
11331
|
const { geometry: c } = t, { index: u } = c, f = c.attributes.position;
|
|
11295
11332
|
for (let d = o, r = e + o; d < r; d++) {
|
|
11296
11333
|
let l;
|
|
@@ -11299,7 +11336,7 @@ function Jc(o, e, t, i, s, a, n) {
|
|
|
11299
11336
|
}
|
|
11300
11337
|
return !1;
|
|
11301
11338
|
}
|
|
11302
|
-
function
|
|
11339
|
+
function eu(o, e = null) {
|
|
11303
11340
|
e && Array.isArray(e) && (e = new Set(e));
|
|
11304
11341
|
const t = o.geometry, i = t.index ? t.index.array : null, s = t.attributes.position;
|
|
11305
11342
|
let a, n, c, u, f = 0;
|
|
@@ -11312,9 +11349,9 @@ function $c(o, e = null) {
|
|
|
11312
11349
|
const g = n[l + 6], _ = c[v + 14];
|
|
11313
11350
|
let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, S = -1 / 0, C = -1 / 0;
|
|
11314
11351
|
for (let M = 3 * g, R = 3 * (g + _); M < R; M++) {
|
|
11315
|
-
let
|
|
11316
|
-
const T = s.getX(
|
|
11317
|
-
T < y && (y = T), T > A && (A = T), I < x && (x = I), I > S && (S = I),
|
|
11352
|
+
let P = i[M];
|
|
11353
|
+
const T = s.getX(P), I = s.getY(P), D = s.getZ(P);
|
|
11354
|
+
T < y && (y = T), T > A && (A = T), I < x && (x = I), I > S && (S = I), D < w && (w = D), D > C && (C = D);
|
|
11318
11355
|
}
|
|
11319
11356
|
return u[l + 0] !== y || u[l + 1] !== x || u[l + 2] !== w || u[l + 3] !== A || u[l + 4] !== S || u[l + 5] !== C ? (u[l + 0] = y, u[l + 1] = x, u[l + 2] = w, u[l + 3] = A, u[l + 4] = S, u[l + 5] = C, !0) : !1;
|
|
11320
11357
|
} else {
|
|
@@ -11324,12 +11361,12 @@ function $c(o, e = null) {
|
|
|
11324
11361
|
const C = w || A, M = w || S;
|
|
11325
11362
|
let R = !1;
|
|
11326
11363
|
C && (R = r(g, h, w));
|
|
11327
|
-
let
|
|
11328
|
-
M && (
|
|
11329
|
-
const T = R ||
|
|
11364
|
+
let P = !1;
|
|
11365
|
+
M && (P = r(_, h, w));
|
|
11366
|
+
const T = R || P;
|
|
11330
11367
|
if (T)
|
|
11331
11368
|
for (let I = 0; I < 3; I++) {
|
|
11332
|
-
const
|
|
11369
|
+
const D = g + I, L = _ + I, F = u[D], U = u[D + 3], G = u[L], Q = u[L + 3];
|
|
11333
11370
|
u[l + I] = F < G ? F : G, u[l + I + 3] = U > Q ? U : Q;
|
|
11334
11371
|
}
|
|
11335
11372
|
return T;
|
|
@@ -11342,14 +11379,14 @@ function st(o, e, t, i, s) {
|
|
|
11342
11379
|
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];
|
|
11343
11380
|
return r >= 0 ? (a = (g - m) * r, n = (_ - m) * r) : (a = (_ - m) * r, n = (g - m) * r), l >= 0 ? (c = (y - v) * l, u = (x - v) * l) : (c = (x - v) * l, u = (y - v) * l), a > u || c > n || ((c > a || isNaN(a)) && (a = c), (u < n || isNaN(n)) && (n = u), h >= 0 ? (f = (w - p) * h, d = (A - p) * h) : (f = (A - p) * h, d = (w - p) * h), a > d || f > n) ? !1 : ((f > a || a !== a) && (a = f), (d < n || n !== n) && (n = d), a <= s && n >= i);
|
|
11344
11381
|
}
|
|
11345
|
-
function
|
|
11382
|
+
function tu(o, e, t, i, s, a, n, c) {
|
|
11346
11383
|
const { geometry: u, _indirectBuffer: f } = o;
|
|
11347
11384
|
for (let d = i, r = i + s; d < r; d++) {
|
|
11348
11385
|
let l = f ? f[d] : d;
|
|
11349
11386
|
Xi(u, e, t, l, a, n, c);
|
|
11350
11387
|
}
|
|
11351
11388
|
}
|
|
11352
|
-
function
|
|
11389
|
+
function iu(o, e, t, i, s, a, n) {
|
|
11353
11390
|
const { geometry: c, _indirectBuffer: u } = o;
|
|
11354
11391
|
let f = 1 / 0, d = null;
|
|
11355
11392
|
for (let r = i, l = i + s; r < l; r++) {
|
|
@@ -11358,7 +11395,7 @@ function tu(o, e, t, i, s, a, n) {
|
|
|
11358
11395
|
}
|
|
11359
11396
|
return d;
|
|
11360
11397
|
}
|
|
11361
|
-
function
|
|
11398
|
+
function su(o, e, t, i, s, a, n) {
|
|
11362
11399
|
const { geometry: c } = t, { index: u } = c, f = c.attributes.position;
|
|
11363
11400
|
for (let d = o, r = e + o; d < r; d++) {
|
|
11364
11401
|
let l;
|
|
@@ -11367,14 +11404,14 @@ function iu(o, e, t, i, s, a, n) {
|
|
|
11367
11404
|
}
|
|
11368
11405
|
return !1;
|
|
11369
11406
|
}
|
|
11370
|
-
function
|
|
11407
|
+
function ru(o, e, t, i, s, a, n) {
|
|
11371
11408
|
N.setBuffer(o._roots[e]), ks(0, o, t, i, s, a, n), N.clearBuffer();
|
|
11372
11409
|
}
|
|
11373
11410
|
function ks(o, e, t, i, s, a, n) {
|
|
11374
11411
|
const { float32Array: c, uint16Array: u, uint32Array: f } = N, d = o * 2;
|
|
11375
11412
|
if (ae(d, u)) {
|
|
11376
11413
|
const l = de(o, f), h = ve(d, u);
|
|
11377
|
-
|
|
11414
|
+
Kc(e, t, i, l, h, s, a, n);
|
|
11378
11415
|
} else {
|
|
11379
11416
|
const l = _e(o);
|
|
11380
11417
|
st(l, c, i, a, n) && ks(l, e, t, i, s, a, n);
|
|
@@ -11382,8 +11419,8 @@ function ks(o, e, t, i, s, a, n) {
|
|
|
11382
11419
|
st(h, c, i, a, n) && ks(h, e, t, i, s, a, n);
|
|
11383
11420
|
}
|
|
11384
11421
|
}
|
|
11385
|
-
const
|
|
11386
|
-
function
|
|
11422
|
+
const nu = ["x", "y", "z"];
|
|
11423
|
+
function ou(o, e, t, i, s, a) {
|
|
11387
11424
|
N.setBuffer(o._roots[e]);
|
|
11388
11425
|
const n = Bs(0, o, t, i, s, a);
|
|
11389
11426
|
return N.clearBuffer(), n;
|
|
@@ -11393,9 +11430,9 @@ function Bs(o, e, t, i, s, a) {
|
|
|
11393
11430
|
let f = o * 2;
|
|
11394
11431
|
if (ae(f, c)) {
|
|
11395
11432
|
const r = de(o, u), l = ve(f, c);
|
|
11396
|
-
return
|
|
11433
|
+
return Jc(e, t, i, r, l, s, a);
|
|
11397
11434
|
} else {
|
|
11398
|
-
const r = Un(o, u), l =
|
|
11435
|
+
const r = Un(o, u), l = nu[r], m = i.direction[l] >= 0;
|
|
11399
11436
|
let v, p;
|
|
11400
11437
|
m ? (v = _e(o), p = ye(o, u)) : (v = ye(o, u), p = _e(o));
|
|
11401
11438
|
const _ = st(v, n, i, s, a) ? Bs(v, e, t, i, s, a) : null;
|
|
@@ -11412,7 +11449,7 @@ function Bs(o, e, t, i, s, a) {
|
|
|
11412
11449
|
}
|
|
11413
11450
|
}
|
|
11414
11451
|
const Ti = /* @__PURE__ */ new Y(), yt = /* @__PURE__ */ new Ce(), xt = /* @__PURE__ */ new Ce(), Qt = /* @__PURE__ */ new J(), tn = /* @__PURE__ */ new re(), Si = /* @__PURE__ */ new re();
|
|
11415
|
-
function
|
|
11452
|
+
function au(o, e, t, i) {
|
|
11416
11453
|
N.setBuffer(o._roots[e]);
|
|
11417
11454
|
const s = Os(0, o, t, i);
|
|
11418
11455
|
return N.clearBuffer(), s;
|
|
@@ -11444,12 +11481,12 @@ function Os(o, e, t, i, s = null) {
|
|
|
11444
11481
|
return j(d, a, Ti), !!(s.intersectsBox(Ti) && Os(d, e, t, i, s) || (j(r, a, Ti), s.intersectsBox(Ti) && Os(r, e, t, i, s)));
|
|
11445
11482
|
}
|
|
11446
11483
|
}
|
|
11447
|
-
const Mi = /* @__PURE__ */ new J(), ms = /* @__PURE__ */ new re(), Yt = /* @__PURE__ */ new re(),
|
|
11448
|
-
function
|
|
11484
|
+
const Mi = /* @__PURE__ */ new J(), ms = /* @__PURE__ */ new re(), Yt = /* @__PURE__ */ new re(), lu = /* @__PURE__ */ new b(), cu = /* @__PURE__ */ new b(), uu = /* @__PURE__ */ new b(), hu = /* @__PURE__ */ new b();
|
|
11485
|
+
function fu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
11449
11486
|
e.boundingBox || e.computeBoundingBox(), ms.set(e.boundingBox.min, e.boundingBox.max, t), ms.needsUpdate = !0;
|
|
11450
11487
|
const c = o.geometry, u = c.attributes.position, f = c.index, d = e.attributes.position, r = e.index, l = xe.getPrimitive(), h = xe.getPrimitive();
|
|
11451
|
-
let m =
|
|
11452
|
-
s && (p =
|
|
11488
|
+
let m = lu, v = cu, p = null, g = null;
|
|
11489
|
+
s && (p = uu, g = hu);
|
|
11453
11490
|
let _ = 1 / 0, y = null, x = null;
|
|
11454
11491
|
return Mi.copy(t).invert(), Yt.matrix.copy(Mi), o.shapecast(
|
|
11455
11492
|
{
|
|
@@ -11461,12 +11498,12 @@ function hu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11461
11498
|
boundsTraverseOrder: (C) => Yt.distanceToBox(C),
|
|
11462
11499
|
intersectsBounds: (C, M, R) => R < _ && R < n,
|
|
11463
11500
|
intersectsRange: (C, M) => {
|
|
11464
|
-
for (let R = C,
|
|
11501
|
+
for (let R = C, P = C + M; R < P; R++) {
|
|
11465
11502
|
Z(h, 3 * R, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
|
|
11466
11503
|
for (let T = w, I = w + A; T < I; T++) {
|
|
11467
11504
|
Z(l, 3 * T, f, u), l.needsUpdate = !0;
|
|
11468
|
-
const
|
|
11469
|
-
if (
|
|
11505
|
+
const D = l.distanceToTriangle(h, m, p);
|
|
11506
|
+
if (D < _ && (v.copy(m), g && g.copy(p), _ = D, y = T, x = R), D < a)
|
|
11470
11507
|
return !0;
|
|
11471
11508
|
}
|
|
11472
11509
|
}
|
|
@@ -11476,7 +11513,7 @@ function hu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11476
11513
|
const S = zt(e);
|
|
11477
11514
|
for (let C = 0, M = S; C < M; C++) {
|
|
11478
11515
|
Z(h, 3 * C, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
|
|
11479
|
-
for (let R = w,
|
|
11516
|
+
for (let R = w, P = w + A; R < P; R++) {
|
|
11480
11517
|
Z(l, 3 * R, f, u), l.needsUpdate = !0;
|
|
11481
11518
|
const T = l.distanceToTriangle(h, m, p);
|
|
11482
11519
|
if (T < _ && (v.copy(m), g && g.copy(p), _ = T, y = R, x = C), T < a)
|
|
@@ -11488,7 +11525,7 @@ function hu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11488
11525
|
}
|
|
11489
11526
|
), xe.releasePrimitive(l), xe.releasePrimitive(h), _ === 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(Mi), v.applyMatrix4(Mi), s.distance = v.sub(s.point).length(), s.faceIndex = x), i);
|
|
11490
11527
|
}
|
|
11491
|
-
function
|
|
11528
|
+
function du(o, e = null) {
|
|
11492
11529
|
e && Array.isArray(e) && (e = new Set(e));
|
|
11493
11530
|
const t = o.geometry, i = t.index ? t.index.array : null, s = t.attributes.position;
|
|
11494
11531
|
let a, n, c, u, f = 0;
|
|
@@ -11501,12 +11538,12 @@ function fu(o, e = null) {
|
|
|
11501
11538
|
const g = n[l + 6], _ = c[v + 14];
|
|
11502
11539
|
let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, S = -1 / 0, C = -1 / 0;
|
|
11503
11540
|
for (let M = g, R = g + _; M < R; M++) {
|
|
11504
|
-
const
|
|
11541
|
+
const P = 3 * o.resolveTriangleIndex(M);
|
|
11505
11542
|
for (let T = 0; T < 3; T++) {
|
|
11506
|
-
let I =
|
|
11543
|
+
let I = P + T;
|
|
11507
11544
|
I = i ? i[I] : I;
|
|
11508
|
-
const
|
|
11509
|
-
|
|
11545
|
+
const D = s.getX(I), L = s.getY(I), F = s.getZ(I);
|
|
11546
|
+
D < y && (y = D), D > A && (A = D), L < x && (x = L), L > S && (S = L), F < w && (w = F), F > C && (C = F);
|
|
11510
11547
|
}
|
|
11511
11548
|
}
|
|
11512
11549
|
return u[l + 0] !== y || u[l + 1] !== x || u[l + 2] !== w || u[l + 3] !== A || u[l + 4] !== S || u[l + 5] !== C ? (u[l + 0] = y, u[l + 1] = x, u[l + 2] = w, u[l + 3] = A, u[l + 4] = S, u[l + 5] = C, !0) : !1;
|
|
@@ -11517,26 +11554,26 @@ function fu(o, e = null) {
|
|
|
11517
11554
|
const C = w || A, M = w || S;
|
|
11518
11555
|
let R = !1;
|
|
11519
11556
|
C && (R = r(g, h, w));
|
|
11520
|
-
let
|
|
11521
|
-
M && (
|
|
11522
|
-
const T = R ||
|
|
11557
|
+
let P = !1;
|
|
11558
|
+
M && (P = r(_, h, w));
|
|
11559
|
+
const T = R || P;
|
|
11523
11560
|
if (T)
|
|
11524
11561
|
for (let I = 0; I < 3; I++) {
|
|
11525
|
-
const
|
|
11562
|
+
const D = g + I, L = _ + I, F = u[D], U = u[D + 3], G = u[L], Q = u[L + 3];
|
|
11526
11563
|
u[l + I] = F < G ? F : G, u[l + I + 3] = U > Q ? U : Q;
|
|
11527
11564
|
}
|
|
11528
11565
|
return T;
|
|
11529
11566
|
}
|
|
11530
11567
|
}
|
|
11531
11568
|
}
|
|
11532
|
-
function
|
|
11569
|
+
function pu(o, e, t, i, s, a, n) {
|
|
11533
11570
|
N.setBuffer(o._roots[e]), zs(0, o, t, i, s, a, n), N.clearBuffer();
|
|
11534
11571
|
}
|
|
11535
11572
|
function zs(o, e, t, i, s, a, n) {
|
|
11536
11573
|
const { float32Array: c, uint16Array: u, uint32Array: f } = N, d = o * 2;
|
|
11537
11574
|
if (ae(d, u)) {
|
|
11538
11575
|
const l = de(o, f), h = ve(d, u);
|
|
11539
|
-
|
|
11576
|
+
tu(e, t, i, l, h, s, a, n);
|
|
11540
11577
|
} else {
|
|
11541
11578
|
const l = _e(o);
|
|
11542
11579
|
st(l, c, i, a, n) && zs(l, e, t, i, s, a, n);
|
|
@@ -11544,8 +11581,8 @@ function zs(o, e, t, i, s, a, n) {
|
|
|
11544
11581
|
st(h, c, i, a, n) && zs(h, e, t, i, s, a, n);
|
|
11545
11582
|
}
|
|
11546
11583
|
}
|
|
11547
|
-
const
|
|
11548
|
-
function
|
|
11584
|
+
const mu = ["x", "y", "z"];
|
|
11585
|
+
function gu(o, e, t, i, s, a) {
|
|
11549
11586
|
N.setBuffer(o._roots[e]);
|
|
11550
11587
|
const n = Us(0, o, t, i, s, a);
|
|
11551
11588
|
return N.clearBuffer(), n;
|
|
@@ -11555,9 +11592,9 @@ function Us(o, e, t, i, s, a) {
|
|
|
11555
11592
|
let f = o * 2;
|
|
11556
11593
|
if (ae(f, c)) {
|
|
11557
11594
|
const r = de(o, u), l = ve(f, c);
|
|
11558
|
-
return
|
|
11595
|
+
return iu(e, t, i, r, l, s, a);
|
|
11559
11596
|
} else {
|
|
11560
|
-
const r = Un(o, u), l =
|
|
11597
|
+
const r = Un(o, u), l = mu[r], m = i.direction[l] >= 0;
|
|
11561
11598
|
let v, p;
|
|
11562
11599
|
m ? (v = _e(o), p = ye(o, u)) : (v = ye(o, u), p = _e(o));
|
|
11563
11600
|
const _ = st(v, n, i, s, a) ? Us(v, e, t, i, s, a) : null;
|
|
@@ -11574,7 +11611,7 @@ function Us(o, e, t, i, s, a) {
|
|
|
11574
11611
|
}
|
|
11575
11612
|
}
|
|
11576
11613
|
const Ci = /* @__PURE__ */ new Y(), wt = /* @__PURE__ */ new Ce(), bt = /* @__PURE__ */ new Ce(), Zt = /* @__PURE__ */ new J(), sn = /* @__PURE__ */ new re(), Ii = /* @__PURE__ */ new re();
|
|
11577
|
-
function
|
|
11614
|
+
function vu(o, e, t, i) {
|
|
11578
11615
|
N.setBuffer(o._roots[e]);
|
|
11579
11616
|
const s = Hs(0, o, t, i);
|
|
11580
11617
|
return N.clearBuffer(), s;
|
|
@@ -11607,12 +11644,12 @@ function Hs(o, e, t, i, s = null) {
|
|
|
11607
11644
|
return j(d, a, Ci), !!(s.intersectsBox(Ci) && Hs(d, e, t, i, s) || (j(r, a, Ci), s.intersectsBox(Ci) && Hs(r, e, t, i, s)));
|
|
11608
11645
|
}
|
|
11609
11646
|
}
|
|
11610
|
-
const Ri = /* @__PURE__ */ new J(), gs = /* @__PURE__ */ new re(), Xt = /* @__PURE__ */ new re(),
|
|
11611
|
-
function
|
|
11647
|
+
const Ri = /* @__PURE__ */ new J(), gs = /* @__PURE__ */ new re(), Xt = /* @__PURE__ */ new re(), _u = /* @__PURE__ */ new b(), yu = /* @__PURE__ */ new b(), xu = /* @__PURE__ */ new b(), wu = /* @__PURE__ */ new b();
|
|
11648
|
+
function bu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
11612
11649
|
e.boundingBox || e.computeBoundingBox(), gs.set(e.boundingBox.min, e.boundingBox.max, t), gs.needsUpdate = !0;
|
|
11613
11650
|
const c = o.geometry, u = c.attributes.position, f = c.index, d = e.attributes.position, r = e.index, l = xe.getPrimitive(), h = xe.getPrimitive();
|
|
11614
|
-
let m =
|
|
11615
|
-
s && (p =
|
|
11651
|
+
let m = _u, v = yu, p = null, g = null;
|
|
11652
|
+
s && (p = xu, g = wu);
|
|
11616
11653
|
let _ = 1 / 0, y = null, x = null;
|
|
11617
11654
|
return Ri.copy(t).invert(), Xt.matrix.copy(Ri), o.shapecast(
|
|
11618
11655
|
{
|
|
@@ -11625,10 +11662,10 @@ function wu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11625
11662
|
boundsTraverseOrder: (C) => Xt.distanceToBox(C),
|
|
11626
11663
|
intersectsBounds: (C, M, R) => R < _ && R < n,
|
|
11627
11664
|
intersectsRange: (C, M) => {
|
|
11628
|
-
for (let R = C,
|
|
11665
|
+
for (let R = C, P = C + M; R < P; R++) {
|
|
11629
11666
|
const T = S.resolveTriangleIndex(R);
|
|
11630
11667
|
Z(h, 3 * T, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
|
|
11631
|
-
for (let I = w,
|
|
11668
|
+
for (let I = w, D = w + A; I < D; I++) {
|
|
11632
11669
|
const L = o.resolveTriangleIndex(I);
|
|
11633
11670
|
Z(l, 3 * L, f, u), l.needsUpdate = !0;
|
|
11634
11671
|
const F = l.distanceToTriangle(h, m, p);
|
|
@@ -11642,7 +11679,7 @@ function wu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11642
11679
|
const S = zt(e);
|
|
11643
11680
|
for (let C = 0, M = S; C < M; C++) {
|
|
11644
11681
|
Z(h, 3 * C, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
|
|
11645
|
-
for (let R = w,
|
|
11682
|
+
for (let R = w, P = w + A; R < P; R++) {
|
|
11646
11683
|
const T = o.resolveTriangleIndex(R);
|
|
11647
11684
|
Z(l, 3 * T, f, u), l.needsUpdate = !0;
|
|
11648
11685
|
const I = l.distanceToTriangle(h, m, p);
|
|
@@ -11655,12 +11692,12 @@ function wu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
|
11655
11692
|
}
|
|
11656
11693
|
), xe.releasePrimitive(l), xe.releasePrimitive(h), _ === 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(Ri), v.applyMatrix4(Ri), s.distance = v.sub(s.point).length(), s.faceIndex = x), i);
|
|
11657
11694
|
}
|
|
11658
|
-
function
|
|
11695
|
+
function Au() {
|
|
11659
11696
|
return typeof SharedArrayBuffer < "u";
|
|
11660
11697
|
}
|
|
11661
11698
|
const si = new N.constructor(), Wi = new N.constructor(), Xe = new $s(() => new Y()), At = new Y(), Tt = new Y(), vs = new Y(), _s = new Y();
|
|
11662
11699
|
let ys = !1;
|
|
11663
|
-
function
|
|
11700
|
+
function Tu(o, e, t, i) {
|
|
11664
11701
|
if (ys)
|
|
11665
11702
|
throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
|
|
11666
11703
|
ys = !0;
|
|
@@ -11719,8 +11756,8 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
|
|
|
11719
11756
|
j(e, p, C), C.applyMatrix4(t);
|
|
11720
11757
|
const M = _e(o), R = ye(o, m);
|
|
11721
11758
|
j(M, h, At), j(R, h, Tt);
|
|
11722
|
-
const
|
|
11723
|
-
S =
|
|
11759
|
+
const P = C.intersectsBox(At), T = C.intersectsBox(Tt);
|
|
11760
|
+
S = P && Ae(
|
|
11724
11761
|
e,
|
|
11725
11762
|
M,
|
|
11726
11763
|
i,
|
|
@@ -11748,8 +11785,8 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
|
|
|
11748
11785
|
} else {
|
|
11749
11786
|
const C = _e(e), M = ye(e, g);
|
|
11750
11787
|
j(C, p, vs), j(M, p, _s);
|
|
11751
|
-
const R = f.intersectsBox(vs),
|
|
11752
|
-
if (R &&
|
|
11788
|
+
const R = f.intersectsBox(vs), P = f.intersectsBox(_s);
|
|
11789
|
+
if (R && P)
|
|
11753
11790
|
S = Ae(
|
|
11754
11791
|
o,
|
|
11755
11792
|
C,
|
|
@@ -11793,8 +11830,8 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
|
|
|
11793
11830
|
else {
|
|
11794
11831
|
const T = Xe.getPrimitive();
|
|
11795
11832
|
T.copy(vs).applyMatrix4(t);
|
|
11796
|
-
const I = _e(o),
|
|
11797
|
-
j(I, h, At), j(
|
|
11833
|
+
const I = _e(o), D = ye(o, m);
|
|
11834
|
+
j(I, h, At), j(D, h, Tt);
|
|
11798
11835
|
const L = T.intersectsBox(At), F = T.intersectsBox(Tt);
|
|
11799
11836
|
S = L && Ae(
|
|
11800
11837
|
C,
|
|
@@ -11810,7 +11847,7 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
|
|
|
11810
11847
|
!d
|
|
11811
11848
|
) || F && Ae(
|
|
11812
11849
|
C,
|
|
11813
|
-
|
|
11850
|
+
D,
|
|
11814
11851
|
i,
|
|
11815
11852
|
t,
|
|
11816
11853
|
s,
|
|
@@ -11822,7 +11859,7 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
|
|
|
11822
11859
|
!d
|
|
11823
11860
|
), Xe.releasePrimitive(T);
|
|
11824
11861
|
}
|
|
11825
|
-
else if (
|
|
11862
|
+
else if (P)
|
|
11826
11863
|
if (w)
|
|
11827
11864
|
S = Ae(
|
|
11828
11865
|
o,
|
|
@@ -11840,8 +11877,8 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
|
|
|
11840
11877
|
else {
|
|
11841
11878
|
const T = Xe.getPrimitive();
|
|
11842
11879
|
T.copy(_s).applyMatrix4(t);
|
|
11843
|
-
const I = _e(o),
|
|
11844
|
-
j(I, h, At), j(
|
|
11880
|
+
const I = _e(o), D = ye(o, m);
|
|
11881
|
+
j(I, h, At), j(D, h, Tt);
|
|
11845
11882
|
const L = T.intersectsBox(At), F = T.intersectsBox(Tt);
|
|
11846
11883
|
S = L && Ae(
|
|
11847
11884
|
M,
|
|
@@ -11857,7 +11894,7 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
|
|
|
11857
11894
|
!d
|
|
11858
11895
|
) || F && Ae(
|
|
11859
11896
|
M,
|
|
11860
|
-
|
|
11897
|
+
D,
|
|
11861
11898
|
i,
|
|
11862
11899
|
t,
|
|
11863
11900
|
s,
|
|
@@ -11872,7 +11909,7 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
|
|
|
11872
11909
|
}
|
|
11873
11910
|
return S;
|
|
11874
11911
|
}
|
|
11875
|
-
const
|
|
11912
|
+
const Pi = /* @__PURE__ */ new re(), rn = /* @__PURE__ */ new Y(), Su = {
|
|
11876
11913
|
strategy: Bn,
|
|
11877
11914
|
maxDepth: 40,
|
|
11878
11915
|
maxLeafTris: 10,
|
|
@@ -11927,16 +11964,16 @@ class er {
|
|
|
11927
11964
|
} else
|
|
11928
11965
|
throw new Error("MeshBVH: Only BufferGeometries are supported.");
|
|
11929
11966
|
if (t = Object.assign({
|
|
11930
|
-
...
|
|
11967
|
+
...Su,
|
|
11931
11968
|
// undocumented options
|
|
11932
11969
|
// Whether to skip generating the tree. Used for deserialization.
|
|
11933
11970
|
[us]: !1
|
|
11934
|
-
}, t), t.useSharedArrayBuffer && !
|
|
11971
|
+
}, t), t.useSharedArrayBuffer && !Au())
|
|
11935
11972
|
throw new Error("MeshBVH: SharedArrayBuffer is not available.");
|
|
11936
|
-
this.geometry = e, this._roots = null, this._indirectBuffer = null, t[us] || (
|
|
11973
|
+
this.geometry = e, this._roots = null, this._indirectBuffer = null, t[us] || (Wc(this, t), !e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new Y()))), this.resolveTriangleIndex = t.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
|
|
11937
11974
|
}
|
|
11938
11975
|
refit(e = null) {
|
|
11939
|
-
return (this.indirect ?
|
|
11976
|
+
return (this.indirect ? du : eu)(this, e);
|
|
11940
11977
|
}
|
|
11941
11978
|
traverse(e, t = 0) {
|
|
11942
11979
|
const i = this._roots[t], s = new Uint32Array(i), a = new Uint16Array(i);
|
|
@@ -11954,7 +11991,7 @@ class er {
|
|
|
11954
11991
|
}
|
|
11955
11992
|
/* Core Cast Functions */
|
|
11956
11993
|
raycast(e, t = ws, i = 0, s = 1 / 0) {
|
|
11957
|
-
const a = this._roots, n = this.geometry, c = [], u = t.isMaterial, f = Array.isArray(t), d = n.groups, r = u ? t.side : t, l = this.indirect ?
|
|
11994
|
+
const a = this._roots, n = this.geometry, c = [], u = t.isMaterial, f = Array.isArray(t), d = n.groups, r = u ? t.side : t, l = this.indirect ? pu : ru;
|
|
11958
11995
|
for (let h = 0, m = a.length; h < m; h++) {
|
|
11959
11996
|
const v = f ? t[d[h].materialIndex].side : r, p = c.length;
|
|
11960
11997
|
if (l(this, h, v, e, c, i, s), f) {
|
|
@@ -11968,7 +12005,7 @@ class er {
|
|
|
11968
12005
|
raycastFirst(e, t = ws, i = 0, s = 1 / 0) {
|
|
11969
12006
|
const a = this._roots, n = this.geometry, c = t.isMaterial, u = Array.isArray(t);
|
|
11970
12007
|
let f = null;
|
|
11971
|
-
const d = n.groups, r = c ? t.side : t, l = this.indirect ?
|
|
12008
|
+
const d = n.groups, r = c ? t.side : t, l = this.indirect ? gu : ou;
|
|
11972
12009
|
for (let h = 0, m = a.length; h < m; h++) {
|
|
11973
12010
|
const v = u ? t[d[h].materialIndex].side : r, p = l(this, h, v, e, i, s);
|
|
11974
12011
|
p != null && (f == null || p.distance < f.distance) && (f = p, u && (p.face.materialIndex = d[h].materialIndex));
|
|
@@ -11977,13 +12014,13 @@ class er {
|
|
|
11977
12014
|
}
|
|
11978
12015
|
intersectsGeometry(e, t) {
|
|
11979
12016
|
let i = !1;
|
|
11980
|
-
const s = this._roots, a = this.indirect ?
|
|
12017
|
+
const s = this._roots, a = this.indirect ? vu : au;
|
|
11981
12018
|
for (let n = 0, c = s.length; n < c && (i = a(this, n, e, t), !i); n++)
|
|
11982
12019
|
;
|
|
11983
12020
|
return i;
|
|
11984
12021
|
}
|
|
11985
12022
|
shapecast(e) {
|
|
11986
|
-
const t = xe.getPrimitive(), i = this.indirect ?
|
|
12023
|
+
const t = xe.getPrimitive(), i = this.indirect ? su : $c;
|
|
11987
12024
|
let {
|
|
11988
12025
|
boundsTraverseOrder: s,
|
|
11989
12026
|
intersectsBounds: a,
|
|
@@ -11999,7 +12036,7 @@ class er {
|
|
|
11999
12036
|
const d = this._roots;
|
|
12000
12037
|
for (let r = 0, l = d.length; r < l; r++) {
|
|
12001
12038
|
const h = d[r];
|
|
12002
|
-
if (u =
|
|
12039
|
+
if (u = Qc(this, r, a, n, s, f), u)
|
|
12003
12040
|
break;
|
|
12004
12041
|
f += h.byteLength;
|
|
12005
12042
|
}
|
|
@@ -12039,14 +12076,14 @@ class er {
|
|
|
12039
12076
|
} else
|
|
12040
12077
|
s = m;
|
|
12041
12078
|
}
|
|
12042
|
-
return
|
|
12079
|
+
return Tu(this, e, t, s);
|
|
12043
12080
|
}
|
|
12044
12081
|
/* Derived Cast Functions */
|
|
12045
12082
|
intersectsBox(e, t) {
|
|
12046
|
-
return
|
|
12083
|
+
return Pi.set(e.min, e.max, t), Pi.needsUpdate = !0, this.shapecast(
|
|
12047
12084
|
{
|
|
12048
|
-
intersectsBounds: (i) =>
|
|
12049
|
-
intersectsTriangle: (i) =>
|
|
12085
|
+
intersectsBounds: (i) => Pi.intersectsBox(i),
|
|
12086
|
+
intersectsTriangle: (i) => Pi.intersectsTriangle(i)
|
|
12050
12087
|
}
|
|
12051
12088
|
);
|
|
12052
12089
|
}
|
|
@@ -12059,7 +12096,7 @@ class er {
|
|
|
12059
12096
|
);
|
|
12060
12097
|
}
|
|
12061
12098
|
closestPointToGeometry(e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
|
|
12062
|
-
return (this.indirect ?
|
|
12099
|
+
return (this.indirect ? bu : fu)(
|
|
12063
12100
|
this,
|
|
12064
12101
|
e,
|
|
12065
12102
|
t,
|
|
@@ -12070,7 +12107,7 @@ class er {
|
|
|
12070
12107
|
);
|
|
12071
12108
|
}
|
|
12072
12109
|
closestPointToPoint(e, t = {}, i = 0, s = 1 / 0) {
|
|
12073
|
-
return
|
|
12110
|
+
return Yc(
|
|
12074
12111
|
this,
|
|
12075
12112
|
e,
|
|
12076
12113
|
t,
|
|
@@ -12084,7 +12121,7 @@ class er {
|
|
|
12084
12121
|
}), e;
|
|
12085
12122
|
}
|
|
12086
12123
|
}
|
|
12087
|
-
class
|
|
12124
|
+
class Mu {
|
|
12088
12125
|
constructor(e) {
|
|
12089
12126
|
this.name = "WorkerBase", this.running = !1, this.worker = e, this.worker.onerror = (t) => {
|
|
12090
12127
|
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.`);
|
|
@@ -12107,7 +12144,7 @@ class Su {
|
|
|
12107
12144
|
this.worker.terminate(), this.worker = null;
|
|
12108
12145
|
}
|
|
12109
12146
|
}
|
|
12110
|
-
class
|
|
12147
|
+
class Cu extends Mu {
|
|
12111
12148
|
constructor(e) {
|
|
12112
12149
|
const t = new Worker(e || new URL("data:text/javascript;base64,aW1wb3J0IHsKCUJ1ZmZlckdlb21ldHJ5LAoJQnVmZmVyQXR0cmlidXRlLAp9IGZyb20gJ3RocmVlJzsKaW1wb3J0IHsgTWVzaEJWSCB9IGZyb20gJy4uL2NvcmUvTWVzaEJWSC5qcyc7Cgpvbm1lc3NhZ2UgPSAoIHsgZGF0YSB9ICkgPT4gewoKCWxldCBwcmV2VGltZSA9IHBlcmZvcm1hbmNlLm5vdygpOwoJZnVuY3Rpb24gb25Qcm9ncmVzc0NhbGxiYWNrKCBwcm9ncmVzcyApIHsKCgkJLy8gYWNjb3VudCBmb3IgZXJyb3IKCQlwcm9ncmVzcyA9IE1hdGgubWluKCBwcm9ncmVzcywgMSApOwoKCQljb25zdCBjdXJyVGltZSA9IHBlcmZvcm1hbmNlLm5vdygpOwoJCWlmICggY3VyclRpbWUgLSBwcmV2VGltZSA+PSAxMCAmJiBwcm9ncmVzcyAhPT0gMS4wICkgewoKCQkJcG9zdE1lc3NhZ2UoIHsKCgkJCQllcnJvcjogbnVsbCwKCQkJCXNlcmlhbGl6ZWQ6IG51bGwsCgkJCQlwb3NpdGlvbjogbnVsbCwKCQkJCXByb2dyZXNzLAoKCQkJfSApOwoJCQlwcmV2VGltZSA9IGN1cnJUaW1lOwoKCQl9CgoJfQoKCWNvbnN0IHsgaW5kZXgsIHBvc2l0aW9uLCBvcHRpb25zIH0gPSBkYXRhOwoJdHJ5IHsKCgkJY29uc3QgZ2VvbWV0cnkgPSBuZXcgQnVmZmVyR2VvbWV0cnkoKTsKCQlnZW9tZXRyeS5zZXRBdHRyaWJ1dGUoICdwb3NpdGlvbicsIG5ldyBCdWZmZXJBdHRyaWJ1dGUoIHBvc2l0aW9uLCAzLCBmYWxzZSApICk7CgkJaWYgKCBpbmRleCApIHsKCgkJCWdlb21ldHJ5LnNldEluZGV4KCBuZXcgQnVmZmVyQXR0cmlidXRlKCBpbmRleCwgMSwgZmFsc2UgKSApOwoKCQl9CgoJCWlmICggb3B0aW9ucy5pbmNsdWRlZFByb2dyZXNzQ2FsbGJhY2sgKSB7CgoJCQlvcHRpb25zLm9uUHJvZ3Jlc3MgPSBvblByb2dyZXNzQ2FsbGJhY2s7CgoJCX0KCgkJaWYgKCBvcHRpb25zLmdyb3VwcyApIHsKCgkJCWNvbnN0IGdyb3VwcyA9IG9wdGlvbnMuZ3JvdXBzOwoJCQlmb3IgKCBjb25zdCBpIGluIGdyb3VwcyApIHsKCgkJCQljb25zdCBncm91cCA9IGdyb3Vwc1sgaSBdOwoJCQkJZ2VvbWV0cnkuYWRkR3JvdXAoIGdyb3VwLnN0YXJ0LCBncm91cC5jb3VudCwgZ3JvdXAubWF0ZXJpYWxJbmRleCApOwoKCQkJfQoKCQl9CgoJCWNvbnN0IGJ2aCA9IG5ldyBNZXNoQlZIKCBnZW9tZXRyeSwgb3B0aW9ucyApOwoJCWNvbnN0IHNlcmlhbGl6ZWQgPSBNZXNoQlZILnNlcmlhbGl6ZSggYnZoLCB7IGNvcHlJbmRleEJ1ZmZlcjogZmFsc2UgfSApOwoJCWxldCB0b1RyYW5zZmVyID0gWyBwb3NpdGlvbi5idWZmZXIsIC4uLnNlcmlhbGl6ZWQucm9vdHMgXTsKCQlpZiAoIHNlcmlhbGl6ZWQuaW5kZXggKSB7CgoJCQl0b1RyYW5zZmVyLnB1c2goIHNlcmlhbGl6ZWQuaW5kZXguYnVmZmVyICk7CgoJCX0KCgkJdG9UcmFuc2ZlciA9IHRvVHJhbnNmZXIuZmlsdGVyKCB2ID0+ICggdHlwZW9mIFNoYXJlZEFycmF5QnVmZmVyID09PSAndW5kZWZpbmVkJyApIHx8ICEgKCB2IGluc3RhbmNlb2YgU2hhcmVkQXJyYXlCdWZmZXIgKSApOwoKCQlpZiAoIGJ2aC5faW5kaXJlY3RCdWZmZXIgKSB7CgoJCQl0b1RyYW5zZmVyLnB1c2goIHNlcmlhbGl6ZWQuaW5kaXJlY3RCdWZmZXIuYnVmZmVyICk7CgoJCX0KCgkJcG9zdE1lc3NhZ2UoIHsKCgkJCWVycm9yOiBudWxsLAoJCQlzZXJpYWxpemVkLAoJCQlwb3NpdGlvbiwKCQkJcHJvZ3Jlc3M6IDEsCgoJCX0sIHRvVHJhbnNmZXIgKTsKCgl9IGNhdGNoICggZXJyb3IgKSB7CgoJCXBvc3RNZXNzYWdlKCB7CgoJCQllcnJvciwKCQkJc2VyaWFsaXplZDogbnVsbCwKCQkJcG9zaXRpb246IG51bGwsCgkJCXByb2dyZXNzOiAxLAoKCQl9ICk7CgoJfQoKfTsK", import.meta.url), { type: "module" });
|
|
12113
12150
|
super(t), this.name = "GenerateMeshBVHWorker";
|
|
@@ -12151,7 +12188,7 @@ class Mu extends Su {
|
|
|
12151
12188
|
});
|
|
12152
12189
|
}
|
|
12153
12190
|
}
|
|
12154
|
-
class
|
|
12191
|
+
class Iu {
|
|
12155
12192
|
constructor(e, t) {
|
|
12156
12193
|
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 = () => {
|
|
12157
12194
|
this.lock || (this._textTimer && (window.clearTimeout(this._textTimer), this._textTimer = 0), this._textTimer = window.setTimeout(() => {
|
|
@@ -12336,7 +12373,7 @@ class Cu {
|
|
|
12336
12373
|
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();
|
|
12337
12374
|
}
|
|
12338
12375
|
}
|
|
12339
|
-
class
|
|
12376
|
+
class Ru {
|
|
12340
12377
|
// 阴影是否已完成累计渲染
|
|
12341
12378
|
get isFinished() {
|
|
12342
12379
|
return this.params ? this.framesDone >= this.params.frames : !0;
|
|
@@ -12374,17 +12411,17 @@ class Iu {
|
|
|
12374
12411
|
}, this.scene = t, this.renderer = e, this.buffer1Active = !1, this.dirLights = [], this.dirLightsHelpers = [], this.clearColor = new K(), this.clearAlpha = 0, this.progress = 0, this.discardMaterial = new Du(), 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 = Bt.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);
|
|
12375
12412
|
const h = Math.PI;
|
|
12376
12413
|
for (let p = 0; p < n; p++) {
|
|
12377
|
-
const g = new
|
|
12414
|
+
const g = new lo(16777215, h / n);
|
|
12378
12415
|
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);
|
|
12379
12416
|
}
|
|
12380
12417
|
const m = /(Android|iPad|iPhone|iPod)/g.test(navigator == null ? void 0 : navigator.userAgent) ? Se : pe;
|
|
12381
|
-
this.progressiveLightMap1 = new Be(i, i, { type: m }), this.progressiveLightMap2 = new Be(i, i, { type: m }), this.progressiveLightMap1.texture.colorSpace = lr, this.progressiveLightMap2.texture.colorSpace = lr, this.shadowCatcherMaterial = new
|
|
12418
|
+
this.progressiveLightMap1 = new Be(i, i, { type: m }), this.progressiveLightMap2 = new Be(i, i, { type: m }), this.progressiveLightMap1.texture.colorSpace = lr, this.progressiveLightMap2.texture.colorSpace = lr, this.shadowCatcherMaterial = new Pu({
|
|
12382
12419
|
map: this.progressiveLightMap2.texture,
|
|
12383
12420
|
transparent: !0,
|
|
12384
12421
|
opacity: 1
|
|
12385
12422
|
});
|
|
12386
12423
|
const v = new Oi(c, c);
|
|
12387
|
-
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
|
|
12424
|
+
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 co({ fog: !1 }), this.previousShadowMap = { value: this.progressiveLightMap1.texture }, this.averagingWindow = { value: u }, this.targetMat.onBeforeCompile = (p) => {
|
|
12388
12425
|
p.vertexShader = `varying vec2 vUv;
|
|
12389
12426
|
` + p.vertexShader.slice(0, -1) + "vUv = uv; gl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";
|
|
12390
12427
|
const g = p.fragmentShader.indexOf("void main() {");
|
|
@@ -12421,10 +12458,10 @@ vec3 texelOld = texture2D(previousShadowMap, vUv).rgb;
|
|
|
12421
12458
|
);
|
|
12422
12459
|
this.isZUp ? t.position.z = this.params.size / 2 : t.position.y = this.params.size / 2;
|
|
12423
12460
|
for (const a of this.dirLights) {
|
|
12424
|
-
const n = new
|
|
12461
|
+
const n = new uo(a);
|
|
12425
12462
|
this.dirLightsHelpers.push(n);
|
|
12426
12463
|
}
|
|
12427
|
-
const i = this.isZUp ? new b(0, 0, 1) : new b(0, 1, 0), s = new
|
|
12464
|
+
const i = this.isZUp ? new b(0, 0, 1) : new b(0, 1, 0), s = new ho(new Ns(i, 1e-3), this.params.size, 16776960);
|
|
12428
12465
|
this.debugHelpersGroup.add(t, s, ...this.dirLightsHelpers);
|
|
12429
12466
|
}
|
|
12430
12467
|
e ? (this.progShadowGrp.add(this.debugHelpersGroup), this.dirLightsHelpers.forEach((t) => {
|
|
@@ -12584,7 +12621,7 @@ function Vn(o = {}, e, t, i = (s) => {
|
|
|
12584
12621
|
const n = Object.entries(o);
|
|
12585
12622
|
super({
|
|
12586
12623
|
uniforms: n.reduce((c, [u, f]) => {
|
|
12587
|
-
const d =
|
|
12624
|
+
const d = fo.clone({ [u]: { value: f } });
|
|
12588
12625
|
return {
|
|
12589
12626
|
...c,
|
|
12590
12627
|
...d
|
|
@@ -12602,7 +12639,7 @@ function Vn(o = {}, e, t, i = (s) => {
|
|
|
12602
12639
|
};
|
|
12603
12640
|
return s.key = Ye.generateUUID(), s;
|
|
12604
12641
|
}
|
|
12605
|
-
const
|
|
12642
|
+
const Pu = Vn(
|
|
12606
12643
|
{
|
|
12607
12644
|
transparent: !0,
|
|
12608
12645
|
color: new K(0, 0, 0),
|
|
@@ -12631,13 +12668,13 @@ const Ru = Vn(
|
|
|
12631
12668
|
#include <colorspace_fragment>
|
|
12632
12669
|
}`
|
|
12633
12670
|
), Du = Vn({}, "void main() { }", "void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }");
|
|
12634
|
-
class
|
|
12671
|
+
class Eu extends Ue {
|
|
12635
12672
|
constructor(e) {
|
|
12636
12673
|
const t = document.createElement("div");
|
|
12637
12674
|
super(t), this._controls = e;
|
|
12638
12675
|
}
|
|
12639
12676
|
}
|
|
12640
|
-
class
|
|
12677
|
+
class Lu extends k.ShaderMaterial {
|
|
12641
12678
|
get source() {
|
|
12642
12679
|
return this.uniforms.source.value;
|
|
12643
12680
|
}
|
|
@@ -12714,7 +12751,7 @@ class nn extends k.ShaderMaterial {
|
|
|
12714
12751
|
});
|
|
12715
12752
|
}
|
|
12716
12753
|
}
|
|
12717
|
-
class
|
|
12754
|
+
class Fu extends k.ShaderMaterial {
|
|
12718
12755
|
get map() {
|
|
12719
12756
|
return this.uniforms.map.value;
|
|
12720
12757
|
}
|
|
@@ -12797,7 +12834,7 @@ class Lu extends k.ShaderMaterial {
|
|
|
12797
12834
|
});
|
|
12798
12835
|
}
|
|
12799
12836
|
}
|
|
12800
|
-
class
|
|
12837
|
+
class ku extends k.ShaderMaterial {
|
|
12801
12838
|
get source() {
|
|
12802
12839
|
return this.uniforms.source.value;
|
|
12803
12840
|
}
|
|
@@ -12889,7 +12926,7 @@ class Fu extends k.ShaderMaterial {
|
|
|
12889
12926
|
});
|
|
12890
12927
|
}
|
|
12891
12928
|
}
|
|
12892
|
-
class
|
|
12929
|
+
class Bu {
|
|
12893
12930
|
constructor(e, t, i, s) {
|
|
12894
12931
|
this.params = {
|
|
12895
12932
|
inside: !1,
|
|
@@ -12925,7 +12962,7 @@ class ku {
|
|
|
12925
12962
|
wrapS: k.ClampToEdgeWrapping,
|
|
12926
12963
|
wrapT: k.ClampToEdgeWrapping
|
|
12927
12964
|
})
|
|
12928
|
-
], this.effectQuad = new ci(new
|
|
12965
|
+
], this.effectQuad = new ci(new Fu()), this.jfaQuad = new ci(new ku()), this.seedQuad = new ci(this.seedMaterial), this.expandQuad = new ci(new Lu()), this.setSize(window.innerWidth, window.innerHeight);
|
|
12929
12966
|
}
|
|
12930
12967
|
setSize(e, t) {
|
|
12931
12968
|
const i = this.renderer.getPixelRatio(), s = Math.floor(e * i), a = Math.floor(t * i);
|
|
@@ -12987,7 +13024,7 @@ class ku {
|
|
|
12987
13024
|
}), s.layers.mask = c);
|
|
12988
13025
|
}
|
|
12989
13026
|
}
|
|
12990
|
-
class
|
|
13027
|
+
class Ou extends X {
|
|
12991
13028
|
constructor(e = 200, t = 20, i = 0.8) {
|
|
12992
13029
|
const s = new Oi(e, e), a = new kt({
|
|
12993
13030
|
side: oi,
|
|
@@ -13042,7 +13079,7 @@ class Bu extends X {
|
|
|
13042
13079
|
super(s, a), this.position.z = -0.02;
|
|
13043
13080
|
}
|
|
13044
13081
|
}
|
|
13045
|
-
const
|
|
13082
|
+
const zu = "https://cdn2.seer-group.com/libs/hdr/aristea_wreck_512.hdr", Uu = "https://cdn2.seer-group.com/libs/hdr/lightroom_14b_512.hdr", Hu = "https://cdn2.seer-group.com/libs/fonts.type.json", Eh = new wo(Hu);
|
|
13046
13083
|
class on {
|
|
13047
13084
|
constructor(e) {
|
|
13048
13085
|
var t;
|
|
@@ -13058,22 +13095,22 @@ class on {
|
|
|
13058
13095
|
this.change(this._defaults.color);
|
|
13059
13096
|
}
|
|
13060
13097
|
}
|
|
13061
|
-
var
|
|
13098
|
+
var Wu = /* @__PURE__ */ ((o) => (o[o.DEFAULT = 0] = "DEFAULT", o[o.CAN_INSTALL = 1] = "CAN_INSTALL", o))(Wu || {});
|
|
13062
13099
|
const an = 0.15;
|
|
13063
13100
|
Bt.DEFAULT_UP.set(0, 0, 1);
|
|
13064
13101
|
let Mt, Fi = 0, Ws = 0;
|
|
13065
|
-
const
|
|
13102
|
+
const Vu = () => {
|
|
13066
13103
|
Mt = void 0, Fi = 0, Ws = 0;
|
|
13067
|
-
},
|
|
13068
|
-
class
|
|
13104
|
+
}, Nu = new ni({ colorWrite: !1 });
|
|
13105
|
+
class Lh {
|
|
13069
13106
|
constructor(e) {
|
|
13070
|
-
this.props = e, this.stats = new ti(), this.scene = new bs(), this.overlayScene = new bs(), this.renderer = new
|
|
13107
|
+
this.props = e, this.stats = new ti(), this.scene = new bs(), this.overlayScene = new bs(), this.renderer = new po({
|
|
13071
13108
|
antialias: !0,
|
|
13072
13109
|
alpha: !0,
|
|
13073
13110
|
logarithmicDepthBuffer: !0,
|
|
13074
13111
|
powerPreference: "high-performance",
|
|
13075
13112
|
preserveDrawingBuffer: !0
|
|
13076
|
-
}), this.css2dRenderer = new
|
|
13113
|
+
}), this.css2dRenderer = new xo(), this.mousePos = new z(), this.mouseCoord = new z(), this.offset = new z(), this.size = new z(), this.amr = new Ac({ showSizeBox: !0, showController: !0 }), this._selectedForOutline = [], this._clock = new qi(!0), this._uiHiddenTime = this._clock.getElapsedTime(), this.camera = new Gi(
|
|
13077
13114
|
39.6,
|
|
13078
13115
|
window.innerWidth / window.innerHeight,
|
|
13079
13116
|
0.1,
|
|
@@ -13085,16 +13122,16 @@ class Eh {
|
|
|
13085
13122
|
-this.d,
|
|
13086
13123
|
0.1,
|
|
13087
13124
|
1e3
|
|
13088
|
-
), this._axisMoving = !1, this._container = new ge(), this._raycaster = new
|
|
13125
|
+
), this._axisMoving = !1, this._container = new ge(), this._raycaster = new mo(), 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 ic(), this._rafId = null, this._destroyed = !1, this._ground = new X(
|
|
13089
13126
|
new Oi(100, 100),
|
|
13090
|
-
new
|
|
13127
|
+
new go({
|
|
13091
13128
|
color: new K("#eee"),
|
|
13092
13129
|
metalness: 0.4,
|
|
13093
13130
|
roughness: 0.1,
|
|
13094
13131
|
clearcoat: 1,
|
|
13095
13132
|
clearcoatRoughness: 0.1
|
|
13096
13133
|
})
|
|
13097
|
-
), this._sciFiGrid = new
|
|
13134
|
+
), this._sciFiGrid = new Ou(18, 40), this._amrRender = new Be(1024, 1024, {
|
|
13098
13135
|
format: te,
|
|
13099
13136
|
type: Vs,
|
|
13100
13137
|
colorSpace: Bi,
|
|
@@ -13123,8 +13160,8 @@ class Eh {
|
|
|
13123
13160
|
};
|
|
13124
13161
|
this._pointerDownTimeout = window.setTimeout(u, 200);
|
|
13125
13162
|
}, this._detectTrackpad = () => {
|
|
13126
|
-
Mt || typeof Mt < "u" || (Fi === 0 && (Ws = performance.now()), Fi++, performance.now() - Ws > 66 && (Fi > 5 ? Mt = !0 : Mt = !1, Mt ? this.controls.zoomSpeed = 0.2 : this.controls.zoomSpeed = 1, setTimeout(
|
|
13127
|
-
}, this.debounceForkHeightChange =
|
|
13163
|
+
Mt || typeof Mt < "u" || (Fi === 0 && (Ws = performance.now()), Fi++, performance.now() - Ws > 66 && (Fi > 5 ? Mt = !0 : Mt = !1, Mt ? this.controls.zoomSpeed = 0.2 : this.controls.zoomSpeed = 1, setTimeout(Vu, 2e3)));
|
|
13164
|
+
}, this.debounceForkHeightChange = oc(() => {
|
|
13128
13165
|
var c;
|
|
13129
13166
|
(c = this._progressShadow) == null || c.recalculate();
|
|
13130
13167
|
}, 300), this.focusObjects = (c, u) => {
|
|
@@ -13202,25 +13239,25 @@ class Eh {
|
|
|
13202
13239
|
const q = W.dot(C), me = W.dot(M), ce = Math.sqrt(q * q + me * me);
|
|
13203
13240
|
R = Math.max(R, ce);
|
|
13204
13241
|
}), R = R / 2 + 0.4;
|
|
13205
|
-
const
|
|
13242
|
+
const P = this.camera.fov * Math.PI / 180, T = 2 * Math.atan(Math.tan(P / 2) * this.camera.aspect), I = R / Math.tan(T / 2), D = R / Math.tan(P / 2), L = Math.max(I, D), F = g.clone().add(x.multiplyScalar(L)), U = this.camera.position.clone(), G = this.controls.target.clone();
|
|
13206
13243
|
let Q = 500;
|
|
13207
13244
|
const ie = U.distanceTo(F) + G.distanceTo(y);
|
|
13208
13245
|
ie > 1e-3 && (Q = Math.min(1e3, Math.max(450, ie * 45))), this._animateCamera(U, F, G, y, Q);
|
|
13209
13246
|
}, this.focusSlots = (c) => {
|
|
13210
13247
|
var M, R;
|
|
13211
|
-
if (this.amr.slots.forEach((
|
|
13212
|
-
|
|
13248
|
+
if (this.amr.slots.forEach((P) => {
|
|
13249
|
+
P.focused = !1, P.hide();
|
|
13213
13250
|
}), !c.length)
|
|
13214
|
-
if (this._lastTarget.set(0, 0, this._lastTarget.z), this.amr.slots.forEach((
|
|
13215
|
-
|
|
13251
|
+
if (this._lastTarget.set(0, 0, this._lastTarget.z), this.amr.slots.forEach((P) => {
|
|
13252
|
+
P.show();
|
|
13216
13253
|
}), this.shadowMode = !1, this._focusRestoreView) {
|
|
13217
|
-
const
|
|
13254
|
+
const P = this._focusRestoreView;
|
|
13218
13255
|
this._focusRestoreView = void 0;
|
|
13219
|
-
const T = this.camera.position.clone(), I = this.controls.target.clone(),
|
|
13256
|
+
const T = this.camera.position.clone(), I = this.controls.target.clone(), D = P.position.clone(), L = P.target.clone();
|
|
13220
13257
|
let F = 500;
|
|
13221
|
-
const U = T.distanceTo(
|
|
13222
|
-
U > 1e-3 && (F = Math.min(1e3, Math.max(450, U * 45))), this._animateCamera(T,
|
|
13223
|
-
this.camera.up.copy(
|
|
13258
|
+
const U = T.distanceTo(D) + I.distanceTo(L);
|
|
13259
|
+
U > 1e-3 && (F = Math.min(1e3, Math.max(450, U * 45))), this._animateCamera(T, D, I, L, F, () => {
|
|
13260
|
+
this.camera.up.copy(P.up);
|
|
13224
13261
|
});
|
|
13225
13262
|
return;
|
|
13226
13263
|
} else {
|
|
@@ -13232,19 +13269,19 @@ class Eh {
|
|
|
13232
13269
|
target: new b(0, 0, this.controls.target.z),
|
|
13233
13270
|
up: this.camera.up.clone()
|
|
13234
13271
|
}), (R = this._fitAnimation) == null || R.stop(), this.shadowMode = !0;
|
|
13235
|
-
const u = c.flatMap((
|
|
13236
|
-
if (
|
|
13272
|
+
const u = c.flatMap((P) => {
|
|
13273
|
+
if (P.show(), P.focused = !0, !P.parent)
|
|
13237
13274
|
return [];
|
|
13238
13275
|
const T = new b();
|
|
13239
|
-
return
|
|
13276
|
+
return P.parent.getWorldPosition(T), [T];
|
|
13240
13277
|
});
|
|
13241
13278
|
if (!u.length)
|
|
13242
13279
|
return;
|
|
13243
|
-
const f = u.reduce((
|
|
13280
|
+
const f = u.reduce((P, T) => P.add(T), new b()).multiplyScalar(1 / u.length), d = this.controls.target.clone(), r = this.camera.position.clone().sub(d).normalize();
|
|
13244
13281
|
let l = 0;
|
|
13245
|
-
for (const
|
|
13246
|
-
const T =
|
|
13247
|
-
|
|
13282
|
+
for (const P of u) {
|
|
13283
|
+
const T = P.clone().sub(f), I = T.dot(r), D = Math.sqrt(Math.max(0, T.lengthSq() - I * I));
|
|
13284
|
+
D > l && (l = D);
|
|
13248
13285
|
}
|
|
13249
13286
|
l = l + 0.4;
|
|
13250
13287
|
const h = this.camera.fov * Math.PI / 180, m = 2 * Math.atan(Math.tan(h / 2) * this.camera.aspect), v = l / Math.tan(m / 2), p = l / Math.tan(h / 2), g = Math.max(v, p), _ = f.clone(), y = f.clone().add(r.clone().multiplyScalar(g < 1 ? 1 : g)), x = this.camera.position.clone(), w = d.clone(), A = { t: 0 };
|
|
@@ -13253,8 +13290,8 @@ class Eh {
|
|
|
13253
13290
|
C > 1e-3 && (S = Math.min(1e3, Math.max(450, C * 45))), this._lastTarget = _.clone(), this._fitAnimation = new Ui(A).to({ t: 1 }, S).easing(Je.Easing.Quadratic.InOut).onStart(() => {
|
|
13254
13291
|
this.controls.enabled = !1;
|
|
13255
13292
|
}).onUpdate(() => {
|
|
13256
|
-
const
|
|
13257
|
-
this.camera.position.lerpVectors(x, y,
|
|
13293
|
+
const P = A.t;
|
|
13294
|
+
this.camera.position.lerpVectors(x, y, P), this.controls.target.lerpVectors(w, _, P);
|
|
13258
13295
|
}).onComplete(() => {
|
|
13259
13296
|
this.controls.enabled = !0;
|
|
13260
13297
|
}).start();
|
|
@@ -13276,8 +13313,8 @@ class Eh {
|
|
|
13276
13313
|
];
|
|
13277
13314
|
let v = 0;
|
|
13278
13315
|
for (const T of m) {
|
|
13279
|
-
const I = T.dot(l),
|
|
13280
|
-
|
|
13316
|
+
const I = T.dot(l), D = Math.sqrt(Math.max(0, T.lengthSq() - I * I));
|
|
13317
|
+
D > v && (v = D);
|
|
13281
13318
|
}
|
|
13282
13319
|
v = v * 1.05;
|
|
13283
13320
|
const p = this.camera.fov * Math.PI / 180, g = 2 * Math.atan(Math.tan(p / 2) * this.camera.aspect), _ = v / Math.tan(g / 2), y = v / Math.tan(p / 2), x = Math.max(_, y), w = f.clone();
|
|
@@ -13287,8 +13324,8 @@ class Eh {
|
|
|
13287
13324
|
Math.max(u.x * 2, 5);
|
|
13288
13325
|
const C = this.camera.position.clone(), M = this.controls.target.clone();
|
|
13289
13326
|
let R = 600;
|
|
13290
|
-
const
|
|
13291
|
-
|
|
13327
|
+
const P = C.distanceTo(S) + M.distanceTo(d);
|
|
13328
|
+
P > 1e-3 && (R = Math.min(800, Math.max(650, P * 45))), this._animateCamera(C, S, M, d, R, () => {
|
|
13292
13329
|
this.shadowMode || (this._progressShadow.visible = !0, this._progressShadow.isFinished || this._progressShadow.recalculate());
|
|
13293
13330
|
}), this.controls.minDistance = Math.max(0.2, Math.min(x * 0.25, x - 0.1)), this.controls.maxDistance = x * 4;
|
|
13294
13331
|
}, this.resize = () => {
|
|
@@ -13304,7 +13341,7 @@ class Eh {
|
|
|
13304
13341
|
if (this.stats.begin(), this.renderer.domElement.dispatchEvent(new CustomEvent("ticker")), this._rafId = requestAnimationFrame(this.ticker), this.renderer.clear(), this.usePathTracing) {
|
|
13305
13342
|
this.hideAmrUI(), this.sampleCount < this.maxSample ? this.sampleCount++ : this.pathTracer.pausePathTracing = !0, this.pathTracer.renderSample();
|
|
13306
13343
|
const c = this.renderer.autoClear;
|
|
13307
|
-
this.renderer.autoClear = !1, this.scene.overrideMaterial =
|
|
13344
|
+
this.renderer.autoClear = !1, this.scene.overrideMaterial = Nu, this.renderer.clearDepth(), this.renderer.render(this.scene, this.mainCamera), this.scene.overrideMaterial = null, this.renderer.render(this.overlayScene, this.mainCamera), this.renderer.autoClear = c;
|
|
13308
13345
|
} else {
|
|
13309
13346
|
this._clock.getElapsedTime() - this._uiHiddenTime > 0.15 ? this.showControls && this.amr.controllers.forEach((f) => f.show()) : this.amr.controllers.forEach((f) => f.hide());
|
|
13310
13347
|
const u = this.stats.fps();
|
|
@@ -13317,12 +13354,12 @@ class Eh {
|
|
|
13317
13354
|
}
|
|
13318
13355
|
this.stats.end();
|
|
13319
13356
|
}
|
|
13320
|
-
}, this.stats.showPanel(0), this.hideState(), e.fov && (this.camera.fov = e.fov, this.camera.updateProjectionMatrix()), Rn(Ft, this.renderer), this._ground.visible = !1, this.controls = new
|
|
13321
|
-
const { tiles: t } =
|
|
13322
|
-
this.pathTracer = new
|
|
13357
|
+
}, this.stats.showPanel(0), this.hideState(), e.fov && (this.camera.fov = e.fov, this.camera.updateProjectionMatrix()), Rn(Ft, this.renderer), this._ground.visible = !1, this.controls = new yo(this.camera, this.renderer.domElement), this.controls.enablePan = !0, this.controls.rotateSpeed = this.props.isMobile ? 0.6 : 0.5, this.controls.dampingFactor = an, this.controls.enableDamping = !0, this.controls.maxDistance = 10, this.controls.minDistance = 1, this.controls.zoomSpeed = this.props.isMobile ? 0.3 : ec() ? 0.2 : 1, this._cameraPositionUI = new Eu(this.controls), this.renderer.setPixelRatio(window.devicePixelRatio || 1), this.renderer.autoClear = !0, this.renderer.toneMapping = vo, this.renderer.toneMappingExposure = 1.4, this.renderer.outputColorSpace = Bi, 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());
|
|
13358
|
+
const { tiles: t } = rc();
|
|
13359
|
+
this.pathTracer = new _l(this.renderer), this.pathTracer.filterGlossyFactor = 0.6;
|
|
13323
13360
|
let i = window.devicePixelRatio;
|
|
13324
13361
|
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.fadeDuration = 0;
|
|
13325
|
-
const s = new
|
|
13362
|
+
const s = new Cu(e.workerUrl), a = typeof navigator < "u" ? navigator.hardwareConcurrency : 4;
|
|
13326
13363
|
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();
|
|
13327
13364
|
const n = () => {
|
|
13328
13365
|
let c = this._lastTarget.x, u = this._lastTarget.y;
|
|
@@ -13331,16 +13368,16 @@ class Eh {
|
|
|
13331
13368
|
this.controls.addEventListener("change", () => {
|
|
13332
13369
|
var c;
|
|
13333
13370
|
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()));
|
|
13334
|
-
}), this._mainCamera = this.camera, this._progressShadow = new
|
|
13371
|
+
}), this._mainCamera = this.camera, this._progressShadow = new Ru(this.renderer, this.scene, {
|
|
13335
13372
|
size: 8,
|
|
13336
13373
|
lightCount: e.isMobile ? 6 : 12,
|
|
13337
13374
|
frames: e.isMobile ? 80 : 120,
|
|
13338
13375
|
lightRadius: 8,
|
|
13339
13376
|
ambientWeight: 0.8
|
|
13340
|
-
}), 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(), this._loadEnv(), this._initEvents(), this.scene.add(this._cameraPositionUI), this._ground.rotateX(-Math.PI / 2), this.scene.add(this._ground), this._jumpFlood = new
|
|
13377
|
+
}), 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(), this._loadEnv(), this._initEvents(), this.scene.add(this._cameraPositionUI), this._ground.rotateX(-Math.PI / 2), this.scene.add(this._ground), this._jumpFlood = new Bu(this.renderer, this.scene, this.camera, {
|
|
13341
13378
|
thickness: 4,
|
|
13342
13379
|
color: "#fff"
|
|
13343
|
-
}), (typeof e.useAxisBall != "boolean" || e.useAxisBall) && (this._controlsGizmo = new
|
|
13380
|
+
}), (typeof e.useAxisBall != "boolean" || e.useAxisBall) && (this._controlsGizmo = new Iu(this.controls, {
|
|
13344
13381
|
size: 160,
|
|
13345
13382
|
padding: 12,
|
|
13346
13383
|
offset: e.axisBallOffset || new z(10, 10),
|
|
@@ -13367,7 +13404,7 @@ class Eh {
|
|
|
13367
13404
|
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;
|
|
13368
13405
|
}
|
|
13369
13406
|
set usePathTracing(e) {
|
|
13370
|
-
this._clearAmrContent(), e ? (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 cr().load(
|
|
13407
|
+
this._clearAmrContent(), e ? (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 cr().load(Uu, (t) => {
|
|
13371
13408
|
t.mapping = ki, this._ptEnvMap = t, this.usePathTracing && (this.scene.environment = t, this.pathTracer.updateEnvironment());
|
|
13372
13409
|
})) : (this.renderer.toneMappingExposure = 1.4, this.scene.add(this._progressShadow.shadowCatcherMesh), this.pathTracer.renderToCanvas = !1, this.amr.logos.forEach((t) => {
|
|
13373
13410
|
var i;
|
|
@@ -13375,7 +13412,7 @@ class Eh {
|
|
|
13375
13412
|
}), 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 : an, this.sampleCount = 0;
|
|
13376
13413
|
}
|
|
13377
13414
|
get fpsAverage() {
|
|
13378
|
-
return
|
|
13415
|
+
return $l(this._fpsCache);
|
|
13379
13416
|
}
|
|
13380
13417
|
get mainCamera() {
|
|
13381
13418
|
return this._mainCamera;
|
|
@@ -13418,8 +13455,8 @@ class Eh {
|
|
|
13418
13455
|
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();
|
|
13419
13456
|
}
|
|
13420
13457
|
_loadEnv() {
|
|
13421
|
-
new cr().load(
|
|
13422
|
-
t.mapping = ki, this._envMap = t, this._usePathTracing || (this.scene.background = t, this.scene.backgroundBlurriness = 1, this.scene.backgroundIntensity = 1, this.scene.backgroundRotation = new
|
|
13458
|
+
new cr().load(zu, (t) => {
|
|
13459
|
+
t.mapping = ki, this._envMap = t, this._usePathTracing || (this.scene.background = t, this.scene.backgroundBlurriness = 1, this.scene.backgroundIntensity = 1, this.scene.backgroundRotation = new _o(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();
|
|
13423
13460
|
}, () => {
|
|
13424
13461
|
}, () => {
|
|
13425
13462
|
});
|
|
@@ -13478,7 +13515,7 @@ class Eh {
|
|
|
13478
13515
|
const t = (e == null ? void 0 : e.subject) ?? this._container;
|
|
13479
13516
|
(n = this._progressShadow) == null || n.visible;
|
|
13480
13517
|
const i = this.scene.background, s = this.showSize;
|
|
13481
|
-
return new
|
|
13518
|
+
return new Gu({
|
|
13482
13519
|
renderer: this.renderer,
|
|
13483
13520
|
scene: this.scene,
|
|
13484
13521
|
overlayScene: this.overlayScene,
|
|
@@ -13498,7 +13535,7 @@ class Eh {
|
|
|
13498
13535
|
const e = this._container.clone(!0);
|
|
13499
13536
|
return e.traverse((t) => {
|
|
13500
13537
|
t.dispose && (t.dispose(), t.removeFromParent());
|
|
13501
|
-
}), await
|
|
13538
|
+
}), await cc.parseAsync(e, {
|
|
13502
13539
|
onlyVisible: !0,
|
|
13503
13540
|
binary: !0
|
|
13504
13541
|
});
|
|
@@ -13581,7 +13618,7 @@ class Eh {
|
|
|
13581
13618
|
e && ((c = this._resizeObserver) == null || c.unobserve(e)), this.controls.dispose(), this.renderer.domElement.remove(), this.renderer.dispose(), We(this.scene), this.scene.clear();
|
|
13582
13619
|
}
|
|
13583
13620
|
}
|
|
13584
|
-
class
|
|
13621
|
+
class Gu {
|
|
13585
13622
|
constructor(e) {
|
|
13586
13623
|
this.deps = e, this.canvas = null, this.pixelBuffer = null, this.orthoCamera = new Ss(-1, 1, 1, -1, 0.1, 1e3), this.orthoCamera.position.set(0, 0, 5), this.perspectiveCamera = new Gi(45, 1, 0.1, 2e3);
|
|
13587
13624
|
}
|
|
@@ -13673,19 +13710,19 @@ class Nu {
|
|
|
13673
13710
|
if (Math.abs(u.dot(c)) > 0.999 && (u.set(0, 0, 1), Math.abs(u.dot(c)) > 0.999 && u.set(0, 1, 0)), (t.mode ?? "orthographic") === "perspective") {
|
|
13674
13711
|
const x = this.perspectiveCamera, w = t.fov ?? 45, A = Ye.degToRad(w), S = Math.max(Math.tan(A / 2), 1e-4), C = Math.max(S * (i || 1), 1e-4), M = this.getPerspectiveDirection(t, e.size).normalize(), R = new b().crossVectors(M, u).normalize();
|
|
13675
13712
|
R.lengthSq() < 1e-6 && R.set(1, 0, 0);
|
|
13676
|
-
const
|
|
13677
|
-
new b(-T, -I, -
|
|
13678
|
-
new b(-T, -I,
|
|
13679
|
-
new b(-T, I, -
|
|
13680
|
-
new b(-T, I,
|
|
13681
|
-
new b(T, -I, -
|
|
13682
|
-
new b(T, -I,
|
|
13683
|
-
new b(T, I, -
|
|
13684
|
-
new b(T, I,
|
|
13713
|
+
const P = new b().crossVectors(R, M).normalize(), T = Math.max(e.size.x * 0.5, 1e-4), I = Math.max(e.size.y * 0.5, 1e-4), D = Math.max(e.size.z * 0.5, 1e-4), L = [
|
|
13714
|
+
new b(-T, -I, -D),
|
|
13715
|
+
new b(-T, -I, D),
|
|
13716
|
+
new b(-T, I, -D),
|
|
13717
|
+
new b(-T, I, D),
|
|
13718
|
+
new b(T, -I, -D),
|
|
13719
|
+
new b(T, -I, D),
|
|
13720
|
+
new b(T, I, -D),
|
|
13721
|
+
new b(T, I, D)
|
|
13685
13722
|
];
|
|
13686
13723
|
let F = 0, U = -1 / 0;
|
|
13687
13724
|
for (const ie of L) {
|
|
13688
|
-
const se = R.dot(ie), W =
|
|
13725
|
+
const se = R.dot(ie), W = P.dot(ie), q = M.dot(ie);
|
|
13689
13726
|
U = Math.max(U, q);
|
|
13690
13727
|
const me = q + Math.abs(se) / C, ce = q + Math.abs(W) / S;
|
|
13691
13728
|
F = Math.max(F, me, ce);
|
|
@@ -13697,7 +13734,7 @@ class Nu {
|
|
|
13697
13734
|
const se = M.dot(ie), W = G - se;
|
|
13698
13735
|
W > 1e-3 && (Q = Math.min(Q, W));
|
|
13699
13736
|
}
|
|
13700
|
-
return x.fov = w, x.aspect = i || a / Math.max(n, 1), x.near = Math.max(0.1, Number.isFinite(Q) ? Q * 0.5 : G * 0.1), x.far = Math.max(x.near + 1, G + e.sphere.radius * 3), x.position.copy(e.center).add(M.clone().multiplyScalar(G)), x.up.copy(
|
|
13737
|
+
return x.fov = w, x.aspect = i || a / Math.max(n, 1), x.near = Math.max(0.1, Number.isFinite(Q) ? Q * 0.5 : G * 0.1), x.far = Math.max(x.near + 1, G + e.sphere.radius * 3), x.position.copy(e.center).add(M.clone().multiplyScalar(G)), x.up.copy(P), x.lookAt(e.center), x.updateProjectionMatrix(), x.updateMatrixWorld(!0), x;
|
|
13701
13738
|
}
|
|
13702
13739
|
const d = this.orthoCamera, r = e.size, l = e.center, h = Math.max(r[t.plane.width] * 0.5, 0.01), m = Math.max(r[t.plane.height] * 0.5, 0.01), v = Math.max(r[t.plane.depth] * 0.5, 0.01);
|
|
13703
13740
|
let p = h * (1 + s), g = m * (1 + s);
|
|
@@ -13769,22 +13806,22 @@ class Nu {
|
|
|
13769
13806
|
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;
|
|
13770
13807
|
}
|
|
13771
13808
|
}
|
|
13772
|
-
const
|
|
13809
|
+
const qu = "shop-components", ju = "0.4.7", Qu = "Shop components", Yu = "dist/shop-components.umd.js", Zu = "dist/shop-components.mjs", Xu = "dist/main.d.ts", Ku = {
|
|
13773
13810
|
dts: "tsc --emitDeclarationOnly & tsc & storybook build -o dist",
|
|
13774
13811
|
dev: "vite dev",
|
|
13775
13812
|
build: "vite build",
|
|
13776
13813
|
v: "auto-changelog -p && git add CHANGELOG.md"
|
|
13777
|
-
},
|
|
13814
|
+
}, Ju = [
|
|
13778
13815
|
"dist",
|
|
13779
13816
|
"package.json"
|
|
13780
|
-
],
|
|
13817
|
+
], $u = [], eh = "machengda<machengda@seer-group.com>", th = "ISC", ih = {
|
|
13781
13818
|
"@needle-tools/gltf-progressive": "^3.3.5",
|
|
13782
13819
|
"auto-changelog": "^2.4.0",
|
|
13783
13820
|
vite: "5.1.6",
|
|
13784
13821
|
"vite-plugin-dts": "^3.7.3"
|
|
13785
|
-
}, ih = {
|
|
13786
|
-
"string-width": "4.2.3"
|
|
13787
13822
|
}, sh = {
|
|
13823
|
+
"string-width": "4.2.3"
|
|
13824
|
+
}, rh = {
|
|
13788
13825
|
"@nodetoy/three-nodetoy": "^0.1.36",
|
|
13789
13826
|
"@tweakpane/core": "^2.0.3",
|
|
13790
13827
|
"@tweenjs/tween.js": "^23.1.2",
|
|
@@ -13802,24 +13839,24 @@ const Gu = "shop-components", qu = "0.4.5", ju = "Shop components", Qu = "dist/s
|
|
|
13802
13839
|
"three-mesh-bvh": "^0.7.5",
|
|
13803
13840
|
"troika-three-text": "^0.49.1",
|
|
13804
13841
|
tweakpane: "^4.0.3"
|
|
13805
|
-
},
|
|
13806
|
-
name:
|
|
13807
|
-
version:
|
|
13808
|
-
description:
|
|
13809
|
-
main:
|
|
13810
|
-
module:
|
|
13811
|
-
types:
|
|
13812
|
-
scripts:
|
|
13813
|
-
files:
|
|
13814
|
-
keywords:
|
|
13815
|
-
author:
|
|
13816
|
-
license:
|
|
13817
|
-
devDependencies:
|
|
13818
|
-
resolutions:
|
|
13819
|
-
dependencies:
|
|
13842
|
+
}, nh = {
|
|
13843
|
+
name: qu,
|
|
13844
|
+
version: ju,
|
|
13845
|
+
description: Qu,
|
|
13846
|
+
main: Yu,
|
|
13847
|
+
module: Zu,
|
|
13848
|
+
types: Xu,
|
|
13849
|
+
scripts: Ku,
|
|
13850
|
+
files: Ju,
|
|
13851
|
+
keywords: $u,
|
|
13852
|
+
author: eh,
|
|
13853
|
+
license: th,
|
|
13854
|
+
devDependencies: ih,
|
|
13855
|
+
resolutions: sh,
|
|
13856
|
+
dependencies: rh
|
|
13820
13857
|
};
|
|
13821
13858
|
function ln() {
|
|
13822
|
-
const o = "Nebular Engin", e =
|
|
13859
|
+
const o = "Nebular Engin", e = nh.version, t = `%c ${o} %c v${e} `;
|
|
13823
13860
|
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;");
|
|
13824
13861
|
}
|
|
13825
13862
|
const cn = "__SHOP_COMPONENTS_BANNER_PRINTED__";
|
|
@@ -13830,25 +13867,25 @@ try {
|
|
|
13830
13867
|
ln();
|
|
13831
13868
|
}
|
|
13832
13869
|
export {
|
|
13833
|
-
|
|
13870
|
+
Ac as Amr,
|
|
13834
13871
|
jr as Logo,
|
|
13835
13872
|
Hi as SGLBLoader,
|
|
13836
13873
|
$ as SLOT_EVENTS,
|
|
13837
|
-
|
|
13874
|
+
Lh as Scene3D,
|
|
13838
13875
|
on as Skin,
|
|
13839
13876
|
Vr as Slot,
|
|
13840
|
-
|
|
13841
|
-
|
|
13877
|
+
Wu as SlotState,
|
|
13878
|
+
Gu as TriViewCapture,
|
|
13842
13879
|
Br as arrayBufferToUrl,
|
|
13843
|
-
|
|
13844
|
-
|
|
13880
|
+
$l as calculateArrayAverage,
|
|
13881
|
+
Ih as calculateFocalLength,
|
|
13845
13882
|
Dh as createSGLBFile,
|
|
13846
|
-
|
|
13847
|
-
|
|
13848
|
-
|
|
13849
|
-
|
|
13883
|
+
Ch as downloadBlob,
|
|
13884
|
+
Ph as dracoExporter,
|
|
13885
|
+
Eh as font,
|
|
13886
|
+
cc as gltfExporter,
|
|
13850
13887
|
Ft as gltfLoader,
|
|
13851
13888
|
Or as imageBitmapToUrl,
|
|
13852
|
-
|
|
13889
|
+
ec as isAppleDevice,
|
|
13853
13890
|
kn as textureLoader
|
|
13854
13891
|
};
|