@needle-tools/engine 3.37.5-alpha → 3.37.6-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.
@@ -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 e5(s, e, t) {
9153
+ function eV(s, e, t) {
9154
9154
  let i;
9155
9155
  function n() {
9156
9156
  if (i !== void 0)
@@ -9196,7 +9196,7 @@ function e5(s, e, t) {
9196
9196
  maxSamples: E
9197
9197
  };
9198
9198
  }
9199
- function t5(s) {
9199
+ function tV(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 t5(s) {
9242
9242
  return e.numPlanes = A, e.numIntersection = 0, g;
9243
9243
  }
9244
9244
  }
9245
- function i5(s) {
9245
+ function iV(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 = n5(o, e, t);
9417
+ ({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = sP(o)), this._blurMaterial = nV(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 n5(s, e, t) {
9558
+ function nV(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 s5(s) {
9776
+ function sV(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 s5(s) {
9820
9820
  dispose: o
9821
9821
  };
9822
9822
  }
9823
- function r5(s) {
9823
+ function rV(s) {
9824
9824
  const e = {};
9825
9825
  function t(i) {
9826
9826
  if (e[i] !== void 0)
@@ -9857,7 +9857,7 @@ function r5(s) {
9857
9857
  }
9858
9858
  };
9859
9859
  }
9860
- function o5(s, e, t, i) {
9860
+ function oV(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 o5(s, e, t, i) {
9926
9926
  getWireframeAttribute: u
9927
9927
  };
9928
9928
  }
9929
- function a5(s, e, t, i) {
9929
+ function aV(s, e, t, i) {
9930
9930
  const n = i.isWebGL2;
9931
9931
  let r;
9932
9932
  function o(p) {
@@ -9968,7 +9968,7 @@ function a5(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 l5(s) {
9971
+ function lV(s) {
9972
9972
  const e = {
9973
9973
  geometries: 0,
9974
9974
  textures: 0
@@ -10013,13 +10013,13 @@ function l5(s) {
10013
10013
  update: i
10014
10014
  };
10015
10015
  }
10016
- function c5(s, e) {
10016
+ function cV(s, e) {
10017
10017
  return s[0] - e[0];
10018
10018
  }
10019
- function h5(s, e) {
10019
+ function hV(s, e) {
10020
10020
  return Math.abs(e[1]) - Math.abs(s[1]);
10021
10021
  }
10022
- function u5(s, e, t) {
10022
+ function uV(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 u5(s, e, t) {
10077
10077
  const b = m[y];
10078
10078
  b[0] = y, b[1] = f[y];
10079
10079
  }
10080
- m.sort(h5);
10080
+ m.sort(hV);
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(c5);
10083
+ a.sort(cV);
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 u5(s, e, t) {
10095
10095
  update: l
10096
10096
  };
10097
10097
  }
10098
- function d5(s, e, t, i) {
10098
+ function dV(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 f5(s, e) {
10169
+ function fV(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 p5(s, e) {
10173
+ function pV(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 p5(s, e) {
10180
10180
  s.uniform2fv(this.addr, e), Jn(t, e);
10181
10181
  }
10182
10182
  }
10183
- function m5(s, e) {
10183
+ function mV(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 m5(s, e) {
10192
10192
  s.uniform3fv(this.addr, e), Jn(t, e);
10193
10193
  }
10194
10194
  }
10195
- function g5(s, e) {
10195
+ function gV(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 g5(s, e) {
10202
10202
  s.uniform4fv(this.addr, e), Jn(t, e);
10203
10203
  }
10204
10204
  }
10205
- function v5(s, e) {
10205
+ function vV(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 v5(s, e) {
10214
10214
  dP.set(i), s.uniformMatrix2fv(this.addr, !1, dP), Jn(t, i);
10215
10215
  }
10216
10216
  }
10217
- function A5(s, e) {
10217
+ function AV(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 A5(s, e) {
10226
10226
  uP.set(i), s.uniformMatrix3fv(this.addr, !1, uP), Jn(t, i);
10227
10227
  }
10228
10228
  }
10229
- function y5(s, e) {
10229
+ function yV(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 y5(s, e) {
10238
10238
  hP.set(i), s.uniformMatrix4fv(this.addr, !1, hP), Jn(t, i);
10239
10239
  }
10240
10240
  }
10241
- function _5(s, e) {
10241
+ function _V(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 b5(s, e) {
10245
+ function bV(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 b5(s, e) {
10252
10252
  s.uniform2iv(this.addr, e), Jn(t, e);
10253
10253
  }
10254
10254
  }
10255
- function x5(s, e) {
10255
+ function xV(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 x5(s, e) {
10262
10262
  s.uniform3iv(this.addr, e), Jn(t, e);
10263
10263
  }
10264
10264
  }
10265
- function w5(s, e) {
10265
+ function wV(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 w5(s, e) {
10272
10272
  s.uniform4iv(this.addr, e), Jn(t, e);
10273
10273
  }
10274
10274
  }
10275
- function S5(s, e) {
10275
+ function SV(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 C5(s, e) {
10279
+ function CV(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 C5(s, e) {
10286
10286
  s.uniform2uiv(this.addr, e), Jn(t, e);
10287
10287
  }
10288
10288
  }
10289
- function E5(s, e) {
10289
+ function EV(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 E5(s, e) {
10296
10296
  s.uniform3uiv(this.addr, e), Jn(t, e);
10297
10297
  }
10298
10298
  }
10299
- function M5(s, e) {
10299
+ function MV(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 M5(s, e) {
10306
10306
  s.uniform4uiv(this.addr, e), Jn(t, e);
10307
10307
  }
10308
10308
  }
10309
- function T5(s, e, t) {
10309
+ function TV(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 I5(s, e, t) {
10315
+ function IV(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 R5(s, e, t) {
10319
+ function RV(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 P5(s, e, t) {
10323
+ function PV(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 B5(s) {
10327
+ function BV(s) {
10328
10328
  switch (s) {
10329
10329
  case 5126:
10330
- return f5;
10330
+ return fV;
10331
10331
  case 35664:
10332
- return p5;
10332
+ return pV;
10333
10333
  case 35665:
10334
- return m5;
10334
+ return mV;
10335
10335
  case 35666:
10336
- return g5;
10336
+ return gV;
10337
10337
  case 35674:
10338
- return v5;
10338
+ return vV;
10339
10339
  case 35675:
10340
- return A5;
10340
+ return AV;
10341
10341
  case 35676:
10342
- return y5;
10342
+ return yV;
10343
10343
  case 5124:
10344
10344
  case 35670:
10345
- return _5;
10345
+ return _V;
10346
10346
  case 35667:
10347
10347
  case 35671:
10348
- return b5;
10348
+ return bV;
10349
10349
  case 35668:
10350
10350
  case 35672:
10351
- return x5;
10351
+ return xV;
10352
10352
  case 35669:
10353
10353
  case 35673:
10354
- return w5;
10354
+ return wV;
10355
10355
  case 5125:
10356
- return S5;
10356
+ return SV;
10357
10357
  case 36294:
10358
- return C5;
10358
+ return CV;
10359
10359
  case 36295:
10360
- return E5;
10360
+ return EV;
10361
10361
  case 36296:
10362
- return M5;
10362
+ return MV;
10363
10363
  case 35678:
10364
10364
  case 36198:
10365
10365
  case 36298:
10366
10366
  case 36306:
10367
10367
  case 35682:
10368
- return T5;
10368
+ return TV;
10369
10369
  case 35679:
10370
10370
  case 36299:
10371
10371
  case 36307:
10372
- return I5;
10372
+ return IV;
10373
10373
  case 35680:
10374
10374
  case 36300:
10375
10375
  case 36308:
10376
10376
  case 36293:
10377
- return R5;
10377
+ return RV;
10378
10378
  case 36289:
10379
10379
  case 36303:
10380
10380
  case 36311:
10381
10381
  case 36292:
10382
- return P5;
10382
+ return PV;
10383
10383
  }
10384
10384
  }
10385
- function D5(s, e) {
10385
+ function DV(s, e) {
10386
10386
  s.uniform1fv(this.addr, e);
10387
10387
  }
10388
- function O5(s, e) {
10388
+ function OV(s, e) {
10389
10389
  const t = fp(e, this.size, 2);
10390
10390
  s.uniform2fv(this.addr, t);
10391
10391
  }
10392
- function L5(s, e) {
10392
+ function LV(s, e) {
10393
10393
  const t = fp(e, this.size, 3);
10394
10394
  s.uniform3fv(this.addr, t);
10395
10395
  }
10396
- function k5(s, e) {
10396
+ function kV(s, e) {
10397
10397
  const t = fp(e, this.size, 4);
10398
10398
  s.uniform4fv(this.addr, t);
10399
10399
  }
10400
- function F5(s, e) {
10400
+ function FV(s, e) {
10401
10401
  const t = fp(e, this.size, 4);
10402
10402
  s.uniformMatrix2fv(this.addr, !1, t);
10403
10403
  }
10404
- function U5(s, e) {
10404
+ function UV(s, e) {
10405
10405
  const t = fp(e, this.size, 9);
10406
10406
  s.uniformMatrix3fv(this.addr, !1, t);
10407
10407
  }
10408
- function N5(s, e) {
10408
+ function NV(s, e) {
10409
10409
  const t = fp(e, this.size, 16);
10410
10410
  s.uniformMatrix4fv(this.addr, !1, t);
10411
10411
  }
10412
- function z5(s, e) {
10412
+ function zV(s, e) {
10413
10413
  s.uniform1iv(this.addr, e);
10414
10414
  }
10415
- function G5(s, e) {
10415
+ function GV(s, e) {
10416
10416
  s.uniform2iv(this.addr, e);
10417
10417
  }
10418
- function H5(s, e) {
10418
+ function HV(s, e) {
10419
10419
  s.uniform3iv(this.addr, e);
10420
10420
  }
10421
- function Q5(s, e) {
10421
+ function QV(s, e) {
10422
10422
  s.uniform4iv(this.addr, e);
10423
10423
  }
10424
- function V5(s, e) {
10424
+ function VV(s, e) {
10425
10425
  s.uniform1uiv(this.addr, e);
10426
10426
  }
10427
- function j5(s, e) {
10427
+ function jV(s, e) {
10428
10428
  s.uniform2uiv(this.addr, e);
10429
10429
  }
10430
- function W5(s, e) {
10430
+ function WV(s, e) {
10431
10431
  s.uniform3uiv(this.addr, e);
10432
10432
  }
10433
- function q5(s, e) {
10433
+ function qV(s, e) {
10434
10434
  s.uniform4uiv(this.addr, e);
10435
10435
  }
10436
- function X5(s, e, t) {
10436
+ function XV(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 Y5(s, e, t) {
10442
+ function YV(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 J5(s, e, t) {
10448
+ function JV(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 K5(s, e, t) {
10454
+ function KV(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 Z5(s) {
10460
+ function ZV(s) {
10461
10461
  switch (s) {
10462
10462
  case 5126:
10463
- return D5;
10463
+ return DV;
10464
10464
  case 35664:
10465
- return O5;
10465
+ return OV;
10466
10466
  case 35665:
10467
- return L5;
10467
+ return LV;
10468
10468
  case 35666:
10469
- return k5;
10469
+ return kV;
10470
10470
  case 35674:
10471
- return F5;
10471
+ return FV;
10472
10472
  case 35675:
10473
- return U5;
10473
+ return UV;
10474
10474
  case 35676:
10475
- return N5;
10475
+ return NV;
10476
10476
  case 5124:
10477
10477
  case 35670:
10478
- return z5;
10478
+ return zV;
10479
10479
  case 35667:
10480
10480
  case 35671:
10481
- return G5;
10481
+ return GV;
10482
10482
  case 35668:
10483
10483
  case 35672:
10484
- return H5;
10484
+ return HV;
10485
10485
  case 35669:
10486
10486
  case 35673:
10487
- return Q5;
10487
+ return QV;
10488
10488
  case 5125:
10489
- return V5;
10489
+ return VV;
10490
10490
  case 36294:
10491
- return j5;
10491
+ return jV;
10492
10492
  case 36295:
10493
- return W5;
10493
+ return WV;
10494
10494
  case 36296:
10495
- return q5;
10495
+ return qV;
10496
10496
  case 35678:
10497
10497
  case 36198:
10498
10498
  case 36298:
10499
10499
  case 36306:
10500
10500
  case 35682:
10501
- return X5;
10501
+ return XV;
10502
10502
  case 35679:
10503
10503
  case 36299:
10504
10504
  case 36307:
10505
- return Y5;
10505
+ return YV;
10506
10506
  case 35680:
10507
10507
  case 36300:
10508
10508
  case 36308:
10509
10509
  case 36293:
10510
- return J5;
10510
+ return JV;
10511
10511
  case 36289:
10512
10512
  case 36303:
10513
10513
  case 36311:
10514
10514
  case 36292:
10515
- return K5;
10515
+ return KV;
10516
10516
  }
10517
10517
  }
10518
- class $5 {
10518
+ class $V {
10519
10519
  constructor(e, t, i) {
10520
- this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.setValue = B5(t.type);
10520
+ this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.setValue = BV(t.type);
10521
10521
  }
10522
10522
  }
10523
- class eV {
10523
+ class e5 {
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 = Z5(t.type);
10525
+ this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.size = t.size, this.setValue = ZV(t.type);
10526
10526
  }
10527
10527
  }
10528
- class tV {
10528
+ class t5 {
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 iV(s, e, t) {
10544
+ function i5(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 $5(a, s, e) : new eV(a, s, e));
10551
+ fP(t, c === void 0 ? new $V(a, s, e) : new e5(a, s, e));
10552
10552
  break;
10553
10553
  } else {
10554
10554
  let d = t.map[a];
10555
- d === void 0 && (d = new tV(a), fP(t, d)), t = d;
10555
+ d === void 0 && (d = new t5(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
- iV(r, o, this);
10565
+ i5(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 nV = 37297;
10596
- let sV = 0;
10597
- function rV(s, e) {
10595
+ const n5 = 37297;
10596
+ let s5 = 0;
10597
+ function r5(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 rV(s, e) {
10604
10604
  return i.join(`
10605
10605
  `);
10606
10606
  }
10607
- function oV(s) {
10607
+ function o5(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
- ` + rV(s.getShaderSource(e), o);
10632
+ ` + r5(s.getShaderSource(e), o);
10633
10633
  } else
10634
10634
  return n;
10635
10635
  }
10636
- function aV(s, e) {
10637
- const t = oV(e);
10636
+ function a5(s, e) {
10637
+ const t = o5(e);
10638
10638
  return `vec4 ${s}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`;
10639
10639
  }
10640
- function lV(s, e) {
10640
+ function l5(s, e) {
10641
10641
  let t;
10642
10642
  switch (e) {
10643
10643
  case Qf:
@@ -10666,7 +10666,7 @@ function lV(s, e) {
10666
10666
  }
10667
10667
  return "vec3 " + s + "( vec3 color ) { return " + t + "ToneMapping( color ); }";
10668
10668
  }
10669
- function cV(s) {
10669
+ function c5(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 cV(s) {
10675
10675
  ].filter(gf).join(`
10676
10676
  `);
10677
10677
  }
10678
- function hV(s) {
10678
+ function h5(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 uV(s) {
10685
+ function u5(s) {
10686
10686
  const e = [];
10687
10687
  for (const t in s) {
10688
10688
  const i = s[t];
@@ -10691,7 +10691,7 @@ function uV(s) {
10691
10691
  return e.join(`
10692
10692
  `);
10693
10693
  }
10694
- function dV(s, e) {
10694
+ function d5(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 fV = /^[ \t]*#include +<([\w\d./]+)>/gm;
10717
+ const f5 = /^[ \t]*#include +<([\w\d./]+)>/gm;
10718
10718
  function IE(s) {
10719
- return s.replace(fV, mV);
10719
+ return s.replace(f5, m5);
10720
10720
  }
10721
- const pV = /* @__PURE__ */ new Map([
10721
+ const p5 = /* @__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 pV = /* @__PURE__ */ new Map([
10726
10726
  ["output_fragment", "opaque_fragment"]
10727
10727
  // @deprecated, r154
10728
10728
  ]);
10729
- function mV(s, e) {
10729
+ function m5(s, e) {
10730
10730
  let t = Ht[e];
10731
10731
  if (t === void 0) {
10732
- const i = pV.get(e);
10732
+ const i = p5.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 mV(s, e) {
10737
10737
  }
10738
10738
  return IE(t);
10739
10739
  }
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;
10740
+ const g5 = /#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(gV, vV);
10742
+ return s.replace(g5, v5);
10743
10743
  }
10744
- function vV(s, e, t, i) {
10744
+ function v5(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 AV(s) {
10774
+ function A5(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 yV(s) {
10778
+ function y5(s) {
10779
10779
  let e = "ENVMAP_TYPE_CUBE";
10780
10780
  if (s.envMap)
10781
10781
  switch (s.envMapMode) {
@@ -10789,7 +10789,7 @@ function yV(s) {
10789
10789
  }
10790
10790
  return e;
10791
10791
  }
10792
- function _V(s) {
10792
+ function _5(s) {
10793
10793
  let e = "ENVMAP_MODE_REFLECTION";
10794
10794
  if (s.envMap)
10795
10795
  switch (s.envMapMode) {
@@ -10799,7 +10799,7 @@ function _V(s) {
10799
10799
  }
10800
10800
  return e;
10801
10801
  }
10802
- function bV(s) {
10802
+ function b5(s) {
10803
10803
  let e = "ENVMAP_BLENDING_NONE";
10804
10804
  if (s.envMap)
10805
10805
  switch (s.combine) {
@@ -10815,17 +10815,17 @@ function bV(s) {
10815
10815
  }
10816
10816
  return e;
10817
10817
  }
10818
- function xV(s) {
10818
+ function x5(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 wV(s, e, t, i) {
10825
+ function w5(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 = 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();
10828
+ const l = A5(t), c = y5(t), u = _5(t), d = b5(t), f = x5(t), p = t.isWebGL2 ? "" : c5(t), m = h5(t), A = u5(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 wV(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 ? lV("toneMapping", t.toneMapping) : "",
11068
+ t.toneMapping !== Nr ? l5("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
- aV("linearToOutputTexel", t.outputColorSpace),
11073
+ a5("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 = dV(n, g);
11142
+ n.deleteShader(E), n.deleteShader(T), P = new T0(n, g), S = d5(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, nV)), I;
11154
+ return I === !1 && (I = n.getProgramParameter(g, n5)), 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 = sV++, this.cacheKey = e, this.usedTimes = 1, this.program = g, this.vertexShader = E, this.fragmentShader = T, this;
11157
+ }, this.type = t.shaderType, this.name = t.shaderName, this.id = s5++, this.cacheKey = e, this.usedTimes = 1, this.program = g, this.vertexShader = E, this.fragmentShader = T, this;
11158
11158
  }
11159
- let SV = 0;
11160
- class CV {
11159
+ let S5 = 0;
11160
+ class C5 {
11161
11161
  constructor() {
11162
11162
  this.shaderCache = /* @__PURE__ */ new Map(), this.materialCache = /* @__PURE__ */ new Map();
11163
11163
  }
@@ -11188,16 +11188,16 @@ class CV {
11188
11188
  _getShaderStage(e) {
11189
11189
  const t = this.shaderCache;
11190
11190
  let i = t.get(e);
11191
- return i === void 0 && (i = new EV(e), t.set(e, i)), i;
11191
+ return i === void 0 && (i = new E5(e), t.set(e, i)), i;
11192
11192
  }
11193
11193
  }
11194
- class EV {
11194
+ class E5 {
11195
11195
  constructor(e) {
11196
- this.id = SV++, this.code = e, this.usedTimes = 0;
11196
+ this.id = S5++, this.code = e, this.usedTimes = 0;
11197
11197
  }
11198
11198
  }
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;
11199
+ function M5(s, e, t, i, n, r, o) {
11200
+ const a = new $s(), l = new C5(), 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 MV(s, e, t, i, n, r, o) {
11405
11405
  break;
11406
11406
  }
11407
11407
  }
11408
- return H === void 0 && (H = new wV(s, I, S, r), u.push(H)), H;
11408
+ return H === void 0 && (H = new w5(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 MV(s, e, t, i, n, r, o) {
11431
11431
  dispose: P
11432
11432
  };
11433
11433
  }
11434
- function TV() {
11434
+ function T5() {
11435
11435
  let s = /* @__PURE__ */ new WeakMap();
11436
11436
  function e(r) {
11437
11437
  let o = s.get(r);
@@ -11453,7 +11453,7 @@ function TV() {
11453
11453
  dispose: n
11454
11454
  };
11455
11455
  }
11456
- function IV(s, e) {
11456
+ function I5(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 || IV), i.length > 1 && i.sort(f || _P), n.length > 1 && n.sort(f || _P);
11491
+ t.length > 1 && t.sort(d || I5), 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 RV() {
11512
+ function R5() {
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 RV() {
11524
11524
  dispose: t
11525
11525
  };
11526
11526
  }
11527
- function PV() {
11527
+ function P5() {
11528
11528
  const s = {};
11529
11529
  return {
11530
11530
  get: function(e) {
@@ -11577,7 +11577,7 @@ function PV() {
11577
11577
  }
11578
11578
  };
11579
11579
  }
11580
- function BV() {
11580
+ function B5() {
11581
11581
  const s = {};
11582
11582
  return {
11583
11583
  get: function(e) {
@@ -11616,12 +11616,12 @@ function BV() {
11616
11616
  }
11617
11617
  };
11618
11618
  }
11619
- let DV = 0;
11620
- function OV(s, e) {
11619
+ let D5 = 0;
11620
+ function O5(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 LV(s, e) {
11624
- const t = new PV(), i = BV(), n = {
11623
+ function L5(s, e) {
11624
+ const t = new P5(), i = B5(), n = {
11625
11625
  version: 0,
11626
11626
  hash: {
11627
11627
  directionalLength: -1,
@@ -11665,7 +11665,7 @@ function LV(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(OV);
11668
+ u.sort(O5);
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 LV(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 = DV++);
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 = D5++);
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 LV(s, e) {
11740
11740
  };
11741
11741
  }
11742
11742
  function xP(s, e) {
11743
- const t = new LV(s, e), i = [], n = [];
11743
+ const t = new L5(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 kV(s, e) {
11772
+ function k5(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 FV = `void main() {
11803
+ const F5 = `void main() {
11804
11804
  gl_Position = vec4( position, 1.0 );
11805
- }`, UV = `uniform sampler2D shadow_pass;
11805
+ }`, U5 = `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 NV(s, e, t) {
11832
+ function N5(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 NV(s, e, t) {
11840
11840
  resolution: { value: new te() },
11841
11841
  radius: { value: 4 }
11842
11842
  },
11843
- vertexShader: FV,
11844
- fragmentShader: UV
11843
+ vertexShader: F5,
11844
+ fragmentShader: U5
11845
11845
  }), p = f.clone();
11846
11846
  p.defines.HORIZONTAL_PASS = 1;
11847
11847
  const m = new At();
@@ -11944,7 +11944,7 @@ function NV(s, e, t) {
11944
11944
  }
11945
11945
  }
11946
11946
  }
11947
- function zV(s, e, t) {
11947
+ function z5(s, e, t) {
11948
11948
  const i = t.isWebGL2;
11949
11949
  function n() {
11950
11950
  let $ = !1;
@@ -12332,7 +12332,7 @@ function zV(s, e, t) {
12332
12332
  reset: ae
12333
12333
  };
12334
12334
  }
12335
- function GV(s, e, t, i, n, r, o) {
12335
+ function G5(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 HV = { type: "move" };
13020
+ const H5 = { 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(HV)));
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(H5)));
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 QV = `
13084
+ const Q5 = `
13085
13085
  void main() {
13086
13086
 
13087
13087
  gl_Position = vec4( position, 1.0 );
13088
13088
 
13089
- }`, VV = `
13089
+ }`, V5 = `
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 jV {
13109
+ class j5 {
13110
13110
  constructor() {
13111
13111
  this.texture = null, this.mesh = null, this.depthNear = 0, this.depthFar = 0;
13112
13112
  }
@@ -13121,8 +13121,8 @@ class jV {
13121
13121
  if (this.mesh === null) {
13122
13122
  const i = t.cameras[0].viewport, n = new Bt({
13123
13123
  extensions: { fragDepth: !0 },
13124
- vertexShader: QV,
13125
- fragmentShader: VV,
13124
+ vertexShader: Q5,
13125
+ fragmentShader: V5,
13126
13126
  uniforms: {
13127
13127
  depthColor: { value: this.texture },
13128
13128
  depthWidth: { value: i.z },
@@ -13138,12 +13138,12 @@ class jV {
13138
13138
  this.texture = null, this.mesh = null;
13139
13139
  }
13140
13140
  }
13141
- class WV extends us {
13141
+ class W5 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 jV(), g = t.getContextAttributes();
13146
+ const A = new j5(), 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 WV extends us {
13347
13347
  };
13348
13348
  }
13349
13349
  }
13350
- const Hh = /* @__PURE__ */ new Qi(), qV = /* @__PURE__ */ new we();
13351
- function XV(s, e) {
13350
+ const Hh = /* @__PURE__ */ new Qi(), q5 = /* @__PURE__ */ new we();
13351
+ function X5(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 XV(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(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) {
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(q5.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 XV(s, e) {
13404
13404
  refreshMaterialUniforms: n
13405
13405
  };
13406
13406
  }
13407
- function YV(s, e, t, i) {
13407
+ function Y5(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 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;
13590
+ ye = new rV(W), Fe = new eV(W, ye, e), ye.init(Fe), qe = new Gk(W, ye, Fe), Se = new z5(W, ye, Fe), $e = new lV(W), Je = new T5(), st = new G5(W, ye, Se, Je, Fe, qe, $e), Dt = new iV(y), z = new sV(y), O = new mH(W, Fe), ht = new Z8(W, ye, O, Fe), pe = new oV(W, O, $e, ht), ve = new dV(W, pe, O, $e), Le = new uV(W, Fe, st), Oe = new tV(Je), Ie = new M5(y, Dt, z, ye, Fe, ht, Oe), Ee = new X5(y, Je), yt = new R5(), lt = new k5(ye, Fe), bt = new K8(y, Dt, z, Se, ve, f, l), He = new N5(y, ve, Fe), nt = new Y5(W, $e, Fe, Se), Kt = new $8(W, ye, $e, Fe), ct = new aV(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 WV(y, W);
13593
+ const j = new W5(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(), JV = /* @__PURE__ */ new w(), IP = /* @__PURE__ */ new we(), ZA = /* @__PURE__ */ new w(), Jw = /* @__PURE__ */ new yn(), RP = /* @__PURE__ */ new we(), Kw = /* @__PURE__ */ new Qr();
14416
+ const EP = /* @__PURE__ */ new w(), MP = /* @__PURE__ */ new Ze(), TP = /* @__PURE__ */ new Ze(), J5 = /* @__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(JV.copy(EP).applyMatrix4(IP), o);
14469
+ IP.multiplyMatrices(i.bones[a].matrixWorld, i.boneInverses[a]), t.addScaledVector(J5.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(), KV = /* @__PURE__ */ new we();
14485
+ const PP = /* @__PURE__ */ new we(), K5 = /* @__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 : KV;
14520
+ const a = e[r] ? e[r].matrixWorld : K5;
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(), ZV = /* @__PURE__ */ new we(), om = /* @__PURE__ */ new de(), am = /* @__PURE__ */ new yn();
14588
+ const zd = /* @__PURE__ */ new we(), BP = /* @__PURE__ */ new we(), $A = [], DP = /* @__PURE__ */ new Ai(), Z5 = /* @__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, ZV);
14593
+ this.setMatrixAt(n, Z5);
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 $V(s, e) {
14655
+ function $5(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 : $V) : g.call(this, A, i);
14920
+ g === null ? A.sort(r.transparent ? e6 : $5) : 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++;
@@ -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.5-alpha""]) globalThis[""3.37.5-alpha""] = "0.0.0";');
29479
+ gp('if(!globalThis[""3.37.6-alpha""]) globalThis[""3.37.6-alpha""] = "0.0.0";');
29480
29480
  gp('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
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";');
29481
+ gp('if(!globalThis[""Wed Apr 24 2024 17:26:48 GMT+0200 (Central European Summer Time)""]) globalThis[""Wed Apr 24 2024 17:26:48 GMT+0200 (Central European Summer Time)""] = "unknown";');
29482
+ gp('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.37.6-alpha";');
29483
29483
  gp('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
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)";
29484
+ gp('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Wed Apr 24 2024 17:26:48 GMT+0200 (Central European Summer Time)";');
29485
+ const tc = "3.37.6-alpha", UT = "undefined", LU = "Wed Apr 24 2024 17:26:48 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";
@@ -66303,7 +66303,7 @@ const kr = class {
66303
66303
  const f = Array.isArray(l.lods) ? l.lods[n].path : l.lods;
66304
66304
  if (!f)
66305
66305
  return Vs && !l["missing:uri"] && (l["missing:uri"] = !0, console.warn("Missing uri for progressive asset for LOD " + n, l)), null;
66306
- const p = Eh(t, f);
66306
+ let p = Eh(t, f);
66307
66307
  if (p.endsWith(".glb") || p.endsWith(".gltf")) {
66308
66308
  if (!l.guid)
66309
66309
  return console.warn("missing pointer for glb/gltf texture", l), null;
@@ -66317,7 +66317,11 @@ const kr = class {
66317
66317
  }
66318
66318
  const g = l, v = new Promise(async (y, b) => {
66319
66319
  const M = new vp();
66320
- zv(M, e), Vs && (await ll(Math.random() * 1e3), r && console.warn("Start loading (delayed) " + p, g.guid));
66320
+ if (zv(M, e), l && Array.isArray(l.lods)) {
66321
+ const P = l.lods[n];
66322
+ P.hash && (p += "?v=" + P.hash);
66323
+ }
66324
+ Vs && (await ll(Math.random() * 1e3), r && console.warn("Start loading (delayed) " + p, g.guid));
66321
66325
  const E = await M.loadAsync(p).catch((P) => (console.error(`Error loading LOD ${n} from ${p}
66322
66326
  `, P), null));
66323
66327
  if (!E)
@@ -85348,7 +85352,7 @@ class hs extends Te {
85348
85352
  h(this, "aspectMode", 0);
85349
85353
  h(this, "clip", null);
85350
85354
  h(this, "source", 1);
85351
- h(this, "url", null);
85355
+ h(this, "_url", null);
85352
85356
  h(this, "renderMode");
85353
85357
  h(this, "targetMaterialProperty");
85354
85358
  h(this, "targetMaterialRenderer");
@@ -85383,7 +85387,7 @@ class hs extends Te {
85383
85387
  h(this, "_hls");
85384
85388
  h(this, "onHlsAvailable", () => {
85385
85389
  var t;
85386
- is && console.log("HLS: available", this.clip), !(!this.shouldUseM3U8 || !this.url) && (this._hls || (this._hls = new Hls()), this.videoElement.autoplay = !0, this._hls.loadSource(this.url), this._hls.attachMedia(this.videoElement), (t = this._videoElement) == null || t.play(), is && console.log("HLS: loaded", this.clip));
85390
+ is && console.log("HLS: available", this.clip), !(!this.shouldUseM3U || !this.url) && (this._hls || (this._hls = new Hls()), this.videoElement.autoplay = !0, this._hls.loadSource(this.url), this._hls.attachMedia(this.videoElement), (t = this._videoElement) == null || t.play(), is && console.log("HLS: loaded", this.clip));
85387
85391
  });
85388
85392
  tle(() => {
85389
85393
  this._receivedInput = !0, this.updateVideoElementSettings();
@@ -85391,6 +85395,13 @@ class hs extends Te {
85391
85395
  t.key === "f" && (this.screenspace = !this.screenspace);
85392
85396
  });
85393
85397
  }
85398
+ get url() {
85399
+ return this._url;
85400
+ }
85401
+ set url(t) {
85402
+ const n = this._url !== t;
85403
+ this.__didAwake ? n && this.setClipURL(t ?? "") : this._url = t;
85404
+ }
85394
85405
  get playbackSpeed() {
85395
85406
  var t;
85396
85407
  return ((t = this._videoElement) == null ? void 0 : t.playbackRate) ?? this._playbackSpeed;
@@ -85468,7 +85479,7 @@ class hs extends Te {
85468
85479
  this.clip = t, this.source = 0, this._videoElement ? (this._videoElement.srcObject = t, this._isPlaying && this.play(), this.updateAspect()) : this.create(this.playOnAwake);
85469
85480
  }
85470
85481
  setClipURL(t) {
85471
- this.url !== t && (this.url = t, this.source = 1, is && console.log("set url", t), this._videoElement ? t.endsWith(".m3u8") ? this.ensureM3U8CanBePlayed() : (this._videoElement.src = t, this._isPlaying && (this.stop(), this.play())) : this.create(this.playOnAwake));
85482
+ this._url !== t && (this._url = t, this.source = 1, is && console.log("set url", t), this._videoElement ? t.endsWith(".m3u8") || t.includes(".m3u") ? this.ensureM3UCanBePlayed() : (this._videoElement.src = t, this._isPlaying && (this.stop(), this.play())) : this.create(this.playOnAwake));
85472
85483
  }
85473
85484
  onEnable() {
85474
85485
  var t, i;
@@ -85490,8 +85501,8 @@ class hs extends Te {
85490
85501
  return;
85491
85502
  }
85492
85503
  if (!(this._isPlaying && !((t = this._videoElement) != null && t.ended) && !((i = this._videoElement) != null && i.paused))) {
85493
- if (this._isPlaying = !0, this._receivedInput || (this._videoElement.muted = !0), this.handleBeginPlaying(!1), this.shouldUseM3U8) {
85494
- this.ensureM3U8CanBePlayed();
85504
+ if (this._isPlaying = !0, this._receivedInput || (this._videoElement.muted = !0), this.handleBeginPlaying(!1), this.shouldUseM3U) {
85505
+ this.ensureM3UCanBePlayed();
85495
85506
  return;
85496
85507
  }
85497
85508
  is && console.log("Video Play()", this.clip, this._videoElement, this.time), this._videoElement.currentTime = this.time, this._videoElement.play().catch((n) => {
@@ -85577,7 +85588,7 @@ class hs extends Te {
85577
85588
  console.warn("Can not play video, no material found, this might be a multimaterial case which is not supported yet");
85578
85589
  return;
85579
85590
  }
85580
- this.updateVideoElementSettings(), this.updateVideoElementStyles(), t && (this.shouldUseM3U8 && this.ensureM3U8CanBePlayed(), this.play());
85591
+ this.updateVideoElementSettings(), this.updateVideoElementStyles(), t && (this.shouldUseM3U && this.ensureM3UCanBePlayed(), this.play());
85581
85592
  }
85582
85593
  updateVideoElementSettings() {
85583
85594
  if (!this._videoElement)
@@ -85633,11 +85644,11 @@ class hs extends Te {
85633
85644
  yield;
85634
85645
  }
85635
85646
  }
85636
- get shouldUseM3U8() {
85637
- return this.url != null && this.url.endsWith(".m3u8") && this.source === 1;
85647
+ get shouldUseM3U() {
85648
+ return this.url != null && (this.url.endsWith(".m3u8") || this.url.endsWith(".m3u")) && this.source === 1;
85638
85649
  }
85639
- ensureM3U8CanBePlayed() {
85640
- if (!this.shouldUseM3U8)
85650
+ ensureM3UCanBePlayed() {
85651
+ if (!this.shouldUseM3U)
85641
85652
  return;
85642
85653
  let t = document.head.querySelector("script[data-hls_library]");
85643
85654
  t ? globalThis.Hls ? this.onHlsAvailable() : t.addEventListener("load", this.onHlsAvailable) : (is && console.log("HLS: load script"), t = document.createElement("script"), t.dataset.hls_library = "hls.js", t.src = "https://cdn.jsdelivr.net/npm/hls.js@1", t.addEventListener("load", this.onHlsAvailable), document.head.append(t));
@@ -85657,7 +85668,7 @@ bo([
85657
85668
  ], hs.prototype, "source", 2);
85658
85669
  bo([
85659
85670
  x(URL)
85660
- ], hs.prototype, "url", 2);
85671
+ ], hs.prototype, "url", 1);
85661
85672
  bo([
85662
85673
  x()
85663
85674
  ], hs.prototype, "renderMode", 2);
@@ -88027,17 +88038,22 @@ class fR extends Te {
88027
88038
  updateFromFrame(t) {
88028
88039
  if (!t)
88029
88040
  return;
88030
- const i = t.getViewerPose(this.context.renderer.xr.getReferenceSpace());
88031
- if (i) {
88032
- for (const n of i.views)
88033
- if ("camera" in n && n.camera) {
88034
- let o = this.context.renderer.xr.getBinding();
88035
- if (o || (o = new XRWebGLBinding(t.session, this.context.renderer.getContext())), o) {
88036
- let a = null;
88037
- if ("getCameraImage" in o) {
88038
- a = o.getCameraImage(n.camera);
88039
- const l = this.context.renderer.properties.get(this.threeTexture);
88040
- l.__webglTexture = a, this.backgroundPlane ? (this.backgroundPlane.setTexture(this.threeTexture), this.backgroundPlane.visible = !0) : i_ && console.warn("No background plane to set texture on");
88041
+ const i = t.session.enabledFeatures;
88042
+ if (i && !i.some((r) => r === "camera-access")) {
88043
+ this.background && (this.background.visible = !1);
88044
+ return;
88045
+ }
88046
+ const n = t.getViewerPose(this.context.renderer.xr.getReferenceSpace());
88047
+ if (n) {
88048
+ for (const r of n.views)
88049
+ if ("camera" in r && r.camera) {
88050
+ let a = this.context.renderer.xr.getBinding();
88051
+ if (a || (a = new XRWebGLBinding(t.session, this.context.renderer.getContext())), a) {
88052
+ let l = null;
88053
+ if ("getCameraImage" in a) {
88054
+ l = a.getCameraImage(r.camera);
88055
+ const c = this.context.renderer.properties.get(this.threeTexture);
88056
+ c.__webglTexture = l, this.backgroundPlane ? (this.backgroundPlane.setTexture(this.threeTexture), this.backgroundPlane.visible = !0) : i_ && console.warn("No background plane to set texture on");
88041
88057
  }
88042
88058
  }
88043
88059
  }