@needle-tools/engine 4.11.0-next.8bfb2f5 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/components.needle.json +1 -1
- package/dist/{gltf-progressive-CXVECA3a.js → gltf-progressive-BvlZQAkt.js} +3 -3
- package/dist/{gltf-progressive-D4Z_Khp3.min.js → gltf-progressive-CftVUJy3.min.js} +1 -1
- package/dist/{gltf-progressive-CHeORqEv.umd.cjs → gltf-progressive-GwdQV1Qx.umd.cjs} +1 -1
- package/dist/{needle-engine.bundle-lul9TfB2.js → needle-engine.bundle-Dh4X0Qy5.js} +6264 -6202
- package/dist/{needle-engine.bundle-8EmDJd2O.umd.cjs → needle-engine.bundle-DhRclTK5.umd.cjs} +142 -142
- package/dist/{needle-engine.bundle-DtF-fcok.min.js → needle-engine.bundle-IPerDSpg.min.js} +144 -144
- package/dist/needle-engine.d.ts +6 -0
- package/dist/needle-engine.js +4 -4
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/{postprocessing-DQ2pynXW.js → postprocessing-CJC0Npcd.js} +2 -2
- package/dist/{postprocessing-BsnRNRRS.umd.cjs → postprocessing-DrM4PWU3.umd.cjs} +1 -1
- package/dist/{postprocessing-BHMVuZQ1.min.js → postprocessing-l7zsdO_Q.min.js} +1 -1
- package/dist/{three-qw28ZtTy.min.js → three-BDW9I486.min.js} +13 -13
- package/dist/{three-CJSAehtG.js → three-MHVqtJYj.js} +1 -0
- package/dist/{three-examples-Doq0rvFU.js → three-examples-C5Ht-QFN.js} +1 -1
- package/dist/{three-examples-Deqc1bNw.umd.cjs → three-examples-CgwGHSgz.umd.cjs} +1 -1
- package/dist/{three-examples-BivkhnvN.min.js → three-examples-fvEPSC8L.min.js} +1 -1
- package/dist/{three-B-jwTHao.umd.cjs → three-iFaDq9U3.umd.cjs} +13 -13
- package/dist/{three-mesh-ui-CktOi6oI.js → three-mesh-ui-BjWTTk1R.js} +1 -1
- package/dist/{three-mesh-ui-CsHwj9cJ.umd.cjs → three-mesh-ui-Bm32sS2a.umd.cjs} +1 -1
- package/dist/{three-mesh-ui-DhYXcXZe.min.js → three-mesh-ui-CLdkp21K.min.js} +1 -1
- package/dist/{vendor-BcsPRUmt.umd.cjs → vendor-CAWj5cBK.umd.cjs} +2 -2
- package/dist/{vendor-CyfN5nor.js → vendor-DJBpoQcM.js} +608 -599
- package/dist/{vendor-DyavoogU.min.js → vendor-DWGd3dEf.min.js} +20 -20
- package/lib/engine/js-extensions/Object3D.d.ts +6 -0
- package/lib/engine/js-extensions/Object3D.js +15 -0
- package/lib/engine/js-extensions/Object3D.js.map +1 -1
- package/lib/engine-components/Collider.d.ts +26 -0
- package/lib/engine-components/Collider.js +26 -0
- package/lib/engine-components/Collider.js.map +1 -1
- package/lib/engine-components/ContactShadows.d.ts +11 -2
- package/lib/engine-components/ContactShadows.js +11 -2
- package/lib/engine-components/ContactShadows.js.map +1 -1
- package/lib/engine-components/DropListener.d.ts +3 -0
- package/lib/engine-components/DropListener.js +44 -21
- package/lib/engine-components/DropListener.js.map +1 -1
- package/lib/engine-components/Duplicatable.d.ts +2 -2
- package/lib/engine-components/Duplicatable.js +2 -2
- package/lib/engine-components/EventList.d.ts +18 -1
- package/lib/engine-components/EventList.js +18 -1
- package/lib/engine-components/EventList.js.map +1 -1
- package/lib/engine-components/GroundProjection.d.ts +3 -0
- package/lib/engine-components/GroundProjection.js +3 -0
- package/lib/engine-components/GroundProjection.js.map +1 -1
- package/lib/engine-components/Interactable.d.ts +4 -0
- package/lib/engine-components/Interactable.js +4 -0
- package/lib/engine-components/Interactable.js.map +1 -1
- package/lib/engine-components/OrbitControls.d.ts +4 -2
- package/lib/engine-components/OrbitControls.js +31 -3
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/RigidBody.d.ts +5 -0
- package/lib/engine-components/RigidBody.js +5 -0
- package/lib/engine-components/RigidBody.js.map +1 -1
- package/lib/engine-components/SeeThrough.js +20 -0
- package/lib/engine-components/SeeThrough.js.map +1 -1
- package/lib/engine-components/export/usdz/ThreeUSDZExporter.d.ts +4 -2
- package/lib/engine-components/export/usdz/ThreeUSDZExporter.js +69 -14
- package/lib/engine-components/export/usdz/ThreeUSDZExporter.js.map +1 -1
- package/lib/engine-components/ui/Text.js +6 -1
- package/lib/engine-components/ui/Text.js.map +1 -1
- package/lib/engine-components/utils/LookAt.d.ts +3 -0
- package/lib/engine-components/utils/LookAt.js +3 -0
- package/lib/engine-components/utils/LookAt.js.map +1 -1
- package/lib/engine-components/utils/OpenURL.d.ts +2 -1
- package/lib/engine-components/utils/OpenURL.js +2 -1
- package/lib/engine-components/utils/OpenURL.js.map +1 -1
- package/lib/engine-components/web/ScrollFollow.js +1 -2
- package/lib/engine-components/web/ScrollFollow.js.map +1 -1
- package/lib/engine-components/webxr/WebARCameraBackground.d.ts +2 -0
- package/lib/engine-components/webxr/WebARCameraBackground.js +2 -0
- package/lib/engine-components/webxr/WebARCameraBackground.js.map +1 -1
- package/lib/engine-components/webxr/WebARSessionRoot.d.ts +1 -1
- package/lib/engine-components/webxr/WebARSessionRoot.js +1 -1
- package/lib/engine-components/webxr/WebXR.d.ts +2 -0
- package/lib/engine-components/webxr/WebXR.js +2 -0
- package/lib/engine-components/webxr/WebXR.js.map +1 -1
- package/lib/engine-components/webxr/WebXRImageTracking.d.ts +29 -0
- package/lib/engine-components/webxr/WebXRImageTracking.js +29 -0
- package/lib/engine-components/webxr/WebXRImageTracking.js.map +1 -1
- package/package.json +3 -3
- package/plugins/vite/index.js +4 -1
- package/plugins/vite/needle-app.js +103 -57
- package/src/engine/js-extensions/Object3D.ts +24 -0
- package/src/engine-components/Collider.ts +27 -1
- package/src/engine-components/ContactShadows.ts +12 -4
- package/src/engine-components/DropListener.ts +45 -24
- package/src/engine-components/Duplicatable.ts +2 -2
- package/src/engine-components/EventList.ts +18 -1
- package/src/engine-components/GroundProjection.ts +4 -1
- package/src/engine-components/Interactable.ts +4 -1
- package/src/engine-components/OrbitControls.ts +27 -3
- package/src/engine-components/RigidBody.ts +6 -1
- package/src/engine-components/SeeThrough.ts +42 -2
- package/src/engine-components/export/usdz/ThreeUSDZExporter.ts +117 -17
- package/src/engine-components/ui/Text.ts +11 -2
- package/src/engine-components/utils/LookAt.ts +3 -0
- package/src/engine-components/utils/OpenURL.ts +3 -2
- package/src/engine-components/web/ScrollFollow.ts +1 -1
- package/src/engine-components/webxr/WebARCameraBackground.ts +2 -0
- package/src/engine-components/webxr/WebARSessionRoot.ts +1 -1
- package/src/engine-components/webxr/WebXR.ts +2 -0
- package/src/engine-components/webxr/WebXRImageTracking.ts +30 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlaneGeometry as sc, ShaderChunk as Il, Object3D as oc, Layers as Rr, MeshBasicMaterial as Zo, DoubleSide as js, AdditiveBlending as ac, InstancedBufferAttribute as un, DynamicDrawUsage as Wt, InstancedBufferGeometry as
|
|
1
|
+
import { PlaneGeometry as sc, ShaderChunk as Il, Object3D as oc, Layers as Rr, MeshBasicMaterial as Zo, DoubleSide as js, AdditiveBlending as ac, InstancedBufferAttribute as un, DynamicDrawUsage as Wt, InstancedBufferGeometry as Bl, Uniform$1 as Pe, ShaderMaterial as Gs, BufferGeometry as fi, BufferAttribute as se, Mesh as yo, MeshStandardMaterial as Nl, MeshPhysicalMaterial as Ul, Triangle as xn, Vector3 as H, Plane as cc, Line3 as Xe, Vector2 as Ln, Sphere as lc, Matrix4 as ke, Box3 as Ue, BackSide as Fl, REVISION as Dl, FrontSide as Ko, BatchedMesh as Ll, Ray as Vl, Matrix3 as Jl, Vector4 as go, SkinnedMesh as jl, InterpolateDiscrete as Gl, InterpolateLinear as uc, AnimationClip as Wl, QuaternionKeyframeTrack as $l, ColorKeyframeTrack as Hl, VectorKeyframeTrack as ql, BooleanKeyframeTrack as Xl, NumberKeyframeTrack as Yl, PropertyBinding as Qo } from "./three-MHVqtJYj.js";
|
|
2
2
|
const At = {
|
|
3
3
|
ComponentState: Object.freeze({
|
|
4
4
|
DEFAULT: "default",
|
|
@@ -24,13 +24,13 @@ async function hc(r) {
|
|
|
24
24
|
return t.json();
|
|
25
25
|
throw new Error(t.statusText);
|
|
26
26
|
}
|
|
27
|
-
async function
|
|
27
|
+
async function Zl(r) {
|
|
28
28
|
return await hc(`${r}/profilesList.json`);
|
|
29
29
|
}
|
|
30
|
-
async function
|
|
30
|
+
async function Ed(r, t, e = null, n = !0) {
|
|
31
31
|
if (!r)
|
|
32
32
|
throw new Error("No xrInputSource supplied");
|
|
33
|
-
const i = await
|
|
33
|
+
const i = await Zl(t);
|
|
34
34
|
let s;
|
|
35
35
|
if (r.profiles.some((c) => {
|
|
36
36
|
const l = i[c];
|
|
@@ -63,13 +63,13 @@ async function Pd(r, t, e = null, n = !0) {
|
|
|
63
63
|
}
|
|
64
64
|
return { profile: a, assetPath: o };
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const Kl = {
|
|
67
67
|
xAxis: 0,
|
|
68
68
|
yAxis: 0,
|
|
69
69
|
button: 0,
|
|
70
70
|
state: At.ComponentState.DEFAULT
|
|
71
71
|
};
|
|
72
|
-
function
|
|
72
|
+
function Ql(r = 0, t = 0) {
|
|
73
73
|
let e = r, n = t;
|
|
74
74
|
if (Math.sqrt(r * r + t * t) > 1) {
|
|
75
75
|
const a = Math.atan2(t, r);
|
|
@@ -80,9 +80,9 @@ function Kl(r = 0, t = 0) {
|
|
|
80
80
|
normalizedYAxis: n * 0.5 + 0.5
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
class
|
|
83
|
+
class tu {
|
|
84
84
|
constructor(t) {
|
|
85
|
-
this.componentProperty = t.componentProperty, this.states = t.states, this.valueNodeName = t.valueNodeName, this.valueNodeProperty = t.valueNodeProperty, this.valueNodeProperty === At.VisualResponseProperty.TRANSFORM && (this.minNodeName = t.minNodeName, this.maxNodeName = t.maxNodeName), this.value = 0, this.updateFromComponent(
|
|
85
|
+
this.componentProperty = t.componentProperty, this.states = t.states, this.valueNodeName = t.valueNodeName, this.valueNodeProperty = t.valueNodeProperty, this.valueNodeProperty === At.VisualResponseProperty.TRANSFORM && (this.minNodeName = t.minNodeName, this.maxNodeName = t.maxNodeName), this.value = 0, this.updateFromComponent(Kl);
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* Computes the visual response's interpolation weight based on component state
|
|
@@ -98,7 +98,7 @@ class Ql {
|
|
|
98
98
|
button: n,
|
|
99
99
|
state: i
|
|
100
100
|
}) {
|
|
101
|
-
const { normalizedXAxis: s, normalizedYAxis: a } =
|
|
101
|
+
const { normalizedXAxis: s, normalizedYAxis: a } = Ql(t, e);
|
|
102
102
|
switch (this.componentProperty) {
|
|
103
103
|
case At.ComponentProperty.X_AXIS:
|
|
104
104
|
this.value = this.states.includes(i) ? s : 0.5;
|
|
@@ -117,7 +117,7 @@ class Ql {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
class
|
|
120
|
+
class eu {
|
|
121
121
|
/**
|
|
122
122
|
* @param {Object} componentId - Id of the component
|
|
123
123
|
* @param {Object} componentDescription - Description of the component to be created
|
|
@@ -126,7 +126,7 @@ class tu {
|
|
|
126
126
|
if (!t || !e || !e.visualResponses || !e.gamepadIndices || Object.keys(e.gamepadIndices).length === 0)
|
|
127
127
|
throw new Error("Invalid arguments supplied");
|
|
128
128
|
this.id = t, this.type = e.type, this.rootNodeName = e.rootNodeName, this.touchPointNodeName = e.touchPointNodeName, this.visualResponses = {}, Object.keys(e.visualResponses).forEach((n) => {
|
|
129
|
-
const i = new
|
|
129
|
+
const i = new tu(e.visualResponses[n]);
|
|
130
130
|
this.visualResponses[n] = i;
|
|
131
131
|
}), this.gamepadIndices = Object.assign({}, e.gamepadIndices), this.values = {
|
|
132
132
|
state: At.ComponentState.DEFAULT,
|
|
@@ -152,7 +152,7 @@ class tu {
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
class
|
|
155
|
+
class kd {
|
|
156
156
|
/**
|
|
157
157
|
* @param {Object} xrInputSource - The XRInputSource to build the MotionController around
|
|
158
158
|
* @param {Object} profile - The best matched profile description for the supplied xrInputSource
|
|
@@ -165,7 +165,7 @@ class Ed {
|
|
|
165
165
|
throw new Error("No profile supplied");
|
|
166
166
|
this.xrInputSource = t, this.assetUrl = n, this.id = e.profileId, this.layoutDescription = e.layouts[t.handedness], this.components = {}, Object.keys(this.layoutDescription.components).forEach((i) => {
|
|
167
167
|
const s = this.layoutDescription.components[i];
|
|
168
|
-
this.components[i] = new
|
|
168
|
+
this.components[i] = new eu(i, s);
|
|
169
169
|
}), this.updateFromGamepad();
|
|
170
170
|
}
|
|
171
171
|
get gripSpace() {
|
|
@@ -192,7 +192,7 @@ class Ed {
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
const hs = 2, Ie = 4, He = 4,
|
|
195
|
+
const hs = 2, Ie = 4, He = 4, nu = 4, nn = new Int32Array(2), ta = new Float32Array(nn.buffer), ea = new Float64Array(nn.buffer), rr = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;
|
|
196
196
|
class Ye {
|
|
197
197
|
constructor(t, e) {
|
|
198
198
|
this.low = t | 0, this.high = e | 0;
|
|
@@ -212,7 +212,7 @@ var Ws;
|
|
|
212
212
|
(function(r) {
|
|
213
213
|
r[r.UTF8_BYTES = 1] = "UTF8_BYTES", r[r.UTF16_STRING = 2] = "UTF16_STRING";
|
|
214
214
|
})(Ws || (Ws = {}));
|
|
215
|
-
class
|
|
215
|
+
class Nr {
|
|
216
216
|
/**
|
|
217
217
|
* Create a new ByteBuffer with a given array of bytes (`Uint8Array`)
|
|
218
218
|
*/
|
|
@@ -223,7 +223,7 @@ class Br {
|
|
|
223
223
|
* Create and allocate a new ByteBuffer with a given size.
|
|
224
224
|
*/
|
|
225
225
|
static allocate(t) {
|
|
226
|
-
return new
|
|
226
|
+
return new Nr(new Uint8Array(t));
|
|
227
227
|
}
|
|
228
228
|
clear() {
|
|
229
229
|
this.position_ = 0;
|
|
@@ -453,7 +453,7 @@ class fc {
|
|
|
453
453
|
constructor(t) {
|
|
454
454
|
this.minalign = 1, this.vtable = null, this.vtable_in_use = 0, this.isNested = !1, this.object_start = 0, this.vtables = [], this.vector_num_elems = 0, this.force_defaults = !1, this.string_maps = null;
|
|
455
455
|
let e;
|
|
456
|
-
t ? e = t : e = 1024, this.bb =
|
|
456
|
+
t ? e = t : e = 1024, this.bb = Nr.allocate(e), this.space = e;
|
|
457
457
|
}
|
|
458
458
|
clear() {
|
|
459
459
|
this.bb.clear(), this.space = this.bb.capacity(), this.minalign = 1, this.vtable = null, this.vtable_in_use = 0, this.isNested = !1, this.object_start = 0, this.vtables = [], this.vector_num_elems = 0, this.force_defaults = !1, this.string_maps = null;
|
|
@@ -637,7 +637,7 @@ class fc {
|
|
|
637
637
|
const e = t.capacity();
|
|
638
638
|
if (e & 3221225472)
|
|
639
639
|
throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");
|
|
640
|
-
const n = e << 1, i =
|
|
640
|
+
const n = e << 1, i = Nr.allocate(n);
|
|
641
641
|
return i.setPosition(n - e), i.bytes().set(t.bytes(), n - e), i;
|
|
642
642
|
}
|
|
643
643
|
/**
|
|
@@ -697,7 +697,7 @@ class fc {
|
|
|
697
697
|
* Finalize a buffer, poiting to the given `root_table`.
|
|
698
698
|
*/
|
|
699
699
|
finish(t, e, n) {
|
|
700
|
-
const i = n ?
|
|
700
|
+
const i = n ? nu : 0;
|
|
701
701
|
if (e) {
|
|
702
702
|
const s = e;
|
|
703
703
|
if (this.prep(this.minalign, Ie + He + i), s.length != He)
|
|
@@ -869,7 +869,7 @@ function ia() {
|
|
|
869
869
|
})(fs)), fs.exports;
|
|
870
870
|
}
|
|
871
871
|
var ds, ra;
|
|
872
|
-
function
|
|
872
|
+
function iu() {
|
|
873
873
|
if (ra) return ds;
|
|
874
874
|
ra = 1;
|
|
875
875
|
var r = ia().BufferBuilder, t = ia().binaryFeatures, e = {
|
|
@@ -1153,8 +1153,8 @@ function nu() {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
return ds;
|
|
1155
1155
|
}
|
|
1156
|
-
var
|
|
1157
|
-
const sa = /* @__PURE__ */ Wr(
|
|
1156
|
+
var ru = iu();
|
|
1157
|
+
const sa = /* @__PURE__ */ Wr(ru);
|
|
1158
1158
|
let dc = !0, pc = !0;
|
|
1159
1159
|
function ai(r, t, e) {
|
|
1160
1160
|
const n = r.match(t);
|
|
@@ -1204,10 +1204,10 @@ function Wn(r, t, e) {
|
|
|
1204
1204
|
configurable: !0
|
|
1205
1205
|
});
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function su(r) {
|
|
1208
1208
|
return typeof r != "boolean" ? new Error("Argument type: " + typeof r + ". Please use a boolean.") : (dc = r, r ? "adapter.js logging disabled" : "adapter.js logging enabled");
|
|
1209
1209
|
}
|
|
1210
|
-
function
|
|
1210
|
+
function ou(r) {
|
|
1211
1211
|
return typeof r != "boolean" ? new Error("Argument type: " + typeof r + ". Please use a boolean.") : (pc = !r, "adapter.js deprecation warnings " + (r ? "disabled" : "enabled"));
|
|
1212
1212
|
}
|
|
1213
1213
|
function vo() {
|
|
@@ -1220,7 +1220,7 @@ function vo() {
|
|
|
1220
1220
|
function $r(r, t) {
|
|
1221
1221
|
pc && console.warn(r + " is deprecated, please use " + t + " instead.");
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1223
|
+
function au(r) {
|
|
1224
1224
|
const t = { browser: null, version: null };
|
|
1225
1225
|
if (typeof r > "u" || !r.navigator)
|
|
1226
1226
|
return t.browser = "Not a browser.", t;
|
|
@@ -1375,7 +1375,7 @@ function yc(r, t) {
|
|
|
1375
1375
|
});
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function cu(r, t) {
|
|
1379
1379
|
if (!(r.navigator.mediaDevices && "getDisplayMedia" in r.navigator.mediaDevices) && r.navigator.mediaDevices) {
|
|
1380
1380
|
if (typeof t != "function") {
|
|
1381
1381
|
console.error("shimGetDisplayMedia: getSourceId argument is not a function");
|
|
@@ -1779,7 +1779,7 @@ const la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1779
1779
|
fixNegotiationNeeded: Cc,
|
|
1780
1780
|
shimAddTrackRemoveTrack: Tc,
|
|
1781
1781
|
shimAddTrackRemoveTrackWithNative: bc,
|
|
1782
|
-
shimGetDisplayMedia:
|
|
1782
|
+
shimGetDisplayMedia: cu,
|
|
1783
1783
|
shimGetSendersWithDtmf: Sc,
|
|
1784
1784
|
shimGetStats: xc,
|
|
1785
1785
|
shimGetUserMedia: yc,
|
|
@@ -1788,7 +1788,7 @@ const la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1788
1788
|
shimPeerConnection: Hs,
|
|
1789
1789
|
shimSenderReceiverGetStats: _c
|
|
1790
1790
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1791
|
-
function
|
|
1791
|
+
function lu(r, t) {
|
|
1792
1792
|
let e = !1;
|
|
1793
1793
|
return r = JSON.parse(JSON.stringify(r)), r.filter((n) => {
|
|
1794
1794
|
if (n && (n.urls || n.url)) {
|
|
@@ -2219,7 +2219,7 @@ t=0 0\r
|
|
|
2219
2219
|
})(ps)), ps.exports;
|
|
2220
2220
|
}
|
|
2221
2221
|
var ms, ha;
|
|
2222
|
-
function
|
|
2222
|
+
function uu() {
|
|
2223
2223
|
if (ha) return ms;
|
|
2224
2224
|
ha = 1;
|
|
2225
2225
|
var r = Mc();
|
|
@@ -2576,10 +2576,10 @@ function lu() {
|
|
|
2576
2576
|
z ? R[P.candidate.sdpMLineIndex] += `a=end-of-candidates\r
|
|
2577
2577
|
` : R[P.candidate.sdpMLineIndex] += "a=" + P.candidate.candidate + `\r
|
|
2578
2578
|
`, b._localDescription.sdp = r.getDescription(b._localDescription.sdp) + R.join("");
|
|
2579
|
-
var
|
|
2579
|
+
var B = b.transceivers.every(function(I) {
|
|
2580
2580
|
return I.iceGatherer && I.iceGatherer.state === "completed";
|
|
2581
2581
|
});
|
|
2582
|
-
b.iceGatheringState !== "gathering" && (b.iceGatheringState = "gathering", b._emitGatheringStateChange()), z || b._dispatchEvent("icecandidate", P),
|
|
2582
|
+
b.iceGatheringState !== "gathering" && (b.iceGatheringState = "gathering", b._emitGatheringStateChange()), z || b._dispatchEvent("icecandidate", P), B && (b._dispatchEvent("icecandidate", new Event("icecandidate")), b.iceGatheringState = "complete", b._emitGatheringStateChange());
|
|
2583
2583
|
}
|
|
2584
2584
|
}, c.setTimeout(function() {
|
|
2585
2585
|
w.forEach(function(M) {
|
|
@@ -2656,7 +2656,7 @@ function lu() {
|
|
|
2656
2656
|
"a=ice-lite"
|
|
2657
2657
|
).length > 0;
|
|
2658
2658
|
b.forEach(function(M, P) {
|
|
2659
|
-
var E = v.transceivers[P], z = E.iceGatherer, A = E.iceTransport, R = E.dtlsTransport,
|
|
2659
|
+
var E = v.transceivers[P], z = E.iceGatherer, A = E.iceTransport, R = E.dtlsTransport, B = E.localCapabilities, I = E.remoteCapabilities, U = r.isRejected(M) && r.matchPrefix(M, "a=bundle-only").length === 0;
|
|
2660
2660
|
if (!U && !E.rejected) {
|
|
2661
2661
|
var D = r.getIceParameters(
|
|
2662
2662
|
M,
|
|
@@ -2671,7 +2671,7 @@ function lu() {
|
|
|
2671
2671
|
w ? "controlling" : "controlled"
|
|
2672
2672
|
), R.state === "new" && R.start(V));
|
|
2673
2673
|
var $ = i(
|
|
2674
|
-
|
|
2674
|
+
B,
|
|
2675
2675
|
I
|
|
2676
2676
|
);
|
|
2677
2677
|
v._transceive(
|
|
@@ -2719,7 +2719,7 @@ function lu() {
|
|
|
2719
2719
|
"a=ice-options:"
|
|
2720
2720
|
)[0];
|
|
2721
2721
|
return z ? v.canTrickleIceCandidates = z.substr(14).split(" ").indexOf("trickle") >= 0 : v.canTrickleIceCandidates = !1, w.forEach(function(A, R) {
|
|
2722
|
-
var
|
|
2722
|
+
var B = r.splitLines(A), I = r.getKind(A), U = r.isRejected(A) && r.matchPrefix(A, "a=bundle-only").length === 0, D = B[0].substr(2).split(" ")[2], V = r.getDirection(A, M), $ = r.parseMsid(A), Z = r.getMid(A) || r.generateIdentifier();
|
|
2723
2723
|
if (U || I === "application" && (D === "DTLS/SCTP" || D === "UDP/DTLS/SCTP")) {
|
|
2724
2724
|
v.transceivers[R] = {
|
|
2725
2725
|
mid: Z,
|
|
@@ -2817,9 +2817,9 @@ function lu() {
|
|
|
2817
2817
|
if (R.getTracks().length) {
|
|
2818
2818
|
if (v.remoteStreams.indexOf(R) === -1) {
|
|
2819
2819
|
v.remoteStreams.push(R);
|
|
2820
|
-
var
|
|
2821
|
-
|
|
2822
|
-
v._dispatchEvent("addstream",
|
|
2820
|
+
var B = new Event("addstream");
|
|
2821
|
+
B.stream = R, c.setTimeout(function() {
|
|
2822
|
+
v._dispatchEvent("addstream", B);
|
|
2823
2823
|
});
|
|
2824
2824
|
}
|
|
2825
2825
|
_.forEach(function(I) {
|
|
@@ -2918,16 +2918,16 @@ function lu() {
|
|
|
2918
2918
|
E,
|
|
2919
2919
|
g.usingBundle
|
|
2920
2920
|
));
|
|
2921
|
-
var
|
|
2922
|
-
l < 15019 && (
|
|
2921
|
+
var B = c.RTCRtpSender.getCapabilities(A);
|
|
2922
|
+
l < 15019 && (B.codecs = B.codecs.filter(
|
|
2923
2923
|
function(U) {
|
|
2924
2924
|
return U.name !== "rtx";
|
|
2925
2925
|
}
|
|
2926
|
-
)),
|
|
2926
|
+
)), B.codecs.forEach(function(U) {
|
|
2927
2927
|
U.name === "H264" && U.parameters["level-asymmetry-allowed"] === void 0 && (U.parameters["level-asymmetry-allowed"] = "1"), P.remoteCapabilities && P.remoteCapabilities.codecs && P.remoteCapabilities.codecs.forEach(function(D) {
|
|
2928
2928
|
U.name.toLowerCase() === D.name.toLowerCase() && U.clockRate === D.clockRate && (U.preferredPayloadType = D.payloadType);
|
|
2929
2929
|
});
|
|
2930
|
-
}),
|
|
2930
|
+
}), B.headerExtensions.forEach(function(U) {
|
|
2931
2931
|
var D = P.remoteCapabilities && P.remoteCapabilities.headerExtensions || [];
|
|
2932
2932
|
D.forEach(function(V) {
|
|
2933
2933
|
U.uri === V.uri && (U.id = V.id);
|
|
@@ -2941,7 +2941,7 @@ function lu() {
|
|
|
2941
2941
|
}), P.wantReceive && (P.rtpReceiver = new c.RTCRtpReceiver(
|
|
2942
2942
|
P.dtlsTransport,
|
|
2943
2943
|
A
|
|
2944
|
-
)), P.localCapabilities =
|
|
2944
|
+
)), P.localCapabilities = B, P.sendEncodingParameters = I;
|
|
2945
2945
|
}), g._config.bundlePolicy !== "max-compat" && (w += "a=group:BUNDLE " + g.transceivers.map(function(P) {
|
|
2946
2946
|
return P.mid;
|
|
2947
2947
|
}).join(" ") + `\r
|
|
@@ -3157,8 +3157,8 @@ a=mid:` + w.mid + `\r
|
|
|
3157
3157
|
}), m;
|
|
3158
3158
|
}, ms;
|
|
3159
3159
|
}
|
|
3160
|
-
var
|
|
3161
|
-
const
|
|
3160
|
+
var hu = uu();
|
|
3161
|
+
const fu = /* @__PURE__ */ Wr(hu);
|
|
3162
3162
|
function wc(r) {
|
|
3163
3163
|
const t = r && r.navigator, e = function(i) {
|
|
3164
3164
|
return {
|
|
@@ -3200,12 +3200,12 @@ function qs(r, t) {
|
|
|
3200
3200
|
return this._dtmf === void 0 && (this.track.kind === "audio" ? this._dtmf = new r.RTCDtmfSender(this) : this.track.kind === "video" && (this._dtmf = null)), this._dtmf;
|
|
3201
3201
|
}
|
|
3202
3202
|
}), r.RTCDtmfSender && !r.RTCDTMFSender && (r.RTCDTMFSender = r.RTCDtmfSender);
|
|
3203
|
-
const e =
|
|
3203
|
+
const e = fu(
|
|
3204
3204
|
r,
|
|
3205
3205
|
t.version
|
|
3206
3206
|
);
|
|
3207
3207
|
r.RTCPeerConnection = function(i) {
|
|
3208
|
-
return i && i.iceServers && (i.iceServers =
|
|
3208
|
+
return i && i.iceServers && (i.iceServers = lu(
|
|
3209
3209
|
i.iceServers,
|
|
3210
3210
|
t.version
|
|
3211
3211
|
), vo("ICE servers after filtering:", i.iceServers)), new e(i);
|
|
@@ -3249,7 +3249,7 @@ function kc(r, t) {
|
|
|
3249
3249
|
}
|
|
3250
3250
|
}
|
|
3251
3251
|
}
|
|
3252
|
-
function
|
|
3252
|
+
function du(r, t) {
|
|
3253
3253
|
r.navigator.mediaDevices && "getDisplayMedia" in r.navigator.mediaDevices || r.navigator.mediaDevices && (r.navigator.mediaDevices.getDisplayMedia = function(n) {
|
|
3254
3254
|
if (!(n && n.video)) {
|
|
3255
3255
|
const i = new DOMException("getDisplayMedia without video constraints is undefined");
|
|
@@ -3339,7 +3339,7 @@ function zc(r) {
|
|
|
3339
3339
|
function Ic(r) {
|
|
3340
3340
|
r.DataChannel && !r.RTCDataChannel && (r.RTCDataChannel = r.DataChannel);
|
|
3341
3341
|
}
|
|
3342
|
-
function
|
|
3342
|
+
function Bc(r) {
|
|
3343
3343
|
if (!(typeof r == "object" && r.RTCPeerConnection))
|
|
3344
3344
|
return;
|
|
3345
3345
|
const t = r.RTCPeerConnection.prototype.addTransceiver;
|
|
@@ -3369,7 +3369,7 @@ function Nc(r) {
|
|
|
3369
3369
|
return s;
|
|
3370
3370
|
});
|
|
3371
3371
|
}
|
|
3372
|
-
function
|
|
3372
|
+
function Nc(r) {
|
|
3373
3373
|
if (!(typeof r == "object" && r.RTCRtpSender))
|
|
3374
3374
|
return;
|
|
3375
3375
|
const t = r.RTCRtpSender.prototype.getParameters;
|
|
@@ -3400,11 +3400,11 @@ function Fc(r) {
|
|
|
3400
3400
|
}
|
|
3401
3401
|
const da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3402
3402
|
__proto__: null,
|
|
3403
|
-
shimAddTransceiver:
|
|
3403
|
+
shimAddTransceiver: Bc,
|
|
3404
3404
|
shimCreateAnswer: Fc,
|
|
3405
3405
|
shimCreateOffer: Uc,
|
|
3406
|
-
shimGetDisplayMedia:
|
|
3407
|
-
shimGetParameters:
|
|
3406
|
+
shimGetDisplayMedia: du,
|
|
3407
|
+
shimGetParameters: Nc,
|
|
3408
3408
|
shimGetUserMedia: kc,
|
|
3409
3409
|
shimOnTrack: Rc,
|
|
3410
3410
|
shimPeerConnection: Xs,
|
|
@@ -3578,8 +3578,8 @@ const pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3578
3578
|
shimRemoteStreamsAPI: Lc,
|
|
3579
3579
|
shimTrackEventTransceiver: Wc
|
|
3580
3580
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3581
|
-
var
|
|
3582
|
-
const Ar = /* @__PURE__ */ Wr(
|
|
3581
|
+
var pu = Mc();
|
|
3582
|
+
const Ar = /* @__PURE__ */ Wr(pu);
|
|
3583
3583
|
function Or(r) {
|
|
3584
3584
|
if (!r.RTCIceCandidate || r.RTCIceCandidate && "foundation" in r.RTCIceCandidate.prototype)
|
|
3585
3585
|
return;
|
|
@@ -3754,7 +3754,7 @@ function zr(r, t) {
|
|
|
3754
3754
|
return arguments[0] ? (t.browser === "chrome" && t.version < 78 || t.browser === "firefox" && t.version < 68 || t.browser === "safari") && arguments[0] && arguments[0].candidate === "" ? Promise.resolve() : e.apply(this, arguments) : (arguments[1] && arguments[1].apply(null), Promise.resolve());
|
|
3755
3755
|
});
|
|
3756
3756
|
}
|
|
3757
|
-
const
|
|
3757
|
+
const mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3758
3758
|
__proto__: null,
|
|
3759
3759
|
removeExtmapAllowMixed: Zs,
|
|
3760
3760
|
shimAddIceCandidateNullOrEmpty: zr,
|
|
@@ -3763,18 +3763,18 @@ const pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3763
3763
|
shimRTCIceCandidate: Or,
|
|
3764
3764
|
shimSendThrowTypeError: li
|
|
3765
3765
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3766
|
-
function
|
|
3766
|
+
function yu({ window: r } = {}, t = {
|
|
3767
3767
|
shimChrome: !0,
|
|
3768
3768
|
shimFirefox: !0,
|
|
3769
3769
|
shimEdge: !0,
|
|
3770
3770
|
shimSafari: !0
|
|
3771
3771
|
}) {
|
|
3772
|
-
const e = vo, n =
|
|
3772
|
+
const e = vo, n = au(r), i = {
|
|
3773
3773
|
browserDetails: n,
|
|
3774
|
-
commonShim:
|
|
3774
|
+
commonShim: mu,
|
|
3775
3775
|
extractVersion: ai,
|
|
3776
|
-
disableLog:
|
|
3777
|
-
disableWarnings:
|
|
3776
|
+
disableLog: su,
|
|
3777
|
+
disableWarnings: ou
|
|
3778
3778
|
};
|
|
3779
3779
|
switch (n.browser) {
|
|
3780
3780
|
case "chrome":
|
|
@@ -3787,7 +3787,7 @@ function mu({ window: r } = {}, t = {
|
|
|
3787
3787
|
case "firefox":
|
|
3788
3788
|
if (!da || !Xs || !t.shimFirefox)
|
|
3789
3789
|
return e("Firefox shim is not included in this adapter release."), i;
|
|
3790
|
-
e("adapter.js shimming firefox."), i.browserShim = da, zr(r, n), kc(r, n), Xs(r, n), Rc(r), zc(r), Ac(r), Oc(r), Ic(r),
|
|
3790
|
+
e("adapter.js shimming firefox."), i.browserShim = da, zr(r, n), kc(r, n), Xs(r, n), Rc(r), zc(r), Ac(r), Oc(r), Ic(r), Bc(r), Nc(r), Uc(r), Fc(r), Or(r), Ys(r), ci(r, n), li(r);
|
|
3791
3791
|
break;
|
|
3792
3792
|
case "edge":
|
|
3793
3793
|
if (!fa || !qs || !t.shimEdge)
|
|
@@ -3805,7 +3805,7 @@ function mu({ window: r } = {}, t = {
|
|
|
3805
3805
|
}
|
|
3806
3806
|
return i;
|
|
3807
3807
|
}
|
|
3808
|
-
const ma =
|
|
3808
|
+
const ma = yu({ window: typeof window > "u" ? void 0 : window });
|
|
3809
3809
|
function Fe(r, t, e, n) {
|
|
3810
3810
|
Object.defineProperty(r, t, { get: e, set: n, enumerable: !0, configurable: !0 });
|
|
3811
3811
|
}
|
|
@@ -3871,7 +3871,7 @@ var ys = (
|
|
|
3871
3871
|
}
|
|
3872
3872
|
],
|
|
3873
3873
|
sdpSemantics: "unified-plan"
|
|
3874
|
-
},
|
|
3874
|
+
}, gu = (
|
|
3875
3875
|
/** @class */
|
|
3876
3876
|
(function() {
|
|
3877
3877
|
function r() {
|
|
@@ -3939,18 +3939,18 @@ var ys = (
|
|
|
3939
3939
|
return location.protocol === "https:";
|
|
3940
3940
|
}, r;
|
|
3941
3941
|
})()
|
|
3942
|
-
), et = new
|
|
3942
|
+
), et = new gu(), qc = {};
|
|
3943
3943
|
Fe(qc, "Peer", () => to, (r) => to = r);
|
|
3944
|
-
var Xi = {},
|
|
3944
|
+
var Xi = {}, vu = Object.prototype.hasOwnProperty, Ht = "~";
|
|
3945
3945
|
function yi() {
|
|
3946
3946
|
}
|
|
3947
3947
|
Object.create && (yi.prototype = /* @__PURE__ */ Object.create(null), new yi().__proto__ || (Ht = !1));
|
|
3948
|
-
function
|
|
3948
|
+
function Su(r, t, e) {
|
|
3949
3949
|
this.fn = r, this.context = t, this.once = e || !1;
|
|
3950
3950
|
}
|
|
3951
3951
|
function Xc(r, t, e, n, i) {
|
|
3952
3952
|
if (typeof e != "function") throw new TypeError("The listener must be a function");
|
|
3953
|
-
var s = new
|
|
3953
|
+
var s = new Su(e, n || r, i), a = Ht ? Ht + t : t;
|
|
3954
3954
|
return r._events[a] ? r._events[a].fn ? r._events[a] = [
|
|
3955
3955
|
r._events[a],
|
|
3956
3956
|
s
|
|
@@ -3965,7 +3965,7 @@ function Lt() {
|
|
|
3965
3965
|
Lt.prototype.eventNames = function() {
|
|
3966
3966
|
var t = [], e, n;
|
|
3967
3967
|
if (this._eventsCount === 0) return t;
|
|
3968
|
-
for (n in e = this._events)
|
|
3968
|
+
for (n in e = this._events) vu.call(e, n) && t.push(Ht ? n.slice(1) : n);
|
|
3969
3969
|
return Object.getOwnPropertySymbols ? t.concat(Object.getOwnPropertySymbols(e)) : t;
|
|
3970
3970
|
};
|
|
3971
3971
|
Lt.prototype.listeners = function(t) {
|
|
@@ -4079,11 +4079,11 @@ var hn = function(r, t) {
|
|
|
4079
4079
|
if (e || arguments.length === 2)
|
|
4080
4080
|
for (var n = 0, i = t.length, s; n < i; n++) (s || !(n in t)) && (s || (s = Array.prototype.slice.call(t, 0, n)), s[n] = t[n]);
|
|
4081
4081
|
return r.concat(s || Array.prototype.slice.call(t));
|
|
4082
|
-
},
|
|
4082
|
+
}, xu = "PeerJS: ", Qt;
|
|
4083
4083
|
(function(r) {
|
|
4084
4084
|
r[r.Disabled = 0] = "Disabled", r[r.Errors = 1] = "Errors", r[r.Warnings = 2] = "Warnings", r[r.All = 3] = "All";
|
|
4085
4085
|
})(Qt || (Qt = {}));
|
|
4086
|
-
var
|
|
4086
|
+
var _u = (
|
|
4087
4087
|
/** @class */
|
|
4088
4088
|
(function() {
|
|
4089
4089
|
function r() {
|
|
@@ -4118,7 +4118,7 @@ var xu = (
|
|
|
4118
4118
|
}, r.prototype._print = function(t) {
|
|
4119
4119
|
for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
4120
4120
|
var i = fn([
|
|
4121
|
-
|
|
4121
|
+
xu
|
|
4122
4122
|
], hn(e), !1);
|
|
4123
4123
|
for (var s in i) i[s] instanceof Error && (i[s] = "(" + i[s].name + ") " + i[s].message);
|
|
4124
4124
|
t >= Qt.All ? console.log.apply(console, fn([], hn(i), !1)) : t >= Qt.Warnings ? console.warn.apply(console, fn([
|
|
@@ -4128,7 +4128,7 @@ var xu = (
|
|
|
4128
4128
|
], hn(i), !1));
|
|
4129
4129
|
}, r;
|
|
4130
4130
|
})()
|
|
4131
|
-
), ga = new
|
|
4131
|
+
), ga = new _u(), Yc = {};
|
|
4132
4132
|
Fe(Yc, "Socket", () => va, (r) => va = r);
|
|
4133
4133
|
var Ee;
|
|
4134
4134
|
(function(r) {
|
|
@@ -4152,7 +4152,7 @@ var Ut;
|
|
|
4152
4152
|
})(Ut || (Ut = {}));
|
|
4153
4153
|
var So = {};
|
|
4154
4154
|
So = JSON.parse('{"name":"peerjs","version":"1.4.7","keywords":["peerjs","webrtc","p2p","rtc"],"description":"PeerJS client","homepage":"https://peerjs.com","bugs":{"url":"https://github.com/peers/peerjs/issues"},"repository":{"type":"git","url":"https://github.com/peers/peerjs"},"license":"MIT","contributors":["Michelle Bu <michelle@michellebu.com>","afrokick <devbyru@gmail.com>","ericz <really.ez@gmail.com>","Jairo <kidandcat@gmail.com>","Jonas Gloning <34194370+jonasgloning@users.noreply.github.com>","Jairo Caro-Accino Viciana <jairo@galax.be>","Carlos Caballero <carlos.caballero.gonzalez@gmail.com>","hc <hheennrryy@gmail.com>","Muhammad Asif <capripio@gmail.com>","PrashoonB <prashoonbhattacharjee@gmail.com>","Harsh Bardhan Mishra <47351025+HarshCasper@users.noreply.github.com>","akotynski <aleksanderkotbury@gmail.com>","lmb <i@lmb.io>","Jairooo <jairocaro@msn.com>","Moritz Stückler <moritz.stueckler@gmail.com>","Simon <crydotsnakegithub@gmail.com>","Denis Lukov <denismassters@gmail.com>","Philipp Hancke <fippo@andyet.net>","Hans Oksendahl <hansoksendahl@gmail.com>","Jess <jessachandler@gmail.com>","khankuan <khankuan@gmail.com>","DUODVK <kurmanov.work@gmail.com>","XiZhao <kwang1imsa@gmail.com>","Matthias Lohr <matthias@lohr.me>","=frank tree <=frnktrb@googlemail.com>","Andre Eckardt <aeckardt@outlook.com>","Chris Cowan <agentme49@gmail.com>","Alex Chuev <alex@chuev.com>","alxnull <alxnull@e.mail.de>","Yemel Jardi <angel.jardi@gmail.com>","Ben Parnell <benjaminparnell.94@gmail.com>","Benny Lichtner <bennlich@gmail.com>","fresheneesz <bitetrudpublic@gmail.com>","bob.barstead@exaptive.com <bob.barstead@exaptive.com>","chandika <chandika@gmail.com>","emersion <contact@emersion.fr>","Christopher Van <cvan@users.noreply.github.com>","eddieherm <edhermoso@gmail.com>","Eduardo Pinho <enet4mikeenet@gmail.com>","Evandro Zanatta <ezanatta@tray.net.br>","Gardner Bickford <gardner@users.noreply.github.com>","Gian Luca <gianluca.cecchi@cynny.com>","PatrickJS <github@gdi2290.com>","jonnyf <github@jonathanfoss.co.uk>","Hizkia Felix <hizkifw@gmail.com>","Hristo Oskov <hristo.oskov@gmail.com>","Isaac Madwed <i.madwed@gmail.com>","Ilya Konanykhin <ilya.konanykhin@gmail.com>","jasonbarry <jasbarry@me.com>","Jonathan Burke <jonathan.burke.1311@googlemail.com>","Josh Hamit <josh.hamit@gmail.com>","Jordan Austin <jrax86@gmail.com>","Joel Wetzell <jwetzell@yahoo.com>","xizhao <kevin.wang@cloudera.com>","Alberto Torres <kungfoobar@gmail.com>","Jonathan Mayol <mayoljonathan@gmail.com>","Jefferson Felix <me@jsfelix.dev>","Rolf Erik Lekang <me@rolflekang.com>","Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>","Pepijn de Vos <pepijndevos@gmail.com>","JooYoung <qkdlql@naver.com>","Tobias Speicher <rootcommander@gmail.com>","Steve Blaurock <sblaurock@gmail.com>","Kyrylo Shegeda <shegeda@ualberta.ca>","Diwank Singh Tomer <singh@diwank.name>","Sören Balko <Soeren.Balko@gmail.com>","Arpit Solanki <solankiarpit1997@gmail.com>","Yuki Ito <yuki@gnnk.net>","Artur Zayats <zag2art@gmail.com>"],"funding":{"type":"opencollective","url":"https://opencollective.com/peer"},"collective":{"type":"opencollective","url":"https://opencollective.com/peer"},"files":["dist/*"],"sideEffects":["lib/global.ts","lib/supports.ts"],"main":"dist/bundler.cjs","module":"dist/bundler.mjs","browser-minified":"dist/peerjs.min.js","browser-unminified":"dist/peerjs.js","types":"dist/types.d.ts","engines":{"node":">= 10"},"targets":{"types":{"source":"lib/exports.ts"},"main":{"source":"lib/exports.ts","sourceMap":{"inlineSources":true}},"module":{"source":"lib/exports.ts","includeNodeModules":["eventemitter3"],"sourceMap":{"inlineSources":true}},"browser-minified":{"context":"browser","outputFormat":"global","optimize":true,"engines":{"browsers":"cover 99%, not dead"},"source":"lib/global.ts"},"browser-unminified":{"context":"browser","outputFormat":"global","optimize":false,"engines":{"browsers":"cover 99%, not dead"},"source":"lib/global.ts"}},"scripts":{"contributors":"git-authors-cli --print=false && prettier --write package.json && git add package.json package-lock.json && git commit -m \\"chore(contributors): update and sort contributors list\\"","check":"tsc --noEmit","watch":"parcel watch","build":"rm -rf dist && parcel build","prepublishOnly":"npm run build","test":"mocha -r ts-node/register -r jsdom-global/register test/**/*.ts","format":"prettier --write .","semantic-release":"semantic-release"},"devDependencies":{"@parcel/config-default":"^2.5.0","@parcel/packager-ts":"^2.5.0","@parcel/transformer-typescript-tsc":"^2.5.0","@parcel/transformer-typescript-types":"^2.5.0","@semantic-release/changelog":"^6.0.1","@semantic-release/git":"^10.0.1","@types/chai":"^4.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.18","chai":"^4.3.6","git-authors-cli":"^1.0.40","jsdom":"^19.0.0","jsdom-global":"^3.0.2","mocha":"^9.2.0","mock-socket":"8.0.5","parcel":"^2.5.0","parcel-transformer-tsc-sourcemaps":"^1.0.2","prettier":"^2.6.2","semantic-release":"^19.0.2","standard":"^16.0.4","ts-node":"^10.5.0","typescript":"^4.5.5"},"dependencies":{"@swc/helpers":"^0.3.13","eventemitter3":"^4.0.7","peerjs-js-binarypack":"1.0.1","webrtc-adapter":"^7.7.1"}}');
|
|
4155
|
-
var
|
|
4155
|
+
var bu = /* @__PURE__ */ (function() {
|
|
4156
4156
|
var r = function(t, e) {
|
|
4157
4157
|
return r = Object.setPrototypeOf || {
|
|
4158
4158
|
__proto__: []
|
|
@@ -4170,7 +4170,7 @@ var _u = /* @__PURE__ */ (function() {
|
|
|
4170
4170
|
}
|
|
4171
4171
|
t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
|
|
4172
4172
|
};
|
|
4173
|
-
})(),
|
|
4173
|
+
})(), Tu = function(r, t) {
|
|
4174
4174
|
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
|
4175
4175
|
if (!e) return r;
|
|
4176
4176
|
var n = e.call(r), i, s = [], a;
|
|
@@ -4188,11 +4188,11 @@ var _u = /* @__PURE__ */ (function() {
|
|
|
4188
4188
|
}
|
|
4189
4189
|
}
|
|
4190
4190
|
return s;
|
|
4191
|
-
},
|
|
4191
|
+
}, Cu = function(r, t, e) {
|
|
4192
4192
|
if (e || arguments.length === 2)
|
|
4193
4193
|
for (var n = 0, i = t.length, s; n < i; n++) (s || !(n in t)) && (s || (s = Array.prototype.slice.call(t, 0, n)), s[n] = t[n]);
|
|
4194
4194
|
return r.concat(s || Array.prototype.slice.call(t));
|
|
4195
|
-
},
|
|
4195
|
+
}, Mu = function(r) {
|
|
4196
4196
|
var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], n = 0;
|
|
4197
4197
|
if (e) return e.call(r);
|
|
4198
4198
|
if (r && typeof r.length == "number") return {
|
|
@@ -4207,7 +4207,7 @@ var _u = /* @__PURE__ */ (function() {
|
|
|
4207
4207
|
}, va = (
|
|
4208
4208
|
/** @class */
|
|
4209
4209
|
(function(r) {
|
|
4210
|
-
|
|
4210
|
+
bu(t, r);
|
|
4211
4211
|
function t(e, n, i, s, a, o) {
|
|
4212
4212
|
o === void 0 && (o = 5e3);
|
|
4213
4213
|
var c = r.call(this) || this;
|
|
@@ -4250,10 +4250,10 @@ var _u = /* @__PURE__ */ (function() {
|
|
|
4250
4250
|
}, t.prototype._wsOpen = function() {
|
|
4251
4251
|
return !!this._socket && this._socket.readyState === 1;
|
|
4252
4252
|
}, t.prototype._sendQueuedMessages = function() {
|
|
4253
|
-
var e, n, i =
|
|
4253
|
+
var e, n, i = Cu([], Tu(this._messagesQueue), !1);
|
|
4254
4254
|
this._messagesQueue = [];
|
|
4255
4255
|
try {
|
|
4256
|
-
for (var s =
|
|
4256
|
+
for (var s = Mu(i), a = s.next(); !a.done; a = s.next()) {
|
|
4257
4257
|
var o = a.value;
|
|
4258
4258
|
this.send(o);
|
|
4259
4259
|
}
|
|
@@ -4718,7 +4718,7 @@ var Ur = function() {
|
|
|
4718
4718
|
})()
|
|
4719
4719
|
), _o = {};
|
|
4720
4720
|
Fe(_o, "BaseConnection", () => xa, (r) => xa = r);
|
|
4721
|
-
var
|
|
4721
|
+
var wu = /* @__PURE__ */ (function() {
|
|
4722
4722
|
var r = function(t, e) {
|
|
4723
4723
|
return r = Object.setPrototypeOf || {
|
|
4724
4724
|
__proto__: []
|
|
@@ -4739,7 +4739,7 @@ var Mu = /* @__PURE__ */ (function() {
|
|
|
4739
4739
|
})(), xa = (
|
|
4740
4740
|
/** @class */
|
|
4741
4741
|
(function(r) {
|
|
4742
|
-
|
|
4742
|
+
wu(t, r);
|
|
4743
4743
|
function t(e, n, i) {
|
|
4744
4744
|
var s = r.call(this) || this;
|
|
4745
4745
|
return s.peer = e, s.provider = n, s.options = i, s._open = !1, s.metadata = i.metadata, s;
|
|
@@ -4752,7 +4752,7 @@ var Mu = /* @__PURE__ */ (function() {
|
|
|
4752
4752
|
configurable: !0
|
|
4753
4753
|
}), t;
|
|
4754
4754
|
})(Xi.EventEmitter)
|
|
4755
|
-
),
|
|
4755
|
+
), Pu = /* @__PURE__ */ (function() {
|
|
4756
4756
|
var r = function(t, e) {
|
|
4757
4757
|
return r = Object.setPrototypeOf || {
|
|
4758
4758
|
__proto__: []
|
|
@@ -4778,7 +4778,7 @@ var Mu = /* @__PURE__ */ (function() {
|
|
|
4778
4778
|
}
|
|
4779
4779
|
return r;
|
|
4780
4780
|
}, Fr.apply(this, arguments);
|
|
4781
|
-
},
|
|
4781
|
+
}, Eu = function(r) {
|
|
4782
4782
|
var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], n = 0;
|
|
4783
4783
|
if (e) return e.call(r);
|
|
4784
4784
|
if (r && typeof r.length == "number") return {
|
|
@@ -4793,7 +4793,7 @@ var Mu = /* @__PURE__ */ (function() {
|
|
|
4793
4793
|
}, _a = (
|
|
4794
4794
|
/** @class */
|
|
4795
4795
|
(function(r) {
|
|
4796
|
-
|
|
4796
|
+
Pu(t, r);
|
|
4797
4797
|
function t(e, n, i) {
|
|
4798
4798
|
var s = r.call(this, e, n, i) || this;
|
|
4799
4799
|
return s._localStream = s.options._stream, s.connectionId = s.options.connectionId || t.ID_PREFIX + et.randomToken(), s._negotiator = new xo.Negotiator(s), s._localStream && s._negotiator.startConnection({
|
|
@@ -4845,7 +4845,7 @@ var Mu = /* @__PURE__ */ (function() {
|
|
|
4845
4845
|
}));
|
|
4846
4846
|
var a = this.provider._getMessages(this.connectionId);
|
|
4847
4847
|
try {
|
|
4848
|
-
for (var o =
|
|
4848
|
+
for (var o = Eu(a), c = o.next(); !c.done; c = o.next()) {
|
|
4849
4849
|
var l = c.value;
|
|
4850
4850
|
this.handleMessage(l);
|
|
4851
4851
|
}
|
|
@@ -4869,7 +4869,7 @@ var Mu = /* @__PURE__ */ (function() {
|
|
|
4869
4869
|
Fe(Qs, "DataConnection", () => Ta, (r) => Ta = r);
|
|
4870
4870
|
var Zc = {};
|
|
4871
4871
|
Fe(Zc, "EncodingQueue", () => ba, (r) => ba = r);
|
|
4872
|
-
var
|
|
4872
|
+
var ku = /* @__PURE__ */ (function() {
|
|
4873
4873
|
var r = function(t, e) {
|
|
4874
4874
|
return r = Object.setPrototypeOf || {
|
|
4875
4875
|
__proto__: []
|
|
@@ -4890,7 +4890,7 @@ var Eu = /* @__PURE__ */ (function() {
|
|
|
4890
4890
|
})(), ba = (
|
|
4891
4891
|
/** @class */
|
|
4892
4892
|
(function(r) {
|
|
4893
|
-
|
|
4893
|
+
ku(t, r);
|
|
4894
4894
|
function t() {
|
|
4895
4895
|
var e = r.call(this) || this;
|
|
4896
4896
|
return e.fileReader = new FileReader(), e._queue = [], e._processing = !1, e.fileReader.onload = function(n) {
|
|
@@ -4925,7 +4925,7 @@ var Eu = /* @__PURE__ */ (function() {
|
|
|
4925
4925
|
this.size !== 0 && (this.processing || (this._processing = !0, this.fileReader.readAsArrayBuffer(this.queue.shift())));
|
|
4926
4926
|
}, t;
|
|
4927
4927
|
})(Xi.EventEmitter)
|
|
4928
|
-
),
|
|
4928
|
+
), Ru = /* @__PURE__ */ (function() {
|
|
4929
4929
|
var r = function(t, e) {
|
|
4930
4930
|
return r = Object.setPrototypeOf || {
|
|
4931
4931
|
__proto__: []
|
|
@@ -4943,7 +4943,7 @@ var Eu = /* @__PURE__ */ (function() {
|
|
|
4943
4943
|
}
|
|
4944
4944
|
t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
|
|
4945
4945
|
};
|
|
4946
|
-
})(),
|
|
4946
|
+
})(), Au = function(r) {
|
|
4947
4947
|
var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], n = 0;
|
|
4948
4948
|
if (e) return e.call(r);
|
|
4949
4949
|
if (r && typeof r.length == "number") return {
|
|
@@ -4958,7 +4958,7 @@ var Eu = /* @__PURE__ */ (function() {
|
|
|
4958
4958
|
}, Ta = (
|
|
4959
4959
|
/** @class */
|
|
4960
4960
|
(function(r) {
|
|
4961
|
-
|
|
4961
|
+
Ru(t, r);
|
|
4962
4962
|
function t(e, n, i) {
|
|
4963
4963
|
var s = r.call(this, e, n, i) || this;
|
|
4964
4964
|
return s.stringify = JSON.stringify, s.parse = JSON.parse, s._buffer = [], s._bufferSize = 0, s._buffering = !1, s._chunkedData = {}, s._encodingQueue = new Zc.EncodingQueue(), s.connectionId = s.options.connectionId || t.ID_PREFIX + et.randomToken(), s.label = s.options.label || s.connectionId, s.serialization = s.options.serialization || $e.Binary, s.reliable = !!s.options.reliable, s._encodingQueue.on("done", function(a) {
|
|
@@ -5071,7 +5071,7 @@ var Eu = /* @__PURE__ */ (function() {
|
|
|
5071
5071
|
var n, i, s = et.chunk(e);
|
|
5072
5072
|
j.default.log("DC#".concat(this.connectionId, " Try to send ").concat(s.length, " chunks..."));
|
|
5073
5073
|
try {
|
|
5074
|
-
for (var a =
|
|
5074
|
+
for (var a = Au(s), o = a.next(); !o.done; o = a.next()) {
|
|
5075
5075
|
var c = o.value;
|
|
5076
5076
|
this.send(c, !0);
|
|
5077
5077
|
}
|
|
@@ -5290,7 +5290,7 @@ var Ca = function(r, t, e, n) {
|
|
|
5290
5290
|
});
|
|
5291
5291
|
}, r;
|
|
5292
5292
|
})()
|
|
5293
|
-
),
|
|
5293
|
+
), Ou = /* @__PURE__ */ (function() {
|
|
5294
5294
|
var r = function(t, e) {
|
|
5295
5295
|
return r = Object.setPrototypeOf || {
|
|
5296
5296
|
__proto__: []
|
|
@@ -5328,7 +5328,7 @@ var Ca = function(r, t, e, n) {
|
|
|
5328
5328
|
}
|
|
5329
5329
|
};
|
|
5330
5330
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
5331
|
-
},
|
|
5331
|
+
}, zu = function(r, t) {
|
|
5332
5332
|
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
|
5333
5333
|
if (!e) return r;
|
|
5334
5334
|
var n = e.call(r), i, s = [], a;
|
|
@@ -5349,7 +5349,7 @@ var Ca = function(r, t, e, n) {
|
|
|
5349
5349
|
}, to = (
|
|
5350
5350
|
/** @class */
|
|
5351
5351
|
(function(r) {
|
|
5352
|
-
|
|
5352
|
+
Ou(t, r);
|
|
5353
5353
|
function t(e, n) {
|
|
5354
5354
|
var i = r.call(this) || this;
|
|
5355
5355
|
i._id = null, i._lastServerId = null, i._destroyed = !1, i._disconnected = !1, i._open = !1, i._connections = /* @__PURE__ */ new Map(), i._lostMessages = /* @__PURE__ */ new Map();
|
|
@@ -5406,7 +5406,7 @@ var Ca = function(r, t, e, n) {
|
|
|
5406
5406
|
var e, n, i = /* @__PURE__ */ Object.create(null);
|
|
5407
5407
|
try {
|
|
5408
5408
|
for (var s = Zn(this._connections), a = s.next(); !a.done; a = s.next()) {
|
|
5409
|
-
var o =
|
|
5409
|
+
var o = zu(a.value, 2), c = o[0], l = o[1];
|
|
5410
5410
|
i[c] = l;
|
|
5411
5411
|
}
|
|
5412
5412
|
} catch (u) {
|
|
@@ -5655,43 +5655,43 @@ var Ca = function(r, t, e, n) {
|
|
|
5655
5655
|
});
|
|
5656
5656
|
}, t.DEFAULT_KEY = "peerjs", t;
|
|
5657
5657
|
})(Xi.EventEmitter)
|
|
5658
|
-
),
|
|
5659
|
-
const
|
|
5658
|
+
), Iu = qc.Peer;
|
|
5659
|
+
const Rd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5660
5660
|
__proto__: null,
|
|
5661
5661
|
get Peer() {
|
|
5662
5662
|
return to;
|
|
5663
5663
|
},
|
|
5664
|
-
default:
|
|
5664
|
+
default: Iu,
|
|
5665
5665
|
util: et
|
|
5666
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5666
|
+
}, Symbol.toStringTag, { value: "Module" })), Bu = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
5667
5667
|
function Nu(r) {
|
|
5668
|
-
return typeof r == "string" &&
|
|
5668
|
+
return typeof r == "string" && Bu.test(r);
|
|
5669
5669
|
}
|
|
5670
|
-
const
|
|
5670
|
+
const Nt = [];
|
|
5671
5671
|
for (let r = 0; r < 256; ++r)
|
|
5672
|
-
|
|
5673
|
-
function
|
|
5674
|
-
return
|
|
5672
|
+
Nt.push((r + 256).toString(16).slice(1));
|
|
5673
|
+
function Uu(r, t = 0) {
|
|
5674
|
+
return Nt[r[t + 0]] + Nt[r[t + 1]] + Nt[r[t + 2]] + Nt[r[t + 3]] + "-" + Nt[r[t + 4]] + Nt[r[t + 5]] + "-" + Nt[r[t + 6]] + Nt[r[t + 7]] + "-" + Nt[r[t + 8]] + Nt[r[t + 9]] + "-" + Nt[r[t + 10]] + Nt[r[t + 11]] + Nt[r[t + 12]] + Nt[r[t + 13]] + Nt[r[t + 14]] + Nt[r[t + 15]];
|
|
5675
5675
|
}
|
|
5676
|
-
function
|
|
5676
|
+
function Fu(r) {
|
|
5677
5677
|
if (!Nu(r))
|
|
5678
5678
|
throw TypeError("Invalid UUID");
|
|
5679
5679
|
let t;
|
|
5680
5680
|
const e = new Uint8Array(16);
|
|
5681
5681
|
return e[0] = (t = parseInt(r.slice(0, 8), 16)) >>> 24, e[1] = t >>> 16 & 255, e[2] = t >>> 8 & 255, e[3] = t & 255, e[4] = (t = parseInt(r.slice(9, 13), 16)) >>> 8, e[5] = t & 255, e[6] = (t = parseInt(r.slice(14, 18), 16)) >>> 8, e[7] = t & 255, e[8] = (t = parseInt(r.slice(19, 23), 16)) >>> 8, e[9] = t & 255, e[10] = (t = parseInt(r.slice(24, 36), 16)) / 1099511627776 & 255, e[11] = t / 4294967296 & 255, e[12] = t >>> 24 & 255, e[13] = t >>> 16 & 255, e[14] = t >>> 8 & 255, e[15] = t & 255, e;
|
|
5682
5682
|
}
|
|
5683
|
-
function
|
|
5683
|
+
function Du(r) {
|
|
5684
5684
|
r = unescape(encodeURIComponent(r));
|
|
5685
5685
|
const t = [];
|
|
5686
5686
|
for (let e = 0; e < r.length; ++e)
|
|
5687
5687
|
t.push(r.charCodeAt(e));
|
|
5688
5688
|
return t;
|
|
5689
5689
|
}
|
|
5690
|
-
const
|
|
5691
|
-
function
|
|
5690
|
+
const Lu = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", Vu = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
5691
|
+
function Ju(r, t, e) {
|
|
5692
5692
|
function n(i, s, a, o) {
|
|
5693
5693
|
var c;
|
|
5694
|
-
if (typeof i == "string" && (i =
|
|
5694
|
+
if (typeof i == "string" && (i = Du(i)), typeof s == "string" && (s = Fu(s)), ((c = s) === null || c === void 0 ? void 0 : c.length) !== 16)
|
|
5695
5695
|
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
5696
5696
|
let l = new Uint8Array(16 + i.length);
|
|
5697
5697
|
if (l.set(s), l.set(i, s.length), l = e(l), l[6] = l[6] & 15 | t, l[8] = l[8] & 63 | 128, a) {
|
|
@@ -5700,15 +5700,15 @@ function Vu(r, t, e) {
|
|
|
5700
5700
|
a[o + u] = l[u];
|
|
5701
5701
|
return a;
|
|
5702
5702
|
}
|
|
5703
|
-
return
|
|
5703
|
+
return Uu(l);
|
|
5704
5704
|
}
|
|
5705
5705
|
try {
|
|
5706
5706
|
n.name = r;
|
|
5707
5707
|
} catch {
|
|
5708
5708
|
}
|
|
5709
|
-
return n.DNS =
|
|
5709
|
+
return n.DNS = Lu, n.URL = Vu, n;
|
|
5710
5710
|
}
|
|
5711
|
-
function
|
|
5711
|
+
function ju(r, t, e, n) {
|
|
5712
5712
|
switch (r) {
|
|
5713
5713
|
case 0:
|
|
5714
5714
|
return t & e ^ ~t & n;
|
|
@@ -5723,7 +5723,7 @@ function Ju(r, t, e, n) {
|
|
|
5723
5723
|
function gs(r, t) {
|
|
5724
5724
|
return r << t | r >>> 32 - t;
|
|
5725
5725
|
}
|
|
5726
|
-
function
|
|
5726
|
+
function Gu(r) {
|
|
5727
5727
|
const t = [1518500249, 1859775393, 2400959708, 3395469782], e = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
5728
5728
|
if (typeof r == "string") {
|
|
5729
5729
|
const a = unescape(encodeURIComponent(r));
|
|
@@ -5748,16 +5748,16 @@ function ju(r) {
|
|
|
5748
5748
|
o[m] = gs(o[m - 3] ^ o[m - 8] ^ o[m - 14] ^ o[m - 16], 1);
|
|
5749
5749
|
let c = e[0], l = e[1], u = e[2], f = e[3], p = e[4];
|
|
5750
5750
|
for (let m = 0; m < 80; ++m) {
|
|
5751
|
-
const x = Math.floor(m / 20), T = gs(c, 5) +
|
|
5751
|
+
const x = Math.floor(m / 20), T = gs(c, 5) + ju(x, l, u, f) + p + t[x] + o[m] >>> 0;
|
|
5752
5752
|
p = f, f = u, u = gs(l, 30) >>> 0, l = c, c = T;
|
|
5753
5753
|
}
|
|
5754
5754
|
e[0] = e[0] + c >>> 0, e[1] = e[1] + l >>> 0, e[2] = e[2] + u >>> 0, e[3] = e[3] + f >>> 0, e[4] = e[4] + p >>> 0;
|
|
5755
5755
|
}
|
|
5756
5756
|
return [e[0] >> 24 & 255, e[0] >> 16 & 255, e[0] >> 8 & 255, e[0] & 255, e[1] >> 24 & 255, e[1] >> 16 & 255, e[1] >> 8 & 255, e[1] & 255, e[2] >> 24 & 255, e[2] >> 16 & 255, e[2] >> 8 & 255, e[2] & 255, e[3] >> 24 & 255, e[3] >> 16 & 255, e[3] >> 8 & 255, e[3] & 255, e[4] >> 24 & 255, e[4] >> 16 & 255, e[4] >> 8 & 255, e[4] & 255];
|
|
5757
5757
|
}
|
|
5758
|
-
const
|
|
5758
|
+
const Ad = Ju("v5", 80, Gu);
|
|
5759
5759
|
var vs = { exports: {} }, Ss = { exports: {} }, Pa;
|
|
5760
|
-
function
|
|
5760
|
+
function Wu() {
|
|
5761
5761
|
return Pa || (Pa = 1, (function() {
|
|
5762
5762
|
var r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", t = {
|
|
5763
5763
|
// Bit-wise rotation left
|
|
@@ -5865,7 +5865,7 @@ function ka() {
|
|
|
5865
5865
|
* @license MIT
|
|
5866
5866
|
*/
|
|
5867
5867
|
var _s, Ra;
|
|
5868
|
-
function
|
|
5868
|
+
function $u() {
|
|
5869
5869
|
if (Ra) return _s;
|
|
5870
5870
|
Ra = 1, _s = function(e) {
|
|
5871
5871
|
return e != null && (r(e) || t(e) || !!e._isBuffer);
|
|
@@ -5879,9 +5879,9 @@ function Wu() {
|
|
|
5879
5879
|
return _s;
|
|
5880
5880
|
}
|
|
5881
5881
|
var Aa;
|
|
5882
|
-
function
|
|
5882
|
+
function Hu() {
|
|
5883
5883
|
return Aa || (Aa = 1, (function() {
|
|
5884
|
-
var r =
|
|
5884
|
+
var r = Wu(), t = ka().utf8, e = $u(), n = ka().bin, i = function(s, a) {
|
|
5885
5885
|
s.constructor == String ? a && a.encoding === "binary" ? s = n.stringToBytes(s) : s = t.stringToBytes(s) : e(s) ? s = Array.prototype.slice.call(s, 0) : !Array.isArray(s) && s.constructor !== Uint8Array && (s = s.toString());
|
|
5886
5886
|
for (var o = r.bytesToWords(s), c = s.length * 8, l = 1732584193, u = -271733879, f = -1732584194, p = 271733878, m = 0; m < o.length; m++)
|
|
5887
5887
|
o[m] = (o[m] << 8 | o[m] >>> 24) & 16711935 | (o[m] << 24 | o[m] >>> 8) & 4278255360;
|
|
@@ -5912,11 +5912,11 @@ function $u() {
|
|
|
5912
5912
|
};
|
|
5913
5913
|
})()), vs.exports;
|
|
5914
5914
|
}
|
|
5915
|
-
var
|
|
5916
|
-
const
|
|
5915
|
+
var qu = Hu();
|
|
5916
|
+
const Od = /* @__PURE__ */ Wr(qu), Dt = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
|
|
5917
5917
|
let Oa = 1234567;
|
|
5918
5918
|
const Qc = Math.PI / 180, tl = 180 / Math.PI;
|
|
5919
|
-
function
|
|
5919
|
+
function Xu() {
|
|
5920
5920
|
const r = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0;
|
|
5921
5921
|
return (Dt[r & 255] + Dt[r >> 8 & 255] + Dt[r >> 16 & 255] + Dt[r >> 24 & 255] + "-" + Dt[t & 255] + Dt[t >> 8 & 255] + "-" + Dt[t >> 16 & 15 | 64] + Dt[t >> 24 & 255] + "-" + Dt[e & 63 | 128] + Dt[e >> 8 & 255] + "-" + Dt[e >> 16 & 255] + Dt[e >> 24 & 255] + Dt[n & 255] + Dt[n >> 8 & 255] + Dt[n >> 16 & 255] + Dt[n >> 24 & 255]).toLowerCase();
|
|
5922
5922
|
}
|
|
@@ -5926,57 +5926,57 @@ function ze(r, t, e) {
|
|
|
5926
5926
|
function el(r, t) {
|
|
5927
5927
|
return (r % t + t) % t;
|
|
5928
5928
|
}
|
|
5929
|
-
function
|
|
5929
|
+
function Yu(r, t, e, n, i) {
|
|
5930
5930
|
return n + (r - t) * (i - n) / (e - t);
|
|
5931
5931
|
}
|
|
5932
|
-
function
|
|
5932
|
+
function Zu(r, t, e) {
|
|
5933
5933
|
return r !== t ? (e - r) / (t - r) : 0;
|
|
5934
5934
|
}
|
|
5935
5935
|
function nl(r, t, e) {
|
|
5936
5936
|
return (1 - e) * r + e * t;
|
|
5937
5937
|
}
|
|
5938
|
-
function
|
|
5938
|
+
function Ku(r, t, e, n) {
|
|
5939
5939
|
return nl(r, t, 1 - Math.exp(-e * n));
|
|
5940
5940
|
}
|
|
5941
|
-
function
|
|
5941
|
+
function Qu(r, t = 1) {
|
|
5942
5942
|
return t - Math.abs(el(r, t * 2) - t);
|
|
5943
5943
|
}
|
|
5944
|
-
function
|
|
5944
|
+
function th(r, t, e) {
|
|
5945
5945
|
return r <= t ? 0 : r >= e ? 1 : (r = (r - t) / (e - t), r * r * (3 - 2 * r));
|
|
5946
5946
|
}
|
|
5947
|
-
function
|
|
5947
|
+
function eh(r, t, e) {
|
|
5948
5948
|
return r <= t ? 0 : r >= e ? 1 : (r = (r - t) / (e - t), r * r * r * (r * (r * 6 - 15) + 10));
|
|
5949
5949
|
}
|
|
5950
|
-
function
|
|
5950
|
+
function nh(r, t) {
|
|
5951
5951
|
return r + Math.floor(Math.random() * (t - r + 1));
|
|
5952
5952
|
}
|
|
5953
|
-
function
|
|
5953
|
+
function ih(r, t) {
|
|
5954
5954
|
return r + Math.random() * (t - r);
|
|
5955
5955
|
}
|
|
5956
|
-
function
|
|
5956
|
+
function rh(r) {
|
|
5957
5957
|
return r * (0.5 - Math.random());
|
|
5958
5958
|
}
|
|
5959
|
-
function
|
|
5959
|
+
function sh(r) {
|
|
5960
5960
|
r !== void 0 && (Oa = r);
|
|
5961
5961
|
let t = Oa += 1831565813;
|
|
5962
5962
|
return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
5963
5963
|
}
|
|
5964
|
-
function
|
|
5964
|
+
function oh(r) {
|
|
5965
5965
|
return r * Qc;
|
|
5966
5966
|
}
|
|
5967
|
-
function
|
|
5967
|
+
function ah(r) {
|
|
5968
5968
|
return r * tl;
|
|
5969
5969
|
}
|
|
5970
|
-
function
|
|
5970
|
+
function ch(r) {
|
|
5971
5971
|
return (r & r - 1) === 0 && r !== 0;
|
|
5972
5972
|
}
|
|
5973
|
-
function
|
|
5973
|
+
function lh(r) {
|
|
5974
5974
|
return Math.pow(2, Math.ceil(Math.log(r) / Math.LN2));
|
|
5975
5975
|
}
|
|
5976
|
-
function
|
|
5976
|
+
function uh(r) {
|
|
5977
5977
|
return Math.pow(2, Math.floor(Math.log(r) / Math.LN2));
|
|
5978
5978
|
}
|
|
5979
|
-
function
|
|
5979
|
+
function hh(r, t, e, n, i) {
|
|
5980
5980
|
const s = Math.cos, a = Math.sin, o = s(e / 2), c = a(e / 2), l = s((t + n) / 2), u = a((t + n) / 2), f = s((t - n) / 2), p = a((t - n) / 2), m = s((n - t) / 2), x = a((n - t) / 2);
|
|
5981
5981
|
switch (i) {
|
|
5982
5982
|
case "XYX":
|
|
@@ -6001,7 +6001,7 @@ function uh(r, t, e, n, i) {
|
|
|
6001
6001
|
console.warn("../math.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: " + i);
|
|
6002
6002
|
}
|
|
6003
6003
|
}
|
|
6004
|
-
function
|
|
6004
|
+
function fh(r, t) {
|
|
6005
6005
|
switch (t.constructor) {
|
|
6006
6006
|
case Float32Array:
|
|
6007
6007
|
return r;
|
|
@@ -6021,7 +6021,7 @@ function hh(r, t) {
|
|
|
6021
6021
|
throw new Error("Invalid component type.");
|
|
6022
6022
|
}
|
|
6023
6023
|
}
|
|
6024
|
-
function
|
|
6024
|
+
function dh(r, t) {
|
|
6025
6025
|
switch (t.constructor) {
|
|
6026
6026
|
case Float32Array:
|
|
6027
6027
|
return r;
|
|
@@ -6044,28 +6044,28 @@ function fh(r, t) {
|
|
|
6044
6044
|
const $n = {
|
|
6045
6045
|
DEG2RAD: Qc,
|
|
6046
6046
|
RAD2DEG: tl,
|
|
6047
|
-
generateUUID:
|
|
6047
|
+
generateUUID: Xu,
|
|
6048
6048
|
clamp: ze,
|
|
6049
6049
|
euclideanModulo: el,
|
|
6050
|
-
mapLinear:
|
|
6051
|
-
inverseLerp:
|
|
6050
|
+
mapLinear: Yu,
|
|
6051
|
+
inverseLerp: Zu,
|
|
6052
6052
|
lerp: nl,
|
|
6053
|
-
damp:
|
|
6054
|
-
pingpong:
|
|
6055
|
-
smoothstep:
|
|
6056
|
-
smootherstep:
|
|
6057
|
-
randInt:
|
|
6058
|
-
randFloat:
|
|
6059
|
-
randFloatSpread:
|
|
6060
|
-
seededRandom:
|
|
6061
|
-
degToRad:
|
|
6062
|
-
radToDeg:
|
|
6063
|
-
isPowerOfTwo:
|
|
6064
|
-
ceilPowerOfTwo:
|
|
6065
|
-
floorPowerOfTwo:
|
|
6066
|
-
setQuaternionFromProperEuler:
|
|
6067
|
-
normalize:
|
|
6068
|
-
denormalize:
|
|
6053
|
+
damp: Ku,
|
|
6054
|
+
pingpong: Qu,
|
|
6055
|
+
smoothstep: th,
|
|
6056
|
+
smootherstep: eh,
|
|
6057
|
+
randInt: nh,
|
|
6058
|
+
randFloat: ih,
|
|
6059
|
+
randFloatSpread: rh,
|
|
6060
|
+
seededRandom: sh,
|
|
6061
|
+
degToRad: oh,
|
|
6062
|
+
radToDeg: ah,
|
|
6063
|
+
isPowerOfTwo: ch,
|
|
6064
|
+
ceilPowerOfTwo: lh,
|
|
6065
|
+
floorPowerOfTwo: uh,
|
|
6066
|
+
setQuaternionFromProperEuler: hh,
|
|
6067
|
+
normalize: dh,
|
|
6068
|
+
denormalize: fh
|
|
6069
6069
|
};
|
|
6070
6070
|
class it {
|
|
6071
6071
|
constructor(t = 0, e = 0, n = 0, i = 1) {
|
|
@@ -6526,9 +6526,9 @@ class W {
|
|
|
6526
6526
|
}
|
|
6527
6527
|
}
|
|
6528
6528
|
const bs = new W(), za = new it(), ar = 2e3, Ia = 2001;
|
|
6529
|
-
class
|
|
6529
|
+
class Ne {
|
|
6530
6530
|
constructor(t, e, n, i, s, a, o, c, l, u, f, p, m, x, T, g) {
|
|
6531
|
-
this.isMatrix4 = !0,
|
|
6531
|
+
this.isMatrix4 = !0, Ne.prototype.isMatrix4 = !0, this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], t !== void 0 && this.set(t, e, n, i, s, a, o, c, l, u, f, p, m, x, T, g);
|
|
6532
6532
|
}
|
|
6533
6533
|
extractPosition(t) {
|
|
6534
6534
|
return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."), this.copyPosition(t);
|
|
@@ -6547,7 +6547,7 @@ class Be {
|
|
|
6547
6547
|
return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this;
|
|
6548
6548
|
}
|
|
6549
6549
|
clone() {
|
|
6550
|
-
return new
|
|
6550
|
+
return new Ne().fromArray(this.elements);
|
|
6551
6551
|
}
|
|
6552
6552
|
copy(t) {
|
|
6553
6553
|
const e = this.elements, n = t.elements;
|
|
@@ -6595,7 +6595,7 @@ class Be {
|
|
|
6595
6595
|
return e[3] = 0, e[7] = 0, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, this;
|
|
6596
6596
|
}
|
|
6597
6597
|
makeRotationFromQuaternion(t) {
|
|
6598
|
-
return this.compose(
|
|
6598
|
+
return this.compose(ph, t, mh);
|
|
6599
6599
|
}
|
|
6600
6600
|
lookAt(t, e, n) {
|
|
6601
6601
|
const i = this.elements;
|
|
@@ -6608,8 +6608,8 @@ class Be {
|
|
|
6608
6608
|
return this.multiplyMatrices(t, this);
|
|
6609
6609
|
}
|
|
6610
6610
|
multiplyMatrices(t, e) {
|
|
6611
|
-
const n = t.elements, i = e.elements, s = this.elements, a = n[0], o = n[4], c = n[8], l = n[12], u = n[1], f = n[5], p = n[9], m = n[13], x = n[2], T = n[6], g = n[10], v = n[14], b = n[3], _ = n[7], w = n[11], M = n[15], P = i[0], E = i[4], z = i[8], A = i[12], R = i[1],
|
|
6612
|
-
return s[0] = a * P + o * R + c * D + l * G, s[4] = a * E + o *
|
|
6611
|
+
const n = t.elements, i = e.elements, s = this.elements, a = n[0], o = n[4], c = n[8], l = n[12], u = n[1], f = n[5], p = n[9], m = n[13], x = n[2], T = n[6], g = n[10], v = n[14], b = n[3], _ = n[7], w = n[11], M = n[15], P = i[0], E = i[4], z = i[8], A = i[12], R = i[1], B = i[5], I = i[9], U = i[13], D = i[2], V = i[6], $ = i[10], Z = i[14], G = i[3], ot = i[7], lt = i[11], yt = i[15];
|
|
6612
|
+
return s[0] = a * P + o * R + c * D + l * G, s[4] = a * E + o * B + c * V + l * ot, s[8] = a * z + o * I + c * $ + l * lt, s[12] = a * A + o * U + c * Z + l * yt, s[1] = u * P + f * R + p * D + m * G, s[5] = u * E + f * B + p * V + m * ot, s[9] = u * z + f * I + p * $ + m * lt, s[13] = u * A + f * U + p * Z + m * yt, s[2] = x * P + T * R + g * D + v * G, s[6] = x * E + T * B + g * V + v * ot, s[10] = x * z + T * I + g * $ + v * lt, s[14] = x * A + T * U + g * Z + v * yt, s[3] = b * P + _ * R + w * D + M * G, s[7] = b * E + _ * B + w * V + M * ot, s[11] = b * z + _ * I + w * $ + M * lt, s[15] = b * A + _ * U + w * Z + M * yt, this;
|
|
6613
6613
|
}
|
|
6614
6614
|
multiplyScalar(t) {
|
|
6615
6615
|
const e = this.elements;
|
|
@@ -6719,7 +6719,7 @@ class Be {
|
|
|
6719
6719
|
return t[e] = n[0], t[e + 1] = n[1], t[e + 2] = n[2], t[e + 3] = n[3], t[e + 4] = n[4], t[e + 5] = n[5], t[e + 6] = n[6], t[e + 7] = n[7], t[e + 8] = n[8], t[e + 9] = n[9], t[e + 10] = n[10], t[e + 11] = n[11], t[e + 12] = n[12], t[e + 13] = n[13], t[e + 14] = n[14], t[e + 15] = n[15], t;
|
|
6720
6720
|
}
|
|
6721
6721
|
}
|
|
6722
|
-
const Rn = new W(), Me = new
|
|
6722
|
+
const Rn = new W(), Me = new Ne(), ph = new W(0, 0, 0), mh = new W(1, 1, 1), Qe = new W(), cr = new W(), re = new W(), Ba = new Ne(), Na = new it();
|
|
6723
6723
|
class gi {
|
|
6724
6724
|
constructor(t = 0, e = 0, n = 0, i = gi.DEFAULT_ORDER) {
|
|
6725
6725
|
this.isEuler = !0, this._x = t, this._y = e, this._z = n, this._order = i;
|
|
@@ -6784,13 +6784,13 @@ class gi {
|
|
|
6784
6784
|
return this._order = e, n === !0 && this._onChangeCallback(), this;
|
|
6785
6785
|
}
|
|
6786
6786
|
setFromQuaternion(t, e, n) {
|
|
6787
|
-
return
|
|
6787
|
+
return Ba.makeRotationFromQuaternion(t), this.setFromRotationMatrix(Ba, e, n);
|
|
6788
6788
|
}
|
|
6789
6789
|
setFromVector3(t, e = this._order) {
|
|
6790
6790
|
return this.set(t.x, t.y, t.z, e);
|
|
6791
6791
|
}
|
|
6792
6792
|
reorder(t) {
|
|
6793
|
-
return
|
|
6793
|
+
return Na.setFromEuler(this), this.setFromQuaternion(Na, t);
|
|
6794
6794
|
}
|
|
6795
6795
|
equals(t) {
|
|
6796
6796
|
return t._x === this._x && t._y === this._y && t._z === this._z && t._order === this._order;
|
|
@@ -7200,9 +7200,9 @@ class ae {
|
|
|
7200
7200
|
yield this.x, yield this.y, yield this.z, yield this.w;
|
|
7201
7201
|
}
|
|
7202
7202
|
}
|
|
7203
|
-
class
|
|
7203
|
+
class Be {
|
|
7204
7204
|
constructor(t, e, n, i, s, a, o, c, l) {
|
|
7205
|
-
|
|
7205
|
+
Be.prototype.isMatrix3 = !0, this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1], t !== void 0 && this.set(t, e, n, i, s, a, o, c, l);
|
|
7206
7206
|
}
|
|
7207
7207
|
set(t, e, n, i, s, a, o, c, l) {
|
|
7208
7208
|
const u = this.elements;
|
|
@@ -7299,10 +7299,10 @@ class Ne {
|
|
|
7299
7299
|
return t[e] = n[0], t[e + 1] = n[1], t[e + 2] = n[2], t[e + 3] = n[3], t[e + 4] = n[4], t[e + 5] = n[5], t[e + 6] = n[6], t[e + 7] = n[7], t[e + 8] = n[8], t;
|
|
7300
7300
|
}
|
|
7301
7301
|
clone() {
|
|
7302
|
-
return new
|
|
7302
|
+
return new Be().fromArray(this.elements);
|
|
7303
7303
|
}
|
|
7304
7304
|
}
|
|
7305
|
-
const Ts = new
|
|
7305
|
+
const Ts = new Be();
|
|
7306
7306
|
var $t;
|
|
7307
7307
|
(function(r) {
|
|
7308
7308
|
r[r.Random = 0] = "Random", r[r.Loop = 1] = "Loop", r[r.PingPong = 2] = "PingPong", r[r.Burst = 3] = "Burst";
|
|
@@ -7379,7 +7379,7 @@ class _n {
|
|
|
7379
7379
|
return new _n(t.p0, t.p1, t.p2, t.p3);
|
|
7380
7380
|
}
|
|
7381
7381
|
}
|
|
7382
|
-
const vi = (r) => ({ r: r.x, g: r.y, b: r.z, a: r.w }), Si = (r) => new ae(r.r, r.g, r.b, r.a),
|
|
7382
|
+
const vi = (r) => ({ r: r.x, g: r.y, b: r.z, a: r.w }), Si = (r) => new ae(r.r, r.g, r.b, r.a), yh = (r, t) => {
|
|
7383
7383
|
switch (t) {
|
|
7384
7384
|
case "Vector3":
|
|
7385
7385
|
return new W(r.x, r.y, r.z);
|
|
@@ -7392,7 +7392,7 @@ const vi = (r) => ({ r: r.x, g: r.y, b: r.z, a: r.w }), Si = (r) => new ae(r.r,
|
|
|
7392
7392
|
default:
|
|
7393
7393
|
return r;
|
|
7394
7394
|
}
|
|
7395
|
-
},
|
|
7395
|
+
}, gh = (r, t) => {
|
|
7396
7396
|
switch (t) {
|
|
7397
7397
|
case "Vector3":
|
|
7398
7398
|
return { x: r.x, y: r.y, z: r.z };
|
|
@@ -7486,11 +7486,11 @@ class sn {
|
|
|
7486
7486
|
return this.keys[0][0].constructor.name, {
|
|
7487
7487
|
type: "CLinearFunction",
|
|
7488
7488
|
subType: this.subType,
|
|
7489
|
-
keys: this.keys.map(([t, e]) => ({ value:
|
|
7489
|
+
keys: this.keys.map(([t, e]) => ({ value: gh(t, this.subType), pos: e }))
|
|
7490
7490
|
};
|
|
7491
7491
|
}
|
|
7492
7492
|
static fromJSON(t) {
|
|
7493
|
-
return new sn(t.keys.map((e) => [
|
|
7493
|
+
return new sn(t.keys.map((e) => [yh(e.value, t.subType), e.pos]), t.subType);
|
|
7494
7494
|
}
|
|
7495
7495
|
clone() {
|
|
7496
7496
|
return this.subType === "Number" ? new sn(this.keys.map(([t, e]) => [t, e]), this.subType) : new sn(this.keys.map(([t, e]) => [t.clone(), e]), this.subType);
|
|
@@ -7642,7 +7642,7 @@ class Tn {
|
|
|
7642
7642
|
return new Tn(this.a, this.b);
|
|
7643
7643
|
}
|
|
7644
7644
|
}
|
|
7645
|
-
class
|
|
7645
|
+
class vh {
|
|
7646
7646
|
constructor() {
|
|
7647
7647
|
this.functions = new Array();
|
|
7648
7648
|
}
|
|
@@ -7689,7 +7689,7 @@ class gh {
|
|
|
7689
7689
|
return this.functions.length;
|
|
7690
7690
|
}
|
|
7691
7691
|
}
|
|
7692
|
-
class xi extends
|
|
7692
|
+
class xi extends vh {
|
|
7693
7693
|
constructor(t = [[new _n(0, 1 / 3, 1 / 3 * 2, 1), 0]]) {
|
|
7694
7694
|
super(), this.type = "function", this.functions = t;
|
|
7695
7695
|
}
|
|
@@ -7853,7 +7853,7 @@ class Cn {
|
|
|
7853
7853
|
return new Cn(this.x, this.y, this.z);
|
|
7854
7854
|
}
|
|
7855
7855
|
}
|
|
7856
|
-
function
|
|
7856
|
+
function Sh(r) {
|
|
7857
7857
|
switch (r.type) {
|
|
7858
7858
|
case "Vector3Function":
|
|
7859
7859
|
return Cn.fromJSON(r);
|
|
@@ -7872,7 +7872,7 @@ function Jr(r) {
|
|
|
7872
7872
|
case "Euler":
|
|
7873
7873
|
return il(r);
|
|
7874
7874
|
case "Vector3Function":
|
|
7875
|
-
return
|
|
7875
|
+
return Sh(r);
|
|
7876
7876
|
default:
|
|
7877
7877
|
return new nt(0);
|
|
7878
7878
|
}
|
|
@@ -7973,11 +7973,11 @@ class Ci {
|
|
|
7973
7973
|
function ur(r, t) {
|
|
7974
7974
|
return Math.floor(Math.random() * (t - r)) + r;
|
|
7975
7975
|
}
|
|
7976
|
-
const Hr = new W(0, 1, 0), qr = new W(0, 0, 0),
|
|
7976
|
+
const Hr = new W(0, 1, 0), qr = new W(0, 0, 0), xh = new W(1, 1, 1), Ua = new W(0, 0, 1);
|
|
7977
7977
|
class Mi {
|
|
7978
7978
|
constructor(t = {}) {
|
|
7979
7979
|
var e, n, i, s, a, o, c;
|
|
7980
|
-
this.type = "donut", this.currentValue = 0, this.radius = (e = t.radius) !== null && e !== void 0 ? e : 10, this.arc = (n = t.arc) !== null && n !== void 0 ? n : 2 * Math.PI, this.thickness = (i = t.thickness) !== null && i !== void 0 ? i : 1, this.donutRadius = (s = t.donutRadius) !== null && s !== void 0 ? s : this.radius * 0.2, this.mode = (a = t.mode) !== null && a !== void 0 ? a : $t.Random, this.spread = (o = t.spread) !== null && o !== void 0 ? o : 0, this.speed = (c = t.speed) !== null && c !== void 0 ? c : new nt(1), this.memory = [], this._m1 = new
|
|
7980
|
+
this.type = "donut", this.currentValue = 0, this.radius = (e = t.radius) !== null && e !== void 0 ? e : 10, this.arc = (n = t.arc) !== null && n !== void 0 ? n : 2 * Math.PI, this.thickness = (i = t.thickness) !== null && i !== void 0 ? i : 1, this.donutRadius = (s = t.donutRadius) !== null && s !== void 0 ? s : this.radius * 0.2, this.mode = (a = t.mode) !== null && a !== void 0 ? a : $t.Random, this.spread = (o = t.spread) !== null && o !== void 0 ? o : 0, this.speed = (c = t.speed) !== null && c !== void 0 ? c : new nt(1), this.memory = [], this._m1 = new Ne();
|
|
7981
7981
|
}
|
|
7982
7982
|
update(t, e) {
|
|
7983
7983
|
$t.Random != this.mode && (this.currentValue += this.speed.genValue(this.memory, t.emissionState.time / t.duration) * e);
|
|
@@ -8023,7 +8023,7 @@ class Mi {
|
|
|
8023
8023
|
}
|
|
8024
8024
|
class wi {
|
|
8025
8025
|
constructor() {
|
|
8026
|
-
this.type = "point", this._m1 = new
|
|
8026
|
+
this.type = "point", this._m1 = new Ne();
|
|
8027
8027
|
}
|
|
8028
8028
|
update(t, e) {
|
|
8029
8029
|
}
|
|
@@ -8046,7 +8046,7 @@ class wi {
|
|
|
8046
8046
|
class Gn {
|
|
8047
8047
|
constructor(t = {}) {
|
|
8048
8048
|
var e, n, i, s, a, o;
|
|
8049
|
-
this.type = "sphere", this.currentValue = 0, this.radius = (e = t.radius) !== null && e !== void 0 ? e : 10, this.arc = (n = t.arc) !== null && n !== void 0 ? n : 2 * Math.PI, this.thickness = (i = t.thickness) !== null && i !== void 0 ? i : 1, this.mode = (s = t.mode) !== null && s !== void 0 ? s : $t.Random, this.spread = (a = t.spread) !== null && a !== void 0 ? a : 0, this.speed = (o = t.speed) !== null && o !== void 0 ? o : new nt(1), this.memory = [], this._m1 = new
|
|
8049
|
+
this.type = "sphere", this.currentValue = 0, this.radius = (e = t.radius) !== null && e !== void 0 ? e : 10, this.arc = (n = t.arc) !== null && n !== void 0 ? n : 2 * Math.PI, this.thickness = (i = t.thickness) !== null && i !== void 0 ? i : 1, this.mode = (s = t.mode) !== null && s !== void 0 ? s : $t.Random, this.spread = (a = t.spread) !== null && a !== void 0 ? a : 0, this.speed = (o = t.speed) !== null && o !== void 0 ? o : new nt(1), this.memory = [], this._m1 = new Ne();
|
|
8050
8050
|
}
|
|
8051
8051
|
update(t, e) {
|
|
8052
8052
|
$t.Random != this.mode && (this.currentValue += this.speed.genValue(this.memory, t.emissionState.time / t.duration) * e);
|
|
@@ -8090,7 +8090,7 @@ class Gn {
|
|
|
8090
8090
|
class Pi {
|
|
8091
8091
|
constructor(t = {}) {
|
|
8092
8092
|
var e, n, i, s, a, o;
|
|
8093
|
-
this.type = "sphere", this.currentValue = 0, this.radius = (e = t.radius) !== null && e !== void 0 ? e : 10, this.arc = (n = t.arc) !== null && n !== void 0 ? n : 2 * Math.PI, this.thickness = (i = t.thickness) !== null && i !== void 0 ? i : 1, this.mode = (s = t.mode) !== null && s !== void 0 ? s : $t.Random, this.spread = (a = t.spread) !== null && a !== void 0 ? a : 0, this.speed = (o = t.speed) !== null && o !== void 0 ? o : new nt(1), this.memory = [], this._m1 = new
|
|
8093
|
+
this.type = "sphere", this.currentValue = 0, this.radius = (e = t.radius) !== null && e !== void 0 ? e : 10, this.arc = (n = t.arc) !== null && n !== void 0 ? n : 2 * Math.PI, this.thickness = (i = t.thickness) !== null && i !== void 0 ? i : 1, this.mode = (s = t.mode) !== null && s !== void 0 ? s : $t.Random, this.spread = (a = t.spread) !== null && a !== void 0 ? a : 0, this.speed = (o = t.speed) !== null && o !== void 0 ? o : new nt(1), this.memory = [], this._m1 = new Ne();
|
|
8094
8094
|
}
|
|
8095
8095
|
update(t, e) {
|
|
8096
8096
|
$t.Random != this.mode && (this.currentValue += this.speed.genValue(this.memory, t.emissionState.time / t.duration) * e);
|
|
@@ -8246,7 +8246,7 @@ const eo = {
|
|
|
8246
8246
|
loadJSON: Ei.fromJSON
|
|
8247
8247
|
}
|
|
8248
8248
|
};
|
|
8249
|
-
function
|
|
8249
|
+
function _h(r, t) {
|
|
8250
8250
|
return eo[r.type].loadJSON(r, t);
|
|
8251
8251
|
}
|
|
8252
8252
|
class ki {
|
|
@@ -8417,7 +8417,7 @@ class Ii {
|
|
|
8417
8417
|
reset() {
|
|
8418
8418
|
}
|
|
8419
8419
|
}
|
|
8420
|
-
class
|
|
8420
|
+
class Bi {
|
|
8421
8421
|
constructor(t) {
|
|
8422
8422
|
this.frame = t, this.type = "FrameOverLife";
|
|
8423
8423
|
}
|
|
@@ -8436,15 +8436,15 @@ class Ni {
|
|
|
8436
8436
|
};
|
|
8437
8437
|
}
|
|
8438
8438
|
static fromJSON(t) {
|
|
8439
|
-
return new
|
|
8439
|
+
return new Bi(Q(t.frame));
|
|
8440
8440
|
}
|
|
8441
8441
|
clone() {
|
|
8442
|
-
return new
|
|
8442
|
+
return new Bi(this.frame.clone());
|
|
8443
8443
|
}
|
|
8444
8444
|
reset() {
|
|
8445
8445
|
}
|
|
8446
8446
|
}
|
|
8447
|
-
class
|
|
8447
|
+
class Ni {
|
|
8448
8448
|
constructor(t, e = new W(0, 1, 0)) {
|
|
8449
8449
|
this.orbitSpeed = t, this.axis = e, this.type = "OrbitOverLife", this.temp = new W(), this.rotation = new it();
|
|
8450
8450
|
}
|
|
@@ -8464,10 +8464,10 @@ class Bi {
|
|
|
8464
8464
|
};
|
|
8465
8465
|
}
|
|
8466
8466
|
static fromJSON(t) {
|
|
8467
|
-
return new
|
|
8467
|
+
return new Ni(Q(t.orbitSpeed), t.axis ? new W(t.axis[0], t.axis[1], t.axis[2]) : void 0);
|
|
8468
8468
|
}
|
|
8469
8469
|
clone() {
|
|
8470
|
-
return new
|
|
8470
|
+
return new Ni(this.orbitSpeed.clone());
|
|
8471
8471
|
}
|
|
8472
8472
|
reset() {
|
|
8473
8473
|
}
|
|
@@ -8483,7 +8483,7 @@ class Ms {
|
|
|
8483
8483
|
return this.next !== null;
|
|
8484
8484
|
}
|
|
8485
8485
|
}
|
|
8486
|
-
class
|
|
8486
|
+
class bh {
|
|
8487
8487
|
constructor() {
|
|
8488
8488
|
this.length = 0, this.head = this.tail = null;
|
|
8489
8489
|
}
|
|
@@ -8537,7 +8537,7 @@ class _h {
|
|
|
8537
8537
|
yield t.data, t = t.next;
|
|
8538
8538
|
}
|
|
8539
8539
|
}
|
|
8540
|
-
class
|
|
8540
|
+
class Th {
|
|
8541
8541
|
constructor() {
|
|
8542
8542
|
this.startSpeed = 0, this.startColor = new ae(), this.startSize = new W(1, 1, 1), this.position = new W(), this.velocity = new W(), this.age = 0, this.life = 1, this.size = new W(1, 1, 1), this.speedModifier = 1, this.rotation = 0, this.color = new ae(), this.uvTile = 0, this.memory = [];
|
|
8543
8543
|
}
|
|
@@ -8548,17 +8548,17 @@ class bh {
|
|
|
8548
8548
|
this.memory.length = 0;
|
|
8549
8549
|
}
|
|
8550
8550
|
}
|
|
8551
|
-
class
|
|
8551
|
+
class Ch {
|
|
8552
8552
|
constructor(t, e, n) {
|
|
8553
8553
|
this.position = t, this.size = e, this.color = n;
|
|
8554
8554
|
}
|
|
8555
8555
|
}
|
|
8556
8556
|
class no {
|
|
8557
8557
|
constructor() {
|
|
8558
|
-
this.startSpeed = 0, this.startColor = new ae(), this.startSize = new W(1, 1, 1), this.position = new W(), this.velocity = new W(), this.age = 0, this.life = 1, this.size = new W(1, 1, 1), this.length = 100, this.speedModifier = 1, this.color = new ae(), this.previous = new
|
|
8558
|
+
this.startSpeed = 0, this.startColor = new ae(), this.startSize = new W(1, 1, 1), this.position = new W(), this.velocity = new W(), this.age = 0, this.life = 1, this.size = new W(1, 1, 1), this.length = 100, this.speedModifier = 1, this.color = new ae(), this.previous = new bh(), this.uvTile = 0, this.memory = [];
|
|
8559
8559
|
}
|
|
8560
8560
|
update() {
|
|
8561
|
-
for (this.age <= this.life ? this.previous.push(new
|
|
8561
|
+
for (this.age <= this.life ? this.previous.push(new Ch(this.position.clone(), this.size.x, this.color.clone())) : this.previous.length > 0 && this.previous.dequeue(); this.previous.length > this.length; )
|
|
8562
8562
|
this.previous.dequeue();
|
|
8563
8563
|
}
|
|
8564
8564
|
get died() {
|
|
@@ -8703,7 +8703,7 @@ class Vi {
|
|
|
8703
8703
|
emit(t, e) {
|
|
8704
8704
|
if (!this.subParticleSystem || Math.random() > this.emitProbability)
|
|
8705
8705
|
return;
|
|
8706
|
-
const n = new
|
|
8706
|
+
const n = new Ne();
|
|
8707
8707
|
this.setMatrixFromParticle(n, t), this.subEmissions.push({
|
|
8708
8708
|
burstParticleCount: 0,
|
|
8709
8709
|
burstParticleIndex: 0,
|
|
@@ -8755,11 +8755,11 @@ class Vi {
|
|
|
8755
8755
|
t.set(this.v_.x / i, this.v2_.x / s, e.velocity.x, e.position.x, this.v_.y / i, this.v2_.y / s, e.velocity.y, e.position.y, this.v_.z / i, this.v2_.z / s, e.velocity.z, e.position.z, 0, 0, 0, 1);
|
|
8756
8756
|
}
|
|
8757
8757
|
else
|
|
8758
|
-
e.rotation instanceof it ? n = e.rotation : (this.q_.setFromAxisAngle(Ua, e.rotation), n = this.q_), t.compose(e.position, n,
|
|
8758
|
+
e.rotation instanceof it ? n = e.rotation : (this.q_.setFromAxisAngle(Ua, e.rotation), n = this.q_), t.compose(e.position, n, xh);
|
|
8759
8759
|
this.particleSystem.worldSpace || t.multiplyMatrices(this.particleSystem.emitter.matrixWorld, t);
|
|
8760
8760
|
}
|
|
8761
8761
|
}
|
|
8762
|
-
const
|
|
8762
|
+
const Mh = 0.5 * (Math.sqrt(3) - 1), Kn = (3 - Math.sqrt(3)) / 6, wh = 1 / 3, Ae = 1 / 6, Ph = (Math.sqrt(5) - 1) / 4, zt = (5 - Math.sqrt(5)) / 20, Rt = new Float32Array([
|
|
8763
8763
|
1,
|
|
8764
8764
|
1,
|
|
8765
8765
|
0,
|
|
@@ -8928,42 +8928,42 @@ const Ch = 0.5 * (Math.sqrt(3) - 1), Kn = (3 - Math.sqrt(3)) / 6, Mh = 1 / 3, Ae
|
|
|
8928
8928
|
]);
|
|
8929
8929
|
class rl {
|
|
8930
8930
|
constructor(t = Math.random) {
|
|
8931
|
-
const e = typeof t == "function" ? t :
|
|
8932
|
-
this.p =
|
|
8931
|
+
const e = typeof t == "function" ? t : kh(t);
|
|
8932
|
+
this.p = Eh(e), this.perm = new Uint8Array(512), this.permMod12 = new Uint8Array(512);
|
|
8933
8933
|
for (let n = 0; n < 512; n++)
|
|
8934
8934
|
this.perm[n] = this.p[n & 255], this.permMod12[n] = this.perm[n] % 12;
|
|
8935
8935
|
}
|
|
8936
8936
|
noise2D(t, e) {
|
|
8937
8937
|
const n = this.permMod12, i = this.perm;
|
|
8938
8938
|
let s = 0, a = 0, o = 0;
|
|
8939
|
-
const c = (t + e) *
|
|
8939
|
+
const c = (t + e) * Mh, l = Math.floor(t + c), u = Math.floor(e + c), f = (l + u) * Kn, p = l - f, m = u - f, x = t - p, T = e - m;
|
|
8940
8940
|
let g, v;
|
|
8941
8941
|
x > T ? (g = 1, v = 0) : (g = 0, v = 1);
|
|
8942
8942
|
const b = x - g + Kn, _ = T - v + Kn, w = x - 1 + 2 * Kn, M = T - 1 + 2 * Kn, P = l & 255, E = u & 255;
|
|
8943
8943
|
let z = 0.5 - x * x - T * T;
|
|
8944
8944
|
if (z >= 0) {
|
|
8945
|
-
const
|
|
8946
|
-
z *= z, s = z * z * (Rt[
|
|
8945
|
+
const B = n[P + i[E]] * 3;
|
|
8946
|
+
z *= z, s = z * z * (Rt[B] * x + Rt[B + 1] * T);
|
|
8947
8947
|
}
|
|
8948
8948
|
let A = 0.5 - b * b - _ * _;
|
|
8949
8949
|
if (A >= 0) {
|
|
8950
|
-
const
|
|
8951
|
-
A *= A, a = A * A * (Rt[
|
|
8950
|
+
const B = n[P + g + i[E + v]] * 3;
|
|
8951
|
+
A *= A, a = A * A * (Rt[B] * b + Rt[B + 1] * _);
|
|
8952
8952
|
}
|
|
8953
8953
|
let R = 0.5 - w * w - M * M;
|
|
8954
8954
|
if (R >= 0) {
|
|
8955
|
-
const
|
|
8956
|
-
R *= R, o = R * R * (Rt[
|
|
8955
|
+
const B = n[P + 1 + i[E + 1]] * 3;
|
|
8956
|
+
R *= R, o = R * R * (Rt[B] * w + Rt[B + 1] * M);
|
|
8957
8957
|
}
|
|
8958
8958
|
return 70 * (s + a + o);
|
|
8959
8959
|
}
|
|
8960
8960
|
noise3D(t, e, n) {
|
|
8961
8961
|
const i = this.permMod12, s = this.perm;
|
|
8962
8962
|
let a, o, c, l;
|
|
8963
|
-
const u = (t + e + n) *
|
|
8963
|
+
const u = (t + e + n) * wh, f = Math.floor(t + u), p = Math.floor(e + u), m = Math.floor(n + u), x = (f + p + m) * Ae, T = f - x, g = p - x, v = m - x, b = t - T, _ = e - g, w = n - v;
|
|
8964
8964
|
let M, P, E, z, A, R;
|
|
8965
8965
|
b >= _ ? _ >= w ? (M = 1, P = 0, E = 0, z = 1, A = 1, R = 0) : b >= w ? (M = 1, P = 0, E = 0, z = 1, A = 0, R = 1) : (M = 0, P = 0, E = 1, z = 1, A = 0, R = 1) : _ < w ? (M = 0, P = 0, E = 1, z = 0, A = 1, R = 1) : b < w ? (M = 0, P = 1, E = 0, z = 0, A = 1, R = 1) : (M = 0, P = 1, E = 0, z = 1, A = 1, R = 0);
|
|
8966
|
-
const
|
|
8966
|
+
const B = b - M + Ae, I = _ - P + Ae, U = w - E + Ae, D = b - z + 2 * Ae, V = _ - A + 2 * Ae, $ = w - R + 2 * Ae, Z = b - 1 + 3 * Ae, G = _ - 1 + 3 * Ae, ot = w - 1 + 3 * Ae, lt = f & 255, yt = p & 255, ut = m & 255;
|
|
8967
8967
|
let _t = 0.6 - b * b - _ * _ - w * w;
|
|
8968
8968
|
if (_t < 0)
|
|
8969
8969
|
a = 0;
|
|
@@ -8971,12 +8971,12 @@ class rl {
|
|
|
8971
8971
|
const at = i[lt + s[yt + s[ut]]] * 3;
|
|
8972
8972
|
_t *= _t, a = _t * _t * (Rt[at] * b + Rt[at + 1] * _ + Rt[at + 2] * w);
|
|
8973
8973
|
}
|
|
8974
|
-
let wt = 0.6 -
|
|
8974
|
+
let wt = 0.6 - B * B - I * I - U * U;
|
|
8975
8975
|
if (wt < 0)
|
|
8976
8976
|
o = 0;
|
|
8977
8977
|
else {
|
|
8978
8978
|
const at = i[lt + M + s[yt + P + s[ut + E]]] * 3;
|
|
8979
|
-
wt *= wt, o = wt * wt * (Rt[at] *
|
|
8979
|
+
wt *= wt, o = wt * wt * (Rt[at] * B + Rt[at + 1] * I + Rt[at + 2] * U);
|
|
8980
8980
|
}
|
|
8981
8981
|
let gt = 0.6 - D * D - V * V - $ * $;
|
|
8982
8982
|
if (gt < 0)
|
|
@@ -8997,10 +8997,10 @@ class rl {
|
|
|
8997
8997
|
noise4D(t, e, n, i) {
|
|
8998
8998
|
const s = this.perm;
|
|
8999
8999
|
let a, o, c, l, u;
|
|
9000
|
-
const f = (t + e + n + i) *
|
|
9001
|
-
let A = 0, R = 0,
|
|
9002
|
-
M > P ? A++ : R++, M > E ? A++ :
|
|
9003
|
-
const U = A >= 3 ? 1 : 0, D = R >= 3 ? 1 : 0, V =
|
|
9000
|
+
const f = (t + e + n + i) * Ph, p = Math.floor(t + f), m = Math.floor(e + f), x = Math.floor(n + f), T = Math.floor(i + f), g = (p + m + x + T) * zt, v = p - g, b = m - g, _ = x - g, w = T - g, M = t - v, P = e - b, E = n - _, z = i - w;
|
|
9001
|
+
let A = 0, R = 0, B = 0, I = 0;
|
|
9002
|
+
M > P ? A++ : R++, M > E ? A++ : B++, M > z ? A++ : I++, P > E ? R++ : B++, P > z ? R++ : I++, E > z ? B++ : I++;
|
|
9003
|
+
const U = A >= 3 ? 1 : 0, D = R >= 3 ? 1 : 0, V = B >= 3 ? 1 : 0, $ = I >= 3 ? 1 : 0, Z = A >= 2 ? 1 : 0, G = R >= 2 ? 1 : 0, ot = B >= 2 ? 1 : 0, lt = I >= 2 ? 1 : 0, yt = A >= 1 ? 1 : 0, ut = R >= 1 ? 1 : 0, _t = B >= 1 ? 1 : 0, wt = I >= 1 ? 1 : 0, gt = M - U + zt, pt = P - D + zt, at = E - V + zt, ee = z - $ + zt, qt = M - Z + 2 * zt, Xt = P - G + 2 * zt, ne = E - ot + 2 * zt, Ot = z - lt + 2 * zt, mt = M - yt + 3 * zt, rt = P - ut + 3 * zt, ce = E - _t + 3 * zt, Pt = z - wt + 3 * zt, ht = M - 1 + 4 * zt, Yt = P - 1 + 4 * zt, ve = E - 1 + 4 * zt, Se = z - 1 + 4 * zt, Zt = p & 255, xe = m & 255, le = x & 255, ue = T & 255;
|
|
9004
9004
|
let _e = 0.6 - M * M - P * P - E * E - z * z;
|
|
9005
9005
|
if (_e < 0)
|
|
9006
9006
|
a = 0;
|
|
@@ -9039,7 +9039,7 @@ class rl {
|
|
|
9039
9039
|
return 27 * (a + o + c + l + u);
|
|
9040
9040
|
}
|
|
9041
9041
|
}
|
|
9042
|
-
function
|
|
9042
|
+
function Eh(r) {
|
|
9043
9043
|
const t = new Uint8Array(256);
|
|
9044
9044
|
for (let e = 0; e < 256; e++)
|
|
9045
9045
|
t[e] = e;
|
|
@@ -9049,15 +9049,15 @@ function Ph(r) {
|
|
|
9049
9049
|
}
|
|
9050
9050
|
return t;
|
|
9051
9051
|
}
|
|
9052
|
-
function
|
|
9052
|
+
function kh(r) {
|
|
9053
9053
|
let t = 0, e = 0, n = 0, i = 1;
|
|
9054
|
-
const s =
|
|
9054
|
+
const s = Rh();
|
|
9055
9055
|
return t = s(" "), e = s(" "), n = s(" "), t -= s(r), t < 0 && (t += 1), e -= s(r), e < 0 && (e += 1), n -= s(r), n < 0 && (n += 1), function() {
|
|
9056
9056
|
const a = 2091639 * t + i * 23283064365386963e-26;
|
|
9057
9057
|
return t = e, e = n, n = a - (i = a | 0);
|
|
9058
9058
|
};
|
|
9059
9059
|
}
|
|
9060
|
-
function
|
|
9060
|
+
function Rh() {
|
|
9061
9061
|
let r = 4022871197;
|
|
9062
9062
|
return function(t) {
|
|
9063
9063
|
t = t.toString();
|
|
@@ -9360,9 +9360,9 @@ const jr = {
|
|
|
9360
9360
|
},
|
|
9361
9361
|
FrameOverLife: {
|
|
9362
9362
|
type: "FrameOverLife",
|
|
9363
|
-
constructor:
|
|
9363
|
+
constructor: Bi,
|
|
9364
9364
|
params: [["frame", ["value", "valueFunc"]]],
|
|
9365
|
-
loadJSON:
|
|
9365
|
+
loadJSON: Bi.fromJSON
|
|
9366
9366
|
},
|
|
9367
9367
|
ForceOverLife: {
|
|
9368
9368
|
type: "ForceOverLife",
|
|
@@ -9376,12 +9376,12 @@ const jr = {
|
|
|
9376
9376
|
},
|
|
9377
9377
|
OrbitOverLife: {
|
|
9378
9378
|
type: "OrbitOverLife",
|
|
9379
|
-
constructor:
|
|
9379
|
+
constructor: Ni,
|
|
9380
9380
|
params: [
|
|
9381
9381
|
["orbitSpeed", ["value", "valueFunc"]],
|
|
9382
9382
|
["axis", ["vec3"]]
|
|
9383
9383
|
],
|
|
9384
|
-
loadJSON:
|
|
9384
|
+
loadJSON: Ni.fromJSON
|
|
9385
9385
|
},
|
|
9386
9386
|
WidthOverLength: {
|
|
9387
9387
|
type: "WidthOverLength",
|
|
@@ -9417,19 +9417,19 @@ const jr = {
|
|
|
9417
9417
|
loadJSON: Hi.fromJSON
|
|
9418
9418
|
}
|
|
9419
9419
|
};
|
|
9420
|
-
function
|
|
9420
|
+
function Ah(r, t) {
|
|
9421
9421
|
return jr[r.type] ? jr[r.type].loadJSON(r, t) : null;
|
|
9422
9422
|
}
|
|
9423
|
-
const
|
|
9424
|
-
function
|
|
9425
|
-
if (!
|
|
9423
|
+
const Oh = [];
|
|
9424
|
+
function zh(r) {
|
|
9425
|
+
if (!Oh.find((e) => e.id === r.id)) {
|
|
9426
9426
|
for (const e of r.emitterShapes)
|
|
9427
9427
|
eo[e.type] || (eo[e.type] = e);
|
|
9428
9428
|
for (const e of r.behaviors)
|
|
9429
9429
|
jr[e.type] || (jr[e.type] = e);
|
|
9430
9430
|
}
|
|
9431
9431
|
}
|
|
9432
|
-
var
|
|
9432
|
+
var Ih = `
|
|
9433
9433
|
#ifdef SOFT_PARTICLES
|
|
9434
9434
|
|
|
9435
9435
|
/* #ifdef LOGDEPTH
|
|
@@ -9451,7 +9451,7 @@ var zh = `
|
|
|
9451
9451
|
|
|
9452
9452
|
//gl_FragColor = vec4(softParticlesFade , 0, 0, 1);
|
|
9453
9453
|
#endif
|
|
9454
|
-
`,
|
|
9454
|
+
`, Bh = `
|
|
9455
9455
|
#ifdef SOFT_PARTICLES
|
|
9456
9456
|
|
|
9457
9457
|
uniform sampler2D depthTexture;
|
|
@@ -9478,12 +9478,12 @@ var zh = `
|
|
|
9478
9478
|
varying vec4 projPosition;
|
|
9479
9479
|
varying float linearDepth;
|
|
9480
9480
|
#endif
|
|
9481
|
-
`,
|
|
9481
|
+
`, Uh = `
|
|
9482
9482
|
#ifdef SOFT_PARTICLES
|
|
9483
9483
|
projPosition = gl_Position;
|
|
9484
9484
|
linearDepth = -mvPosition.z;
|
|
9485
9485
|
#endif
|
|
9486
|
-
`,
|
|
9486
|
+
`, Fh = `
|
|
9487
9487
|
#ifdef USE_MAP
|
|
9488
9488
|
vec4 texelColor = texture2D( map, vUv);
|
|
9489
9489
|
#ifdef TILE_BLEND
|
|
@@ -9491,7 +9491,7 @@ var zh = `
|
|
|
9491
9491
|
#endif
|
|
9492
9492
|
diffuseColor *= texelColor;
|
|
9493
9493
|
#endif
|
|
9494
|
-
`,
|
|
9494
|
+
`, Dh = `
|
|
9495
9495
|
#if defined( USE_UV ) || defined( USE_ANISOTROPY )
|
|
9496
9496
|
|
|
9497
9497
|
varying vec2 vUv;
|
|
@@ -9642,7 +9642,7 @@ var zh = `
|
|
|
9642
9642
|
varying vec2 vThicknessMapUv;
|
|
9643
9643
|
|
|
9644
9644
|
#endif
|
|
9645
|
-
`,
|
|
9645
|
+
`, Lh = `
|
|
9646
9646
|
#ifdef UV_TILE
|
|
9647
9647
|
attribute float uvTile;
|
|
9648
9648
|
uniform vec2 tileCount;
|
|
@@ -9812,7 +9812,7 @@ var zh = `
|
|
|
9812
9812
|
varying vec2 vThicknessMapUv;
|
|
9813
9813
|
|
|
9814
9814
|
#endif
|
|
9815
|
-
`,
|
|
9815
|
+
`, Vh = `
|
|
9816
9816
|
#ifdef UV_TILE
|
|
9817
9817
|
mat3 tileTransform = makeTileTransform(floor(uvTile));
|
|
9818
9818
|
#ifdef TILE_BLEND
|
|
@@ -9952,10 +9952,10 @@ vThicknessMapUv = ( tileTransform * thicknessMapTransform * vec3( THICKNESSMAP_U
|
|
|
9952
9952
|
|
|
9953
9953
|
`;
|
|
9954
9954
|
const tn = Il;
|
|
9955
|
-
function
|
|
9956
|
-
tn.tile_pars_vertex =
|
|
9955
|
+
function Jh() {
|
|
9956
|
+
tn.tile_pars_vertex = Lh, tn.tile_vertex = Vh, tn.tile_pars_fragment = Dh, tn.tile_fragment = Fh, tn.soft_pars_vertex = Nh, tn.soft_vertex = Uh, tn.soft_pars_fragment = Bh, tn.soft_fragment = Ih;
|
|
9957
9957
|
}
|
|
9958
|
-
class
|
|
9958
|
+
class jh extends oc {
|
|
9959
9959
|
constructor(t) {
|
|
9960
9960
|
super(), this.type = "ParticleEmitter", this.system = t;
|
|
9961
9961
|
}
|
|
@@ -10015,9 +10015,9 @@ class sl extends yo {
|
|
|
10015
10015
|
e && e.value !== t && (e.value = t, this.material.needsUpdate = !0);
|
|
10016
10016
|
}
|
|
10017
10017
|
}
|
|
10018
|
-
const
|
|
10018
|
+
const Gh = new W(0, 0, 1), Es = new it(), Wh = new W(), $h = new W();
|
|
10019
10019
|
new W();
|
|
10020
|
-
const Fa = 60,
|
|
10020
|
+
const Fa = 60, Hh = new sc(1, 1, 1, 1);
|
|
10021
10021
|
class io {
|
|
10022
10022
|
set time(t) {
|
|
10023
10023
|
this.emissionState.time = t;
|
|
@@ -10123,13 +10123,13 @@ class io {
|
|
|
10123
10123
|
this.rendererSettings.material.blending = t, this.neededToUpdateRender = !0;
|
|
10124
10124
|
}
|
|
10125
10125
|
constructor(t) {
|
|
10126
|
-
var e, n, i, s, a, o, c, l, u, f, p, m, x, T, g, v, b, _, w, M, P, E, z, A, R,
|
|
10127
|
-
if (this.temp = new W(), this.travelDistance = 0, this.normalMatrix = new
|
|
10126
|
+
var e, n, i, s, a, o, c, l, u, f, p, m, x, T, g, v, b, _, w, M, P, E, z, A, R, B;
|
|
10127
|
+
if (this.temp = new W(), this.travelDistance = 0, this.normalMatrix = new Be(), this.memory = [], this.listeners = {}, this.firstTimeUpdate = !0, this.autoDestroy = t.autoDestroy === void 0 ? !1 : t.autoDestroy, this.duration = (e = t.duration) !== null && e !== void 0 ? e : 1, this.looping = t.looping === void 0 ? !0 : t.looping, this.prewarm = t.prewarm === void 0 ? !1 : t.prewarm, this.startLife = (n = t.startLife) !== null && n !== void 0 ? n : new nt(5), this.startSpeed = (i = t.startSpeed) !== null && i !== void 0 ? i : new nt(0), this.startRotation = (s = t.startRotation) !== null && s !== void 0 ? s : new nt(0), this.startSize = (a = t.startSize) !== null && a !== void 0 ? a : new nt(1), this.startColor = (o = t.startColor) !== null && o !== void 0 ? o : new jn(new ae(1, 1, 1, 1)), this.emissionOverTime = (c = t.emissionOverTime) !== null && c !== void 0 ? c : new nt(10), this.emissionOverDistance = (l = t.emissionOverDistance) !== null && l !== void 0 ? l : new nt(0), this.emissionBursts = (u = t.emissionBursts) !== null && u !== void 0 ? u : [], this.onlyUsedByOther = (f = t.onlyUsedByOther) !== null && f !== void 0 ? f : !1, this.emitterShape = (p = t.shape) !== null && p !== void 0 ? p : new Gn(), this.behaviors = (m = t.behaviors) !== null && m !== void 0 ? m : new Array(), this.worldSpace = (x = t.worldSpace) !== null && x !== void 0 ? x : !1, this.rendererEmitterSettings = (T = t.rendererEmitterSettings) !== null && T !== void 0 ? T : {}, t.renderMode === J.StretchedBillBoard) {
|
|
10128
10128
|
const I = this.rendererEmitterSettings;
|
|
10129
10129
|
t.speedFactor !== void 0 && (I.speedFactor = t.speedFactor), I.speedFactor = (g = I.speedFactor) !== null && g !== void 0 ? g : 0, I.lengthFactor = (v = I.lengthFactor) !== null && v !== void 0 ? v : 0;
|
|
10130
10130
|
}
|
|
10131
10131
|
this.rendererSettings = {
|
|
10132
|
-
instancingGeometry: (b = t.instancingGeometry) !== null && b !== void 0 ? b :
|
|
10132
|
+
instancingGeometry: (b = t.instancingGeometry) !== null && b !== void 0 ? b : Hh,
|
|
10133
10133
|
renderMode: (_ = t.renderMode) !== null && _ !== void 0 ? _ : J.BillBoard,
|
|
10134
10134
|
renderOrder: (w = t.renderOrder) !== null && w !== void 0 ? w : 0,
|
|
10135
10135
|
material: t.material,
|
|
@@ -10139,8 +10139,8 @@ class io {
|
|
|
10139
10139
|
softParticles: (z = t.softParticles) !== null && z !== void 0 ? z : !1,
|
|
10140
10140
|
softNearFade: (A = t.softNearFade) !== null && A !== void 0 ? A : 0,
|
|
10141
10141
|
softFarFade: (R = t.softFarFade) !== null && R !== void 0 ? R : 0,
|
|
10142
|
-
layers: (
|
|
10143
|
-
}, this.neededToUpdateRender = !0, this.particles = new Array(), this.startTileIndex = t.startTileIndex || new nt(0), this.emitter = new
|
|
10142
|
+
layers: (B = t.layers) !== null && B !== void 0 ? B : new Rr()
|
|
10143
|
+
}, this.neededToUpdateRender = !0, this.particles = new Array(), this.startTileIndex = t.startTileIndex || new nt(0), this.emitter = new jh(this), this.paused = !1, this.particleNum = 0, this.emissionState = {
|
|
10144
10144
|
isBursting: !1,
|
|
10145
10145
|
burstParticleIndex: 0,
|
|
10146
10146
|
burstParticleCount: 0,
|
|
@@ -10162,11 +10162,11 @@ class io {
|
|
|
10162
10162
|
}
|
|
10163
10163
|
spawn(t, e, n) {
|
|
10164
10164
|
Es.setFromRotationMatrix(n);
|
|
10165
|
-
const i =
|
|
10165
|
+
const i = Wh, s = Es, a = $h;
|
|
10166
10166
|
n.decompose(i, s, a);
|
|
10167
10167
|
for (let o = 0; o < t; o++) {
|
|
10168
10168
|
for (e.burstParticleIndex = o, this.particleNum++; this.particles.length < this.particleNum; )
|
|
10169
|
-
this.rendererSettings.renderMode === J.Trail ? this.particles.push(new no()) : this.particles.push(new
|
|
10169
|
+
this.rendererSettings.renderMode === J.Trail ? this.particles.push(new no()) : this.particles.push(new Th());
|
|
10170
10170
|
const c = this.particles[this.particleNum - 1];
|
|
10171
10171
|
if (c.reset(), c.speedModifier = 1, this.startColor.startGen(c.memory), this.startColor.genColor(c.memory, c.startColor, this.emissionState.time), c.color.copy(c.startColor), this.startSpeed.startGen(c.memory), c.startSpeed = this.startSpeed.genValue(c.memory, e.time / this.duration), this.startLife.startGen(c.memory), c.life = this.startLife.genValue(c.memory, e.time / this.duration), c.age = 0, this.startSize.startGen(c.memory), this.startSize.type === "vec3function")
|
|
10172
10172
|
this.startSize.genValue(c.memory, c.startSize, e.time / this.duration);
|
|
@@ -10176,7 +10176,7 @@ class io {
|
|
|
10176
10176
|
}
|
|
10177
10177
|
if (this.startTileIndex.startGen(c.memory), c.uvTile = this.startTileIndex.genValue(c.memory), c.size.copy(c.startSize), this.rendererSettings.renderMode === J.Mesh || this.rendererSettings.renderMode === J.BillBoard || this.rendererSettings.renderMode === J.VerticalBillBoard || this.rendererSettings.renderMode === J.HorizontalBillBoard || this.rendererSettings.renderMode === J.StretchedBillBoard) {
|
|
10178
10178
|
const l = c;
|
|
10179
|
-
this.startRotation.startGen(c.memory), this.rendererSettings.renderMode === J.Mesh ? (l.rotation instanceof it || (l.rotation = new it()), this.startRotation.type === "rotation" ? this.startRotation.genValue(c.memory, l.rotation, 1, e.time / this.duration) : l.rotation.setFromAxisAngle(
|
|
10179
|
+
this.startRotation.startGen(c.memory), this.rendererSettings.renderMode === J.Mesh ? (l.rotation instanceof it || (l.rotation = new it()), this.startRotation.type === "rotation" ? this.startRotation.genValue(c.memory, l.rotation, 1, e.time / this.duration) : l.rotation.setFromAxisAngle(Gh, this.startRotation.genValue(l.memory, e.time / this.duration))) : this.startRotation.type === "rotation" ? l.rotation = 0 : l.rotation = this.startRotation.genValue(l.memory, e.time / this.duration);
|
|
10180
10180
|
} else if (this.rendererSettings.renderMode === J.Trail) {
|
|
10181
10181
|
const l = c;
|
|
10182
10182
|
this.rendererEmitterSettings.startLength.startGen(l.memory), l.length = this.rendererEmitterSettings.startLength.genValue(l.memory, e.time / this.duration);
|
|
@@ -10326,7 +10326,7 @@ class io {
|
|
|
10326
10326
|
}
|
|
10327
10327
|
static fromJSON(t, e, n) {
|
|
10328
10328
|
var i, s;
|
|
10329
|
-
const a =
|
|
10329
|
+
const a = _h(t.shape, e);
|
|
10330
10330
|
let o;
|
|
10331
10331
|
if (t.renderMode === J.Trail) {
|
|
10332
10332
|
const u = t.rendererEmitterSettings;
|
|
@@ -10388,7 +10388,7 @@ class io {
|
|
|
10388
10388
|
worldSpace: t.worldSpace
|
|
10389
10389
|
});
|
|
10390
10390
|
return l.behaviors = t.behaviors.map((u) => {
|
|
10391
|
-
const f =
|
|
10391
|
+
const f = Ah(u, l);
|
|
10392
10392
|
return f.type === "EmitSubParticleSystem" && (n[u.subParticleSystem] = f), f;
|
|
10393
10393
|
}), l;
|
|
10394
10394
|
}
|
|
@@ -10663,7 +10663,7 @@ outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoat
|
|
|
10663
10663
|
#include <fog_fragment>
|
|
10664
10664
|
#include <premultiplied_alpha_fragment>
|
|
10665
10665
|
#include <dithering_fragment>
|
|
10666
|
-
}`,
|
|
10666
|
+
}`, qh = `
|
|
10667
10667
|
#include <common>
|
|
10668
10668
|
#include <color_pars_vertex>
|
|
10669
10669
|
#include <logdepthbuf_pars_vertex>
|
|
@@ -10709,7 +10709,7 @@ void main() {
|
|
|
10709
10709
|
#include <tile_vertex>
|
|
10710
10710
|
#include <soft_vertex>
|
|
10711
10711
|
}
|
|
10712
|
-
`,
|
|
10712
|
+
`, Xh = `
|
|
10713
10713
|
#include <common>
|
|
10714
10714
|
#include <color_pars_vertex>
|
|
10715
10715
|
#include <logdepthbuf_pars_vertex>
|
|
@@ -10831,7 +10831,7 @@ void main() {
|
|
|
10831
10831
|
vWorldPosition = worldPosition.xyz;
|
|
10832
10832
|
#endif
|
|
10833
10833
|
}
|
|
10834
|
-
`,
|
|
10834
|
+
`, Yh = `
|
|
10835
10835
|
#include <common>
|
|
10836
10836
|
#include <color_pars_vertex>
|
|
10837
10837
|
#include <logdepthbuf_pars_vertex>
|
|
@@ -10876,7 +10876,7 @@ void main() {
|
|
|
10876
10876
|
function ro(r) {
|
|
10877
10877
|
return r === 0 ? "uv" : `uv${r}`;
|
|
10878
10878
|
}
|
|
10879
|
-
class
|
|
10879
|
+
class Zh extends Nl {
|
|
10880
10880
|
constructor(t) {
|
|
10881
10881
|
super(t);
|
|
10882
10882
|
}
|
|
@@ -10884,7 +10884,7 @@ class Yh extends Bl {
|
|
|
10884
10884
|
super.onBeforeCompile(t, e), t.vertexShader = Co, t.fragmentShader = To;
|
|
10885
10885
|
}
|
|
10886
10886
|
}
|
|
10887
|
-
class
|
|
10887
|
+
class Kh extends Ul {
|
|
10888
10888
|
constructor(t) {
|
|
10889
10889
|
super(t);
|
|
10890
10890
|
}
|
|
@@ -10892,15 +10892,15 @@ class Zh extends Ul {
|
|
|
10892
10892
|
super.onBeforeCompile(t, e), t.vertexShader = Co, t.fragmentShader = To;
|
|
10893
10893
|
}
|
|
10894
10894
|
}
|
|
10895
|
-
class
|
|
10895
|
+
class Qh extends sl {
|
|
10896
10896
|
constructor(t) {
|
|
10897
|
-
super(t), this.vector_ = new W(), this.vector2_ = new W(), this.vector3_ = new W(), this.quaternion_ = new it(), this.quaternion2_ = new it(), this.quaternion3_ = new it(), this.rotationMat_ = new
|
|
10897
|
+
super(t), this.vector_ = new W(), this.vector2_ = new W(), this.vector3_ = new W(), this.quaternion_ = new it(), this.quaternion2_ = new it(), this.quaternion3_ = new it(), this.rotationMat_ = new Be(), this.rotationMat2_ = new Be(), this.maxParticles = 1e3, this.setupBuffers(), this.rebuildMaterial();
|
|
10898
10898
|
}
|
|
10899
10899
|
buildExpandableBuffers() {
|
|
10900
10900
|
this.offsetBuffer = new un(new Float32Array(this.maxParticles * 3), 3), this.offsetBuffer.setUsage(Wt), this.geometry.setAttribute("offset", this.offsetBuffer), this.colorBuffer = new un(new Float32Array(this.maxParticles * 4), 4), this.colorBuffer.setUsage(Wt), this.geometry.setAttribute("color", this.colorBuffer), this.settings.renderMode === J.Mesh ? (this.rotationBuffer = new un(new Float32Array(this.maxParticles * 4), 4), this.rotationBuffer.setUsage(Wt), this.geometry.setAttribute("rotation", this.rotationBuffer)) : (this.settings.renderMode === J.BillBoard || this.settings.renderMode === J.HorizontalBillBoard || this.settings.renderMode === J.VerticalBillBoard || this.settings.renderMode === J.StretchedBillBoard) && (this.rotationBuffer = new un(new Float32Array(this.maxParticles), 1), this.rotationBuffer.setUsage(Wt), this.geometry.setAttribute("rotation", this.rotationBuffer)), this.sizeBuffer = new un(new Float32Array(this.maxParticles * 3), 3), this.sizeBuffer.setUsage(Wt), this.geometry.setAttribute("size", this.sizeBuffer), this.uvTileBuffer = new un(new Float32Array(this.maxParticles), 1), this.uvTileBuffer.setUsage(Wt), this.geometry.setAttribute("uvTile", this.uvTileBuffer), this.settings.renderMode === J.StretchedBillBoard && (this.velocityBuffer = new un(new Float32Array(this.maxParticles * 4), 4), this.velocityBuffer.setUsage(Wt), this.geometry.setAttribute("velocity", this.velocityBuffer));
|
|
10901
10901
|
}
|
|
10902
10902
|
setupBuffers() {
|
|
10903
|
-
this.geometry && this.geometry.dispose(), this.geometry = new
|
|
10903
|
+
this.geometry && this.geometry.dispose(), this.geometry = new Bl(), this.geometry.setIndex(this.settings.instancingGeometry.getIndex()), this.settings.instancingGeometry.hasAttribute("normal") && this.geometry.setAttribute("normal", this.settings.instancingGeometry.getAttribute("normal")), this.geometry.setAttribute("position", this.settings.instancingGeometry.getAttribute("position")), this.geometry.setAttribute("uv", this.settings.instancingGeometry.getAttribute("uv")), this.buildExpandableBuffers();
|
|
10904
10904
|
}
|
|
10905
10905
|
expandBuffers(t) {
|
|
10906
10906
|
for (; t >= this.maxParticles; )
|
|
@@ -10912,7 +10912,7 @@ class Kh extends sl {
|
|
|
10912
10912
|
const t = {}, e = {};
|
|
10913
10913
|
this.settings.material.type !== "MeshStandardMaterial" && this.settings.material.type !== "MeshPhysicalMaterial" && (t.map = new Pe(this.settings.material.map)), this.settings.material.alphaTest && (e.USE_ALPHATEST = "", t.alphaTest = new Pe(this.settings.material.alphaTest)), e.USE_UV = "";
|
|
10914
10914
|
const n = this.settings.uTileCount, i = this.settings.vTileCount;
|
|
10915
|
-
(n > 1 || i > 1) && (e.UV_TILE = "", t.tileCount = new Pe(new Vn(n, i))), this.settings.material.defines && this.settings.material.defines.USE_COLOR_AS_ALPHA !== void 0 && (e.USE_COLOR_AS_ALPHA = ""), this.settings.material.normalMap && (e.USE_NORMALMAP = "", e.NORMALMAP_UV = ro(this.settings.material.normalMap.channel), t.normalMapTransform = new Pe(new
|
|
10915
|
+
(n > 1 || i > 1) && (e.UV_TILE = "", t.tileCount = new Pe(new Vn(n, i))), this.settings.material.defines && this.settings.material.defines.USE_COLOR_AS_ALPHA !== void 0 && (e.USE_COLOR_AS_ALPHA = ""), this.settings.material.normalMap && (e.USE_NORMALMAP = "", e.NORMALMAP_UV = ro(this.settings.material.normalMap.channel), t.normalMapTransform = new Pe(new Be().copy(this.settings.material.normalMap.matrix))), this.settings.material.map && (e.USE_MAP = "", this.settings.blendTiles && (e.TILE_BLEND = ""), e.MAP_UV = ro(this.settings.material.map.channel), t.mapTransform = new Pe(new Be().copy(this.settings.material.map.matrix))), e.USE_COLOR_ALPHA = "";
|
|
10916
10916
|
let s;
|
|
10917
10917
|
if (this.settings.softParticles) {
|
|
10918
10918
|
e.SOFT_PARTICLES = "";
|
|
@@ -10926,9 +10926,9 @@ class Kh extends sl {
|
|
|
10926
10926
|
let a = !1;
|
|
10927
10927
|
if (this.settings.renderMode === J.BillBoard || this.settings.renderMode === J.VerticalBillBoard || this.settings.renderMode === J.HorizontalBillBoard || this.settings.renderMode === J.Mesh) {
|
|
10928
10928
|
let o, c;
|
|
10929
|
-
this.settings.renderMode === J.Mesh ? this.settings.material.type === "MeshStandardMaterial" || this.settings.material.type === "MeshPhysicalMaterial" ? (e.USE_COLOR = "", o = Co, c = To, a = !0) : (o =
|
|
10929
|
+
this.settings.renderMode === J.Mesh ? this.settings.material.type === "MeshStandardMaterial" || this.settings.material.type === "MeshPhysicalMaterial" ? (e.USE_COLOR = "", o = Co, c = To, a = !0) : (o = Xh, c = ks) : (o = qh, c = ks), this.settings.renderMode === J.VerticalBillBoard ? e.VERTICAL = "" : this.settings.renderMode === J.HorizontalBillBoard && (e.HORIZONTAL = "");
|
|
10930
10930
|
let l = !1;
|
|
10931
|
-
this.settings.renderMode === J.Mesh && (this.settings.material.type === "MeshStandardMaterial" ? (this.material = new
|
|
10931
|
+
this.settings.renderMode === J.Mesh && (this.settings.material.type === "MeshStandardMaterial" ? (this.material = new Zh({}), this.material.copy(this.settings.material), this.material.uniforms = t, this.material.defines = e, l = !0) : this.settings.material.type === "MeshPhysicalMaterial" && (this.material = new Kh({}), this.material.copy(this.settings.material), this.material.uniforms = t, this.material.defines = e, l = !0)), l || (this.material = new Gs({
|
|
10932
10932
|
uniforms: t,
|
|
10933
10933
|
defines: e,
|
|
10934
10934
|
vertexShader: o,
|
|
@@ -10949,7 +10949,7 @@ class Kh extends sl {
|
|
|
10949
10949
|
t.speedFactor = new Pe(1), this.material = new Gs({
|
|
10950
10950
|
uniforms: t,
|
|
10951
10951
|
defines: e,
|
|
10952
|
-
vertexShader:
|
|
10952
|
+
vertexShader: Yh,
|
|
10953
10953
|
fragmentShader: ks,
|
|
10954
10954
|
transparent: this.settings.material.transparent,
|
|
10955
10955
|
depthWrite: !this.settings.material.transparent,
|
|
@@ -11001,7 +11001,7 @@ class Kh extends sl {
|
|
|
11001
11001
|
this.geometry.dispose();
|
|
11002
11002
|
}
|
|
11003
11003
|
}
|
|
11004
|
-
var
|
|
11004
|
+
var tf = `
|
|
11005
11005
|
|
|
11006
11006
|
#include <common>
|
|
11007
11007
|
#include <tile_pars_fragment>
|
|
@@ -11034,7 +11034,7 @@ void main() {
|
|
|
11034
11034
|
|
|
11035
11035
|
#include <fog_fragment>
|
|
11036
11036
|
#include <tonemapping_fragment>
|
|
11037
|
-
}`,
|
|
11037
|
+
}`, ef = `
|
|
11038
11038
|
#include <common>
|
|
11039
11039
|
#include <tile_pars_vertex>
|
|
11040
11040
|
#include <color_pars_vertex>
|
|
@@ -11110,7 +11110,7 @@ void main() {
|
|
|
11110
11110
|
|
|
11111
11111
|
#include <fog_vertex>
|
|
11112
11112
|
}`;
|
|
11113
|
-
class
|
|
11113
|
+
class nf extends sl {
|
|
11114
11114
|
constructor(t) {
|
|
11115
11115
|
super(t), this.vector_ = new W(), this.vector2_ = new W(), this.vector3_ = new W(), this.quaternion_ = new it(), this.maxParticles = 1e4, this.setupBuffers(), this.rebuildMaterial();
|
|
11116
11116
|
}
|
|
@@ -11135,12 +11135,12 @@ class ef extends sl {
|
|
|
11135
11135
|
visibility: { value: 1 },
|
|
11136
11136
|
alphaTest: { value: 0 }
|
|
11137
11137
|
}, e = {};
|
|
11138
|
-
if (e.USE_UV = "", e.USE_COLOR_ALPHA = "", this.settings.material.map && (e.USE_MAP = "", e.MAP_UV = ro(this.settings.material.map.channel), t.map = new Pe(this.settings.material.map), t.mapTransform = new Pe(new
|
|
11138
|
+
if (e.USE_UV = "", e.USE_COLOR_ALPHA = "", this.settings.material.map && (e.USE_MAP = "", e.MAP_UV = ro(this.settings.material.map.channel), t.map = new Pe(this.settings.material.map), t.mapTransform = new Pe(new Be().copy(this.settings.material.map.matrix))), this.settings.material.defines && this.settings.material.defines.USE_COLOR_AS_ALPHA !== void 0 && (e.USE_COLOR_AS_ALPHA = ""), this.settings.renderMode === J.Trail)
|
|
11139
11139
|
this.material = new Gs({
|
|
11140
11140
|
uniforms: t,
|
|
11141
11141
|
defines: e,
|
|
11142
|
-
vertexShader:
|
|
11143
|
-
fragmentShader:
|
|
11142
|
+
vertexShader: ef,
|
|
11143
|
+
fragmentShader: tf,
|
|
11144
11144
|
transparent: this.settings.material.transparent,
|
|
11145
11145
|
depthWrite: !this.settings.material.transparent,
|
|
11146
11146
|
side: this.settings.material.side,
|
|
@@ -11241,7 +11241,7 @@ class qi {
|
|
|
11241
11241
|
update(t, e) {
|
|
11242
11242
|
}
|
|
11243
11243
|
}
|
|
11244
|
-
|
|
11244
|
+
zh({
|
|
11245
11245
|
id: "three.quarks",
|
|
11246
11246
|
emitterShapes: [{
|
|
11247
11247
|
type: "mesh_surface",
|
|
@@ -11269,14 +11269,14 @@ class Mo extends oc {
|
|
|
11269
11269
|
let n;
|
|
11270
11270
|
switch (e.renderMode) {
|
|
11271
11271
|
case J.Trail:
|
|
11272
|
-
n = new
|
|
11272
|
+
n = new nf(e);
|
|
11273
11273
|
break;
|
|
11274
11274
|
case J.Mesh:
|
|
11275
11275
|
case J.BillBoard:
|
|
11276
11276
|
case J.VerticalBillBoard:
|
|
11277
11277
|
case J.HorizontalBillBoard:
|
|
11278
11278
|
case J.StretchedBillBoard:
|
|
11279
|
-
n = new
|
|
11279
|
+
n = new Qh(e);
|
|
11280
11280
|
break;
|
|
11281
11281
|
}
|
|
11282
11282
|
this.depthTexture && n.applyDepthTexture(this.depthTexture), n.addSystem(t), this.batches.push(n), this.systemToBatchIndex.set(t, this.batches.length - 1), this.add(n);
|
|
@@ -11301,10 +11301,10 @@ class Mo extends oc {
|
|
|
11301
11301
|
this.batches[e].update();
|
|
11302
11302
|
}
|
|
11303
11303
|
}
|
|
11304
|
-
const
|
|
11305
|
-
|
|
11304
|
+
const zd = Mo;
|
|
11305
|
+
Jh();
|
|
11306
11306
|
console.log("%c Particle system powered by three.quarks. https://quarks.art/", "font-size: 14px; font-weight: bold;");
|
|
11307
|
-
const ol = /* @__PURE__ */ Math.sqrt(5),
|
|
11307
|
+
const ol = /* @__PURE__ */ Math.sqrt(5), rf = (ol - 1) / 4, It = (5 - ol) / 20, hr = (r) => Math.floor(r) | 0, fr = /* @__PURE__ */ new Float64Array([
|
|
11308
11308
|
0,
|
|
11309
11309
|
1,
|
|
11310
11310
|
1,
|
|
@@ -11434,20 +11434,20 @@ const ol = /* @__PURE__ */ Math.sqrt(5), nf = (ol - 1) / 4, It = (5 - ol) / 20,
|
|
|
11434
11434
|
-1,
|
|
11435
11435
|
0
|
|
11436
11436
|
]);
|
|
11437
|
-
function
|
|
11438
|
-
const t =
|
|
11437
|
+
function Id(r = Math.random) {
|
|
11438
|
+
const t = sf(r), e = new Float64Array(t).map((a) => fr[a % 32 * 4]), n = new Float64Array(t).map((a) => fr[a % 32 * 4 + 1]), i = new Float64Array(t).map((a) => fr[a % 32 * 4 + 2]), s = new Float64Array(t).map((a) => fr[a % 32 * 4 + 3]);
|
|
11439
11439
|
return function(o, c, l, u) {
|
|
11440
11440
|
let f, p, m, x, T;
|
|
11441
|
-
const g = (o + c + l + u) *
|
|
11441
|
+
const g = (o + c + l + u) * rf, v = hr(o + g), b = hr(c + g), _ = hr(l + g), w = hr(u + g), M = (v + b + _ + w) * It, P = v - M, E = b - M, z = _ - M, A = w - M, R = o - P, B = c - E, I = l - z, U = u - A;
|
|
11442
11442
|
let D = 0, V = 0, $ = 0, Z = 0;
|
|
11443
|
-
R >
|
|
11444
|
-
const G = D >= 3 ? 1 : 0, ot = V >= 3 ? 1 : 0, lt = $ >= 3 ? 1 : 0, yt = Z >= 3 ? 1 : 0, ut = D >= 2 ? 1 : 0, _t = V >= 2 ? 1 : 0, wt = $ >= 2 ? 1 : 0, gt = Z >= 2 ? 1 : 0, pt = D >= 1 ? 1 : 0, at = V >= 1 ? 1 : 0, ee = $ >= 1 ? 1 : 0, qt = Z >= 1 ? 1 : 0, Xt = R - G + It, ne =
|
|
11445
|
-
let tt = 0.6 - R * R -
|
|
11443
|
+
R > B ? D++ : V++, R > I ? D++ : $++, R > U ? D++ : Z++, B > I ? V++ : $++, B > U ? V++ : Z++, I > U ? $++ : Z++;
|
|
11444
|
+
const G = D >= 3 ? 1 : 0, ot = V >= 3 ? 1 : 0, lt = $ >= 3 ? 1 : 0, yt = Z >= 3 ? 1 : 0, ut = D >= 2 ? 1 : 0, _t = V >= 2 ? 1 : 0, wt = $ >= 2 ? 1 : 0, gt = Z >= 2 ? 1 : 0, pt = D >= 1 ? 1 : 0, at = V >= 1 ? 1 : 0, ee = $ >= 1 ? 1 : 0, qt = Z >= 1 ? 1 : 0, Xt = R - G + It, ne = B - ot + It, Ot = I - lt + It, mt = U - yt + It, rt = R - ut + 2 * It, ce = B - _t + 2 * It, Pt = I - wt + 2 * It, ht = U - gt + 2 * It, Yt = R - pt + 3 * It, ve = B - at + 3 * It, Se = I - ee + 3 * It, Zt = U - qt + 3 * It, xe = R - 1 + 4 * It, le = B - 1 + 4 * It, ue = I - 1 + 4 * It, _e = U - 1 + 4 * It, Et = v & 255, Jt = b & 255, ie = _ & 255, jt = w & 255;
|
|
11445
|
+
let tt = 0.6 - R * R - B * B - I * I - U * U;
|
|
11446
11446
|
if (tt < 0)
|
|
11447
11447
|
f = 0;
|
|
11448
11448
|
else {
|
|
11449
11449
|
const ct = Et + t[Jt + t[ie + t[jt]]];
|
|
11450
|
-
tt *= tt, f = tt * tt * (e[ct] * R + n[ct] *
|
|
11450
|
+
tt *= tt, f = tt * tt * (e[ct] * R + n[ct] * B + i[ct] * I + s[ct] * U);
|
|
11451
11451
|
}
|
|
11452
11452
|
let be = 0.6 - Xt * Xt - ne * ne - Ot * Ot - mt * mt;
|
|
11453
11453
|
if (be < 0)
|
|
@@ -11480,7 +11480,7 @@ function zd(r = Math.random) {
|
|
|
11480
11480
|
return 27 * (f + p + m + x + T);
|
|
11481
11481
|
};
|
|
11482
11482
|
}
|
|
11483
|
-
function
|
|
11483
|
+
function sf(r) {
|
|
11484
11484
|
const e = new Uint8Array(512);
|
|
11485
11485
|
for (let n = 0; n < 512 / 2; n++)
|
|
11486
11486
|
e[n] = n;
|
|
@@ -11492,7 +11492,7 @@ function rf(r) {
|
|
|
11492
11492
|
e[n] = e[n - 256];
|
|
11493
11493
|
return e;
|
|
11494
11494
|
}
|
|
11495
|
-
var
|
|
11495
|
+
var of = Object.defineProperty, af = (r, t, e) => t in r ? of(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, Ct = (r, t, e) => (af(r, typeof t != "symbol" ? t + "" : t, e), e);
|
|
11496
11496
|
(function() {
|
|
11497
11497
|
class r {
|
|
11498
11498
|
}
|
|
@@ -11598,7 +11598,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
11598
11598
|
function R(h) {
|
|
11599
11599
|
return h === 10;
|
|
11600
11600
|
}
|
|
11601
|
-
function
|
|
11601
|
+
function B(h) {
|
|
11602
11602
|
return R(h) || h === 8192 || h === 32;
|
|
11603
11603
|
}
|
|
11604
11604
|
function I(h) {
|
|
@@ -11638,7 +11638,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
11638
11638
|
if (U(d)) {
|
|
11639
11639
|
let y = [d];
|
|
11640
11640
|
for (; U(...h.peek()) && y.length < 5; ) y.push(h.consume());
|
|
11641
|
-
|
|
11641
|
+
B(...h.peek()) && h.consume();
|
|
11642
11642
|
const S = parseInt(String.fromCodePoint(...y), 16);
|
|
11643
11643
|
return S === 0 || S > 1114111 ? 65533 : S;
|
|
11644
11644
|
}
|
|
@@ -11686,15 +11686,15 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
11686
11686
|
function gt(h) {
|
|
11687
11687
|
const d = ut(h);
|
|
11688
11688
|
if (d.match(/url/i) && h.peek()[0] === 40) {
|
|
11689
|
-
for (h.consume();
|
|
11690
|
-
return [34, 39].includes(h.peek()[0]) ||
|
|
11689
|
+
for (h.consume(); B(h.peek()[0]) && B(h.peek()[1]); ) h.consume();
|
|
11690
|
+
return [34, 39].includes(h.peek()[0]) || B(h.peek()[0]) && [34, 39].includes(h.peek()[1]) ? new e(d) : (function(y) {
|
|
11691
11691
|
const S = new o("");
|
|
11692
|
-
for (;
|
|
11692
|
+
for (; B(...y.peek()); ) y.consume();
|
|
11693
11693
|
for (; ; ) {
|
|
11694
11694
|
const C = y.consume();
|
|
11695
11695
|
if (C === 41 || C === void 0) return S;
|
|
11696
|
-
if (
|
|
11697
|
-
for (;
|
|
11696
|
+
if (B(C)) {
|
|
11697
|
+
for (; B(...y.peek()); ) y.consume();
|
|
11698
11698
|
return y.peek()[0] === 41 || y.peek()[0] === void 0 ? (y.consume(), S) : (wt(y), new c());
|
|
11699
11699
|
}
|
|
11700
11700
|
if ([34, 39, 40].includes(C) || $(C)) return wt(y), new c();
|
|
@@ -11709,8 +11709,8 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
11709
11709
|
}
|
|
11710
11710
|
function pt(h) {
|
|
11711
11711
|
const d = h.consume(), y = h.peek();
|
|
11712
|
-
if (
|
|
11713
|
-
for (;
|
|
11712
|
+
if (B(d)) {
|
|
11713
|
+
for (; B(...h.peek()); ) h.consume();
|
|
11714
11714
|
return new m();
|
|
11715
11715
|
}
|
|
11716
11716
|
if (d === 34) return yt(h, d);
|
|
@@ -11822,9 +11822,9 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
11822
11822
|
if (h instanceof CSSMathMin || h instanceof CSSMathMax) {
|
|
11823
11823
|
const S = Array.from(h.values), [C, k] = Ot(S, ((F) => F instanceof CSSUnitValue && F.unit !== "percent")), O = Array.from(ne(C, "unit").values());
|
|
11824
11824
|
if (O.some(((F) => F.length > 0))) {
|
|
11825
|
-
const F = O.map(((
|
|
11826
|
-
const L = Math[h.operator].apply(Math,
|
|
11827
|
-
return new CSSUnitValue(L,
|
|
11825
|
+
const F = O.map(((N) => {
|
|
11826
|
+
const L = Math[h.operator].apply(Math, N.map((({ value: q }) => q)));
|
|
11827
|
+
return new CSSUnitValue(L, N[0].unit);
|
|
11828
11828
|
}));
|
|
11829
11829
|
h = h instanceof CSSMathMin ? new CSSMathMin(...F, ...k) : new CSSMathMax(...F, ...k);
|
|
11830
11830
|
}
|
|
@@ -11835,8 +11835,8 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
11835
11835
|
if (h instanceof CSSMathSum) {
|
|
11836
11836
|
let S = function(k) {
|
|
11837
11837
|
const O = k.filter(((F) => F instanceof CSSUnitValue));
|
|
11838
|
-
return [...k.filter(((F) => !(F instanceof CSSUnitValue))), ...Array.from(ne(O, "unit").entries()).map((([F,
|
|
11839
|
-
const L =
|
|
11838
|
+
return [...k.filter(((F) => !(F instanceof CSSUnitValue))), ...Array.from(ne(O, "unit").entries()).map((([F, N]) => {
|
|
11839
|
+
const L = N.reduce(((q, { value: Y }) => q + Y), 0);
|
|
11840
11840
|
return new CSSUnitValue(L, F);
|
|
11841
11841
|
}))];
|
|
11842
11842
|
}, C = [];
|
|
@@ -11848,13 +11848,13 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
11848
11848
|
for (const O of h.values) O instanceof CSSMathProduct ? S.push(...O.values) : S.push(O);
|
|
11849
11849
|
const [C, k] = Ot(S, ((O) => O instanceof CSSUnitValue && O.unit === "number"));
|
|
11850
11850
|
if (C.length > 1) {
|
|
11851
|
-
const O = C.reduce(((F, { value:
|
|
11851
|
+
const O = C.reduce(((F, { value: N }) => F * N), 1);
|
|
11852
11852
|
S = [new CSSUnitValue(O, "number"), ...k];
|
|
11853
11853
|
}
|
|
11854
11854
|
if (S.length === 2) {
|
|
11855
11855
|
let O, F;
|
|
11856
|
-
for (const
|
|
11857
|
-
if (O && F) return new CSSMathSum(...[...F.values].map(((
|
|
11856
|
+
for (const N of S) N instanceof CSSUnitValue && N.unit === "number" ? O = N : N instanceof CSSMathSum && [...N.values].every(((L) => L instanceof CSSUnitValue)) && (F = N);
|
|
11857
|
+
if (O && F) return new CSSMathSum(...[...F.values].map(((N) => new CSSUnitValue(N.value * O.value, N.unit))));
|
|
11858
11858
|
}
|
|
11859
11859
|
if (S.every(((O) => O instanceof CSSUnitValue && ee(O.unit) || O instanceof CSSMathInvert && O.value instanceof CSSUnitValue && ee(O.value.unit)))) {
|
|
11860
11860
|
const O = new CSSMathProduct(...S).toSum();
|
|
@@ -11909,8 +11909,8 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
11909
11909
|
if (!y) throw new TypeError();
|
|
11910
11910
|
if (y.length > 1) throw new TypeError("Sum has more than one item");
|
|
11911
11911
|
const S = (function(C, k) {
|
|
11912
|
-
const O = C.unit, F = C.value,
|
|
11913
|
-
return !L ||
|
|
11912
|
+
const O = C.unit, F = C.value, N = Yt(O), L = Yt(k);
|
|
11913
|
+
return !L || N !== L ? rt : new CSSUnitValue(F * L.ratios[O] / L.ratios[k], k);
|
|
11914
11914
|
})(le(y[0]), d);
|
|
11915
11915
|
if (S === rt) throw new TypeError();
|
|
11916
11916
|
return S;
|
|
@@ -12026,16 +12026,16 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12026
12026
|
if (O instanceof u || O instanceof p || O instanceof f || O instanceof Et || O instanceof Jt || O instanceof t) k.push(O);
|
|
12027
12027
|
else if (O instanceof l && ["*", "/", "+", "-"].includes(O.value)) {
|
|
12028
12028
|
for (; C.length && !(be(C) instanceof M) && tt(be(C)) > tt(O); ) {
|
|
12029
|
-
const F = C.pop(),
|
|
12030
|
-
k.push(De(F, L,
|
|
12029
|
+
const F = C.pop(), N = k.pop(), L = k.pop();
|
|
12030
|
+
k.push(De(F, L, N));
|
|
12031
12031
|
}
|
|
12032
12032
|
C.push(O);
|
|
12033
12033
|
} else if (O instanceof M) C.push(O);
|
|
12034
12034
|
else if (O instanceof P) {
|
|
12035
12035
|
if (!C.length) return null;
|
|
12036
12036
|
for (; !(be(C) instanceof M); ) {
|
|
12037
|
-
const F = C.pop(),
|
|
12038
|
-
k.push(De(F, L,
|
|
12037
|
+
const F = C.pop(), N = k.pop(), L = k.pop();
|
|
12038
|
+
k.push(De(F, L, N));
|
|
12039
12039
|
}
|
|
12040
12040
|
if (!(be(C) instanceof M)) return null;
|
|
12041
12041
|
C.pop();
|
|
@@ -12043,8 +12043,8 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12043
12043
|
}
|
|
12044
12044
|
for (; C.length; ) {
|
|
12045
12045
|
if (be(C) instanceof M) return null;
|
|
12046
|
-
const O = C.pop(), F = k.pop(),
|
|
12047
|
-
k.push(De(O,
|
|
12046
|
+
const O = C.pop(), F = k.pop(), N = k.pop();
|
|
12047
|
+
k.push(De(O, N, F));
|
|
12048
12048
|
}
|
|
12049
12049
|
return k[0];
|
|
12050
12050
|
})([...h.values]));
|
|
@@ -12074,7 +12074,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12074
12074
|
let h = /* @__PURE__ */ new WeakMap();
|
|
12075
12075
|
function d(k) {
|
|
12076
12076
|
const O = [];
|
|
12077
|
-
for (let
|
|
12077
|
+
for (let N = 0; N < k.length; N++) O[N] = typeof (F = k[N]) == "number" ? new CSSUnitValue(F, "number") : F;
|
|
12078
12078
|
var F;
|
|
12079
12079
|
return O;
|
|
12080
12080
|
}
|
|
@@ -12084,8 +12084,8 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12084
12084
|
}
|
|
12085
12085
|
}
|
|
12086
12086
|
class S extends y {
|
|
12087
|
-
constructor(O, F,
|
|
12088
|
-
super(), h.set(this, { values: d(O), operator: F, name:
|
|
12087
|
+
constructor(O, F, N, L) {
|
|
12088
|
+
super(), h.set(this, { values: d(O), operator: F, name: N || F, delimiter: L || ", " });
|
|
12089
12089
|
}
|
|
12090
12090
|
get operator() {
|
|
12091
12091
|
return h.get(this).operator;
|
|
@@ -12278,19 +12278,19 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12278
12278
|
let C = Ve.get(d);
|
|
12279
12279
|
if (!C) {
|
|
12280
12280
|
C = { timelineRefs: /* @__PURE__ */ new Set(), sourceMeasurements: ts(d) }, Ve.set(d, C);
|
|
12281
|
-
const k = new ResizeObserver(((
|
|
12282
|
-
for (const L of
|
|
12281
|
+
const k = new ResizeObserver(((N) => {
|
|
12282
|
+
for (const L of N) Ki(y.source);
|
|
12283
12283
|
}));
|
|
12284
12284
|
k.observe(d);
|
|
12285
|
-
for (const
|
|
12286
|
-
const O = new MutationObserver(((
|
|
12287
|
-
for (const L of
|
|
12285
|
+
for (const N of d.children) k.observe(N);
|
|
12286
|
+
const O = new MutationObserver(((N) => {
|
|
12287
|
+
for (const L of N) Ki(L.target);
|
|
12288
12288
|
}));
|
|
12289
12289
|
O.observe(d, { attributes: !0, attributeFilter: ["style", "class"] });
|
|
12290
12290
|
const F = () => {
|
|
12291
12291
|
C.sourceMeasurements.scrollLeft = d.scrollLeft, C.sourceMeasurements.scrollTop = d.scrollTop;
|
|
12292
|
-
for (const
|
|
12293
|
-
const L =
|
|
12292
|
+
for (const N of C.timelineRefs) {
|
|
12293
|
+
const L = N.deref();
|
|
12294
12294
|
L && cn(L);
|
|
12295
12295
|
}
|
|
12296
12296
|
};
|
|
@@ -12348,9 +12348,9 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12348
12348
|
if (!y || !y.isConnected || this.phase == "inactive") return null;
|
|
12349
12349
|
const S = getComputedStyle(y);
|
|
12350
12350
|
if (S.display === "inline" || S.display === "none") return null;
|
|
12351
|
-
const C = this.axis, k = Ao(y, C), O = (function(F,
|
|
12351
|
+
const C = this.axis, k = Ao(y, C), O = (function(F, N) {
|
|
12352
12352
|
const L = Ve.get(F).sourceMeasurements, q = getComputedStyle(F).writingMode == "horizontal-tb";
|
|
12353
|
-
return
|
|
12353
|
+
return N === "block" ? N = q ? "y" : "x" : N === "inline" && (N = q ? "x" : "y"), N === "y" ? L.scrollHeight - L.clientHeight : N === "x" ? L.scrollWidth - L.clientWidth : void 0;
|
|
12354
12354
|
})(y, C);
|
|
12355
12355
|
return O > 0 ? CSS.percent(100 * k / O) : CSS.percent(100);
|
|
12356
12356
|
}
|
|
@@ -12428,16 +12428,16 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12428
12428
|
}
|
|
12429
12429
|
function os(h, d, y, S, C) {
|
|
12430
12430
|
const k = d.direction == "rtl" || d.writingMode == "vertical-rl";
|
|
12431
|
-
let O, F,
|
|
12432
|
-
qt(S, d) === "x" ? (O = y.offsetWidth, F = y.left,
|
|
12431
|
+
let O, F, N = { fontSize: y.fontSize };
|
|
12432
|
+
qt(S, d) === "x" ? (O = y.offsetWidth, F = y.left, N.scrollPadding = [d.scrollPaddingLeft, d.scrollPaddingRight], k && (F += d.scrollWidth - d.clientWidth, N.scrollPadding = [d.scrollPaddingRight, d.scrollPaddingLeft]), N.containerSize = d.clientWidth) : (O = y.offsetHeight, F = y.top, N.scrollPadding = [d.scrollPaddingTop, d.scrollPaddingBottom], N.containerSize = d.clientHeight);
|
|
12433
12433
|
const L = (function(us, ir) {
|
|
12434
12434
|
const Al = { start: 0, end: 0 };
|
|
12435
12435
|
if (!us) return Al;
|
|
12436
12436
|
const [Ol, zl] = [us.start, us.end].map(((Xo, Yo) => Xo === "auto" ? ir.scrollPadding[Yo] === "auto" ? 0 : parseFloat(ir.scrollPadding[Yo]) : Kr(Xo, { percentageReference: CSS.px(ir.containerSize), fontSize: CSS.px(parseFloat(ir.fontSize)) })));
|
|
12437
12437
|
return { start: Ol, end: zl };
|
|
12438
|
-
})(C,
|
|
12438
|
+
})(C, N), q = F - N.containerSize + L.end, Y = F + O - L.start, K = q + O, ft = Y - O, bt = Math.min(K, ft), Kt = Math.max(K, ft);
|
|
12439
12439
|
let Ce, he;
|
|
12440
|
-
const qo = O >
|
|
12440
|
+
const qo = O > N.containerSize - L.start - L.end;
|
|
12441
12441
|
switch (h) {
|
|
12442
12442
|
case "cover":
|
|
12443
12443
|
Ce = q, he = Y;
|
|
@@ -12459,10 +12459,10 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12459
12459
|
}
|
|
12460
12460
|
return { start: Ce, end: he };
|
|
12461
12461
|
}
|
|
12462
|
-
function
|
|
12462
|
+
function Bo(h, d) {
|
|
12463
12463
|
if (h instanceof wn) {
|
|
12464
12464
|
const { rangeName: y, offset: S } = d;
|
|
12465
|
-
return
|
|
12465
|
+
return No(qn(h, y), S, qn(h, "cover"), h.subject);
|
|
12466
12466
|
}
|
|
12467
12467
|
if (h instanceof Gt) {
|
|
12468
12468
|
const { axis: y, source: S } = h, { sourceMeasurements: C } = Ve.get(S);
|
|
@@ -12471,7 +12471,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12471
12471
|
}
|
|
12472
12472
|
unsupportedTimeline(h);
|
|
12473
12473
|
}
|
|
12474
|
-
function
|
|
12474
|
+
function No(h, d, y, S) {
|
|
12475
12475
|
if (!h || !y) return 0;
|
|
12476
12476
|
let C = getComputedStyle(S);
|
|
12477
12477
|
return (Kr(d, { percentageReference: CSS.px(h.end - h.start), fontSize: CSS.px(parseFloat(C.fontSize)) }) + h.start - y.start) / (y.end - y.start);
|
|
@@ -12624,10 +12624,10 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12624
12624
|
if (S && h.startTime != null && !h.proxy.pending) {
|
|
12625
12625
|
const C = En(h), k = je(h);
|
|
12626
12626
|
let O = h.previousCurrentTime;
|
|
12627
|
-
C > 0 && S >= k && h.previousCurrentTime != null ? ((O === null || O < k) && (O = k), h.holdTime = d ? S : O) : C < 0 && S <= 0 ? ((O == null || O > 0) && (O = 0), h.holdTime = d ? S : O) : C != 0 && (d && h.holdTime !== null && (h.startTime = (function(F,
|
|
12627
|
+
C > 0 && S >= k && h.previousCurrentTime != null ? ((O === null || O < k) && (O = k), h.holdTime = d ? S : O) : C < 0 && S <= 0 ? ((O == null || O > 0) && (O = 0), h.holdTime = d ? S : O) : C != 0 && (d && h.holdTime !== null && (h.startTime = (function(F, N) {
|
|
12628
12628
|
if (!F.timeline) return null;
|
|
12629
12629
|
const L = vt(F, F.timeline.currentTime);
|
|
12630
|
-
return L == null ? null : L -
|
|
12630
|
+
return L == null ? null : L - N / F.animation.playbackRate;
|
|
12631
12631
|
})(h, h.holdTime)), h.holdTime = null);
|
|
12632
12632
|
}
|
|
12633
12633
|
Ge(h), h.previousCurrentTime = vt(h, h.proxy.currentTime), h.proxy.playState == "finished" ? (h.finishedPromise || (h.finishedPromise = new Pn()), h.finishedPromise.state == "pending" && (y ? Vo(h) : Promise.resolve().then((() => {
|
|
@@ -12687,7 +12687,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12687
12687
|
y = CSS.percent(100 * (function(k) {
|
|
12688
12688
|
if (!k.animationRange) return 0;
|
|
12689
12689
|
const O = k.animationRange.start === "normal" ? Wo(k.timeline) : k.animationRange.start;
|
|
12690
|
-
return
|
|
12690
|
+
return Bo(k.timeline, O);
|
|
12691
12691
|
})(h));
|
|
12692
12692
|
} catch (k) {
|
|
12693
12693
|
y = CSS.percent(0), h.animationRange.start = "normal", console.warn("Exception when calculating start offset", k);
|
|
@@ -12696,7 +12696,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12696
12696
|
S = CSS.percent(100 * (1 - (function(k) {
|
|
12697
12697
|
if (!k.animationRange) return 0;
|
|
12698
12698
|
const O = k.animationRange.end === "normal" ? $o(k.timeline) : k.animationRange.end;
|
|
12699
|
-
return 1 -
|
|
12699
|
+
return 1 - Bo(k.timeline, O);
|
|
12700
12700
|
})(h)));
|
|
12701
12701
|
} catch (k) {
|
|
12702
12702
|
S = CSS.percent(100), h.animationRange.end = "normal", console.warn("Exception when calculating end offset", k);
|
|
@@ -12785,13 +12785,13 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12785
12785
|
}
|
|
12786
12786
|
y.specifiedTiming && L.apply(S, [y.specifiedTiming]), L.apply(S, Y), jo(y);
|
|
12787
12787
|
}
|
|
12788
|
-
} },
|
|
12788
|
+
} }, N = new Proxy(S, { get: function(L, q) {
|
|
12789
12789
|
const Y = L[q];
|
|
12790
12790
|
return typeof Y == "function" ? Y.bind(S) : Y;
|
|
12791
12791
|
}, set: function(L, q, Y) {
|
|
12792
12792
|
return L[q] = Y, !0;
|
|
12793
12793
|
} });
|
|
12794
|
-
return
|
|
12794
|
+
return N.getComputedTiming = new Proxy(S.getComputedTiming, k), N.getTiming = new Proxy(S.getTiming, O), N.updateTiming = new Proxy(S.updateTiming, F), N;
|
|
12795
12795
|
})(d)), d.effect) : d.animation.effect;
|
|
12796
12796
|
}
|
|
12797
12797
|
set effect(d) {
|
|
@@ -12808,10 +12808,10 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
12808
12808
|
const C = this.playState, k = this.currentTime;
|
|
12809
12809
|
let O, F = je(y);
|
|
12810
12810
|
O = k === null ? null : F === 0 ? 0 : vt(y, k) / F;
|
|
12811
|
-
const
|
|
12812
|
-
if (
|
|
12811
|
+
const N = S instanceof Gt, L = d instanceof Gt, q = this.pending;
|
|
12812
|
+
if (N && ns(y.timeline, y.animation), L) return y.timeline = d, Re(y), y.autoAlignStartTime = !0, y.startTime = null, y.holdTime = null, C !== "running" && C !== "finished" || (y.readyPromise && y.readyPromise.state !== "resolved" || Xn(y), y.pendingTask = "play", is(y.timeline, y.animation, ls.bind(this))), C === "paused" && O !== null && (y.holdTime = O * F), q && (y.readyPromise && y.readyPromise.state != "resolved" || Xn(y), y.pendingTask = C == "paused" ? "pause" : "play"), y.startTime !== null && (y.holdTime = null), void Je(y, !1, !1);
|
|
12813
12813
|
if (y.animation.timeline != d) throw TypeError("Unsupported timeline: " + d);
|
|
12814
|
-
if (ns(y.timeline, y.animation), y.timeline = null,
|
|
12814
|
+
if (ns(y.timeline, y.animation), y.timeline = null, N) switch (k !== null && (y.animation.currentTime = O * je(y)), C) {
|
|
12815
12815
|
case "paused":
|
|
12816
12816
|
y.animation.pause();
|
|
12817
12817
|
break;
|
|
@@ -13067,9 +13067,9 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13067
13067
|
const y = h.block.contents.includes("animation-name:"), S = h.block.contents.includes("animation-timeline:"), C = h.block.contents.includes("animation:");
|
|
13068
13068
|
if (this.saveSourceSelectorToScrollTimeline(h), this.saveSubjectSelectorToViewTimeline(h), !S && !y && !C) return;
|
|
13069
13069
|
let k = [], O = [], F = !1;
|
|
13070
|
-
S && (k = this.extractScrollTimelineNames(h.block.contents)), y && (O = this.extractMatches(h.block.contents, kt.ANIMATION_NAME)), S && y || (C && this.extractMatches(h.block.contents, kt.ANIMATION).forEach(((
|
|
13071
|
-
const L = this.extractAnimationName(
|
|
13072
|
-
L && S && O.push(L), S && (this.hasDuration(
|
|
13070
|
+
S && (k = this.extractScrollTimelineNames(h.block.contents)), y && (O = this.extractMatches(h.block.contents, kt.ANIMATION_NAME)), S && y || (C && this.extractMatches(h.block.contents, kt.ANIMATION).forEach(((N) => {
|
|
13071
|
+
const L = this.extractAnimationName(N);
|
|
13072
|
+
L && S && O.push(L), S && (this.hasDuration(N) || (this.hasAutoDuration(N) && (h.block.contents = h.block.contents.replace("auto", " ")), h.block.contents = h.block.contents.replace(N, " 1s " + N), F = !0));
|
|
13073
13073
|
})), F && this.replacePart(h.block.startIndex, h.block.endIndex, h.block.contents, d)), this.saveRelationInList(h, k, O);
|
|
13074
13074
|
}
|
|
13075
13075
|
saveSourceSelectorToScrollTimeline(h) {
|
|
@@ -13079,17 +13079,17 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13079
13079
|
if (d) {
|
|
13080
13080
|
const O = this.extractMatches(h.block.contents, kt.SCROLL_TIMELINE);
|
|
13081
13081
|
for (const F of O) {
|
|
13082
|
-
const
|
|
13082
|
+
const N = this.split(F);
|
|
13083
13083
|
let L = { selector: h.selector, name: "" };
|
|
13084
|
-
|
|
13084
|
+
N.length == 1 ? L.name = N[0] : N.length == 2 && (kn.includes(N[0]) ? (L.axis = N[0], L.name = N[1]) : (L.axis = N[1], L.name = N[0])), C.push(L);
|
|
13085
13085
|
}
|
|
13086
13086
|
}
|
|
13087
13087
|
if (y) {
|
|
13088
13088
|
const O = this.extractMatches(h.block.contents, kt.SCROLL_TIMELINE_NAME);
|
|
13089
13089
|
for (let F = 0; F < O.length; F++) if (F < C.length) C[F].name = O[F];
|
|
13090
13090
|
else {
|
|
13091
|
-
let
|
|
13092
|
-
C.push(
|
|
13091
|
+
let N = { selector: h.selector, name: O[F] };
|
|
13092
|
+
C.push(N);
|
|
13093
13093
|
}
|
|
13094
13094
|
}
|
|
13095
13095
|
let k = [];
|
|
@@ -13105,27 +13105,27 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13105
13105
|
if (!d && !y) return;
|
|
13106
13106
|
let k = [];
|
|
13107
13107
|
if (d) {
|
|
13108
|
-
const
|
|
13109
|
-
for (let L of
|
|
13108
|
+
const N = this.extractMatches(h.block.contents, kt.VIEW_TIMELINE);
|
|
13109
|
+
for (let L of N) {
|
|
13110
13110
|
const q = this.split(L);
|
|
13111
13111
|
let Y = { selector: h.selector, name: "", inset: null };
|
|
13112
13112
|
q.length == 1 ? Y.name = q[0] : q.length == 2 && (kn.includes(q[0]) ? (Y.axis = q[0], Y.name = q[1]) : (Y.axis = q[1], Y.name = q[0])), k.push(Y);
|
|
13113
13113
|
}
|
|
13114
13114
|
}
|
|
13115
13115
|
if (y) {
|
|
13116
|
-
const
|
|
13117
|
-
for (let L = 0; L <
|
|
13116
|
+
const N = this.extractMatches(h.block.contents, kt.VIEW_TIMELINE_NAME);
|
|
13117
|
+
for (let L = 0; L < N.length; L++) if (L < k.length) k[L].name = N[L];
|
|
13118
13118
|
else {
|
|
13119
|
-
let q = { selector: h.selector, name:
|
|
13119
|
+
let q = { selector: h.selector, name: N[L], inset: null };
|
|
13120
13120
|
k.push(q);
|
|
13121
13121
|
}
|
|
13122
13122
|
}
|
|
13123
13123
|
let O = [], F = [];
|
|
13124
13124
|
if (C && (O = this.extractMatches(h.block.contents, kt.VIEW_TIMELINE_INSET)), S) {
|
|
13125
|
-
const
|
|
13126
|
-
if (F =
|
|
13125
|
+
const N = this.extractMatches(h.block.contents, kt.VIEW_TIMELINE_AXIS);
|
|
13126
|
+
if (F = N.filter(((L) => kn.includes(L))), F.length != N.length) throw new Error("Invalid axis");
|
|
13127
13127
|
}
|
|
13128
|
-
for (let
|
|
13128
|
+
for (let N = 0; N < k.length; N++) O.length && (k[N].inset = O[N % k.length]), F.length && (k[N].axis = F[N % k.length]);
|
|
13129
13129
|
this.subjectSelectorToViewTimeline.push(...k);
|
|
13130
13130
|
}
|
|
13131
13131
|
hasDuration(h) {
|
|
@@ -13196,13 +13196,13 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13196
13196
|
}
|
|
13197
13197
|
}
|
|
13198
13198
|
replaceKeyframesAndGetMapping(h, d) {
|
|
13199
|
-
function y(
|
|
13200
|
-
return Zi.some(((L) =>
|
|
13199
|
+
function y(N) {
|
|
13200
|
+
return Zi.some(((L) => N.startsWith(L)));
|
|
13201
13201
|
}
|
|
13202
|
-
const S = h.block.contents, C = (function(
|
|
13202
|
+
const S = h.block.contents, C = (function(N) {
|
|
13203
13203
|
let L = 0, q = -1, Y = -1;
|
|
13204
13204
|
const K = [];
|
|
13205
|
-
for (let ft = 0; ft <
|
|
13205
|
+
for (let ft = 0; ft < N.length; ft++) N[ft] == "{" ? L++ : N[ft] == "}" && L--, L == 1 && N[ft] != "{" && N[ft] != "}" && q == -1 && (q = ft), L == 2 && N[ft] == "{" && (Y = ft, K.push({ start: q, end: Y }), q = Y = -1);
|
|
13206
13206
|
return K;
|
|
13207
13207
|
})(S);
|
|
13208
13208
|
if (C.length == 0) return /* @__PURE__ */ new Map();
|
|
@@ -13210,13 +13210,13 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13210
13210
|
let O = !1;
|
|
13211
13211
|
const F = [];
|
|
13212
13212
|
F.push(S.substring(0, C[0].start));
|
|
13213
|
-
for (let
|
|
13214
|
-
const L = S.substring(C[
|
|
13213
|
+
for (let N = 0; N < C.length; N++) {
|
|
13214
|
+
const L = S.substring(C[N].start, C[N].end);
|
|
13215
13215
|
let q = [];
|
|
13216
13216
|
L.split(",").forEach(((Y) => {
|
|
13217
13217
|
const K = Y.split(" ").map(((bt) => bt.trim())).filter(((bt) => bt != "")).join(" "), ft = k.size;
|
|
13218
13218
|
k.set(ft, K), q.push(`${ft}%`), y(K) && (O = !0);
|
|
13219
|
-
})), F.push(q.join(",")),
|
|
13219
|
+
})), F.push(q.join(",")), N == C.length - 1 ? F.push(S.substring(C[N].end)) : F.push(S.substring(C[N].end, C[N + 1].start));
|
|
13220
13220
|
}
|
|
13221
13221
|
return O ? (h.block.contents = F.join(""), this.replacePart(h.block.startIndex, h.block.endIndex, h.block.contents, d), k) : /* @__PURE__ */ new Map();
|
|
13222
13222
|
}
|
|
@@ -13286,7 +13286,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13286
13286
|
}();
|
|
13287
13287
|
function El(h, d, y, S, C, k) {
|
|
13288
13288
|
const O = ts(d), F = es(d, y);
|
|
13289
|
-
return
|
|
13289
|
+
return No(os(h, O, F, S, C), k, os("cover", O, F, S, C), y);
|
|
13290
13290
|
}
|
|
13291
13291
|
function kl(h, d, y) {
|
|
13292
13292
|
const S = Ke.getAnimationTimelineOptions(d, y);
|
|
@@ -13295,7 +13295,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13295
13295
|
if (!C) return null;
|
|
13296
13296
|
let k = Ke.getScrollTimelineOptions(C, y) || Ke.getViewTimelineOptions(C, y);
|
|
13297
13297
|
return k ? (k.subject && (function(O, F) {
|
|
13298
|
-
const
|
|
13298
|
+
const N = ss(F.subject), L = F.axis || F.axis;
|
|
13299
13299
|
function q(K, ft) {
|
|
13300
13300
|
let bt = null;
|
|
13301
13301
|
for (const [Kt, Ce] of K) if (Kt == 100 * ft.offset) {
|
|
@@ -13303,7 +13303,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13303
13303
|
else if (Ce == "to") bt = 100;
|
|
13304
13304
|
else {
|
|
13305
13305
|
const he = Ce.split(" ");
|
|
13306
|
-
bt = he.length == 1 ? parseFloat(he[0]) : 100 * El(he[0],
|
|
13306
|
+
bt = he.length == 1 ? parseFloat(he[0]) : 100 * El(he[0], N, F.subject, L, F.inset, CSS.percent(parseFloat(he[1])));
|
|
13307
13307
|
}
|
|
13308
13308
|
break;
|
|
13309
13309
|
}
|
|
@@ -13334,8 +13334,8 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13334
13334
|
const k = await C.text();
|
|
13335
13335
|
let O = Ke.transpileStyleSheet(k, !0);
|
|
13336
13336
|
if (O = Ke.transpileStyleSheet(k, !1), O != k) {
|
|
13337
|
-
const F = new Blob([O], { type: "text/css" }),
|
|
13338
|
-
S.setAttribute("href",
|
|
13337
|
+
const F = new Blob([O], { type: "text/css" }), N = URL.createObjectURL(F);
|
|
13338
|
+
S.setAttribute("href", N);
|
|
13339
13339
|
}
|
|
13340
13340
|
}));
|
|
13341
13341
|
}
|
|
@@ -13366,7 +13366,7 @@ var sf = Object.defineProperty, of = (r, t, e) => t in r ? sf(r, t, { enumerable
|
|
|
13366
13366
|
}
|
|
13367
13367
|
})();
|
|
13368
13368
|
})();
|
|
13369
|
-
class
|
|
13369
|
+
class cf {
|
|
13370
13370
|
/**
|
|
13371
13371
|
* Creates a new ExponentialBackoff.
|
|
13372
13372
|
* @param base the base of the exponentiation
|
|
@@ -13673,7 +13673,7 @@ class al {
|
|
|
13673
13673
|
globalThis.clearTimeout(this.retryTimeout);
|
|
13674
13674
|
}
|
|
13675
13675
|
}
|
|
13676
|
-
class
|
|
13676
|
+
class lf {
|
|
13677
13677
|
/**
|
|
13678
13678
|
* Creates a new WebsocketBuilder.
|
|
13679
13679
|
*
|
|
@@ -13870,25 +13870,25 @@ class cf {
|
|
|
13870
13870
|
}
|
|
13871
13871
|
const Nd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13872
13872
|
__proto__: null,
|
|
13873
|
-
ExponentialBackoff:
|
|
13873
|
+
ExponentialBackoff: cf,
|
|
13874
13874
|
Websocket: al,
|
|
13875
|
-
WebsocketBuilder:
|
|
13875
|
+
WebsocketBuilder: lf,
|
|
13876
13876
|
get WebsocketEvent() {
|
|
13877
13877
|
return st;
|
|
13878
13878
|
}
|
|
13879
|
-
}, Symbol.toStringTag, { value: "Module" })), wo = 0, cl = 1, ll = 2, so = 2, Rs = 1.25, Da = 1, pi = 32, Xr = 65535,
|
|
13880
|
-
function
|
|
13879
|
+
}, Symbol.toStringTag, { value: "Module" })), wo = 0, cl = 1, ll = 2, so = 2, Rs = 1.25, Da = 1, pi = 32, Xr = 65535, uf = Math.pow(2, -24), As = Symbol("SKIP_GENERATION");
|
|
13880
|
+
function hf(r) {
|
|
13881
13881
|
return r.index ? r.index.count : r.attributes.position.count;
|
|
13882
13882
|
}
|
|
13883
13883
|
function Hn(r) {
|
|
13884
|
-
return
|
|
13884
|
+
return hf(r) / 3;
|
|
13885
13885
|
}
|
|
13886
|
-
function
|
|
13886
|
+
function ff(r, t = ArrayBuffer) {
|
|
13887
13887
|
return r > 65535 ? new Uint32Array(new t(4 * r)) : new Uint16Array(new t(2 * r));
|
|
13888
13888
|
}
|
|
13889
|
-
function
|
|
13889
|
+
function df(r, t) {
|
|
13890
13890
|
if (!r.index) {
|
|
13891
|
-
const e = r.attributes.position.count, n = t.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, i =
|
|
13891
|
+
const e = r.attributes.position.count, n = t.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, i = ff(e, n);
|
|
13892
13892
|
r.setIndex(new se(i, 1));
|
|
13893
13893
|
for (let s = 0; s < e; s++)
|
|
13894
13894
|
i[s] = s;
|
|
@@ -13919,7 +13919,7 @@ function hl(r, t) {
|
|
|
13919
13919
|
}
|
|
13920
13920
|
return e;
|
|
13921
13921
|
}
|
|
13922
|
-
function
|
|
13922
|
+
function pf(r, t) {
|
|
13923
13923
|
const e = Hn(r), n = hl(r, t).sort((a, o) => a.offset - o.offset), i = n[n.length - 1];
|
|
13924
13924
|
i.count = Math.min(e - i.offset, i.count);
|
|
13925
13925
|
let s = 0;
|
|
@@ -13932,12 +13932,12 @@ function Os(r, t, e, n, i) {
|
|
|
13932
13932
|
M < s && (s = M), P > c && (c = P), _ < f && (f = _), _ > x && (x = _);
|
|
13933
13933
|
const E = r[v + 2], z = r[v + 3], A = E - z, R = E + z;
|
|
13934
13934
|
A < a && (a = A), R > l && (l = R), E < p && (p = E), E > T && (T = E);
|
|
13935
|
-
const
|
|
13936
|
-
U < o && (o = U), D > u && (u = D),
|
|
13935
|
+
const B = r[v + 4], I = r[v + 5], U = B - I, D = B + I;
|
|
13936
|
+
U < o && (o = U), D > u && (u = D), B < m && (m = B), B > g && (g = B);
|
|
13937
13937
|
}
|
|
13938
13938
|
n[0] = s, n[1] = a, n[2] = o, n[3] = c, n[4] = l, n[5] = u, i[0] = f, i[1] = p, i[2] = m, i[3] = x, i[4] = T, i[5] = g;
|
|
13939
13939
|
}
|
|
13940
|
-
function
|
|
13940
|
+
function mf(r, t = null, e = null, n = null) {
|
|
13941
13941
|
const i = r.attributes.position, s = r.index ? r.index.array : null, a = Hn(r), o = i.normalized;
|
|
13942
13942
|
let c;
|
|
13943
13943
|
t === null ? (c = new Float32Array(a * 6), e = 0, n = a) : (c = t, e = e || 0, n = n || a);
|
|
@@ -13957,7 +13957,7 @@ function pf(r, t = null, e = null, n = null) {
|
|
|
13957
13957
|
let z = w;
|
|
13958
13958
|
M > z && (z = M), P > z && (z = P);
|
|
13959
13959
|
const A = (z - E) / 2, R = _ * 2;
|
|
13960
|
-
c[T + R + 0] = E + A, c[T + R + 1] = A + (Math.abs(E) + A) *
|
|
13960
|
+
c[T + R + 0] = E + A, c[T + R + 1] = A + (Math.abs(E) + A) * uf;
|
|
13961
13961
|
}
|
|
13962
13962
|
}
|
|
13963
13963
|
return c;
|
|
@@ -13993,19 +13993,19 @@ function Qn(r) {
|
|
|
13993
13993
|
const t = r[3] - r[0], e = r[4] - r[1], n = r[5] - r[2];
|
|
13994
13994
|
return 2 * (t * e + e * n + n * t);
|
|
13995
13995
|
}
|
|
13996
|
-
const We = 32,
|
|
13996
|
+
const We = 32, yf = (r, t) => r.candidate - t.candidate, en = new Array(We).fill().map(() => ({
|
|
13997
13997
|
count: 0,
|
|
13998
13998
|
bounds: new Float32Array(6),
|
|
13999
13999
|
rightCacheBounds: new Float32Array(6),
|
|
14000
14000
|
leftCacheBounds: new Float32Array(6),
|
|
14001
14001
|
candidate: 0
|
|
14002
14002
|
})), pr = new Float32Array(6);
|
|
14003
|
-
function
|
|
14003
|
+
function gf(r, t, e, n, i, s) {
|
|
14004
14004
|
let a = -1, o = 0;
|
|
14005
14005
|
if (s === wo)
|
|
14006
14006
|
a = La(t), a !== -1 && (o = (t[a] + t[a + 3]) / 2);
|
|
14007
14007
|
else if (s === cl)
|
|
14008
|
-
a = La(r), a !== -1 && (o =
|
|
14008
|
+
a = La(r), a !== -1 && (o = vf(e, n, i, a));
|
|
14009
14009
|
else if (s === ll) {
|
|
14010
14010
|
const c = Qn(r);
|
|
14011
14011
|
let l = Rs * i;
|
|
@@ -14028,7 +14028,7 @@ function yf(r, t, e, n, i, s) {
|
|
|
14028
14028
|
z[A] = 1 / 0, z[A + 3] = -1 / 0, E[A] = 1 / 0, E[A + 3] = -1 / 0, P[A] = 1 / 0, P[A + 3] = -1 / 0;
|
|
14029
14029
|
dr(w, e, P);
|
|
14030
14030
|
}
|
|
14031
|
-
v.sort(
|
|
14031
|
+
v.sort(yf);
|
|
14032
14032
|
let _ = i;
|
|
14033
14033
|
for (let w = 0; w < _; w++) {
|
|
14034
14034
|
const M = v[w];
|
|
@@ -14046,9 +14046,9 @@ function yf(r, t, e, n, i, s) {
|
|
|
14046
14046
|
const M = v[w], P = M.count, E = i - M.count, z = M.leftCacheBounds, A = M.rightCacheBounds;
|
|
14047
14047
|
let R = 0;
|
|
14048
14048
|
P !== 0 && (R = Qn(z) / c);
|
|
14049
|
-
let
|
|
14050
|
-
E !== 0 && (
|
|
14051
|
-
const I = Da + Rs * (R * P +
|
|
14049
|
+
let B = 0;
|
|
14050
|
+
E !== 0 && (B = Qn(A) / c);
|
|
14051
|
+
const I = Da + Rs * (R * P + B * E);
|
|
14052
14052
|
I < l && (a = p, l = I, o = M.candidate);
|
|
14053
14053
|
}
|
|
14054
14054
|
} else {
|
|
@@ -14077,9 +14077,9 @@ function yf(r, t, e, n, i, s) {
|
|
|
14077
14077
|
M !== 0 && (b === 0 ? Va(P, pr) : Ja(P, pr, pr)), b += M;
|
|
14078
14078
|
let A = 0, R = 0;
|
|
14079
14079
|
b !== 0 && (A = Qn(pr) / c);
|
|
14080
|
-
const
|
|
14081
|
-
|
|
14082
|
-
const I = Da + Rs * (A * b + R *
|
|
14080
|
+
const B = i - b;
|
|
14081
|
+
B !== 0 && (R = Qn(z) / c);
|
|
14082
|
+
const I = Da + Rs * (A * b + R * B);
|
|
14083
14083
|
I < l && (a = p, l = I, o = w.candidate);
|
|
14084
14084
|
}
|
|
14085
14085
|
}
|
|
@@ -14088,7 +14088,7 @@ function yf(r, t, e, n, i, s) {
|
|
|
14088
14088
|
console.warn(`MeshBVH: Invalid build strategy value ${s} used.`);
|
|
14089
14089
|
return { axis: a, pos: o };
|
|
14090
14090
|
}
|
|
14091
|
-
function
|
|
14091
|
+
function vf(r, t, e, n) {
|
|
14092
14092
|
let i = 0;
|
|
14093
14093
|
for (let s = t, a = t + e; s < a; s++)
|
|
14094
14094
|
i += r[s * 6 + n * 2];
|
|
@@ -14099,7 +14099,7 @@ class zs {
|
|
|
14099
14099
|
this.boundingData = new Float32Array(6);
|
|
14100
14100
|
}
|
|
14101
14101
|
}
|
|
14102
|
-
function
|
|
14102
|
+
function Sf(r, t, e, n, i, s) {
|
|
14103
14103
|
let a = n, o = n + i - 1;
|
|
14104
14104
|
const c = s.pos, l = s.axis * 2;
|
|
14105
14105
|
for (; ; ) {
|
|
@@ -14121,7 +14121,7 @@ function vf(r, t, e, n, i, s) {
|
|
|
14121
14121
|
return a;
|
|
14122
14122
|
}
|
|
14123
14123
|
}
|
|
14124
|
-
function
|
|
14124
|
+
function xf(r, t, e, n, i, s) {
|
|
14125
14125
|
let a = n, o = n + i - 1;
|
|
14126
14126
|
const c = s.pos, l = s.axis * 2;
|
|
14127
14127
|
for (; ; ) {
|
|
@@ -14159,13 +14159,13 @@ function me(r, t) {
|
|
|
14159
14159
|
function fl(r, t) {
|
|
14160
14160
|
return t[r + 7];
|
|
14161
14161
|
}
|
|
14162
|
-
let dl, ui,
|
|
14163
|
-
const
|
|
14162
|
+
let dl, ui, Br, pl;
|
|
14163
|
+
const _f = Math.pow(2, 32);
|
|
14164
14164
|
function oo(r) {
|
|
14165
14165
|
return "count" in r ? 1 : 1 + oo(r.left) + oo(r.right);
|
|
14166
14166
|
}
|
|
14167
|
-
function
|
|
14168
|
-
return dl = new Float32Array(e), ui = new Uint32Array(e),
|
|
14167
|
+
function bf(r, t, e) {
|
|
14168
|
+
return dl = new Float32Array(e), ui = new Uint32Array(e), Br = new Uint16Array(e), pl = new Uint8Array(e), ao(r, t);
|
|
14169
14169
|
}
|
|
14170
14170
|
function ao(r, t) {
|
|
14171
14171
|
const e = r / 4, n = r / 2, i = "count" in t, s = t.boundingData;
|
|
@@ -14177,28 +14177,28 @@ function ao(r, t) {
|
|
|
14177
14177
|
pl.set(new Uint8Array(a), r);
|
|
14178
14178
|
for (let o = r, c = r + a.byteLength; o < c; o += pi) {
|
|
14179
14179
|
const l = o / 2;
|
|
14180
|
-
te(l,
|
|
14180
|
+
te(l, Br) || (ui[o / 4 + 6] += e);
|
|
14181
14181
|
}
|
|
14182
14182
|
return r + a.byteLength;
|
|
14183
14183
|
} else {
|
|
14184
14184
|
const a = t.offset, o = t.count;
|
|
14185
|
-
return ui[e + 6] = a,
|
|
14185
|
+
return ui[e + 6] = a, Br[n + 14] = o, Br[n + 15] = Xr, r + pi;
|
|
14186
14186
|
}
|
|
14187
14187
|
else {
|
|
14188
14188
|
const a = t.left, o = t.right, c = t.splitAxis;
|
|
14189
14189
|
let l;
|
|
14190
|
-
if (l = ao(r + pi, a), l / 4 >
|
|
14190
|
+
if (l = ao(r + pi, a), l / 4 > _f)
|
|
14191
14191
|
throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
|
|
14192
14192
|
return ui[e + 6] = l / 4, l = ao(l, o), ui[e + 7] = c, l;
|
|
14193
14193
|
}
|
|
14194
14194
|
}
|
|
14195
|
-
function
|
|
14195
|
+
function Tf(r, t) {
|
|
14196
14196
|
const e = (r.index ? r.index.count : r.attributes.position.count) / 3, n = e > 2 ** 16, i = n ? 4 : 2, s = t ? new SharedArrayBuffer(e * i) : new ArrayBuffer(e * i), a = n ? new Uint32Array(s) : new Uint16Array(s);
|
|
14197
14197
|
for (let o = 0, c = a.length; o < c; o++)
|
|
14198
14198
|
a[o] = o;
|
|
14199
14199
|
return a;
|
|
14200
14200
|
}
|
|
14201
|
-
function
|
|
14201
|
+
function Cf(r, t, e, n, i) {
|
|
14202
14202
|
const {
|
|
14203
14203
|
maxDepth: s,
|
|
14204
14204
|
verbose: a,
|
|
@@ -14206,7 +14206,7 @@ function Tf(r, t, e, n, i) {
|
|
|
14206
14206
|
strategy: c,
|
|
14207
14207
|
onProgress: l,
|
|
14208
14208
|
indirect: u
|
|
14209
|
-
} = i, f = r._indirectBuffer, p = r.geometry, m = p.index ? p.index.array : null, x = u ?
|
|
14209
|
+
} = i, f = r._indirectBuffer, p = r.geometry, m = p.index ? p.index.array : null, x = u ? xf : Sf, T = Hn(p), g = new Float32Array(6);
|
|
14210
14210
|
let v = !1;
|
|
14211
14211
|
const b = new zs();
|
|
14212
14212
|
return Os(t, e, n, b.boundingData, g), w(b, e, n, g), b;
|
|
@@ -14216,31 +14216,31 @@ function Tf(r, t, e, n, i) {
|
|
|
14216
14216
|
function w(M, P, E, z = null, A = 0) {
|
|
14217
14217
|
if (!v && A >= s && (v = !0, a && (console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`), console.warn(p))), E <= o || A >= s)
|
|
14218
14218
|
return _(P + E), M.offset = P, M.count = E, M;
|
|
14219
|
-
const R =
|
|
14219
|
+
const R = gf(M.boundingData, z, t, P, E, c);
|
|
14220
14220
|
if (R.axis === -1)
|
|
14221
14221
|
return _(P + E), M.offset = P, M.count = E, M;
|
|
14222
|
-
const
|
|
14223
|
-
if (
|
|
14222
|
+
const B = x(f, m, t, P, E, R);
|
|
14223
|
+
if (B === P || B === P + E)
|
|
14224
14224
|
_(P + E), M.offset = P, M.count = E;
|
|
14225
14225
|
else {
|
|
14226
14226
|
M.splitAxis = R.axis;
|
|
14227
|
-
const I = new zs(), U = P, D =
|
|
14227
|
+
const I = new zs(), U = P, D = B - P;
|
|
14228
14228
|
M.left = I, Os(t, U, D, I.boundingData, g), w(I, U, D, g, A + 1);
|
|
14229
|
-
const V = new zs(), $ =
|
|
14229
|
+
const V = new zs(), $ = B, Z = E - D;
|
|
14230
14230
|
M.right = V, Os(t, $, Z, V.boundingData, g), w(V, $, Z, g, A + 1);
|
|
14231
14231
|
}
|
|
14232
14232
|
return M;
|
|
14233
14233
|
}
|
|
14234
14234
|
}
|
|
14235
|
-
function
|
|
14235
|
+
function Mf(r, t) {
|
|
14236
14236
|
const e = r.geometry;
|
|
14237
|
-
t.indirect && (r._indirectBuffer =
|
|
14237
|
+
t.indirect && (r._indirectBuffer = Tf(e, t.useSharedArrayBuffer), pf(e, t.range) && !t.verbose && console.warn(
|
|
14238
14238
|
'MeshBVH: Provided geometry contains groups or a range that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.'
|
|
14239
|
-
)), r._indirectBuffer ||
|
|
14240
|
-
const n = t.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, i =
|
|
14239
|
+
)), r._indirectBuffer || df(e, t);
|
|
14240
|
+
const n = t.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, i = mf(e), s = t.indirect ? ul(e, t.range) : hl(e, t.range);
|
|
14241
14241
|
r._roots = s.map((a) => {
|
|
14242
|
-
const o =
|
|
14243
|
-
return
|
|
14242
|
+
const o = Cf(r, i, a.offset, a.count, t), c = oo(o), l = new n(pi * c);
|
|
14243
|
+
return bf(0, o, l), l;
|
|
14244
14244
|
});
|
|
14245
14245
|
}
|
|
14246
14246
|
class Ze {
|
|
@@ -14282,7 +14282,7 @@ Ze.prototype.setFromBox = (function() {
|
|
|
14282
14282
|
this.min = a, this.max = o;
|
|
14283
14283
|
};
|
|
14284
14284
|
})();
|
|
14285
|
-
const
|
|
14285
|
+
const wf = (function() {
|
|
14286
14286
|
const r = new H(), t = new H(), e = new H();
|
|
14287
14287
|
return function(i, s, a) {
|
|
14288
14288
|
const o = i.start, c = r, l = s.start, u = t;
|
|
@@ -14294,7 +14294,7 @@ const Mf = (function() {
|
|
|
14294
14294
|
})(), Po = (function() {
|
|
14295
14295
|
const r = new Ln(), t = new H(), e = new H();
|
|
14296
14296
|
return function(i, s, a, o) {
|
|
14297
|
-
|
|
14297
|
+
wf(i, s, r);
|
|
14298
14298
|
let c = r.x, l = r.y;
|
|
14299
14299
|
if (c >= 0 && c <= 1 && l >= 0 && l <= 1) {
|
|
14300
14300
|
i.at(c, a), s.at(l, o);
|
|
@@ -14320,7 +14320,7 @@ const Mf = (function() {
|
|
|
14320
14320
|
}
|
|
14321
14321
|
}
|
|
14322
14322
|
};
|
|
14323
|
-
})(),
|
|
14323
|
+
})(), Pf = (function() {
|
|
14324
14324
|
const r = new H(), t = new H(), e = new cc(), n = new Xe();
|
|
14325
14325
|
return function(s, a) {
|
|
14326
14326
|
const { radius: o, center: c } = s, { a: l, b: u, c: f } = a;
|
|
@@ -14332,16 +14332,16 @@ const Mf = (function() {
|
|
|
14332
14332
|
}
|
|
14333
14333
|
return !1;
|
|
14334
14334
|
};
|
|
14335
|
-
})(),
|
|
14335
|
+
})(), Ef = 1e-15;
|
|
14336
14336
|
function Is(r) {
|
|
14337
|
-
return Math.abs(r) <
|
|
14337
|
+
return Math.abs(r) < Ef;
|
|
14338
14338
|
}
|
|
14339
14339
|
class ge extends xn {
|
|
14340
14340
|
constructor(...t) {
|
|
14341
14341
|
super(...t), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new H()), this.satBounds = new Array(4).fill().map(() => new Ze()), this.points = [this.a, this.b, this.c], this.sphere = new lc(), this.plane = new cc(), this.needsUpdate = !0;
|
|
14342
14342
|
}
|
|
14343
14343
|
intersectsSphere(t) {
|
|
14344
|
-
return
|
|
14344
|
+
return Pf(t, this);
|
|
14345
14345
|
}
|
|
14346
14346
|
update() {
|
|
14347
14347
|
const t = this.a, e = this.b, n = this.c, i = this.points, s = this.satAxes, a = this.satBounds, o = s[0], c = a[0];
|
|
@@ -14400,19 +14400,19 @@ ge.prototype.intersectsTriangle = (function() {
|
|
|
14400
14400
|
const M = this.satBounds, P = this.satAxes;
|
|
14401
14401
|
e[0] = g.a, e[1] = g.b, e[2] = g.c;
|
|
14402
14402
|
for (let A = 0; A < 4; A++) {
|
|
14403
|
-
const R = M[A],
|
|
14404
|
-
if (n.setFromPoints(
|
|
14403
|
+
const R = M[A], B = P[A];
|
|
14404
|
+
if (n.setFromPoints(B, e), R.isSeparated(n)) return !1;
|
|
14405
14405
|
}
|
|
14406
14406
|
const E = g.satBounds, z = g.satAxes;
|
|
14407
14407
|
t[0] = this.a, t[1] = this.b, t[2] = this.c;
|
|
14408
14408
|
for (let A = 0; A < 4; A++) {
|
|
14409
|
-
const R = E[A],
|
|
14410
|
-
if (n.setFromPoints(
|
|
14409
|
+
const R = E[A], B = z[A];
|
|
14410
|
+
if (n.setFromPoints(B, t), R.isSeparated(n)) return !1;
|
|
14411
14411
|
}
|
|
14412
14412
|
for (let A = 0; A < 4; A++) {
|
|
14413
14413
|
const R = P[A];
|
|
14414
|
-
for (let
|
|
14415
|
-
const I = z[
|
|
14414
|
+
for (let B = 0; B < 4; B++) {
|
|
14415
|
+
const I = z[B];
|
|
14416
14416
|
if (s.crossVectors(R, I), n.setFromPoints(s, t), i.setFromPoints(s, e), n.isSeparated(i)) return !1;
|
|
14417
14417
|
}
|
|
14418
14418
|
}
|
|
@@ -14432,8 +14432,8 @@ ge.prototype.intersectsTriangle = (function() {
|
|
|
14432
14432
|
let U = p.start;
|
|
14433
14433
|
p.start = p.end, p.end = U;
|
|
14434
14434
|
}
|
|
14435
|
-
const E = f.start.dot(o), z = f.end.dot(o), A = p.start.dot(o), R = p.end.dot(o),
|
|
14436
|
-
return E !== R && A !== z &&
|
|
14435
|
+
const E = f.start.dot(o), z = f.end.dot(o), A = p.start.dot(o), R = p.end.dot(o), B = z < A, I = E < R;
|
|
14436
|
+
return E !== R && A !== z && B === I ? !1 : (v && (l.subVectors(f.start, p.start), l.dot(o) > 0 ? v.start.copy(f.start) : v.start.copy(p.start), l.subVectors(f.end, p.end), l.dot(o) < 0 ? v.end.copy(f.end) : v.end.copy(p.end)), !0);
|
|
14437
14437
|
}
|
|
14438
14438
|
};
|
|
14439
14439
|
})();
|
|
@@ -14568,8 +14568,8 @@ Vt.prototype.distanceToBox = (function() {
|
|
|
14568
14568
|
for (let b = 0; b <= 1; b++) {
|
|
14569
14569
|
const _ = (g + 1) % 3, w = (g + 2) % 3, M = v << _ | b << w, P = 1 << g | v << _ | b << w, E = m[M], z = m[P];
|
|
14570
14570
|
t[T].set(E, z);
|
|
14571
|
-
const R = r[g],
|
|
14572
|
-
D[R] = f[R], D[
|
|
14571
|
+
const R = r[g], B = r[_], I = r[w], U = e[T], D = U.start, V = U.end;
|
|
14572
|
+
D[R] = f[R], D[B] = v ? f[B] : p[B], D[I] = b ? f[I] : p[B], V[R] = p[R], V[B] = v ? f[B] : p[B], V[I] = b ? f[I] : p[B], T++;
|
|
14573
14573
|
}
|
|
14574
14574
|
for (let g = 0; g <= 1; g++)
|
|
14575
14575
|
for (let v = 0; v <= 1; v++)
|
|
@@ -14604,13 +14604,13 @@ class Eo {
|
|
|
14604
14604
|
this._primitives.push(t);
|
|
14605
14605
|
}
|
|
14606
14606
|
}
|
|
14607
|
-
class
|
|
14607
|
+
class kf extends Eo {
|
|
14608
14608
|
constructor() {
|
|
14609
14609
|
super(() => new ge());
|
|
14610
14610
|
}
|
|
14611
14611
|
}
|
|
14612
|
-
const ye = /* @__PURE__ */ new
|
|
14613
|
-
class
|
|
14612
|
+
const ye = /* @__PURE__ */ new kf();
|
|
14613
|
+
class Rf {
|
|
14614
14614
|
constructor() {
|
|
14615
14615
|
this.float32Array = null, this.uint16Array = null, this.uint32Array = null;
|
|
14616
14616
|
const t = [];
|
|
@@ -14622,10 +14622,10 @@ class kf {
|
|
|
14622
14622
|
};
|
|
14623
14623
|
}
|
|
14624
14624
|
}
|
|
14625
|
-
const dt = new
|
|
14625
|
+
const dt = new Rf();
|
|
14626
14626
|
let on, Dn;
|
|
14627
14627
|
const An = [], mr = /* @__PURE__ */ new Eo(() => new Ue());
|
|
14628
|
-
function
|
|
14628
|
+
function Af(r, t, e, n, i, s) {
|
|
14629
14629
|
on = mr.getPrimitive(), Dn = mr.getPrimitive(), An.push(on, Dn), dt.setBuffer(r._roots[t]);
|
|
14630
14630
|
const a = co(0, r.geometry, e, n, i, s);
|
|
14631
14631
|
dt.clearBuffer(), mr.releasePrimitive(on), mr.releasePrimitive(Dn), An.pop(), An.pop();
|
|
@@ -14645,7 +14645,7 @@ function co(r, t, e, n, i = null, s = 0, a = 0) {
|
|
|
14645
14645
|
for (; !te(V, U); )
|
|
14646
14646
|
I = pe(I), V = I * 2;
|
|
14647
14647
|
return oe(I, D);
|
|
14648
|
-
},
|
|
14648
|
+
}, B = function(I) {
|
|
14649
14649
|
const { uint16Array: U, uint32Array: D } = dt;
|
|
14650
14650
|
let V = I * 2;
|
|
14651
14651
|
for (; !te(V, U); )
|
|
@@ -14663,7 +14663,7 @@ function co(r, t, e, n, i = null, s = 0, a = 0) {
|
|
|
14663
14663
|
const w = te(x * 2, c), M = e(b, w, g, a + 1, s + x);
|
|
14664
14664
|
let P;
|
|
14665
14665
|
if (M === so) {
|
|
14666
|
-
const I = R(x), D =
|
|
14666
|
+
const I = R(x), D = B(x) - I;
|
|
14667
14667
|
P = n(I, D, !0, a + 1, s + x, b);
|
|
14668
14668
|
} else
|
|
14669
14669
|
P = M && co(
|
|
@@ -14680,7 +14680,7 @@ function co(r, t, e, n, i = null, s = 0, a = 0) {
|
|
|
14680
14680
|
const E = te(T * 2, c), z = e(_, E, v, a + 1, s + T);
|
|
14681
14681
|
let A;
|
|
14682
14682
|
if (z === so) {
|
|
14683
|
-
const I = R(T), D =
|
|
14683
|
+
const I = R(T), D = B(T) - I;
|
|
14684
14684
|
A = n(I, D, !0, a + 1, s + T, _);
|
|
14685
14685
|
} else
|
|
14686
14686
|
A = z && co(
|
|
@@ -14695,8 +14695,8 @@ function co(r, t, e, n, i = null, s = 0, a = 0) {
|
|
|
14695
14695
|
return !!A;
|
|
14696
14696
|
}
|
|
14697
14697
|
}
|
|
14698
|
-
const ti = /* @__PURE__ */ new H(),
|
|
14699
|
-
function
|
|
14698
|
+
const ti = /* @__PURE__ */ new H(), Bs = /* @__PURE__ */ new H();
|
|
14699
|
+
function Of(r, t, e = {}, n = 0, i = 1 / 0) {
|
|
14700
14700
|
const s = n * n, a = i * i;
|
|
14701
14701
|
let o = 1 / 0, c = null;
|
|
14702
14702
|
if (r.shapecast(
|
|
@@ -14706,15 +14706,15 @@ function Af(r, t, e = {}, n = 0, i = 1 / 0) {
|
|
|
14706
14706
|
intersectsTriangle: (u, f) => {
|
|
14707
14707
|
u.closestPointToPoint(t, ti);
|
|
14708
14708
|
const p = t.distanceToSquared(ti);
|
|
14709
|
-
return p < o && (
|
|
14709
|
+
return p < o && (Bs.copy(ti), o = p, c = f), p < s;
|
|
14710
14710
|
}
|
|
14711
14711
|
}
|
|
14712
14712
|
), o === 1 / 0) return null;
|
|
14713
14713
|
const l = Math.sqrt(o);
|
|
14714
|
-
return e.point ? e.point.copy(
|
|
14714
|
+
return e.point ? e.point.copy(Bs) : e.point = Bs.clone(), e.distance = l, e.faceIndex = c, e;
|
|
14715
14715
|
}
|
|
14716
|
-
const
|
|
14717
|
-
function
|
|
14716
|
+
const zf = parseInt(Dl) >= 169, dn = /* @__PURE__ */ new H(), pn = /* @__PURE__ */ new H(), mn = /* @__PURE__ */ new H(), yr = /* @__PURE__ */ new Ln(), gr = /* @__PURE__ */ new Ln(), vr = /* @__PURE__ */ new Ln(), ja = /* @__PURE__ */ new H(), Ga = /* @__PURE__ */ new H(), Wa = /* @__PURE__ */ new H(), ei = /* @__PURE__ */ new H();
|
|
14717
|
+
function If(r, t, e, n, i, s, a, o) {
|
|
14718
14718
|
let c;
|
|
14719
14719
|
if (s === Fl ? c = r.intersectTriangle(n, e, t, !0, i) : c = r.intersectTriangle(t, e, n, s !== js, i), c === null) return null;
|
|
14720
14720
|
const l = r.origin.distanceTo(i);
|
|
@@ -14723,9 +14723,9 @@ function zf(r, t, e, n, i, s, a, o) {
|
|
|
14723
14723
|
point: i.clone()
|
|
14724
14724
|
};
|
|
14725
14725
|
}
|
|
14726
|
-
function
|
|
14726
|
+
function Bf(r, t, e, n, i, s, a, o, c, l, u) {
|
|
14727
14727
|
dn.fromBufferAttribute(t, s), pn.fromBufferAttribute(t, a), mn.fromBufferAttribute(t, o);
|
|
14728
|
-
const f =
|
|
14728
|
+
const f = If(r, dn, pn, mn, ei, c, l, u);
|
|
14729
14729
|
if (f) {
|
|
14730
14730
|
const p = new H();
|
|
14731
14731
|
xn.getBarycoord(ei, dn, pn, mn, p), n && (yr.fromBufferAttribute(n, s), gr.fromBufferAttribute(n, a), vr.fromBufferAttribute(n, o), f.uv = xn.getInterpolation(ei, dn, pn, mn, yr, gr, vr, new Ln())), i && (yr.fromBufferAttribute(i, s), gr.fromBufferAttribute(i, a), vr.fromBufferAttribute(i, o), f.uv1 = xn.getInterpolation(ei, dn, pn, mn, yr, gr, vr, new Ln())), e && (ja.fromBufferAttribute(e, s), Ga.fromBufferAttribute(e, a), Wa.fromBufferAttribute(e, o), f.normal = xn.getInterpolation(ei, dn, pn, mn, ja, Ga, Wa, new H()), f.normal.dot(r.direction) > 0 && f.normal.multiplyScalar(-1));
|
|
@@ -14736,7 +14736,7 @@ function If(r, t, e, n, i, s, a, o, c, l, u) {
|
|
|
14736
14736
|
normal: new H(),
|
|
14737
14737
|
materialIndex: 0
|
|
14738
14738
|
};
|
|
14739
|
-
xn.getNormal(dn, pn, mn, m.normal), f.face = m, f.faceIndex = s,
|
|
14739
|
+
xn.getNormal(dn, pn, mn, m.normal), f.face = m, f.faceIndex = s, zf && (f.barycoord = p);
|
|
14740
14740
|
}
|
|
14741
14741
|
return f;
|
|
14742
14742
|
}
|
|
@@ -14745,7 +14745,7 @@ function Yr(r, t, e, n, i, s, a) {
|
|
|
14745
14745
|
let c = o + 0, l = o + 1, u = o + 2;
|
|
14746
14746
|
const f = r.index;
|
|
14747
14747
|
r.index && (c = f.getX(c), l = f.getX(l), u = f.getX(u));
|
|
14748
|
-
const { position: p, normal: m, uv: x, uv1: T } = r.attributes, g =
|
|
14748
|
+
const { position: p, normal: m, uv: x, uv1: T } = r.attributes, g = Bf(e, p, m, x, T, c, l, u, t, s, a);
|
|
14749
14749
|
return g ? (g.faceIndex = n, i && i.push(g), g) : null;
|
|
14750
14750
|
}
|
|
14751
14751
|
function Mt(r, t, e, n) {
|
|
@@ -14758,7 +14758,7 @@ function Nf(r, t, e, n, i, s, a, o) {
|
|
|
14758
14758
|
for (let u = n, f = n + i; u < f; u++)
|
|
14759
14759
|
Yr(c, t, e, u, s, a, o);
|
|
14760
14760
|
}
|
|
14761
|
-
function
|
|
14761
|
+
function Uf(r, t, e, n, i, s, a) {
|
|
14762
14762
|
const { geometry: o, _indirectBuffer: c } = r;
|
|
14763
14763
|
let l = 1 / 0, u = null;
|
|
14764
14764
|
for (let f = n, p = n + i; f < p; f++) {
|
|
@@ -14767,7 +14767,7 @@ function Bf(r, t, e, n, i, s, a) {
|
|
|
14767
14767
|
}
|
|
14768
14768
|
return u;
|
|
14769
14769
|
}
|
|
14770
|
-
function
|
|
14770
|
+
function Ff(r, t, e, n, i, s, a) {
|
|
14771
14771
|
const { geometry: o } = e, { index: c } = o, l = o.attributes.position;
|
|
14772
14772
|
for (let u = r, f = t + r; u < f; u++) {
|
|
14773
14773
|
let p;
|
|
@@ -14776,7 +14776,7 @@ function Uf(r, t, e, n, i, s, a) {
|
|
|
14776
14776
|
}
|
|
14777
14777
|
return !1;
|
|
14778
14778
|
}
|
|
14779
|
-
function
|
|
14779
|
+
function Df(r, t = null) {
|
|
14780
14780
|
t && Array.isArray(t) && (t = new Set(t));
|
|
14781
14781
|
const e = r.geometry, n = e.index ? e.index.array : null, i = e.attributes.position;
|
|
14782
14782
|
let s, a, o, c, l = 0;
|
|
@@ -14789,8 +14789,8 @@ function Ff(r, t = null) {
|
|
|
14789
14789
|
const v = a[p + 6], b = o[T + 14];
|
|
14790
14790
|
let _ = 1 / 0, w = 1 / 0, M = 1 / 0, P = -1 / 0, E = -1 / 0, z = -1 / 0;
|
|
14791
14791
|
for (let A = 3 * v, R = 3 * (v + b); A < R; A++) {
|
|
14792
|
-
let
|
|
14793
|
-
const I = i.getX(
|
|
14792
|
+
let B = n[A];
|
|
14793
|
+
const I = i.getX(B), U = i.getY(B), D = i.getZ(B);
|
|
14794
14794
|
I < _ && (_ = I), I > P && (P = I), U < w && (w = U), U > E && (E = U), D < M && (M = D), D > z && (z = D);
|
|
14795
14795
|
}
|
|
14796
14796
|
return c[p + 0] !== _ || c[p + 1] !== w || c[p + 2] !== M || c[p + 3] !== P || c[p + 4] !== E || c[p + 5] !== z ? (c[p + 0] = _, c[p + 1] = w, c[p + 2] = M, c[p + 3] = P, c[p + 4] = E, c[p + 5] = z, !0) : !1;
|
|
@@ -14801,9 +14801,9 @@ function Ff(r, t = null) {
|
|
|
14801
14801
|
const z = M || P, A = M || E;
|
|
14802
14802
|
let R = !1;
|
|
14803
14803
|
z && (R = f(v, m, M));
|
|
14804
|
-
let
|
|
14805
|
-
A && (
|
|
14806
|
-
const I = R ||
|
|
14804
|
+
let B = !1;
|
|
14805
|
+
A && (B = f(b, m, M));
|
|
14806
|
+
const I = R || B;
|
|
14807
14807
|
if (I)
|
|
14808
14808
|
for (let U = 0; U < 3; U++) {
|
|
14809
14809
|
const D = v + U, V = b + U, $ = c[D], Z = c[D + 3], G = c[V], ot = c[V + 3];
|
|
@@ -14819,14 +14819,14 @@ function an(r, t, e, n, i) {
|
|
|
14819
14819
|
let v = t[r], b = t[r + 3], _ = t[r + 1], w = t[r + 3 + 1], M = t[r + 2], P = t[r + 3 + 2];
|
|
14820
14820
|
return f >= 0 ? (s = (v - x) * f, a = (b - x) * f) : (s = (b - x) * f, a = (v - x) * f), p >= 0 ? (o = (_ - T) * p, c = (w - T) * p) : (o = (w - T) * p, c = (_ - T) * p), s > c || o > a || ((o > s || isNaN(s)) && (s = o), (c < a || isNaN(a)) && (a = c), m >= 0 ? (l = (M - g) * m, u = (P - g) * m) : (l = (P - g) * m, u = (M - g) * m), s > u || l > a) ? !1 : ((l > s || s !== s) && (s = l), (u < a || a !== a) && (a = u), s <= i && a >= n);
|
|
14821
14821
|
}
|
|
14822
|
-
function
|
|
14822
|
+
function Lf(r, t, e, n, i, s, a, o) {
|
|
14823
14823
|
const { geometry: c, _indirectBuffer: l } = r;
|
|
14824
14824
|
for (let u = n, f = n + i; u < f; u++) {
|
|
14825
14825
|
let p = l ? l[u] : u;
|
|
14826
14826
|
Yr(c, t, e, p, s, a, o);
|
|
14827
14827
|
}
|
|
14828
14828
|
}
|
|
14829
|
-
function
|
|
14829
|
+
function Vf(r, t, e, n, i, s, a) {
|
|
14830
14830
|
const { geometry: o, _indirectBuffer: c } = r;
|
|
14831
14831
|
let l = 1 / 0, u = null;
|
|
14832
14832
|
for (let f = n, p = n + i; f < p; f++) {
|
|
@@ -14835,7 +14835,7 @@ function Lf(r, t, e, n, i, s, a) {
|
|
|
14835
14835
|
}
|
|
14836
14836
|
return u;
|
|
14837
14837
|
}
|
|
14838
|
-
function
|
|
14838
|
+
function Jf(r, t, e, n, i, s, a) {
|
|
14839
14839
|
const { geometry: o } = e, { index: c } = o, l = o.attributes.position;
|
|
14840
14840
|
for (let u = r, f = t + r; u < f; u++) {
|
|
14841
14841
|
let p;
|
|
@@ -14844,7 +14844,7 @@ function Vf(r, t, e, n, i, s, a) {
|
|
|
14844
14844
|
}
|
|
14845
14845
|
return !1;
|
|
14846
14846
|
}
|
|
14847
|
-
function
|
|
14847
|
+
function jf(r, t, e, n, i, s, a) {
|
|
14848
14848
|
dt.setBuffer(r._roots[t]), lo(0, r, e, n, i, s, a), dt.clearBuffer();
|
|
14849
14849
|
}
|
|
14850
14850
|
function lo(r, t, e, n, i, s, a) {
|
|
@@ -14859,8 +14859,8 @@ function lo(r, t, e, n, i, s, a) {
|
|
|
14859
14859
|
an(m, o, n, s, a) && lo(m, t, e, n, i, s, a);
|
|
14860
14860
|
}
|
|
14861
14861
|
}
|
|
14862
|
-
const
|
|
14863
|
-
function
|
|
14862
|
+
const Gf = ["x", "y", "z"];
|
|
14863
|
+
function Wf(r, t, e, n, i, s) {
|
|
14864
14864
|
dt.setBuffer(r._roots[t]);
|
|
14865
14865
|
const a = uo(0, r, e, n, i, s);
|
|
14866
14866
|
return dt.clearBuffer(), a;
|
|
@@ -14870,9 +14870,9 @@ function uo(r, t, e, n, i, s) {
|
|
|
14870
14870
|
let l = r * 2;
|
|
14871
14871
|
if (te(l, o)) {
|
|
14872
14872
|
const f = oe(r, c), p = de(l, o);
|
|
14873
|
-
return
|
|
14873
|
+
return Uf(t, e, n, f, p, i, s);
|
|
14874
14874
|
} else {
|
|
14875
|
-
const f = fl(r, c), p =
|
|
14875
|
+
const f = fl(r, c), p = Gf[f], x = n.direction[p] >= 0;
|
|
14876
14876
|
let T, g;
|
|
14877
14877
|
x ? (T = pe(r), g = me(r, c)) : (T = me(r, c), g = pe(r));
|
|
14878
14878
|
const b = an(T, a, n, i, s) ? uo(T, t, e, n, i, s) : null;
|
|
@@ -14889,7 +14889,7 @@ function uo(r, t, e, n, i, s) {
|
|
|
14889
14889
|
}
|
|
14890
14890
|
}
|
|
14891
14891
|
const Sr = /* @__PURE__ */ new Ue(), On = /* @__PURE__ */ new ge(), zn = /* @__PURE__ */ new ge(), ni = /* @__PURE__ */ new ke(), $a = /* @__PURE__ */ new Vt(), xr = /* @__PURE__ */ new Vt();
|
|
14892
|
-
function
|
|
14892
|
+
function $f(r, t, e, n) {
|
|
14893
14893
|
dt.setBuffer(r._roots[t]);
|
|
14894
14894
|
const i = ho(0, r, e, n);
|
|
14895
14895
|
return dt.clearBuffer(), i;
|
|
@@ -14921,16 +14921,16 @@ function ho(r, t, e, n, i = null) {
|
|
|
14921
14921
|
return St(u, s, Sr), !!(i.intersectsBox(Sr) && ho(u, t, e, n, i) || (St(f, s, Sr), i.intersectsBox(Sr) && ho(f, t, e, n, i)));
|
|
14922
14922
|
}
|
|
14923
14923
|
}
|
|
14924
|
-
const _r = /* @__PURE__ */ new ke(),
|
|
14925
|
-
function
|
|
14926
|
-
t.boundingBox || t.computeBoundingBox(),
|
|
14924
|
+
const _r = /* @__PURE__ */ new ke(), Ns = /* @__PURE__ */ new Vt(), ii = /* @__PURE__ */ new Vt(), Hf = /* @__PURE__ */ new H(), qf = /* @__PURE__ */ new H(), Xf = /* @__PURE__ */ new H(), Yf = /* @__PURE__ */ new H();
|
|
14925
|
+
function Zf(r, t, e, n = {}, i = {}, s = 0, a = 1 / 0) {
|
|
14926
|
+
t.boundingBox || t.computeBoundingBox(), Ns.set(t.boundingBox.min, t.boundingBox.max, e), Ns.needsUpdate = !0;
|
|
14927
14927
|
const o = r.geometry, c = o.attributes.position, l = o.index, u = t.attributes.position, f = t.index, p = ye.getPrimitive(), m = ye.getPrimitive();
|
|
14928
|
-
let x =
|
|
14929
|
-
i && (g =
|
|
14928
|
+
let x = Hf, T = qf, g = null, v = null;
|
|
14929
|
+
i && (g = Xf, v = Yf);
|
|
14930
14930
|
let b = 1 / 0, _ = null, w = null;
|
|
14931
14931
|
return _r.copy(e).invert(), ii.matrix.copy(_r), r.shapecast(
|
|
14932
14932
|
{
|
|
14933
|
-
boundsTraverseOrder: (M) =>
|
|
14933
|
+
boundsTraverseOrder: (M) => Ns.distanceToBox(M),
|
|
14934
14934
|
intersectsBounds: (M, P, E) => E < b && E < a ? (P && (ii.min.copy(M.min), ii.max.copy(M.max), ii.needsUpdate = !0), !0) : !1,
|
|
14935
14935
|
intersectsRange: (M, P) => {
|
|
14936
14936
|
if (t.boundsTree)
|
|
@@ -14938,7 +14938,7 @@ function Yf(r, t, e, n = {}, i = {}, s = 0, a = 1 / 0) {
|
|
|
14938
14938
|
boundsTraverseOrder: (z) => ii.distanceToBox(z),
|
|
14939
14939
|
intersectsBounds: (z, A, R) => R < b && R < a,
|
|
14940
14940
|
intersectsRange: (z, A) => {
|
|
14941
|
-
for (let R = z,
|
|
14941
|
+
for (let R = z, B = z + A; R < B; R++) {
|
|
14942
14942
|
Mt(m, 3 * R, f, u), m.a.applyMatrix4(e), m.b.applyMatrix4(e), m.c.applyMatrix4(e), m.needsUpdate = !0;
|
|
14943
14943
|
for (let I = M, U = M + P; I < U; I++) {
|
|
14944
14944
|
Mt(p, 3 * I, l, c), p.needsUpdate = !0;
|
|
@@ -14953,7 +14953,7 @@ function Yf(r, t, e, n = {}, i = {}, s = 0, a = 1 / 0) {
|
|
|
14953
14953
|
const E = Hn(t);
|
|
14954
14954
|
for (let z = 0, A = E; z < A; z++) {
|
|
14955
14955
|
Mt(m, 3 * z, f, u), m.a.applyMatrix4(e), m.b.applyMatrix4(e), m.c.applyMatrix4(e), m.needsUpdate = !0;
|
|
14956
|
-
for (let R = M,
|
|
14956
|
+
for (let R = M, B = M + P; R < B; R++) {
|
|
14957
14957
|
Mt(p, 3 * R, l, c), p.needsUpdate = !0;
|
|
14958
14958
|
const I = p.distanceToTriangle(m, x, g);
|
|
14959
14959
|
if (I < b && (T.copy(x), v && v.copy(g), b = I, _ = R, w = z), I < s)
|
|
@@ -14965,7 +14965,7 @@ function Yf(r, t, e, n = {}, i = {}, s = 0, a = 1 / 0) {
|
|
|
14965
14965
|
}
|
|
14966
14966
|
), ye.releasePrimitive(p), ye.releasePrimitive(m), b === 1 / 0 ? null : (n.point ? n.point.copy(T) : n.point = T.clone(), n.distance = b, n.faceIndex = _, i && (i.point ? i.point.copy(v) : i.point = v.clone(), i.point.applyMatrix4(_r), T.applyMatrix4(_r), i.distance = T.sub(i.point).length(), i.faceIndex = w), n);
|
|
14967
14967
|
}
|
|
14968
|
-
function
|
|
14968
|
+
function Kf(r, t = null) {
|
|
14969
14969
|
t && Array.isArray(t) && (t = new Set(t));
|
|
14970
14970
|
const e = r.geometry, n = e.index ? e.index.array : null, i = e.attributes.position;
|
|
14971
14971
|
let s, a, o, c, l = 0;
|
|
@@ -14978,9 +14978,9 @@ function Zf(r, t = null) {
|
|
|
14978
14978
|
const v = a[p + 6], b = o[T + 14];
|
|
14979
14979
|
let _ = 1 / 0, w = 1 / 0, M = 1 / 0, P = -1 / 0, E = -1 / 0, z = -1 / 0;
|
|
14980
14980
|
for (let A = v, R = v + b; A < R; A++) {
|
|
14981
|
-
const
|
|
14981
|
+
const B = 3 * r.resolveTriangleIndex(A);
|
|
14982
14982
|
for (let I = 0; I < 3; I++) {
|
|
14983
|
-
let U =
|
|
14983
|
+
let U = B + I;
|
|
14984
14984
|
U = n ? n[U] : U;
|
|
14985
14985
|
const D = i.getX(U), V = i.getY(U), $ = i.getZ(U);
|
|
14986
14986
|
D < _ && (_ = D), D > P && (P = D), V < w && (w = V), V > E && (E = V), $ < M && (M = $), $ > z && (z = $);
|
|
@@ -14994,9 +14994,9 @@ function Zf(r, t = null) {
|
|
|
14994
14994
|
const z = M || P, A = M || E;
|
|
14995
14995
|
let R = !1;
|
|
14996
14996
|
z && (R = f(v, m, M));
|
|
14997
|
-
let
|
|
14998
|
-
A && (
|
|
14999
|
-
const I = R ||
|
|
14997
|
+
let B = !1;
|
|
14998
|
+
A && (B = f(b, m, M));
|
|
14999
|
+
const I = R || B;
|
|
15000
15000
|
if (I)
|
|
15001
15001
|
for (let U = 0; U < 3; U++) {
|
|
15002
15002
|
const D = v + U, V = b + U, $ = c[D], Z = c[D + 3], G = c[V], ot = c[V + 3];
|
|
@@ -15006,14 +15006,14 @@ function Zf(r, t = null) {
|
|
|
15006
15006
|
}
|
|
15007
15007
|
}
|
|
15008
15008
|
}
|
|
15009
|
-
function
|
|
15009
|
+
function Qf(r, t, e, n, i, s, a) {
|
|
15010
15010
|
dt.setBuffer(r._roots[t]), fo(0, r, e, n, i, s, a), dt.clearBuffer();
|
|
15011
15011
|
}
|
|
15012
15012
|
function fo(r, t, e, n, i, s, a) {
|
|
15013
15013
|
const { float32Array: o, uint16Array: c, uint32Array: l } = dt, u = r * 2;
|
|
15014
15014
|
if (te(u, c)) {
|
|
15015
15015
|
const p = oe(r, l), m = de(u, c);
|
|
15016
|
-
|
|
15016
|
+
Lf(t, e, n, p, m, i, s, a);
|
|
15017
15017
|
} else {
|
|
15018
15018
|
const p = pe(r);
|
|
15019
15019
|
an(p, o, n, s, a) && fo(p, t, e, n, i, s, a);
|
|
@@ -15021,8 +15021,8 @@ function fo(r, t, e, n, i, s, a) {
|
|
|
15021
15021
|
an(m, o, n, s, a) && fo(m, t, e, n, i, s, a);
|
|
15022
15022
|
}
|
|
15023
15023
|
}
|
|
15024
|
-
const
|
|
15025
|
-
function
|
|
15024
|
+
const td = ["x", "y", "z"];
|
|
15025
|
+
function ed(r, t, e, n, i, s) {
|
|
15026
15026
|
dt.setBuffer(r._roots[t]);
|
|
15027
15027
|
const a = po(0, r, e, n, i, s);
|
|
15028
15028
|
return dt.clearBuffer(), a;
|
|
@@ -15032,9 +15032,9 @@ function po(r, t, e, n, i, s) {
|
|
|
15032
15032
|
let l = r * 2;
|
|
15033
15033
|
if (te(l, o)) {
|
|
15034
15034
|
const f = oe(r, c), p = de(l, o);
|
|
15035
|
-
return
|
|
15035
|
+
return Vf(t, e, n, f, p, i, s);
|
|
15036
15036
|
} else {
|
|
15037
|
-
const f = fl(r, c), p =
|
|
15037
|
+
const f = fl(r, c), p = td[f], x = n.direction[p] >= 0;
|
|
15038
15038
|
let T, g;
|
|
15039
15039
|
x ? (T = pe(r), g = me(r, c)) : (T = me(r, c), g = pe(r));
|
|
15040
15040
|
const b = an(T, a, n, i, s) ? po(T, t, e, n, i, s) : null;
|
|
@@ -15050,8 +15050,8 @@ function po(r, t, e, n, i, s) {
|
|
|
15050
15050
|
return b && w ? b.distance <= w.distance ? b : w : b || w || null;
|
|
15051
15051
|
}
|
|
15052
15052
|
}
|
|
15053
|
-
const br = /* @__PURE__ */ new Ue(), In = /* @__PURE__ */ new ge(),
|
|
15054
|
-
function
|
|
15053
|
+
const br = /* @__PURE__ */ new Ue(), In = /* @__PURE__ */ new ge(), Bn = /* @__PURE__ */ new ge(), ri = /* @__PURE__ */ new ke(), Ha = /* @__PURE__ */ new Vt(), Tr = /* @__PURE__ */ new Vt();
|
|
15054
|
+
function nd(r, t, e, n) {
|
|
15055
15055
|
dt.setBuffer(r._roots[t]);
|
|
15056
15056
|
const i = mo(0, r, e, n);
|
|
15057
15057
|
return dt.clearBuffer(), i;
|
|
@@ -15067,7 +15067,7 @@ function mo(r, t, e, n, i = null) {
|
|
|
15067
15067
|
intersectsTriangle: (b) => {
|
|
15068
15068
|
b.a.applyMatrix4(n), b.b.applyMatrix4(n), b.c.applyMatrix4(n), b.needsUpdate = !0;
|
|
15069
15069
|
for (let _ = T, w = g + T; _ < w; _++)
|
|
15070
|
-
if (Mt(
|
|
15070
|
+
if (Mt(Bn, 3 * t.resolveTriangleIndex(_), f, p), Bn.needsUpdate = !0, b.intersectsTriangle(Bn))
|
|
15071
15071
|
return !0;
|
|
15072
15072
|
return !1;
|
|
15073
15073
|
}
|
|
@@ -15076,7 +15076,7 @@ function mo(r, t, e, n, i = null) {
|
|
|
15076
15076
|
const _ = t.resolveTriangleIndex(v);
|
|
15077
15077
|
Mt(In, 3 * _, f, p), In.a.applyMatrix4(ri), In.b.applyMatrix4(ri), In.c.applyMatrix4(ri), In.needsUpdate = !0;
|
|
15078
15078
|
for (let w = 0, M = m.count; w < M; w += 3)
|
|
15079
|
-
if (Mt(
|
|
15079
|
+
if (Mt(Bn, w, m, x), Bn.needsUpdate = !0, In.intersectsTriangle(Bn))
|
|
15080
15080
|
return !0;
|
|
15081
15081
|
}
|
|
15082
15082
|
} else {
|
|
@@ -15084,12 +15084,12 @@ function mo(r, t, e, n, i = null) {
|
|
|
15084
15084
|
return St(u, s, br), !!(i.intersectsBox(br) && mo(u, t, e, n, i) || (St(f, s, br), i.intersectsBox(br) && mo(f, t, e, n, i)));
|
|
15085
15085
|
}
|
|
15086
15086
|
}
|
|
15087
|
-
const Cr = /* @__PURE__ */ new ke(), Us = /* @__PURE__ */ new Vt(), si = /* @__PURE__ */ new Vt(),
|
|
15088
|
-
function
|
|
15087
|
+
const Cr = /* @__PURE__ */ new ke(), Us = /* @__PURE__ */ new Vt(), si = /* @__PURE__ */ new Vt(), id = /* @__PURE__ */ new H(), rd = /* @__PURE__ */ new H(), sd = /* @__PURE__ */ new H(), od = /* @__PURE__ */ new H();
|
|
15088
|
+
function ad(r, t, e, n = {}, i = {}, s = 0, a = 1 / 0) {
|
|
15089
15089
|
t.boundingBox || t.computeBoundingBox(), Us.set(t.boundingBox.min, t.boundingBox.max, e), Us.needsUpdate = !0;
|
|
15090
15090
|
const o = r.geometry, c = o.attributes.position, l = o.index, u = t.attributes.position, f = t.index, p = ye.getPrimitive(), m = ye.getPrimitive();
|
|
15091
|
-
let x =
|
|
15092
|
-
i && (g =
|
|
15091
|
+
let x = id, T = rd, g = null, v = null;
|
|
15092
|
+
i && (g = sd, v = od);
|
|
15093
15093
|
let b = 1 / 0, _ = null, w = null;
|
|
15094
15094
|
return Cr.copy(e).invert(), si.matrix.copy(Cr), r.shapecast(
|
|
15095
15095
|
{
|
|
@@ -15102,7 +15102,7 @@ function od(r, t, e, n = {}, i = {}, s = 0, a = 1 / 0) {
|
|
|
15102
15102
|
boundsTraverseOrder: (z) => si.distanceToBox(z),
|
|
15103
15103
|
intersectsBounds: (z, A, R) => R < b && R < a,
|
|
15104
15104
|
intersectsRange: (z, A) => {
|
|
15105
|
-
for (let R = z,
|
|
15105
|
+
for (let R = z, B = z + A; R < B; R++) {
|
|
15106
15106
|
const I = E.resolveTriangleIndex(R);
|
|
15107
15107
|
Mt(m, 3 * I, f, u), m.a.applyMatrix4(e), m.b.applyMatrix4(e), m.c.applyMatrix4(e), m.needsUpdate = !0;
|
|
15108
15108
|
for (let U = M, D = M + P; U < D; U++) {
|
|
@@ -15119,7 +15119,7 @@ function od(r, t, e, n = {}, i = {}, s = 0, a = 1 / 0) {
|
|
|
15119
15119
|
const E = Hn(t);
|
|
15120
15120
|
for (let z = 0, A = E; z < A; z++) {
|
|
15121
15121
|
Mt(m, 3 * z, f, u), m.a.applyMatrix4(e), m.b.applyMatrix4(e), m.c.applyMatrix4(e), m.needsUpdate = !0;
|
|
15122
|
-
for (let R = M,
|
|
15122
|
+
for (let R = M, B = M + P; R < B; R++) {
|
|
15123
15123
|
const I = r.resolveTriangleIndex(R);
|
|
15124
15124
|
Mt(p, 3 * I, l, c), p.needsUpdate = !0;
|
|
15125
15125
|
const U = p.distanceToTriangle(m, x, g);
|
|
@@ -15132,12 +15132,12 @@ function od(r, t, e, n = {}, i = {}, s = 0, a = 1 / 0) {
|
|
|
15132
15132
|
}
|
|
15133
15133
|
), ye.releasePrimitive(p), ye.releasePrimitive(m), b === 1 / 0 ? null : (n.point ? n.point.copy(T) : n.point = T.clone(), n.distance = b, n.faceIndex = _, i && (i.point ? i.point.copy(v) : i.point = v.clone(), i.point.applyMatrix4(Cr), T.applyMatrix4(Cr), i.distance = T.sub(i.point).length(), i.faceIndex = w), n);
|
|
15134
15134
|
}
|
|
15135
|
-
function
|
|
15135
|
+
function cd() {
|
|
15136
15136
|
return typeof SharedArrayBuffer < "u";
|
|
15137
15137
|
}
|
|
15138
|
-
const mi = new dt.constructor(), Gr = new dt.constructor(), rn = new Eo(() => new Ue()),
|
|
15138
|
+
const mi = new dt.constructor(), Gr = new dt.constructor(), rn = new Eo(() => new Ue()), Nn = new Ue(), Un = new Ue(), Fs = new Ue(), Ds = new Ue();
|
|
15139
15139
|
let Ls = !1;
|
|
15140
|
-
function
|
|
15140
|
+
function ld(r, t, e, n) {
|
|
15141
15141
|
if (Ls)
|
|
15142
15142
|
throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
|
|
15143
15143
|
Ls = !0;
|
|
@@ -15195,9 +15195,9 @@ function we(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, u = !1) {
|
|
|
15195
15195
|
const z = rn.getPrimitive();
|
|
15196
15196
|
St(t, g, z), z.applyMatrix4(e);
|
|
15197
15197
|
const A = pe(r), R = me(r, x);
|
|
15198
|
-
St(A, m,
|
|
15199
|
-
const
|
|
15200
|
-
E =
|
|
15198
|
+
St(A, m, Nn), St(R, m, Un);
|
|
15199
|
+
const B = z.intersectsBox(Nn), I = z.intersectsBox(Un);
|
|
15200
|
+
E = B && we(
|
|
15201
15201
|
t,
|
|
15202
15202
|
A,
|
|
15203
15203
|
n,
|
|
@@ -15225,8 +15225,8 @@ function we(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, u = !1) {
|
|
|
15225
15225
|
} else {
|
|
15226
15226
|
const z = pe(t), A = me(t, v);
|
|
15227
15227
|
St(z, g, Fs), St(A, g, Ds);
|
|
15228
|
-
const R = l.intersectsBox(Fs),
|
|
15229
|
-
if (R &&
|
|
15228
|
+
const R = l.intersectsBox(Fs), B = l.intersectsBox(Ds);
|
|
15229
|
+
if (R && B)
|
|
15230
15230
|
E = we(
|
|
15231
15231
|
r,
|
|
15232
15232
|
z,
|
|
@@ -15271,8 +15271,8 @@ function we(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, u = !1) {
|
|
|
15271
15271
|
const I = rn.getPrimitive();
|
|
15272
15272
|
I.copy(Fs).applyMatrix4(e);
|
|
15273
15273
|
const U = pe(r), D = me(r, x);
|
|
15274
|
-
St(U, m,
|
|
15275
|
-
const V = I.intersectsBox(
|
|
15274
|
+
St(U, m, Nn), St(D, m, Un);
|
|
15275
|
+
const V = I.intersectsBox(Nn), $ = I.intersectsBox(Un);
|
|
15276
15276
|
E = V && we(
|
|
15277
15277
|
z,
|
|
15278
15278
|
U,
|
|
@@ -15299,7 +15299,7 @@ function we(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, u = !1) {
|
|
|
15299
15299
|
!u
|
|
15300
15300
|
), rn.releasePrimitive(I);
|
|
15301
15301
|
}
|
|
15302
|
-
else if (
|
|
15302
|
+
else if (B)
|
|
15303
15303
|
if (M)
|
|
15304
15304
|
E = we(
|
|
15305
15305
|
r,
|
|
@@ -15318,8 +15318,8 @@ function we(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, u = !1) {
|
|
|
15318
15318
|
const I = rn.getPrimitive();
|
|
15319
15319
|
I.copy(Ds).applyMatrix4(e);
|
|
15320
15320
|
const U = pe(r), D = me(r, x);
|
|
15321
|
-
St(U, m,
|
|
15322
|
-
const V = I.intersectsBox(
|
|
15321
|
+
St(U, m, Nn), St(D, m, Un);
|
|
15322
|
+
const V = I.intersectsBox(Nn), $ = I.intersectsBox(Un);
|
|
15323
15323
|
E = V && we(
|
|
15324
15324
|
A,
|
|
15325
15325
|
U,
|
|
@@ -15349,7 +15349,7 @@ function we(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, u = !1) {
|
|
|
15349
15349
|
}
|
|
15350
15350
|
return E;
|
|
15351
15351
|
}
|
|
15352
|
-
const Mr = /* @__PURE__ */ new Vt(), qa = /* @__PURE__ */ new Ue(),
|
|
15352
|
+
const Mr = /* @__PURE__ */ new Vt(), qa = /* @__PURE__ */ new Ue(), ud = {
|
|
15353
15353
|
strategy: wo,
|
|
15354
15354
|
maxDepth: 40,
|
|
15355
15355
|
maxLeafTris: 10,
|
|
@@ -15403,16 +15403,16 @@ class Zr {
|
|
|
15403
15403
|
throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.");
|
|
15404
15404
|
} else throw new Error("MeshBVH: Only BufferGeometries are supported.");
|
|
15405
15405
|
if (e = Object.assign({
|
|
15406
|
-
...
|
|
15406
|
+
...ud,
|
|
15407
15407
|
// undocumented options
|
|
15408
15408
|
// Whether to skip generating the tree. Used for deserialization.
|
|
15409
15409
|
[As]: !1
|
|
15410
|
-
}, e), e.useSharedArrayBuffer && !
|
|
15410
|
+
}, e), e.useSharedArrayBuffer && !cd())
|
|
15411
15411
|
throw new Error("MeshBVH: SharedArrayBuffer is not available.");
|
|
15412
|
-
this.geometry = t, this._roots = null, this._indirectBuffer = null, e[As] || (
|
|
15412
|
+
this.geometry = t, this._roots = null, this._indirectBuffer = null, e[As] || (Mf(this, e), !t.boundingBox && e.setBoundingBox && (t.boundingBox = this.getBoundingBox(new Ue()))), this.resolveTriangleIndex = e.indirect ? (n) => this._indirectBuffer[n] : (n) => n;
|
|
15413
15413
|
}
|
|
15414
15414
|
refit(t = null) {
|
|
15415
|
-
return (this.indirect ?
|
|
15415
|
+
return (this.indirect ? Kf : Df)(this, t);
|
|
15416
15416
|
}
|
|
15417
15417
|
traverse(t, e = 0) {
|
|
15418
15418
|
const n = this._roots[e], i = new Uint32Array(n), s = new Uint16Array(n);
|
|
@@ -15430,7 +15430,7 @@ class Zr {
|
|
|
15430
15430
|
}
|
|
15431
15431
|
/* Core Cast Functions */
|
|
15432
15432
|
raycast(t, e = Ko, n = 0, i = 1 / 0) {
|
|
15433
|
-
const s = this._roots, a = this.geometry, o = [], c = e.isMaterial, l = Array.isArray(e), u = a.groups, f = c ? e.side : e, p = this.indirect ?
|
|
15433
|
+
const s = this._roots, a = this.geometry, o = [], c = e.isMaterial, l = Array.isArray(e), u = a.groups, f = c ? e.side : e, p = this.indirect ? Qf : jf;
|
|
15434
15434
|
for (let m = 0, x = s.length; m < x; m++) {
|
|
15435
15435
|
const T = l ? e[u[m].materialIndex].side : f, g = o.length;
|
|
15436
15436
|
if (p(this, m, T, t, o, n, i), l) {
|
|
@@ -15444,7 +15444,7 @@ class Zr {
|
|
|
15444
15444
|
raycastFirst(t, e = Ko, n = 0, i = 1 / 0) {
|
|
15445
15445
|
const s = this._roots, a = this.geometry, o = e.isMaterial, c = Array.isArray(e);
|
|
15446
15446
|
let l = null;
|
|
15447
|
-
const u = a.groups, f = o ? e.side : e, p = this.indirect ?
|
|
15447
|
+
const u = a.groups, f = o ? e.side : e, p = this.indirect ? ed : Wf;
|
|
15448
15448
|
for (let m = 0, x = s.length; m < x; m++) {
|
|
15449
15449
|
const T = c ? e[u[m].materialIndex].side : f, g = p(this, m, T, t, n, i);
|
|
15450
15450
|
g != null && (l == null || g.distance < l.distance) && (l = g, c && (g.face.materialIndex = u[m].materialIndex));
|
|
@@ -15453,13 +15453,13 @@ class Zr {
|
|
|
15453
15453
|
}
|
|
15454
15454
|
intersectsGeometry(t, e) {
|
|
15455
15455
|
let n = !1;
|
|
15456
|
-
const i = this._roots, s = this.indirect ?
|
|
15456
|
+
const i = this._roots, s = this.indirect ? nd : $f;
|
|
15457
15457
|
for (let a = 0, o = i.length; a < o && (n = s(this, a, t, e), !n); a++)
|
|
15458
15458
|
;
|
|
15459
15459
|
return n;
|
|
15460
15460
|
}
|
|
15461
15461
|
shapecast(t) {
|
|
15462
|
-
const e = ye.getPrimitive(), n = this.indirect ?
|
|
15462
|
+
const e = ye.getPrimitive(), n = this.indirect ? Jf : Ff;
|
|
15463
15463
|
let {
|
|
15464
15464
|
boundsTraverseOrder: i,
|
|
15465
15465
|
intersectsBounds: s,
|
|
@@ -15474,7 +15474,7 @@ class Zr {
|
|
|
15474
15474
|
const u = this._roots;
|
|
15475
15475
|
for (let f = 0, p = u.length; f < p; f++) {
|
|
15476
15476
|
const m = u[f];
|
|
15477
|
-
if (c =
|
|
15477
|
+
if (c = Af(this, f, s, a, i, l), c)
|
|
15478
15478
|
break;
|
|
15479
15479
|
l += m.byteLength;
|
|
15480
15480
|
}
|
|
@@ -15514,7 +15514,7 @@ class Zr {
|
|
|
15514
15514
|
} else
|
|
15515
15515
|
i = x;
|
|
15516
15516
|
}
|
|
15517
|
-
return
|
|
15517
|
+
return ld(this, t, e, i);
|
|
15518
15518
|
}
|
|
15519
15519
|
/* Derived Cast Functions */
|
|
15520
15520
|
intersectsBox(t, e) {
|
|
@@ -15534,7 +15534,7 @@ class Zr {
|
|
|
15534
15534
|
);
|
|
15535
15535
|
}
|
|
15536
15536
|
closestPointToGeometry(t, e, n = {}, i = {}, s = 0, a = 1 / 0) {
|
|
15537
|
-
return (this.indirect ?
|
|
15537
|
+
return (this.indirect ? ad : Zf)(
|
|
15538
15538
|
this,
|
|
15539
15539
|
t,
|
|
15540
15540
|
e,
|
|
@@ -15545,7 +15545,7 @@ class Zr {
|
|
|
15545
15545
|
);
|
|
15546
15546
|
}
|
|
15547
15547
|
closestPointToPoint(t, e = {}, n = 0, i = 1 / 0) {
|
|
15548
|
-
return
|
|
15548
|
+
return Of(
|
|
15549
15549
|
this,
|
|
15550
15550
|
t,
|
|
15551
15551
|
e,
|
|
@@ -15562,37 +15562,37 @@ class Zr {
|
|
|
15562
15562
|
function Xa(r, t, e) {
|
|
15563
15563
|
return r === null ? null : (r.point.applyMatrix4(t.matrixWorld), r.distance = r.point.distanceTo(e.ray.origin), r.object = t, r);
|
|
15564
15564
|
}
|
|
15565
|
-
const wr = /* @__PURE__ */ new Vl(), Ya = /* @__PURE__ */ new H(), Za = /* @__PURE__ */ new ke(),
|
|
15566
|
-
function fd(r, t) {
|
|
15567
|
-
this.isBatchedMesh ? dd.call(this, r, t) : pd.call(this, r, t);
|
|
15568
|
-
}
|
|
15565
|
+
const wr = /* @__PURE__ */ new Vl(), Ya = /* @__PURE__ */ new H(), Za = /* @__PURE__ */ new ke(), hd = yo.prototype.raycast, fd = Ll.prototype.raycast, Ka = /* @__PURE__ */ new H(), Bt = /* @__PURE__ */ new yo(), Pr = [];
|
|
15569
15566
|
function dd(r, t) {
|
|
15567
|
+
this.isBatchedMesh ? pd.call(this, r, t) : md.call(this, r, t);
|
|
15568
|
+
}
|
|
15569
|
+
function pd(r, t) {
|
|
15570
15570
|
if (this.boundsTrees) {
|
|
15571
15571
|
const e = this.boundsTrees, n = this._drawInfo || this._instanceInfo, i = this._drawRanges || this._geometryInfo, s = this.matrixWorld;
|
|
15572
|
-
|
|
15573
|
-
const a =
|
|
15574
|
-
|
|
15572
|
+
Bt.material = this.material, Bt.geometry = this.geometry;
|
|
15573
|
+
const a = Bt.geometry.boundsTree, o = Bt.geometry.drawRange;
|
|
15574
|
+
Bt.geometry.boundingSphere === null && (Bt.geometry.boundingSphere = new lc());
|
|
15575
15575
|
for (let c = 0, l = n.length; c < l; c++) {
|
|
15576
15576
|
if (!this.getVisibleAt(c))
|
|
15577
15577
|
continue;
|
|
15578
15578
|
const u = n[c].geometryIndex;
|
|
15579
|
-
if (
|
|
15580
|
-
this.getBoundingBoxAt(u,
|
|
15579
|
+
if (Bt.geometry.boundsTree = e[u], this.getMatrixAt(c, Bt.matrixWorld).premultiply(s), !Bt.geometry.boundsTree) {
|
|
15580
|
+
this.getBoundingBoxAt(u, Bt.geometry.boundingBox), this.getBoundingSphereAt(u, Bt.geometry.boundingSphere);
|
|
15581
15581
|
const f = i[u];
|
|
15582
|
-
|
|
15582
|
+
Bt.geometry.setDrawRange(f.start, f.count);
|
|
15583
15583
|
}
|
|
15584
|
-
|
|
15584
|
+
Bt.raycast(r, Pr);
|
|
15585
15585
|
for (let f = 0, p = Pr.length; f < p; f++) {
|
|
15586
15586
|
const m = Pr[f];
|
|
15587
15587
|
m.object = this, m.batchId = c, t.push(m);
|
|
15588
15588
|
}
|
|
15589
15589
|
Pr.length = 0;
|
|
15590
15590
|
}
|
|
15591
|
-
|
|
15591
|
+
Bt.geometry.boundsTree = a, Bt.geometry.drawRange = o, Bt.material = null, Bt.geometry = null;
|
|
15592
15592
|
} else
|
|
15593
|
-
|
|
15593
|
+
fd.call(this, r, t);
|
|
15594
15594
|
}
|
|
15595
|
-
function
|
|
15595
|
+
function md(r, t) {
|
|
15596
15596
|
if (this.geometry.boundsTree) {
|
|
15597
15597
|
if (this.material === void 0) return;
|
|
15598
15598
|
Za.copy(this.matrixWorld).invert(), wr.copy(r.ray).applyMatrix4(Za), Ka.setFromMatrixScale(this.matrixWorld), Ya.copy(wr.direction).multiply(Ka);
|
|
@@ -15608,9 +15608,9 @@ function pd(r, t) {
|
|
|
15608
15608
|
}
|
|
15609
15609
|
}
|
|
15610
15610
|
} else
|
|
15611
|
-
|
|
15611
|
+
hd.call(this, r, t);
|
|
15612
15612
|
}
|
|
15613
|
-
function
|
|
15613
|
+
function yd(r = {}) {
|
|
15614
15614
|
return this.boundsTree = new Zr(this, r), this.boundsTree;
|
|
15615
15615
|
}
|
|
15616
15616
|
const yn = /* @__PURE__ */ new H(), gn = /* @__PURE__ */ new H(), vn = /* @__PURE__ */ new H(), Qa = /* @__PURE__ */ new go(), Er = /* @__PURE__ */ new H(), Vs = /* @__PURE__ */ new H(), tc = /* @__PURE__ */ new go(), ec = /* @__PURE__ */ new go(), kr = /* @__PURE__ */ new ke(), nc = /* @__PURE__ */ new ke();
|
|
@@ -15637,7 +15637,7 @@ function ml(r, t, e = 0) {
|
|
|
15637
15637
|
new i(n.buffer, s, r.array.length).set(r.array);
|
|
15638
15638
|
}
|
|
15639
15639
|
}
|
|
15640
|
-
function
|
|
15640
|
+
function gd(r, t, e) {
|
|
15641
15641
|
const n = r.elements, i = t.elements;
|
|
15642
15642
|
for (let s = 0, a = i.length; s < a; s++)
|
|
15643
15643
|
n[s] += i[s] * e;
|
|
@@ -15649,7 +15649,7 @@ function ic(r, t, e) {
|
|
|
15649
15649
|
const c = ec.getComponent(o);
|
|
15650
15650
|
if (c !== 0) {
|
|
15651
15651
|
const l = tc.getComponent(o);
|
|
15652
|
-
nc.multiplyMatrices(s[l].matrixWorld, a[l]),
|
|
15652
|
+
nc.multiplyMatrices(s[l].matrixWorld, a[l]), gd(kr, nc, c);
|
|
15653
15653
|
}
|
|
15654
15654
|
}
|
|
15655
15655
|
return kr.multiply(r.bindMatrix).premultiply(r.bindMatrixInverse), e.transformDirection(kr), e;
|
|
@@ -15662,7 +15662,7 @@ function Js(r, t, e, n, i) {
|
|
|
15662
15662
|
}
|
|
15663
15663
|
i.add(Er);
|
|
15664
15664
|
}
|
|
15665
|
-
function
|
|
15665
|
+
function vd(r, t = { useGroups: !1, updateIndex: !1, skipAttributes: [] }, e = new fi()) {
|
|
15666
15666
|
const n = r[0].index !== null, { useGroups: i = !1, updateIndex: s = !1, skipAttributes: a = [] } = t, o = new Set(Object.keys(r[0].attributes)), c = {};
|
|
15667
15667
|
let l = 0;
|
|
15668
15668
|
e.clearGroups();
|
|
@@ -15726,7 +15726,7 @@ function gd(r, t = { useGroups: !1, updateIndex: !1, skipAttributes: [] }, e = n
|
|
|
15726
15726
|
}
|
|
15727
15727
|
return e;
|
|
15728
15728
|
}
|
|
15729
|
-
function
|
|
15729
|
+
function Sd(r, t) {
|
|
15730
15730
|
if (r === null || t === null)
|
|
15731
15731
|
return r === t;
|
|
15732
15732
|
if (r.length !== t.length)
|
|
@@ -15736,7 +15736,7 @@ function vd(r, t) {
|
|
|
15736
15736
|
return !1;
|
|
15737
15737
|
return !0;
|
|
15738
15738
|
}
|
|
15739
|
-
function
|
|
15739
|
+
function xd(r) {
|
|
15740
15740
|
const { index: t, attributes: e } = r;
|
|
15741
15741
|
if (t)
|
|
15742
15742
|
for (let n = 0, i = t.count; n < i; n += 3) {
|
|
@@ -15754,7 +15754,7 @@ function Sd(r) {
|
|
|
15754
15754
|
}
|
|
15755
15755
|
return r;
|
|
15756
15756
|
}
|
|
15757
|
-
class
|
|
15757
|
+
class _d {
|
|
15758
15758
|
constructor(t) {
|
|
15759
15759
|
this.matrixWorld = new ke(), this.geometryHash = null, this.boneMatrices = null, this.primitiveCount = -1, this.mesh = t, this.update();
|
|
15760
15760
|
}
|
|
@@ -15769,10 +15769,10 @@ class xd {
|
|
|
15769
15769
|
}
|
|
15770
15770
|
didChange() {
|
|
15771
15771
|
const t = this.mesh, e = t.geometry, n = (e.index ? e.index.count : e.attributes.position.count) / 3;
|
|
15772
|
-
return !(this.matrixWorld.equals(t.matrixWorld) && this.geometryHash === e.attributes.position.version &&
|
|
15772
|
+
return !(this.matrixWorld.equals(t.matrixWorld) && this.geometryHash === e.attributes.position.version && Sd(t.skeleton && t.skeleton.boneMatrices || null, this.boneMatrices) && this.primitiveCount === n);
|
|
15773
15773
|
}
|
|
15774
15774
|
}
|
|
15775
|
-
class
|
|
15775
|
+
class bd {
|
|
15776
15776
|
constructor(t) {
|
|
15777
15777
|
Array.isArray(t) || (t = [t]);
|
|
15778
15778
|
const e = [];
|
|
@@ -15793,7 +15793,7 @@ class _d {
|
|
|
15793
15793
|
const { meshes: n, useGroups: i, _intermediateGeometry: s, _diffMap: a } = this;
|
|
15794
15794
|
for (let o = 0, c = n.length; o < c; o++) {
|
|
15795
15795
|
const l = n[o], u = s[o], f = a.get(l);
|
|
15796
|
-
!f || f.didChange(l) ? (this._convertToStaticGeometry(l, u), e.push(!1), f ? f.update() : a.set(l, new
|
|
15796
|
+
!f || f.didChange(l) ? (this._convertToStaticGeometry(l, u), e.push(!1), f ? f.update() : a.set(l, new _d(l))) : e.push(!0);
|
|
15797
15797
|
}
|
|
15798
15798
|
if (s.length === 0) {
|
|
15799
15799
|
t.setIndex(null);
|
|
@@ -15803,7 +15803,7 @@ class _d {
|
|
|
15803
15803
|
for (const c in this.attributes)
|
|
15804
15804
|
t.setAttribute(this.attributes[c], new se(new Float32Array(0), 4, !1));
|
|
15805
15805
|
} else
|
|
15806
|
-
|
|
15806
|
+
vd(s, { useGroups: i, skipAttributes: e }, t);
|
|
15807
15807
|
for (const o in t.attributes)
|
|
15808
15808
|
t.attributes[o].needsUpdate = !0;
|
|
15809
15809
|
return t;
|
|
@@ -15819,10 +15819,10 @@ class _d {
|
|
|
15819
15819
|
const _ = this.attributes[b];
|
|
15820
15820
|
_ === "position" || _ === "tangent" || _ === "normal" || !(_ in o) || (c[_] || e.setAttribute(_, hi(o[_])), oi(o[_], c[_]), ml(o[_], c[_]));
|
|
15821
15821
|
}
|
|
15822
|
-
return t.matrixWorld.determinant() < 0 &&
|
|
15822
|
+
return t.matrixWorld.determinant() < 0 && xd(e), e;
|
|
15823
15823
|
}
|
|
15824
15824
|
}
|
|
15825
|
-
const
|
|
15825
|
+
const Ud = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15826
15826
|
__proto__: null,
|
|
15827
15827
|
AVERAGE: cl,
|
|
15828
15828
|
CENTER: wo,
|
|
@@ -15831,11 +15831,11 @@ const Bd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
15831
15831
|
MeshBVH: Zr,
|
|
15832
15832
|
OrientedBox: Vt,
|
|
15833
15833
|
SAH: ll,
|
|
15834
|
-
StaticGeometryGenerator:
|
|
15835
|
-
acceleratedRaycast:
|
|
15836
|
-
computeBoundsTree:
|
|
15834
|
+
StaticGeometryGenerator: bd,
|
|
15835
|
+
acceleratedRaycast: dd,
|
|
15836
|
+
computeBoundsTree: yd
|
|
15837
15837
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
15838
|
-
class
|
|
15838
|
+
class Fd {
|
|
15839
15839
|
constructor(t) {
|
|
15840
15840
|
this.name = "WorkerBase", this.running = !1, this.worker = t, this.worker.onerror = (e) => {
|
|
15841
15841
|
throw e.message ? new Error(`${this.name}: Could not create Web Worker with error "${e.message}"`) : new Error(`${this.name}: Could not create Web Worker.`);
|
|
@@ -15863,14 +15863,14 @@ const fe = {
|
|
|
15863
15863
|
material: "material",
|
|
15864
15864
|
camera: "camera",
|
|
15865
15865
|
light: "light"
|
|
15866
|
-
}, Sn = "KHR_animation_pointer",
|
|
15866
|
+
}, Sn = "KHR_animation_pointer", Td = {
|
|
15867
15867
|
// We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
|
|
15868
15868
|
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
15869
15869
|
CUBICSPLINE: void 0,
|
|
15870
15870
|
LINEAR: uc,
|
|
15871
15871
|
STEP: Gl
|
|
15872
15872
|
};
|
|
15873
|
-
class
|
|
15873
|
+
class Cd {
|
|
15874
15874
|
/** @type {import("three/examples/jsm/loaders/GLTFLoader").GLTFParser} */
|
|
15875
15875
|
constructor(t) {
|
|
15876
15876
|
this.name = Sn, this.parser = t, this.animationPointerResolver = null;
|
|
@@ -15887,7 +15887,7 @@ class Td {
|
|
|
15887
15887
|
return this.parser.getDependency("node", n);
|
|
15888
15888
|
}
|
|
15889
15889
|
loadAnimationTargetFromChannelWithAnimationPointer(t) {
|
|
15890
|
-
|
|
15890
|
+
wd();
|
|
15891
15891
|
const e = t.target, n = e.extensions && e.extensions[Sn] && e.path && e.path === "pointer";
|
|
15892
15892
|
if (!n) return null;
|
|
15893
15893
|
let i, s = fe.node, a;
|
|
@@ -16088,50 +16088,59 @@ class Td {
|
|
|
16088
16088
|
const l = o.split(".");
|
|
16089
16089
|
var f = t.name !== void 0 && t.name !== null ? t.name : t.uuid;
|
|
16090
16090
|
if (l[2] = f, l[3] === "morphTargetInfluences" && t.type === "Group") {
|
|
16091
|
-
for (const
|
|
16092
|
-
|
|
16091
|
+
for (const x of t.children)
|
|
16092
|
+
x instanceof jl && x.morphTargetInfluences && (l[3] = x.name, l[4] = "morphTargetInfluences", m(this.parser));
|
|
16093
16093
|
return c;
|
|
16094
16094
|
}
|
|
16095
|
-
|
|
16096
|
-
function p(
|
|
16095
|
+
m(this.parser);
|
|
16096
|
+
function p(x, T) {
|
|
16097
|
+
try {
|
|
16098
|
+
const g = T.split(".").filter(Boolean), b = g[g.length - 1].replace(/\[.*\]$/, "");
|
|
16099
|
+
return b in x ? typeof x[b] == "boolean" : !1;
|
|
16100
|
+
} catch {
|
|
16101
|
+
return !1;
|
|
16102
|
+
}
|
|
16103
|
+
}
|
|
16104
|
+
function m(x) {
|
|
16097
16105
|
o = l.join(".");
|
|
16098
|
-
let
|
|
16106
|
+
let T, g = !1;
|
|
16099
16107
|
switch (n.itemSize) {
|
|
16100
16108
|
case 1:
|
|
16101
|
-
|
|
16109
|
+
Object.prototype.toString.call(n.array) === "[object Uint8Array]" && // UNSIGNED_BYTE as a strong hint
|
|
16110
|
+
p(t, o) ? (T = Xl, g = !0) : T = Yl;
|
|
16102
16111
|
break;
|
|
16103
16112
|
case 2:
|
|
16104
16113
|
case 3:
|
|
16105
|
-
|
|
16114
|
+
T = ql;
|
|
16106
16115
|
break;
|
|
16107
16116
|
case 4:
|
|
16108
|
-
o.endsWith(".quaternion") ?
|
|
16117
|
+
o.endsWith(".quaternion") ? T = $l : T = Hl;
|
|
16109
16118
|
break;
|
|
16110
16119
|
}
|
|
16111
|
-
if (!
|
|
16120
|
+
if (!T) {
|
|
16112
16121
|
console.warn("Unsupported output accessor format", n);
|
|
16113
16122
|
return;
|
|
16114
16123
|
}
|
|
16115
|
-
const
|
|
16116
|
-
let
|
|
16117
|
-
o.endsWith(".fov") && (
|
|
16118
|
-
const
|
|
16124
|
+
const v = i.interpolation !== void 0 ? Td[i.interpolation] : uc;
|
|
16125
|
+
let b = x._getArrayFromAccessor(n);
|
|
16126
|
+
o.endsWith(".fov") && (b = b.map((w) => w / Math.PI * 180)), g && (b = b.map((w) => w > 0));
|
|
16127
|
+
const _ = new T(
|
|
16119
16128
|
o,
|
|
16120
16129
|
e.array,
|
|
16121
|
-
|
|
16122
|
-
|
|
16130
|
+
b,
|
|
16131
|
+
v
|
|
16123
16132
|
);
|
|
16124
|
-
if (
|
|
16125
|
-
const
|
|
16126
|
-
for (let
|
|
16127
|
-
|
|
16128
|
-
const
|
|
16133
|
+
if (v === "CUBICSPLINE" && x._createCubicSplineTrackInterpolant(_), c.push(_), o && n.itemSize === 4 && o.startsWith(".materials.") && o.endsWith(".color")) {
|
|
16134
|
+
const w = new Float32Array(b.length / 4);
|
|
16135
|
+
for (let P = 0, E = b.length / 4; P < E; P += 1)
|
|
16136
|
+
w[P] = b[P * 4 + 3];
|
|
16137
|
+
const M = new T(
|
|
16129
16138
|
o.replace(".color", ".opacity"),
|
|
16130
16139
|
e.array,
|
|
16131
|
-
|
|
16132
|
-
|
|
16140
|
+
w,
|
|
16141
|
+
v
|
|
16133
16142
|
);
|
|
16134
|
-
|
|
16143
|
+
v === "CUBICSPLINE" && x._createCubicSplineTrackInterpolant(_), c.push(M);
|
|
16135
16144
|
}
|
|
16136
16145
|
}
|
|
16137
16146
|
return c;
|
|
@@ -16167,18 +16176,18 @@ class Td {
|
|
|
16167
16176
|
M.updateMatrix && (M.updateMatrix(), M.matrixAutoUpdate = !0);
|
|
16168
16177
|
let R = e.createAnimationTracksWithAnimationPointer(M, P, E, z, A);
|
|
16169
16178
|
if (R || (R = i._createAnimationTracks(M, P, E, z, A)), R)
|
|
16170
|
-
for (let
|
|
16171
|
-
b.push(R[
|
|
16179
|
+
for (let B = 0; B < R.length; B++)
|
|
16180
|
+
b.push(R[B]);
|
|
16172
16181
|
}
|
|
16173
16182
|
return new Wl(a, void 0, b);
|
|
16174
16183
|
});
|
|
16175
16184
|
}
|
|
16176
16185
|
}
|
|
16177
|
-
let rc = !1,
|
|
16178
|
-
function
|
|
16186
|
+
let rc = !1, Md = null;
|
|
16187
|
+
function wd() {
|
|
16179
16188
|
if (rc) return;
|
|
16180
16189
|
rc = !0;
|
|
16181
|
-
const r =
|
|
16190
|
+
const r = Md ||= Qo.findNode;
|
|
16182
16191
|
Qo.findNode = function(t, e) {
|
|
16183
16192
|
if (!e) return r(t, e);
|
|
16184
16193
|
if (e.startsWith(".materials.")) {
|
|
@@ -16212,32 +16221,32 @@ function Md() {
|
|
|
16212
16221
|
return r(t, e);
|
|
16213
16222
|
};
|
|
16214
16223
|
}
|
|
16215
|
-
const
|
|
16224
|
+
const Dd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
16216
16225
|
__proto__: null,
|
|
16217
|
-
GLTFAnimationPointerExtension:
|
|
16226
|
+
GLTFAnimationPointerExtension: Cd
|
|
16218
16227
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
16219
16228
|
export {
|
|
16220
|
-
|
|
16221
|
-
|
|
16229
|
+
Iu as $70d766613f57b014$export$2e2bcd8739ae039,
|
|
16230
|
+
zd as BatchedParticleRenderer,
|
|
16222
16231
|
fc as Builder,
|
|
16223
|
-
|
|
16232
|
+
Nr as ByteBuffer,
|
|
16224
16233
|
jn as ConstantColor,
|
|
16225
16234
|
nt as ConstantValue,
|
|
16226
|
-
|
|
16235
|
+
Ne as Matrix4,
|
|
16227
16236
|
Zr as MeshBVH,
|
|
16228
|
-
|
|
16237
|
+
kd as MotionController,
|
|
16229
16238
|
io as ParticleSystem,
|
|
16230
16239
|
J as RenderMode,
|
|
16231
|
-
|
|
16240
|
+
nu as SIZE_PREFIX_LENGTH,
|
|
16232
16241
|
no as TrailParticle,
|
|
16233
16242
|
ae as Vector4,
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16243
|
+
Fd as WorkerBase,
|
|
16244
|
+
Rd as bundler,
|
|
16245
|
+
Id as createNoise4D,
|
|
16246
|
+
Ed as fetchProfile,
|
|
16238
16247
|
Nd as index,
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
|
|
16248
|
+
Ud as index$1,
|
|
16249
|
+
Dd as index$2,
|
|
16250
|
+
Od as md5,
|
|
16251
|
+
Ad as v5
|
|
16243
16252
|
};
|