@needle-tools/engine 3.37.4-alpha → 3.37.5-alpha
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 +5 -0
- package/dist/needle-engine.js +218 -162
- package/dist/needle-engine.light.js +405 -349
- package/dist/needle-engine.light.min.js +23 -23
- package/dist/needle-engine.light.umd.cjs +47 -47
- package/dist/needle-engine.min.js +23 -23
- package/dist/needle-engine.umd.cjs +47 -47
- package/lib/engine-components/OrbitControls.d.ts +16 -3
- package/lib/engine-components/OrbitControls.js +25 -9
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/ParticleSystem.d.ts +31 -1
- package/lib/engine-components/ParticleSystem.js +42 -1
- package/lib/engine-components/ParticleSystem.js.map +1 -1
- package/lib/engine-components/SceneSwitcher.d.ts +22 -2
- package/lib/engine-components/SceneSwitcher.js +29 -3
- package/lib/engine-components/SceneSwitcher.js.map +1 -1
- package/package.json +1 -1
- package/src/engine-components/OrbitControls.ts +29 -11
- package/src/engine-components/ParticleSystem.ts +44 -4
- package/src/engine-components/SceneSwitcher.ts +45 -5
|
@@ -9150,7 +9150,7 @@ function $8(s, e, t, i) {
|
|
|
9150
9150
|
}
|
|
9151
9151
|
this.setMode = o, this.render = a, this.renderInstances = l, this.renderMultiDraw = c;
|
|
9152
9152
|
}
|
|
9153
|
-
function
|
|
9153
|
+
function e5(s, e, t) {
|
|
9154
9154
|
let i;
|
|
9155
9155
|
function n() {
|
|
9156
9156
|
if (i !== void 0)
|
|
@@ -9196,7 +9196,7 @@ function eV(s, e, t) {
|
|
|
9196
9196
|
maxSamples: E
|
|
9197
9197
|
};
|
|
9198
9198
|
}
|
|
9199
|
-
function
|
|
9199
|
+
function t5(s) {
|
|
9200
9200
|
const e = this;
|
|
9201
9201
|
let t = null, i = 0, n = !1, r = !1;
|
|
9202
9202
|
const o = new Ar(), a = new kt(), l = { value: null, needsUpdate: !1 };
|
|
@@ -9242,7 +9242,7 @@ function tV(s) {
|
|
|
9242
9242
|
return e.numPlanes = A, e.numIntersection = 0, g;
|
|
9243
9243
|
}
|
|
9244
9244
|
}
|
|
9245
|
-
function
|
|
9245
|
+
function i5(s) {
|
|
9246
9246
|
let e = /* @__PURE__ */ new WeakMap();
|
|
9247
9247
|
function t(o, a) {
|
|
9248
9248
|
return a === Go ? o.mapping = lc : a === Vf && (o.mapping = vh), o;
|
|
@@ -9414,7 +9414,7 @@ class TE {
|
|
|
9414
9414
|
if ({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = sP(r), this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== e || this._pingPongRenderTarget.height !== t) {
|
|
9415
9415
|
this._pingPongRenderTarget !== null && this._dispose(), this._pingPongRenderTarget = rP(e, t, i);
|
|
9416
9416
|
const { _lodMax: o } = this;
|
|
9417
|
-
({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = sP(o)), this._blurMaterial =
|
|
9417
|
+
({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = sP(o)), this._blurMaterial = n5(o, e, t);
|
|
9418
9418
|
}
|
|
9419
9419
|
return n;
|
|
9420
9420
|
}
|
|
@@ -9555,7 +9555,7 @@ function rP(s, e, t) {
|
|
|
9555
9555
|
function qA(s, e, t, i, n) {
|
|
9556
9556
|
s.viewport.set(e, t, i, n), s.scissor.set(e, t, i, n);
|
|
9557
9557
|
}
|
|
9558
|
-
function
|
|
9558
|
+
function n5(s, e, t) {
|
|
9559
9559
|
const i = new Float32Array(fu), n = new w(0, 1, 0);
|
|
9560
9560
|
return new Bt({
|
|
9561
9561
|
name: "SphericalGaussianBlur",
|
|
@@ -9773,7 +9773,7 @@ function OM() {
|
|
|
9773
9773
|
`
|
|
9774
9774
|
);
|
|
9775
9775
|
}
|
|
9776
|
-
function
|
|
9776
|
+
function s5(s) {
|
|
9777
9777
|
let e = /* @__PURE__ */ new WeakMap(), t = null;
|
|
9778
9778
|
function i(a) {
|
|
9779
9779
|
if (a && a.isTexture) {
|
|
@@ -9820,7 +9820,7 @@ function sV(s) {
|
|
|
9820
9820
|
dispose: o
|
|
9821
9821
|
};
|
|
9822
9822
|
}
|
|
9823
|
-
function
|
|
9823
|
+
function r5(s) {
|
|
9824
9824
|
const e = {};
|
|
9825
9825
|
function t(i) {
|
|
9826
9826
|
if (e[i] !== void 0)
|
|
@@ -9857,7 +9857,7 @@ function rV(s) {
|
|
|
9857
9857
|
}
|
|
9858
9858
|
};
|
|
9859
9859
|
}
|
|
9860
|
-
function
|
|
9860
|
+
function o5(s, e, t, i) {
|
|
9861
9861
|
const n = {}, r = /* @__PURE__ */ new WeakMap();
|
|
9862
9862
|
function o(d) {
|
|
9863
9863
|
const f = d.target;
|
|
@@ -9926,7 +9926,7 @@ function oV(s, e, t, i) {
|
|
|
9926
9926
|
getWireframeAttribute: u
|
|
9927
9927
|
};
|
|
9928
9928
|
}
|
|
9929
|
-
function
|
|
9929
|
+
function a5(s, e, t, i) {
|
|
9930
9930
|
const n = i.isWebGL2;
|
|
9931
9931
|
let r;
|
|
9932
9932
|
function o(p) {
|
|
@@ -9968,7 +9968,7 @@ function aV(s, e, t, i) {
|
|
|
9968
9968
|
}
|
|
9969
9969
|
this.setMode = o, this.setIndex = c, this.render = u, this.renderInstances = d, this.renderMultiDraw = f;
|
|
9970
9970
|
}
|
|
9971
|
-
function
|
|
9971
|
+
function l5(s) {
|
|
9972
9972
|
const e = {
|
|
9973
9973
|
geometries: 0,
|
|
9974
9974
|
textures: 0
|
|
@@ -10013,13 +10013,13 @@ function lV(s) {
|
|
|
10013
10013
|
update: i
|
|
10014
10014
|
};
|
|
10015
10015
|
}
|
|
10016
|
-
function
|
|
10016
|
+
function c5(s, e) {
|
|
10017
10017
|
return s[0] - e[0];
|
|
10018
10018
|
}
|
|
10019
|
-
function
|
|
10019
|
+
function h5(s, e) {
|
|
10020
10020
|
return Math.abs(e[1]) - Math.abs(s[1]);
|
|
10021
10021
|
}
|
|
10022
|
-
function
|
|
10022
|
+
function u5(s, e, t) {
|
|
10023
10023
|
const i = {}, n = new Float32Array(8), r = /* @__PURE__ */ new WeakMap(), o = new Ze(), a = [];
|
|
10024
10024
|
for (let c = 0; c < 8; c++)
|
|
10025
10025
|
a[c] = [c, 0];
|
|
@@ -10077,10 +10077,10 @@ function uV(s, e, t) {
|
|
|
10077
10077
|
const b = m[y];
|
|
10078
10078
|
b[0] = y, b[1] = f[y];
|
|
10079
10079
|
}
|
|
10080
|
-
m.sort(
|
|
10080
|
+
m.sort(h5);
|
|
10081
10081
|
for (let y = 0; y < 8; y++)
|
|
10082
10082
|
y < p && m[y][1] ? (a[y][0] = m[y][0], a[y][1] = m[y][1]) : (a[y][0] = Number.MAX_SAFE_INTEGER, a[y][1] = 0);
|
|
10083
|
-
a.sort(
|
|
10083
|
+
a.sort(c5);
|
|
10084
10084
|
const A = u.morphAttributes.position, g = u.morphAttributes.normal;
|
|
10085
10085
|
let v = 0;
|
|
10086
10086
|
for (let y = 0; y < 8; y++) {
|
|
@@ -10095,7 +10095,7 @@ function uV(s, e, t) {
|
|
|
10095
10095
|
update: l
|
|
10096
10096
|
};
|
|
10097
10097
|
}
|
|
10098
|
-
function
|
|
10098
|
+
function d5(s, e, t, i) {
|
|
10099
10099
|
let n = /* @__PURE__ */ new WeakMap();
|
|
10100
10100
|
function r(l) {
|
|
10101
10101
|
const c = i.render.frame, u = l.geometry, d = e.get(l, u);
|
|
@@ -10166,11 +10166,11 @@ function Eb(s, e) {
|
|
|
10166
10166
|
t[i] = s.allocateTextureUnit();
|
|
10167
10167
|
return t;
|
|
10168
10168
|
}
|
|
10169
|
-
function
|
|
10169
|
+
function f5(s, e) {
|
|
10170
10170
|
const t = this.cache;
|
|
10171
10171
|
t[0] !== e && (s.uniform1f(this.addr, e), t[0] = e);
|
|
10172
10172
|
}
|
|
10173
|
-
function
|
|
10173
|
+
function p5(s, e) {
|
|
10174
10174
|
const t = this.cache;
|
|
10175
10175
|
if (e.x !== void 0)
|
|
10176
10176
|
(t[0] !== e.x || t[1] !== e.y) && (s.uniform2f(this.addr, e.x, e.y), t[0] = e.x, t[1] = e.y);
|
|
@@ -10180,7 +10180,7 @@ function pV(s, e) {
|
|
|
10180
10180
|
s.uniform2fv(this.addr, e), Jn(t, e);
|
|
10181
10181
|
}
|
|
10182
10182
|
}
|
|
10183
|
-
function
|
|
10183
|
+
function m5(s, e) {
|
|
10184
10184
|
const t = this.cache;
|
|
10185
10185
|
if (e.x !== void 0)
|
|
10186
10186
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z) && (s.uniform3f(this.addr, e.x, e.y, e.z), t[0] = e.x, t[1] = e.y, t[2] = e.z);
|
|
@@ -10192,7 +10192,7 @@ function mV(s, e) {
|
|
|
10192
10192
|
s.uniform3fv(this.addr, e), Jn(t, e);
|
|
10193
10193
|
}
|
|
10194
10194
|
}
|
|
10195
|
-
function
|
|
10195
|
+
function g5(s, e) {
|
|
10196
10196
|
const t = this.cache;
|
|
10197
10197
|
if (e.x !== void 0)
|
|
10198
10198
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z || t[3] !== e.w) && (s.uniform4f(this.addr, e.x, e.y, e.z, e.w), t[0] = e.x, t[1] = e.y, t[2] = e.z, t[3] = e.w);
|
|
@@ -10202,7 +10202,7 @@ function gV(s, e) {
|
|
|
10202
10202
|
s.uniform4fv(this.addr, e), Jn(t, e);
|
|
10203
10203
|
}
|
|
10204
10204
|
}
|
|
10205
|
-
function
|
|
10205
|
+
function v5(s, e) {
|
|
10206
10206
|
const t = this.cache, i = e.elements;
|
|
10207
10207
|
if (i === void 0) {
|
|
10208
10208
|
if (Yn(t, e))
|
|
@@ -10214,7 +10214,7 @@ function vV(s, e) {
|
|
|
10214
10214
|
dP.set(i), s.uniformMatrix2fv(this.addr, !1, dP), Jn(t, i);
|
|
10215
10215
|
}
|
|
10216
10216
|
}
|
|
10217
|
-
function
|
|
10217
|
+
function A5(s, e) {
|
|
10218
10218
|
const t = this.cache, i = e.elements;
|
|
10219
10219
|
if (i === void 0) {
|
|
10220
10220
|
if (Yn(t, e))
|
|
@@ -10226,7 +10226,7 @@ function AV(s, e) {
|
|
|
10226
10226
|
uP.set(i), s.uniformMatrix3fv(this.addr, !1, uP), Jn(t, i);
|
|
10227
10227
|
}
|
|
10228
10228
|
}
|
|
10229
|
-
function
|
|
10229
|
+
function y5(s, e) {
|
|
10230
10230
|
const t = this.cache, i = e.elements;
|
|
10231
10231
|
if (i === void 0) {
|
|
10232
10232
|
if (Yn(t, e))
|
|
@@ -10238,11 +10238,11 @@ function yV(s, e) {
|
|
|
10238
10238
|
hP.set(i), s.uniformMatrix4fv(this.addr, !1, hP), Jn(t, i);
|
|
10239
10239
|
}
|
|
10240
10240
|
}
|
|
10241
|
-
function
|
|
10241
|
+
function _5(s, e) {
|
|
10242
10242
|
const t = this.cache;
|
|
10243
10243
|
t[0] !== e && (s.uniform1i(this.addr, e), t[0] = e);
|
|
10244
10244
|
}
|
|
10245
|
-
function
|
|
10245
|
+
function b5(s, e) {
|
|
10246
10246
|
const t = this.cache;
|
|
10247
10247
|
if (e.x !== void 0)
|
|
10248
10248
|
(t[0] !== e.x || t[1] !== e.y) && (s.uniform2i(this.addr, e.x, e.y), t[0] = e.x, t[1] = e.y);
|
|
@@ -10252,7 +10252,7 @@ function bV(s, e) {
|
|
|
10252
10252
|
s.uniform2iv(this.addr, e), Jn(t, e);
|
|
10253
10253
|
}
|
|
10254
10254
|
}
|
|
10255
|
-
function
|
|
10255
|
+
function x5(s, e) {
|
|
10256
10256
|
const t = this.cache;
|
|
10257
10257
|
if (e.x !== void 0)
|
|
10258
10258
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z) && (s.uniform3i(this.addr, e.x, e.y, e.z), t[0] = e.x, t[1] = e.y, t[2] = e.z);
|
|
@@ -10262,7 +10262,7 @@ function xV(s, e) {
|
|
|
10262
10262
|
s.uniform3iv(this.addr, e), Jn(t, e);
|
|
10263
10263
|
}
|
|
10264
10264
|
}
|
|
10265
|
-
function
|
|
10265
|
+
function w5(s, e) {
|
|
10266
10266
|
const t = this.cache;
|
|
10267
10267
|
if (e.x !== void 0)
|
|
10268
10268
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z || t[3] !== e.w) && (s.uniform4i(this.addr, e.x, e.y, e.z, e.w), t[0] = e.x, t[1] = e.y, t[2] = e.z, t[3] = e.w);
|
|
@@ -10272,11 +10272,11 @@ function wV(s, e) {
|
|
|
10272
10272
|
s.uniform4iv(this.addr, e), Jn(t, e);
|
|
10273
10273
|
}
|
|
10274
10274
|
}
|
|
10275
|
-
function
|
|
10275
|
+
function S5(s, e) {
|
|
10276
10276
|
const t = this.cache;
|
|
10277
10277
|
t[0] !== e && (s.uniform1ui(this.addr, e), t[0] = e);
|
|
10278
10278
|
}
|
|
10279
|
-
function
|
|
10279
|
+
function C5(s, e) {
|
|
10280
10280
|
const t = this.cache;
|
|
10281
10281
|
if (e.x !== void 0)
|
|
10282
10282
|
(t[0] !== e.x || t[1] !== e.y) && (s.uniform2ui(this.addr, e.x, e.y), t[0] = e.x, t[1] = e.y);
|
|
@@ -10286,7 +10286,7 @@ function CV(s, e) {
|
|
|
10286
10286
|
s.uniform2uiv(this.addr, e), Jn(t, e);
|
|
10287
10287
|
}
|
|
10288
10288
|
}
|
|
10289
|
-
function
|
|
10289
|
+
function E5(s, e) {
|
|
10290
10290
|
const t = this.cache;
|
|
10291
10291
|
if (e.x !== void 0)
|
|
10292
10292
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z) && (s.uniform3ui(this.addr, e.x, e.y, e.z), t[0] = e.x, t[1] = e.y, t[2] = e.z);
|
|
@@ -10296,7 +10296,7 @@ function EV(s, e) {
|
|
|
10296
10296
|
s.uniform3uiv(this.addr, e), Jn(t, e);
|
|
10297
10297
|
}
|
|
10298
10298
|
}
|
|
10299
|
-
function
|
|
10299
|
+
function M5(s, e) {
|
|
10300
10300
|
const t = this.cache;
|
|
10301
10301
|
if (e.x !== void 0)
|
|
10302
10302
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z || t[3] !== e.w) && (s.uniform4ui(this.addr, e.x, e.y, e.z, e.w), t[0] = e.x, t[1] = e.y, t[2] = e.z, t[3] = e.w);
|
|
@@ -10306,226 +10306,226 @@ function MV(s, e) {
|
|
|
10306
10306
|
s.uniform4uiv(this.addr, e), Jn(t, e);
|
|
10307
10307
|
}
|
|
10308
10308
|
}
|
|
10309
|
-
function
|
|
10309
|
+
function T5(s, e, t) {
|
|
10310
10310
|
const i = this.cache, n = t.allocateTextureUnit();
|
|
10311
10311
|
i[0] !== n && (s.uniform1i(this.addr, n), i[0] = n);
|
|
10312
10312
|
const r = this.type === s.SAMPLER_2D_SHADOW ? Fk : kk;
|
|
10313
10313
|
t.setTexture2D(e || r, n);
|
|
10314
10314
|
}
|
|
10315
|
-
function
|
|
10315
|
+
function I5(s, e, t) {
|
|
10316
10316
|
const i = this.cache, n = t.allocateTextureUnit();
|
|
10317
10317
|
i[0] !== n && (s.uniform1i(this.addr, n), i[0] = n), t.setTexture3D(e || Nk, n);
|
|
10318
10318
|
}
|
|
10319
|
-
function
|
|
10319
|
+
function R5(s, e, t) {
|
|
10320
10320
|
const i = this.cache, n = t.allocateTextureUnit();
|
|
10321
10321
|
i[0] !== n && (s.uniform1i(this.addr, n), i[0] = n), t.setTextureCube(e || zk, n);
|
|
10322
10322
|
}
|
|
10323
|
-
function
|
|
10323
|
+
function P5(s, e, t) {
|
|
10324
10324
|
const i = this.cache, n = t.allocateTextureUnit();
|
|
10325
10325
|
i[0] !== n && (s.uniform1i(this.addr, n), i[0] = n), t.setTexture2DArray(e || Uk, n);
|
|
10326
10326
|
}
|
|
10327
|
-
function
|
|
10327
|
+
function B5(s) {
|
|
10328
10328
|
switch (s) {
|
|
10329
10329
|
case 5126:
|
|
10330
|
-
return
|
|
10330
|
+
return f5;
|
|
10331
10331
|
case 35664:
|
|
10332
|
-
return
|
|
10332
|
+
return p5;
|
|
10333
10333
|
case 35665:
|
|
10334
|
-
return
|
|
10334
|
+
return m5;
|
|
10335
10335
|
case 35666:
|
|
10336
|
-
return
|
|
10336
|
+
return g5;
|
|
10337
10337
|
case 35674:
|
|
10338
|
-
return
|
|
10338
|
+
return v5;
|
|
10339
10339
|
case 35675:
|
|
10340
|
-
return
|
|
10340
|
+
return A5;
|
|
10341
10341
|
case 35676:
|
|
10342
|
-
return
|
|
10342
|
+
return y5;
|
|
10343
10343
|
case 5124:
|
|
10344
10344
|
case 35670:
|
|
10345
|
-
return
|
|
10345
|
+
return _5;
|
|
10346
10346
|
case 35667:
|
|
10347
10347
|
case 35671:
|
|
10348
|
-
return
|
|
10348
|
+
return b5;
|
|
10349
10349
|
case 35668:
|
|
10350
10350
|
case 35672:
|
|
10351
|
-
return
|
|
10351
|
+
return x5;
|
|
10352
10352
|
case 35669:
|
|
10353
10353
|
case 35673:
|
|
10354
|
-
return
|
|
10354
|
+
return w5;
|
|
10355
10355
|
case 5125:
|
|
10356
|
-
return
|
|
10356
|
+
return S5;
|
|
10357
10357
|
case 36294:
|
|
10358
|
-
return
|
|
10358
|
+
return C5;
|
|
10359
10359
|
case 36295:
|
|
10360
|
-
return
|
|
10360
|
+
return E5;
|
|
10361
10361
|
case 36296:
|
|
10362
|
-
return
|
|
10362
|
+
return M5;
|
|
10363
10363
|
case 35678:
|
|
10364
10364
|
case 36198:
|
|
10365
10365
|
case 36298:
|
|
10366
10366
|
case 36306:
|
|
10367
10367
|
case 35682:
|
|
10368
|
-
return
|
|
10368
|
+
return T5;
|
|
10369
10369
|
case 35679:
|
|
10370
10370
|
case 36299:
|
|
10371
10371
|
case 36307:
|
|
10372
|
-
return
|
|
10372
|
+
return I5;
|
|
10373
10373
|
case 35680:
|
|
10374
10374
|
case 36300:
|
|
10375
10375
|
case 36308:
|
|
10376
10376
|
case 36293:
|
|
10377
|
-
return
|
|
10377
|
+
return R5;
|
|
10378
10378
|
case 36289:
|
|
10379
10379
|
case 36303:
|
|
10380
10380
|
case 36311:
|
|
10381
10381
|
case 36292:
|
|
10382
|
-
return
|
|
10382
|
+
return P5;
|
|
10383
10383
|
}
|
|
10384
10384
|
}
|
|
10385
|
-
function
|
|
10385
|
+
function D5(s, e) {
|
|
10386
10386
|
s.uniform1fv(this.addr, e);
|
|
10387
10387
|
}
|
|
10388
|
-
function
|
|
10388
|
+
function O5(s, e) {
|
|
10389
10389
|
const t = fp(e, this.size, 2);
|
|
10390
10390
|
s.uniform2fv(this.addr, t);
|
|
10391
10391
|
}
|
|
10392
|
-
function
|
|
10392
|
+
function L5(s, e) {
|
|
10393
10393
|
const t = fp(e, this.size, 3);
|
|
10394
10394
|
s.uniform3fv(this.addr, t);
|
|
10395
10395
|
}
|
|
10396
|
-
function
|
|
10396
|
+
function k5(s, e) {
|
|
10397
10397
|
const t = fp(e, this.size, 4);
|
|
10398
10398
|
s.uniform4fv(this.addr, t);
|
|
10399
10399
|
}
|
|
10400
|
-
function
|
|
10400
|
+
function F5(s, e) {
|
|
10401
10401
|
const t = fp(e, this.size, 4);
|
|
10402
10402
|
s.uniformMatrix2fv(this.addr, !1, t);
|
|
10403
10403
|
}
|
|
10404
|
-
function
|
|
10404
|
+
function U5(s, e) {
|
|
10405
10405
|
const t = fp(e, this.size, 9);
|
|
10406
10406
|
s.uniformMatrix3fv(this.addr, !1, t);
|
|
10407
10407
|
}
|
|
10408
|
-
function
|
|
10408
|
+
function N5(s, e) {
|
|
10409
10409
|
const t = fp(e, this.size, 16);
|
|
10410
10410
|
s.uniformMatrix4fv(this.addr, !1, t);
|
|
10411
10411
|
}
|
|
10412
|
-
function
|
|
10412
|
+
function z5(s, e) {
|
|
10413
10413
|
s.uniform1iv(this.addr, e);
|
|
10414
10414
|
}
|
|
10415
|
-
function
|
|
10415
|
+
function G5(s, e) {
|
|
10416
10416
|
s.uniform2iv(this.addr, e);
|
|
10417
10417
|
}
|
|
10418
|
-
function
|
|
10418
|
+
function H5(s, e) {
|
|
10419
10419
|
s.uniform3iv(this.addr, e);
|
|
10420
10420
|
}
|
|
10421
|
-
function
|
|
10421
|
+
function Q5(s, e) {
|
|
10422
10422
|
s.uniform4iv(this.addr, e);
|
|
10423
10423
|
}
|
|
10424
|
-
function
|
|
10424
|
+
function V5(s, e) {
|
|
10425
10425
|
s.uniform1uiv(this.addr, e);
|
|
10426
10426
|
}
|
|
10427
|
-
function
|
|
10427
|
+
function j5(s, e) {
|
|
10428
10428
|
s.uniform2uiv(this.addr, e);
|
|
10429
10429
|
}
|
|
10430
|
-
function
|
|
10430
|
+
function W5(s, e) {
|
|
10431
10431
|
s.uniform3uiv(this.addr, e);
|
|
10432
10432
|
}
|
|
10433
|
-
function
|
|
10433
|
+
function q5(s, e) {
|
|
10434
10434
|
s.uniform4uiv(this.addr, e);
|
|
10435
10435
|
}
|
|
10436
|
-
function
|
|
10436
|
+
function X5(s, e, t) {
|
|
10437
10437
|
const i = this.cache, n = e.length, r = Eb(t, n);
|
|
10438
10438
|
Yn(i, r) || (s.uniform1iv(this.addr, r), Jn(i, r));
|
|
10439
10439
|
for (let o = 0; o !== n; ++o)
|
|
10440
10440
|
t.setTexture2D(e[o] || kk, r[o]);
|
|
10441
10441
|
}
|
|
10442
|
-
function
|
|
10442
|
+
function Y5(s, e, t) {
|
|
10443
10443
|
const i = this.cache, n = e.length, r = Eb(t, n);
|
|
10444
10444
|
Yn(i, r) || (s.uniform1iv(this.addr, r), Jn(i, r));
|
|
10445
10445
|
for (let o = 0; o !== n; ++o)
|
|
10446
10446
|
t.setTexture3D(e[o] || Nk, r[o]);
|
|
10447
10447
|
}
|
|
10448
|
-
function
|
|
10448
|
+
function J5(s, e, t) {
|
|
10449
10449
|
const i = this.cache, n = e.length, r = Eb(t, n);
|
|
10450
10450
|
Yn(i, r) || (s.uniform1iv(this.addr, r), Jn(i, r));
|
|
10451
10451
|
for (let o = 0; o !== n; ++o)
|
|
10452
10452
|
t.setTextureCube(e[o] || zk, r[o]);
|
|
10453
10453
|
}
|
|
10454
|
-
function
|
|
10454
|
+
function K5(s, e, t) {
|
|
10455
10455
|
const i = this.cache, n = e.length, r = Eb(t, n);
|
|
10456
10456
|
Yn(i, r) || (s.uniform1iv(this.addr, r), Jn(i, r));
|
|
10457
10457
|
for (let o = 0; o !== n; ++o)
|
|
10458
10458
|
t.setTexture2DArray(e[o] || Uk, r[o]);
|
|
10459
10459
|
}
|
|
10460
|
-
function
|
|
10460
|
+
function Z5(s) {
|
|
10461
10461
|
switch (s) {
|
|
10462
10462
|
case 5126:
|
|
10463
|
-
return
|
|
10463
|
+
return D5;
|
|
10464
10464
|
case 35664:
|
|
10465
|
-
return
|
|
10465
|
+
return O5;
|
|
10466
10466
|
case 35665:
|
|
10467
|
-
return
|
|
10467
|
+
return L5;
|
|
10468
10468
|
case 35666:
|
|
10469
|
-
return
|
|
10469
|
+
return k5;
|
|
10470
10470
|
case 35674:
|
|
10471
|
-
return
|
|
10471
|
+
return F5;
|
|
10472
10472
|
case 35675:
|
|
10473
|
-
return
|
|
10473
|
+
return U5;
|
|
10474
10474
|
case 35676:
|
|
10475
|
-
return
|
|
10475
|
+
return N5;
|
|
10476
10476
|
case 5124:
|
|
10477
10477
|
case 35670:
|
|
10478
|
-
return
|
|
10478
|
+
return z5;
|
|
10479
10479
|
case 35667:
|
|
10480
10480
|
case 35671:
|
|
10481
|
-
return
|
|
10481
|
+
return G5;
|
|
10482
10482
|
case 35668:
|
|
10483
10483
|
case 35672:
|
|
10484
|
-
return
|
|
10484
|
+
return H5;
|
|
10485
10485
|
case 35669:
|
|
10486
10486
|
case 35673:
|
|
10487
|
-
return
|
|
10487
|
+
return Q5;
|
|
10488
10488
|
case 5125:
|
|
10489
|
-
return
|
|
10489
|
+
return V5;
|
|
10490
10490
|
case 36294:
|
|
10491
|
-
return
|
|
10491
|
+
return j5;
|
|
10492
10492
|
case 36295:
|
|
10493
|
-
return
|
|
10493
|
+
return W5;
|
|
10494
10494
|
case 36296:
|
|
10495
|
-
return
|
|
10495
|
+
return q5;
|
|
10496
10496
|
case 35678:
|
|
10497
10497
|
case 36198:
|
|
10498
10498
|
case 36298:
|
|
10499
10499
|
case 36306:
|
|
10500
10500
|
case 35682:
|
|
10501
|
-
return
|
|
10501
|
+
return X5;
|
|
10502
10502
|
case 35679:
|
|
10503
10503
|
case 36299:
|
|
10504
10504
|
case 36307:
|
|
10505
|
-
return
|
|
10505
|
+
return Y5;
|
|
10506
10506
|
case 35680:
|
|
10507
10507
|
case 36300:
|
|
10508
10508
|
case 36308:
|
|
10509
10509
|
case 36293:
|
|
10510
|
-
return
|
|
10510
|
+
return J5;
|
|
10511
10511
|
case 36289:
|
|
10512
10512
|
case 36303:
|
|
10513
10513
|
case 36311:
|
|
10514
10514
|
case 36292:
|
|
10515
|
-
return
|
|
10515
|
+
return K5;
|
|
10516
10516
|
}
|
|
10517
10517
|
}
|
|
10518
|
-
class $
|
|
10518
|
+
class $5 {
|
|
10519
10519
|
constructor(e, t, i) {
|
|
10520
|
-
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.setValue =
|
|
10520
|
+
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.setValue = B5(t.type);
|
|
10521
10521
|
}
|
|
10522
10522
|
}
|
|
10523
|
-
class
|
|
10523
|
+
class eV {
|
|
10524
10524
|
constructor(e, t, i) {
|
|
10525
|
-
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.size = t.size, this.setValue =
|
|
10525
|
+
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.size = t.size, this.setValue = Z5(t.type);
|
|
10526
10526
|
}
|
|
10527
10527
|
}
|
|
10528
|
-
class
|
|
10528
|
+
class tV {
|
|
10529
10529
|
constructor(e) {
|
|
10530
10530
|
this.id = e, this.seq = [], this.map = {};
|
|
10531
10531
|
}
|
|
@@ -10541,18 +10541,18 @@ const qw = /(\w+)(\])?(\[|\.)?/g;
|
|
|
10541
10541
|
function fP(s, e) {
|
|
10542
10542
|
s.seq.push(e), s.map[e.id] = e;
|
|
10543
10543
|
}
|
|
10544
|
-
function
|
|
10544
|
+
function iV(s, e, t) {
|
|
10545
10545
|
const i = s.name, n = i.length;
|
|
10546
10546
|
for (qw.lastIndex = 0; ; ) {
|
|
10547
10547
|
const r = qw.exec(i), o = qw.lastIndex;
|
|
10548
10548
|
let a = r[1];
|
|
10549
10549
|
const l = r[2] === "]", c = r[3];
|
|
10550
10550
|
if (l && (a = a | 0), c === void 0 || c === "[" && o + 2 === n) {
|
|
10551
|
-
fP(t, c === void 0 ? new $
|
|
10551
|
+
fP(t, c === void 0 ? new $5(a, s, e) : new eV(a, s, e));
|
|
10552
10552
|
break;
|
|
10553
10553
|
} else {
|
|
10554
10554
|
let d = t.map[a];
|
|
10555
|
-
d === void 0 && (d = new
|
|
10555
|
+
d === void 0 && (d = new tV(a), fP(t, d)), t = d;
|
|
10556
10556
|
}
|
|
10557
10557
|
}
|
|
10558
10558
|
}
|
|
@@ -10562,7 +10562,7 @@ class T0 {
|
|
|
10562
10562
|
const i = e.getProgramParameter(t, e.ACTIVE_UNIFORMS);
|
|
10563
10563
|
for (let n = 0; n < i; ++n) {
|
|
10564
10564
|
const r = e.getActiveUniform(t, n), o = e.getUniformLocation(t, r.name);
|
|
10565
|
-
|
|
10565
|
+
iV(r, o, this);
|
|
10566
10566
|
}
|
|
10567
10567
|
}
|
|
10568
10568
|
setValue(e, t, i, n) {
|
|
@@ -10592,9 +10592,9 @@ function pP(s, e, t) {
|
|
|
10592
10592
|
const i = s.createShader(e);
|
|
10593
10593
|
return s.shaderSource(i, t), s.compileShader(i), i;
|
|
10594
10594
|
}
|
|
10595
|
-
const
|
|
10596
|
-
let
|
|
10597
|
-
function
|
|
10595
|
+
const nV = 37297;
|
|
10596
|
+
let sV = 0;
|
|
10597
|
+
function rV(s, e) {
|
|
10598
10598
|
const t = s.split(`
|
|
10599
10599
|
`), i = [], n = Math.max(e - 6, 0), r = Math.min(e + 6, t.length);
|
|
10600
10600
|
for (let o = n; o < r; o++) {
|
|
@@ -10604,7 +10604,7 @@ function r5(s, e) {
|
|
|
10604
10604
|
return i.join(`
|
|
10605
10605
|
`);
|
|
10606
10606
|
}
|
|
10607
|
-
function
|
|
10607
|
+
function oV(s) {
|
|
10608
10608
|
const e = gi.getPrimaries(gi.workingColorSpace), t = gi.getPrimaries(s);
|
|
10609
10609
|
let i;
|
|
10610
10610
|
switch (e === t ? i = "" : e === Wg && t === jg ? i = "LinearDisplayP3ToLinearSRGB" : e === jg && t === Wg && (i = "LinearSRGBToLinearDisplayP3"), s) {
|
|
@@ -10629,15 +10629,15 @@ function mP(s, e, t) {
|
|
|
10629
10629
|
|
|
10630
10630
|
` + n + `
|
|
10631
10631
|
|
|
10632
|
-
` +
|
|
10632
|
+
` + rV(s.getShaderSource(e), o);
|
|
10633
10633
|
} else
|
|
10634
10634
|
return n;
|
|
10635
10635
|
}
|
|
10636
|
-
function
|
|
10637
|
-
const t =
|
|
10636
|
+
function aV(s, e) {
|
|
10637
|
+
const t = oV(e);
|
|
10638
10638
|
return `vec4 ${s}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`;
|
|
10639
10639
|
}
|
|
10640
|
-
function
|
|
10640
|
+
function lV(s, e) {
|
|
10641
10641
|
let t;
|
|
10642
10642
|
switch (e) {
|
|
10643
10643
|
case Qf:
|
|
@@ -10666,7 +10666,7 @@ function l5(s, e) {
|
|
|
10666
10666
|
}
|
|
10667
10667
|
return "vec3 " + s + "( vec3 color ) { return " + t + "ToneMapping( color ); }";
|
|
10668
10668
|
}
|
|
10669
|
-
function
|
|
10669
|
+
function cV(s) {
|
|
10670
10670
|
return [
|
|
10671
10671
|
s.extensionDerivatives || s.envMapCubeUVHeight || s.bumpMap || s.normalMapTangentSpace || s.clearcoatNormalMap || s.flatShading || s.alphaToCoverage || s.shaderID === "physical" ? "#extension GL_OES_standard_derivatives : enable" : "",
|
|
10672
10672
|
(s.extensionFragDepth || s.logarithmicDepthBuffer) && s.rendererExtensionFragDepth ? "#extension GL_EXT_frag_depth : enable" : "",
|
|
@@ -10675,14 +10675,14 @@ function c5(s) {
|
|
|
10675
10675
|
].filter(gf).join(`
|
|
10676
10676
|
`);
|
|
10677
10677
|
}
|
|
10678
|
-
function
|
|
10678
|
+
function hV(s) {
|
|
10679
10679
|
return [
|
|
10680
10680
|
s.extensionClipCullDistance ? "#extension GL_ANGLE_clip_cull_distance : require" : "",
|
|
10681
10681
|
s.extensionMultiDraw ? "#extension GL_ANGLE_multi_draw : require" : ""
|
|
10682
10682
|
].filter(gf).join(`
|
|
10683
10683
|
`);
|
|
10684
10684
|
}
|
|
10685
|
-
function
|
|
10685
|
+
function uV(s) {
|
|
10686
10686
|
const e = [];
|
|
10687
10687
|
for (const t in s) {
|
|
10688
10688
|
const i = s[t];
|
|
@@ -10691,7 +10691,7 @@ function u5(s) {
|
|
|
10691
10691
|
return e.join(`
|
|
10692
10692
|
`);
|
|
10693
10693
|
}
|
|
10694
|
-
function
|
|
10694
|
+
function dV(s, e) {
|
|
10695
10695
|
const t = {}, i = s.getProgramParameter(e, s.ACTIVE_ATTRIBUTES);
|
|
10696
10696
|
for (let n = 0; n < i; n++) {
|
|
10697
10697
|
const r = s.getActiveAttrib(e, n), o = r.name;
|
|
@@ -10714,11 +10714,11 @@ function gP(s, e) {
|
|
|
10714
10714
|
function vP(s, e) {
|
|
10715
10715
|
return s.replace(/NUM_CLIPPING_PLANES/g, e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, e.numClippingPlanes - e.numClipIntersection);
|
|
10716
10716
|
}
|
|
10717
|
-
const
|
|
10717
|
+
const fV = /^[ \t]*#include +<([\w\d./]+)>/gm;
|
|
10718
10718
|
function IE(s) {
|
|
10719
|
-
return s.replace(
|
|
10719
|
+
return s.replace(fV, mV);
|
|
10720
10720
|
}
|
|
10721
|
-
const
|
|
10721
|
+
const pV = /* @__PURE__ */ new Map([
|
|
10722
10722
|
["encodings_fragment", "colorspace_fragment"],
|
|
10723
10723
|
// @deprecated, r154
|
|
10724
10724
|
["encodings_pars_fragment", "colorspace_pars_fragment"],
|
|
@@ -10726,10 +10726,10 @@ const p5 = /* @__PURE__ */ new Map([
|
|
|
10726
10726
|
["output_fragment", "opaque_fragment"]
|
|
10727
10727
|
// @deprecated, r154
|
|
10728
10728
|
]);
|
|
10729
|
-
function
|
|
10729
|
+
function mV(s, e) {
|
|
10730
10730
|
let t = Ht[e];
|
|
10731
10731
|
if (t === void 0) {
|
|
10732
|
-
const i =
|
|
10732
|
+
const i = pV.get(e);
|
|
10733
10733
|
if (i !== void 0)
|
|
10734
10734
|
t = Ht[i], console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.', e, i);
|
|
10735
10735
|
else
|
|
@@ -10737,11 +10737,11 @@ function m5(s, e) {
|
|
|
10737
10737
|
}
|
|
10738
10738
|
return IE(t);
|
|
10739
10739
|
}
|
|
10740
|
-
const
|
|
10740
|
+
const gV = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
|
|
10741
10741
|
function AP(s) {
|
|
10742
|
-
return s.replace(
|
|
10742
|
+
return s.replace(gV, vV);
|
|
10743
10743
|
}
|
|
10744
|
-
function
|
|
10744
|
+
function vV(s, e, t, i) {
|
|
10745
10745
|
let n = "";
|
|
10746
10746
|
for (let r = parseInt(e); r < parseInt(t); r++)
|
|
10747
10747
|
n += i.replace(/\[\s*i\s*\]/g, "[ " + r + " ]").replace(/UNROLLED_LOOP_INDEX/g, r);
|
|
@@ -10771,11 +10771,11 @@ function yP(s) {
|
|
|
10771
10771
|
#define MEDIUM_PRECISION` : s.precision === "lowp" && (e += `
|
|
10772
10772
|
#define LOW_PRECISION`), e;
|
|
10773
10773
|
}
|
|
10774
|
-
function
|
|
10774
|
+
function AV(s) {
|
|
10775
10775
|
let e = "SHADOWMAP_TYPE_BASIC";
|
|
10776
10776
|
return s.shadowMapType === fM ? e = "SHADOWMAP_TYPE_PCF" : s.shadowMapType === pM ? e = "SHADOWMAP_TYPE_PCF_SOFT" : s.shadowMapType === Ua && (e = "SHADOWMAP_TYPE_VSM"), e;
|
|
10777
10777
|
}
|
|
10778
|
-
function
|
|
10778
|
+
function yV(s) {
|
|
10779
10779
|
let e = "ENVMAP_TYPE_CUBE";
|
|
10780
10780
|
if (s.envMap)
|
|
10781
10781
|
switch (s.envMapMode) {
|
|
@@ -10789,7 +10789,7 @@ function y5(s) {
|
|
|
10789
10789
|
}
|
|
10790
10790
|
return e;
|
|
10791
10791
|
}
|
|
10792
|
-
function
|
|
10792
|
+
function _V(s) {
|
|
10793
10793
|
let e = "ENVMAP_MODE_REFLECTION";
|
|
10794
10794
|
if (s.envMap)
|
|
10795
10795
|
switch (s.envMapMode) {
|
|
@@ -10799,7 +10799,7 @@ function _5(s) {
|
|
|
10799
10799
|
}
|
|
10800
10800
|
return e;
|
|
10801
10801
|
}
|
|
10802
|
-
function
|
|
10802
|
+
function bV(s) {
|
|
10803
10803
|
let e = "ENVMAP_BLENDING_NONE";
|
|
10804
10804
|
if (s.envMap)
|
|
10805
10805
|
switch (s.combine) {
|
|
@@ -10815,17 +10815,17 @@ function b5(s) {
|
|
|
10815
10815
|
}
|
|
10816
10816
|
return e;
|
|
10817
10817
|
}
|
|
10818
|
-
function
|
|
10818
|
+
function xV(s) {
|
|
10819
10819
|
const e = s.envMapCubeUVHeight;
|
|
10820
10820
|
if (e === null)
|
|
10821
10821
|
return null;
|
|
10822
10822
|
const t = Math.log2(e) - 2, i = 1 / e;
|
|
10823
10823
|
return { texelWidth: 1 / (3 * Math.max(Math.pow(2, t), 7 * 16)), texelHeight: i, maxMip: t };
|
|
10824
10824
|
}
|
|
10825
|
-
function
|
|
10825
|
+
function wV(s, e, t, i) {
|
|
10826
10826
|
const n = s.getContext(), r = t.defines;
|
|
10827
10827
|
let o = t.vertexShader, a = t.fragmentShader;
|
|
10828
|
-
const l =
|
|
10828
|
+
const l = AV(t), c = yV(t), u = _V(t), d = bV(t), f = xV(t), p = t.isWebGL2 ? "" : cV(t), m = hV(t), A = uV(r), g = n.createProgram();
|
|
10829
10829
|
let v, _, y = t.glslVersion ? "#version " + t.glslVersion + `
|
|
10830
10830
|
` : "";
|
|
10831
10831
|
t.isRawShaderMaterial ? (v = [
|
|
@@ -11065,12 +11065,12 @@ function w5(s, e, t, i) {
|
|
|
11065
11065
|
t.toneMapping !== Nr ? "#define TONE_MAPPING" : "",
|
|
11066
11066
|
t.toneMapping !== Nr ? Ht.tonemapping_pars_fragment : "",
|
|
11067
11067
|
// this code is required here because it is used by the toneMapping() function defined below
|
|
11068
|
-
t.toneMapping !== Nr ?
|
|
11068
|
+
t.toneMapping !== Nr ? lV("toneMapping", t.toneMapping) : "",
|
|
11069
11069
|
t.dithering ? "#define DITHERING" : "",
|
|
11070
11070
|
t.opaque ? "#define OPAQUE" : "",
|
|
11071
11071
|
Ht.colorspace_pars_fragment,
|
|
11072
11072
|
// this code is required here because it is used by the various encoding/decoding function defined below
|
|
11073
|
-
|
|
11073
|
+
aV("linearToOutputTexel", t.outputColorSpace),
|
|
11074
11074
|
t.useDepthPacking ? "#define DEPTH_PACKING " + t.depthPacking : "",
|
|
11075
11075
|
`
|
|
11076
11076
|
`
|
|
@@ -11139,7 +11139,7 @@ Program Info Log: ` + U + `
|
|
|
11139
11139
|
}
|
|
11140
11140
|
});
|
|
11141
11141
|
}
|
|
11142
|
-
n.deleteShader(E), n.deleteShader(T), P = new T0(n, g), S =
|
|
11142
|
+
n.deleteShader(E), n.deleteShader(T), P = new T0(n, g), S = dV(n, g);
|
|
11143
11143
|
}
|
|
11144
11144
|
let P;
|
|
11145
11145
|
this.getUniforms = function() {
|
|
@@ -11151,13 +11151,13 @@ Program Info Log: ` + U + `
|
|
|
11151
11151
|
};
|
|
11152
11152
|
let I = t.rendererExtensionParallelShaderCompile === !1;
|
|
11153
11153
|
return this.isReady = function() {
|
|
11154
|
-
return I === !1 && (I = n.getProgramParameter(g,
|
|
11154
|
+
return I === !1 && (I = n.getProgramParameter(g, nV)), I;
|
|
11155
11155
|
}, this.destroy = function() {
|
|
11156
11156
|
i.releaseStatesOfProgram(this), n.deleteProgram(g), this.program = void 0;
|
|
11157
|
-
}, this.type = t.shaderType, this.name = t.shaderName, this.id =
|
|
11157
|
+
}, this.type = t.shaderType, this.name = t.shaderName, this.id = sV++, this.cacheKey = e, this.usedTimes = 1, this.program = g, this.vertexShader = E, this.fragmentShader = T, this;
|
|
11158
11158
|
}
|
|
11159
|
-
let
|
|
11160
|
-
class
|
|
11159
|
+
let SV = 0;
|
|
11160
|
+
class CV {
|
|
11161
11161
|
constructor() {
|
|
11162
11162
|
this.shaderCache = /* @__PURE__ */ new Map(), this.materialCache = /* @__PURE__ */ new Map();
|
|
11163
11163
|
}
|
|
@@ -11188,16 +11188,16 @@ class C5 {
|
|
|
11188
11188
|
_getShaderStage(e) {
|
|
11189
11189
|
const t = this.shaderCache;
|
|
11190
11190
|
let i = t.get(e);
|
|
11191
|
-
return i === void 0 && (i = new
|
|
11191
|
+
return i === void 0 && (i = new EV(e), t.set(e, i)), i;
|
|
11192
11192
|
}
|
|
11193
11193
|
}
|
|
11194
|
-
class
|
|
11194
|
+
class EV {
|
|
11195
11195
|
constructor(e) {
|
|
11196
|
-
this.id =
|
|
11196
|
+
this.id = SV++, this.code = e, this.usedTimes = 0;
|
|
11197
11197
|
}
|
|
11198
11198
|
}
|
|
11199
|
-
function
|
|
11200
|
-
const a = new $s(), l = new
|
|
11199
|
+
function MV(s, e, t, i, n, r, o) {
|
|
11200
|
+
const a = new $s(), l = new CV(), c = /* @__PURE__ */ new Set(), u = [], d = n.isWebGL2, f = n.logarithmicDepthBuffer, p = n.vertexTextures;
|
|
11201
11201
|
let m = n.precision;
|
|
11202
11202
|
const A = {
|
|
11203
11203
|
MeshDepthMaterial: "depth",
|
|
@@ -11405,7 +11405,7 @@ function M5(s, e, t, i, n, r, o) {
|
|
|
11405
11405
|
break;
|
|
11406
11406
|
}
|
|
11407
11407
|
}
|
|
11408
|
-
return H === void 0 && (H = new
|
|
11408
|
+
return H === void 0 && (H = new wV(s, I, S, r), u.push(H)), H;
|
|
11409
11409
|
}
|
|
11410
11410
|
function T(S) {
|
|
11411
11411
|
if (--S.usedTimes === 0) {
|
|
@@ -11431,7 +11431,7 @@ function M5(s, e, t, i, n, r, o) {
|
|
|
11431
11431
|
dispose: P
|
|
11432
11432
|
};
|
|
11433
11433
|
}
|
|
11434
|
-
function
|
|
11434
|
+
function TV() {
|
|
11435
11435
|
let s = /* @__PURE__ */ new WeakMap();
|
|
11436
11436
|
function e(r) {
|
|
11437
11437
|
let o = s.get(r);
|
|
@@ -11453,7 +11453,7 @@ function T5() {
|
|
|
11453
11453
|
dispose: n
|
|
11454
11454
|
};
|
|
11455
11455
|
}
|
|
11456
|
-
function
|
|
11456
|
+
function IV(s, e) {
|
|
11457
11457
|
return s.groupOrder !== e.groupOrder ? s.groupOrder - e.groupOrder : s.renderOrder !== e.renderOrder ? s.renderOrder - e.renderOrder : s.material.id !== e.material.id ? s.material.id - e.material.id : s.z !== e.z ? s.z - e.z : s.id - e.id;
|
|
11458
11458
|
}
|
|
11459
11459
|
function _P(s, e) {
|
|
@@ -11488,7 +11488,7 @@ function bP() {
|
|
|
11488
11488
|
p.transmission > 0 ? i.unshift(v) : p.transparent === !0 ? n.unshift(v) : t.unshift(v);
|
|
11489
11489
|
}
|
|
11490
11490
|
function c(d, f) {
|
|
11491
|
-
t.length > 1 && t.sort(d ||
|
|
11491
|
+
t.length > 1 && t.sort(d || IV), i.length > 1 && i.sort(f || _P), n.length > 1 && n.sort(f || _P);
|
|
11492
11492
|
}
|
|
11493
11493
|
function u() {
|
|
11494
11494
|
for (let d = e, f = s.length; d < f; d++) {
|
|
@@ -11509,7 +11509,7 @@ function bP() {
|
|
|
11509
11509
|
sort: c
|
|
11510
11510
|
};
|
|
11511
11511
|
}
|
|
11512
|
-
function
|
|
11512
|
+
function RV() {
|
|
11513
11513
|
let s = /* @__PURE__ */ new WeakMap();
|
|
11514
11514
|
function e(i, n) {
|
|
11515
11515
|
const r = s.get(i);
|
|
@@ -11524,7 +11524,7 @@ function R5() {
|
|
|
11524
11524
|
dispose: t
|
|
11525
11525
|
};
|
|
11526
11526
|
}
|
|
11527
|
-
function
|
|
11527
|
+
function PV() {
|
|
11528
11528
|
const s = {};
|
|
11529
11529
|
return {
|
|
11530
11530
|
get: function(e) {
|
|
@@ -11577,7 +11577,7 @@ function P5() {
|
|
|
11577
11577
|
}
|
|
11578
11578
|
};
|
|
11579
11579
|
}
|
|
11580
|
-
function
|
|
11580
|
+
function BV() {
|
|
11581
11581
|
const s = {};
|
|
11582
11582
|
return {
|
|
11583
11583
|
get: function(e) {
|
|
@@ -11616,12 +11616,12 @@ function B5() {
|
|
|
11616
11616
|
}
|
|
11617
11617
|
};
|
|
11618
11618
|
}
|
|
11619
|
-
let
|
|
11620
|
-
function
|
|
11619
|
+
let DV = 0;
|
|
11620
|
+
function OV(s, e) {
|
|
11621
11621
|
return (e.castShadow ? 2 : 0) - (s.castShadow ? 2 : 0) + (e.map ? 1 : 0) - (s.map ? 1 : 0);
|
|
11622
11622
|
}
|
|
11623
|
-
function
|
|
11624
|
-
const t = new
|
|
11623
|
+
function LV(s, e) {
|
|
11624
|
+
const t = new PV(), i = BV(), n = {
|
|
11625
11625
|
version: 0,
|
|
11626
11626
|
hash: {
|
|
11627
11627
|
directionalLength: -1,
|
|
@@ -11665,7 +11665,7 @@ function L5(s, e) {
|
|
|
11665
11665
|
for (let H = 0; H < 9; H++)
|
|
11666
11666
|
n.probe[H].set(0, 0, 0);
|
|
11667
11667
|
let A = 0, g = 0, v = 0, _ = 0, y = 0, b = 0, M = 0, E = 0, T = 0, C = 0, P = 0;
|
|
11668
|
-
u.sort(
|
|
11668
|
+
u.sort(OV);
|
|
11669
11669
|
const S = d === !0 ? Math.PI : 1;
|
|
11670
11670
|
for (let H = 0, U = u.length; H < U; H++) {
|
|
11671
11671
|
const D = u[H], V = D.color, L = D.intensity, k = D.distance, G = D.shadow && D.shadow.map ? D.shadow.map.texture : null;
|
|
@@ -11708,7 +11708,7 @@ function L5(s, e) {
|
|
|
11708
11708
|
}
|
|
11709
11709
|
_ > 0 && (e.isWebGL2 ? s.has("OES_texture_float_linear") === !0 ? (n.rectAreaLTC1 = Ue.LTC_FLOAT_1, n.rectAreaLTC2 = Ue.LTC_FLOAT_2) : (n.rectAreaLTC1 = Ue.LTC_HALF_1, n.rectAreaLTC2 = Ue.LTC_HALF_2) : s.has("OES_texture_float_linear") === !0 ? (n.rectAreaLTC1 = Ue.LTC_FLOAT_1, n.rectAreaLTC2 = Ue.LTC_FLOAT_2) : s.has("OES_texture_half_float_linear") === !0 ? (n.rectAreaLTC1 = Ue.LTC_HALF_1, n.rectAreaLTC2 = Ue.LTC_HALF_2) : console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")), n.ambient[0] = f, n.ambient[1] = p, n.ambient[2] = m;
|
|
11710
11710
|
const I = n.hash;
|
|
11711
|
-
(I.directionalLength !== A || I.pointLength !== g || I.spotLength !== v || I.rectAreaLength !== _ || I.hemiLength !== y || I.numDirectionalShadows !== b || I.numPointShadows !== M || I.numSpotShadows !== E || I.numSpotMaps !== T || I.numLightProbes !== P) && (n.directional.length = A, n.spot.length = v, n.rectArea.length = _, n.point.length = g, n.hemi.length = y, n.directionalShadow.length = b, n.directionalShadowMap.length = b, n.pointShadow.length = M, n.pointShadowMap.length = M, n.spotShadow.length = E, n.spotShadowMap.length = E, n.directionalShadowMatrix.length = b, n.pointShadowMatrix.length = M, n.spotLightMatrix.length = E + T - C, n.spotLightMap.length = T, n.numSpotLightShadowsWithMaps = C, n.numLightProbes = P, I.directionalLength = A, I.pointLength = g, I.spotLength = v, I.rectAreaLength = _, I.hemiLength = y, I.numDirectionalShadows = b, I.numPointShadows = M, I.numSpotShadows = E, I.numSpotMaps = T, I.numLightProbes = P, n.version =
|
|
11711
|
+
(I.directionalLength !== A || I.pointLength !== g || I.spotLength !== v || I.rectAreaLength !== _ || I.hemiLength !== y || I.numDirectionalShadows !== b || I.numPointShadows !== M || I.numSpotShadows !== E || I.numSpotMaps !== T || I.numLightProbes !== P) && (n.directional.length = A, n.spot.length = v, n.rectArea.length = _, n.point.length = g, n.hemi.length = y, n.directionalShadow.length = b, n.directionalShadowMap.length = b, n.pointShadow.length = M, n.pointShadowMap.length = M, n.spotShadow.length = E, n.spotShadowMap.length = E, n.directionalShadowMatrix.length = b, n.pointShadowMatrix.length = M, n.spotLightMatrix.length = E + T - C, n.spotLightMap.length = T, n.numSpotLightShadowsWithMaps = C, n.numLightProbes = P, I.directionalLength = A, I.pointLength = g, I.spotLength = v, I.rectAreaLength = _, I.hemiLength = y, I.numDirectionalShadows = b, I.numPointShadows = M, I.numSpotShadows = E, I.numSpotMaps = T, I.numLightProbes = P, n.version = DV++);
|
|
11712
11712
|
}
|
|
11713
11713
|
function c(u, d) {
|
|
11714
11714
|
let f = 0, p = 0, m = 0, A = 0, g = 0;
|
|
@@ -11740,7 +11740,7 @@ function L5(s, e) {
|
|
|
11740
11740
|
};
|
|
11741
11741
|
}
|
|
11742
11742
|
function xP(s, e) {
|
|
11743
|
-
const t = new
|
|
11743
|
+
const t = new LV(s, e), i = [], n = [];
|
|
11744
11744
|
function r() {
|
|
11745
11745
|
i.length = 0, n.length = 0;
|
|
11746
11746
|
}
|
|
@@ -11769,7 +11769,7 @@ function xP(s, e) {
|
|
|
11769
11769
|
pushShadow: a
|
|
11770
11770
|
};
|
|
11771
11771
|
}
|
|
11772
|
-
function
|
|
11772
|
+
function kV(s, e) {
|
|
11773
11773
|
let t = /* @__PURE__ */ new WeakMap();
|
|
11774
11774
|
function i(r, o = 0) {
|
|
11775
11775
|
const a = t.get(r);
|
|
@@ -11800,9 +11800,9 @@ class LM extends Ot {
|
|
|
11800
11800
|
return super.copy(e), this.map = e.map, this.alphaMap = e.alphaMap, this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this;
|
|
11801
11801
|
}
|
|
11802
11802
|
}
|
|
11803
|
-
const
|
|
11803
|
+
const FV = `void main() {
|
|
11804
11804
|
gl_Position = vec4( position, 1.0 );
|
|
11805
|
-
}`,
|
|
11805
|
+
}`, UV = `uniform sampler2D shadow_pass;
|
|
11806
11806
|
uniform vec2 resolution;
|
|
11807
11807
|
uniform float radius;
|
|
11808
11808
|
#include <packing>
|
|
@@ -11829,7 +11829,7 @@ void main() {
|
|
|
11829
11829
|
float std_dev = sqrt( squared_mean - mean * mean );
|
|
11830
11830
|
gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
|
|
11831
11831
|
}`;
|
|
11832
|
-
function
|
|
11832
|
+
function NV(s, e, t) {
|
|
11833
11833
|
let i = new Wu();
|
|
11834
11834
|
const n = new te(), r = new te(), o = new Ze(), a = new Pv({ depthPacking: wb }), l = new LM(), c = {}, u = t.maxTextureSize, d = { [Bs]: An, [An]: Bs, [di]: di }, f = new Bt({
|
|
11835
11835
|
defines: {
|
|
@@ -11840,8 +11840,8 @@ function N5(s, e, t) {
|
|
|
11840
11840
|
resolution: { value: new te() },
|
|
11841
11841
|
radius: { value: 4 }
|
|
11842
11842
|
},
|
|
11843
|
-
vertexShader:
|
|
11844
|
-
fragmentShader:
|
|
11843
|
+
vertexShader: FV,
|
|
11844
|
+
fragmentShader: UV
|
|
11845
11845
|
}), p = f.clone();
|
|
11846
11846
|
p.defines.HORIZONTAL_PASS = 1;
|
|
11847
11847
|
const m = new At();
|
|
@@ -11944,7 +11944,7 @@ function N5(s, e, t) {
|
|
|
11944
11944
|
}
|
|
11945
11945
|
}
|
|
11946
11946
|
}
|
|
11947
|
-
function
|
|
11947
|
+
function zV(s, e, t) {
|
|
11948
11948
|
const i = t.isWebGL2;
|
|
11949
11949
|
function n() {
|
|
11950
11950
|
let $ = !1;
|
|
@@ -12332,7 +12332,7 @@ function z5(s, e, t) {
|
|
|
12332
12332
|
reset: ae
|
|
12333
12333
|
};
|
|
12334
12334
|
}
|
|
12335
|
-
function
|
|
12335
|
+
function GV(s, e, t, i, n, r, o) {
|
|
12336
12336
|
const a = n.isWebGL2, l = e.has("WEBGL_multisampled_render_to_texture") ? e.get("WEBGL_multisampled_render_to_texture") : null, c = typeof navigator > "u" ? !1 : /OculusBrowser/g.test(navigator.userAgent), u = new te(), d = /* @__PURE__ */ new WeakMap();
|
|
12337
12337
|
let f;
|
|
12338
12338
|
const p = /* @__PURE__ */ new WeakMap();
|
|
@@ -13017,7 +13017,7 @@ class xr extends me {
|
|
|
13017
13017
|
super(), this.isGroup = !0, this.type = "Group";
|
|
13018
13018
|
}
|
|
13019
13019
|
}
|
|
13020
|
-
const
|
|
13020
|
+
const HV = { type: "move" };
|
|
13021
13021
|
class Xw {
|
|
13022
13022
|
constructor() {
|
|
13023
13023
|
this._targetRay = null, this._grip = null, this._hand = null;
|
|
@@ -13068,7 +13068,7 @@ class Xw {
|
|
|
13068
13068
|
}));
|
|
13069
13069
|
} else
|
|
13070
13070
|
l !== null && e.gripSpace && (r = t.getPose(e.gripSpace, i), r !== null && (l.matrix.fromArray(r.transform.matrix), l.matrix.decompose(l.position, l.rotation, l.scale), l.matrixWorldNeedsUpdate = !0, r.linearVelocity ? (l.hasLinearVelocity = !0, l.linearVelocity.copy(r.linearVelocity)) : l.hasLinearVelocity = !1, r.angularVelocity ? (l.hasAngularVelocity = !0, l.angularVelocity.copy(r.angularVelocity)) : l.hasAngularVelocity = !1));
|
|
13071
|
-
a !== null && (n = t.getPose(e.targetRaySpace, i), n === null && r !== null && (n = r), n !== null && (a.matrix.fromArray(n.transform.matrix), a.matrix.decompose(a.position, a.rotation, a.scale), a.matrixWorldNeedsUpdate = !0, n.linearVelocity ? (a.hasLinearVelocity = !0, a.linearVelocity.copy(n.linearVelocity)) : a.hasLinearVelocity = !1, n.angularVelocity ? (a.hasAngularVelocity = !0, a.angularVelocity.copy(n.angularVelocity)) : a.hasAngularVelocity = !1, this.dispatchEvent(
|
|
13071
|
+
a !== null && (n = t.getPose(e.targetRaySpace, i), n === null && r !== null && (n = r), n !== null && (a.matrix.fromArray(n.transform.matrix), a.matrix.decompose(a.position, a.rotation, a.scale), a.matrixWorldNeedsUpdate = !0, n.linearVelocity ? (a.hasLinearVelocity = !0, a.linearVelocity.copy(n.linearVelocity)) : a.hasLinearVelocity = !1, n.angularVelocity ? (a.hasAngularVelocity = !0, a.angularVelocity.copy(n.angularVelocity)) : a.hasAngularVelocity = !1, this.dispatchEvent(HV)));
|
|
13072
13072
|
}
|
|
13073
13073
|
return a !== null && (a.visible = n !== null), l !== null && (l.visible = r !== null), c !== null && (c.visible = o !== null), this;
|
|
13074
13074
|
}
|
|
@@ -13081,12 +13081,12 @@ class Xw {
|
|
|
13081
13081
|
return e.joints[t.jointName];
|
|
13082
13082
|
}
|
|
13083
13083
|
}
|
|
13084
|
-
const
|
|
13084
|
+
const QV = `
|
|
13085
13085
|
void main() {
|
|
13086
13086
|
|
|
13087
13087
|
gl_Position = vec4( position, 1.0 );
|
|
13088
13088
|
|
|
13089
|
-
}`,
|
|
13089
|
+
}`, VV = `
|
|
13090
13090
|
uniform sampler2DArray depthColor;
|
|
13091
13091
|
uniform float depthWidth;
|
|
13092
13092
|
uniform float depthHeight;
|
|
@@ -13106,7 +13106,7 @@ void main() {
|
|
|
13106
13106
|
}
|
|
13107
13107
|
|
|
13108
13108
|
}`;
|
|
13109
|
-
class
|
|
13109
|
+
class jV {
|
|
13110
13110
|
constructor() {
|
|
13111
13111
|
this.texture = null, this.mesh = null, this.depthNear = 0, this.depthFar = 0;
|
|
13112
13112
|
}
|
|
@@ -13121,8 +13121,8 @@ class j5 {
|
|
|
13121
13121
|
if (this.mesh === null) {
|
|
13122
13122
|
const i = t.cameras[0].viewport, n = new Bt({
|
|
13123
13123
|
extensions: { fragDepth: !0 },
|
|
13124
|
-
vertexShader:
|
|
13125
|
-
fragmentShader:
|
|
13124
|
+
vertexShader: QV,
|
|
13125
|
+
fragmentShader: VV,
|
|
13126
13126
|
uniforms: {
|
|
13127
13127
|
depthColor: { value: this.texture },
|
|
13128
13128
|
depthWidth: { value: i.z },
|
|
@@ -13138,12 +13138,12 @@ class j5 {
|
|
|
13138
13138
|
this.texture = null, this.mesh = null;
|
|
13139
13139
|
}
|
|
13140
13140
|
}
|
|
13141
|
-
class
|
|
13141
|
+
class WV extends us {
|
|
13142
13142
|
constructor(e, t) {
|
|
13143
13143
|
super();
|
|
13144
13144
|
const i = this;
|
|
13145
13145
|
let n = null, r = 1, o = null, a = "local-floor", l = 1, c = null, u = null, d = null, f = null, p = null, m = null;
|
|
13146
|
-
const A = new
|
|
13146
|
+
const A = new jV(), g = t.getContextAttributes();
|
|
13147
13147
|
let v = null, _ = null;
|
|
13148
13148
|
const y = [], b = [], M = new te();
|
|
13149
13149
|
let E = null;
|
|
@@ -13347,8 +13347,8 @@ class W5 extends us {
|
|
|
13347
13347
|
};
|
|
13348
13348
|
}
|
|
13349
13349
|
}
|
|
13350
|
-
const Hh = /* @__PURE__ */ new Qi(),
|
|
13351
|
-
function
|
|
13350
|
+
const Hh = /* @__PURE__ */ new Qi(), qV = /* @__PURE__ */ new we();
|
|
13351
|
+
function XV(s, e) {
|
|
13352
13352
|
function t(g, v) {
|
|
13353
13353
|
g.matrixAutoUpdate === !0 && g.updateMatrix(), v.value.copy(g.matrix);
|
|
13354
13354
|
}
|
|
@@ -13361,7 +13361,7 @@ function X5(s, e) {
|
|
|
13361
13361
|
function r(g, v) {
|
|
13362
13362
|
g.opacity.value = v.opacity, v.color && g.diffuse.value.copy(v.color), v.emissive && g.emissive.value.copy(v.emissive).multiplyScalar(v.emissiveIntensity), v.map && (g.map.value = v.map, t(v.map, g.mapTransform)), v.alphaMap && (g.alphaMap.value = v.alphaMap, t(v.alphaMap, g.alphaMapTransform)), v.bumpMap && (g.bumpMap.value = v.bumpMap, t(v.bumpMap, g.bumpMapTransform), g.bumpScale.value = v.bumpScale, v.side === An && (g.bumpScale.value *= -1)), v.normalMap && (g.normalMap.value = v.normalMap, t(v.normalMap, g.normalMapTransform), g.normalScale.value.copy(v.normalScale), v.side === An && g.normalScale.value.negate()), v.displacementMap && (g.displacementMap.value = v.displacementMap, t(v.displacementMap, g.displacementMapTransform), g.displacementScale.value = v.displacementScale, g.displacementBias.value = v.displacementBias), v.emissiveMap && (g.emissiveMap.value = v.emissiveMap, t(v.emissiveMap, g.emissiveMapTransform)), v.specularMap && (g.specularMap.value = v.specularMap, t(v.specularMap, g.specularMapTransform)), v.alphaTest > 0 && (g.alphaTest.value = v.alphaTest);
|
|
13363
13363
|
const _ = e.get(v), y = _.envMap, b = _.envMapRotation;
|
|
13364
|
-
if (y && (g.envMap.value = y, Hh.copy(b), Hh.x *= -1, Hh.y *= -1, Hh.z *= -1, y.isCubeTexture && y.isRenderTargetTexture === !1 && (Hh.y *= -1, Hh.z *= -1), g.envMapRotation.value.setFromMatrix4(
|
|
13364
|
+
if (y && (g.envMap.value = y, Hh.copy(b), Hh.x *= -1, Hh.y *= -1, Hh.z *= -1, y.isCubeTexture && y.isRenderTargetTexture === !1 && (Hh.y *= -1, Hh.z *= -1), g.envMapRotation.value.setFromMatrix4(qV.makeRotationFromEuler(Hh)), g.flipEnvMap.value = y.isCubeTexture && y.isRenderTargetTexture === !1 ? -1 : 1, g.reflectivity.value = v.reflectivity, g.ior.value = v.ior, g.refractionRatio.value = v.refractionRatio), v.lightMap) {
|
|
13365
13365
|
g.lightMap.value = v.lightMap;
|
|
13366
13366
|
const M = s._useLegacyLights === !0 ? Math.PI : 1;
|
|
13367
13367
|
g.lightMapIntensity.value = v.lightMapIntensity * M, t(v.lightMap, g.lightMapTransform);
|
|
@@ -13404,7 +13404,7 @@ function X5(s, e) {
|
|
|
13404
13404
|
refreshMaterialUniforms: n
|
|
13405
13405
|
};
|
|
13406
13406
|
}
|
|
13407
|
-
function
|
|
13407
|
+
function YV(s, e, t, i) {
|
|
13408
13408
|
let n = {}, r = {}, o = [];
|
|
13409
13409
|
const a = t.isWebGL2 ? s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS) : 0;
|
|
13410
13410
|
function l(_, y) {
|
|
@@ -13587,10 +13587,10 @@ class mc {
|
|
|
13587
13587
|
}
|
|
13588
13588
|
let ye, Fe, Se, $e, Je, st, Dt, z, O, pe, ve, Ie, Ee, yt, lt, Oe, He, bt, Le, Kt, ct, qe, ht, nt;
|
|
13589
13589
|
function Rt() {
|
|
13590
|
-
ye = new
|
|
13590
|
+
ye = new r5(W), Fe = new e5(W, ye, e), ye.init(Fe), qe = new Gk(W, ye, Fe), Se = new zV(W, ye, Fe), $e = new l5(W), Je = new TV(), st = new GV(W, ye, Se, Je, Fe, qe, $e), Dt = new i5(y), z = new s5(y), O = new mH(W, Fe), ht = new Z8(W, ye, O, Fe), pe = new o5(W, O, $e, ht), ve = new d5(W, pe, O, $e), Le = new u5(W, Fe, st), Oe = new t5(Je), Ie = new MV(y, Dt, z, ye, Fe, ht, Oe), Ee = new XV(y, Je), yt = new RV(), lt = new kV(ye, Fe), bt = new K8(y, Dt, z, Se, ve, f, l), He = new NV(y, ve, Fe), nt = new YV(W, $e, Fe, Se), Kt = new $8(W, ye, $e, Fe), ct = new a5(W, ye, $e, Fe), $e.programs = Ie.programs, y.capabilities = Fe, y.extensions = ye, y.properties = Je, y.renderLists = yt, y.shadowMap = He, y.state = Se, y.info = $e;
|
|
13591
13591
|
}
|
|
13592
13592
|
Rt();
|
|
13593
|
-
const j = new
|
|
13593
|
+
const j = new WV(y, W);
|
|
13594
13594
|
this.xr = j, this.getContext = function() {
|
|
13595
13595
|
return W;
|
|
13596
13596
|
}, this.getContextAttributes = function() {
|
|
@@ -14413,7 +14413,7 @@ let UM = class extends me {
|
|
|
14413
14413
|
return t;
|
|
14414
14414
|
}
|
|
14415
14415
|
};
|
|
14416
|
-
const EP = /* @__PURE__ */ new w(), MP = /* @__PURE__ */ new Ze(), TP = /* @__PURE__ */ new Ze(),
|
|
14416
|
+
const EP = /* @__PURE__ */ new w(), MP = /* @__PURE__ */ new Ze(), TP = /* @__PURE__ */ new Ze(), JV = /* @__PURE__ */ new w(), IP = /* @__PURE__ */ new we(), ZA = /* @__PURE__ */ new w(), Jw = /* @__PURE__ */ new yn(), RP = /* @__PURE__ */ new we(), Kw = /* @__PURE__ */ new Qr();
|
|
14417
14417
|
class ho extends de {
|
|
14418
14418
|
constructor(e, t) {
|
|
14419
14419
|
super(e, t), this.isSkinnedMesh = !0, this.type = "SkinnedMesh", this.bindMode = rE, this.bindMatrix = new we(), this.bindMatrixInverse = new we(), this.boundingBox = null, this.boundingSphere = null;
|
|
@@ -14466,7 +14466,7 @@ class ho extends de {
|
|
|
14466
14466
|
const o = TP.getComponent(r);
|
|
14467
14467
|
if (o !== 0) {
|
|
14468
14468
|
const a = MP.getComponent(r);
|
|
14469
|
-
IP.multiplyMatrices(i.bones[a].matrixWorld, i.boneInverses[a]), t.addScaledVector(
|
|
14469
|
+
IP.multiplyMatrices(i.bones[a].matrixWorld, i.boneInverses[a]), t.addScaledVector(JV.copy(EP).applyMatrix4(IP), o);
|
|
14470
14470
|
}
|
|
14471
14471
|
}
|
|
14472
14472
|
return t.applyMatrix4(this.bindMatrixInverse);
|
|
@@ -14482,7 +14482,7 @@ class zr extends _t {
|
|
|
14482
14482
|
super(null, o, a, l, c, u, n, r, d, f), this.isDataTexture = !0, this.image = { data: e, width: t, height: i }, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
|
|
14483
14483
|
}
|
|
14484
14484
|
}
|
|
14485
|
-
const PP = /* @__PURE__ */ new we(),
|
|
14485
|
+
const PP = /* @__PURE__ */ new we(), KV = /* @__PURE__ */ new we();
|
|
14486
14486
|
class pp {
|
|
14487
14487
|
constructor(e = [], t = []) {
|
|
14488
14488
|
this.uuid = co(), this.bones = e.slice(0), this.boneInverses = t, this.boneMatrices = null, this.boneTexture = null, this.init();
|
|
@@ -14517,7 +14517,7 @@ class pp {
|
|
|
14517
14517
|
update() {
|
|
14518
14518
|
const e = this.bones, t = this.boneInverses, i = this.boneMatrices, n = this.boneTexture;
|
|
14519
14519
|
for (let r = 0, o = e.length; r < o; r++) {
|
|
14520
|
-
const a = e[r] ? e[r].matrixWorld :
|
|
14520
|
+
const a = e[r] ? e[r].matrixWorld : KV;
|
|
14521
14521
|
PP.multiplyMatrices(a, t[r]), PP.toArray(i, r * 16);
|
|
14522
14522
|
}
|
|
14523
14523
|
n !== null && (n.needsUpdate = !0);
|
|
@@ -14585,12 +14585,12 @@ class Ur extends et {
|
|
|
14585
14585
|
return e.meshPerAttribute = this.meshPerAttribute, e.isInstancedBufferAttribute = !0, e;
|
|
14586
14586
|
}
|
|
14587
14587
|
}
|
|
14588
|
-
const zd = /* @__PURE__ */ new we(), BP = /* @__PURE__ */ new we(), $A = [], DP = /* @__PURE__ */ new Ai(),
|
|
14588
|
+
const zd = /* @__PURE__ */ new we(), BP = /* @__PURE__ */ new we(), $A = [], DP = /* @__PURE__ */ new Ai(), ZV = /* @__PURE__ */ new we(), om = /* @__PURE__ */ new de(), am = /* @__PURE__ */ new yn();
|
|
14589
14589
|
class NM extends de {
|
|
14590
14590
|
constructor(e, t, i) {
|
|
14591
14591
|
super(e, t), this.isInstancedMesh = !0, this.instanceMatrix = new Ur(new Float32Array(i * 16), 16), this.instanceColor = null, this.morphTexture = null, this.count = i, this.boundingBox = null, this.boundingSphere = null;
|
|
14592
14592
|
for (let n = 0; n < i; n++)
|
|
14593
|
-
this.setMatrixAt(n,
|
|
14593
|
+
this.setMatrixAt(n, ZV);
|
|
14594
14594
|
}
|
|
14595
14595
|
computeBoundingBox() {
|
|
14596
14596
|
const e = this.geometry, t = this.count;
|
|
@@ -14652,7 +14652,7 @@ class NM extends de {
|
|
|
14652
14652
|
this.dispatchEvent({ type: "dispose" });
|
|
14653
14653
|
}
|
|
14654
14654
|
}
|
|
14655
|
-
function $
|
|
14655
|
+
function $V(s, e) {
|
|
14656
14656
|
return s.z - e.z;
|
|
14657
14657
|
}
|
|
14658
14658
|
function e6(s, e) {
|
|
@@ -14917,7 +14917,7 @@ class v_ extends de {
|
|
|
14917
14917
|
}
|
|
14918
14918
|
}
|
|
14919
14919
|
const A = $w.list, g = this.customSort;
|
|
14920
|
-
g === null ? A.sort(r.transparent ? e6 : $
|
|
14920
|
+
g === null ? A.sort(r.transparent ? e6 : $V) : g.call(this, A, i);
|
|
14921
14921
|
for (let v = 0, _ = A.length; v < _; v++) {
|
|
14922
14922
|
const y = A[v];
|
|
14923
14923
|
u[m] = y.start * a, d[m] = y.count, m++;
|
|
@@ -28989,7 +28989,7 @@ function nue(s, e) {
|
|
|
28989
28989
|
s.lookAt(e), s.quaternion.multiply(Tq);
|
|
28990
28990
|
}
|
|
28991
28991
|
function ox(s, e, t = !0, i = !1) {
|
|
28992
|
-
const n =
|
|
28992
|
+
const n = Nt(e), r = Nt(s);
|
|
28993
28993
|
if (i) {
|
|
28994
28994
|
if (Aa(s, Ri(e)), t) {
|
|
28995
28995
|
const o = r.y, a = r.sub(TU(s));
|
|
@@ -29010,7 +29010,7 @@ function Af(s) {
|
|
|
29010
29010
|
return s instanceof Ce ? e.copy(s) : s instanceof DOMPointReadOnly && e.set(s.x, s.y, s.z, s.w), e;
|
|
29011
29011
|
}
|
|
29012
29012
|
const FT = new va(() => new w(), 100), DB = Symbol("lastMatrixWorldUpdateKey");
|
|
29013
|
-
function
|
|
29013
|
+
function Nt(s, e = null, t = !0) {
|
|
29014
29014
|
const i = e ?? FT.get();
|
|
29015
29015
|
return s ? s.parent ? (t && s.updateWorldMatrix(!0, !1), s.matrixWorldNeedsUpdate && s[DB] !== Date.now() && (s[DB] = Date.now(), s.updateMatrixWorld()), i.setFromMatrixPosition(s.matrixWorld), i) : i.copy(s.position) : i.set(0, 0, 0);
|
|
29016
29016
|
}
|
|
@@ -29476,13 +29476,13 @@ function aue(s) {
|
|
|
29476
29476
|
WE = s;
|
|
29477
29477
|
}
|
|
29478
29478
|
const OU = ne("debugdefines");
|
|
29479
|
-
gp('if(!globalThis[""3.37.
|
|
29479
|
+
gp('if(!globalThis[""3.37.5-alpha""]) globalThis[""3.37.5-alpha""] = "0.0.0";');
|
|
29480
29480
|
gp('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
29481
|
-
gp('if(!globalThis[""
|
|
29482
|
-
gp('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.37.
|
|
29481
|
+
gp('if(!globalThis[""Tue Apr 23 2024 09:16:13 GMT+0200 (Central European Summer Time)""]) globalThis[""Tue Apr 23 2024 09:16:13 GMT+0200 (Central European Summer Time)""] = "unknown";');
|
|
29482
|
+
gp('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.37.5-alpha";');
|
|
29483
29483
|
gp('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
29484
|
-
gp('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
29485
|
-
const tc = "3.37.
|
|
29484
|
+
gp('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Tue Apr 23 2024 09:16:13 GMT+0200 (Central European Summer Time)";');
|
|
29485
|
+
const tc = "3.37.5-alpha", UT = "undefined", LU = "Tue Apr 23 2024 09:16:13 GMT+0200 (Central European Summer Time)";
|
|
29486
29486
|
OU && console.log(`Engine version: ${tc} (generator: ${UT})
|
|
29487
29487
|
Project built at ${LU}`);
|
|
29488
29488
|
const uh = "needle_isActiveInHierarchy", nf = "builtin_components", P0 = "needle_editor_guid";
|
|
@@ -44369,7 +44369,7 @@ const XS = Symbol("assetReference"), gu = class {
|
|
|
44369
44369
|
* @returns the AssetReference for the URL
|
|
44370
44370
|
*/
|
|
44371
44371
|
static getOrCreateFromUrl(e, t) {
|
|
44372
|
-
if (!t && (t =
|
|
44372
|
+
if (!t && (t = Ft.Current, !t))
|
|
44373
44373
|
throw new Error('Context is required when sourceId is a string. When you call this method from a component you can call it with "getOrCreate(this, url)" where "this" is the component.');
|
|
44374
44374
|
const i = t.addressables, n = i.findAssetReference(e);
|
|
44375
44375
|
if (n)
|
|
@@ -44383,7 +44383,7 @@ const XS = Symbol("assetReference"), gu = class {
|
|
|
44383
44383
|
*/
|
|
44384
44384
|
static getOrCreate(e, t, i) {
|
|
44385
44385
|
if (typeof e == "string") {
|
|
44386
|
-
if (!i && (i =
|
|
44386
|
+
if (!i && (i = Ft.Current, !i))
|
|
44387
44387
|
throw new Error('Context is required when sourceId is a string. When you call this method from a component you can call it with "getOrCreate(this, url)" where "this" is the component.');
|
|
44388
44388
|
} else
|
|
44389
44389
|
i = e.context, e = e.sourceId;
|
|
@@ -44426,7 +44426,7 @@ const XS = Symbol("assetReference"), gu = class {
|
|
|
44426
44426
|
}
|
|
44427
44427
|
/** frees previously allocated memory and destroys the current `asset` instance (if any) */
|
|
44428
44428
|
unload() {
|
|
44429
|
-
this.asset && (Uc && console.log("Unload", this.asset), this.asset.scene && cl(this.asset.scene, !0, !0), cl(this.asset, !0, !0)), this.asset = null, this._rawBinary = void 0, this._glbRoot = null, this._loading = void 0,
|
|
44429
|
+
this.asset && (Uc && console.log("Unload", this.asset), this.asset.scene && cl(this.asset.scene, !0, !0), cl(this.asset, !0, !0)), this.asset = null, this._rawBinary = void 0, this._glbRoot = null, this._loading = void 0, Ft.Current && Ft.Current.addressables.unregisterAssetReference(this);
|
|
44430
44430
|
}
|
|
44431
44431
|
/** loads the asset binary without creating an instance */
|
|
44432
44432
|
async preload() {
|
|
@@ -44449,7 +44449,7 @@ const XS = Symbol("assetReference"), gu = class {
|
|
|
44449
44449
|
return this.asset;
|
|
44450
44450
|
if (e && this._progressListeners.push(e), this._loading !== void 0)
|
|
44451
44451
|
return this._loading.then((n) => this.asset);
|
|
44452
|
-
const t =
|
|
44452
|
+
const t = Ft.Current;
|
|
44453
44453
|
this._rawBinary ? (this._loading = rl().parseSync(t, this._rawBinary, this.uri, null), this.raiseProgressEvent(new ProgressEvent("progress", { loaded: this._rawBinary.byteLength, total: this._rawBinary.byteLength }))) : (Uc && console.log("Load async", this.uri), this._loading = rl().loadSync(t, this._hashedUri, this.uri, null, (n) => {
|
|
44454
44454
|
this.raiseProgressEvent(n);
|
|
44455
44455
|
}));
|
|
@@ -44477,7 +44477,7 @@ const XS = Symbol("assetReference"), gu = class {
|
|
|
44477
44477
|
t(this, e);
|
|
44478
44478
|
}
|
|
44479
44479
|
async onInstantiate(e, t = !1, i) {
|
|
44480
|
-
const n =
|
|
44480
|
+
const n = Ft.Current, r = new fl();
|
|
44481
44481
|
if (e instanceof me ? r.parent = e : e && r.cloneAssign(e), r.parent || (r.parent = n.scene), this.mustLoad && await this.loadAssetAsync(), Uc && console.log("Instantiate", this.uri, "parent:", e), this.asset) {
|
|
44482
44482
|
Uc && console.log("Add to scene", this.asset);
|
|
44483
44483
|
let o = gu.currentlyInstantiating.get(this.uri);
|
|
@@ -44994,7 +44994,7 @@ class Fn {
|
|
|
44994
44994
|
this.set({ textContent: d }), c.tmuiNeedsUpdate = !0;
|
|
44995
44995
|
};
|
|
44996
44996
|
}
|
|
44997
|
-
return this.tmuiNeedsUpdate = !0, this.registerTimedObject(
|
|
44997
|
+
return this.tmuiNeedsUpdate = !0, this.registerTimedObject(Ft.Current, o, e, this.textLabelCache), o;
|
|
44998
44998
|
}
|
|
44999
44999
|
static getBox(e) {
|
|
45000
45000
|
let t = this.boxesCache.pop();
|
|
@@ -45002,7 +45002,7 @@ class Fn {
|
|
|
45002
45002
|
const i = new ki(1, 1, 1);
|
|
45003
45003
|
t = new de(i);
|
|
45004
45004
|
}
|
|
45005
|
-
return this.registerTimedObject(
|
|
45005
|
+
return this.registerTimedObject(Ft.Current, t, e, this.boxesCache), t;
|
|
45006
45006
|
}
|
|
45007
45007
|
static getLine(e) {
|
|
45008
45008
|
let t = this.linesCache.pop();
|
|
@@ -45011,15 +45011,15 @@ class Fn {
|
|
|
45011
45011
|
let i = t.geometry.getAttribute("position");
|
|
45012
45012
|
i || (i = new et(new Float32Array(2 * 3), 3), t.geometry.setAttribute("position", i));
|
|
45013
45013
|
}
|
|
45014
|
-
return t.frustumCulled = !1, this.registerTimedObject(
|
|
45014
|
+
return t.frustumCulled = !1, this.registerTimedObject(Ft.Current, t, e, this.linesCache), t;
|
|
45015
45015
|
}
|
|
45016
45016
|
static getSphere(e, t, i) {
|
|
45017
45017
|
let n = this.spheresCache.pop();
|
|
45018
|
-
return n || (n = new de(new wa(1, 8, 8))), n.scale.set(e, e, e), n.material.wireframe = i, this.registerTimedObject(
|
|
45018
|
+
return n || (n = new de(new wa(1, 8, 8))), n.scale.set(e, e, e), n.material.wireframe = i, this.registerTimedObject(Ft.Current, n, t, this.spheresCache), n;
|
|
45019
45019
|
}
|
|
45020
45020
|
static getArrowHead(e) {
|
|
45021
45021
|
let t = this.arrowHeadsCache.pop();
|
|
45022
|
-
return t || (t = new de(new En(0, 0.5, 1, 8))), this.registerTimedObject(
|
|
45022
|
+
return t || (t = new de(new En(0, 0.5, 1, 8))), this.registerTimedObject(Ft.Current, t, e, this.arrowHeadsCache), t;
|
|
45023
45023
|
}
|
|
45024
45024
|
static registerTimedObject(e, t, i, n) {
|
|
45025
45025
|
const r = this.contextBeforeRenderCallbacks.get(e), o = this.contextPostRenderCallbacks.get(e);
|
|
@@ -45047,7 +45047,7 @@ class Fn {
|
|
|
45047
45047
|
}
|
|
45048
45048
|
t.traverse((a) => {
|
|
45049
45049
|
a.layers.disableAll(), a.layers.enable(2);
|
|
45050
|
-
}), t.renderOrder = 999999, t[g1] = n, this.timedObjectsBuffer.push(t), this.timesBuffer.push(
|
|
45050
|
+
}), t.renderOrder = 999999, t[g1] = n, this.timedObjectsBuffer.push(t), this.timesBuffer.push(Ft.Current.time.realtimeSinceStartup + i), e.scene.add(t);
|
|
45051
45051
|
}
|
|
45052
45052
|
static onBeforeRender(e, t) {
|
|
45053
45053
|
this.tmuiNeedsUpdate && Di.update();
|
|
@@ -45785,11 +45785,11 @@ class JZ {
|
|
|
45785
45785
|
return t[e] = i, i;
|
|
45786
45786
|
}
|
|
45787
45787
|
onDispatchEvent(e) {
|
|
45788
|
-
const t =
|
|
45788
|
+
const t = Ft.Current;
|
|
45789
45789
|
try {
|
|
45790
|
-
|
|
45790
|
+
Ft.Current = this.context, this.dispatchEvent(e);
|
|
45791
45791
|
} finally {
|
|
45792
|
-
|
|
45792
|
+
Ft.Current = t;
|
|
45793
45793
|
}
|
|
45794
45794
|
}
|
|
45795
45795
|
}
|
|
@@ -46277,8 +46277,8 @@ Pinch: ${(n = this.getGesture("pinch")) == null ? void 0 : n.value.toFixed(3)}`)
|
|
|
46277
46277
|
}
|
|
46278
46278
|
if (this.xr.mode === "immersive-vr" || this.xr.isPassThrough) {
|
|
46279
46279
|
this.pointerInit.origin = this, this.pointerInit.pointerId = this.index * 10 + t, this.pointerInit.pointerType = this.hand ? "hand" : "controller", this.pointerInit.button = t, this.pointerInit.buttonName = i, this.pointerInit.isPrimary = n, this.pointerInit.mode = this.inputSource.targetRayMode, this.pointerInit.ray = this.ray, this.pointerInit.device = this.object, this.pointerInit.pressure = o;
|
|
46280
|
-
const a =
|
|
46281
|
-
|
|
46280
|
+
const a = Ft.Current;
|
|
46281
|
+
Ft.Current = this.xr.context, Nc && e !== "pointermove" && console.warn("Pointer event", e, t, i, { ...this.pointerInit }), this.xr.context.input.createInputEvent(new Vc(e, r, this.pointerInit)), Ft.Current = a;
|
|
46282
46282
|
}
|
|
46283
46283
|
}
|
|
46284
46284
|
}
|
|
@@ -52794,7 +52794,7 @@ async function Y$() {
|
|
|
52794
52794
|
const e = sessionStorage.getItem("needle_xr_session_mode"), t = sessionStorage.getItem("needle_xr_session_init") ?? null, i = t ? JSON.parse(t) : null;
|
|
52795
52795
|
let n = null;
|
|
52796
52796
|
if (Y3() && (await sh.start(e || "immersive-vr", i || St.getDefaultSessionInit("immersive-vr")), await Z$(), n = await sh.handoff()), n)
|
|
52797
|
-
St.setSession(n.mode, n.session, n.init,
|
|
52797
|
+
St.setSession(n.mode, n.session, n.init, Ft.Current);
|
|
52798
52798
|
else if (e && t) {
|
|
52799
52799
|
console.log("Session Granted: Restore last session");
|
|
52800
52800
|
const r = JSON.parse(t);
|
|
@@ -53022,7 +53022,7 @@ const Gl = class {
|
|
|
53022
53022
|
J$(e, n.init), this.session = t, this.mode = e, this.context = i, (es || ne("console")) && lv(!0), this._xr_scripts = [...n.scripts], this._xr_update_scripts = this._xr_scripts.filter((a) => typeof a.onUpdateXR == "function"), this._controllerAdded = n.controller_added, this._controllerRemoved = n.controller_removed, Ap(this.onBefore, en.LateUpdate), this.context.pre_render_callbacks.push(this.onBeforeRender), this.context.post_render_callbacks.push(this.onAfterRender), ((r = n.init.optionalFeatures) != null && r.includes("hit-test") || (o = n.init.requiredFeatures) != null && o.includes("hit-test")) && t.requestReferenceSpace("viewer").then((a) => {
|
|
53023
53023
|
var l, c;
|
|
53024
53024
|
return (c = (l = t.requestHitTestSource) == null ? void 0 : l.call(t, { space: a })) == null ? void 0 : c.then((u) => this._viewerHitTestSource = u);
|
|
53025
|
-
}).catch((a) => console.warn(a)), this.context.mainCamera && (this._originalCameraWorldPosition =
|
|
53025
|
+
}).catch((a) => console.warn(a)), this.context.mainCamera && (this._originalCameraWorldPosition = Nt(this.context.mainCamera, new w()), this._originalCameraWorldRotation = Ri(this.context.mainCamera, new Ce()), this._originalCameraWorldScale = Zi(this.context.mainCamera, new w()), this._originalCameraParent = this.context.mainCamera.parent), this._defaultRig = new ZZ(), this.context.scene.add(this._defaultRig.gameObject), this.addRig(this._defaultRig);
|
|
53026
53026
|
for (let a = 0; a < t.inputSources.length; a++) {
|
|
53027
53027
|
const l = t.inputSources[a];
|
|
53028
53028
|
if (!l.handedness) {
|
|
@@ -53163,7 +53163,7 @@ const Gl = class {
|
|
|
53163
53163
|
return console.warn("A XRSession is already being requested"), (es || vt()) && _n("A XRSession is already being requested"), this._currentSessionRequest.then(() => this._activeSession);
|
|
53164
53164
|
if (this._activeSession)
|
|
53165
53165
|
return console.error("A XRSession is already running"), this._activeSession;
|
|
53166
|
-
if (i || (i =
|
|
53166
|
+
if (i || (i = Ft.Current), i || (i = ci.All[0]), !i)
|
|
53167
53167
|
throw new Error("No Needle Engine Context found");
|
|
53168
53168
|
switch (t || (t = {}), e) {
|
|
53169
53169
|
case "immersive-ar":
|
|
@@ -53673,7 +53673,7 @@ let Ou = TR;
|
|
|
53673
53673
|
/** @deprecated use Application.registerWaitForInteraction instead */
|
|
53674
53674
|
h(Ou, "registerWaitForAllowAudio", TR.registerWaitForInteraction);
|
|
53675
53675
|
function* eee(s, e = null) {
|
|
53676
|
-
const t = e ? e.time :
|
|
53676
|
+
const t = e ? e.time : Ft.Current.time, i = t.time;
|
|
53677
53677
|
for (; t.time - i < s; )
|
|
53678
53678
|
yield;
|
|
53679
53679
|
}
|
|
@@ -54849,7 +54849,7 @@ class ree {
|
|
|
54849
54849
|
o.matrixWorldNeedsUpdate && o.updateMatrixWorld();
|
|
54850
54850
|
const l = this.tempBoundingBox.copy(a.boundingBox).applyMatrix4(o.matrixWorld);
|
|
54851
54851
|
if (t.intersectsBox(l)) {
|
|
54852
|
-
const c =
|
|
54852
|
+
const c = Nt(e), u = c.distanceTo(t.center), d = new see(e, u, c);
|
|
54853
54853
|
if (n.push(d), !r)
|
|
54854
54854
|
return;
|
|
54855
54855
|
}
|
|
@@ -56347,7 +56347,7 @@ The script will be ignored. Please make sure your component extends "Behaviour"
|
|
|
56347
56347
|
`, s);
|
|
56348
56348
|
return;
|
|
56349
56349
|
}
|
|
56350
|
-
const t = (e == null ? void 0 : e.new_scripts) ??
|
|
56350
|
+
const t = (e == null ? void 0 : e.new_scripts) ?? Ft.Current.new_scripts;
|
|
56351
56351
|
t.includes(s) || t.push(s);
|
|
56352
56352
|
}
|
|
56353
56353
|
const Ni = class {
|
|
@@ -57119,8 +57119,8 @@ Memory:`, { ...this.renderer.info.memory })), this._dispatchReadyAfterFrame && (
|
|
|
57119
57119
|
}
|
|
57120
57120
|
}
|
|
57121
57121
|
};
|
|
57122
|
-
let
|
|
57123
|
-
h(
|
|
57122
|
+
let Ft = Ni;
|
|
57123
|
+
h(Ft, "_defaultTargetFramerate", { value: 60 }), h(Ft, "_defaultWebglRendererParameters", {
|
|
57124
57124
|
antialias: !0,
|
|
57125
57125
|
alpha: !1,
|
|
57126
57126
|
powerPreference: "high-performance"
|
|
@@ -57232,7 +57232,7 @@ function ez(s, e, t, i) {
|
|
|
57232
57232
|
const n = s;
|
|
57233
57233
|
if (!n.guid)
|
|
57234
57234
|
return console.warn("Can not instantiate: No guid", n), null;
|
|
57235
|
-
if (e.context || (e.context =
|
|
57235
|
+
if (e.context || (e.context = Ft.Current), !e.context)
|
|
57236
57236
|
return console.error("Missing network instantiate options / reference to network connection in sync instantiate"), null;
|
|
57237
57237
|
const r = e ? { ...e } : null, { instance: o, seed: a } = Pee(n, e);
|
|
57238
57238
|
if (o) {
|
|
@@ -57432,7 +57432,7 @@ function rz(s, e, t, i = 0) {
|
|
|
57432
57432
|
function qv(s, e = null) {
|
|
57433
57433
|
let t = null;
|
|
57434
57434
|
e !== null && (e.x !== void 0 ? (t = new fl(), t.position = e) : t = e);
|
|
57435
|
-
let i =
|
|
57435
|
+
let i = Ft.Current;
|
|
57436
57436
|
t != null && t.context && (i = t.context), Q0 && i.alias && console.log("context", i.alias), t && !t.idProvider && (t.idProvider = new Ps(Date.now()));
|
|
57437
57437
|
const n = [], r = {}, o = {}, a = oz(i, s, t, n, r, o);
|
|
57438
57438
|
a && (Nee(r), Uee(o, r)), Q0 && (jE(s, !0), jE(a, !0));
|
|
@@ -57666,7 +57666,7 @@ Object.getOwnPropertyDescriptor(me.prototype, "transform") || Object.definePrope
|
|
|
57666
57666
|
});
|
|
57667
57667
|
Object.getOwnPropertyDescriptor(me.prototype, "worldPosition") || Object.defineProperty(me.prototype, "worldPosition", {
|
|
57668
57668
|
get: function() {
|
|
57669
|
-
return this instanceof VT ?
|
|
57669
|
+
return this instanceof VT ? Nt(this.object) : Nt(this);
|
|
57670
57670
|
},
|
|
57671
57671
|
set: function(s) {
|
|
57672
57672
|
Mr(this, s);
|
|
@@ -57762,7 +57762,7 @@ function Wee(s) {
|
|
|
57762
57762
|
const e = s.gameObject.userData.components.indexOf(s);
|
|
57763
57763
|
s.gameObject.userData.components.splice(e, 1);
|
|
57764
57764
|
}
|
|
57765
|
-
s.__internalDisable && s.__internalDisable(), ql(s, s.context ??
|
|
57765
|
+
s.__internalDisable && s.__internalDisable(), ql(s, s.context ?? Ft.Current), s.destroy(), s.gameObject = null;
|
|
57766
57766
|
}
|
|
57767
57767
|
let RD = !1;
|
|
57768
57768
|
function hz(s, e, t) {
|
|
@@ -57840,7 +57840,7 @@ function gI(s, e, t, i = !0) {
|
|
|
57840
57840
|
function qee(s, e = void 0, t = !0) {
|
|
57841
57841
|
if (!s)
|
|
57842
57842
|
return null;
|
|
57843
|
-
if (!e && (e =
|
|
57843
|
+
if (!e && (e = Ft.Current, !e))
|
|
57844
57844
|
return console.error("Can not search object without any needle context or scene!!!"), null;
|
|
57845
57845
|
let i = e;
|
|
57846
57846
|
if (i.isScene || (i = e == null ? void 0 : e.scene), !i)
|
|
@@ -57858,7 +57858,7 @@ function qee(s, e = void 0, t = !0) {
|
|
|
57858
57858
|
function Xee(s, e, t = void 0) {
|
|
57859
57859
|
if (!s)
|
|
57860
57860
|
return e;
|
|
57861
|
-
if (e || (e = []), e.length = 0, !t && (t =
|
|
57861
|
+
if (e || (e = []), e.length = 0, !t && (t = Ft.Current, !t))
|
|
57862
57862
|
return console.error("Can not search object without any needle context or scene!!!"), e;
|
|
57863
57863
|
"scene" in t && (t = t.scene);
|
|
57864
57864
|
const i = t;
|
|
@@ -57879,7 +57879,7 @@ class oe extends me {
|
|
|
57879
57879
|
return sp(t);
|
|
57880
57880
|
}
|
|
57881
57881
|
static setActive(t, i, n = !0) {
|
|
57882
|
-
t && (j0(t, i), k0(t), i && n && EN(
|
|
57882
|
+
t && (j0(t, i), k0(t), i && n && EN(Ft.Current, t));
|
|
57883
57883
|
}
|
|
57884
57884
|
/** If the object is active (same as go.visible) */
|
|
57885
57885
|
static isActiveSelf(t) {
|
|
@@ -57927,7 +57927,7 @@ class oe extends me {
|
|
|
57927
57927
|
if (!t)
|
|
57928
57928
|
return;
|
|
57929
57929
|
const r = t;
|
|
57930
|
-
i = i ??
|
|
57930
|
+
i = i ?? Ft.Current, dI(r, i.connection, n);
|
|
57931
57931
|
}
|
|
57932
57932
|
/** Destroys a object
|
|
57933
57933
|
* @param instance object to destroy
|
|
@@ -57945,7 +57945,7 @@ class oe extends me {
|
|
|
57945
57945
|
console.warn("Can not add object to self", t);
|
|
57946
57946
|
return;
|
|
57947
57947
|
}
|
|
57948
|
-
n || (n =
|
|
57948
|
+
n || (n = Ft.Current), i.add(t), j0(t, !0), k0(t), n ? oe.foreachComponent(t, (r) => {
|
|
57949
57949
|
XT(r, n), !r.__internalDidAwakeAndStart && n.new_script_start.includes(r) === !1 && n.new_script_start.push(r);
|
|
57950
57950
|
}, !0) : console.warn("Missing context");
|
|
57951
57951
|
}
|
|
@@ -58015,7 +58015,7 @@ class oe extends me {
|
|
|
58015
58015
|
return _x(t, i);
|
|
58016
58016
|
}
|
|
58017
58017
|
static findObjectOfType(t, i, n = !0) {
|
|
58018
|
-
return qee(t, i ??
|
|
58018
|
+
return qee(t, i ?? Ft.Current, n);
|
|
58019
58019
|
}
|
|
58020
58020
|
static findObjectsOfType(t, i) {
|
|
58021
58021
|
const n = [];
|
|
@@ -58077,7 +58077,7 @@ let Te = (qa = class {
|
|
|
58077
58077
|
}
|
|
58078
58078
|
/** Use the context to get access to many Needle Engine features and use physics, timing, access the camera or scene */
|
|
58079
58079
|
get context() {
|
|
58080
|
-
return this.__context ??
|
|
58080
|
+
return this.__context ?? Ft.Current;
|
|
58081
58081
|
}
|
|
58082
58082
|
set context(e) {
|
|
58083
58083
|
this.__context = e;
|
|
@@ -58247,7 +58247,7 @@ let Te = (qa = class {
|
|
|
58247
58247
|
e ? this.__internalEnable() : this.__internalDisable();
|
|
58248
58248
|
}
|
|
58249
58249
|
get worldPosition() {
|
|
58250
|
-
return
|
|
58250
|
+
return Nt(this.gameObject);
|
|
58251
58251
|
}
|
|
58252
58252
|
set worldPosition(e) {
|
|
58253
58253
|
Mr(this.gameObject, e);
|
|
@@ -58338,8 +58338,8 @@ class Cx extends Te {
|
|
|
58338
58338
|
update() {
|
|
58339
58339
|
if (!this.from || !this.to)
|
|
58340
58340
|
return;
|
|
58341
|
-
const t =
|
|
58342
|
-
this._centerPos.copy(t), this._centerPos.add(i), this._centerPos.multiplyScalar(0.5), Mr(this.gameObject, this.centered ? this._centerPos : t), this.gameObject.lookAt(
|
|
58341
|
+
const t = Nt(this.from).clone(), i = Nt(this.to).clone(), n = t.distanceTo(i);
|
|
58342
|
+
this._centerPos.copy(t), this._centerPos.add(i), this._centerPos.multiplyScalar(0.5), Mr(this.gameObject, this.centered ? this._centerPos : t), this.gameObject.lookAt(Nt(this.to).clone()), this.gameObject.scale.set(this.width, this.width, n);
|
|
58343
58343
|
}
|
|
58344
58344
|
}
|
|
58345
58345
|
uz([
|
|
@@ -59976,7 +59976,7 @@ const F1 = (QC = class extends Te {
|
|
|
59976
59976
|
setBodyFromGameObject(e = null) {
|
|
59977
59977
|
}
|
|
59978
59978
|
captureVelocity() {
|
|
59979
|
-
const e =
|
|
59979
|
+
const e = Nt(this.gameObject);
|
|
59980
59980
|
F1.tempPosition.copy(e);
|
|
59981
59981
|
const t = e.sub(this._lastPosition);
|
|
59982
59982
|
this._lastPosition.copy(F1.tempPosition), this._smoothedVelocity.lerp(t, this.context.time.deltaTime / 0.1);
|
|
@@ -60923,7 +60923,7 @@ const za = class extends Te {
|
|
|
60923
60923
|
oe.addNewComponent(i, za), t.scene.add(i);
|
|
60924
60924
|
}
|
|
60925
60925
|
static get systems() {
|
|
60926
|
-
const t =
|
|
60926
|
+
const t = Ft.Current;
|
|
60927
60927
|
return this._eventSystemMap.has(t) || this._eventSystemMap.set(t, []), this._eventSystemMap.get(t);
|
|
60928
60928
|
}
|
|
60929
60929
|
static get(t) {
|
|
@@ -61364,16 +61364,20 @@ class Ei extends Te {
|
|
|
61364
61364
|
set targetLerpSpeed(t) {
|
|
61365
61365
|
this.targetLerpDuration = 1 / t;
|
|
61366
61366
|
}
|
|
61367
|
+
/** @internal */
|
|
61367
61368
|
awake() {
|
|
61368
61369
|
this._didStart = !1, this._didSetTarget = !1, this._startedListeningToKeyEvents = !1;
|
|
61369
61370
|
}
|
|
61371
|
+
/** @internal */
|
|
61370
61372
|
start() {
|
|
61371
61373
|
this._didStart = !0, this._eventSystem = ao.get(this.context) ?? void 0, this._eventSystem && (this._afterHandleInputFn = this.afterHandleInput.bind(this), this._eventSystem.addEventListener(N1.AfterHandleInput, this._afterHandleInputFn));
|
|
61372
61374
|
}
|
|
61375
|
+
/** @internal */
|
|
61373
61376
|
onDestroy() {
|
|
61374
61377
|
var t, i;
|
|
61375
61378
|
(t = this._controls) == null || t.dispose(), (i = this._eventSystem) == null || i.removeEventListener(N1.AfterHandleInput, this._afterHandleInputFn);
|
|
61376
61379
|
}
|
|
61380
|
+
/** @internal */
|
|
61377
61381
|
onEnable() {
|
|
61378
61382
|
this._enableTime = this.context.time.time;
|
|
61379
61383
|
const t = oe.getComponent(this.gameObject, Vi);
|
|
@@ -61386,6 +61390,7 @@ class Ei extends Te {
|
|
|
61386
61390
|
}
|
|
61387
61391
|
this._controls && (Hy && (this.enablePan = !0, this.enableZoom = !0, this.middleClickToFocus = !0, Xo() && (this.doubleClickToFocus = !0)), this._controls.addEventListener("start", this.onControlsChangeStarted), (i == null ? void 0 : i.type) === "PerspectiveCamera" ? Hy || (this._controls.minDistance = this.minZoom, this._controls.maxDistance = this.maxZoom) : Hy || (this._controls.minZoom = this.minZoom, this._controls.maxZoom = this.maxZoom), this._startedListeningToKeyEvents || (this._startedListeningToKeyEvents = !0, this._controls.listenToKeyEvents(window.document.body))), this._syncedTransform = oe.getComponent(this.gameObject, Ju) ?? void 0;
|
|
61388
61392
|
}
|
|
61393
|
+
/** @internal */
|
|
61389
61394
|
onDisable() {
|
|
61390
61395
|
var t;
|
|
61391
61396
|
(t = this._camera) != null && t.cam && LD(this._camera.cam, this, !1), this._controls && (this._controls.enabled = !1, this._controls.autoRotate = !1, this._controls.removeEventListener("start", this.onControlsChangeStarted));
|
|
@@ -61393,11 +61398,16 @@ class Ei extends Te {
|
|
|
61393
61398
|
afterHandleInput(t) {
|
|
61394
61399
|
t.detail.args.pointerId === 0 && (t.detail.args.isDown ? this._controls && this._eventSystem && (this._shouldDisable = this._eventSystem.hasActiveUI) : (!t.detail.args.isPressed || t.detail.args.isUp) && (this._shouldDisable = !1));
|
|
61395
61400
|
}
|
|
61401
|
+
/** @internal */
|
|
61396
61402
|
onBeforeRender() {
|
|
61397
61403
|
var i, n;
|
|
61398
|
-
if (!this._controls
|
|
61404
|
+
if (!this._controls)
|
|
61399
61405
|
return;
|
|
61400
|
-
|
|
61406
|
+
if (this._cameraObject !== this.context.mainCamera) {
|
|
61407
|
+
this._controls.enabled = !1;
|
|
61408
|
+
return;
|
|
61409
|
+
}
|
|
61410
|
+
this._controls.enabled = !0, this.__handleSetTargetWhenBecomingActiveTheFirstTime(), (this.context.input.getPointerDown(1) || this.context.input.getPointerDown(2) || this.context.input.mouseWheelChanged || this.context.input.getPointerPressed(0) && ((i = this.context.input.getPointerPositionDelta(0)) != null && i.length()) || 0 > 0.1) && (this._inputs += 1), this._inputs > 0 && this.allowInterrupt && (this.enableRotate && (this.autoRotate = !1), this._cameraLerpActive = !1, this._lookTargetLerpActive = !1), this._inputs = 0;
|
|
61401
61411
|
let t = this.middleClickToFocus && this.context.input.getPointerClicked(1);
|
|
61402
61412
|
if (t || (t = this.doubleClickToFocus && this.context.input.getPointerDoubleClicked(0) && this.context.time.time - this._enableTime > 0.3), t && this.setTargetFromRaycast(), this._lookTargetLerpActive || this._cameraLerpActive) {
|
|
61403
61413
|
if (this._cameraLerpActive && this._cameraObject)
|
|
@@ -61429,7 +61439,7 @@ class Ei extends Te {
|
|
|
61429
61439
|
const t = oe.getComponent(this.gameObject, Vi);
|
|
61430
61440
|
if (t && !this.setLookTargetFromConstraint()) {
|
|
61431
61441
|
this.debugLog && console.log("NO TARGET");
|
|
61432
|
-
const n =
|
|
61442
|
+
const n = Nt(t.cam).length(), r = new w(0, 0, -n).applyMatrix4(t.cam.matrixWorld);
|
|
61433
61443
|
this.setLookTargetPosition(r, !0);
|
|
61434
61444
|
}
|
|
61435
61445
|
if (!this.autoFit && !this.setLookTargetFromConstraint()) {
|
|
@@ -61447,15 +61457,16 @@ class Ei extends Te {
|
|
|
61447
61457
|
setCameraAndLookTarget(t) {
|
|
61448
61458
|
if (!t || !(t instanceof me))
|
|
61449
61459
|
return;
|
|
61450
|
-
const i =
|
|
61460
|
+
const i = Nt(t), n = TU(t);
|
|
61451
61461
|
this.setTargetFromRaycast(new Qr(i, n)), this.setCameraTargetPosition(i);
|
|
61452
61462
|
}
|
|
61453
61463
|
/** Moves the camera to position smoothly.
|
|
61454
61464
|
* @param position The position in local space of the controllerObject to move the camera to. If null the camera will stop lerping to the target.
|
|
61465
|
+
* @param immediateOrDuration If true the camera will move immediately to the new position, otherwise it will lerp. If a number is passed in it will be used as the duration of the lerp.
|
|
61455
61466
|
*/
|
|
61456
61467
|
setCameraTargetPosition(t, i = !1) {
|
|
61457
61468
|
var n, r;
|
|
61458
|
-
t && (t instanceof me && (t =
|
|
61469
|
+
t && (t instanceof me && (t = Nt(t)), this._cameraEndPosition || (this._cameraEndPosition = new w()), this._cameraEndPosition.copy(t), i === !0 ? (this._cameraLerpActive = !1, (n = this.controllerObject) == null || n.position.copy(this._cameraEndPosition)) : this._cameraObject && (this._cameraLerpActive = !0, this._cameraLerp01 = 0, this._cameraStartPosition.copy((r = this._cameraObject) == null ? void 0 : r.position), typeof i == "number" ? this._cameraLerpDuration = i : this._cameraLerpDuration = this.targetLerpDuration));
|
|
61459
61470
|
}
|
|
61460
61471
|
/** True while the camera position is being lerped */
|
|
61461
61472
|
get cameraLerpActive() {
|
|
@@ -61465,9 +61476,12 @@ class Ei extends Te {
|
|
|
61465
61476
|
stopCameraLerp() {
|
|
61466
61477
|
this._cameraLerpActive = !1;
|
|
61467
61478
|
}
|
|
61468
|
-
/** Moves the camera look-at target to a position smoothly.
|
|
61479
|
+
/** Moves the camera look-at target to a position smoothly.
|
|
61480
|
+
* @param position The position in world space to move the camera target to. If null the camera will stop lerping to the target.
|
|
61481
|
+
* @param immediateOrDuration If true the camera target will move immediately to the new position, otherwise it will lerp. If a number is passed in it will be used as the duration of the lerp.
|
|
61482
|
+
*/
|
|
61469
61483
|
setLookTargetPosition(t = null, i = !1) {
|
|
61470
|
-
this._controls && t && (t instanceof me && (t =
|
|
61484
|
+
this._controls && t && (t instanceof me && (t = Nt(t)), this._lookTargetEndPosition.copy(t), i === !0 ? this._controls.target.copy(this._lookTargetEndPosition) : (this._lookTargetLerpActive = !0, this._lookTargetLerp01 = 0, this._lookTargetStartPosition.copy(this._controls.target), typeof i == "number" ? this._lookTargetLerpDuration = i : this._lookTargetLerpDuration = this.targetLerpDuration));
|
|
61471
61485
|
}
|
|
61472
61486
|
/** True while the camera look target is being lerped */
|
|
61473
61487
|
get lookTargetLerpActive() {
|
|
@@ -61477,7 +61491,10 @@ class Ei extends Te {
|
|
|
61477
61491
|
stopLookTargetLerp() {
|
|
61478
61492
|
this._lookTargetLerpActive = !1;
|
|
61479
61493
|
}
|
|
61480
|
-
/** Sets the look at target from an assigned lookAtConstraint source by index
|
|
61494
|
+
/** Sets the look at target from an assigned lookAtConstraint source by index
|
|
61495
|
+
* @param index The index of the source to use
|
|
61496
|
+
* @param t The interpolation factor between the current look at target and the new target
|
|
61497
|
+
*/
|
|
61481
61498
|
setLookTargetFromConstraint(t = 0, i = 1) {
|
|
61482
61499
|
var r;
|
|
61483
61500
|
if (!this._controls)
|
|
@@ -61498,22 +61515,18 @@ class Ei extends Te {
|
|
|
61498
61515
|
this._controls && (i >= 1 ? this._controls.target.copy(t) : this._controls.target.lerp(t, i));
|
|
61499
61516
|
}
|
|
61500
61517
|
setTargetFromRaycast(t) {
|
|
61501
|
-
var n, r;
|
|
61502
61518
|
if (!this.controls)
|
|
61503
61519
|
return;
|
|
61504
61520
|
const i = t ? this.context.physics.raycastFromRay(t) : this.context.physics.raycast();
|
|
61505
|
-
for (const
|
|
61506
|
-
if (
|
|
61507
|
-
const
|
|
61508
|
-
if (
|
|
61509
|
-
const
|
|
61510
|
-
if (
|
|
61521
|
+
for (const n of i)
|
|
61522
|
+
if (n.distance > 0 && oe.isActiveInHierarchy(n.object)) {
|
|
61523
|
+
const r = xI(n.object);
|
|
61524
|
+
if (r) {
|
|
61525
|
+
const o = r.canvas;
|
|
61526
|
+
if (o != null && o.screenspace)
|
|
61511
61527
|
break;
|
|
61512
61528
|
}
|
|
61513
|
-
|
|
61514
|
-
const c = Ft(this.context.mainCamera).clone().sub(this.controls.target).add(this._lookTargetEndPosition);
|
|
61515
|
-
(r = (n = this._cameraObject) == null ? void 0 : n.parent) == null || r.worldToLocal(c), this.setCameraTargetPosition(c);
|
|
61516
|
-
}
|
|
61529
|
+
this.setLookTargetPosition(n.point);
|
|
61517
61530
|
break;
|
|
61518
61531
|
}
|
|
61519
61532
|
}
|
|
@@ -61577,7 +61590,7 @@ class Ei extends Te {
|
|
|
61577
61590
|
Sm && console.log("Fit camera to objects", A, g, "distance", v), o.maxDistance = v * 10, o.minDistance = v * 0.01;
|
|
61578
61591
|
const _ = 0.05, y = l.clone();
|
|
61579
61592
|
y.y -= a.y * _, this.setLookTargetPosition(y, n), this.autoTarget = !1, r.near = v / 1e3, r.far = v * 100, r.updateMatrixWorld(), r.updateProjectionMatrix();
|
|
61580
|
-
const b =
|
|
61593
|
+
const b = Nt(r), M = l.clone();
|
|
61581
61594
|
if (M.sub(b), M.y = 0, M.normalize(), M.multiplyScalar(v), M.y += -_ * 4 * a.y, r.parent) {
|
|
61582
61595
|
const E = r.parent.worldToLocal(l.clone().sub(M));
|
|
61583
61596
|
this.setCameraTargetPosition(E, n);
|
|
@@ -61793,7 +61806,7 @@ const Zm = (A0 = class extends Te {
|
|
|
61793
61806
|
screenPointToRay(e, t, i) {
|
|
61794
61807
|
const n = this.cam, r = Zm._origin;
|
|
61795
61808
|
r.set(e, t, -1), this.context.input.convertScreenspaceToRaycastSpace(r), UD && console.log("screenPointToRay", e.toFixed(2), t.toFixed(2), "now:", r.x.toFixed(2), r.y.toFixed(2), "isInXR:" + this.context.isInXR), r.z = -1, r.unproject(n);
|
|
61796
|
-
const o = Zm._direction.set(r.x, r.y, r.z), a =
|
|
61809
|
+
const o = Zm._direction.set(r.x, r.y, r.z), a = Nt(n);
|
|
61797
61810
|
return o.sub(a), o.normalize(), i ? (i.set(a, o), i) : new Qr(a.clone(), o.clone());
|
|
61798
61811
|
}
|
|
61799
61812
|
getFrustum() {
|
|
@@ -63046,7 +63059,7 @@ class ede {
|
|
|
63046
63059
|
h(this, "_context");
|
|
63047
63060
|
}
|
|
63048
63061
|
get context() {
|
|
63049
|
-
return this._context ??
|
|
63062
|
+
return this._context ?? Ft.Current;
|
|
63050
63063
|
}
|
|
63051
63064
|
get isStateMachineBehaviour() {
|
|
63052
63065
|
return !0;
|
|
@@ -64290,7 +64303,7 @@ var eie = Object.defineProperty, tie = Object.getOwnPropertyDescriptor, Az = (s,
|
|
|
64290
64303
|
return i && n && eie(e, t, n), n;
|
|
64291
64304
|
};
|
|
64292
64305
|
const GD = ne("debugpost");
|
|
64293
|
-
class
|
|
64306
|
+
class Ut {
|
|
64294
64307
|
constructor(e) {
|
|
64295
64308
|
h(this, "_active", !0);
|
|
64296
64309
|
h(this, "_value");
|
|
@@ -64345,10 +64358,10 @@ class Nt {
|
|
|
64345
64358
|
}
|
|
64346
64359
|
Az([
|
|
64347
64360
|
x()
|
|
64348
|
-
],
|
|
64361
|
+
], Ut.prototype, "overrideState", 1);
|
|
64349
64362
|
Az([
|
|
64350
64363
|
x()
|
|
64351
|
-
],
|
|
64364
|
+
], Ut.prototype, "value", 1);
|
|
64352
64365
|
var iie = Object.defineProperty, nie = Object.getOwnPropertyDescriptor, sie = (s, e, t, i) => {
|
|
64353
64366
|
for (var n = i > 1 ? void 0 : i ? nie(e, t) : e, r = s.length - 1, o; r >= 0; r--)
|
|
64354
64367
|
(o = s[r]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
|
@@ -64366,7 +64379,7 @@ class Ir extends Te {
|
|
|
64366
64379
|
this.ensureVolumeParameters();
|
|
64367
64380
|
for (const i of Object.keys(t)) {
|
|
64368
64381
|
const n = t[i], r = this[i];
|
|
64369
|
-
r instanceof
|
|
64382
|
+
r instanceof Ut && (r.value = n);
|
|
64370
64383
|
}
|
|
64371
64384
|
}
|
|
64372
64385
|
}
|
|
@@ -64394,7 +64407,7 @@ class Ir extends Te {
|
|
|
64394
64407
|
const t = Object.keys(this);
|
|
64395
64408
|
for (const i of t) {
|
|
64396
64409
|
const n = this[i];
|
|
64397
|
-
n instanceof
|
|
64410
|
+
n instanceof Ut && n.__init();
|
|
64398
64411
|
}
|
|
64399
64412
|
}
|
|
64400
64413
|
onAfterDeserialize(t, i) {
|
|
@@ -64402,7 +64415,7 @@ class Ir extends Te {
|
|
|
64402
64415
|
const n = this.$serializedTypes;
|
|
64403
64416
|
if (n) {
|
|
64404
64417
|
for (const r of Object.keys(n))
|
|
64405
|
-
if (n[r] ===
|
|
64418
|
+
if (n[r] === Ut) {
|
|
64406
64419
|
const a = t[r];
|
|
64407
64420
|
if (a !== void 0) {
|
|
64408
64421
|
const l = this[r];
|
|
@@ -64416,7 +64429,7 @@ class Ir extends Te {
|
|
|
64416
64429
|
// since these handle that already.
|
|
64417
64430
|
onEditorModification(t) {
|
|
64418
64431
|
const i = t.propertyName;
|
|
64419
|
-
if (this[i] instanceof
|
|
64432
|
+
if (this[i] instanceof Ut) {
|
|
64420
64433
|
const n = t.value;
|
|
64421
64434
|
return this[i].value = n, !0;
|
|
64422
64435
|
}
|
|
@@ -64429,7 +64442,7 @@ class Ir extends Te {
|
|
|
64429
64442
|
const t = this.$serializedTypes;
|
|
64430
64443
|
if (t)
|
|
64431
64444
|
for (const i of Object.keys(t))
|
|
64432
|
-
t[i] ===
|
|
64445
|
+
t[i] === Ut && (this[i] || (this[i] = new Ut()));
|
|
64433
64446
|
}
|
|
64434
64447
|
}
|
|
64435
64448
|
sie([
|
|
@@ -64484,7 +64497,7 @@ class Dx extends Ir {
|
|
|
64484
64497
|
}
|
|
64485
64498
|
}
|
|
64486
64499
|
fie([
|
|
64487
|
-
x(
|
|
64500
|
+
x(Ut)
|
|
64488
64501
|
], Dx.prototype, "preset", 2);
|
|
64489
64502
|
Ea("Antialiasing", Dx);
|
|
64490
64503
|
const pie = ne("debugusdz");
|
|
@@ -65108,7 +65121,7 @@ class oc {
|
|
|
65108
65121
|
if (t) {
|
|
65109
65122
|
for (const n of this.Pois)
|
|
65110
65123
|
if (n.obj === t) {
|
|
65111
|
-
this.Pois.splice(this.Pois.indexOf(n), 1), this.LastChangeTime = (e == null ? void 0 : e.time.time) ?? ((i =
|
|
65124
|
+
this.Pois.splice(this.Pois.indexOf(n), 1), this.LastChangeTime = (e == null ? void 0 : e.time.time) ?? ((i = Ft.Current) == null ? void 0 : i.time.time);
|
|
65112
65125
|
return;
|
|
65113
65126
|
}
|
|
65114
65127
|
}
|
|
@@ -65155,7 +65168,7 @@ class Y_ extends Te {
|
|
|
65155
65168
|
update() {
|
|
65156
65169
|
var i;
|
|
65157
65170
|
if ((!this.context.connection.isConnected || (i = this._model) != null && i.hasOwnership) && (oc.LastChangeTime !== this._lastPoiChangedTime && (this._lastPoiChangedTime = oc.LastChangeTime, this._lookDuration = 0), this.selectTarget(), this._currentTargetObject && this.context.time.frameCount % 10 === 0 && this.target)) {
|
|
65158
|
-
const n =
|
|
65171
|
+
const n = Nt(this._currentTargetObject);
|
|
65159
65172
|
Mr(this.target, n), this.context.connection.isConnected && this.avatar && (this.context.connection.send("avatar-look-target-changed", this._targetModel), this._targetModel.guid = this.avatar.guid, this._targetModel.position.copy(n));
|
|
65160
65173
|
}
|
|
65161
65174
|
}
|
|
@@ -65735,9 +65748,9 @@ const Sz = (jC = class extends Te {
|
|
|
65735
65748
|
if (e && this.head) {
|
|
65736
65749
|
const t = this.eyes;
|
|
65737
65750
|
if (t) {
|
|
65738
|
-
const i =
|
|
65751
|
+
const i = Nt(e);
|
|
65739
65752
|
this.currentTargetPoint.lerp(i, this.context.time.deltaTime / 0.1);
|
|
65740
|
-
const n =
|
|
65753
|
+
const n = Nt(this.head), r = this.vec.copy(this.currentTargetPoint).sub(n).normalize();
|
|
65741
65754
|
if (r.length() < 0.1)
|
|
65742
65755
|
return;
|
|
65743
65756
|
const o = Sz.forward;
|
|
@@ -65914,11 +65927,11 @@ class Ez extends Te {
|
|
|
65914
65927
|
update() {
|
|
65915
65928
|
if (!this.from || !this.to || !this.hint)
|
|
65916
65929
|
return;
|
|
65917
|
-
const t =
|
|
65930
|
+
const t = Nt(this.to).clone(), i = Nt(this.from).clone(), n = t.distanceTo(i), r = t.clone();
|
|
65918
65931
|
r.sub(i);
|
|
65919
65932
|
const o = i.clone();
|
|
65920
65933
|
o.add(t), o.multiplyScalar(0.5);
|
|
65921
|
-
const a =
|
|
65934
|
+
const a = Nt(this.hint).clone();
|
|
65922
65935
|
a.sub(o);
|
|
65923
65936
|
const l = new w();
|
|
65924
65937
|
l.crossVectors(a, r), l.crossVectors(r, l), l.normalize();
|
|
@@ -66056,13 +66069,13 @@ const Mz = (WC = class extends Ir {
|
|
|
66056
66069
|
h(WC, "useSelectiveBloom", !1), WC);
|
|
66057
66070
|
let Tp = Mz;
|
|
66058
66071
|
BI([
|
|
66059
|
-
x(
|
|
66072
|
+
x(Ut)
|
|
66060
66073
|
], Tp.prototype, "threshold", 2);
|
|
66061
66074
|
BI([
|
|
66062
|
-
x(
|
|
66075
|
+
x(Ut)
|
|
66063
66076
|
], Tp.prototype, "intensity", 2);
|
|
66064
66077
|
BI([
|
|
66065
|
-
x(
|
|
66078
|
+
x(Ut)
|
|
66066
66079
|
], Tp.prototype, "scatter", 2);
|
|
66067
66080
|
Ea("Bloom", Tp);
|
|
66068
66081
|
const Mm = "NEEDLE_progressive", Vs = ne("debugprogressive"), aC = Symbol("needle-progressive-texture"), kf = /* @__PURE__ */ new Map();
|
|
@@ -66705,7 +66718,7 @@ const nne = ne("gizmos"), sne = ne("debugboxhelper"), Io = class extends Te {
|
|
|
66705
66718
|
for (let o = 0; o < t.children.length; o++)
|
|
66706
66719
|
t.children[o].type === "Mesh" && Io.testBox.expandByObject(t);
|
|
66707
66720
|
} else {
|
|
66708
|
-
const o =
|
|
66721
|
+
const o = Nt(t, Io._position), a = Zi(t, Io._size);
|
|
66709
66722
|
i !== void 0 && a.multiplyScalar(i), Io.testBox.setFromCenterAndSize(o, a);
|
|
66710
66723
|
}
|
|
66711
66724
|
this.updateBox();
|
|
@@ -66719,7 +66732,7 @@ const nne = ne("gizmos"), sne = ne("debugboxhelper"), Io = class extends Te {
|
|
|
66719
66732
|
if (this.box || (this.box = new Ai()), t || this.context.time.frameCount != this._lastMatrixUpdateFrame) {
|
|
66720
66733
|
const i = this._lastMatrixUpdateFrame < 0;
|
|
66721
66734
|
this._lastMatrixUpdateFrame = this.context.time.frameCount;
|
|
66722
|
-
const n = i, r =
|
|
66735
|
+
const n = i, r = Nt(this.gameObject, Io._position, n), o = Zi(this.gameObject, Io._size);
|
|
66723
66736
|
this.box.setFromCenterAndSize(r, o);
|
|
66724
66737
|
}
|
|
66725
66738
|
return this.box;
|
|
@@ -67945,7 +67958,7 @@ class Bp extends Te {
|
|
|
67945
67958
|
*moveToTarget() {
|
|
67946
67959
|
if (!this.target || !this.object)
|
|
67947
67960
|
return;
|
|
67948
|
-
const t =
|
|
67961
|
+
const t = Nt(this.object).clone(), i = Nt(this.target).clone(), n = Ri(this.object).clone(), r = Ri(this.target).clone(), o = Zi(this.object).clone(), a = Zi(this.target).clone(), l = t.distanceTo(i), c = n.angleTo(r), u = o.distanceTo(a);
|
|
67949
67962
|
if (l < 0.01 && c < 0.01 && u < 0.01) {
|
|
67950
67963
|
Mr(this.object, i), Aa(this.object, r), M_(this.object, a), this.coroutine = null;
|
|
67951
67964
|
return;
|
|
@@ -68624,7 +68637,7 @@ class Ph extends Te {
|
|
|
68624
68637
|
if (this.controller) {
|
|
68625
68638
|
const g = (p = this.controller) == null ? void 0 : p.rigidbody.getVelocity().y;
|
|
68626
68639
|
if (g < -1) {
|
|
68627
|
-
this._raycastOptions.ray || (this._raycastOptions.ray = new Qr()), this._raycastOptions.ray.origin.copy(
|
|
68640
|
+
this._raycastOptions.ray || (this._raycastOptions.ray = new Qr()), this._raycastOptions.ray.origin.copy(Nt(this.gameObject)), this._raycastOptions.ray.direction.set(0, -1, 0);
|
|
68628
68641
|
const v = this.layer;
|
|
68629
68642
|
this.gameObject.layers.disableAll(), this.gameObject.layers.set(2);
|
|
68630
68643
|
const _ = this.context.physics.raycast(this._raycastOptions);
|
|
@@ -68676,7 +68689,7 @@ class Hx extends Ir {
|
|
|
68676
68689
|
}
|
|
68677
68690
|
}
|
|
68678
68691
|
Ine([
|
|
68679
|
-
x(
|
|
68692
|
+
x(Ut)
|
|
68680
68693
|
], Hx.prototype, "intensity", 2);
|
|
68681
68694
|
Ea("ChromaticAberration", Hx);
|
|
68682
68695
|
const hA = new At();
|
|
@@ -70201,14 +70214,14 @@ class Qx extends Te {
|
|
|
70201
70214
|
Yy.set(o, c);
|
|
70202
70215
|
const u = Object.keys(l);
|
|
70203
70216
|
for (const d of u)
|
|
70204
|
-
l[d] instanceof
|
|
70217
|
+
l[d] instanceof Ut && c.push(d);
|
|
70205
70218
|
}
|
|
70206
70219
|
if (Yy.has(o)) {
|
|
70207
70220
|
const c = a.toLowerCase(), u = Yy.get(o);
|
|
70208
70221
|
for (const d of u)
|
|
70209
70222
|
if (d.toLowerCase() === c) {
|
|
70210
70223
|
const f = l[d];
|
|
70211
|
-
f instanceof
|
|
70224
|
+
f instanceof Ut && (r.length === 4 && r[3] === "active" ? (f.overrideState = t.value, this.scheduleRecreate()) : f && f.value !== void 0 && (f.value = t.value));
|
|
70212
70225
|
return;
|
|
70213
70226
|
}
|
|
70214
70227
|
}
|
|
@@ -70309,16 +70322,16 @@ class ld extends Ir {
|
|
|
70309
70322
|
// }
|
|
70310
70323
|
}
|
|
70311
70324
|
Vx([
|
|
70312
|
-
x(
|
|
70325
|
+
x(Ut)
|
|
70313
70326
|
], ld.prototype, "postExposure", 2);
|
|
70314
70327
|
Vx([
|
|
70315
|
-
x(
|
|
70328
|
+
x(Ut)
|
|
70316
70329
|
], ld.prototype, "contrast", 2);
|
|
70317
70330
|
Vx([
|
|
70318
|
-
x(
|
|
70331
|
+
x(Ut)
|
|
70319
70332
|
], ld.prototype, "hueShift", 2);
|
|
70320
70333
|
Vx([
|
|
70321
|
-
x(
|
|
70334
|
+
x(Ut)
|
|
70322
70335
|
], ld.prototype, "saturation", 2);
|
|
70323
70336
|
Ea("ColorAdjustments", ld);
|
|
70324
70337
|
const Gne = (Math.sqrt(5) - 1) / 4, ps = (5 - Math.sqrt(5)) / 20, Jy = (s) => Math.floor(s) | 0, Ky = /* @__PURE__ */ new Float64Array([
|
|
@@ -71095,7 +71108,7 @@ const Yi = class extends Lv {
|
|
|
71095
71108
|
h(this, "_viewProjectionName", "hlslcc_mtx4x4unity_MatrixVP");
|
|
71096
71109
|
h(this, "_viewMatrixName", "hlslcc_mtx4x4unity_MatrixV");
|
|
71097
71110
|
h(this, "_rendererData", new ose());
|
|
71098
|
-
this.identifier = t, Kc && console.log(this), this.type = "NEEDLE_CUSTOM_SHADER", this.uniforms[this._objToWorldName] || (this.uniforms[this._objToWorldName] = { value: [] }), this.uniforms[this._worldToObjectName] || (this.uniforms[this._worldToObjectName] = { value: [] }), this.uniforms[this._viewProjectionName] || (this.uniforms[this._viewProjectionName] = { value: [] }), this.uniforms[this._sphericalHarmonicsName], (this.depthTextureUniform || this.opaqueTextureUniform) &&
|
|
71111
|
+
this.identifier = t, Kc && console.log(this), this.type = "NEEDLE_CUSTOM_SHADER", this.uniforms[this._objToWorldName] || (this.uniforms[this._objToWorldName] = { value: [] }), this.uniforms[this._worldToObjectName] || (this.uniforms[this._worldToObjectName] = { value: [] }), this.uniforms[this._viewProjectionName] || (this.uniforms[this._viewProjectionName] = { value: [] }), this.uniforms[this._sphericalHarmonicsName], (this.depthTextureUniform || this.opaqueTextureUniform) && Ft.Current.pre_render_callbacks.push(this.onBeforeRenderSceneCallback);
|
|
71099
71112
|
}
|
|
71100
71113
|
clone() {
|
|
71101
71114
|
const t = super.clone();
|
|
@@ -71103,8 +71116,8 @@ const Yi = class extends Lv {
|
|
|
71103
71116
|
}
|
|
71104
71117
|
dispose() {
|
|
71105
71118
|
super.dispose();
|
|
71106
|
-
const t =
|
|
71107
|
-
t >= 0 &&
|
|
71119
|
+
const t = Ft.Current.pre_render_callbacks.indexOf(this.onBeforeRenderSceneCallback);
|
|
71120
|
+
t >= 0 && Ft.Current.pre_render_callbacks.splice(t, 1);
|
|
71108
71121
|
}
|
|
71109
71122
|
get depthTextureUniform() {
|
|
71110
71123
|
if (this.uniforms)
|
|
@@ -71115,13 +71128,13 @@ const Yi = class extends Lv {
|
|
|
71115
71128
|
return this.uniforms._CameraOpaqueTexture;
|
|
71116
71129
|
}
|
|
71117
71130
|
onBeforeRenderScene() {
|
|
71118
|
-
this.opaqueTextureUniform &&
|
|
71131
|
+
this.opaqueTextureUniform && Ft.Current.setRequireColor(!0), this.depthTextureUniform && Ft.Current.setRequireDepth(!0);
|
|
71119
71132
|
}
|
|
71120
71133
|
onBeforeRender(t, i, n, r, o, a) {
|
|
71121
71134
|
r.attributes.tangent || r.computeTangents(), this.onUpdateUniforms(n, o);
|
|
71122
71135
|
}
|
|
71123
71136
|
onUpdateUniforms(t, i) {
|
|
71124
|
-
const n =
|
|
71137
|
+
const n = Ft.Current;
|
|
71125
71138
|
if (t && (Yi.viewProjection && this.uniforms[this._viewProjectionName] && (Yi.viewProjection.copy(t.projectionMatrix).multiply(t.matrixWorldInverse), z_(Yi.viewProjection, Yi._viewProjectionValues)), Yi.viewMatrix && this.uniforms[this._viewMatrixName] && (Yi.viewMatrix.copy(t.matrixWorldInverse), z_(Yi.viewMatrix, Yi._viewMatrixValues)), this.uniforms[Yi._worldSpaceCameraPosName] && Yi._worldSpaceCameraPos.setFromMatrixPosition(t.matrixWorld)), this.uniforms._TimeParameters && (this.uniforms._TimeParameters.value = n.sceneLighting.timeVec4), this.uniforms._Time) {
|
|
71126
71139
|
const l = this.uniforms._Time.value;
|
|
71127
71140
|
l.x = n.sceneLighting.timeVec4.x / 20, l.y = n.sceneLighting.timeVec4.x, l.z = n.sceneLighting.timeVec4.x * 2, l.w = n.sceneLighting.timeVec4.x * 3;
|
|
@@ -71140,7 +71153,7 @@ const Yi = class extends Lv {
|
|
|
71140
71153
|
}
|
|
71141
71154
|
const r = n.mainLight;
|
|
71142
71155
|
if (r) {
|
|
71143
|
-
const l =
|
|
71156
|
+
const l = Nt(r.gameObject, Yi._mainLightPosition);
|
|
71144
71157
|
this.uniforms._MainLightPosition = { value: l.normalize() }, Yi._mainLightColor.set(r.color.r, r.color.g, r.color.b, 0), this.uniforms._MainLightColor = { value: Yi._mainLightColor };
|
|
71145
71158
|
const c = r.intensity;
|
|
71146
71159
|
Yi._lightData.z = c, this.uniforms.unity_LightData = { value: Yi._lightData };
|
|
@@ -72285,7 +72298,7 @@ Texture LODs available? ${this.hasTextureLODs ? "YES" : "NO"}`);
|
|
|
72285
72298
|
}
|
|
72286
72299
|
const p = c.geometry.boundingBox;
|
|
72287
72300
|
if (p && this.context.mainCamera instanceof Gt) {
|
|
72288
|
-
if (c.geometry.attributes.color && c.geometry.attributes.color.count < 100 && c.geometry.boundingSphere && (this._sphere.copy(c.geometry.boundingSphere), this._sphere.applyMatrix4(c.matrixWorld), this._sphere.containsPoint(
|
|
72301
|
+
if (c.geometry.attributes.color && c.geometry.attributes.color.count < 100 && c.geometry.boundingSphere && (this._sphere.copy(c.geometry.boundingSphere), this._sphere.applyMatrix4(c.matrixWorld), this._sphere.containsPoint(Nt(this.context.mainCamera)))) {
|
|
72289
72302
|
o = 0;
|
|
72290
72303
|
break;
|
|
72291
72304
|
}
|
|
@@ -75544,7 +75557,7 @@ class gl extends Ir {
|
|
|
75544
75557
|
const t = 1 / window.devicePixelRatio;
|
|
75545
75558
|
if (this.resolutionScale === void 0) {
|
|
75546
75559
|
let n = 1;
|
|
75547
|
-
Xo() && (n = 0.6), this.resolutionScale = new
|
|
75560
|
+
Xo() && (n = 0.6), this.resolutionScale = new Ut(n * t);
|
|
75548
75561
|
}
|
|
75549
75562
|
const i = new NN(this.context.mainCamera, {
|
|
75550
75563
|
worldFocusRange: 0.2,
|
|
@@ -75563,22 +75576,22 @@ pd([
|
|
|
75563
75576
|
x()
|
|
75564
75577
|
], gl.prototype, "mode", 2);
|
|
75565
75578
|
pd([
|
|
75566
|
-
x(
|
|
75579
|
+
x(Ut)
|
|
75567
75580
|
], gl.prototype, "focusDistance", 2);
|
|
75568
75581
|
pd([
|
|
75569
|
-
x(
|
|
75582
|
+
x(Ut)
|
|
75570
75583
|
], gl.prototype, "focalLength", 2);
|
|
75571
75584
|
pd([
|
|
75572
|
-
x(
|
|
75585
|
+
x(Ut)
|
|
75573
75586
|
], gl.prototype, "aperture", 2);
|
|
75574
75587
|
pd([
|
|
75575
|
-
x(
|
|
75588
|
+
x(Ut)
|
|
75576
75589
|
], gl.prototype, "gaussianMaxRadius", 2);
|
|
75577
75590
|
pd([
|
|
75578
|
-
x(
|
|
75591
|
+
x(Ut)
|
|
75579
75592
|
], gl.prototype, "resolutionScale", 2);
|
|
75580
75593
|
pd([
|
|
75581
|
-
x(
|
|
75594
|
+
x(Ut)
|
|
75582
75595
|
], gl.prototype, "bokehScale", 2);
|
|
75583
75596
|
Ea("DepthOfField", gl);
|
|
75584
75597
|
var Fse = Object.defineProperty, Use = Object.getOwnPropertyDescriptor, Nse = (s, e, t, i) => {
|
|
@@ -76095,17 +76108,17 @@ const DR = class {
|
|
|
76095
76108
|
onUpdate(e) {
|
|
76096
76109
|
if (!this._selected)
|
|
76097
76110
|
return;
|
|
76098
|
-
const t =
|
|
76111
|
+
const t = Nt(this._selected);
|
|
76099
76112
|
this.onUpdateWorldPosition(t, this._groundPlanePoint, !1), this.onUpdateGroundPlane(), this._didDragOnGroundPlaneLastFrame = !0, this._hasGroundPlane = !0;
|
|
76100
76113
|
}
|
|
76101
76114
|
onUpdateWorldPosition(e, t, i) {
|
|
76102
76115
|
if (this._selected) {
|
|
76103
76116
|
if (i) {
|
|
76104
|
-
const n =
|
|
76117
|
+
const n = Nt(this._selected);
|
|
76105
76118
|
n.y = e.y, e = n;
|
|
76106
76119
|
}
|
|
76107
76120
|
if (Mr(this._selected, e), Mr(this._groundLine, e), this._hasGroundPlane ? this._groundLine.scale.y = this._groundDistance : this._groundLine.scale.y = 1e3, this._groundLine.visible = this.showGizmo, this._groundMarker.visible = t !== null && this.showGizmo, t) {
|
|
76108
|
-
const n =
|
|
76121
|
+
const n = Nt(this._camera).distanceTo(t) * 0.01;
|
|
76109
76122
|
this._groundMarker.scale.set(n, n, n), Mr(this._groundMarker, t);
|
|
76110
76123
|
}
|
|
76111
76124
|
}
|
|
@@ -76119,7 +76132,7 @@ const DR = class {
|
|
|
76119
76132
|
onUpdateGroundPlane() {
|
|
76120
76133
|
if (!this._selected || !this._context)
|
|
76121
76134
|
return;
|
|
76122
|
-
const e =
|
|
76135
|
+
const e = Nt(this._selected), t = new Qr(new w(0, 0.1, 0).add(e), new w(0, -1, 0)), i = new ya();
|
|
76123
76136
|
i.ignore = [this._selected];
|
|
76124
76137
|
const n = this._context.physics.raycastFromRay(t, i);
|
|
76125
76138
|
for (let r = 0; r < n.length; r++) {
|
|
@@ -78200,7 +78213,7 @@ const ff = class extends Te {
|
|
|
78200
78213
|
static calculateCenter(e, t) {
|
|
78201
78214
|
const i = t || new w();
|
|
78202
78215
|
return i.set(0, 0, 0), e.forEach((n) => {
|
|
78203
|
-
i.add(
|
|
78216
|
+
i.add(Nt(n));
|
|
78204
78217
|
}), console.log(i), i.divideScalar(e.length), i;
|
|
78205
78218
|
}
|
|
78206
78219
|
static filterTopmostParent(e) {
|
|
@@ -79045,11 +79058,11 @@ class Qp extends Te {
|
|
|
79045
79058
|
update() {
|
|
79046
79059
|
if (!this.from)
|
|
79047
79060
|
return;
|
|
79048
|
-
var t =
|
|
79061
|
+
var t = Nt(this.from), i = Ri(this.from);
|
|
79049
79062
|
this.offset.copy(this.positionOffset);
|
|
79050
79063
|
const n = this.offset.length();
|
|
79051
79064
|
if (this.referenceSpace && this.offset.transformDirection(this.referenceSpace.matrixWorld).multiplyScalar(n), t.add(this.offset), this.levelPosition && this.referenceSpace) {
|
|
79052
|
-
const l = new Ar(this.gameObject.up, 0), c =
|
|
79065
|
+
const l = new Ar(this.gameObject.up, 0), c = Nt(this.referenceSpace);
|
|
79053
79066
|
l.setFromNormalAndCoplanarPoint(this.gameObject.up, c);
|
|
79054
79067
|
const u = new w(0, 0, 0);
|
|
79055
79068
|
l.projectPoint(t, u), t.copy(u);
|
|
@@ -83797,7 +83810,7 @@ class Bae extends oR {
|
|
|
83797
83810
|
h(this, "_lastDistance", 0);
|
|
83798
83811
|
}
|
|
83799
83812
|
update() {
|
|
83800
|
-
const t =
|
|
83813
|
+
const t = Nt(this.system.gameObject);
|
|
83801
83814
|
this._lastDistance = this._lastPosition.distanceTo(t), this._lastPosition.copy(t);
|
|
83802
83815
|
}
|
|
83803
83816
|
genValue() {
|
|
@@ -84243,7 +84256,7 @@ const Z0 = class extends Te {
|
|
|
84243
84256
|
return this._worldScale;
|
|
84244
84257
|
}
|
|
84245
84258
|
get worldPos() {
|
|
84246
|
-
return this._worldPositionFrame !== this.context.time.frame && (this._worldPositionFrame = this.context.time.frame,
|
|
84259
|
+
return this._worldPositionFrame !== this.context.time.frame && (this._worldPositionFrame = this.context.time.frame, Nt(this.gameObject, this._worldPos)), this._worldPos;
|
|
84247
84260
|
}
|
|
84248
84261
|
get matrixWorld() {
|
|
84249
84262
|
return this._container.matrixWorld;
|
|
@@ -84251,12 +84264,34 @@ const Z0 = class extends Te {
|
|
|
84251
84264
|
get isSubsystem() {
|
|
84252
84265
|
return this._isUsedAsSubsystem;
|
|
84253
84266
|
}
|
|
84254
|
-
/** Add a custom quarks behaviour to the particle system.
|
|
84255
|
-
* @link
|
|
84267
|
+
/** Add a custom quarks behaviour to the particle system.
|
|
84268
|
+
* You can add a quarks.Behaviour type or derive from {@link ParticleSystemBaseBehaviour}
|
|
84269
|
+
* @link https://github.com/Alchemist0823/three.quarks
|
|
84270
|
+
* @example
|
|
84271
|
+
* ```typescript
|
|
84272
|
+
* class MyBehaviour extends ParticleSystemBaseBehaviour {
|
|
84273
|
+
* initialize(particle: Particle) {
|
|
84274
|
+
* // initialize the particle
|
|
84275
|
+
* }
|
|
84276
|
+
* update(particle: Particle, delta: number) {
|
|
84277
|
+
* // do something with the particle
|
|
84278
|
+
* }
|
|
84279
|
+
* }
|
|
84280
|
+
*
|
|
84281
|
+
* const system = gameObject.getComponent(ParticleSystem);
|
|
84282
|
+
* system.addBehaviour(new MyBehaviour());
|
|
84283
|
+
* ```
|
|
84256
84284
|
*/
|
|
84257
84285
|
addBehaviour(e) {
|
|
84258
84286
|
return this._particleSystem ? (e instanceof gd && (e.system = this), vt() && console.log("add behaviour", e), this._particleSystem.addBehavior(e), !0) : !1;
|
|
84259
84287
|
}
|
|
84288
|
+
/** Remove a custom quarks behaviour from the particle system. **/
|
|
84289
|
+
removeBehaviour(e) {
|
|
84290
|
+
if (!this._particleSystem)
|
|
84291
|
+
return !1;
|
|
84292
|
+
const t = this._particleSystem.behaviors, i = t.indexOf(e);
|
|
84293
|
+
return i !== -1 && t.splice(i, 1), !0;
|
|
84294
|
+
}
|
|
84260
84295
|
/** Removes all behaviours from the particle system
|
|
84261
84296
|
* **Note:** this will also remove the default behaviours like SizeBehaviour, ColorBehaviour etc.
|
|
84262
84297
|
*/
|
|
@@ -84295,11 +84330,13 @@ const Z0 = class extends Te {
|
|
|
84295
84330
|
}
|
|
84296
84331
|
ng && e.length > 0 && console.log("SubEmitters: ", e, this), this._subEmitterSystems = e;
|
|
84297
84332
|
}
|
|
84333
|
+
/** @internal */
|
|
84298
84334
|
onAfterDeserialize(e) {
|
|
84299
84335
|
if (this._subEmitterSystems && Array.isArray(this._subEmitterSystems))
|
|
84300
84336
|
for (const t of this._subEmitterSystems)
|
|
84301
84337
|
t._deserialize(this.context, this.gameObject);
|
|
84302
84338
|
}
|
|
84339
|
+
/** @internal */
|
|
84303
84340
|
awake() {
|
|
84304
84341
|
if (this._worldPositionFrame = -1, this._renderer = this.gameObject.getComponent(Ta), !this.main)
|
|
84305
84342
|
throw new Error("Not Supported: ParticleSystem needs a serialized MainModule. Creating new particle systems at runtime is currently not supported.");
|
|
@@ -84307,19 +84344,23 @@ const Z0 = class extends Te {
|
|
|
84307
84344
|
const e = this._particleSystem.emitter;
|
|
84308
84345
|
this.context.scene.add(e), this.inheritVelocity.system && this.inheritVelocity.system !== this && (this.inheritVelocity = this.inheritVelocity.clone()), this.inheritVelocity.awake(this), ng && (console.log(this), this.gameObject.add(new jo(1)));
|
|
84309
84346
|
}
|
|
84347
|
+
/** @internal */
|
|
84310
84348
|
start() {
|
|
84311
84349
|
this.addSubParticleSystems(), this.updateLayers();
|
|
84312
84350
|
}
|
|
84351
|
+
/** @internal */
|
|
84313
84352
|
onDestroy() {
|
|
84314
84353
|
var e, t, i, n;
|
|
84315
84354
|
(e = this._container) == null || e.removeFromParent(), (t = this._batchSystem) == null || t.removeFromParent(), (i = this._particleSystem) == null || i.emitter.removeFromParent(), (n = this._particleSystem) == null || n.dispose();
|
|
84316
84355
|
}
|
|
84356
|
+
/** @internal */
|
|
84317
84357
|
onEnable() {
|
|
84318
84358
|
this.main && (this.inheritVelocity && (this.inheritVelocity.system = this), this._batchSystem && (this._batchSystem.visible = !0), this.playOnAwake && this.play(), this._isPlaying = this.playOnAwake);
|
|
84319
84359
|
}
|
|
84320
84360
|
onDisable() {
|
|
84321
84361
|
this._batchSystem && (this._batchSystem.visible = !1);
|
|
84322
84362
|
}
|
|
84363
|
+
/** @internal */
|
|
84323
84364
|
onBeforeRender() {
|
|
84324
84365
|
var e;
|
|
84325
84366
|
this.main && (this._didPreWarm === !1 && ((e = this.main) == null ? void 0 : e.prewarm) === !0 && (this._didPreWarm = !0, this.preWarm()), this.onUpdate(), this.onSimulate(this.deltaTime));
|
|
@@ -84556,7 +84597,7 @@ class hw extends Ir {
|
|
|
84556
84597
|
}
|
|
84557
84598
|
}
|
|
84558
84599
|
jae([
|
|
84559
|
-
x(
|
|
84600
|
+
x(Ut)
|
|
84560
84601
|
], hw.prototype, "granularity", 2);
|
|
84561
84602
|
Ea("PixelationEffect", hw);
|
|
84562
84603
|
class xv extends Te {
|
|
@@ -85044,6 +85085,7 @@ class Rr extends Te {
|
|
|
85044
85085
|
}
|
|
85045
85086
|
return t.uri === this.sourceId ? (console.warn("SceneSwitcher: can't load own scene - prevent recursive loading", this.sourceId), !1) : this.__lastSwitchScene === t && this.__lastSwitchScenePromise ? this.__lastSwitchScenePromise : (this.__lastSwitchScene = t, this.__lastSwitchScenePromise = this.__internalSwitchScene(t), await this.__lastSwitchScenePromise);
|
|
85046
85087
|
}
|
|
85088
|
+
/** @internal */
|
|
85047
85089
|
async __internalSwitchScene(t) {
|
|
85048
85090
|
var n, r;
|
|
85049
85091
|
if (this._currentScene) {
|
|
@@ -85136,6 +85178,13 @@ class Rr extends Te {
|
|
|
85136
85178
|
o instanceof Promise && await o;
|
|
85137
85179
|
}
|
|
85138
85180
|
}
|
|
85181
|
+
if (this._isCurrentlyLoading) {
|
|
85182
|
+
const n = this.tryGetSceneEventListener(this.gameObject);
|
|
85183
|
+
if (n && n.sceneOpened) {
|
|
85184
|
+
const r = n.sceneOpened(this);
|
|
85185
|
+
r instanceof Promise && await r;
|
|
85186
|
+
}
|
|
85187
|
+
}
|
|
85139
85188
|
}
|
|
85140
85189
|
async onEndLoading() {
|
|
85141
85190
|
var t;
|
|
@@ -85148,6 +85197,13 @@ class Rr extends Te {
|
|
|
85148
85197
|
}
|
|
85149
85198
|
oe.remove(i);
|
|
85150
85199
|
}
|
|
85200
|
+
if (!this._isCurrentlyLoading) {
|
|
85201
|
+
const i = this.tryGetSceneEventListener(this.gameObject);
|
|
85202
|
+
if (i && i.sceneClosing) {
|
|
85203
|
+
const n = i.sceneClosing();
|
|
85204
|
+
n instanceof Promise && await n;
|
|
85205
|
+
}
|
|
85206
|
+
}
|
|
85151
85207
|
}
|
|
85152
85208
|
tryGetSceneEventListener(t, i = 0) {
|
|
85153
85209
|
const n = oe.foreachComponent(t, (r) => r.sceneClosing ? r : void 0);
|
|
@@ -86118,19 +86174,19 @@ class Dh extends Ir {
|
|
|
86118
86174
|
}
|
|
86119
86175
|
}
|
|
86120
86176
|
bA([
|
|
86121
|
-
x(
|
|
86177
|
+
x(Ut)
|
|
86122
86178
|
], Dh.prototype, "intensity", 2);
|
|
86123
86179
|
bA([
|
|
86124
|
-
x(
|
|
86180
|
+
x(Ut)
|
|
86125
86181
|
], Dh.prototype, "falloff", 2);
|
|
86126
86182
|
bA([
|
|
86127
|
-
x(
|
|
86183
|
+
x(Ut)
|
|
86128
86184
|
], Dh.prototype, "samples", 2);
|
|
86129
86185
|
bA([
|
|
86130
|
-
x(
|
|
86186
|
+
x(Ut)
|
|
86131
86187
|
], Dh.prototype, "color", 2);
|
|
86132
86188
|
bA([
|
|
86133
|
-
x(
|
|
86189
|
+
x(Ut)
|
|
86134
86190
|
], Dh.prototype, "luminanceInfluence", 2);
|
|
86135
86191
|
Ea("ScreenSpaceAmbientOcclusion", Dh);
|
|
86136
86192
|
var ule = Object.defineProperty, dle = Object.getOwnPropertyDescriptor, vd = (s, e, t, i) => {
|
|
@@ -86181,20 +86237,20 @@ vd([
|
|
|
86181
86237
|
x()
|
|
86182
86238
|
], Al.prototype, "gammaCorrection", 2);
|
|
86183
86239
|
vd([
|
|
86184
|
-
x(
|
|
86240
|
+
x(Ut)
|
|
86185
86241
|
], Al.prototype, "intensity", 2);
|
|
86186
86242
|
vd([
|
|
86187
|
-
x(
|
|
86243
|
+
x(Ut)
|
|
86188
86244
|
], Al.prototype, "falloff", 2);
|
|
86189
86245
|
vd([
|
|
86190
|
-
x(
|
|
86246
|
+
x(Ut)
|
|
86191
86247
|
], Al.prototype, "aoRadius", 2);
|
|
86192
86248
|
vd([
|
|
86193
86249
|
sr(),
|
|
86194
86250
|
x()
|
|
86195
86251
|
], Al.prototype, "screenspaceRadius", 2);
|
|
86196
86252
|
vd([
|
|
86197
|
-
x(
|
|
86253
|
+
x(Ut)
|
|
86198
86254
|
], Al.prototype, "color", 2);
|
|
86199
86255
|
vd([
|
|
86200
86256
|
sr(),
|
|
@@ -86330,7 +86386,7 @@ const C4 = (KC = class extends Te {
|
|
|
86330
86386
|
updateNow(e) {
|
|
86331
86387
|
if (!(!this.target || this.target === this.gameObject)) {
|
|
86332
86388
|
if (this.followFactor > 0) {
|
|
86333
|
-
const t =
|
|
86389
|
+
const t = Nt(this.target), i = this._firstUpdate || e ? 1 : tt.clamp01(this.context.time.deltaTime * this.followFactor), n = this.worldPosition;
|
|
86334
86390
|
this.positionAxes & Km.X && (n.x = tt.lerp(n.x, t.x, i)), this.positionAxes & Km.Y && (n.y = tt.lerp(n.y, t.y, i)), this.positionAxes & Km.Z && (n.z = tt.lerp(n.z, t.z, i)), this.worldPosition = n;
|
|
86335
86391
|
}
|
|
86336
86392
|
if (this.rotateFactor > 0) {
|
|
@@ -87350,7 +87406,7 @@ class Gle {
|
|
|
87350
87406
|
$r.clear();
|
|
87351
87407
|
const i = $r.createString(this.guid), n = $r.createString(this.userId);
|
|
87352
87408
|
Qa.startSyncedCameraModel($r), Qa.addGuid($r, i), Qa.addUserId($r, n);
|
|
87353
|
-
const r =
|
|
87409
|
+
const r = Nt(e), o = ax(e);
|
|
87354
87410
|
Qa.addPos($r, Uu.createVec3($r, r.x, r.y, r.z)), Qa.addRot($r, Uu.createVec3($r, o.x, o.y, o.z));
|
|
87355
87411
|
const a = Qa.endSyncedCameraModel($r);
|
|
87356
87412
|
$r.finish(a, nb), t.sendBinary($r.asUint8Array());
|
|
@@ -87407,7 +87463,7 @@ const rM = ($C = class extends Te {
|
|
|
87407
87463
|
if (!this.context.connection.isConnected || this.context.connection.connectionId === null)
|
|
87408
87464
|
return;
|
|
87409
87465
|
this._model === null && (this._model = new Gle(this.context.connection.connectionId, this.context.connection.connectionId + "_camera"));
|
|
87410
|
-
const t =
|
|
87466
|
+
const t = Nt(e), i = Ri(e);
|
|
87411
87467
|
(t.distanceTo(this._lastWorldPosition) > 1e-3 || i.angleTo(this._lastWorldQuaternion) > 0.01) && (this._needsUpdate = !0), this._lastWorldPosition.copy(t), this._lastWorldQuaternion.copy(i), !((!this._needsUpdate || this.context.time.frameCount % 2 !== 0) && !(this.context.time.realtimeSinceStartup - this._lastUpdateTime > this._camTimeoutInSeconds * 0.5)) && (this._lastUpdateTime = this.context.time.realtimeSinceStartup, this._needsUpdate = !1, this._model.send(e, this.context.connection), this.context.isInXR || this.context.players.setPlayerView(this.context.connection.connectionId, e, Lu.Browser));
|
|
87412
87468
|
}
|
|
87413
87469
|
onReceivedRemoteCameraInfoBin(e) {
|
|
@@ -87713,22 +87769,22 @@ class bc extends Ir {
|
|
|
87713
87769
|
}
|
|
87714
87770
|
}
|
|
87715
87771
|
Xp([
|
|
87716
|
-
x(
|
|
87772
|
+
x(Ut)
|
|
87717
87773
|
], bc.prototype, "offset", 2);
|
|
87718
87774
|
Xp([
|
|
87719
|
-
x(
|
|
87775
|
+
x(Ut)
|
|
87720
87776
|
], bc.prototype, "rotation", 2);
|
|
87721
87777
|
Xp([
|
|
87722
|
-
x(
|
|
87778
|
+
x(Ut)
|
|
87723
87779
|
], bc.prototype, "focusArea", 2);
|
|
87724
87780
|
Xp([
|
|
87725
|
-
x(
|
|
87781
|
+
x(Ut)
|
|
87726
87782
|
], bc.prototype, "feather", 2);
|
|
87727
87783
|
Xp([
|
|
87728
|
-
x(
|
|
87784
|
+
x(Ut)
|
|
87729
87785
|
], bc.prototype, "kernelSize", 2);
|
|
87730
87786
|
Xp([
|
|
87731
|
-
x(
|
|
87787
|
+
x(Ut)
|
|
87732
87788
|
], bc.prototype, "resolutionScale", 2);
|
|
87733
87789
|
Ea("TiltShiftEffect", bc);
|
|
87734
87790
|
var Xle = Object.defineProperty, Yle = Object.getOwnPropertyDescriptor, Jle = (s, e, t, i) => {
|
|
@@ -87748,7 +87804,7 @@ class vw extends Ir {
|
|
|
87748
87804
|
return !0;
|
|
87749
87805
|
}
|
|
87750
87806
|
init() {
|
|
87751
|
-
this.mode || (this.mode = new
|
|
87807
|
+
this.mode || (this.mode = new Ut(Nr)), this.mode.defaultValue = Nr;
|
|
87752
87808
|
}
|
|
87753
87809
|
apply() {
|
|
87754
87810
|
this.mode || this.init(), this.mode.onValueChanged = this._apply.bind(this), this._apply(this.mode.value);
|
|
@@ -87770,7 +87826,7 @@ class vw extends Ir {
|
|
|
87770
87826
|
}
|
|
87771
87827
|
}
|
|
87772
87828
|
Jle([
|
|
87773
|
-
x(
|
|
87829
|
+
x(Ut)
|
|
87774
87830
|
], vw.prototype, "mode", 2);
|
|
87775
87831
|
Ea("Tonemapping", vw);
|
|
87776
87832
|
var Kle = Object.defineProperty, Zle = Object.getOwnPropertyDescriptor, Aw = (s, e, t, i) => {
|
|
@@ -87910,13 +87966,13 @@ class Jp extends Ir {
|
|
|
87910
87966
|
}
|
|
87911
87967
|
}
|
|
87912
87968
|
dR([
|
|
87913
|
-
x(
|
|
87969
|
+
x(Ut)
|
|
87914
87970
|
], Jp.prototype, "color", 2);
|
|
87915
87971
|
dR([
|
|
87916
|
-
x(
|
|
87972
|
+
x(Ut)
|
|
87917
87973
|
], Jp.prototype, "intensity", 2);
|
|
87918
87974
|
dR([
|
|
87919
|
-
x(
|
|
87975
|
+
x(Ut)
|
|
87920
87976
|
], Jp.prototype, "center", 2);
|
|
87921
87977
|
Ea("Vignette", Jp);
|
|
87922
87978
|
var tce = Object.defineProperty, ice = Object.getOwnPropertyDescriptor, nce = (s, e, t, i) => {
|
|
@@ -90323,7 +90379,7 @@ const Qce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
90323
90379
|
VisibilityAction: Gx,
|
|
90324
90380
|
Voip: Ep,
|
|
90325
90381
|
Volume: Qx,
|
|
90326
|
-
VolumeParameter:
|
|
90382
|
+
VolumeParameter: Ut,
|
|
90327
90383
|
VolumeProfile: Bx,
|
|
90328
90384
|
WebARCameraBackground: fR,
|
|
90329
90385
|
WebARSessionRoot: qo,
|
|
@@ -90552,7 +90608,7 @@ J.add("Vignette", Jp);
|
|
|
90552
90608
|
J.add("VisibilityAction", Gx);
|
|
90553
90609
|
J.add("Voip", Ep);
|
|
90554
90610
|
J.add("Volume", Qx);
|
|
90555
|
-
J.add("VolumeParameter",
|
|
90611
|
+
J.add("VolumeParameter", Ut);
|
|
90556
90612
|
J.add("VolumeProfile", Bx);
|
|
90557
90613
|
J.add("WebARCameraBackground", fR);
|
|
90558
90614
|
J.add("WebARSessionRoot", qo);
|
|
@@ -90786,7 +90842,7 @@ function $ce(s, e, t = !0) {
|
|
|
90786
90842
|
}
|
|
90787
90843
|
}
|
|
90788
90844
|
function hde(s, e = null) {
|
|
90789
|
-
const t = e ??
|
|
90845
|
+
const t = e ?? Ft.Current.scripts;
|
|
90790
90846
|
for (const i in t) {
|
|
90791
90847
|
const n = t[i];
|
|
90792
90848
|
if (n && n.guid === s)
|
|
@@ -90895,7 +90951,7 @@ class j4 extends HTMLElement {
|
|
|
90895
90951
|
<div class="content">
|
|
90896
90952
|
<slot class="overlay-content"></slot>
|
|
90897
90953
|
</div>
|
|
90898
|
-
`, this.shadowRoot && this.shadowRoot.appendChild(t.content.cloneNode(!0)), this._context = new
|
|
90954
|
+
`, this.shadowRoot && this.shadowRoot.appendChild(t.content.cloneNode(!0)), this._context = new Ft({ domElement: this }), this.addEventListener("error", this.onError);
|
|
90899
90955
|
}
|
|
90900
90956
|
static get observedAttributes() {
|
|
90901
90957
|
return the;
|
|
@@ -91001,7 +91057,7 @@ class j4 extends HTMLElement {
|
|
|
91001
91057
|
var p, m;
|
|
91002
91058
|
if (!this.isConnected)
|
|
91003
91059
|
return;
|
|
91004
|
-
if (this._context || (on && console.warn("Create new context"), this._context = new
|
|
91060
|
+
if (this._context || (on && console.warn("Create new context"), this._context = new Ft({ domElement: this })), !this._context) {
|
|
91005
91061
|
console.error("Needle Engine: Context not initialized");
|
|
91006
91062
|
return;
|
|
91007
91063
|
}
|
|
@@ -93154,7 +93210,7 @@ const Ng = class {
|
|
|
93154
93210
|
if (!n)
|
|
93155
93211
|
return console.error("Can not perform raycast - no camera found"), null;
|
|
93156
93212
|
o.set(e.origin.x, e.origin.y, e.origin.z);
|
|
93157
|
-
const u =
|
|
93213
|
+
const u = Nt(n);
|
|
93158
93214
|
o.sub(u);
|
|
93159
93215
|
}
|
|
93160
93216
|
return o.normalize(), e.dir.x = o.x, e.dir.y = o.y, e.dir.z = o.z, e;
|
|
@@ -93319,7 +93375,7 @@ this is not optimal for performance since this isn't supported by the Rapier phy
|
|
|
93319
93375
|
throw new Error("Physics world not initialized");
|
|
93320
93376
|
const i = this._tempMatrix;
|
|
93321
93377
|
let n;
|
|
93322
|
-
e.attachedRigidbody ? n = this.getRigidbody(e, this._tempMatrix) : (Qs && console.log("Create collider without rigidbody", e.name), i.makeRotationFromQuaternion(Ri(e.gameObject)), i.setPosition(
|
|
93378
|
+
e.attachedRigidbody ? n = this.getRigidbody(e, this._tempMatrix) : (Qs && console.log("Create collider without rigidbody", e.name), i.makeRotationFromQuaternion(Ri(e.gameObject)), i.setPosition(Nt(e.gameObject))), i.decompose(this._tempPosition, this._tempQuaternion, this._tempScale), this.tryApplyCenter(e, this._tempPosition), t.setTranslation(this._tempPosition.x, this._tempPosition.y, this._tempPosition.z), t.setRotation(this._tempQuaternion), t.setSensor(e.isTrigger);
|
|
93323
93379
|
const r = e.sharedMaterial;
|
|
93324
93380
|
if (r) {
|
|
93325
93381
|
if (r.bounciness !== void 0 && t.setRestitution(r.bounciness), r.bounceCombine !== void 0)
|
|
@@ -93397,12 +93453,12 @@ Error:`, a), null;
|
|
|
93397
93453
|
if (i = n[mr], !i) {
|
|
93398
93454
|
const r = n.isKinematic && !zC;
|
|
93399
93455
|
Qs && console.log("Create rigidbody", r);
|
|
93400
|
-
const o = r ? ou.RigidBodyDesc.kinematicPositionBased() : ou.RigidBodyDesc.dynamic(), a =
|
|
93456
|
+
const o = r ? ou.RigidBodyDesc.kinematicPositionBased() : ou.RigidBodyDesc.dynamic(), a = Nt(e.attachedRigidbody.gameObject);
|
|
93401
93457
|
o.setTranslation(a.x, a.y, a.z), o.setRotation(Ri(e.attachedRigidbody.gameObject)), o.centerOfMass = new ou.Vector3(n.centerOfMass.x, n.centerOfMass.y, n.centerOfMass.z), i = this.world.createRigidBody(o), this.bodies.push(i), this.objects.push(n);
|
|
93402
93458
|
}
|
|
93403
93459
|
i[Lr] = n, n[mr] = i, this.internalUpdateRigidbodyProperties(n, i), this.getRigidbodyRelativeMatrix(e.gameObject, n.gameObject, t), e[EL] = i;
|
|
93404
93460
|
} else {
|
|
93405
|
-
const n = ou.RigidBodyDesc.kinematicPositionBased(), r =
|
|
93461
|
+
const n = ou.RigidBodyDesc.kinematicPositionBased(), r = Nt(e.gameObject);
|
|
93406
93462
|
n.setTranslation(r.x, r.y, r.z), n.setRotation(Ri(e.gameObject)), i = this.world.createRigidBody(n), t.identity(), i[Lr] = null;
|
|
93407
93463
|
}
|
|
93408
93464
|
return i;
|
|
@@ -93496,7 +93552,7 @@ Error:`, a), null;
|
|
|
93496
93552
|
}
|
|
93497
93553
|
syncPhysicsBody(e, t, i, n) {
|
|
93498
93554
|
if (t instanceof wL) {
|
|
93499
|
-
const r =
|
|
93555
|
+
const r = Nt(e, this._tempPosition), o = Ri(e, this._tempQuaternion);
|
|
93500
93556
|
switch (t.bodyType()) {
|
|
93501
93557
|
case Dg.Fixed:
|
|
93502
93558
|
case Dg.KinematicPositionBased:
|
|
@@ -93508,7 +93564,7 @@ Error:`, a), null;
|
|
|
93508
93564
|
break;
|
|
93509
93565
|
}
|
|
93510
93566
|
} else if (t instanceof SL) {
|
|
93511
|
-
const r =
|
|
93567
|
+
const r = Nt(e, this._tempPosition), o = Ri(e, this._tempQuaternion), a = t[Lr];
|
|
93512
93568
|
if (this.tryApplyCenter(a, r), i) {
|
|
93513
93569
|
const l = t.translation();
|
|
93514
93570
|
(l.x !== r.x || l.y !== r.y || l.z !== r.z) && t.setTranslation(r);
|
|
@@ -93788,7 +93844,7 @@ function rG(s, e) {
|
|
|
93788
93844
|
console.warn("Missing camera object, can not add orbit controls");
|
|
93789
93845
|
}
|
|
93790
93846
|
const SR = {
|
|
93791
|
-
Context:
|
|
93847
|
+
Context: Ft,
|
|
93792
93848
|
glTF: {
|
|
93793
93849
|
loadFromURL: z4
|
|
93794
93850
|
}
|
|
@@ -94849,7 +94905,7 @@ export {
|
|
|
94849
94905
|
Q$ as ConnectionEvents,
|
|
94850
94906
|
yhe as ContactPoint,
|
|
94851
94907
|
dd as ContactShadows,
|
|
94852
|
-
|
|
94908
|
+
Ft as Context,
|
|
94853
94909
|
Vue as ContextArgs,
|
|
94854
94910
|
In as ContextEvent,
|
|
94855
94911
|
ci as ContextRegistry,
|
|
@@ -95098,7 +95154,7 @@ export {
|
|
|
95098
95154
|
Gx as VisibilityAction,
|
|
95099
95155
|
Ep as Voip,
|
|
95100
95156
|
Qx as Volume,
|
|
95101
|
-
|
|
95157
|
+
Ut as VolumeParameter,
|
|
95102
95158
|
Bx as VolumeProfile,
|
|
95103
95159
|
Gue as WaitForFrames,
|
|
95104
95160
|
tee as WaitForPromise,
|
|
@@ -95196,7 +95252,7 @@ export {
|
|
|
95196
95252
|
$b as getUrlParams,
|
|
95197
95253
|
TU as getWorldDirection,
|
|
95198
95254
|
IU as getWorldEuler,
|
|
95199
|
-
|
|
95255
|
+
Nt as getWorldPosition,
|
|
95200
95256
|
Ri as getWorldQuaternion,
|
|
95201
95257
|
ax as getWorldRotation,
|
|
95202
95258
|
Zi as getWorldScale,
|