@soonspacejs/plugin-atmosphere 2.15.13 → 2.15.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +238 -237
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -11,17 +11,17 @@ function ca(i, e, t = new p(), r) {
|
|
|
11
11
|
const { x: n, y: a, z: o } = i, s = e.x, c = e.y, l = e.z, d = n * n * s, h = a * a * c, f = o * o * l, v = d + h + f, g = Math.sqrt(1 / v);
|
|
12
12
|
if (!Number.isFinite(g))
|
|
13
13
|
return;
|
|
14
|
-
const
|
|
14
|
+
const S = $o.copy(i).multiplyScalar(g);
|
|
15
15
|
if (v < (r?.centerTolerance ?? 0.1))
|
|
16
|
-
return t.copy(
|
|
17
|
-
const
|
|
18
|
-
let
|
|
16
|
+
return t.copy(S);
|
|
17
|
+
const E = S.multiply(e).multiplyScalar(2);
|
|
18
|
+
let C = (1 - g) * i.length() / (E.length() / 2), O = 0, U, b, L, j;
|
|
19
19
|
do {
|
|
20
|
-
|
|
21
|
-
const Y =
|
|
22
|
-
j = d * Y + h * le + f * ie - 1,
|
|
20
|
+
C -= O, U = 1 / (1 + C * s), b = 1 / (1 + C * c), L = 1 / (1 + C * l);
|
|
21
|
+
const Y = U * U, le = b * b, ie = L * L, We = Y * U, ke = le * b, Oe = ie * L;
|
|
22
|
+
j = d * Y + h * le + f * ie - 1, O = j / ((d * We * s + h * ke * c + f * Oe * l) * -2);
|
|
23
23
|
} while (Math.abs(j) > 1e-12);
|
|
24
|
-
return t.set(n *
|
|
24
|
+
return t.set(n * U, a * b, o * L);
|
|
25
25
|
}
|
|
26
26
|
const $e = /* @__PURE__ */ new p(), $r = /* @__PURE__ */ new p(), jr = /* @__PURE__ */ new p(), si = class {
|
|
27
27
|
constructor(e, t, r) {
|
|
@@ -209,11 +209,11 @@ function jo(i) {
|
|
|
209
209
|
return i instanceof fo ? i.getContext().getExtension("OES_texture_float_linear") != null : i.backend.hasFeature?.("float32-filterable") ?? !1;
|
|
210
210
|
}
|
|
211
211
|
const Yo = 128, Xo = 128, qo = 64, Zo = "This is not an object", Ko = "This is not a Float16Array object", gn = "This constructor is not a subclass of Float16Array", la = "The constructor property value is not an object", Jo = "Species constructor didn't return TypedArray object", Qo = "Derived constructor created TypedArray object which was too small length", Dt = "Attempting to access detached ArrayBuffer", ui = "Cannot convert undefined or null to object", li = "Cannot mix BigInt and other types, use explicit conversions", vn = "@@iterator property is not callable", _n = "Reduce of empty array with no initial value", es = "The comparison function must be either a function or undefined", Yr = "Offset is out of bounds";
|
|
212
|
-
function
|
|
212
|
+
function M(i) {
|
|
213
213
|
return (e, ...t) => te(i, e, t);
|
|
214
214
|
}
|
|
215
215
|
function ft(i, e) {
|
|
216
|
-
return
|
|
216
|
+
return M(
|
|
217
217
|
ut(
|
|
218
218
|
i,
|
|
219
219
|
e
|
|
@@ -248,12 +248,12 @@ const {
|
|
|
248
248
|
is: xn
|
|
249
249
|
} = dt, hi = dt.prototype, ss = (
|
|
250
250
|
/** @type {any} */
|
|
251
|
-
hi.__lookupGetter__ ?
|
|
251
|
+
hi.__lookupGetter__ ? M(
|
|
252
252
|
/** @type {any} */
|
|
253
253
|
hi.__lookupGetter__
|
|
254
254
|
) : (i, e) => {
|
|
255
255
|
if (i == null)
|
|
256
|
-
throw
|
|
256
|
+
throw H(
|
|
257
257
|
ui
|
|
258
258
|
);
|
|
259
259
|
let t = dt(i);
|
|
@@ -265,21 +265,21 @@ const {
|
|
|
265
265
|
}
|
|
266
266
|
), xe = (
|
|
267
267
|
/** @type {any} */
|
|
268
|
-
dt.hasOwn ||
|
|
269
|
-
), pa = Array, fa = pa.isArray, Ar = pa.prototype, cs =
|
|
268
|
+
dt.hasOwn || M(hi.hasOwnProperty)
|
|
269
|
+
), pa = Array, fa = pa.isArray, Ar = pa.prototype, cs = M(Ar.join), us = M(Ar.push), ls = M(
|
|
270
270
|
Ar.toLocaleString
|
|
271
|
-
), Bi = Ar[fe], ds =
|
|
271
|
+
), Bi = Ar[fe], ds = M(Bi), {
|
|
272
272
|
abs: hs,
|
|
273
273
|
trunc: ga
|
|
274
|
-
} = Math, Cr = ArrayBuffer, ms = Cr.isView, va = Cr.prototype, ps =
|
|
274
|
+
} = Math, Cr = ArrayBuffer, ms = Cr.isView, va = Cr.prototype, ps = M(va.slice), fs = ft(va, "byteLength"), mi = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : null, gs = mi && ft(mi.prototype, "byteLength"), Wi = zt(Uint8Array), vs = Wi.from, V = Wi.prototype, _s = V[fe], Ss = M(V.keys), Ts = M(
|
|
275
275
|
V.values
|
|
276
|
-
), xs =
|
|
276
|
+
), xs = M(
|
|
277
277
|
V.entries
|
|
278
|
-
), ys =
|
|
278
|
+
), ys = M(V.set), yn = M(
|
|
279
279
|
V.reverse
|
|
280
|
-
), Es =
|
|
280
|
+
), Es = M(V.fill), ws = M(
|
|
281
281
|
V.copyWithin
|
|
282
|
-
), En =
|
|
282
|
+
), En = M(V.sort), yt = M(V.slice), Rs = M(
|
|
283
283
|
V.subarray
|
|
284
284
|
), B = ft(
|
|
285
285
|
V,
|
|
@@ -287,14 +287,14 @@ const {
|
|
|
287
287
|
), be = ft(
|
|
288
288
|
V,
|
|
289
289
|
"byteOffset"
|
|
290
|
-
),
|
|
290
|
+
), A = ft(
|
|
291
291
|
V,
|
|
292
292
|
"length"
|
|
293
293
|
), _a = ft(
|
|
294
294
|
V,
|
|
295
295
|
zi
|
|
296
|
-
), As = Uint8Array, ae = Uint16Array, wn = (...i) => te(vs, ae, i), ki = Uint32Array, Cs = Float32Array, Me = zt([][fe]()), Ir =
|
|
297
|
-
})().next), Ns = zt(Me),
|
|
296
|
+
), As = Uint8Array, ae = Uint16Array, wn = (...i) => te(vs, ae, i), ki = Uint32Array, Cs = Float32Array, Me = zt([][fe]()), Ir = M(Me.next), Is = M((function* () {
|
|
297
|
+
})().next), Ns = zt(Me), H = TypeError, qr = RangeError, Sa = WeakSet, Ta = Sa.prototype, Ds = M(Ta.add), Os = M(Ta.has), Nr = WeakMap, Vi = Nr.prototype, hr = M(Vi.get), bs = M(Vi.has), $i = M(Vi.set), xa = new Nr(), Ps = Rr(null, {
|
|
298
298
|
next: {
|
|
299
299
|
value: function() {
|
|
300
300
|
const i = hr(xa, this);
|
|
@@ -390,7 +390,7 @@ function Hs(i) {
|
|
|
390
390
|
if (t === void 0)
|
|
391
391
|
return !1;
|
|
392
392
|
if (!mr(t))
|
|
393
|
-
throw
|
|
393
|
+
throw H(la);
|
|
394
394
|
return di(t, fr);
|
|
395
395
|
}
|
|
396
396
|
const fi = 1 / is;
|
|
@@ -452,12 +452,12 @@ function Zr(i) {
|
|
|
452
452
|
}
|
|
453
453
|
function rr(i, e) {
|
|
454
454
|
if (!mr(i))
|
|
455
|
-
throw
|
|
455
|
+
throw H(Zo);
|
|
456
456
|
const t = i.constructor;
|
|
457
457
|
if (t === void 0)
|
|
458
458
|
return e;
|
|
459
459
|
if (!mr(t))
|
|
460
|
-
throw
|
|
460
|
+
throw H(la);
|
|
461
461
|
return t[ns] ?? e;
|
|
462
462
|
}
|
|
463
463
|
function Ot(i) {
|
|
@@ -492,35 +492,35 @@ const Yi = 2, gr = new Nr();
|
|
|
492
492
|
function Je(i) {
|
|
493
493
|
return bs(gr, i) || !ms(i) && Hs(i);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function R(i) {
|
|
496
496
|
if (!Je(i))
|
|
497
|
-
throw
|
|
497
|
+
throw H(Ko);
|
|
498
498
|
}
|
|
499
499
|
function ir(i, e) {
|
|
500
500
|
const t = Je(i), r = pr(i);
|
|
501
501
|
if (!t && !r)
|
|
502
|
-
throw
|
|
502
|
+
throw H(Jo);
|
|
503
503
|
if (typeof e == "number") {
|
|
504
504
|
let n;
|
|
505
505
|
if (t) {
|
|
506
506
|
const a = x(i);
|
|
507
|
-
n =
|
|
507
|
+
n = A(a);
|
|
508
508
|
} else
|
|
509
|
-
n =
|
|
509
|
+
n = A(i);
|
|
510
510
|
if (n < e)
|
|
511
|
-
throw
|
|
511
|
+
throw H(
|
|
512
512
|
Qo
|
|
513
513
|
);
|
|
514
514
|
}
|
|
515
515
|
if (pi(i))
|
|
516
|
-
throw
|
|
516
|
+
throw H(li);
|
|
517
517
|
}
|
|
518
518
|
function x(i) {
|
|
519
519
|
const e = hr(gr, i);
|
|
520
520
|
if (e !== void 0) {
|
|
521
521
|
const n = B(e);
|
|
522
522
|
if (Ot(n))
|
|
523
|
-
throw
|
|
523
|
+
throw H(Dt);
|
|
524
524
|
return e;
|
|
525
525
|
}
|
|
526
526
|
const t = (
|
|
@@ -528,7 +528,7 @@ function x(i) {
|
|
|
528
528
|
i.buffer
|
|
529
529
|
);
|
|
530
530
|
if (Ot(t))
|
|
531
|
-
throw
|
|
531
|
+
throw H(Dt);
|
|
532
532
|
const r = Ct(Ee, [
|
|
533
533
|
t,
|
|
534
534
|
/** @type {any} */
|
|
@@ -539,7 +539,7 @@ function x(i) {
|
|
|
539
539
|
return hr(gr, r);
|
|
540
540
|
}
|
|
541
541
|
function Dn(i) {
|
|
542
|
-
const e =
|
|
542
|
+
const e = A(i), t = [];
|
|
543
543
|
for (let r = 0; r < e; ++r)
|
|
544
544
|
t[r] = I(i[r]);
|
|
545
545
|
return t;
|
|
@@ -581,12 +581,12 @@ let Ee = class W {
|
|
|
581
581
|
else if (mr(e) && !Ms(e)) {
|
|
582
582
|
let o, s;
|
|
583
583
|
if (pr(e)) {
|
|
584
|
-
o = e, s =
|
|
584
|
+
o = e, s = A(e);
|
|
585
585
|
const c = B(e);
|
|
586
586
|
if (Ot(c))
|
|
587
|
-
throw
|
|
587
|
+
throw H(Dt);
|
|
588
588
|
if (pi(e))
|
|
589
|
-
throw
|
|
589
|
+
throw H(li);
|
|
590
590
|
const l = new Cr(
|
|
591
591
|
s * Yi
|
|
592
592
|
);
|
|
@@ -594,7 +594,7 @@ let Ee = class W {
|
|
|
594
594
|
} else {
|
|
595
595
|
const c = e[fe];
|
|
596
596
|
if (c != null && typeof c != "function")
|
|
597
|
-
throw
|
|
597
|
+
throw H(vn);
|
|
598
598
|
c != null ? Cn(e) ? (o = e, s = e.length) : (o = [.../** @type {Iterable<unknown>} */
|
|
599
599
|
e], s = o.length) : (o = /** @type {ArrayLike<unknown>} */
|
|
600
600
|
e, s = Zr(o.length)), n = Ct(ae, [s], new.target);
|
|
@@ -616,7 +616,7 @@ let Ee = class W {
|
|
|
616
616
|
static from(e, ...t) {
|
|
617
617
|
const r = this;
|
|
618
618
|
if (!di(r, fr))
|
|
619
|
-
throw
|
|
619
|
+
throw H(
|
|
620
620
|
gn
|
|
621
621
|
);
|
|
622
622
|
if (r === W) {
|
|
@@ -624,7 +624,7 @@ let Ee = class W {
|
|
|
624
624
|
const d = x(e), h = new ae(
|
|
625
625
|
B(d),
|
|
626
626
|
be(d),
|
|
627
|
-
|
|
627
|
+
A(d)
|
|
628
628
|
);
|
|
629
629
|
return new W(
|
|
630
630
|
B(yt(h))
|
|
@@ -650,12 +650,12 @@ let Ee = class W {
|
|
|
650
650
|
let n, a;
|
|
651
651
|
const o = e[fe];
|
|
652
652
|
if (o != null && typeof o != "function")
|
|
653
|
-
throw
|
|
653
|
+
throw H(vn);
|
|
654
654
|
if (o != null)
|
|
655
|
-
Cn(e) ? (n = e, a = e.length) : Us(e) ? (n = e, a =
|
|
655
|
+
Cn(e) ? (n = e, a = e.length) : Us(e) ? (n = e, a = A(e)) : (n = [...e], a = n.length);
|
|
656
656
|
else {
|
|
657
657
|
if (e == null)
|
|
658
|
-
throw
|
|
658
|
+
throw H(
|
|
659
659
|
ui
|
|
660
660
|
);
|
|
661
661
|
n = dt(e), a = Zr(n.length);
|
|
@@ -679,7 +679,7 @@ let Ee = class W {
|
|
|
679
679
|
static of(...e) {
|
|
680
680
|
const t = this;
|
|
681
681
|
if (!di(t, fr))
|
|
682
|
-
throw
|
|
682
|
+
throw H(
|
|
683
683
|
gn
|
|
684
684
|
);
|
|
685
685
|
const r = e.length;
|
|
@@ -696,7 +696,7 @@ let Ee = class W {
|
|
|
696
696
|
}
|
|
697
697
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys */
|
|
698
698
|
keys() {
|
|
699
|
-
|
|
699
|
+
R(this);
|
|
700
700
|
const e = x(this);
|
|
701
701
|
return Ss(e);
|
|
702
702
|
}
|
|
@@ -705,7 +705,7 @@ let Ee = class W {
|
|
|
705
705
|
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
|
|
706
706
|
*/
|
|
707
707
|
values() {
|
|
708
|
-
|
|
708
|
+
R(this);
|
|
709
709
|
const e = x(this);
|
|
710
710
|
return Rn((function* () {
|
|
711
711
|
for (const t of Ts(e))
|
|
@@ -717,7 +717,7 @@ let Ee = class W {
|
|
|
717
717
|
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
|
|
718
718
|
*/
|
|
719
719
|
entries() {
|
|
720
|
-
|
|
720
|
+
R(this);
|
|
721
721
|
const e = x(this);
|
|
722
722
|
return Rn((function* () {
|
|
723
723
|
for (const [t, r] of xs(e))
|
|
@@ -729,21 +729,21 @@ let Ee = class W {
|
|
|
729
729
|
}
|
|
730
730
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.at */
|
|
731
731
|
at(e) {
|
|
732
|
-
|
|
733
|
-
const t = x(this), r =
|
|
732
|
+
R(this);
|
|
733
|
+
const t = x(this), r = A(t), n = _e(e), a = n >= 0 ? n : r + n;
|
|
734
734
|
if (!(a < 0 || a >= r))
|
|
735
735
|
return I(t[a]);
|
|
736
736
|
}
|
|
737
737
|
/** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with */
|
|
738
738
|
with(e, t) {
|
|
739
|
-
|
|
740
|
-
const r = x(this), n =
|
|
739
|
+
R(this);
|
|
740
|
+
const r = x(this), n = A(r), a = _e(e), o = a >= 0 ? a : n + a, s = +t;
|
|
741
741
|
if (o < 0 || o >= n)
|
|
742
742
|
throw qr(Yr);
|
|
743
743
|
const c = new ae(
|
|
744
744
|
B(r),
|
|
745
745
|
be(r),
|
|
746
|
-
|
|
746
|
+
A(r)
|
|
747
747
|
), l = new W(
|
|
748
748
|
B(
|
|
749
749
|
yt(c)
|
|
@@ -753,8 +753,8 @@ let Ee = class W {
|
|
|
753
753
|
}
|
|
754
754
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.map */
|
|
755
755
|
map(e, ...t) {
|
|
756
|
-
|
|
757
|
-
const r = x(this), n =
|
|
756
|
+
R(this);
|
|
757
|
+
const r = x(this), n = A(r), a = t[0], o = rr(r, W);
|
|
758
758
|
if (o === W) {
|
|
759
759
|
const c = new W(n), l = x(c);
|
|
760
760
|
for (let d = 0; d < n; ++d) {
|
|
@@ -778,8 +778,8 @@ let Ee = class W {
|
|
|
778
778
|
}
|
|
779
779
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter */
|
|
780
780
|
filter(e, ...t) {
|
|
781
|
-
|
|
782
|
-
const r = x(this), n =
|
|
781
|
+
R(this);
|
|
782
|
+
const r = x(this), n = A(r), a = t[0], o = [];
|
|
783
783
|
for (let l = 0; l < n; ++l) {
|
|
784
784
|
const d = I(r[l]);
|
|
785
785
|
te(e, a, [d, l, this]) && us(o, d);
|
|
@@ -790,10 +790,10 @@ let Ee = class W {
|
|
|
790
790
|
}
|
|
791
791
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce */
|
|
792
792
|
reduce(e, ...t) {
|
|
793
|
-
|
|
794
|
-
const r = x(this), n =
|
|
793
|
+
R(this);
|
|
794
|
+
const r = x(this), n = A(r);
|
|
795
795
|
if (n === 0 && t.length === 0)
|
|
796
|
-
throw
|
|
796
|
+
throw H(_n);
|
|
797
797
|
let a, o;
|
|
798
798
|
t.length === 0 ? (a = I(r[0]), o = 1) : (a = t[0], o = 0);
|
|
799
799
|
for (let s = o; s < n; ++s)
|
|
@@ -807,10 +807,10 @@ let Ee = class W {
|
|
|
807
807
|
}
|
|
808
808
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright */
|
|
809
809
|
reduceRight(e, ...t) {
|
|
810
|
-
|
|
811
|
-
const r = x(this), n =
|
|
810
|
+
R(this);
|
|
811
|
+
const r = x(this), n = A(r);
|
|
812
812
|
if (n === 0 && t.length === 0)
|
|
813
|
-
throw
|
|
813
|
+
throw H(_n);
|
|
814
814
|
let a, o;
|
|
815
815
|
t.length === 0 ? (a = I(r[n - 1]), o = n - 2) : (a = t[0], o = n - 1);
|
|
816
816
|
for (let s = o; s >= 0; --s)
|
|
@@ -824,8 +824,8 @@ let Ee = class W {
|
|
|
824
824
|
}
|
|
825
825
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach */
|
|
826
826
|
forEach(e, ...t) {
|
|
827
|
-
|
|
828
|
-
const r = x(this), n =
|
|
827
|
+
R(this);
|
|
828
|
+
const r = x(this), n = A(r), a = t[0];
|
|
829
829
|
for (let o = 0; o < n; ++o)
|
|
830
830
|
te(e, a, [
|
|
831
831
|
I(r[o]),
|
|
@@ -835,8 +835,8 @@ let Ee = class W {
|
|
|
835
835
|
}
|
|
836
836
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.find */
|
|
837
837
|
find(e, ...t) {
|
|
838
|
-
|
|
839
|
-
const r = x(this), n =
|
|
838
|
+
R(this);
|
|
839
|
+
const r = x(this), n = A(r), a = t[0];
|
|
840
840
|
for (let o = 0; o < n; ++o) {
|
|
841
841
|
const s = I(r[o]);
|
|
842
842
|
if (te(e, a, [s, o, this]))
|
|
@@ -845,8 +845,8 @@ let Ee = class W {
|
|
|
845
845
|
}
|
|
846
846
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex */
|
|
847
847
|
findIndex(e, ...t) {
|
|
848
|
-
|
|
849
|
-
const r = x(this), n =
|
|
848
|
+
R(this);
|
|
849
|
+
const r = x(this), n = A(r), a = t[0];
|
|
850
850
|
for (let o = 0; o < n; ++o) {
|
|
851
851
|
const s = I(r[o]);
|
|
852
852
|
if (te(e, a, [s, o, this]))
|
|
@@ -856,8 +856,8 @@ let Ee = class W {
|
|
|
856
856
|
}
|
|
857
857
|
/** @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlast */
|
|
858
858
|
findLast(e, ...t) {
|
|
859
|
-
|
|
860
|
-
const r = x(this), n =
|
|
859
|
+
R(this);
|
|
860
|
+
const r = x(this), n = A(r), a = t[0];
|
|
861
861
|
for (let o = n - 1; o >= 0; --o) {
|
|
862
862
|
const s = I(r[o]);
|
|
863
863
|
if (te(e, a, [s, o, this]))
|
|
@@ -866,8 +866,8 @@ let Ee = class W {
|
|
|
866
866
|
}
|
|
867
867
|
/** @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlastindex */
|
|
868
868
|
findLastIndex(e, ...t) {
|
|
869
|
-
|
|
870
|
-
const r = x(this), n =
|
|
869
|
+
R(this);
|
|
870
|
+
const r = x(this), n = A(r), a = t[0];
|
|
871
871
|
for (let o = n - 1; o >= 0; --o) {
|
|
872
872
|
const s = I(r[o]);
|
|
873
873
|
if (te(e, a, [s, o, this]))
|
|
@@ -877,8 +877,8 @@ let Ee = class W {
|
|
|
877
877
|
}
|
|
878
878
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.every */
|
|
879
879
|
every(e, ...t) {
|
|
880
|
-
|
|
881
|
-
const r = x(this), n =
|
|
880
|
+
R(this);
|
|
881
|
+
const r = x(this), n = A(r), a = t[0];
|
|
882
882
|
for (let o = 0; o < n; ++o)
|
|
883
883
|
if (!te(e, a, [
|
|
884
884
|
I(r[o]),
|
|
@@ -890,8 +890,8 @@ let Ee = class W {
|
|
|
890
890
|
}
|
|
891
891
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.some */
|
|
892
892
|
some(e, ...t) {
|
|
893
|
-
|
|
894
|
-
const r = x(this), n =
|
|
893
|
+
R(this);
|
|
894
|
+
const r = x(this), n = A(r), a = t[0];
|
|
895
895
|
for (let o = 0; o < n; ++o)
|
|
896
896
|
if (te(e, a, [
|
|
897
897
|
I(r[o]),
|
|
@@ -903,16 +903,16 @@ let Ee = class W {
|
|
|
903
903
|
}
|
|
904
904
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.set */
|
|
905
905
|
set(e, ...t) {
|
|
906
|
-
|
|
906
|
+
R(this);
|
|
907
907
|
const r = x(this), n = _e(t[0]);
|
|
908
908
|
if (n < 0)
|
|
909
909
|
throw qr(Yr);
|
|
910
910
|
if (e == null)
|
|
911
|
-
throw
|
|
911
|
+
throw H(
|
|
912
912
|
ui
|
|
913
913
|
);
|
|
914
914
|
if (pi(e))
|
|
915
|
-
throw
|
|
915
|
+
throw H(
|
|
916
916
|
li
|
|
917
917
|
);
|
|
918
918
|
if (Je(e))
|
|
@@ -924,9 +924,9 @@ let Ee = class W {
|
|
|
924
924
|
if (pr(e)) {
|
|
925
925
|
const c = B(e);
|
|
926
926
|
if (Ot(c))
|
|
927
|
-
throw
|
|
927
|
+
throw H(Dt);
|
|
928
928
|
}
|
|
929
|
-
const a =
|
|
929
|
+
const a = A(r), o = dt(e), s = Zr(o.length);
|
|
930
930
|
if (n === 1 / 0 || s + n > a)
|
|
931
931
|
throw qr(Yr);
|
|
932
932
|
for (let c = 0; c < s; ++c)
|
|
@@ -934,17 +934,17 @@ let Ee = class W {
|
|
|
934
934
|
}
|
|
935
935
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse */
|
|
936
936
|
reverse() {
|
|
937
|
-
|
|
937
|
+
R(this);
|
|
938
938
|
const e = x(this);
|
|
939
939
|
return yn(e), this;
|
|
940
940
|
}
|
|
941
941
|
/** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed */
|
|
942
942
|
toReversed() {
|
|
943
|
-
|
|
943
|
+
R(this);
|
|
944
944
|
const e = x(this), t = new ae(
|
|
945
945
|
B(e),
|
|
946
946
|
be(e),
|
|
947
|
-
|
|
947
|
+
A(e)
|
|
948
948
|
), r = new W(
|
|
949
949
|
B(
|
|
950
950
|
yt(t)
|
|
@@ -954,7 +954,7 @@ let Ee = class W {
|
|
|
954
954
|
}
|
|
955
955
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill */
|
|
956
956
|
fill(e, ...t) {
|
|
957
|
-
|
|
957
|
+
R(this);
|
|
958
958
|
const r = x(this);
|
|
959
959
|
return Es(
|
|
960
960
|
r,
|
|
@@ -964,26 +964,26 @@ let Ee = class W {
|
|
|
964
964
|
}
|
|
965
965
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin */
|
|
966
966
|
copyWithin(e, t, ...r) {
|
|
967
|
-
|
|
967
|
+
R(this);
|
|
968
968
|
const n = x(this);
|
|
969
969
|
return ws(n, e, t, ...er(r)), this;
|
|
970
970
|
}
|
|
971
971
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort */
|
|
972
972
|
sort(e) {
|
|
973
|
-
|
|
973
|
+
R(this);
|
|
974
974
|
const t = x(this), r = e !== void 0 ? e : Nn;
|
|
975
975
|
return En(t, (n, a) => r(I(n), I(a))), this;
|
|
976
976
|
}
|
|
977
977
|
/** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toSorted */
|
|
978
978
|
toSorted(e) {
|
|
979
|
-
|
|
979
|
+
R(this);
|
|
980
980
|
const t = x(this);
|
|
981
981
|
if (e !== void 0 && typeof e != "function")
|
|
982
|
-
throw new
|
|
982
|
+
throw new H(es);
|
|
983
983
|
const r = e !== void 0 ? e : Nn, n = new ae(
|
|
984
984
|
B(t),
|
|
985
985
|
be(t),
|
|
986
|
-
|
|
986
|
+
A(t)
|
|
987
987
|
), a = new W(
|
|
988
988
|
B(
|
|
989
989
|
yt(n)
|
|
@@ -993,13 +993,13 @@ let Ee = class W {
|
|
|
993
993
|
}
|
|
994
994
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice */
|
|
995
995
|
slice(e, t) {
|
|
996
|
-
|
|
996
|
+
R(this);
|
|
997
997
|
const r = x(this), n = rr(r, W);
|
|
998
998
|
if (n === W) {
|
|
999
999
|
const g = new ae(
|
|
1000
1000
|
B(r),
|
|
1001
1001
|
be(r),
|
|
1002
|
-
|
|
1002
|
+
A(r)
|
|
1003
1003
|
);
|
|
1004
1004
|
return new W(
|
|
1005
1005
|
B(
|
|
@@ -1007,7 +1007,7 @@ let Ee = class W {
|
|
|
1007
1007
|
)
|
|
1008
1008
|
);
|
|
1009
1009
|
}
|
|
1010
|
-
const a =
|
|
1010
|
+
const a = A(r), o = _e(e), s = t === void 0 ? a : _e(t);
|
|
1011
1011
|
let c;
|
|
1012
1012
|
o === -1 / 0 ? c = 0 : o < 0 ? c = a + o > 0 ? a + o : 0 : c = a < o ? a : o;
|
|
1013
1013
|
let l;
|
|
@@ -1017,7 +1017,7 @@ let Ee = class W {
|
|
|
1017
1017
|
return h;
|
|
1018
1018
|
const f = B(r);
|
|
1019
1019
|
if (Ot(f))
|
|
1020
|
-
throw
|
|
1020
|
+
throw H(Dt);
|
|
1021
1021
|
let v = 0;
|
|
1022
1022
|
for (; c < l; )
|
|
1023
1023
|
h[v] = I(r[c]), ++c, ++v;
|
|
@@ -1028,23 +1028,23 @@ let Ee = class W {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray */
|
|
1030
1030
|
subarray(e, t) {
|
|
1031
|
-
|
|
1031
|
+
R(this);
|
|
1032
1032
|
const r = x(this), n = rr(r, W), a = new ae(
|
|
1033
1033
|
B(r),
|
|
1034
1034
|
be(r),
|
|
1035
|
-
|
|
1035
|
+
A(r)
|
|
1036
1036
|
), o = Rs(a, e, t), s = new n(
|
|
1037
1037
|
B(o),
|
|
1038
1038
|
be(o),
|
|
1039
|
-
|
|
1039
|
+
A(o)
|
|
1040
1040
|
);
|
|
1041
1041
|
return ir(s), /** @type {any} */
|
|
1042
1042
|
s;
|
|
1043
1043
|
}
|
|
1044
1044
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof */
|
|
1045
1045
|
indexOf(e, ...t) {
|
|
1046
|
-
|
|
1047
|
-
const r = x(this), n =
|
|
1046
|
+
R(this);
|
|
1047
|
+
const r = x(this), n = A(r);
|
|
1048
1048
|
let a = _e(t[0]);
|
|
1049
1049
|
if (a === 1 / 0)
|
|
1050
1050
|
return -1;
|
|
@@ -1056,8 +1056,8 @@ let Ee = class W {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof */
|
|
1058
1058
|
lastIndexOf(e, ...t) {
|
|
1059
|
-
|
|
1060
|
-
const r = x(this), n =
|
|
1059
|
+
R(this);
|
|
1060
|
+
const r = x(this), n = A(r);
|
|
1061
1061
|
let a = t.length >= 1 ? _e(t[0]) : n - 1;
|
|
1062
1062
|
if (a === -1 / 0)
|
|
1063
1063
|
return -1;
|
|
@@ -1069,8 +1069,8 @@ let Ee = class W {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes */
|
|
1071
1071
|
includes(e, ...t) {
|
|
1072
|
-
|
|
1073
|
-
const r = x(this), n =
|
|
1072
|
+
R(this);
|
|
1073
|
+
const r = x(this), n = A(r);
|
|
1074
1074
|
let a = _e(t[0]);
|
|
1075
1075
|
if (a === 1 / 0)
|
|
1076
1076
|
return !1;
|
|
@@ -1085,13 +1085,13 @@ let Ee = class W {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.join */
|
|
1087
1087
|
join(e) {
|
|
1088
|
-
|
|
1088
|
+
R(this);
|
|
1089
1089
|
const t = x(this), r = Dn(t);
|
|
1090
1090
|
return cs(r, e);
|
|
1091
1091
|
}
|
|
1092
1092
|
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring */
|
|
1093
1093
|
toLocaleString(...e) {
|
|
1094
|
-
|
|
1094
|
+
R(this);
|
|
1095
1095
|
const t = x(this), r = Dn(t);
|
|
1096
1096
|
return ls(r, ...er(e));
|
|
1097
1097
|
}
|
|
@@ -3969,13 +3969,13 @@ let Z = class extends pt {
|
|
|
3969
3969
|
higherOrderScatteringTexture: f = null,
|
|
3970
3970
|
ellipsoid: v,
|
|
3971
3971
|
correctAltitude: g,
|
|
3972
|
-
correctGeometricError:
|
|
3973
|
-
sunDirection:
|
|
3974
|
-
sunLight:
|
|
3975
|
-
skyLight:
|
|
3976
|
-
transmittance:
|
|
3977
|
-
inscatter:
|
|
3978
|
-
albedoScale:
|
|
3972
|
+
correctGeometricError: S,
|
|
3973
|
+
sunDirection: E,
|
|
3974
|
+
sunLight: C,
|
|
3975
|
+
skyLight: O,
|
|
3976
|
+
transmittance: U,
|
|
3977
|
+
inscatter: b,
|
|
3978
|
+
albedoScale: L,
|
|
3979
3979
|
sky: j,
|
|
3980
3980
|
sun: Y,
|
|
3981
3981
|
moon: le,
|
|
@@ -4024,8 +4024,8 @@ let Z = class extends pt {
|
|
|
4024
4024
|
worldToECEFMatrix: new u(new T()),
|
|
4025
4025
|
altitudeCorrection: new u(new p()),
|
|
4026
4026
|
geometricErrorCorrectionAmount: new u(0),
|
|
4027
|
-
sunDirection: new u(
|
|
4028
|
-
albedoScale: new u(
|
|
4027
|
+
sunDirection: new u(E?.clone() ?? new p()),
|
|
4028
|
+
albedoScale: new u(L),
|
|
4029
4029
|
moonDirection: new u(ie?.clone() ?? new p()),
|
|
4030
4030
|
moonAngularRadius: new u(We),
|
|
4031
4031
|
lunarRadianceScale: new u(ke),
|
|
@@ -4068,7 +4068,7 @@ let Z = class extends pt {
|
|
|
4068
4068
|
["METER_TO_LENGTH_UNIT", _r.toFixed(7)]
|
|
4069
4069
|
])
|
|
4070
4070
|
}
|
|
4071
|
-
), this.camera = e, this.atmosphere = r, this.overlay = null, this.shadow = null, this.shadowLength = null, this.lightingMask = null, this.hasNormals = !1, this.combinedScatteringTextures = !1, this.hasHigherOrderScatteringTexture = !1, this.shadowSampleCount = 8, this.octEncodedNormal = o, this.reconstructNormal = s, this.singleMieScatteringTexture = h, this.higherOrderScatteringTexture = f, this.ellipsoid = v, this.correctAltitude = g, this.correctGeometricError =
|
|
4071
|
+
), this.camera = e, this.atmosphere = r, this.overlay = null, this.shadow = null, this.shadowLength = null, this.lightingMask = null, this.hasNormals = !1, this.combinedScatteringTextures = !1, this.hasHigherOrderScatteringTexture = !1, this.shadowSampleCount = 8, this.octEncodedNormal = o, this.reconstructNormal = s, this.singleMieScatteringTexture = h, this.higherOrderScatteringTexture = f, this.ellipsoid = v, this.correctAltitude = g, this.correctGeometricError = S, this.sunLight = C, this.skyLight = O, this.transmittance = U, this.inscatter = b, this.sky = j, this.sun = Y, this.moon = le, this.ground = Oe;
|
|
4072
4072
|
}
|
|
4073
4073
|
get mainCamera() {
|
|
4074
4074
|
return this.camera;
|
|
@@ -5220,58 +5220,58 @@ function Gc(i, e) {
|
|
|
5220
5220
|
}
|
|
5221
5221
|
function zc(i) {
|
|
5222
5222
|
const e = i.tt / 36525;
|
|
5223
|
-
function t(
|
|
5223
|
+
function t(w, P) {
|
|
5224
5224
|
const G = [];
|
|
5225
5225
|
let z;
|
|
5226
|
-
for (z = 0; z <=
|
|
5226
|
+
for (z = 0; z <= P - w; ++z)
|
|
5227
5227
|
G.push(0);
|
|
5228
|
-
return { min:
|
|
5228
|
+
return { min: w, array: G };
|
|
5229
5229
|
}
|
|
5230
|
-
function r(
|
|
5230
|
+
function r(w, P, G, z) {
|
|
5231
5231
|
const $ = [];
|
|
5232
|
-
for (let we = 0; we <=
|
|
5232
|
+
for (let we = 0; we <= P - w; ++we)
|
|
5233
5233
|
$.push(t(G, z));
|
|
5234
|
-
return { min:
|
|
5234
|
+
return { min: w, array: $ };
|
|
5235
5235
|
}
|
|
5236
|
-
function n(
|
|
5237
|
-
const z =
|
|
5236
|
+
function n(w, P, G) {
|
|
5237
|
+
const z = w.array[P - w.min];
|
|
5238
5238
|
return z.array[G - z.min];
|
|
5239
5239
|
}
|
|
5240
|
-
function a(
|
|
5241
|
-
const $ =
|
|
5240
|
+
function a(w, P, G, z) {
|
|
5241
|
+
const $ = w.array[P - w.min];
|
|
5242
5242
|
$.array[G - $.min] = z;
|
|
5243
5243
|
}
|
|
5244
|
-
let o, s, c, l, d, h, f, v, g,
|
|
5245
|
-
function $t(
|
|
5246
|
-
return n(nn,
|
|
5244
|
+
let o, s, c, l, d, h, f, v, g, S, E, C, O, U, b, L, j, Y, le, ie, We, ke, Oe, nn = r(-6, 6, 1, 4), an = r(-6, 6, 1, 4);
|
|
5245
|
+
function $t(w, P) {
|
|
5246
|
+
return n(nn, w, P);
|
|
5247
5247
|
}
|
|
5248
|
-
function jt(
|
|
5249
|
-
return n(an,
|
|
5248
|
+
function jt(w, P) {
|
|
5249
|
+
return n(an, w, P);
|
|
5250
5250
|
}
|
|
5251
|
-
function Yt(
|
|
5252
|
-
return a(nn,
|
|
5251
|
+
function Yt(w, P, G) {
|
|
5252
|
+
return a(nn, w, P, G);
|
|
5253
5253
|
}
|
|
5254
|
-
function Xt(
|
|
5255
|
-
return a(an,
|
|
5254
|
+
function Xt(w, P, G) {
|
|
5255
|
+
return a(an, w, P, G);
|
|
5256
5256
|
}
|
|
5257
|
-
function on(
|
|
5258
|
-
$(
|
|
5257
|
+
function on(w, P, G, z, $) {
|
|
5258
|
+
$(w * G - P * z, P * G + w * z);
|
|
5259
5259
|
}
|
|
5260
|
-
function F(
|
|
5261
|
-
return Math.sin(Se *
|
|
5260
|
+
function F(w) {
|
|
5261
|
+
return Math.sin(Se * w);
|
|
5262
5262
|
}
|
|
5263
|
-
f = e * e, g = 0, Oe = 0,
|
|
5263
|
+
f = e * e, g = 0, Oe = 0, E = 0, C = 3422.7;
|
|
5264
5264
|
var qt = F(0.19833 + 0.05611 * e), zr = F(0.27869 + 0.04508 * e), Br = F(0.16827 - 0.36903 * e), Wr = F(0.34734 - 5.37261 * e), kr = F(0.10498 - 5.37899 * e), Zt = F(0.42681 - 0.41855 * e), ho = F(0.14943 - 5.37511 * e);
|
|
5265
|
-
for (Y = 0.84 * qt + 0.31 * zr + 14.27 * Br + 7.26 * Wr + 0.28 * kr + 0.24 * Zt, le = 2.94 * qt + 0.31 * zr + 14.27 * Br + 9.34 * Wr + 1.12 * kr + 0.83 * Zt, ie = -6.4 * qt - 1.89 * Zt, We = 0.21 * qt + 0.31 * zr + 14.27 * Br - 88.7 * Wr - 15.3 * kr + 0.24 * Zt - 1.86 * ho, ke = Y - ie, v = -3332e-9 * F(0.59734 - 5.37261 * e) - 539e-9 * F(0.35498 - 5.37899 * e) - 64e-9 * F(0.39943 - 5.37511 * e),
|
|
5265
|
+
for (Y = 0.84 * qt + 0.31 * zr + 14.27 * Br + 7.26 * Wr + 0.28 * kr + 0.24 * Zt, le = 2.94 * qt + 0.31 * zr + 14.27 * Br + 9.34 * Wr + 1.12 * kr + 0.83 * Zt, ie = -6.4 * qt - 1.89 * Zt, We = 0.21 * qt + 0.31 * zr + 14.27 * Br - 88.7 * Wr - 15.3 * kr + 0.24 * Zt - 1.86 * ho, ke = Y - ie, v = -3332e-9 * F(0.59734 - 5.37261 * e) - 539e-9 * F(0.35498 - 5.37899 * e) - 64e-9 * F(0.39943 - 5.37511 * e), O = Se * Xe(0.60643382 + 1336.85522467 * e - 313e-8 * f) + Y / Re, U = Se * Xe(0.37489701 + 1325.55240982 * e + 2565e-8 * f) + le / Re, b = Se * Xe(0.99312619 + 99.99735956 * e - 44e-8 * f) + ie / Re, L = Se * Xe(0.25909118 + 1342.2278298 * e - 892e-8 * f) + We / Re, j = Se * Xe(0.82736186 + 1236.85308708 * e - 397e-8 * f) + ke / Re, d = 1; d <= 4; ++d) {
|
|
5266
5266
|
switch (d) {
|
|
5267
5267
|
case 1:
|
|
5268
|
-
c =
|
|
5268
|
+
c = U, s = 4, l = 1.000002208;
|
|
5269
5269
|
break;
|
|
5270
5270
|
case 2:
|
|
5271
|
-
c =
|
|
5271
|
+
c = b, s = 3, l = 0.997504612 - 2495388e-9 * e;
|
|
5272
5272
|
break;
|
|
5273
5273
|
case 3:
|
|
5274
|
-
c =
|
|
5274
|
+
c = L, s = 4, l = 1.000002708 + 139.978 * v;
|
|
5275
5275
|
break;
|
|
5276
5276
|
case 4:
|
|
5277
5277
|
c = j, s = 6, l = 1;
|
|
@@ -5280,29 +5280,29 @@ function zc(i) {
|
|
|
5280
5280
|
throw `Internal error: I = ${d}`;
|
|
5281
5281
|
}
|
|
5282
5282
|
for (Yt(0, d, 1), Yt(1, d, Math.cos(c) * l), Xt(0, d, 0), Xt(1, d, Math.sin(c) * l), h = 2; h <= s; ++h)
|
|
5283
|
-
on($t(h - 1, d), jt(h - 1, d), $t(1, d), jt(1, d), (
|
|
5283
|
+
on($t(h - 1, d), jt(h - 1, d), $t(1, d), jt(1, d), (w, P) => (Yt(h, d, w), Xt(h, d, P)));
|
|
5284
5284
|
for (h = 1; h <= s; ++h)
|
|
5285
5285
|
Yt(-h, d, $t(h, d)), Xt(-h, d, -jt(h, d));
|
|
5286
5286
|
}
|
|
5287
|
-
function sn(
|
|
5288
|
-
for (var $ = { x: 1, y: 0 }, we = [0,
|
|
5287
|
+
function sn(w, P, G, z) {
|
|
5288
|
+
for (var $ = { x: 1, y: 0 }, we = [0, w, P, G, z], ge = 1; ge <= 4; ++ge)
|
|
5289
5289
|
we[ge] !== 0 && on($.x, $.y, $t(we[ge], ge), jt(we[ge], ge), (Vr, Ve) => ($.x = Vr, $.y = Ve));
|
|
5290
5290
|
return $;
|
|
5291
5291
|
}
|
|
5292
|
-
function m(
|
|
5292
|
+
function m(w, P, G, z, $, we, ge, Vr) {
|
|
5293
5293
|
var Ve = sn($, we, ge, Vr);
|
|
5294
|
-
g +=
|
|
5294
|
+
g += w * Ve.y, Oe += P * Ve.y, E += G * Ve.x, C += z * Ve.x;
|
|
5295
5295
|
}
|
|
5296
5296
|
m(13.902, 14.06, -1e-3, 0.2607, 0, 0, 0, 4), m(0.403, -4.01, 0.394, 23e-4, 0, 0, 0, 3), m(2369.912, 2373.36, 0.601, 28.2333, 0, 0, 0, 2), m(-125.154, -112.79, -0.725, -0.9781, 0, 0, 0, 1), m(1.979, 6.98, -0.445, 0.0433, 1, 0, 0, 4), m(191.953, 192.72, 0.029, 3.0861, 1, 0, 0, 2), m(-8.466, -13.51, 0.455, -0.1093, 1, 0, 0, 1), m(22639.5, 22609.07, 0.079, 186.5398, 1, 0, 0, 0), m(18.609, 3.59, -0.094, 0.0118, 1, 0, 0, -1), m(-4586.465, -4578.13, -0.077, 34.3117, 1, 0, 0, -2), m(3.215, 5.44, 0.192, -0.0386, 1, 0, 0, -3), m(-38.428, -38.64, 1e-3, 0.6008, 1, 0, 0, -4), m(-0.393, -1.43, -0.092, 86e-4, 1, 0, 0, -6), m(-0.289, -1.59, 0.123, -53e-4, 0, 1, 0, 4), m(-24.42, -25.1, 0.04, -0.3, 0, 1, 0, 2), m(18.023, 17.93, 7e-3, 0.1494, 0, 1, 0, 1), m(-668.146, -126.98, -1.302, -0.3997, 0, 1, 0, 0), m(0.56, 0.32, -1e-3, -37e-4, 0, 1, 0, -1), m(-165.145, -165.06, 0.054, 1.9178, 0, 1, 0, -2), m(-1.877, -6.46, -0.416, 0.0339, 0, 1, 0, -4), m(0.213, 1.02, -0.074, 54e-4, 2, 0, 0, 4), m(14.387, 14.78, -0.017, 0.2833, 2, 0, 0, 2), m(-0.586, -1.2, 0.054, -0.01, 2, 0, 0, 1), m(769.016, 767.96, 0.107, 10.1657, 2, 0, 0, 0), m(1.75, 2.01, -0.018, 0.0155, 2, 0, 0, -1), m(-211.656, -152.53, 5.679, -0.3039, 2, 0, 0, -2), m(1.225, 0.91, -0.03, -88e-4, 2, 0, 0, -3), m(-30.773, -34.07, -0.308, 0.3722, 2, 0, 0, -4), m(-0.57, -1.4, -0.074, 0.0109, 2, 0, 0, -6), m(-2.921, -11.75, 0.787, -0.0484, 1, 1, 0, 2), m(1.267, 1.52, -0.022, 0.0164, 1, 1, 0, 1), m(-109.673, -115.18, 0.461, -0.949, 1, 1, 0, 0), m(-205.962, -182.36, 2.056, 1.4437, 1, 1, 0, -2), m(0.233, 0.36, 0.012, -25e-4, 1, 1, 0, -3), m(-4.391, -9.66, -0.471, 0.0673, 1, 1, 0, -4), m(0.283, 1.53, -0.111, 6e-3, 1, -1, 0, 4), m(14.577, 31.7, -1.54, 0.2302, 1, -1, 0, 2), m(147.687, 138.76, 0.679, 1.1528, 1, -1, 0, 0), m(-1.089, 0.55, 0.021, 0, 1, -1, 0, -1), m(28.475, 23.59, -0.443, -0.2257, 1, -1, 0, -2), m(-0.276, -0.38, -6e-3, -36e-4, 1, -1, 0, -3), m(0.636, 2.27, 0.146, -0.0102, 1, -1, 0, -4), m(-0.189, -1.68, 0.131, -28e-4, 0, 2, 0, 2), m(-7.486, -0.66, -0.037, -86e-4, 0, 2, 0, 0), m(-8.096, -16.35, -0.74, 0.0918, 0, 2, 0, -2), m(-5.741, -0.04, 0, -9e-4, 0, 0, 2, 2), m(0.255, 0, 0, 0, 0, 0, 2, 1), m(-411.608, -0.2, 0, -0.0124, 0, 0, 2, 0), m(0.584, 0.84, 0, 71e-4, 0, 0, 2, -1), m(-55.173, -52.14, 0, -0.1052, 0, 0, 2, -2), m(0.254, 0.25, 0, -17e-4, 0, 0, 2, -3), m(0.025, -1.67, 0, 31e-4, 0, 0, 2, -4), m(1.06, 2.96, -0.166, 0.0243, 3, 0, 0, 2), m(36.124, 50.64, -1.3, 0.6215, 3, 0, 0, 0), m(-13.193, -16.4, 0.258, -0.1187, 3, 0, 0, -2), m(-1.187, -0.74, 0.042, 74e-4, 3, 0, 0, -4), m(-0.293, -0.31, -2e-3, 46e-4, 3, 0, 0, -6), m(-0.29, -1.45, 0.116, -51e-4, 2, 1, 0, 2), m(-7.649, -10.56, 0.259, -0.1038, 2, 1, 0, 0), m(-8.627, -7.59, 0.078, -0.0192, 2, 1, 0, -2), m(-2.74, -2.54, 0.022, 0.0324, 2, 1, 0, -4), m(1.181, 3.32, -0.212, 0.0213, 2, -1, 0, 2), m(9.703, 11.67, -0.151, 0.1268, 2, -1, 0, 0), m(-0.352, -0.37, 1e-3, -28e-4, 2, -1, 0, -1), m(-2.494, -1.17, -3e-3, -17e-4, 2, -1, 0, -2), m(0.36, 0.2, -0.012, -43e-4, 2, -1, 0, -4), m(-1.167, -1.25, 8e-3, -0.0106, 1, 2, 0, 0), m(-7.412, -6.12, 0.117, 0.0484, 1, 2, 0, -2), m(-0.311, -0.65, -0.032, 44e-4, 1, 2, 0, -4), m(0.757, 1.82, -0.105, 0.0112, 1, -2, 0, 2), m(2.58, 2.32, 0.027, 0.0196, 1, -2, 0, 0), m(2.533, 2.4, -0.014, -0.0212, 1, -2, 0, -2), m(-0.344, -0.57, -0.025, 36e-4, 0, 3, 0, -2), m(-0.992, -0.02, 0, 0, 1, 0, 2, 2), m(-45.099, -0.02, 0, -1e-3, 1, 0, 2, 0), m(-0.179, -9.52, 0, -0.0833, 1, 0, 2, -2), m(-0.301, -0.33, 0, 14e-4, 1, 0, 2, -4), m(-6.382, -3.37, 0, -0.0481, 1, 0, -2, 2), m(39.528, 85.13, 0, -0.7136, 1, 0, -2, 0), m(9.366, 0.71, 0, -0.0112, 1, 0, -2, -2), m(0.202, 0.02, 0, 0, 1, 0, -2, -4), m(0.415, 0.1, 0, 13e-4, 0, 1, 2, 0), m(-2.152, -2.26, 0, -66e-4, 0, 1, 2, -2), m(-1.44, -1.3, 0, 14e-4, 0, 1, -2, 2), m(0.384, -0.04, 0, 0, 0, 1, -2, -2), m(1.938, 3.6, -0.145, 0.0401, 4, 0, 0, 0), m(-0.952, -1.58, 0.052, -0.013, 4, 0, 0, -2), m(-0.551, -0.94, 0.032, -97e-4, 3, 1, 0, 0), m(-0.482, -0.57, 5e-3, -45e-4, 3, 1, 0, -2), m(0.681, 0.96, -0.026, 0.0115, 3, -1, 0, 0), m(-0.297, -0.27, 2e-3, -9e-4, 2, 2, 0, -2), m(0.254, 0.21, -3e-3, 0, 2, -2, 0, -2), m(-0.25, -0.22, 4e-3, 14e-4, 1, 3, 0, -2), m(-3.996, 0, 0, 4e-4, 2, 0, 2, 0), m(0.557, -0.75, 0, -9e-3, 2, 0, 2, -2), m(-0.459, -0.38, 0, -53e-4, 2, 0, -2, 2), m(-1.298, 0.74, 0, 4e-4, 2, 0, -2, 0), m(0.538, 1.14, 0, -0.0141, 2, 0, -2, -2), m(0.263, 0.02, 0, 0, 1, 1, 2, 0), m(0.426, 0.07, 0, -6e-4, 1, 1, -2, -2), m(-0.304, 0.03, 0, 3e-4, 1, -1, 2, 0), m(-0.372, -0.19, 0, -27e-4, 1, -1, -2, 2), m(0.418, 0, 0, 0, 0, 0, 4, 0), m(-0.33, -0.04, 0, 0, 3, 0, 2, 0);
|
|
5297
|
-
function de(
|
|
5298
|
-
return
|
|
5297
|
+
function de(w, P, G, z, $) {
|
|
5298
|
+
return w * sn(P, G, z, $).y;
|
|
5299
5299
|
}
|
|
5300
|
-
|
|
5301
|
-
let mo = (1.000002708 + 139.978 * v) * (18518.511 + 1.189 +
|
|
5300
|
+
S = 0, S += de(-526.069, 0, 0, 1, -2), S += de(-3.352, 0, 0, 1, -4), S += de(44.297, 1, 0, 1, -2), S += de(-6, 1, 0, 1, -4), S += de(20.599, -1, 0, 1, 0), S += de(-30.598, -1, 0, 1, -2), S += de(-24.649, -2, 0, 1, 0), S += de(-2, -2, 0, 1, -2), S += de(-22.571, 0, 1, 1, -2), S += de(10.985, 0, -1, 1, -2), g += 0.82 * F(0.7736 - 62.5512 * e) + 0.31 * F(0.0466 - 125.1025 * e) + 0.35 * F(0.5785 - 25.1042 * e) + 0.66 * F(0.4591 + 1335.8075 * e) + 0.64 * F(0.313 - 91.568 * e) + 1.14 * F(0.148 + 1331.2898 * e) + 0.21 * F(0.5918 + 1056.5859 * e) + 0.44 * F(0.5784 + 1322.8595 * e) + 0.24 * F(0.2275 - 5.7374 * e) + 0.28 * F(0.2965 + 2.6929 * e) + 0.33 * F(0.3132 + 6.3368 * e), o = L + Oe / Re;
|
|
5301
|
+
let mo = (1.000002708 + 139.978 * v) * (18518.511 + 1.189 + E) * Math.sin(o) - 6.24 * Math.sin(3 * o) + S;
|
|
5302
5302
|
return {
|
|
5303
|
-
geo_eclip_lon: Se * Xe((
|
|
5303
|
+
geo_eclip_lon: Se * Xe((O + g / Re) / Se),
|
|
5304
5304
|
geo_eclip_lat: Math.PI / (180 * 3600) * mo,
|
|
5305
|
-
distance_au: Re * Dc / (0.999953253 *
|
|
5305
|
+
distance_au: Re * Dc / (0.999953253 * C)
|
|
5306
5306
|
};
|
|
5307
5307
|
}
|
|
5308
5308
|
function Bc(i, e) {
|
|
@@ -5320,18 +5320,18 @@ function Va(i, e) {
|
|
|
5320
5320
|
const t = i.tt / 36525;
|
|
5321
5321
|
let r = 84381.406, n = ((((-951e-10 * t + 132851e-9) * t - 114045e-8) * t - 1.0790069) * t + 5038.481507) * t, a = ((((3337e-10 * t - 467e-9) * t - 772503e-8) * t + 0.0512623) * t - 0.025754) * t + r, o = ((((-56e-9 * t + 170663e-9) * t - 121197e-8) * t - 2.3814292) * t + 10.556403) * t;
|
|
5322
5322
|
r *= Qe, n *= Qe, a *= Qe, o *= Qe;
|
|
5323
|
-
const s = Math.sin(r), c = Math.cos(r), l = Math.sin(-n), d = Math.cos(-n), h = Math.sin(-a), f = Math.cos(-a), v = Math.sin(o), g = Math.cos(o),
|
|
5323
|
+
const s = Math.sin(r), c = Math.cos(r), l = Math.sin(-n), d = Math.cos(-n), h = Math.sin(-a), f = Math.cos(-a), v = Math.sin(o), g = Math.cos(o), S = g * d - l * v * f, E = g * l * c + v * f * d * c - s * v * h, C = g * l * s + v * f * d * s + c * v * h, O = -v * d - l * g * f, U = -v * l * c + g * f * d * c - s * g * h, b = -v * l * s + g * f * d * s + c * g * h, L = l * h, j = -h * d * c - s * f, Y = -h * d * s + f * c;
|
|
5324
5324
|
if (e === ye.Into2000)
|
|
5325
5325
|
return new mt([
|
|
5326
|
-
[
|
|
5327
|
-
[
|
|
5328
|
-
[
|
|
5326
|
+
[S, E, C],
|
|
5327
|
+
[O, U, b],
|
|
5328
|
+
[L, j, Y]
|
|
5329
5329
|
]);
|
|
5330
5330
|
if (e === ye.From2000)
|
|
5331
5331
|
return new mt([
|
|
5332
|
-
[
|
|
5333
|
-
[
|
|
5334
|
-
[
|
|
5332
|
+
[S, O, L],
|
|
5333
|
+
[E, U, j],
|
|
5334
|
+
[C, b, Y]
|
|
5335
5335
|
]);
|
|
5336
5336
|
throw "Invalid precess direction";
|
|
5337
5337
|
}
|
|
@@ -5359,18 +5359,18 @@ function $c(i) {
|
|
|
5359
5359
|
return Vc(e);
|
|
5360
5360
|
}
|
|
5361
5361
|
function jc(i, e) {
|
|
5362
|
-
const t = ka(i), r = t.mobl * Ue, n = t.tobl * Ue, a = t.dpsi * Qe, o = Math.cos(r), s = Math.sin(r), c = Math.cos(n), l = Math.sin(n), d = Math.cos(a), h = Math.sin(a), f = d, v = -h * o, g = -h * s,
|
|
5362
|
+
const t = ka(i), r = t.mobl * Ue, n = t.tobl * Ue, a = t.dpsi * Qe, o = Math.cos(r), s = Math.sin(r), c = Math.cos(n), l = Math.sin(n), d = Math.cos(a), h = Math.sin(a), f = d, v = -h * o, g = -h * s, S = h * c, E = d * o * c + s * l, C = d * s * c - o * l, O = h * l, U = d * o * l - s * c, b = d * s * l + o * c;
|
|
5363
5363
|
if (e === ye.From2000)
|
|
5364
5364
|
return new mt([
|
|
5365
|
-
[f,
|
|
5366
|
-
[v,
|
|
5367
|
-
[g,
|
|
5365
|
+
[f, S, O],
|
|
5366
|
+
[v, E, U],
|
|
5367
|
+
[g, C, b]
|
|
5368
5368
|
]);
|
|
5369
5369
|
if (e === ye.Into2000)
|
|
5370
5370
|
return new mt([
|
|
5371
5371
|
[f, v, g],
|
|
5372
|
-
[
|
|
5373
|
-
[
|
|
5372
|
+
[S, E, C],
|
|
5373
|
+
[O, U, b]
|
|
5374
5374
|
]);
|
|
5375
5375
|
throw "Invalid precess direction";
|
|
5376
5376
|
}
|
|
@@ -5449,12 +5449,12 @@ function lr(i, e) {
|
|
|
5449
5449
|
return Ii(o).ToAstroVector(e);
|
|
5450
5450
|
}
|
|
5451
5451
|
function qc(i, e) {
|
|
5452
|
-
const t = e / It, r = at(i[Ri], t, !0), n = at(i[Ai], t, !1), a = at(i[Ci], t, !1), o = Kr(i[Ri], t), s = Kr(i[Ai], t), c = Kr(i[Ci], t), l = Math.cos(r), d = Math.sin(r), h = Math.cos(n), f = Math.sin(n), v = +(c * h * l) - a * f * l * s - a * h * d * o, g = +(c * h * d) - a * f * d * s + a * h * l * o,
|
|
5452
|
+
const t = e / It, r = at(i[Ri], t, !0), n = at(i[Ai], t, !1), a = at(i[Ci], t, !1), o = Kr(i[Ri], t), s = Kr(i[Ai], t), c = Kr(i[Ci], t), l = Math.cos(r), d = Math.sin(r), h = Math.cos(n), f = Math.sin(n), v = +(c * h * l) - a * f * l * s - a * h * d * o, g = +(c * h * d) - a * f * d * s + a * h * l * o, S = +(c * f) + a * h * s, E = $a(r, n, a), C = [
|
|
5453
5453
|
v / It,
|
|
5454
5454
|
g / It,
|
|
5455
|
-
|
|
5456
|
-
],
|
|
5457
|
-
return new He(e,
|
|
5455
|
+
S / It
|
|
5456
|
+
], O = Ii(E), U = Ii(C);
|
|
5457
|
+
return new He(e, O, U);
|
|
5458
5458
|
}
|
|
5459
5459
|
function or(i, e, t, r) {
|
|
5460
5460
|
const n = r / (r + Ji), a = lr(et[t], e);
|
|
@@ -5864,8 +5864,8 @@ function Za(i, e, t) {
|
|
|
5864
5864
|
if (r == null)
|
|
5865
5865
|
return t.setScalar(0);
|
|
5866
5866
|
i.image;
|
|
5867
|
-
const { width: n, height: a } = i.image, o = ht(e.x, 0, 1) * (n - 1), s = ht(e.y, 0, 1) * (a - 1), c = Math.floor(o), l = Math.floor(s), d = o - c, h = s - l, f = d, v = h, g = c % n,
|
|
5868
|
-
return t.copy(
|
|
5867
|
+
const { width: n, height: a } = i.image, o = ht(e.x, 0, 1) * (n - 1), s = ht(e.y, 0, 1) * (a - 1), c = Math.floor(o), l = Math.floor(s), d = o - c, h = s - l, f = d, v = h, g = c % n, S = (g + 1) % n, E = l % a, C = (E + 1) % a, O = cr(r, E * n + g, _u), U = cr(r, E * n + S, Vn), b = O.lerp(U, f), L = cr(r, C * n + g, Vn), j = cr(r, C * n + S, Su), Y = L.lerp(j, f);
|
|
5868
|
+
return t.copy(b.lerp(Y, v));
|
|
5869
5869
|
}
|
|
5870
5870
|
function xu(i, e, t, r) {
|
|
5871
5871
|
const { topRadius: n, bottomRadius: a } = i, o = Math.sqrt(n ** 2 - a ** 2), s = qa(e ** 2 - a ** 2), c = vu(i, e, t), l = n - e, d = s + o, h = (c - l) / (d - l), f = s / o;
|
|
@@ -5903,8 +5903,8 @@ function wu(i, e, t, r = new Er(), {
|
|
|
5903
5903
|
if (gu(o, l, g))
|
|
5904
5904
|
c.setScalar(0);
|
|
5905
5905
|
else {
|
|
5906
|
-
const
|
|
5907
|
-
Za(i,
|
|
5906
|
+
const S = xu(o, l, g, Eu);
|
|
5907
|
+
Za(i, S, c);
|
|
5908
5908
|
}
|
|
5909
5909
|
}
|
|
5910
5910
|
const v = c.multiply(o.solarIrradiance).multiply(o.sunRadianceToRelativeLuminance);
|
|
@@ -6851,8 +6851,8 @@ class Fr extends Vt {
|
|
|
6851
6851
|
d !== l && (d ? c.PERSPECTIVE_CAMERA = "1" : delete c.PERSPECTIVE_CAMERA, this.needsUpdate = !0);
|
|
6852
6852
|
const h = this.groundAlbedo, f = c.GROUND_ALBEDO != null, v = h.r !== 0 || h.g !== 0 || h.b !== 0;
|
|
6853
6853
|
v !== f && (v ? this.defines.GROUND_ALBEDO = "1" : delete this.defines.GROUND_ALBEDO, this.needsUpdate = !0);
|
|
6854
|
-
const g = this.shadowLength,
|
|
6855
|
-
|
|
6854
|
+
const g = this.shadowLength, S = c.HAS_SHADOW_LENGTH != null, E = g != null;
|
|
6855
|
+
E !== S && (E ? c.HAS_SHADOW_LENGTH = "1" : (delete c.HAS_SHADOW_LENGTH, s.shadowLengthBuffer.value = null), this.needsUpdate = !0), E && (s.shadowLengthBuffer.value = g.map);
|
|
6856
6856
|
}
|
|
6857
6857
|
get moonDirection() {
|
|
6858
6858
|
return this.uniforms.moonDirection.value;
|
|
@@ -7438,26 +7438,26 @@ class ml {
|
|
|
7438
7438
|
Ce(o.length === s.length);
|
|
7439
7439
|
const c = this.margin, l = this.mapSize;
|
|
7440
7440
|
for (let d = 0; d < o.length; ++d) {
|
|
7441
|
-
const h = o[d], f = s[d], v = this.getFrustumRadius(e, o[d]), g = -v,
|
|
7441
|
+
const h = o[d], f = s[d], v = this.getFrustumRadius(e, o[d]), g = -v, S = v, E = v, C = -v;
|
|
7442
7442
|
f.projectionMatrix.makeOrthographic(
|
|
7443
7443
|
g,
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7444
|
+
S,
|
|
7445
|
+
E,
|
|
7446
|
+
C,
|
|
7447
7447
|
-this.margin,
|
|
7448
7448
|
// near
|
|
7449
7449
|
v * 2 + this.margin
|
|
7450
7450
|
// far
|
|
7451
7451
|
);
|
|
7452
|
-
const { near:
|
|
7452
|
+
const { near: O, far: U } = ll.copy(h).applyMatrix4(a), b = dl.makeEmpty();
|
|
7453
7453
|
for (let ie = 0; ie < 4; ie++)
|
|
7454
|
-
|
|
7455
|
-
const
|
|
7456
|
-
|
|
7457
|
-
const j = (
|
|
7458
|
-
|
|
7459
|
-
const le = Kn.copy(t).multiplyScalar(r).add(
|
|
7460
|
-
f.inverseViewMatrix.lookAt(
|
|
7454
|
+
b.expandByPoint(O[ie]), b.expandByPoint(U[ie]);
|
|
7455
|
+
const L = b.getCenter(Zn);
|
|
7456
|
+
L.z = b.max.z + c;
|
|
7457
|
+
const j = (S - g) / l.width, Y = (E - C) / l.height;
|
|
7458
|
+
L.x = Math.round(L.x / j) * j, L.y = Math.round(L.y / Y) * Y, L.applyMatrix4(n);
|
|
7459
|
+
const le = Kn.copy(t).multiplyScalar(r).add(L);
|
|
7460
|
+
f.inverseViewMatrix.lookAt(L, le, hn.DEFAULT_UP).setPosition(le);
|
|
7461
7461
|
}
|
|
7462
7462
|
}
|
|
7463
7463
|
update(e, t, r) {
|
|
@@ -7541,12 +7541,12 @@ const Qn = [
|
|
|
7541
7541
|
minExtinction: 1e-5,
|
|
7542
7542
|
minTransmittance: 1e-4
|
|
7543
7543
|
}
|
|
7544
|
-
},
|
|
7544
|
+
}, _ = pl, fl = {
|
|
7545
7545
|
// TODO: We cloud decrease multi-scattering octaves for lower quality presets,
|
|
7546
7546
|
// but it leads to a loss of higher frequency scattering, making it darker
|
|
7547
7547
|
// overall, which suggests the need for a fudge factor to scale the radiance.
|
|
7548
7548
|
low: {
|
|
7549
|
-
...
|
|
7549
|
+
..._,
|
|
7550
7550
|
lightShafts: !1,
|
|
7551
7551
|
// Expensive
|
|
7552
7552
|
shapeDetail: !1,
|
|
@@ -7554,7 +7554,7 @@ const Qn = [
|
|
|
7554
7554
|
turbulence: !1,
|
|
7555
7555
|
// Expensive
|
|
7556
7556
|
clouds: {
|
|
7557
|
-
...
|
|
7557
|
+
..._.clouds,
|
|
7558
7558
|
accurateSunSkyLight: !1,
|
|
7559
7559
|
// Greatly reduces texel reads.
|
|
7560
7560
|
maxIterationCount: 200,
|
|
@@ -7570,7 +7570,7 @@ const Qn = [
|
|
|
7570
7570
|
// Only 1 march makes big difference
|
|
7571
7571
|
},
|
|
7572
7572
|
shadow: {
|
|
7573
|
-
...
|
|
7573
|
+
..._.shadow,
|
|
7574
7574
|
maxIterationCount: 25,
|
|
7575
7575
|
minDensity: 1e-4,
|
|
7576
7576
|
minExtinction: 1e-4,
|
|
@@ -7583,13 +7583,13 @@ const Qn = [
|
|
|
7583
7583
|
}
|
|
7584
7584
|
},
|
|
7585
7585
|
medium: {
|
|
7586
|
-
...
|
|
7586
|
+
..._,
|
|
7587
7587
|
lightShafts: !1,
|
|
7588
7588
|
// Expensive
|
|
7589
7589
|
turbulence: !1,
|
|
7590
7590
|
// Expensive
|
|
7591
7591
|
clouds: {
|
|
7592
|
-
...
|
|
7592
|
+
..._.clouds,
|
|
7593
7593
|
minDensity: 1e-4,
|
|
7594
7594
|
minExtinction: 1e-4,
|
|
7595
7595
|
accurateSunSkyLight: !1,
|
|
@@ -7597,22 +7597,22 @@ const Qn = [
|
|
|
7597
7597
|
maxIterationCountToGround: 1
|
|
7598
7598
|
},
|
|
7599
7599
|
shadow: {
|
|
7600
|
-
...
|
|
7600
|
+
..._.shadow,
|
|
7601
7601
|
minDensity: 1e-4,
|
|
7602
7602
|
minExtinction: 1e-4,
|
|
7603
7603
|
mapSize: /* @__PURE__ */ new D(256, 256)
|
|
7604
7604
|
}
|
|
7605
7605
|
},
|
|
7606
|
-
high:
|
|
7606
|
+
high: _,
|
|
7607
7607
|
// Consider high quality preset as default.
|
|
7608
7608
|
ultra: {
|
|
7609
|
-
...
|
|
7609
|
+
..._,
|
|
7610
7610
|
clouds: {
|
|
7611
|
-
...
|
|
7611
|
+
..._.clouds,
|
|
7612
7612
|
minStepSize: 10
|
|
7613
7613
|
},
|
|
7614
7614
|
shadow: {
|
|
7615
|
-
...
|
|
7615
|
+
..._.shadow,
|
|
7616
7616
|
mapSize: /* @__PURE__ */ new D(1024, 1024)
|
|
7617
7617
|
}
|
|
7618
7618
|
}
|
|
@@ -9051,19 +9051,19 @@ class Q extends Vt {
|
|
|
9051
9051
|
powderScale: new u(0.8),
|
|
9052
9052
|
powderExponent: new u(150),
|
|
9053
9053
|
// Primary raymarch
|
|
9054
|
-
maxIterationCount: new u(
|
|
9055
|
-
minStepSize: new u(
|
|
9056
|
-
maxStepSize: new u(
|
|
9057
|
-
maxRayDistance: new u(
|
|
9058
|
-
perspectiveStepScale: new u(
|
|
9059
|
-
minDensity: new u(
|
|
9060
|
-
minExtinction: new u(
|
|
9061
|
-
minTransmittance: new u(
|
|
9054
|
+
maxIterationCount: new u(_.clouds.maxIterationCount),
|
|
9055
|
+
minStepSize: new u(_.clouds.minStepSize),
|
|
9056
|
+
maxStepSize: new u(_.clouds.maxStepSize),
|
|
9057
|
+
maxRayDistance: new u(_.clouds.maxRayDistance),
|
|
9058
|
+
perspectiveStepScale: new u(_.clouds.perspectiveStepScale),
|
|
9059
|
+
minDensity: new u(_.clouds.minDensity),
|
|
9060
|
+
minExtinction: new u(_.clouds.minExtinction),
|
|
9061
|
+
minTransmittance: new u(_.clouds.minTransmittance),
|
|
9062
9062
|
// Secondary raymarch
|
|
9063
|
-
maxIterationCountToSun: new u(
|
|
9064
|
-
maxIterationCountToGround: new u(
|
|
9065
|
-
minSecondaryStepSize: new u(
|
|
9066
|
-
secondaryStepScale: new u(
|
|
9063
|
+
maxIterationCountToSun: new u(_.clouds.maxIterationCountToSun),
|
|
9064
|
+
maxIterationCountToGround: new u(_.clouds.maxIterationCountToGround),
|
|
9065
|
+
minSecondaryStepSize: new u(_.clouds.minSecondaryStepSize),
|
|
9066
|
+
secondaryStepScale: new u(_.clouds.secondaryStepScale),
|
|
9067
9067
|
// Beer shadow map
|
|
9068
9068
|
shadowBuffer: new u(null),
|
|
9069
9069
|
shadowTexelSize: new u(new D()),
|
|
@@ -9080,9 +9080,9 @@ class Q extends Vt {
|
|
|
9080
9080
|
shadowLayerMask: new u(new ee().setScalar(1)),
|
|
9081
9081
|
// Disable mask
|
|
9082
9082
|
// Shadow length
|
|
9083
|
-
maxShadowLengthIterationCount: new u(
|
|
9084
|
-
minShadowLengthStepSize: new u(
|
|
9085
|
-
maxShadowLengthRayDistance: new u(
|
|
9083
|
+
maxShadowLengthIterationCount: new u(_.clouds.maxShadowLengthIterationCount),
|
|
9084
|
+
minShadowLengthStepSize: new u(_.clouds.minShadowLengthStepSize),
|
|
9085
|
+
maxShadowLengthRayDistance: new u(_.clouds.maxShadowLengthRayDistance),
|
|
9086
9086
|
// Haze
|
|
9087
9087
|
hazeDensityScale: new u(3e-5),
|
|
9088
9088
|
hazeExponent: new u(1e-3),
|
|
@@ -9091,7 +9091,7 @@ class Q extends Vt {
|
|
|
9091
9091
|
}
|
|
9092
9092
|
},
|
|
9093
9093
|
n
|
|
9094
|
-
), this.temporalUpscale = !0, this.depthPacking = 0, this.localWeatherChannels = "rgba", this.shapeDetail =
|
|
9094
|
+
), this.temporalUpscale = !0, this.depthPacking = 0, this.localWeatherChannels = "rgba", this.shapeDetail = _.shapeDetail, this.turbulence = _.turbulence, this.shadowLength = _.lightShafts, this.haze = _.haze, this.multiScatteringOctaves = _.clouds.multiScatteringOctaves, this.accurateSunSkyLight = _.clouds.accurateSunSkyLight, this.accuratePhaseFunction = _.clouds.accuratePhaseFunction, this.shadowCascadeCount = _.shadow.cascadeCount, this.shadowSampleCount = 8, this.scatterAnisotropy1 = 0.7, this.scatterAnisotropy2 = -0.2, this.scatterAnisotropyMix = 0.5;
|
|
9095
9095
|
}
|
|
9096
9096
|
onBeforeRender(e, t, r, n, a, o) {
|
|
9097
9097
|
const s = this.defines.USE_LOGARITHMIC_DEPTH_BUFFER != null, c = e.capabilities.logarithmicDepthBuffer;
|
|
@@ -9107,8 +9107,8 @@ class Q extends Vt {
|
|
|
9107
9107
|
t.viewMatrix.value.copy(e.matrixWorldInverse), t.inverseViewMatrix.value.copy(e.matrixWorld);
|
|
9108
9108
|
const r = this.previousProjectionMatrix ?? e.projectionMatrix, n = this.previousViewMatrix ?? e.matrixWorldInverse, a = t.inverseProjectionMatrix.value, o = t.inverseViewMatrix.value, s = t.reprojectionMatrix.value, c = t.viewReprojectionMatrix.value;
|
|
9109
9109
|
if (this.temporalUpscale) {
|
|
9110
|
-
const h = t.frame.value % 16, f = t.resolution.value, v = to[h], g = (v.x - 0.5) / f.x * 4,
|
|
9111
|
-
t.temporalJitter.value.set(g,
|
|
9110
|
+
const h = t.frame.value % 16, f = t.resolution.value, v = to[h], g = (v.x - 0.5) / f.x * 4, S = (v.y - 0.5) / f.y * 4;
|
|
9111
|
+
t.temporalJitter.value.set(g, S), t.mipLevelScale.value = 0.25, a.copy(e.projectionMatrix), a.elements[8] += g * 2, a.elements[9] += S * 2, a.invert(), s.copy(r), s.elements[8] += g * 2, s.elements[9] += S * 2, s.multiply(n), c.copy(s).multiply(o);
|
|
9112
9112
|
} else
|
|
9113
9113
|
t.temporalJitter.value.setScalar(0), t.mipLevelScale.value = 1, a.copy(e.projectionMatrixInverse), s.copy(r).multiply(n), c.copy(s).multiply(o);
|
|
9114
9114
|
t.cameraNear.value = e.near, t.cameraFar.value = e.far;
|
|
@@ -9695,7 +9695,7 @@ class Rl extends oo {
|
|
|
9695
9695
|
a
|
|
9696
9696
|
), this.currentPass = new st(this.currentMaterial), this.resolveMaterial = new rn(), this.resolvePass = new st(this.resolveMaterial), this.initRenderTargets({
|
|
9697
9697
|
depthVelocity: !0,
|
|
9698
|
-
shadowLength:
|
|
9698
|
+
shadowLength: _.lightShafts
|
|
9699
9699
|
});
|
|
9700
9700
|
}
|
|
9701
9701
|
copyCameraSettings(e) {
|
|
@@ -10153,12 +10153,12 @@ let Be = class extends Ht {
|
|
|
10153
10153
|
frame: new u(0),
|
|
10154
10154
|
stbnTexture: new u(null),
|
|
10155
10155
|
// Primary raymarch
|
|
10156
|
-
maxIterationCount: new u(
|
|
10157
|
-
minStepSize: new u(
|
|
10158
|
-
maxStepSize: new u(
|
|
10159
|
-
minDensity: new u(
|
|
10160
|
-
minExtinction: new u(
|
|
10161
|
-
minTransmittance: new u(
|
|
10156
|
+
maxIterationCount: new u(_.shadow.maxIterationCount),
|
|
10157
|
+
minStepSize: new u(_.shadow.minStepSize),
|
|
10158
|
+
maxStepSize: new u(_.shadow.maxStepSize),
|
|
10159
|
+
minDensity: new u(_.shadow.minDensity),
|
|
10160
|
+
minExtinction: new u(_.shadow.minExtinction),
|
|
10161
|
+
minTransmittance: new u(_.shadow.minTransmittance),
|
|
10162
10162
|
opticalDepthTailScale: new u(2)
|
|
10163
10163
|
},
|
|
10164
10164
|
defines: {
|
|
@@ -10166,7 +10166,7 @@ let Be = class extends Ht {
|
|
|
10166
10166
|
TEMPORAL_PASS: "1",
|
|
10167
10167
|
TEMPORAL_JITTER: "1"
|
|
10168
10168
|
}
|
|
10169
|
-
}), this.localWeatherChannels = "rgba", this.cascadeCount =
|
|
10169
|
+
}), this.localWeatherChannels = "rgba", this.cascadeCount = _.shadow.cascadeCount, this.temporalPass = !0, this.temporalJitter = !0, this.shapeDetail = _.shapeDetail, this.turbulence = _.turbulence, this.cascadeCount = _.shadow.cascadeCount;
|
|
10170
10170
|
}
|
|
10171
10171
|
setSize(e, t) {
|
|
10172
10172
|
this.uniforms.resolution.value.set(e, t);
|
|
@@ -10310,7 +10310,7 @@ class so extends Ht {
|
|
|
10310
10310
|
temporalAlpha: new u(0.01)
|
|
10311
10311
|
},
|
|
10312
10312
|
defines: {}
|
|
10313
|
-
}), this.cascadeCount =
|
|
10313
|
+
}), this.cascadeCount = _.shadow.cascadeCount;
|
|
10314
10314
|
}
|
|
10315
10315
|
setSize(e, t) {
|
|
10316
10316
|
this.uniforms.texelSize.value.set(1 / e, 1 / t);
|
|
@@ -10524,7 +10524,7 @@ const Rt = /* @__PURE__ */ new p(), kl = /* @__PURE__ */ new D(), Vl = /* @__PUR
|
|
|
10524
10524
|
], ve = {
|
|
10525
10525
|
type: "change"
|
|
10526
10526
|
}, Kl = {
|
|
10527
|
-
resolutionScale:
|
|
10527
|
+
resolutionScale: _.resolutionScale,
|
|
10528
10528
|
width: ct.AUTO_SIZE,
|
|
10529
10529
|
height: ct.AUTO_SIZE
|
|
10530
10530
|
};
|
|
@@ -10547,8 +10547,8 @@ class co extends pt {
|
|
|
10547
10547
|
...t
|
|
10548
10548
|
};
|
|
10549
10549
|
this.shadowMaps = new ml({
|
|
10550
|
-
cascadeCount:
|
|
10551
|
-
mapSize:
|
|
10550
|
+
cascadeCount: _.shadow.cascadeCount,
|
|
10551
|
+
mapSize: _.shadow.mapSize,
|
|
10552
10552
|
splitLambda: 0.6
|
|
10553
10553
|
}), this.parameterUniforms = Ul({
|
|
10554
10554
|
localWeatherTexture: this.proceduralLocalWeather?.texture ?? null,
|
|
@@ -11494,6 +11494,7 @@ class Md {
|
|
|
11494
11494
|
altitude = 20;
|
|
11495
11495
|
distance = 300;
|
|
11496
11496
|
target = new p();
|
|
11497
|
+
ground = !1;
|
|
11497
11498
|
groundAlbedo = "black";
|
|
11498
11499
|
castShadow = !0;
|
|
11499
11500
|
cloudCoverage = 0.3;
|
|
@@ -11539,14 +11540,14 @@ class Md {
|
|
|
11539
11540
|
}
|
|
11540
11541
|
};
|
|
11541
11542
|
update = () => {
|
|
11542
|
-
const { date: e, longitude: t, latitude: r, altitude: n, distance: a, target: o,
|
|
11543
|
-
hu(e,
|
|
11543
|
+
const { date: e, longitude: t, latitude: r, altitude: n, distance: a, target: o, ground: s, groundAlbedo: c, castShadow: l, skyMaterial: d, skyLight: h, sunLight: f, aerialPerspectiveEffect: v, cloudsEffect: g } = this, { inertialToECEFMatrix: S, sunDirection: E, moonDirection: C, worldToECEFMatrix: O } = this.atmosphereProps, { ssp: { viewport: { renderer: U } } } = this;
|
|
11544
|
+
hu(e, S), mu(e, E).applyMatrix4(S), pu(e, C).applyMatrix4(S), ta.set(vi(t), vi(r), n), ta.toECEF(ra), Ne.WGS84.getNorthUpEastFrame(ra, O), d.ground = s, d.groundAlbedo.set(c), d.sunDirection.copy(E), d.moonDirection.copy(C), d.worldToECEFMatrix.copy(O), h.sunDirection.copy(E), h.worldToECEFMatrix.copy(O), h.position.copy(o), f.castShadow = l, f.distance = a, f.shadow.camera.top = a, f.shadow.camera.bottom = -a, f.shadow.camera.left = -a, f.shadow.camera.right = a, f.shadow.camera.far = a * 2, f.sunDirection.copy(E), f.worldToECEFMatrix.copy(O), f.target.position.copy(o), v.sunDirection.copy(E), v.moonDirection.copy(C), v.worldToECEFMatrix.copy(O), g.sunDirection.copy(E), g.worldToECEFMatrix.copy(O);
|
|
11544
11545
|
const b = this.getCacheKey();
|
|
11545
|
-
b !== this.cacheKey && (this.cacheKey = b,
|
|
11546
|
+
b !== this.cacheKey && (this.cacheKey = b, l && (f.shadow.needsUpdate = !0, f.shadow.camera.updateProjectionMatrix()), this.skyMesh.material.sun = !1, this.cubeCamera.update(U, this.skyMesh), this.skyMesh.material.sun = !0, h.update(), f.update());
|
|
11546
11547
|
};
|
|
11547
11548
|
getCacheKey() {
|
|
11548
|
-
const { date: e, longitude: t, latitude: r, altitude: n, distance: a, target: o,
|
|
11549
|
-
return `${
|
|
11549
|
+
const { date: e, longitude: t, latitude: r, altitude: n, distance: a, target: o, ground: s, groundAlbedo: c, castShadow: l, cloudCoverage: d, cloudQuality: h } = this, f = e.getFullYear(), v = e.getMonth(), g = e.getDate(), S = e.getHours(), E = e.getMinutes();
|
|
11550
|
+
return `${f}-${v}-${g}-${S}-${E}-${t}-${r}-${n}-${a}-${o.x}-${o.y}-${o.z}-${s}-${c}-${l}-${d}-${h}`;
|
|
11550
11551
|
}
|
|
11551
11552
|
start() {
|
|
11552
11553
|
if (this._started) return;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soonspacejs/plugin-atmosphere",
|
|
3
3
|
"pluginName": "AtmospherePlugin",
|
|
4
|
-
"version": "2.15.
|
|
4
|
+
"version": "2.15.15",
|
|
5
5
|
"description": "Atmosphere plugin for SoonSpace.js",
|
|
6
6
|
"main": "dist/index.esm.js",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"license": "UNLICENSED",
|
|
16
16
|
"gitHead": "4a87dd85050651088e11c3da777c49fab3db7e5d",
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"soonspacejs": "2.15.
|
|
18
|
+
"soonspacejs": "2.15.15"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@takram/three-atmosphere": "0.18.0",
|