vis-core 0.30.0-beta.34 → 0.30.0-beta.36
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/editor/index.d.ts +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -18
- package/dist/index.module.js +692 -407
- package/dist/version.d.ts +1 -1
- package/dist/vis/index.d.ts +1 -0
- package/dist/vis/map/MapManager.d.ts +122 -0
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document!="undefined"){var t=document.createElement("style");t.appendChild(document.createTextNode(".-translate-x-1\\/2,.-translate-y-1\\/2,.transform{--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1 }.shadow{--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000 }.ring{--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000 }.invert,.filter{--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: }.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.whitespace-nowrap{white-space:nowrap}.text-center{text-align:center}.text-sm{font-size:14px;line-height:20px}.leading-\\[1\\]{line-height:1}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-opacity-80{--tw-text-opacity: .8 }.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
2
|
+
var jn = Object.defineProperty, Qn = Object.defineProperties;
|
|
3
|
+
var $n = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var Un = Object.getOwnPropertySymbols, qn = Object.getPrototypeOf, e1 = Object.prototype.hasOwnProperty, t1 = Object.prototype.propertyIsEnumerable, i1 = Reflect.get;
|
|
5
|
+
var En = (v, e) => (e = Symbol[v]) ? e : Symbol.for("Symbol." + v), n1 = (v) => {
|
|
6
6
|
throw TypeError(v);
|
|
7
|
-
},
|
|
7
|
+
}, Ln = Math.pow, Yn = (v, e, r) => e in v ? jn(v, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : v[e] = r, gi = (v, e) => {
|
|
8
8
|
for (var r in e || (e = {}))
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var r of
|
|
12
|
-
|
|
9
|
+
e1.call(e, r) && Yn(v, r, e[r]);
|
|
10
|
+
if (Un)
|
|
11
|
+
for (var r of Un(e))
|
|
12
|
+
t1.call(e, r) && Yn(v, r, e[r]);
|
|
13
13
|
return v;
|
|
14
|
-
}, qi = (v, e) =>
|
|
15
|
-
var C0 = (v, e, r) =>
|
|
16
|
-
var
|
|
17
|
-
var
|
|
14
|
+
}, qi = (v, e) => Qn(v, $n(e));
|
|
15
|
+
var C0 = (v, e, r) => Yn(v, typeof e != "symbol" ? e + "" : e, r);
|
|
16
|
+
var Zn = (v, e, r) => i1(qn(v), r, e);
|
|
17
|
+
var U0 = (v, e, r) => new Promise((o, V) => {
|
|
18
18
|
var le = (Ce) => {
|
|
19
19
|
try {
|
|
20
20
|
Le(r.next(Ce));
|
|
@@ -29,27 +29,27 @@ var B0 = (v, e, r) => new Promise((o, V) => {
|
|
|
29
29
|
}
|
|
30
30
|
}, Le = (Ce) => Ce.done ? o(Ce.value) : Promise.resolve(Ce.value).then(le, fe);
|
|
31
31
|
Le((r = r.apply(v, e)).next());
|
|
32
|
-
}),
|
|
32
|
+
}), s1 = function(v, e) {
|
|
33
33
|
this[0] = v, this[1] = e;
|
|
34
34
|
};
|
|
35
|
-
var
|
|
36
|
-
var e = v[
|
|
37
|
-
return e == null ? (e = v[
|
|
35
|
+
var Bn = (v) => {
|
|
36
|
+
var e = v[En("asyncIterator")], r = !1, o, V = {};
|
|
37
|
+
return e == null ? (e = v[En("iterator")](), o = (le) => V[le] = (fe) => e[le](fe)) : (e = e.call(v), o = (le) => V[le] = (fe) => {
|
|
38
38
|
if (r) {
|
|
39
39
|
if (r = !1, le === "throw") throw fe;
|
|
40
40
|
return fe;
|
|
41
41
|
}
|
|
42
42
|
return r = !0, {
|
|
43
43
|
done: !1,
|
|
44
|
-
value: new
|
|
44
|
+
value: new s1(new Promise((Le) => {
|
|
45
45
|
var Ce = e[le](fe);
|
|
46
|
-
Ce instanceof Object ||
|
|
46
|
+
Ce instanceof Object || n1("Object expected"), Le(Ce);
|
|
47
47
|
}), 1)
|
|
48
48
|
};
|
|
49
|
-
}), V[
|
|
49
|
+
}), V[En("iterator")] = () => V, o("next"), "throw" in e ? o("throw") : V.throw = (le) => {
|
|
50
50
|
throw le;
|
|
51
51
|
}, "return" in e && o("return"), V;
|
|
52
|
-
},
|
|
52
|
+
}, Dn = (v, e, r) => (e = v[En("asyncIterator")]) ? e.call(v) : (v = v[En("iterator")](), e = {}, r = (o, V) => (V = v[o]) && (e[o] = (le) => new Promise((fe, Le, Ce) => (le = V.call(v, le), Ce = le.done, Promise.resolve(le.value).then((Re) => fe({ value: Re, done: Ce }), Le)))), r("next"), r("return"), e);
|
|
53
53
|
import { KEYUTIL, KJUR, b64tohex } from "jsrsasign";
|
|
54
54
|
import CryptoJS from "crypto-js";
|
|
55
55
|
import { generateUUID as generateUUID$1, makePromiseCreator, WorkerPool } from "esus-lite";
|
|
@@ -63,7 +63,7 @@ import { continentsCountriesIso2 } from "geojson-cn";
|
|
|
63
63
|
Array.prototype.at || (Array.prototype.at = function(v) {
|
|
64
64
|
return v < 0 && (v = this.length + v), this[v];
|
|
65
65
|
});
|
|
66
|
-
const version = "0.30.0-beta.
|
|
66
|
+
const version = "0.30.0-beta.36", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
|
|
67
67
|
token: void 0,
|
|
68
68
|
getInfo() {
|
|
69
69
|
if (!this.token)
|
|
@@ -9066,7 +9066,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
9066
9066
|
this.dispatchEvent({ type: "dispose" });
|
|
9067
9067
|
}
|
|
9068
9068
|
}
|
|
9069
|
-
const _inverseMatrix$3 = /* @__PURE__ */ new Matrix4(), _ray$3 = /* @__PURE__ */ new Ray(), _sphere$6 = /* @__PURE__ */ new Sphere$1(), _sphereHitAt = /* @__PURE__ */ new Vector3(), _vA$1 = /* @__PURE__ */ new Vector3(), _vB$1 = /* @__PURE__ */ new Vector3(), _vC$1 = /* @__PURE__ */ new Vector3(), _tempA = /* @__PURE__ */ new Vector3(), _morphA = /* @__PURE__ */ new Vector3(), _intersectionPoint$1 = /* @__PURE__ */ new Vector3(), _intersectionPointWorld = /* @__PURE__ */ new Vector3();
|
|
9069
|
+
const _inverseMatrix$3 = /* @__PURE__ */ new Matrix4(), _ray$3$1 = /* @__PURE__ */ new Ray(), _sphere$6 = /* @__PURE__ */ new Sphere$1(), _sphereHitAt = /* @__PURE__ */ new Vector3(), _vA$1 = /* @__PURE__ */ new Vector3(), _vB$1 = /* @__PURE__ */ new Vector3(), _vC$1 = /* @__PURE__ */ new Vector3(), _tempA = /* @__PURE__ */ new Vector3(), _morphA = /* @__PURE__ */ new Vector3(), _intersectionPoint$1 = /* @__PURE__ */ new Vector3(), _intersectionPointWorld = /* @__PURE__ */ new Vector3();
|
|
9070
9070
|
class Mesh extends Object3D {
|
|
9071
9071
|
/**
|
|
9072
9072
|
* Constructs a new mesh.
|
|
@@ -9127,7 +9127,7 @@ class Mesh extends Object3D {
|
|
|
9127
9127
|
*/
|
|
9128
9128
|
raycast(e, r) {
|
|
9129
9129
|
const o = this.geometry, V = this.material, le = this.matrixWorld;
|
|
9130
|
-
V !== void 0 && (o.boundingSphere === null && o.computeBoundingSphere(), _sphere$6.copy(o.boundingSphere), _sphere$6.applyMatrix4(le), _ray$3.copy(e.ray).recast(e.near), !(_sphere$6.containsPoint(_ray$3.origin) === !1 && (_ray$3.intersectSphere(_sphere$6, _sphereHitAt) === null || _ray$3.origin.distanceToSquared(_sphereHitAt) >
|
|
9130
|
+
V !== void 0 && (o.boundingSphere === null && o.computeBoundingSphere(), _sphere$6.copy(o.boundingSphere), _sphere$6.applyMatrix4(le), _ray$3$1.copy(e.ray).recast(e.near), !(_sphere$6.containsPoint(_ray$3$1.origin) === !1 && (_ray$3$1.intersectSphere(_sphere$6, _sphereHitAt) === null || _ray$3$1.origin.distanceToSquared(_sphereHitAt) > Ln(e.far - e.near, 2))) && (_inverseMatrix$3.copy(le).invert(), _ray$3$1.copy(e.ray).applyMatrix4(_inverseMatrix$3), !(o.boundingBox !== null && _ray$3$1.intersectsBox(o.boundingBox) === !1) && this._computeIntersections(e, r, _ray$3$1)));
|
|
9131
9131
|
}
|
|
9132
9132
|
_computeIntersections(e, r, o) {
|
|
9133
9133
|
let V;
|
|
@@ -12119,7 +12119,7 @@ class LineBasicMaterial extends Material {
|
|
|
12119
12119
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.linewidth = e.linewidth, this.linecap = e.linecap, this.linejoin = e.linejoin, this.fog = e.fog, this;
|
|
12120
12120
|
}
|
|
12121
12121
|
}
|
|
12122
|
-
const _vStart = /* @__PURE__ */ new Vector3(), _vEnd = /* @__PURE__ */ new Vector3(), _inverseMatrix$1 = /* @__PURE__ */ new Matrix4(), _ray$1$1 = /* @__PURE__ */ new Ray(), _sphere$1 = /* @__PURE__ */ new Sphere$1(), _intersectPointOnRay = /* @__PURE__ */ new Vector3(), _intersectPointOnSegment = /* @__PURE__ */ new Vector3();
|
|
12122
|
+
const _vStart = /* @__PURE__ */ new Vector3(), _vEnd = /* @__PURE__ */ new Vector3(), _inverseMatrix$1 = /* @__PURE__ */ new Matrix4(), _ray$1$1 = /* @__PURE__ */ new Ray(), _sphere$1$1 = /* @__PURE__ */ new Sphere$1(), _intersectPointOnRay = /* @__PURE__ */ new Vector3(), _intersectPointOnSegment = /* @__PURE__ */ new Vector3();
|
|
12123
12123
|
class Line extends Object3D {
|
|
12124
12124
|
/**
|
|
12125
12125
|
* Constructs a new line.
|
|
@@ -12159,7 +12159,7 @@ class Line extends Object3D {
|
|
|
12159
12159
|
*/
|
|
12160
12160
|
raycast(e, r) {
|
|
12161
12161
|
const o = this.geometry, V = this.matrixWorld, le = e.params.Line.threshold, fe = o.drawRange;
|
|
12162
|
-
if (o.boundingSphere === null && o.computeBoundingSphere(), _sphere$1.copy(o.boundingSphere), _sphere$1.applyMatrix4(V), _sphere$1.radius += le, e.ray.intersectsSphere(_sphere$1) === !1) return;
|
|
12162
|
+
if (o.boundingSphere === null && o.computeBoundingSphere(), _sphere$1$1.copy(o.boundingSphere), _sphere$1$1.applyMatrix4(V), _sphere$1$1.radius += le, e.ray.intersectsSphere(_sphere$1$1) === !1) return;
|
|
12163
12163
|
_inverseMatrix$1.copy(V).invert(), _ray$1$1.copy(e.ray).applyMatrix4(_inverseMatrix$1);
|
|
12164
12164
|
const Le = le / ((this.scale.x + this.scale.y + this.scale.z) / 3), Ce = Le * Le, Re = this.isLineSegments ? 2 : 1, Pe = o.index, Fe = o.attributes.position;
|
|
12165
12165
|
if (Pe !== null) {
|
|
@@ -12271,7 +12271,7 @@ class PointsMaterial extends Material {
|
|
|
12271
12271
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.alphaMap = e.alphaMap, this.size = e.size, this.sizeAttenuation = e.sizeAttenuation, this.fog = e.fog, this;
|
|
12272
12272
|
}
|
|
12273
12273
|
}
|
|
12274
|
-
const _inverseMatrix = /* @__PURE__ */ new Matrix4(), _ray$4 = /* @__PURE__ */ new Ray(), _sphere$7 = /* @__PURE__ */ new Sphere$1(), _position$2 = /* @__PURE__ */ new Vector3();
|
|
12274
|
+
const _inverseMatrix$4 = /* @__PURE__ */ new Matrix4(), _ray$4 = /* @__PURE__ */ new Ray(), _sphere$7 = /* @__PURE__ */ new Sphere$1(), _position$2$1 = /* @__PURE__ */ new Vector3();
|
|
12275
12275
|
class Points extends Object3D {
|
|
12276
12276
|
/**
|
|
12277
12277
|
* Constructs a new point cloud.
|
|
@@ -12294,18 +12294,18 @@ class Points extends Object3D {
|
|
|
12294
12294
|
raycast(e, r) {
|
|
12295
12295
|
const o = this.geometry, V = this.matrixWorld, le = e.params.Points.threshold, fe = o.drawRange;
|
|
12296
12296
|
if (o.boundingSphere === null && o.computeBoundingSphere(), _sphere$7.copy(o.boundingSphere), _sphere$7.applyMatrix4(V), _sphere$7.radius += le, e.ray.intersectsSphere(_sphere$7) === !1) return;
|
|
12297
|
-
_inverseMatrix.copy(V).invert(), _ray$4.copy(e.ray).applyMatrix4(_inverseMatrix);
|
|
12297
|
+
_inverseMatrix$4.copy(V).invert(), _ray$4.copy(e.ray).applyMatrix4(_inverseMatrix$4);
|
|
12298
12298
|
const Le = le / ((this.scale.x + this.scale.y + this.scale.z) / 3), Ce = Le * Le, Re = o.index, ze = o.attributes.position;
|
|
12299
12299
|
if (Re !== null) {
|
|
12300
12300
|
const Fe = Math.max(0, fe.start), ke = Math.min(Re.count, fe.start + fe.count);
|
|
12301
12301
|
for (let Gt = Fe, Vt = ke; Gt < Vt; Gt++) {
|
|
12302
12302
|
const Zt = Re.getX(Gt);
|
|
12303
|
-
_position$2.fromBufferAttribute(ze, Zt), testPoint(_position$2, Zt, Ce, V, e, r, this);
|
|
12303
|
+
_position$2$1.fromBufferAttribute(ze, Zt), testPoint$1(_position$2$1, Zt, Ce, V, e, r, this);
|
|
12304
12304
|
}
|
|
12305
12305
|
} else {
|
|
12306
12306
|
const Fe = Math.max(0, fe.start), ke = Math.min(ze.count, fe.start + fe.count);
|
|
12307
12307
|
for (let Gt = Fe, Vt = ke; Gt < Vt; Gt++)
|
|
12308
|
-
_position$2.fromBufferAttribute(ze, Gt), testPoint(_position$2, Gt, Ce, V, e, r, this);
|
|
12308
|
+
_position$2$1.fromBufferAttribute(ze, Gt), testPoint$1(_position$2$1, Gt, Ce, V, e, r, this);
|
|
12309
12309
|
}
|
|
12310
12310
|
}
|
|
12311
12311
|
/**
|
|
@@ -12326,7 +12326,7 @@ class Points extends Object3D {
|
|
|
12326
12326
|
}
|
|
12327
12327
|
}
|
|
12328
12328
|
}
|
|
12329
|
-
function testPoint(v, e, r, o, V, le, fe) {
|
|
12329
|
+
function testPoint$1(v, e, r, o, V, le, fe) {
|
|
12330
12330
|
const Le = _ray$4.distanceSqToPoint(v);
|
|
12331
12331
|
if (Le < r) {
|
|
12332
12332
|
const Ce = new Vector3();
|
|
@@ -14607,7 +14607,7 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14607
14607
|
const $0 = 10000000000000001e-36;
|
|
14608
14608
|
let Li = A0[0];
|
|
14609
14609
|
for (let d0 = 1; d0 <= A0.length; d0++) {
|
|
14610
|
-
const K0 = d0 % A0.length, E0 = A0[K0],
|
|
14610
|
+
const K0 = d0 % A0.length, E0 = A0[K0], B0 = E0.x - Li.x, I0 = E0.y - Li.y, c0 = B0 * B0 + I0 * I0, r0 = Math.max(
|
|
14611
14611
|
Math.abs(E0.x),
|
|
14612
14612
|
Math.abs(E0.y),
|
|
14613
14613
|
Math.abs(Li.x),
|
|
@@ -14632,17 +14632,17 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14632
14632
|
const qt = Yt.length;
|
|
14633
14633
|
function e0(A0, bi, $0) {
|
|
14634
14634
|
let Li, d0, K0;
|
|
14635
|
-
const E0 = A0.x - bi.x,
|
|
14635
|
+
const E0 = A0.x - bi.x, B0 = A0.y - bi.y, I0 = $0.x - A0.x, c0 = $0.y - A0.y, r0 = E0 * E0 + B0 * B0, M0 = E0 * c0 - B0 * I0;
|
|
14636
14636
|
if (Math.abs(M0) > Number.EPSILON) {
|
|
14637
|
-
const T0 = Math.sqrt(r0), k0 = Math.sqrt(I0 * I0 + c0 * c0), w0 = bi.x -
|
|
14638
|
-
Li = w0 + E0 * Oi - A0.x, d0 = Pi +
|
|
14637
|
+
const T0 = Math.sqrt(r0), k0 = Math.sqrt(I0 * I0 + c0 * c0), w0 = bi.x - B0 / T0, Pi = bi.y + E0 / T0, Ci = $0.x - c0 / k0, Wi = $0.y + I0 / k0, Oi = ((Ci - w0) * c0 - (Wi - Pi) * I0) / (E0 * c0 - B0 * I0);
|
|
14638
|
+
Li = w0 + E0 * Oi - A0.x, d0 = Pi + B0 * Oi - A0.y;
|
|
14639
14639
|
const Gi = Li * Li + d0 * d0;
|
|
14640
14640
|
if (Gi <= 2)
|
|
14641
14641
|
return new Vector2(Li, d0);
|
|
14642
14642
|
K0 = Math.sqrt(Gi / 2);
|
|
14643
14643
|
} else {
|
|
14644
14644
|
let T0 = !1;
|
|
14645
|
-
E0 > Number.EPSILON ? I0 > Number.EPSILON && (T0 = !0) : E0 < -Number.EPSILON ? I0 < -Number.EPSILON && (T0 = !0) : Math.sign(
|
|
14645
|
+
E0 > Number.EPSILON ? I0 > Number.EPSILON && (T0 = !0) : E0 < -Number.EPSILON ? I0 < -Number.EPSILON && (T0 = !0) : Math.sign(B0) === Math.sign(c0) && (T0 = !0), T0 ? (Li = -B0, d0 = E0, K0 = Math.sqrt(r0)) : (Li = E0, d0 = B0, K0 = Math.sqrt(r0 / 2));
|
|
14646
14646
|
}
|
|
14647
14647
|
return new Vector2(Li / K0, d0 / K0);
|
|
14648
14648
|
}
|
|
@@ -14665,11 +14665,11 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14665
14665
|
const A0 = [], bi = [];
|
|
14666
14666
|
for (let $0 = 0; $0 < Zt; $0++) {
|
|
14667
14667
|
const Li = $0 / Zt, d0 = ke * Math.cos(Li * Math.PI / 2), K0 = Gt * Math.sin(Li * Math.PI / 2) + Vt;
|
|
14668
|
-
for (let E0 = 0,
|
|
14668
|
+
for (let E0 = 0, B0 = s0.length; E0 < B0; E0++) {
|
|
14669
14669
|
const I0 = $t(s0[E0], o0[E0], K0);
|
|
14670
14670
|
Vi(I0.x, I0.y, -d0), Li === 0 && A0.push(I0);
|
|
14671
14671
|
}
|
|
14672
|
-
for (let E0 = 0,
|
|
14672
|
+
for (let E0 = 0, B0 = l0; E0 < B0; E0++) {
|
|
14673
14673
|
const I0 = jt[E0];
|
|
14674
14674
|
m0 = b0[E0];
|
|
14675
14675
|
const c0 = [];
|
|
@@ -14701,8 +14701,8 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14701
14701
|
for (let d0 = 0, K0 = jt.length; d0 < K0; d0++) {
|
|
14702
14702
|
const E0 = jt[d0];
|
|
14703
14703
|
m0 = b0[d0];
|
|
14704
|
-
for (let
|
|
14705
|
-
const c0 = $t(E0[
|
|
14704
|
+
for (let B0 = 0, I0 = E0.length; B0 < I0; B0++) {
|
|
14705
|
+
const c0 = $t(E0[B0], m0[B0], Li);
|
|
14706
14706
|
Wt ? Vi(c0.x, c0.y + wt[Pe - 1].y, wt[Pe - 1].x + $0) : Vi(c0.x, c0.y, ze + $0);
|
|
14707
14707
|
}
|
|
14708
14708
|
}
|
|
@@ -14750,7 +14750,7 @@ class ExtrudeGeometry extends BufferGeometry {
|
|
|
14750
14750
|
let d0 = $0 - 1;
|
|
14751
14751
|
d0 < 0 && (d0 = A0.length - 1);
|
|
14752
14752
|
for (let K0 = 0, E0 = Pe + Zt * 2; K0 < E0; K0++) {
|
|
14753
|
-
const
|
|
14753
|
+
const B0 = qt * K0, I0 = qt * (K0 + 1), c0 = bi + Li + B0, r0 = bi + d0 + B0, M0 = bi + d0 + I0, T0 = bi + Li + I0;
|
|
14754
14754
|
Hi(c0, r0, M0, T0);
|
|
14755
14755
|
}
|
|
14756
14756
|
}
|
|
@@ -18505,7 +18505,7 @@ class ObjectLoader extends Loader {
|
|
|
18505
18505
|
* @return {Promise<Object3D>} A Promise that resolves with the loaded 3D object.
|
|
18506
18506
|
*/
|
|
18507
18507
|
loadAsync(e, r) {
|
|
18508
|
-
return
|
|
18508
|
+
return U0(this, null, function* () {
|
|
18509
18509
|
const o = this, V = this.path === "" ? LoaderUtils.extractUrlBase(e) : this.path;
|
|
18510
18510
|
this.resourcePath = this.resourcePath || V;
|
|
18511
18511
|
const le = new FileLoader(this.manager);
|
|
@@ -18546,7 +18546,7 @@ class ObjectLoader extends Loader {
|
|
|
18546
18546
|
* @return {Promise<Object3D>} A Promise that resolves with the parsed 3D object.
|
|
18547
18547
|
*/
|
|
18548
18548
|
parseAsync(e) {
|
|
18549
|
-
return
|
|
18549
|
+
return U0(this, null, function* () {
|
|
18550
18550
|
const r = this.parseAnimations(e.animations), o = this.parseShapes(e.shapes), V = this.parseGeometries(e.geometries, o), le = yield this.parseImagesAsync(e.images), fe = this.parseTextures(e.textures, le), Le = this.parseMaterials(e.materials, fe), Ce = this.parseObject(e.object, V, Le, fe, r), Re = this.parseSkeletons(e.skeletons, Ce);
|
|
18551
18551
|
return this.bindSkeletons(Ce, Re), this.bindLightTargets(Ce), Ce;
|
|
18552
18552
|
});
|
|
@@ -18655,11 +18655,11 @@ class ObjectLoader extends Loader {
|
|
|
18655
18655
|
return V;
|
|
18656
18656
|
}
|
|
18657
18657
|
parseImagesAsync(e) {
|
|
18658
|
-
return
|
|
18658
|
+
return U0(this, null, function* () {
|
|
18659
18659
|
const r = this, o = {};
|
|
18660
18660
|
let V;
|
|
18661
18661
|
function le(fe) {
|
|
18662
|
-
return
|
|
18662
|
+
return U0(this, null, function* () {
|
|
18663
18663
|
if (typeof fe == "string") {
|
|
18664
18664
|
const Le = fe, Ce = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(Le) ? Le : r.resourcePath + Le;
|
|
18665
18665
|
return yield V.loadAsync(Ce);
|
|
@@ -29630,7 +29630,7 @@ function WebGLPrograms(v, e, r, o, V, le, fe) {
|
|
|
29630
29630
|
Q0 = cn.vertexShader, Si = cn.fragmentShader;
|
|
29631
29631
|
} else
|
|
29632
29632
|
Q0 = Kt.vertexShader, Si = Kt.fragmentShader, Ce.update(Kt), Ni = Ce.getVertexShaderID(Kt), G0 = Ce.getFragmentShaderID(Kt);
|
|
29633
|
-
const R0 = v.getRenderTarget(), O0 = v.state.buffers.depth.getReversed(), Vi = a0.isInstancedMesh === !0, vi = a0.isBatchedMesh === !0, Hi = !!Kt.map, Yi = !!Kt.matcap, j0 = !!qt, A0 = !!Kt.aoMap, bi = !!Kt.lightMap, $0 = !!Kt.bumpMap, Li = !!Kt.normalMap, d0 = !!Kt.displacementMap, K0 = !!Kt.emissiveMap, E0 = !!Kt.metalnessMap,
|
|
29633
|
+
const R0 = v.getRenderTarget(), O0 = v.state.buffers.depth.getReversed(), Vi = a0.isInstancedMesh === !0, vi = a0.isBatchedMesh === !0, Hi = !!Kt.map, Yi = !!Kt.matcap, j0 = !!qt, A0 = !!Kt.aoMap, bi = !!Kt.lightMap, $0 = !!Kt.bumpMap, Li = !!Kt.normalMap, d0 = !!Kt.displacementMap, K0 = !!Kt.emissiveMap, E0 = !!Kt.metalnessMap, B0 = !!Kt.roughnessMap, I0 = Kt.anisotropy > 0, c0 = Kt.clearcoat > 0, r0 = Kt.dispersion > 0, M0 = Kt.iridescence > 0, T0 = Kt.sheen > 0, k0 = Kt.transmission > 0, w0 = I0 && !!Kt.anisotropyMap, Pi = c0 && !!Kt.clearcoatMap, Ci = c0 && !!Kt.clearcoatNormalMap, Wi = c0 && !!Kt.clearcoatRoughnessMap, Oi = M0 && !!Kt.iridescenceMap, Gi = M0 && !!Kt.iridescenceThicknessMap, Zi = T0 && !!Kt.sheenColorMap, zi = T0 && !!Kt.sheenRoughnessMap, Ui = !!Kt.specularMap, Ti = !!Kt.specularColorMap, Bi = !!Kt.specularIntensityMap, L0 = k0 && !!Kt.transmissionMap, Ii = k0 && !!Kt.thicknessMap, V0 = !!Kt.gradientMap, Ai = !!Kt.alphaMap, Ri = Kt.alphaTest > 0, xi = !!Kt.alphaHash, Ei = !!Kt.extensions;
|
|
29634
29634
|
let nn = NoToneMapping;
|
|
29635
29635
|
Kt.toneMapped && (R0 === null || R0.isXRRenderTarget === !0) && (nn = v.toneMapping);
|
|
29636
29636
|
const hn = {
|
|
@@ -29666,7 +29666,7 @@ function WebGLPrograms(v, e, r, o, V, le, fe) {
|
|
|
29666
29666
|
normalMapObjectSpace: Li && Kt.normalMapType === ObjectSpaceNormalMap,
|
|
29667
29667
|
normalMapTangentSpace: Li && Kt.normalMapType === TangentSpaceNormalMap,
|
|
29668
29668
|
metalnessMap: E0,
|
|
29669
|
-
roughnessMap:
|
|
29669
|
+
roughnessMap: B0,
|
|
29670
29670
|
anisotropy: I0,
|
|
29671
29671
|
anisotropyMap: w0,
|
|
29672
29672
|
clearcoat: c0,
|
|
@@ -29701,7 +29701,7 @@ function WebGLPrograms(v, e, r, o, V, le, fe) {
|
|
|
29701
29701
|
displacementMapUv: d0 && Vt(Kt.displacementMap.channel),
|
|
29702
29702
|
emissiveMapUv: K0 && Vt(Kt.emissiveMap.channel),
|
|
29703
29703
|
metalnessMapUv: E0 && Vt(Kt.metalnessMap.channel),
|
|
29704
|
-
roughnessMapUv:
|
|
29704
|
+
roughnessMapUv: B0 && Vt(Kt.roughnessMap.channel),
|
|
29705
29705
|
anisotropyMapUv: w0 && Vt(Kt.anisotropyMap.channel),
|
|
29706
29706
|
clearcoatMapUv: Pi && Vt(Kt.clearcoatMap.channel),
|
|
29707
29707
|
clearcoatNormalMapUv: Ci && Vt(Kt.clearcoatNormalMap.channel),
|
|
@@ -30622,7 +30622,7 @@ function WebGLState(v, e) {
|
|
|
30622
30622
|
function E0(L0) {
|
|
30623
30623
|
L0 ? R0(v.SCISSOR_TEST) : O0(v.SCISSOR_TEST);
|
|
30624
30624
|
}
|
|
30625
|
-
function
|
|
30625
|
+
function B0(L0) {
|
|
30626
30626
|
L0 === void 0 && (L0 = v.TEXTURE0 + s0 - 1), o0 !== L0 && (v.activeTexture(L0), o0 = L0);
|
|
30627
30627
|
}
|
|
30628
30628
|
function I0(L0, Ii, V0) {
|
|
@@ -30741,7 +30741,7 @@ function WebGLState(v, e) {
|
|
|
30741
30741
|
setLineWidth: d0,
|
|
30742
30742
|
setPolygonOffset: K0,
|
|
30743
30743
|
setScissorTest: E0,
|
|
30744
|
-
activeTexture:
|
|
30744
|
+
activeTexture: B0,
|
|
30745
30745
|
bindTexture: I0,
|
|
30746
30746
|
unbindTexture: c0,
|
|
30747
30747
|
compressedTexImage2D: r0,
|
|
@@ -31001,7 +31001,7 @@ function WebGLTextures(v, e, r, o, V, le, fe) {
|
|
|
31001
31001
|
const Ci = ColorManagement.getPrimaries(ColorManagement.workingColorSpace), Wi = r0.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries(r0.colorSpace), Oi = r0.colorSpace === NoColorSpace || Ci === Wi ? v.NONE : v.BROWSER_DEFAULT_WEBGL;
|
|
31002
31002
|
v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL, r0.flipY), v.pixelStorei(v.UNPACK_PREMULTIPLY_ALPHA_WEBGL, r0.premultiplyAlpha), v.pixelStorei(v.UNPACK_ALIGNMENT, r0.unpackAlignment), v.pixelStorei(v.UNPACK_COLORSPACE_CONVERSION_WEBGL, Oi);
|
|
31003
31003
|
let Gi = Vt(r0.image, !1, V.maxTextureSize);
|
|
31004
|
-
Gi =
|
|
31004
|
+
Gi = B0(r0, Gi);
|
|
31005
31005
|
const Zi = le.convert(r0.format, r0.colorSpace), zi = le.convert(r0.type);
|
|
31006
31006
|
let Ui = wt(r0.internalFormat, Zi, zi, r0.colorSpace, r0.isVideoTexture);
|
|
31007
31007
|
P0(T0, r0);
|
|
@@ -31107,7 +31107,7 @@ function WebGLTextures(v, e, r, o, V, le, fe) {
|
|
|
31107
31107
|
v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL, r0.flipY), v.pixelStorei(v.UNPACK_PREMULTIPLY_ALPHA_WEBGL, r0.premultiplyAlpha), v.pixelStorei(v.UNPACK_ALIGNMENT, r0.unpackAlignment), v.pixelStorei(v.UNPACK_COLORSPACE_CONVERSION_WEBGL, Wi);
|
|
31108
31108
|
const Oi = r0.isCompressedTexture || r0.image[0].isCompressedTexture, Gi = r0.image[0] && r0.image[0].isDataTexture, Zi = [];
|
|
31109
31109
|
for (let xi = 0; xi < 6; xi++)
|
|
31110
|
-
!Oi && !Gi ? Zi[xi] = Vt(r0.image[xi], !0, V.maxCubemapSize) : Zi[xi] = Gi ? r0.image[xi].image : r0.image[xi], Zi[xi] =
|
|
31110
|
+
!Oi && !Gi ? Zi[xi] = Vt(r0.image[xi], !0, V.maxCubemapSize) : Zi[xi] = Gi ? r0.image[xi].image : r0.image[xi], Zi[xi] = B0(r0, Zi[xi]);
|
|
31111
31111
|
const zi = Zi[0], Ui = le.convert(r0.format, r0.colorSpace), Ti = le.convert(r0.type), Bi = wt(r0.internalFormat, Ui, Ti, r0.colorSpace), L0 = r0.isVideoTexture !== !0, Ii = w0.__version === void 0 || T0 === !0, V0 = k0.dataReady;
|
|
31112
31112
|
let Ai = It(r0, zi);
|
|
31113
31113
|
P0(v.TEXTURE_CUBE_MAP, r0);
|
|
@@ -31353,7 +31353,7 @@ function WebGLTextures(v, e, r, o, V, le, fe) {
|
|
|
31353
31353
|
const r0 = fe.render.frame;
|
|
31354
31354
|
Pe.get(c0) !== r0 && (Pe.set(c0, r0), c0.update());
|
|
31355
31355
|
}
|
|
31356
|
-
function
|
|
31356
|
+
function B0(c0, r0) {
|
|
31357
31357
|
const M0 = c0.colorSpace, T0 = c0.format, k0 = c0.type;
|
|
31358
31358
|
return c0.isCompressedTexture === !0 || c0.isVideoTexture === !0 || M0 !== LinearSRGBColorSpace && M0 !== NoColorSpace && (ColorManagement.getTransfer(M0) === SRGBTransfer ? (T0 !== RGBAFormat || k0 !== UnsignedByteType) && warn("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : error$1("WebGLTextures: Unsupported texture color space:", M0)), r0;
|
|
31359
31359
|
}
|
|
@@ -31607,7 +31607,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
31607
31607
|
}, this.getSession = function() {
|
|
31608
31608
|
return V;
|
|
31609
31609
|
}, this.setSession = function(G0) {
|
|
31610
|
-
return
|
|
31610
|
+
return U0(this, null, function* () {
|
|
31611
31611
|
if (V = G0, V !== null) {
|
|
31612
31612
|
if (wt = e.getRenderTarget(), V.addEventListener("select", s0), V.addEventListener("selectstart", s0), V.addEventListener("selectend", s0), V.addEventListener("squeeze", s0), V.addEventListener("squeezestart", s0), V.addEventListener("squeezeend", s0), V.addEventListener("end", $t), V.addEventListener("inputsourceschange", qt), Xt.xrCompatible !== !0 && (yield r.makeXRCompatible()), Ht = e.getPixelRatio(), e.getSize(Ft), Vt && "createProjectionLayer" in XRWebGLBinding.prototype) {
|
|
31613
31613
|
let O0 = null, Vi = null, vi = null;
|
|
@@ -31687,11 +31687,11 @@ class WebXRManager extends EventDispatcher {
|
|
|
31687
31687
|
const e0 = new Vector3(), o0 = new Vector3();
|
|
31688
31688
|
function b0(G0, R0, O0) {
|
|
31689
31689
|
e0.setFromMatrixPosition(R0.matrixWorld), o0.setFromMatrixPosition(O0.matrixWorld);
|
|
31690
|
-
const Vi = e0.distanceTo(o0), vi = R0.projectionMatrix.elements, Hi = O0.projectionMatrix.elements, Yi = vi[14] / (vi[10] - 1), j0 = vi[14] / (vi[10] + 1), A0 = (vi[9] + 1) / vi[5], bi = (vi[9] - 1) / vi[5], $0 = (vi[8] - 1) / vi[0], Li = (Hi[8] + 1) / Hi[0], d0 = Yi * $0, K0 = Yi * Li, E0 = Vi / (-$0 + Li),
|
|
31691
|
-
if (R0.matrixWorld.decompose(G0.position, G0.quaternion, G0.scale), G0.translateX(
|
|
31690
|
+
const Vi = e0.distanceTo(o0), vi = R0.projectionMatrix.elements, Hi = O0.projectionMatrix.elements, Yi = vi[14] / (vi[10] - 1), j0 = vi[14] / (vi[10] + 1), A0 = (vi[9] + 1) / vi[5], bi = (vi[9] - 1) / vi[5], $0 = (vi[8] - 1) / vi[0], Li = (Hi[8] + 1) / Hi[0], d0 = Yi * $0, K0 = Yi * Li, E0 = Vi / (-$0 + Li), B0 = E0 * -$0;
|
|
31691
|
+
if (R0.matrixWorld.decompose(G0.position, G0.quaternion, G0.scale), G0.translateX(B0), G0.translateZ(E0), G0.matrixWorld.compose(G0.position, G0.quaternion, G0.scale), G0.matrixWorldInverse.copy(G0.matrixWorld).invert(), vi[10] === -1)
|
|
31692
31692
|
G0.projectionMatrix.copy(R0.projectionMatrix), G0.projectionMatrixInverse.copy(R0.projectionMatrixInverse);
|
|
31693
31693
|
else {
|
|
31694
|
-
const I0 = Yi + E0, c0 = j0 + E0, r0 = d0 -
|
|
31694
|
+
const I0 = Yi + E0, c0 = j0 + E0, r0 = d0 - B0, M0 = K0 + (Vi - B0), T0 = A0 * j0 / c0 * I0, k0 = bi * j0 / c0 * I0;
|
|
31695
31695
|
G0.projectionMatrix.makePerspective(r0, M0, T0, k0, I0, c0), G0.projectionMatrixInverse.copy(G0.projectionMatrix).invert();
|
|
31696
31696
|
}
|
|
31697
31697
|
}
|
|
@@ -32553,9 +32553,9 @@ class WebGLRenderer {
|
|
|
32553
32553
|
} catch (i0) {
|
|
32554
32554
|
throw error$1("WebGLRenderer: " + i0.message), i0;
|
|
32555
32555
|
}
|
|
32556
|
-
let E0,
|
|
32556
|
+
let E0, B0, I0, c0, r0, M0, T0, k0, w0, Pi, Ci, Wi, Oi, Gi, Zi, zi, Ui, Ti, Bi, L0, Ii, V0, Ai, Ri;
|
|
32557
32557
|
function xi() {
|
|
32558
|
-
E0 = new WebGLExtensions(d0), E0.init(), V0 = new WebGLUtils(d0, E0),
|
|
32558
|
+
E0 = new WebGLExtensions(d0), E0.init(), V0 = new WebGLUtils(d0, E0), B0 = new WebGLCapabilities(d0, E0, e, V0), I0 = new WebGLState(d0, E0), B0.reversedDepthBuffer && Fe && I0.buffers.depth.setReversed(!0), c0 = new WebGLInfo(d0), r0 = new WebGLProperties(), M0 = new WebGLTextures(d0, E0, I0, r0, B0, V0, c0), T0 = new WebGLCubeMaps(Kt), k0 = new WebGLCubeUVMaps(Kt), w0 = new WebGLAttributes(d0), Ai = new WebGLBindingStates(d0, w0), Pi = new WebGLGeometries(d0, w0, c0, Ai), Ci = new WebGLObjects(d0, Pi, w0, c0), Bi = new WebGLMorphtargets(d0, B0, M0), zi = new WebGLClipping(r0), Wi = new WebGLPrograms(Kt, T0, k0, E0, B0, Ai, zi), Oi = new WebGLMaterials(Kt, r0), Gi = new WebGLRenderLists(), Zi = new WebGLRenderStates(E0), Ti = new WebGLBackground(Kt, T0, k0, I0, Ci, Gt, Ce), Ui = new WebGLShadowMap(Kt, Ci, B0), Ri = new WebGLUniformsGroups(d0, c0, B0, I0), L0 = new WebGLBufferRenderer(d0, E0, c0), Ii = new WebGLIndexedBufferRenderer(d0, E0, c0), c0.programs = Wi.programs, Kt.capabilities = B0, Kt.extensions = E0, Kt.properties = r0, Kt.renderLists = Gi, Kt.shadowMap = Ui, Kt.state = I0, Kt.info = c0;
|
|
32559
32559
|
}
|
|
32560
32560
|
xi(), Vt !== UnsignedByteType && (Ht = new WebGLOutput(Vt, r.width, r.height, V, le));
|
|
32561
32561
|
const Ei = new WebXRManager(Kt, d0);
|
|
@@ -32646,7 +32646,7 @@ class WebGLRenderer {
|
|
|
32646
32646
|
}, this.clearStencil = function() {
|
|
32647
32647
|
this.clear(!1, !1, !0);
|
|
32648
32648
|
}, this.dispose = function() {
|
|
32649
|
-
r.removeEventListener("webglcontextlost", nn, !1), r.removeEventListener("webglcontextrestored", hn, !1), r.removeEventListener("webglcontextcreationerror", cn, !1), Ti.dispose(), Gi.dispose(), Zi.dispose(), r0.dispose(), T0.dispose(), k0.dispose(), Ci.dispose(), Ai.dispose(), Ri.dispose(), Wi.dispose(), Ei.dispose(), Ei.removeEventListener("sessionstart",
|
|
32649
|
+
r.removeEventListener("webglcontextlost", nn, !1), r.removeEventListener("webglcontextrestored", hn, !1), r.removeEventListener("webglcontextcreationerror", cn, !1), Ti.dispose(), Gi.dispose(), Zi.dispose(), r0.dispose(), T0.dispose(), k0.dispose(), Ci.dispose(), Ai.dispose(), Ri.dispose(), Wi.dispose(), Ei.dispose(), Ei.removeEventListener("sessionstart", Nn), Ei.removeEventListener("sessionend", Vn), Gn.stop();
|
|
32650
32650
|
};
|
|
32651
32651
|
function nn(i0) {
|
|
32652
32652
|
i0.preventDefault(), log$1("WebGLRenderer: Context Lost."), Yt = !0;
|
|
@@ -32664,9 +32664,9 @@ class WebGLRenderer {
|
|
|
32664
32664
|
u0.removeEventListener("dispose", bn), gn(u0);
|
|
32665
32665
|
}
|
|
32666
32666
|
function gn(i0) {
|
|
32667
|
-
|
|
32667
|
+
Kn(i0), r0.remove(i0);
|
|
32668
32668
|
}
|
|
32669
|
-
function
|
|
32669
|
+
function Kn(i0) {
|
|
32670
32670
|
const u0 = r0.get(i0).programs;
|
|
32671
32671
|
u0 !== void 0 && (u0.forEach(function(S0) {
|
|
32672
32672
|
Wi.releaseProgram(S0);
|
|
@@ -32712,8 +32712,8 @@ class WebGLRenderer {
|
|
|
32712
32712
|
} else
|
|
32713
32713
|
ki.render(Ki, an);
|
|
32714
32714
|
};
|
|
32715
|
-
function
|
|
32716
|
-
i0.transparent === !0 && i0.side === DoubleSide && i0.forceSinglePass === !1 ? (i0.side = BackSide, i0.needsUpdate = !0,
|
|
32715
|
+
function In(i0, u0, S0) {
|
|
32716
|
+
i0.transparent === !0 && i0.side === DoubleSide && i0.forceSinglePass === !1 ? (i0.side = BackSide, i0.needsUpdate = !0, _n(i0, u0, S0), i0.side = FrontSide, i0.needsUpdate = !0, _n(i0, u0, S0), i0.side = DoubleSide) : _n(i0, u0, S0);
|
|
32717
32717
|
}
|
|
32718
32718
|
this.compile = function(i0, u0, S0 = null) {
|
|
32719
32719
|
S0 === null && (S0 = i0), It = Zi.get(S0), It.init(u0), Ft.push(It), S0.traverseVisible(function(f0) {
|
|
@@ -32730,10 +32730,10 @@ class WebGLRenderer {
|
|
|
32730
32730
|
if (Array.isArray(N0))
|
|
32731
32731
|
for (let F0 = 0; F0 < N0.length; F0++) {
|
|
32732
32732
|
const H0 = N0[F0];
|
|
32733
|
-
|
|
32733
|
+
In(H0, S0, f0), g0.add(H0);
|
|
32734
32734
|
}
|
|
32735
32735
|
else
|
|
32736
|
-
|
|
32736
|
+
In(N0, S0, f0), g0.add(N0);
|
|
32737
32737
|
}), It = Ft.pop(), g0;
|
|
32738
32738
|
}, this.compileAsync = function(i0, u0, S0 = null) {
|
|
32739
32739
|
const g0 = this.compile(i0, u0, S0);
|
|
@@ -32750,20 +32750,20 @@ class WebGLRenderer {
|
|
|
32750
32750
|
E0.get("KHR_parallel_shader_compile") !== null ? N0() : setTimeout(N0, 10);
|
|
32751
32751
|
});
|
|
32752
32752
|
};
|
|
32753
|
-
let
|
|
32754
|
-
function
|
|
32755
|
-
|
|
32753
|
+
let wn = null;
|
|
32754
|
+
function kn(i0) {
|
|
32755
|
+
wn && wn(i0);
|
|
32756
32756
|
}
|
|
32757
|
-
function
|
|
32758
|
-
|
|
32757
|
+
function Nn() {
|
|
32758
|
+
Gn.stop();
|
|
32759
32759
|
}
|
|
32760
|
-
function
|
|
32761
|
-
|
|
32760
|
+
function Vn() {
|
|
32761
|
+
Gn.start();
|
|
32762
32762
|
}
|
|
32763
|
-
const
|
|
32764
|
-
|
|
32765
|
-
|
|
32766
|
-
}, Ei.addEventListener("sessionstart",
|
|
32763
|
+
const Gn = new WebGLAnimation();
|
|
32764
|
+
Gn.setAnimationLoop(kn), typeof self != "undefined" && Gn.setContext(self), this.setAnimationLoop = function(i0) {
|
|
32765
|
+
wn = i0, Ei.setAnimationLoop(i0), i0 === null ? Gn.stop() : Gn.start();
|
|
32766
|
+
}, Ei.addEventListener("sessionstart", Nn), Ei.addEventListener("sessionend", Vn), this.render = function(i0, u0) {
|
|
32767
32767
|
if (u0 !== void 0 && u0.isCamera !== !0) {
|
|
32768
32768
|
error$1("WebGLRenderer.render: camera is not an instance of THREE.Camera.");
|
|
32769
32769
|
return;
|
|
@@ -32772,9 +32772,9 @@ class WebGLRenderer {
|
|
|
32772
32772
|
const S0 = Ei.enabled === !0 && Ei.isPresenting === !0, g0 = Ht !== null && (a0 === null || S0) && Ht.begin(Kt, a0);
|
|
32773
32773
|
if (i0.matrixWorldAutoUpdate === !0 && i0.updateMatrixWorld(), u0.parent === null && u0.matrixWorldAutoUpdate === !0 && u0.updateMatrixWorld(), Ei.enabled === !0 && Ei.isPresenting === !0 && (Ht === null || Ht.isCompositing() === !1) && (Ei.cameraAutoUpdate === !0 && Ei.updateCamera(u0), u0 = Ei.getCamera()), i0.isScene === !0 && i0.onBeforeRender(Kt, i0, u0, a0), It = Zi.get(i0, Ft.length), It.init(u0), Ft.push(It), Yi.multiplyMatrices(u0.projectionMatrix, u0.matrixWorldInverse), Vi.setFromProjectionMatrix(Yi, WebGLCoordinateSystem, u0.reversedDepth), Hi = this.localClippingEnabled, vi = zi.init(this.clippingPlanes, Hi), Wt = Gi.get(i0, Nt.length), Wt.init(), Nt.push(Wt), Ei.enabled === !0 && Ei.isPresenting === !0) {
|
|
32774
32774
|
const F0 = Kt.xr.getDepthSensingMesh();
|
|
32775
|
-
F0 !== null &&
|
|
32775
|
+
F0 !== null && Pn(F0, u0, -1 / 0, Kt.sortObjects);
|
|
32776
32776
|
}
|
|
32777
|
-
|
|
32777
|
+
Pn(i0, u0, 0, Kt.sortObjects), Wt.finish(), Kt.sortObjects === !0 && Wt.sort(Si, Ni), $0 = Ei.enabled === !1 || Ei.isPresenting === !1 || Ei.hasDepthSensing() === !1, $0 && Ti.addToRenderList(Wt, i0), this.info.render.frame++, vi === !0 && zi.beginShadows();
|
|
32778
32778
|
const f0 = It.state.shadowsArray;
|
|
32779
32779
|
if (Ui.render(f0, i0, u0), vi === !0 && zi.endShadows(), this.info.autoReset === !0 && this.info.reset(), (g0 && Ht.hasRenderPass()) === !1) {
|
|
32780
32780
|
const F0 = Wt.opaque, H0 = Wt.transmissive;
|
|
@@ -32783,19 +32783,19 @@ class WebGLRenderer {
|
|
|
32783
32783
|
if (H0.length > 0)
|
|
32784
32784
|
for (let D0 = 0, yi = q0.length; D0 < yi; D0++) {
|
|
32785
32785
|
const Mi = q0[D0];
|
|
32786
|
-
|
|
32786
|
+
Fn(F0, H0, i0, Mi);
|
|
32787
32787
|
}
|
|
32788
32788
|
$0 && Ti.render(i0);
|
|
32789
32789
|
for (let D0 = 0, yi = q0.length; D0 < yi; D0++) {
|
|
32790
32790
|
const Mi = q0[D0];
|
|
32791
|
-
|
|
32791
|
+
zn(Wt, i0, Mi, Mi.viewport);
|
|
32792
32792
|
}
|
|
32793
32793
|
} else
|
|
32794
|
-
H0.length > 0 &&
|
|
32794
|
+
H0.length > 0 && Fn(F0, H0, i0, u0), $0 && Ti.render(i0), zn(Wt, i0, u0);
|
|
32795
32795
|
}
|
|
32796
32796
|
a0 !== null && n0 === 0 && (M0.updateMultisampleRenderTarget(a0), M0.updateRenderTargetMipmap(a0)), g0 && Ht.end(Kt), i0.isScene === !0 && i0.onAfterRender(Kt, i0, u0), Ai.resetDefaultState(), l0 = -1, s0 = null, Ft.pop(), Ft.length > 0 ? (It = Ft[Ft.length - 1], vi === !0 && zi.setGlobalState(Kt.clippingPlanes, It.state.camera)) : It = null, Nt.pop(), Nt.length > 0 ? Wt = Nt[Nt.length - 1] : Wt = null;
|
|
32797
32797
|
};
|
|
32798
|
-
function
|
|
32798
|
+
function Pn(i0, u0, S0, g0) {
|
|
32799
32799
|
if (i0.visible === !1) return;
|
|
32800
32800
|
if (i0.layers.test(u0.layers)) {
|
|
32801
32801
|
if (i0.isGroup)
|
|
@@ -32823,13 +32823,13 @@ class WebGLRenderer {
|
|
|
32823
32823
|
}
|
|
32824
32824
|
const N0 = i0.children;
|
|
32825
32825
|
for (let F0 = 0, H0 = N0.length; F0 < H0; F0++)
|
|
32826
|
-
|
|
32826
|
+
Pn(N0[F0], u0, S0, g0);
|
|
32827
32827
|
}
|
|
32828
|
-
function
|
|
32828
|
+
function zn(i0, u0, S0, g0) {
|
|
32829
32829
|
const { opaque: f0, transmissive: N0, transparent: F0 } = i0;
|
|
32830
|
-
It.setupLightsView(S0), vi === !0 && zi.setGlobalState(Kt.clippingPlanes, S0), g0 && I0.viewport($t.copy(g0)), f0.length > 0 &&
|
|
32830
|
+
It.setupLightsView(S0), vi === !0 && zi.setGlobalState(Kt.clippingPlanes, S0), g0 && I0.viewport($t.copy(g0)), f0.length > 0 && Tn(f0, u0, S0), N0.length > 0 && Tn(N0, u0, S0), F0.length > 0 && Tn(F0, u0, S0), I0.buffers.depth.setTest(!0), I0.buffers.depth.setMask(!0), I0.buffers.color.setMask(!0), I0.setPolygonOffset(!1);
|
|
32831
32831
|
}
|
|
32832
|
-
function
|
|
32832
|
+
function Fn(i0, u0, S0, g0) {
|
|
32833
32833
|
if ((S0.isScene === !0 ? S0.overrideMaterial : null) !== null)
|
|
32834
32834
|
return;
|
|
32835
32835
|
if (It.state.transmissionRenderTarget[g0.id] === void 0) {
|
|
@@ -32838,7 +32838,7 @@ class WebGLRenderer {
|
|
|
32838
32838
|
generateMipmaps: !0,
|
|
32839
32839
|
type: Ki ? HalfFloatType : UnsignedByteType,
|
|
32840
32840
|
minFilter: LinearMipmapLinearFilter,
|
|
32841
|
-
samples:
|
|
32841
|
+
samples: B0.samples,
|
|
32842
32842
|
stencilBuffer: le,
|
|
32843
32843
|
resolveDepthBuffer: !1,
|
|
32844
32844
|
resolveStencilBuffer: !1,
|
|
@@ -32852,31 +32852,31 @@ class WebGLRenderer {
|
|
|
32852
32852
|
const yi = Kt.toneMapping;
|
|
32853
32853
|
Kt.toneMapping = NoToneMapping;
|
|
32854
32854
|
const Mi = g0.viewport;
|
|
32855
|
-
if (g0.viewport !== void 0 && (g0.viewport = void 0), It.setupLightsView(g0), vi === !0 && zi.setGlobalState(Kt.clippingPlanes, g0),
|
|
32855
|
+
if (g0.viewport !== void 0 && (g0.viewport = void 0), It.setupLightsView(g0), vi === !0 && zi.setGlobalState(Kt.clippingPlanes, g0), Tn(i0, S0, g0), M0.updateMultisampleRenderTarget(N0), M0.updateRenderTargetMipmap(N0), E0.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
32856
32856
|
let Ki = !1;
|
|
32857
32857
|
for (let Ji = 0, an = u0.length; Ji < an; Ji++) {
|
|
32858
32858
|
const ji = u0[Ji], { object: ki, geometry: Fi, material: Qi, group: Di } = ji;
|
|
32859
32859
|
if (Qi.side === DoubleSide && ki.layers.test(g0.layers)) {
|
|
32860
32860
|
const $i = Qi.side;
|
|
32861
|
-
Qi.side = BackSide, Qi.needsUpdate = !0,
|
|
32861
|
+
Qi.side = BackSide, Qi.needsUpdate = !0, Wn(ki, S0, g0, Fi, Qi, Di), Qi.side = $i, Qi.needsUpdate = !0, Ki = !0;
|
|
32862
32862
|
}
|
|
32863
32863
|
}
|
|
32864
32864
|
Ki === !0 && (M0.updateMultisampleRenderTarget(N0), M0.updateRenderTargetMipmap(N0));
|
|
32865
32865
|
}
|
|
32866
32866
|
Kt.setRenderTarget(H0, q0, D0), Kt.setClearColor(o0, b0), Mi !== void 0 && (g0.viewport = Mi), Kt.toneMapping = yi;
|
|
32867
32867
|
}
|
|
32868
|
-
function
|
|
32868
|
+
function Tn(i0, u0, S0) {
|
|
32869
32869
|
const g0 = u0.isScene === !0 ? u0.overrideMaterial : null;
|
|
32870
32870
|
for (let f0 = 0, N0 = i0.length; f0 < N0; f0++) {
|
|
32871
32871
|
const F0 = i0[f0], { object: H0, geometry: q0, group: D0 } = F0;
|
|
32872
32872
|
let yi = F0.material;
|
|
32873
|
-
yi.allowOverride === !0 && g0 !== null && (yi = g0), H0.layers.test(S0.layers) &&
|
|
32873
|
+
yi.allowOverride === !0 && g0 !== null && (yi = g0), H0.layers.test(S0.layers) && Wn(H0, u0, S0, q0, yi, D0);
|
|
32874
32874
|
}
|
|
32875
32875
|
}
|
|
32876
|
-
function
|
|
32876
|
+
function Wn(i0, u0, S0, g0, f0, N0) {
|
|
32877
32877
|
i0.onBeforeRender(Kt, u0, S0, g0, f0, N0), i0.modelViewMatrix.multiplyMatrices(S0.matrixWorldInverse, i0.matrixWorld), i0.normalMatrix.getNormalMatrix(i0.modelViewMatrix), f0.onBeforeRender(Kt, u0, S0, g0, i0, N0), f0.transparent === !0 && f0.side === DoubleSide && f0.forceSinglePass === !1 ? (f0.side = BackSide, f0.needsUpdate = !0, Kt.renderBufferDirect(S0, u0, g0, f0, i0, N0), f0.side = FrontSide, f0.needsUpdate = !0, Kt.renderBufferDirect(S0, u0, g0, f0, i0, N0), f0.side = DoubleSide) : Kt.renderBufferDirect(S0, u0, g0, f0, i0, N0), i0.onAfterRender(Kt, u0, S0, g0, f0, N0);
|
|
32878
32878
|
}
|
|
32879
|
-
function
|
|
32879
|
+
function _n(i0, u0, S0) {
|
|
32880
32880
|
u0.isScene !== !0 && (u0 = bi);
|
|
32881
32881
|
const g0 = r0.get(i0), f0 = It.state.lights, N0 = It.state.shadowsArray, F0 = f0.state.version, H0 = Wi.getParameters(i0, f0.state, N0, u0, S0), q0 = Wi.getProgramCacheKey(H0);
|
|
32882
32882
|
let D0 = g0.programs;
|
|
@@ -32890,7 +32890,7 @@ class WebGLRenderer {
|
|
|
32890
32890
|
const Mi = g0.uniforms;
|
|
32891
32891
|
return (!i0.isShaderMaterial && !i0.isRawShaderMaterial || i0.clipping === !0) && (Mi.clippingPlanes = zi.uniform), xn(i0, H0), g0.needsLights = v0(i0), g0.lightsStateVersion = F0, g0.needsLights && (Mi.ambientLightColor.value = f0.state.ambient, Mi.lightProbe.value = f0.state.probe, Mi.directionalLights.value = f0.state.directional, Mi.directionalLightShadows.value = f0.state.directionalShadow, Mi.spotLights.value = f0.state.spot, Mi.spotLightShadows.value = f0.state.spotShadow, Mi.rectAreaLights.value = f0.state.rectArea, Mi.ltc_1.value = f0.state.rectAreaLTC1, Mi.ltc_2.value = f0.state.rectAreaLTC2, Mi.pointLights.value = f0.state.point, Mi.pointLightShadows.value = f0.state.pointShadow, Mi.hemisphereLights.value = f0.state.hemi, Mi.directionalShadowMap.value = f0.state.directionalShadowMap, Mi.directionalShadowMatrix.value = f0.state.directionalShadowMatrix, Mi.spotShadowMap.value = f0.state.spotShadowMap, Mi.spotLightMatrix.value = f0.state.spotLightMatrix, Mi.spotLightMap.value = f0.state.spotLightMap, Mi.pointShadowMap.value = f0.state.pointShadowMap, Mi.pointShadowMatrix.value = f0.state.pointShadowMatrix), g0.currentProgram = yi, g0.uniformsList = null, yi;
|
|
32892
32892
|
}
|
|
32893
|
-
function
|
|
32893
|
+
function Mn(i0) {
|
|
32894
32894
|
if (i0.uniformsList === null) {
|
|
32895
32895
|
const u0 = i0.currentProgram.getUniforms();
|
|
32896
32896
|
i0.uniformsList = WebGLUniforms.seqWithValue(u0.seq, i0.uniforms);
|
|
@@ -32914,13 +32914,13 @@ class WebGLRenderer {
|
|
|
32914
32914
|
let Di = !1;
|
|
32915
32915
|
g0.version === Fi.__version ? (Fi.needsLights && Fi.lightsStateVersion !== Qi.state.version || Fi.outputColorSpace !== H0 || f0.isBatchedMesh && Fi.batching === !1 || !f0.isBatchedMesh && Fi.batching === !0 || f0.isBatchedMesh && Fi.batchingColor === !0 && f0.colorTexture === null || f0.isBatchedMesh && Fi.batchingColor === !1 && f0.colorTexture !== null || f0.isInstancedMesh && Fi.instancing === !1 || !f0.isInstancedMesh && Fi.instancing === !0 || f0.isSkinnedMesh && Fi.skinning === !1 || !f0.isSkinnedMesh && Fi.skinning === !0 || f0.isInstancedMesh && Fi.instancingColor === !0 && f0.instanceColor === null || f0.isInstancedMesh && Fi.instancingColor === !1 && f0.instanceColor !== null || f0.isInstancedMesh && Fi.instancingMorph === !0 && f0.morphTexture === null || f0.isInstancedMesh && Fi.instancingMorph === !1 && f0.morphTexture !== null || Fi.envMap !== q0 || g0.fog === !0 && Fi.fog !== N0 || Fi.numClippingPlanes !== void 0 && (Fi.numClippingPlanes !== zi.numPlanes || Fi.numIntersection !== zi.numIntersection) || Fi.vertexAlphas !== D0 || Fi.vertexTangents !== yi || Fi.morphTargets !== Mi || Fi.morphNormals !== Ki || Fi.morphColors !== Ji || Fi.toneMapping !== an || Fi.morphTargetsCount !== ki) && (Di = !0) : (Di = !0, Fi.__version = g0.version);
|
|
32916
32916
|
let $i = Fi.currentProgram;
|
|
32917
|
-
Di === !0 && ($i =
|
|
32917
|
+
Di === !0 && ($i = _n(g0, u0, f0));
|
|
32918
32918
|
let ln = !1, dn = !1, Sn = !1;
|
|
32919
32919
|
const on = $i.getUniforms(), un = Fi.uniforms;
|
|
32920
32920
|
if (I0.useProgram($i.program) && (ln = !0, dn = !0, Sn = !0), g0.id !== l0 && (l0 = g0.id, dn = !0), ln || s0 !== i0) {
|
|
32921
32921
|
I0.buffers.depth.getReversed() && i0.reversedDepth !== !0 && (i0._reversedDepth = !0, i0.updateProjectionMatrix()), on.setValue(d0, "projectionMatrix", i0.projectionMatrix), on.setValue(d0, "viewMatrix", i0.matrixWorldInverse);
|
|
32922
32922
|
const fn = on.map.cameraPosition;
|
|
32923
|
-
fn !== void 0 && fn.setValue(d0, j0.setFromMatrixPosition(i0.matrixWorld)),
|
|
32923
|
+
fn !== void 0 && fn.setValue(d0, j0.setFromMatrixPosition(i0.matrixWorld)), B0.logarithmicDepthBuffer && on.setValue(
|
|
32924
32924
|
d0,
|
|
32925
32925
|
"logDepthBufFC",
|
|
32926
32926
|
2 / (Math.log(i0.far + 1) / Math.LN2)
|
|
@@ -32933,11 +32933,11 @@ class WebGLRenderer {
|
|
|
32933
32933
|
}
|
|
32934
32934
|
f0.isBatchedMesh && (on.setOptional(d0, f0, "batchingTexture"), on.setValue(d0, "batchingTexture", f0._matricesTexture, M0), on.setOptional(d0, f0, "batchingIdTexture"), on.setValue(d0, "batchingIdTexture", f0._indirectTexture, M0), on.setOptional(d0, f0, "batchingColorTexture"), f0._colorsTexture !== null && on.setValue(d0, "batchingColorTexture", f0._colorsTexture, M0));
|
|
32935
32935
|
const yn = S0.morphAttributes;
|
|
32936
|
-
if ((yn.position !== void 0 || yn.normal !== void 0 || yn.color !== void 0) && Bi.update(f0, S0, $i), (dn || Fi.receiveShadow !== f0.receiveShadow) && (Fi.receiveShadow = f0.receiveShadow, on.setValue(d0, "receiveShadow", f0.receiveShadow)), g0.isMeshGouraudMaterial && g0.envMap !== null && (un.envMap.value = q0, un.flipEnvMap.value = q0.isCubeTexture && q0.isRenderTargetTexture === !1 ? -1 : 1), g0.isMeshStandardMaterial && g0.envMap === null && u0.environment !== null && (un.envMapIntensity.value = u0.environmentIntensity), un.dfgLUT !== void 0 && (un.dfgLUT.value = getDFGLUT()), dn && (on.setValue(d0, "toneMappingExposure", Kt.toneMappingExposure), Fi.needsLights && h0(un, Sn), N0 && g0.fog === !0 && Oi.refreshFogUniforms(un, N0), Oi.refreshMaterialUniforms(un, g0, Q0, P0, It.state.transmissionRenderTarget[i0.id]), WebGLUniforms.upload(d0,
|
|
32936
|
+
if ((yn.position !== void 0 || yn.normal !== void 0 || yn.color !== void 0) && Bi.update(f0, S0, $i), (dn || Fi.receiveShadow !== f0.receiveShadow) && (Fi.receiveShadow = f0.receiveShadow, on.setValue(d0, "receiveShadow", f0.receiveShadow)), g0.isMeshGouraudMaterial && g0.envMap !== null && (un.envMap.value = q0, un.flipEnvMap.value = q0.isCubeTexture && q0.isRenderTargetTexture === !1 ? -1 : 1), g0.isMeshStandardMaterial && g0.envMap === null && u0.environment !== null && (un.envMapIntensity.value = u0.environmentIntensity), un.dfgLUT !== void 0 && (un.dfgLUT.value = getDFGLUT()), dn && (on.setValue(d0, "toneMappingExposure", Kt.toneMappingExposure), Fi.needsLights && h0(un, Sn), N0 && g0.fog === !0 && Oi.refreshFogUniforms(un, N0), Oi.refreshMaterialUniforms(un, g0, Q0, P0, It.state.transmissionRenderTarget[i0.id]), WebGLUniforms.upload(d0, Mn(Fi), un, M0)), g0.isShaderMaterial && g0.uniformsNeedUpdate === !0 && (WebGLUniforms.upload(d0, Mn(Fi), un, M0), g0.uniformsNeedUpdate = !1), g0.isSpriteMaterial && on.setValue(d0, "center", f0.center), on.setValue(d0, "modelViewMatrix", f0.modelViewMatrix), on.setValue(d0, "normalMatrix", f0.normalMatrix), on.setValue(d0, "modelMatrix", f0.matrixWorld), g0.isShaderMaterial || g0.isRawShaderMaterial) {
|
|
32937
32937
|
const mn = g0.uniformsGroups;
|
|
32938
|
-
for (let fn = 0,
|
|
32939
|
-
const
|
|
32940
|
-
Ri.update(
|
|
32938
|
+
for (let fn = 0, Hn = mn.length; fn < Hn; fn++) {
|
|
32939
|
+
const Xn = mn[fn];
|
|
32940
|
+
Ri.update(Xn, $i), Ri.bind(Xn, $i);
|
|
32941
32941
|
}
|
|
32942
32942
|
}
|
|
32943
32943
|
return $i;
|
|
@@ -33012,11 +33012,11 @@ class WebGLRenderer {
|
|
|
33012
33012
|
I0.bindFramebuffer(d0.FRAMEBUFFER, q0);
|
|
33013
33013
|
try {
|
|
33014
33014
|
const D0 = i0.textures[H0], yi = D0.format, Mi = D0.type;
|
|
33015
|
-
if (!
|
|
33015
|
+
if (!B0.textureFormatReadable(yi)) {
|
|
33016
33016
|
error$1("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
|
|
33017
33017
|
return;
|
|
33018
33018
|
}
|
|
33019
|
-
if (!
|
|
33019
|
+
if (!B0.textureTypeReadable(Mi)) {
|
|
33020
33020
|
error$1("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
33021
33021
|
return;
|
|
33022
33022
|
}
|
|
@@ -33027,7 +33027,7 @@ class WebGLRenderer {
|
|
|
33027
33027
|
}
|
|
33028
33028
|
}
|
|
33029
33029
|
}, this.readRenderTargetPixelsAsync = function(i0, u0, S0, g0, f0, N0, F0, H0 = 0) {
|
|
33030
|
-
return
|
|
33030
|
+
return U0(this, null, function* () {
|
|
33031
33031
|
if (!(i0 && i0.isWebGLRenderTarget))
|
|
33032
33032
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
|
|
33033
33033
|
let q0 = r0.get(i0).__webglFramebuffer;
|
|
@@ -33035,9 +33035,9 @@ class WebGLRenderer {
|
|
|
33035
33035
|
if (u0 >= 0 && u0 <= i0.width - g0 && S0 >= 0 && S0 <= i0.height - f0) {
|
|
33036
33036
|
I0.bindFramebuffer(d0.FRAMEBUFFER, q0);
|
|
33037
33037
|
const D0 = i0.textures[H0], yi = D0.format, Mi = D0.type;
|
|
33038
|
-
if (!
|
|
33038
|
+
if (!B0.textureFormatReadable(yi))
|
|
33039
33039
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");
|
|
33040
|
-
if (!
|
|
33040
|
+
if (!B0.textureTypeReadable(Mi))
|
|
33041
33041
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
33042
33042
|
const Ki = d0.createBuffer();
|
|
33043
33043
|
d0.bindBuffer(d0.PIXEL_PACK_BUFFER, Ki), d0.bufferData(d0.PIXEL_PACK_BUFFER, N0.byteLength, d0.STREAM_READ), i0.textures.length > 1 && d0.readBuffer(d0.COLOR_ATTACHMENT0 + H0), d0.readPixels(u0, S0, g0, f0, V0.convert(yi), V0.convert(Mi), 0);
|
|
@@ -33071,10 +33071,10 @@ class WebGLRenderer {
|
|
|
33071
33071
|
d0.pixelStorei(d0.UNPACK_ROW_LENGTH, ji.width), d0.pixelStorei(d0.UNPACK_IMAGE_HEIGHT, ji.height), d0.pixelStorei(d0.UNPACK_SKIP_PIXELS, D0), d0.pixelStorei(d0.UNPACK_SKIP_ROWS, yi), d0.pixelStorei(d0.UNPACK_SKIP_IMAGES, Mi);
|
|
33072
33072
|
const on = i0.isDataArrayTexture || i0.isData3DTexture, un = u0.isDataArrayTexture || u0.isData3DTexture;
|
|
33073
33073
|
if (i0.isDepthTexture) {
|
|
33074
|
-
const yn = r0.get(i0), mn = r0.get(u0), fn = r0.get(yn.__renderTarget),
|
|
33075
|
-
I0.bindFramebuffer(d0.READ_FRAMEBUFFER, fn.__webglFramebuffer), I0.bindFramebuffer(d0.DRAW_FRAMEBUFFER,
|
|
33076
|
-
for (let
|
|
33077
|
-
on && (d0.framebufferTextureLayer(d0.READ_FRAMEBUFFER, d0.COLOR_ATTACHMENT0, r0.get(i0).__webglTexture, f0, Mi +
|
|
33074
|
+
const yn = r0.get(i0), mn = r0.get(u0), fn = r0.get(yn.__renderTarget), Hn = r0.get(mn.__renderTarget);
|
|
33075
|
+
I0.bindFramebuffer(d0.READ_FRAMEBUFFER, fn.__webglFramebuffer), I0.bindFramebuffer(d0.DRAW_FRAMEBUFFER, Hn.__webglFramebuffer);
|
|
33076
|
+
for (let Xn = 0; Xn < q0; Xn++)
|
|
33077
|
+
on && (d0.framebufferTextureLayer(d0.READ_FRAMEBUFFER, d0.COLOR_ATTACHMENT0, r0.get(i0).__webglTexture, f0, Mi + Xn), d0.framebufferTextureLayer(d0.DRAW_FRAMEBUFFER, d0.COLOR_ATTACHMENT0, r0.get(u0).__webglTexture, N0, an + Xn)), d0.blitFramebuffer(D0, yi, F0, H0, Ki, Ji, F0, H0, d0.DEPTH_BUFFER_BIT, d0.NEAREST);
|
|
33078
33078
|
I0.bindFramebuffer(d0.READ_FRAMEBUFFER, null), I0.bindFramebuffer(d0.DRAW_FRAMEBUFFER, null);
|
|
33079
33079
|
} else if (f0 !== 0 || i0.isRenderTargetTexture || r0.has(i0)) {
|
|
33080
33080
|
const yn = r0.get(i0), mn = r0.get(u0);
|
|
@@ -34332,7 +34332,7 @@ function mean(v, e) {
|
|
|
34332
34332
|
}
|
|
34333
34333
|
function* flatten$1(v) {
|
|
34334
34334
|
for (const e of v)
|
|
34335
|
-
yield*
|
|
34335
|
+
yield* Bn(e);
|
|
34336
34336
|
}
|
|
34337
34337
|
function merge(v) {
|
|
34338
34338
|
return Array.from(flatten$1(v));
|
|
@@ -36526,7 +36526,7 @@ function geo_delaunay_from(v) {
|
|
|
36526
36526
|
const V = [];
|
|
36527
36527
|
let le = 1;
|
|
36528
36528
|
for (let ze = 0, Fe = v.length; ze < Fe; ze++) {
|
|
36529
|
-
let ke =
|
|
36529
|
+
let ke = Ln(v[ze][0], 2) + Ln(v[ze][1], 2);
|
|
36530
36530
|
!isFinite(ke) || ke > 1e32 ? V.push(ze) : ke > le && (le = ke);
|
|
36531
36531
|
}
|
|
36532
36532
|
const fe = 1e6 * sqrt$1(le);
|
|
@@ -39143,7 +39143,7 @@ function _populateBuffer(v, e) {
|
|
|
39143
39143
|
}
|
|
39144
39144
|
}
|
|
39145
39145
|
function generateIndirectBuffer(v, e) {
|
|
39146
|
-
const r = (v.index ? v.index.count : v.attributes.position.count) / 3, o = r >
|
|
39146
|
+
const r = (v.index ? v.index.count : v.attributes.position.count) / 3, o = r > Ln(2, 16), V = o ? 4 : 2, le = e ? new SharedArrayBuffer(r * V) : new ArrayBuffer(r * V), fe = o ? new Uint32Array(le) : new Uint16Array(le);
|
|
39147
39147
|
for (let Le = 0, Ce = fe.length; Le < Ce; Le++)
|
|
39148
39148
|
fe[Le] = Le;
|
|
39149
39149
|
return fe;
|
|
@@ -40641,21 +40641,21 @@ class RaySet {
|
|
|
40641
40641
|
}
|
|
40642
40642
|
}
|
|
40643
40643
|
}
|
|
40644
|
-
const _v0 = new Vector3(), _v1$1 = new Vector3(), _ray$
|
|
40644
|
+
const _v0 = new Vector3(), _v1$1 = new Vector3(), _ray$3 = new Ray();
|
|
40645
40645
|
function computeDisjointEdges(v, e, r) {
|
|
40646
40646
|
const o = v.attributes, V = v.index, le = o.position, fe = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ new Map(), Ce = Array.from(e), Re = new RaySet();
|
|
40647
40647
|
for (let Pe = 0, ze = Ce.length; Pe < ze; Pe++) {
|
|
40648
40648
|
const Fe = Ce[Pe], ke = toTriIndex(Fe), Gt = toEdgeIndex(Fe);
|
|
40649
40649
|
let Vt = 3 * ke + Gt, Zt = 3 * ke + (Gt + 1) % 3;
|
|
40650
|
-
V && (Vt = V.getX(Vt), Zt = V.getX(Zt)), _v0.fromBufferAttribute(le, Vt), _v1$1.fromBufferAttribute(le, Zt), toNormalizedRay(_v0, _v1$1, _ray$
|
|
40651
|
-
let xt, Xt = Re.findClosestRay(_ray$
|
|
40652
|
-
Xt === null && (Xt = _ray$
|
|
40650
|
+
V && (Vt = V.getX(Vt), Zt = V.getX(Zt)), _v0.fromBufferAttribute(le, Vt), _v1$1.fromBufferAttribute(le, Zt), toNormalizedRay(_v0, _v1$1, _ray$3);
|
|
40651
|
+
let xt, Xt = Re.findClosestRay(_ray$3);
|
|
40652
|
+
Xt === null && (Xt = _ray$3.clone(), Re.addRay(Xt)), Le.has(Xt) || Le.set(Xt, {
|
|
40653
40653
|
forward: [],
|
|
40654
40654
|
reverse: [],
|
|
40655
40655
|
ray: Xt
|
|
40656
40656
|
}), xt = Le.get(Xt);
|
|
40657
40657
|
let wt = getProjectedDistance(Xt, _v0), Wt = getProjectedDistance(Xt, _v1$1);
|
|
40658
|
-
wt > Wt && ([wt, Wt] = [Wt, wt]), _ray$
|
|
40658
|
+
wt > Wt && ([wt, Wt] = [Wt, wt]), _ray$3.direction.dot(Xt.direction) < 0 ? xt.reverse.push({ start: wt, end: Wt, index: Fe }) : xt.forward.push({ start: wt, end: Wt, index: Fe });
|
|
40659
40659
|
}
|
|
40660
40660
|
return Le.forEach(({ forward: Pe, reverse: ze }, Fe) => {
|
|
40661
40661
|
matchEdges(Pe, ze, fe, r), Pe.length === 0 && ze.length === 0 && Le.delete(Fe);
|
|
@@ -41033,27 +41033,27 @@ class IntersectionMap {
|
|
|
41033
41033
|
o[e] || (o[e] = [], V.push(e)), o[e].push(r);
|
|
41034
41034
|
}
|
|
41035
41035
|
}
|
|
41036
|
-
const ADDITION = 0, SUBTRACTION = 1, REVERSE_SUBTRACTION = 2, INTERSECTION = 3, DIFFERENCE = 4, HOLLOW_SUBTRACTION = 5, HOLLOW_INTERSECTION = 6, _ray$
|
|
41036
|
+
const ADDITION = 0, SUBTRACTION = 1, REVERSE_SUBTRACTION = 2, INTERSECTION = 3, DIFFERENCE = 4, HOLLOW_SUBTRACTION = 5, HOLLOW_INTERSECTION = 6, _ray$2 = new Ray(), _matrix$1 = new Matrix4(), _tri$1 = new Triangle(), _vec3 = new Vector3(), _vec4a = new Vector4(), _vec4b = new Vector4(), _vec4c = new Vector4(), _vec4_0 = new Vector4(), _vec4_1 = new Vector4(), _vec4_2 = new Vector4(), _edge = new Line3(), _normal = new Vector3(), JITTER_EPSILON = 1e-8, OFFSET_EPSILON = 1e-15, BACK_SIDE = -1, FRONT_SIDE = 1, COPLANAR_OPPOSITE = -2, COPLANAR_ALIGNED = 2, INVERT_TRI = 0, ADD_TRI = 1, SKIP_TRI = 2, FLOATING_COPLANAR_EPSILON = 1e-14;
|
|
41037
41037
|
let _debugContext = null;
|
|
41038
41038
|
function setDebugContext(v) {
|
|
41039
41039
|
_debugContext = v;
|
|
41040
41040
|
}
|
|
41041
41041
|
function getHitSide(v, e) {
|
|
41042
|
-
v.getMidpoint(_ray$
|
|
41043
|
-
const r = e.raycastFirst(_ray$
|
|
41044
|
-
return !!(r && _ray$
|
|
41042
|
+
v.getMidpoint(_ray$2.origin), v.getNormal(_ray$2.direction);
|
|
41043
|
+
const r = e.raycastFirst(_ray$2, DoubleSide);
|
|
41044
|
+
return !!(r && _ray$2.direction.dot(r.face.normal) > 0) ? BACK_SIDE : FRONT_SIDE;
|
|
41045
41045
|
}
|
|
41046
41046
|
function getHitSideWithCoplanarCheck(v, e) {
|
|
41047
41047
|
function r() {
|
|
41048
41048
|
return Math.random() - 0.5;
|
|
41049
41049
|
}
|
|
41050
|
-
v.getNormal(_normal), _ray$
|
|
41050
|
+
v.getNormal(_normal), _ray$2.direction.copy(_normal), v.getMidpoint(_ray$2.origin);
|
|
41051
41051
|
const o = 3;
|
|
41052
41052
|
let V = 0, le = 1 / 0;
|
|
41053
41053
|
for (let fe = 0; fe < o; fe++) {
|
|
41054
|
-
_ray$
|
|
41055
|
-
const Le = e.raycastFirst(_ray$
|
|
41056
|
-
if (!!(Le && _ray$
|
|
41054
|
+
_ray$2.direction.x += r() * JITTER_EPSILON, _ray$2.direction.y += r() * JITTER_EPSILON, _ray$2.direction.z += r() * JITTER_EPSILON, _ray$2.direction.multiplyScalar(-1);
|
|
41055
|
+
const Le = e.raycastFirst(_ray$2, DoubleSide);
|
|
41056
|
+
if (!!(Le && _ray$2.direction.dot(Le.face.normal) > 0) && V++, Le !== null && (le = Math.min(le, Le.distance)), le <= OFFSET_EPSILON)
|
|
41057
41057
|
return Le.face.normal.dot(_normal) > 0 ? COPLANAR_ALIGNED : COPLANAR_OPPOSITE;
|
|
41058
41058
|
if (V / o > 0.5 || (fe - V + 1) / o > 0.5)
|
|
41059
41059
|
break;
|
|
@@ -41486,8 +41486,8 @@ class RectAreaLightUniformsLib {
|
|
|
41486
41486
|
UniformsLib.LTC_FLOAT_1 = e, UniformsLib.LTC_FLOAT_2 = r, UniformsLib.LTC_HALF_1 = o, UniformsLib.LTC_HALF_2 = V;
|
|
41487
41487
|
}
|
|
41488
41488
|
}
|
|
41489
|
-
const _viewport = new Vector4(), _start = new Vector3(), _end = new Vector3(), _start4 = new Vector4(), _end4 = new Vector4(), _ssOrigin = new Vector4(), _ssOrigin3 = new Vector3(), _mvMatrix = new Matrix4(), _line = new Line3(), _closestPoint = new Vector3(), _box = new Box3(), _sphere = new Sphere$1(), _clipToWorldVector = new Vector4();
|
|
41490
|
-
let _ray, _lineWidth;
|
|
41489
|
+
const _viewport = new Vector4(), _start = new Vector3(), _end = new Vector3(), _start4 = new Vector4(), _end4 = new Vector4(), _ssOrigin = new Vector4(), _ssOrigin3 = new Vector3(), _mvMatrix = new Matrix4(), _line = new Line3(), _closestPoint = new Vector3(), _box = new Box3(), _sphere$1 = new Sphere$1(), _clipToWorldVector = new Vector4();
|
|
41490
|
+
let _ray$1, _lineWidth;
|
|
41491
41491
|
function getWorldSpaceHalfWidth(v, e, r) {
|
|
41492
41492
|
return _clipToWorldVector.set(0, 0, -e, 1).applyMatrix4(v.projectionMatrix), _clipToWorldVector.multiplyScalar(1 / _clipToWorldVector.w), _clipToWorldVector.x = _lineWidth / r.width, _clipToWorldVector.y = _lineWidth / r.height, _clipToWorldVector.applyMatrix4(v.projectionMatrixInverse), _clipToWorldVector.multiplyScalar(1 / _clipToWorldVector.w), Math.abs(Math.max(_clipToWorldVector.x, _clipToWorldVector.y));
|
|
41493
41493
|
}
|
|
@@ -41496,10 +41496,10 @@ function raycastWorldUnits(v, e) {
|
|
|
41496
41496
|
for (let Le = 0, Ce = fe; Le < Ce; Le++) {
|
|
41497
41497
|
_line.start.fromBufferAttribute(V, Le), _line.end.fromBufferAttribute(le, Le), _line.applyMatrix4(r);
|
|
41498
41498
|
const Re = new Vector3(), Pe = new Vector3();
|
|
41499
|
-
_ray.distanceSqToSegment(_line.start, _line.end, Pe, Re), Pe.distanceTo(Re) < _lineWidth * 0.5 && e.push({
|
|
41499
|
+
_ray$1.distanceSqToSegment(_line.start, _line.end, Pe, Re), Pe.distanceTo(Re) < _lineWidth * 0.5 && e.push({
|
|
41500
41500
|
point: Pe,
|
|
41501
41501
|
pointOnLine: Re,
|
|
41502
|
-
distance: _ray.origin.distanceTo(Pe),
|
|
41502
|
+
distance: _ray$1.origin.distanceTo(Pe),
|
|
41503
41503
|
object: v,
|
|
41504
41504
|
face: null,
|
|
41505
41505
|
faceIndex: Le,
|
|
@@ -41510,7 +41510,7 @@ function raycastWorldUnits(v, e) {
|
|
|
41510
41510
|
}
|
|
41511
41511
|
function raycastScreenSpace(v, e, r) {
|
|
41512
41512
|
const o = e.projectionMatrix, le = v.material.resolution, fe = v.matrixWorld, Le = v.geometry, Ce = Le.attributes.instanceStart, Re = Le.attributes.instanceEnd, Pe = Math.min(Le.instanceCount, Ce.count), ze = -e.near;
|
|
41513
|
-
_ray.at(1, _ssOrigin), _ssOrigin.w = 1, _ssOrigin.applyMatrix4(e.matrixWorldInverse), _ssOrigin.applyMatrix4(o), _ssOrigin.multiplyScalar(1 / _ssOrigin.w), _ssOrigin.x *= le.x / 2, _ssOrigin.y *= le.y / 2, _ssOrigin.z = 0, _ssOrigin3.copy(_ssOrigin), _mvMatrix.multiplyMatrices(e.matrixWorldInverse, fe);
|
|
41513
|
+
_ray$1.at(1, _ssOrigin), _ssOrigin.w = 1, _ssOrigin.applyMatrix4(e.matrixWorldInverse), _ssOrigin.applyMatrix4(o), _ssOrigin.multiplyScalar(1 / _ssOrigin.w), _ssOrigin.x *= le.x / 2, _ssOrigin.y *= le.y / 2, _ssOrigin.z = 0, _ssOrigin3.copy(_ssOrigin), _mvMatrix.multiplyMatrices(e.matrixWorldInverse, fe);
|
|
41514
41514
|
for (let Fe = 0, ke = Pe; Fe < ke; Fe++) {
|
|
41515
41515
|
if (_start4.fromBufferAttribute(Ce, Fe), _end4.fromBufferAttribute(Re, Fe), _start4.w = 1, _end4.w = 1, _start4.applyMatrix4(_mvMatrix), _end4.applyMatrix4(_mvMatrix), _start4.z > ze && _end4.z > ze)
|
|
41516
41516
|
continue;
|
|
@@ -41528,10 +41528,10 @@ function raycastScreenSpace(v, e, r) {
|
|
|
41528
41528
|
if (xt && Xt) {
|
|
41529
41529
|
_line.start.fromBufferAttribute(Ce, Fe), _line.end.fromBufferAttribute(Re, Fe), _line.start.applyMatrix4(fe), _line.end.applyMatrix4(fe);
|
|
41530
41530
|
const wt = new Vector3(), Wt = new Vector3();
|
|
41531
|
-
_ray.distanceSqToSegment(_line.start, _line.end, Wt, wt), r.push({
|
|
41531
|
+
_ray$1.distanceSqToSegment(_line.start, _line.end, Wt, wt), r.push({
|
|
41532
41532
|
point: Wt,
|
|
41533
41533
|
pointOnLine: wt,
|
|
41534
|
-
distance: _ray.origin.distanceTo(Wt),
|
|
41534
|
+
distance: _ray$1.origin.distanceTo(Wt),
|
|
41535
41535
|
object: v,
|
|
41536
41536
|
face: null,
|
|
41537
41537
|
faceIndex: Fe,
|
|
@@ -41575,27 +41575,27 @@ class LineSegments2 extends Mesh {
|
|
|
41575
41575
|
const o = this.material.worldUnits, V = e.camera;
|
|
41576
41576
|
V === null && !o && console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');
|
|
41577
41577
|
const le = e.params.Line2 !== void 0 && e.params.Line2.threshold || 0;
|
|
41578
|
-
_ray = e.ray;
|
|
41578
|
+
_ray$1 = e.ray;
|
|
41579
41579
|
const fe = this.matrixWorld, Le = this.geometry, Ce = this.material;
|
|
41580
|
-
_lineWidth = Ce.linewidth + le, Le.boundingSphere === null && Le.computeBoundingSphere(), _sphere.copy(Le.boundingSphere).applyMatrix4(fe);
|
|
41580
|
+
_lineWidth = Ce.linewidth + le, Le.boundingSphere === null && Le.computeBoundingSphere(), _sphere$1.copy(Le.boundingSphere).applyMatrix4(fe);
|
|
41581
41581
|
let Re;
|
|
41582
41582
|
if (o)
|
|
41583
41583
|
Re = _lineWidth * 0.5;
|
|
41584
41584
|
else {
|
|
41585
|
-
const ze = Math.max(V.near, _sphere.distanceToPoint(_ray.origin));
|
|
41585
|
+
const ze = Math.max(V.near, _sphere$1.distanceToPoint(_ray$1.origin));
|
|
41586
41586
|
Re = getWorldSpaceHalfWidth(V, ze, Ce.resolution);
|
|
41587
41587
|
}
|
|
41588
|
-
if (_sphere.radius += Re, _ray.intersectsSphere(_sphere) === !1)
|
|
41588
|
+
if (_sphere$1.radius += Re, _ray$1.intersectsSphere(_sphere$1) === !1)
|
|
41589
41589
|
return;
|
|
41590
41590
|
Le.boundingBox === null && Le.computeBoundingBox(), _box.copy(Le.boundingBox).applyMatrix4(fe);
|
|
41591
41591
|
let Pe;
|
|
41592
41592
|
if (o)
|
|
41593
41593
|
Pe = _lineWidth * 0.5;
|
|
41594
41594
|
else {
|
|
41595
|
-
const ze = Math.max(V.near, _box.distanceToPoint(_ray.origin));
|
|
41595
|
+
const ze = Math.max(V.near, _box.distanceToPoint(_ray$1.origin));
|
|
41596
41596
|
Pe = getWorldSpaceHalfWidth(V, ze, Ce.resolution);
|
|
41597
41597
|
}
|
|
41598
|
-
_box.expandByScalar(Pe), _ray.intersectsBox(_box) !== !1 && (o ? raycastWorldUnits(this, r) : raycastScreenSpace(this, V, r));
|
|
41598
|
+
_box.expandByScalar(Pe), _ray$1.intersectsBox(_box) !== !1 && (o ? raycastWorldUnits(this, r) : raycastScreenSpace(this, V, r));
|
|
41599
41599
|
}
|
|
41600
41600
|
onBeforeRender(e) {
|
|
41601
41601
|
const r = this.material.uniforms;
|
|
@@ -41782,7 +41782,7 @@ const Bt = {
|
|
|
41782
41782
|
QuadraticBezierCurve3,
|
|
41783
41783
|
SplineCurve
|
|
41784
41784
|
};
|
|
41785
|
-
let Q$1 = class
|
|
41785
|
+
let Q$1 = class On extends BufferGeometry {
|
|
41786
41786
|
/**
|
|
41787
41787
|
* Constructs a new extrude geometry.
|
|
41788
41788
|
*
|
|
@@ -41818,25 +41818,25 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
41818
41818
|
if (!ShapeUtils.isClockWise($t)) {
|
|
41819
41819
|
$t = $t.reverse();
|
|
41820
41820
|
for (let K0 = 0, E0 = qt.length; K0 < E0; K0++) {
|
|
41821
|
-
const
|
|
41822
|
-
ShapeUtils.isClockWise(
|
|
41821
|
+
const B0 = qt[K0];
|
|
41822
|
+
ShapeUtils.isClockWise(B0) && (qt[K0] = B0.reverse());
|
|
41823
41823
|
}
|
|
41824
41824
|
}
|
|
41825
41825
|
function e0(K0) {
|
|
41826
41826
|
const E0 = 10000000000000001e-36;
|
|
41827
|
-
let
|
|
41827
|
+
let B0 = K0[0];
|
|
41828
41828
|
for (let I0 = 1; I0 <= K0.length; I0++) {
|
|
41829
|
-
const c0 = I0 % K0.length, r0 = K0[c0], M0 = r0.x -
|
|
41829
|
+
const c0 = I0 % K0.length, r0 = K0[c0], M0 = r0.x - B0.x, T0 = r0.y - B0.y, k0 = M0 * M0 + T0 * T0, w0 = Math.max(
|
|
41830
41830
|
Math.abs(r0.x),
|
|
41831
41831
|
Math.abs(r0.y),
|
|
41832
|
-
Math.abs(
|
|
41833
|
-
Math.abs(
|
|
41832
|
+
Math.abs(B0.x),
|
|
41833
|
+
Math.abs(B0.y)
|
|
41834
41834
|
), Pi = E0 * w0 * w0;
|
|
41835
41835
|
if (k0 <= Pi) {
|
|
41836
41836
|
K0.splice(c0, 1), I0--;
|
|
41837
41837
|
continue;
|
|
41838
41838
|
}
|
|
41839
|
-
|
|
41839
|
+
B0 = r0;
|
|
41840
41840
|
}
|
|
41841
41841
|
}
|
|
41842
41842
|
e0($t), qt.forEach(e0);
|
|
@@ -41845,17 +41845,17 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
41845
41845
|
const E0 = qt[K0];
|
|
41846
41846
|
$t = $t.concat(E0);
|
|
41847
41847
|
}
|
|
41848
|
-
function m0(K0, E0,
|
|
41849
|
-
return E0 || error("ExtrudeGeometry: vec does not exist"), K0.clone().addScaledVector(E0,
|
|
41848
|
+
function m0(K0, E0, B0) {
|
|
41849
|
+
return E0 || error("ExtrudeGeometry: vec does not exist"), K0.clone().addScaledVector(E0, B0);
|
|
41850
41850
|
}
|
|
41851
41851
|
const P0 = $t.length;
|
|
41852
|
-
function Q0(K0, E0,
|
|
41852
|
+
function Q0(K0, E0, B0) {
|
|
41853
41853
|
let I0, c0, r0;
|
|
41854
|
-
const M0 = K0.x - E0.x, T0 = K0.y - E0.y, k0 =
|
|
41854
|
+
const M0 = K0.x - E0.x, T0 = K0.y - E0.y, k0 = B0.x - K0.x, w0 = B0.y - K0.y, Pi = M0 * M0 + T0 * T0, Ci = M0 * w0 - T0 * k0;
|
|
41855
41855
|
if (Math.abs(Ci) > Number.EPSILON) {
|
|
41856
41856
|
const Wi = Math.sqrt(Pi), Oi = Math.sqrt(
|
|
41857
41857
|
k0 * k0 + w0 * w0
|
|
41858
|
-
), Gi = E0.x - T0 / Wi, Zi = E0.y + M0 / Wi, zi =
|
|
41858
|
+
), Gi = E0.x - T0 / Wi, Zi = E0.y + M0 / Wi, zi = B0.x - w0 / Oi, Ui = B0.y + k0 / Oi, Ti = ((zi - Gi) * w0 - (Ui - Zi) * k0) / (M0 * w0 - T0 * k0);
|
|
41859
41859
|
I0 = Gi + M0 * Ti - K0.x, c0 = Zi + T0 * Ti - K0.y;
|
|
41860
41860
|
const Bi = I0 * I0 + c0 * c0;
|
|
41861
41861
|
if (Bi <= 2)
|
|
@@ -41868,15 +41868,15 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
41868
41868
|
return new Vector2(I0 / r0, c0 / r0);
|
|
41869
41869
|
}
|
|
41870
41870
|
const Si = [];
|
|
41871
|
-
for (let K0 = 0, E0 = b0.length,
|
|
41872
|
-
|
|
41871
|
+
for (let K0 = 0, E0 = b0.length, B0 = E0 - 1, I0 = K0 + 1; K0 < E0; K0++, B0++, I0++)
|
|
41872
|
+
B0 === E0 && (B0 = 0), I0 === E0 && (I0 = 0), Si[K0] = Q0(b0[K0], b0[B0], b0[I0]);
|
|
41873
41873
|
const Ni = [];
|
|
41874
41874
|
let G0, R0 = Si.concat();
|
|
41875
41875
|
for (let K0 = 0, E0 = o0; K0 < E0; K0++) {
|
|
41876
|
-
const
|
|
41876
|
+
const B0 = qt[K0];
|
|
41877
41877
|
G0 = [];
|
|
41878
|
-
for (let I0 = 0, c0 =
|
|
41879
|
-
r0 === c0 && (r0 = 0), M0 === c0 && (M0 = 0), G0[I0] = Q0(
|
|
41878
|
+
for (let I0 = 0, c0 = B0.length, r0 = c0 - 1, M0 = I0 + 1; I0 < c0; I0++, r0++, M0++)
|
|
41879
|
+
r0 === c0 && (r0 = 0), M0 === c0 && (M0 = 0), G0[I0] = Q0(B0[I0], B0[r0], B0[M0]);
|
|
41880
41880
|
Ni.push(G0), R0 = R0.concat(G0);
|
|
41881
41881
|
}
|
|
41882
41882
|
let O0;
|
|
@@ -41884,8 +41884,8 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
41884
41884
|
O0 = ShapeUtils.triangulateShape(b0, qt);
|
|
41885
41885
|
else {
|
|
41886
41886
|
const K0 = [], E0 = [];
|
|
41887
|
-
for (let
|
|
41888
|
-
const I0 =
|
|
41887
|
+
for (let B0 = 0; B0 < wt; B0++) {
|
|
41888
|
+
const I0 = B0 / wt, c0 = Zt * Math.cos(I0 * Math.PI / 2), r0 = xt * Math.sin(I0 * Math.PI / 2) + Xt;
|
|
41889
41889
|
for (let M0 = 0, T0 = b0.length; M0 < T0; M0++) {
|
|
41890
41890
|
const k0 = m0(b0[M0], Si[M0], r0);
|
|
41891
41891
|
A0(k0.x, k0.y, -c0), I0 === 0 && K0.push(k0);
|
|
@@ -41913,14 +41913,14 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
41913
41913
|
}
|
|
41914
41914
|
for (let K0 = 1; K0 <= ke; K0++)
|
|
41915
41915
|
for (let E0 = 0; E0 < P0; E0++) {
|
|
41916
|
-
const
|
|
41917
|
-
Yt ? (a0.copy(jt.normals[K0]).multiplyScalar(
|
|
41916
|
+
const B0 = Vt ? m0($t[E0], R0[E0], vi) : $t[E0];
|
|
41917
|
+
Yt ? (a0.copy(jt.normals[K0]).multiplyScalar(B0.x), n0.copy(jt.binormals[K0]).multiplyScalar(B0.y), l0.copy(Kt[K0]).add(a0).add(n0), A0(l0.x, l0.y, l0.z)) : A0(B0.x, B0.y, Gt / ke * K0);
|
|
41918
41918
|
}
|
|
41919
41919
|
for (let K0 = wt - 1; K0 >= 0; K0--) {
|
|
41920
|
-
const E0 = K0 / wt,
|
|
41920
|
+
const E0 = K0 / wt, B0 = Zt * Math.cos(E0 * Math.PI / 2), I0 = xt * Math.sin(E0 * Math.PI / 2) + Xt;
|
|
41921
41921
|
for (let c0 = 0, r0 = b0.length; c0 < r0; c0++) {
|
|
41922
41922
|
const M0 = m0(b0[c0], Si[c0], I0);
|
|
41923
|
-
A0(M0.x, M0.y, Gt +
|
|
41923
|
+
A0(M0.x, M0.y, Gt + B0);
|
|
41924
41924
|
}
|
|
41925
41925
|
for (let c0 = 0, r0 = qt.length; c0 < r0; c0++) {
|
|
41926
41926
|
const M0 = qt[c0];
|
|
@@ -41930,8 +41930,8 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
41930
41930
|
Yt ? A0(
|
|
41931
41931
|
w0.x,
|
|
41932
41932
|
w0.y + Kt[ke - 1].y,
|
|
41933
|
-
Kt[ke - 1].x +
|
|
41934
|
-
) : A0(w0.x, w0.y, Gt +
|
|
41933
|
+
Kt[ke - 1].x + B0
|
|
41934
|
+
) : A0(w0.x, w0.y, Gt + B0);
|
|
41935
41935
|
}
|
|
41936
41936
|
}
|
|
41937
41937
|
}
|
|
@@ -41939,30 +41939,30 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
41939
41939
|
function Hi() {
|
|
41940
41940
|
const K0 = V.length / 3;
|
|
41941
41941
|
if (Vt) {
|
|
41942
|
-
let E0 = 0,
|
|
41942
|
+
let E0 = 0, B0 = P0 * E0;
|
|
41943
41943
|
if (Ft)
|
|
41944
41944
|
for (let I0 = 0; I0 < Vi; I0++) {
|
|
41945
41945
|
const c0 = O0[I0];
|
|
41946
|
-
bi(c0[2] +
|
|
41946
|
+
bi(c0[2] + B0, c0[1] + B0, c0[0] + B0);
|
|
41947
41947
|
}
|
|
41948
|
-
if (E0 = ke + wt * 2,
|
|
41948
|
+
if (E0 = ke + wt * 2, B0 = P0 * E0, Nt)
|
|
41949
41949
|
for (let I0 = 0; I0 < Vi; I0++) {
|
|
41950
41950
|
const c0 = O0[I0];
|
|
41951
|
-
bi(c0[0] +
|
|
41951
|
+
bi(c0[0] + B0, c0[1] + B0, c0[2] + B0);
|
|
41952
41952
|
}
|
|
41953
41953
|
} else {
|
|
41954
41954
|
if (Ft)
|
|
41955
41955
|
for (let E0 = 0; E0 < Vi; E0++) {
|
|
41956
|
-
const
|
|
41957
|
-
bi(
|
|
41956
|
+
const B0 = O0[E0];
|
|
41957
|
+
bi(B0[2], B0[1], B0[0]);
|
|
41958
41958
|
}
|
|
41959
41959
|
if (Nt)
|
|
41960
41960
|
for (let E0 = 0; E0 < Vi; E0++) {
|
|
41961
|
-
const
|
|
41961
|
+
const B0 = O0[E0];
|
|
41962
41962
|
bi(
|
|
41963
|
-
|
|
41964
|
-
|
|
41965
|
-
|
|
41963
|
+
B0[0] + P0 * ke,
|
|
41964
|
+
B0[1] + P0 * ke,
|
|
41965
|
+
B0[2] + P0 * ke
|
|
41966
41966
|
);
|
|
41967
41967
|
}
|
|
41968
41968
|
}
|
|
@@ -41972,17 +41972,17 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
41972
41972
|
const K0 = V.length / 3;
|
|
41973
41973
|
let E0 = 0;
|
|
41974
41974
|
j0(b0, E0), E0 += b0.length;
|
|
41975
|
-
for (let
|
|
41976
|
-
const c0 = qt[
|
|
41975
|
+
for (let B0 = 0, I0 = qt.length; B0 < I0; B0++) {
|
|
41976
|
+
const c0 = qt[B0];
|
|
41977
41977
|
j0(c0, E0), E0 += c0.length;
|
|
41978
41978
|
}
|
|
41979
41979
|
o.addGroup(K0, V.length / 3 - K0, 1);
|
|
41980
41980
|
}
|
|
41981
41981
|
function j0(K0, E0) {
|
|
41982
|
-
let
|
|
41983
|
-
for (; --
|
|
41984
|
-
const I0 =
|
|
41985
|
-
let c0 =
|
|
41982
|
+
let B0 = K0.length;
|
|
41983
|
+
for (; --B0 >= 0; ) {
|
|
41984
|
+
const I0 = B0;
|
|
41985
|
+
let c0 = B0 - 1;
|
|
41986
41986
|
c0 < 0 && (c0 = K0.length - 1);
|
|
41987
41987
|
for (let r0 = 0, M0 = ke + wt * 2; r0 < M0; r0++) {
|
|
41988
41988
|
const T0 = P0 * r0, k0 = P0 * (r0 + 1), w0 = E0 + I0 + T0, Pi = E0 + c0 + T0, Ci = E0 + c0 + k0, Wi = E0 + I0 + k0;
|
|
@@ -41990,11 +41990,11 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
41990
41990
|
}
|
|
41991
41991
|
}
|
|
41992
41992
|
}
|
|
41993
|
-
function A0(K0, E0,
|
|
41994
|
-
ze.push(K0), ze.push(E0), ze.push(
|
|
41993
|
+
function A0(K0, E0, B0) {
|
|
41994
|
+
ze.push(K0), ze.push(E0), ze.push(B0);
|
|
41995
41995
|
}
|
|
41996
|
-
function bi(K0, E0,
|
|
41997
|
-
Li(K0), Li(E0), Li(
|
|
41996
|
+
function bi(K0, E0, B0) {
|
|
41997
|
+
Li(K0), Li(E0), Li(B0);
|
|
41998
41998
|
const I0 = V.length / 3, c0 = It.generateTopUV(
|
|
41999
41999
|
o,
|
|
42000
42000
|
V,
|
|
@@ -42004,8 +42004,8 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
42004
42004
|
);
|
|
42005
42005
|
d0(c0[0]), d0(c0[1]), d0(c0[2]);
|
|
42006
42006
|
}
|
|
42007
|
-
function $0(K0, E0,
|
|
42008
|
-
Li(K0), Li(E0), Li(I0), Li(E0), Li(
|
|
42007
|
+
function $0(K0, E0, B0, I0) {
|
|
42008
|
+
Li(K0), Li(E0), Li(I0), Li(E0), Li(B0), Li(I0);
|
|
42009
42009
|
const c0 = V.length / 3, r0 = It.generateSideWallUV(
|
|
42010
42010
|
o,
|
|
42011
42011
|
V,
|
|
@@ -42048,7 +42048,7 @@ let Q$1 = class Dn extends BufferGeometry {
|
|
|
42048
42048
|
const V = e.options.extrudePath;
|
|
42049
42049
|
return V !== void 0 && (e.options.extrudePath = new Bt[V.type]().fromJSON(
|
|
42050
42050
|
V
|
|
42051
|
-
)), new
|
|
42051
|
+
)), new On(o, e.options);
|
|
42052
42052
|
}
|
|
42053
42053
|
};
|
|
42054
42054
|
const Ut = {
|
|
@@ -42761,7 +42761,7 @@ class PanelVSync extends Panel {
|
|
|
42761
42761
|
this.canvas.style.transform = `translate(${e}px, ${r}px)`;
|
|
42762
42762
|
}
|
|
42763
42763
|
}
|
|
42764
|
-
const _Stats = class
|
|
42764
|
+
const _Stats = class Rn {
|
|
42765
42765
|
constructor({
|
|
42766
42766
|
trackGPU: e = !1,
|
|
42767
42767
|
trackCPT: r = !1,
|
|
@@ -42789,7 +42789,7 @@ const _Stats = class Zn {
|
|
|
42789
42789
|
this.resizePanel(this.fpsPanel), this.resizePanel(this.msPanel), this.gpuPanel && this.resizePanel(this.gpuPanel), this.gpuPanelCompute && this.resizePanel(this.gpuPanelCompute);
|
|
42790
42790
|
}, this.mode = ze, this.horizontal = Pe, this.minimal = Re, this.trackGPU = e, this.trackCPT = r, this.trackHz = o, this.samplesLog = fe, this.samplesGraph = Le, this.precision = Ce, this.logsPerSecond = V, this.graphsPerSecond = le;
|
|
42791
42791
|
const Fe = performance.now();
|
|
42792
|
-
this.prevGraphTime = Fe, this.dom = document.createElement("div"), this.initializeDOM(), this.beginTime = performance.now(), this.prevTextTime = this.beginTime, this.prevCpuTime = this.beginTime, this._panelId = 0, this.fpsPanel = this.addPanel(new
|
|
42792
|
+
this.prevGraphTime = Fe, this.dom = document.createElement("div"), this.initializeDOM(), this.beginTime = performance.now(), this.prevTextTime = this.beginTime, this.prevCpuTime = this.beginTime, this._panelId = 0, this.fpsPanel = this.addPanel(new Rn.Panel("FPS", "#0ff", "#002")), this.msPanel = this.addPanel(new Rn.Panel("CPU", "#0f0", "#020")), this.trackHz === !0 && (this.vsyncPanel = new PanelVSync("", "#f0f", "#202"), this.dom.appendChild(this.vsyncPanel.canvas), this.vsyncPanel.setOffset(56, 35)), this.setupEventListeners();
|
|
42793
42793
|
}
|
|
42794
42794
|
initializeDOM() {
|
|
42795
42795
|
this.dom.style.cssText = `
|
|
@@ -42805,7 +42805,7 @@ const _Stats = class Zn {
|
|
|
42805
42805
|
this.minimal ? (this.dom.addEventListener("click", this.handleClick), this.showPanel(this.mode)) : window.addEventListener("resize", this.handleResize);
|
|
42806
42806
|
}
|
|
42807
42807
|
init(e) {
|
|
42808
|
-
return
|
|
42808
|
+
return U0(this, null, function* () {
|
|
42809
42809
|
if (!e) {
|
|
42810
42810
|
console.error('Stats: The "canvas" parameter is undefined.');
|
|
42811
42811
|
return;
|
|
@@ -42822,12 +42822,12 @@ const _Stats = class Zn {
|
|
|
42822
42822
|
return e.isWebGLRenderer && !this.threeRendererPatched ? (this.patchThreeRenderer(e), this.gl = e.getContext(), this.trackGPU && this.initializeGPUTracking(), !0) : !1;
|
|
42823
42823
|
}
|
|
42824
42824
|
handleWebGPURenderer(e) {
|
|
42825
|
-
return
|
|
42825
|
+
return U0(this, null, function* () {
|
|
42826
42826
|
return e.isWebGPURenderer ? ((this.trackGPU || this.trackCPT) && (e.backend.trackTimestamp = !0, (yield e.hasFeatureAsync("timestamp-query")) && this.initializeWebGPUPanels()), this.info = e.info, this.patchThreeWebGPU(e), !0) : !1;
|
|
42827
42827
|
});
|
|
42828
42828
|
}
|
|
42829
42829
|
initializeWebGPUPanels() {
|
|
42830
|
-
this.trackGPU && (this.gpuPanel = this.addPanel(new
|
|
42830
|
+
this.trackGPU && (this.gpuPanel = this.addPanel(new Rn.Panel("GPU", "#ff0", "#220"))), this.trackCPT && (this.gpuPanelCompute = this.addPanel(new Rn.Panel("CPT", "#e1e1e1", "#212121")));
|
|
42831
42831
|
}
|
|
42832
42832
|
initializeWebGL(e) {
|
|
42833
42833
|
if (e instanceof WebGL2RenderingContext)
|
|
@@ -42842,7 +42842,7 @@ const _Stats = class Zn {
|
|
|
42842
42842
|
return !0;
|
|
42843
42843
|
}
|
|
42844
42844
|
initializeGPUTracking() {
|
|
42845
|
-
this.gl && (this.ext = this.gl.getExtension("EXT_disjoint_timer_query_webgl2"), this.ext && (this.gpuPanel = this.addPanel(new
|
|
42845
|
+
this.gl && (this.ext = this.gl.getExtension("EXT_disjoint_timer_query_webgl2"), this.ext && (this.gpuPanel = this.addPanel(new Rn.Panel("GPU", "#ff0", "#220"))));
|
|
42846
42846
|
}
|
|
42847
42847
|
begin() {
|
|
42848
42848
|
this.beginProfiling("cpu-started"), !(!this.gl || !this.ext) && (this.activeQuery && this.gl.endQuery(this.ext.TIME_ELAPSED_EXT), this.activeQuery = this.gl.createQuery(), this.activeQuery && this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT, this.activeQuery));
|
|
@@ -43554,15 +43554,15 @@ class SimplexNoise {
|
|
|
43554
43554
|
noise4d(e, r, o, V) {
|
|
43555
43555
|
const le = this.grad4, fe = this.simplex, Le = this.perm, Ce = (Math.sqrt(5) - 1) / 4, Re = (5 - Math.sqrt(5)) / 20;
|
|
43556
43556
|
let Pe, ze, Fe, ke, Gt;
|
|
43557
|
-
const Vt = (e + r + o + V) * Ce, Zt = Math.floor(e + Vt), xt = Math.floor(r + Vt), Xt = Math.floor(o + Vt), wt = Math.floor(V + Vt), Wt = (Zt + xt + Xt + wt) * Re, It = Zt - Wt, Nt = xt - Wt, Ft = Xt - Wt, Ht = wt - Wt, Kt = e - It, Yt = r - Nt, jt = o - Ft, n0 = V - Ht, a0 = Kt > Yt ? 32 : 0, l0 = Kt > jt ? 16 : 0, s0 = Yt > jt ? 8 : 0, $t = Kt > n0 ? 4 : 0, qt = Yt > n0 ? 2 : 0, e0 = jt > n0 ? 1 : 0, o0 = a0 + l0 + s0 + $t + qt + e0, b0 = fe[o0][0] >= 3 ? 1 : 0, m0 = fe[o0][1] >= 3 ? 1 : 0, P0 = fe[o0][2] >= 3 ? 1 : 0, Q0 = fe[o0][3] >= 3 ? 1 : 0, Si = fe[o0][0] >= 2 ? 1 : 0, Ni = fe[o0][1] >= 2 ? 1 : 0, G0 = fe[o0][2] >= 2 ? 1 : 0, R0 = fe[o0][3] >= 2 ? 1 : 0, O0 = fe[o0][0] >= 1 ? 1 : 0, Vi = fe[o0][1] >= 1 ? 1 : 0, vi = fe[o0][2] >= 1 ? 1 : 0, Hi = fe[o0][3] >= 1 ? 1 : 0, Yi = Kt - b0 + Re, j0 = Yt - m0 + Re, A0 = jt - P0 + Re, bi = n0 - Q0 + Re, $0 = Kt - Si + 2 * Re, Li = Yt - Ni + 2 * Re, d0 = jt - G0 + 2 * Re, K0 = n0 - R0 + 2 * Re, E0 = Kt - O0 + 3 * Re,
|
|
43557
|
+
const Vt = (e + r + o + V) * Ce, Zt = Math.floor(e + Vt), xt = Math.floor(r + Vt), Xt = Math.floor(o + Vt), wt = Math.floor(V + Vt), Wt = (Zt + xt + Xt + wt) * Re, It = Zt - Wt, Nt = xt - Wt, Ft = Xt - Wt, Ht = wt - Wt, Kt = e - It, Yt = r - Nt, jt = o - Ft, n0 = V - Ht, a0 = Kt > Yt ? 32 : 0, l0 = Kt > jt ? 16 : 0, s0 = Yt > jt ? 8 : 0, $t = Kt > n0 ? 4 : 0, qt = Yt > n0 ? 2 : 0, e0 = jt > n0 ? 1 : 0, o0 = a0 + l0 + s0 + $t + qt + e0, b0 = fe[o0][0] >= 3 ? 1 : 0, m0 = fe[o0][1] >= 3 ? 1 : 0, P0 = fe[o0][2] >= 3 ? 1 : 0, Q0 = fe[o0][3] >= 3 ? 1 : 0, Si = fe[o0][0] >= 2 ? 1 : 0, Ni = fe[o0][1] >= 2 ? 1 : 0, G0 = fe[o0][2] >= 2 ? 1 : 0, R0 = fe[o0][3] >= 2 ? 1 : 0, O0 = fe[o0][0] >= 1 ? 1 : 0, Vi = fe[o0][1] >= 1 ? 1 : 0, vi = fe[o0][2] >= 1 ? 1 : 0, Hi = fe[o0][3] >= 1 ? 1 : 0, Yi = Kt - b0 + Re, j0 = Yt - m0 + Re, A0 = jt - P0 + Re, bi = n0 - Q0 + Re, $0 = Kt - Si + 2 * Re, Li = Yt - Ni + 2 * Re, d0 = jt - G0 + 2 * Re, K0 = n0 - R0 + 2 * Re, E0 = Kt - O0 + 3 * Re, B0 = Yt - Vi + 3 * Re, I0 = jt - vi + 3 * Re, c0 = n0 - Hi + 3 * Re, r0 = Kt - 1 + 4 * Re, M0 = Yt - 1 + 4 * Re, T0 = jt - 1 + 4 * Re, k0 = n0 - 1 + 4 * Re, w0 = Zt & 255, Pi = xt & 255, Ci = Xt & 255, Wi = wt & 255, Oi = Le[w0 + Le[Pi + Le[Ci + Le[Wi]]]] % 32, Gi = Le[w0 + b0 + Le[Pi + m0 + Le[Ci + P0 + Le[Wi + Q0]]]] % 32, Zi = Le[w0 + Si + Le[Pi + Ni + Le[Ci + G0 + Le[Wi + R0]]]] % 32, zi = Le[w0 + O0 + Le[Pi + Vi + Le[Ci + vi + Le[Wi + Hi]]]] % 32, Ui = Le[w0 + 1 + Le[Pi + 1 + Le[Ci + 1 + Le[Wi + 1]]]] % 32;
|
|
43558
43558
|
let Ti = 0.6 - Kt * Kt - Yt * Yt - jt * jt - n0 * n0;
|
|
43559
43559
|
Ti < 0 ? Pe = 0 : (Ti *= Ti, Pe = Ti * Ti * this._dot4(le[Oi], Kt, Yt, jt, n0));
|
|
43560
43560
|
let Bi = 0.6 - Yi * Yi - j0 * j0 - A0 * A0 - bi * bi;
|
|
43561
43561
|
Bi < 0 ? ze = 0 : (Bi *= Bi, ze = Bi * Bi * this._dot4(le[Gi], Yi, j0, A0, bi));
|
|
43562
43562
|
let L0 = 0.6 - $0 * $0 - Li * Li - d0 * d0 - K0 * K0;
|
|
43563
43563
|
L0 < 0 ? Fe = 0 : (L0 *= L0, Fe = L0 * L0 * this._dot4(le[Zi], $0, Li, d0, K0));
|
|
43564
|
-
let Ii = 0.6 - E0 * E0 -
|
|
43565
|
-
Ii < 0 ? ke = 0 : (Ii *= Ii, ke = Ii * Ii * this._dot4(le[zi], E0,
|
|
43564
|
+
let Ii = 0.6 - E0 * E0 - B0 * B0 - I0 * I0 - c0 * c0;
|
|
43565
|
+
Ii < 0 ? ke = 0 : (Ii *= Ii, ke = Ii * Ii * this._dot4(le[zi], E0, B0, I0, c0));
|
|
43566
43566
|
let V0 = 0.6 - r0 * r0 - M0 * M0 - T0 * T0 - k0 * k0;
|
|
43567
43567
|
return V0 < 0 ? Gt = 0 : (V0 *= V0, Gt = V0 * V0 * this._dot4(le[Ui], r0, M0, T0, k0)), 27 * (Pe + ze + Fe + ke + Gt);
|
|
43568
43568
|
}
|
|
@@ -45341,7 +45341,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45341
45341
|
$i == N0 - 1 && (Qi = H0);
|
|
45342
45342
|
for (let ln = 0; ln < g0; ++ln)
|
|
45343
45343
|
Ki[ln].fill(0), Ki[ln][0] = J0[yi[ln]++], d0(D0, _0, Ki[ln]), K0(Ki[ln], Mi[ln]), E0(Mi[ln]);
|
|
45344
|
-
|
|
45344
|
+
B0(Mi);
|
|
45345
45345
|
for (let ln = 0; ln < g0; ++ln)
|
|
45346
45346
|
I0(Mi[ln], Ji[ln], $i * 64);
|
|
45347
45347
|
}
|
|
@@ -45421,7 +45421,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45421
45421
|
for (let F0 = 0; F0 < 8; ++F0)
|
|
45422
45422
|
S0[0] = _0 * t0[16 + F0], S0[1] = i0 * t0[16 + F0], S0[2] = _0 * t0[48 + F0], S0[3] = i0 * t0[48 + F0], g0[0] = v0 * t0[8 + F0] + J0 * t0[24 + F0] + wi * t0[40 + F0] + u0 * t0[56 + F0], g0[1] = J0 * t0[8 + F0] - u0 * t0[24 + F0] - v0 * t0[40 + F0] - wi * t0[56 + F0], g0[2] = wi * t0[8 + F0] - v0 * t0[24 + F0] + u0 * t0[40 + F0] + J0 * t0[56 + F0], g0[3] = u0 * t0[8 + F0] - wi * t0[24 + F0] + J0 * t0[40 + F0] - v0 * t0[56 + F0], f0[0] = h0 * (t0[F0] + t0[32 + F0]), f0[3] = h0 * (t0[F0] - t0[32 + F0]), f0[1] = S0[0] + S0[3], f0[2] = S0[1] - S0[2], N0[0] = f0[0] + f0[1], N0[1] = f0[3] + f0[2], N0[2] = f0[3] - f0[2], N0[3] = f0[0] - f0[1], t0[0 + F0] = N0[0] + g0[0], t0[8 + F0] = N0[1] + g0[1], t0[16 + F0] = N0[2] + g0[2], t0[24 + F0] = N0[3] + g0[3], t0[32 + F0] = N0[3] - g0[3], t0[40 + F0] = N0[2] - g0[2], t0[48 + F0] = N0[1] - g0[1], t0[56 + F0] = N0[0] - g0[0];
|
|
45423
45423
|
}
|
|
45424
|
-
function
|
|
45424
|
+
function B0(t0) {
|
|
45425
45425
|
for (let h0 = 0; h0 < 64; ++h0) {
|
|
45426
45426
|
const v0 = t0[0][h0], _0 = t0[1][h0], J0 = t0[2][h0];
|
|
45427
45427
|
t0[0][h0] = v0 + 1.5747 * J0, t0[1][h0] = v0 - 0.1873 * _0 - 0.4682 * J0, t0[2][h0] = v0 + 1.8556 * _0;
|
|
@@ -45523,7 +45523,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45523
45523
|
acCompression: Bi(h0, v0)
|
|
45524
45524
|
};
|
|
45525
45525
|
if (J0.version < 2)
|
|
45526
|
-
throw new Error("EXRLoader.parse: " +
|
|
45526
|
+
throw new Error("EXRLoader.parse: " + Mn.compression + " version " + J0.version + " is unsupported");
|
|
45527
45527
|
const wi = new Array();
|
|
45528
45528
|
let i0 = Ai(h0, v0) - 2;
|
|
45529
45529
|
for (; i0 > 0; ) {
|
|
@@ -45535,7 +45535,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45535
45535
|
compression: Mi
|
|
45536
45536
|
}), i0 -= D0.length + 3;
|
|
45537
45537
|
}
|
|
45538
|
-
const u0 =
|
|
45538
|
+
const u0 = Mn.channels, S0 = new Array(t0.inputChannels.length);
|
|
45539
45539
|
for (let D0 = 0; D0 < t0.inputChannels.length; ++D0) {
|
|
45540
45540
|
const yi = S0[D0] = {}, Mi = u0[D0];
|
|
45541
45541
|
yi.name = Mi.name, yi.compression = 0, yi.decoded = !1, yi.type = Mi.pixelType, yi.pLinear = Mi.pLinear, yi.width = t0.columns, yi.height = t0.lines;
|
|
@@ -45738,15 +45738,15 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45738
45738
|
roundingMode: _0[i0 >> 4]
|
|
45739
45739
|
};
|
|
45740
45740
|
}
|
|
45741
|
-
function
|
|
45741
|
+
function Kn(t0, h0) {
|
|
45742
45742
|
const v0 = L0(t0, h0), _0 = L0(t0, h0);
|
|
45743
45743
|
return [v0, _0];
|
|
45744
45744
|
}
|
|
45745
|
-
function
|
|
45745
|
+
function In(t0, h0) {
|
|
45746
45746
|
const v0 = L0(t0, h0), _0 = L0(t0, h0), J0 = L0(t0, h0);
|
|
45747
45747
|
return [v0, _0, J0];
|
|
45748
45748
|
}
|
|
45749
|
-
function
|
|
45749
|
+
function wn(t0, h0, v0, _0, J0) {
|
|
45750
45750
|
if (_0 === "string" || _0 === "stringvector" || _0 === "iccProfile")
|
|
45751
45751
|
return Wi(h0, v0, J0);
|
|
45752
45752
|
if (_0 === "chlist")
|
|
@@ -45766,9 +45766,9 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45766
45766
|
if (_0 === "float")
|
|
45767
45767
|
return L0(t0, v0);
|
|
45768
45768
|
if (_0 === "v2f")
|
|
45769
|
-
return
|
|
45769
|
+
return Kn(t0, v0);
|
|
45770
45770
|
if (_0 === "v3f")
|
|
45771
|
-
return
|
|
45771
|
+
return In(t0, v0);
|
|
45772
45772
|
if (_0 === "int")
|
|
45773
45773
|
return Zi(t0, v0);
|
|
45774
45774
|
if (_0 === "rational")
|
|
@@ -45779,25 +45779,25 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45779
45779
|
return v0.value += J0, "skipped";
|
|
45780
45780
|
v0.value += J0;
|
|
45781
45781
|
}
|
|
45782
|
-
function
|
|
45782
|
+
function kn(t0, h0) {
|
|
45783
45783
|
const v0 = Math.log2(t0);
|
|
45784
45784
|
return h0 == "ROUND_DOWN" ? Math.floor(v0) : Math.ceil(v0);
|
|
45785
45785
|
}
|
|
45786
|
-
function
|
|
45786
|
+
function Nn(t0, h0, v0) {
|
|
45787
45787
|
let _0 = 0;
|
|
45788
45788
|
switch (t0.levelMode) {
|
|
45789
45789
|
case "ONE_LEVEL":
|
|
45790
45790
|
_0 = 1;
|
|
45791
45791
|
break;
|
|
45792
45792
|
case "MIPMAP_LEVELS":
|
|
45793
|
-
_0 =
|
|
45793
|
+
_0 = kn(Math.max(h0, v0), t0.roundingMode) + 1;
|
|
45794
45794
|
break;
|
|
45795
45795
|
case "RIPMAP_LEVELS":
|
|
45796
45796
|
throw new Error("THREE.EXRLoader: RIPMAP_LEVELS tiles currently unsupported.");
|
|
45797
45797
|
}
|
|
45798
45798
|
return _0;
|
|
45799
45799
|
}
|
|
45800
|
-
function
|
|
45800
|
+
function Vn(t0, h0, v0, _0) {
|
|
45801
45801
|
const J0 = new Array(t0);
|
|
45802
45802
|
for (let wi = 0; wi < t0; wi++) {
|
|
45803
45803
|
const i0 = 1 << wi;
|
|
@@ -45808,7 +45808,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45808
45808
|
}
|
|
45809
45809
|
return J0;
|
|
45810
45810
|
}
|
|
45811
|
-
function
|
|
45811
|
+
function Gn() {
|
|
45812
45812
|
const t0 = this, h0 = t0.offset, v0 = { value: 0 };
|
|
45813
45813
|
for (let _0 = 0; _0 < t0.tileCount; _0++) {
|
|
45814
45814
|
const J0 = Zi(t0.viewer, h0), wi = Zi(t0.viewer, h0);
|
|
@@ -45820,7 +45820,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45820
45820
|
for (let N0 = 0; N0 < t0.lines; N0++) {
|
|
45821
45821
|
const F0 = N0 * t0.columns * t0.totalBytes;
|
|
45822
45822
|
for (let H0 = 0; H0 < t0.inputChannels.length; H0++) {
|
|
45823
|
-
const q0 =
|
|
45823
|
+
const q0 = Mn.channels[H0].name, D0 = t0.channelByteOffsets[q0] * t0.columns, yi = t0.decodeChannels[q0];
|
|
45824
45824
|
if (yi === void 0) continue;
|
|
45825
45825
|
v0.value = F0 + D0;
|
|
45826
45826
|
const Mi = (t0.height - (1 + u0 + N0)) * t0.outLineWidth;
|
|
@@ -45832,10 +45832,10 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45832
45832
|
}
|
|
45833
45833
|
}
|
|
45834
45834
|
}
|
|
45835
|
-
function
|
|
45835
|
+
function Pn() {
|
|
45836
45836
|
const t0 = this, h0 = t0.offset, v0 = { value: 0 };
|
|
45837
45837
|
for (let _0 = 0; _0 < t0.height / t0.blockHeight; _0++) {
|
|
45838
|
-
const J0 = Zi(t0.viewer, h0) -
|
|
45838
|
+
const J0 = Zi(t0.viewer, h0) - Mn.dataWindow.yMin;
|
|
45839
45839
|
t0.size = zi(t0.viewer, h0), t0.lines = J0 + t0.blockHeight > t0.height ? t0.height - J0 : t0.blockHeight;
|
|
45840
45840
|
const wi = t0.columns * t0.totalBytes, u0 = t0.size < t0.lines * wi ? t0.uncompress(t0) : r0(t0);
|
|
45841
45841
|
h0.value += t0.size;
|
|
@@ -45844,7 +45844,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45844
45844
|
if (f0 >= t0.height) continue;
|
|
45845
45845
|
const N0 = S0 * wi, F0 = (t0.height - 1 - f0) * t0.outLineWidth;
|
|
45846
45846
|
for (let H0 = 0; H0 < t0.inputChannels.length; H0++) {
|
|
45847
|
-
const q0 =
|
|
45847
|
+
const q0 = Mn.channels[H0].name, D0 = t0.channelByteOffsets[q0] * t0.columns, yi = t0.decodeChannels[q0];
|
|
45848
45848
|
if (yi !== void 0) {
|
|
45849
45849
|
v0.value = N0 + D0;
|
|
45850
45850
|
for (let Mi = 0; Mi < t0.columns; Mi++) {
|
|
@@ -45856,7 +45856,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45856
45856
|
}
|
|
45857
45857
|
}
|
|
45858
45858
|
}
|
|
45859
|
-
function
|
|
45859
|
+
function zn(t0, h0, v0) {
|
|
45860
45860
|
const _0 = {};
|
|
45861
45861
|
if (t0.getUint32(0, !0) != 20000630)
|
|
45862
45862
|
throw new Error("THREE.EXRLoader: Provided file doesn't appear to be in OpenEXR format.");
|
|
@@ -45874,7 +45874,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45874
45874
|
if (i0 === "")
|
|
45875
45875
|
wi = !1;
|
|
45876
45876
|
else {
|
|
45877
|
-
const u0 = Ci(h0, v0), S0 = zi(t0, v0), g0 =
|
|
45877
|
+
const u0 = Ci(h0, v0), S0 = zi(t0, v0), g0 = wn(t0, h0, v0, u0, S0);
|
|
45878
45878
|
g0 === void 0 ? console.warn(`THREE.EXRLoader: Skipped unknown header attribute type '${u0}'.`) : _0[i0] = g0;
|
|
45879
45879
|
}
|
|
45880
45880
|
}
|
|
@@ -45882,7 +45882,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45882
45882
|
throw console.error("THREE.EXRHeader:", _0), new Error("THREE.EXRLoader: Provided file is currently unsupported.");
|
|
45883
45883
|
return _0;
|
|
45884
45884
|
}
|
|
45885
|
-
function
|
|
45885
|
+
function Fn(t0, h0, v0, _0, J0, wi) {
|
|
45886
45886
|
const i0 = {
|
|
45887
45887
|
size: 0,
|
|
45888
45888
|
viewer: h0,
|
|
@@ -45996,23 +45996,23 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45996
45996
|
i0.decodeChannels[F0.name] !== void 0 && (i0.channelByteOffsets[F0.name] = N0), N0 += F0.pixelType * 2;
|
|
45997
45997
|
if (i0.totalBytes = N0, i0.outLineWidth = i0.width * i0.outputChannels, t0.lineOrder === "INCREASING_Y" ? i0.scanOrder = (F0) => F0 : i0.scanOrder = (F0) => i0.height - 1 - F0, t0.spec.singleTile) {
|
|
45998
45998
|
i0.blockHeight = t0.tiles.ySize, i0.blockWidth = t0.tiles.xSize;
|
|
45999
|
-
const F0 =
|
|
45999
|
+
const F0 = Nn(t0.tiles, i0.width, i0.height), H0 = Vn(F0, i0.width, t0.tiles.xSize, t0.tiles.roundingMode), q0 = Vn(F0, i0.height, t0.tiles.ySize, t0.tiles.roundingMode);
|
|
46000
46000
|
i0.tileCount = H0[0] * q0[0];
|
|
46001
46001
|
for (let D0 = 0; D0 < F0; D0++)
|
|
46002
46002
|
for (let yi = 0; yi < q0[D0]; yi++)
|
|
46003
46003
|
for (let Mi = 0; Mi < H0[D0]; Mi++)
|
|
46004
46004
|
Bi(h0, _0);
|
|
46005
|
-
i0.decode =
|
|
46005
|
+
i0.decode = Gn.bind(i0);
|
|
46006
46006
|
} else {
|
|
46007
46007
|
i0.blockWidth = i0.width;
|
|
46008
46008
|
const F0 = Math.ceil(i0.height / i0.blockHeight);
|
|
46009
46009
|
for (let H0 = 0; H0 < F0; H0++)
|
|
46010
46010
|
Bi(h0, _0);
|
|
46011
|
-
i0.decode =
|
|
46011
|
+
i0.decode = Pn.bind(i0);
|
|
46012
46012
|
}
|
|
46013
46013
|
return i0;
|
|
46014
46014
|
}
|
|
46015
|
-
const
|
|
46015
|
+
const Tn = { value: 0 }, Wn = new DataView(e), _n = new Uint8Array(e), Mn = zn(Wn, e, Tn), xn = Fn(Mn, Wn, _n, Tn, this.type, this.outputFormat);
|
|
46016
46016
|
if (xn.decode(), xn.shouldExpand) {
|
|
46017
46017
|
const t0 = xn.byteArray;
|
|
46018
46018
|
if (this.outputFormat == RGBAFormat)
|
|
@@ -46023,7 +46023,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
46023
46023
|
t0[h0 + 1] = t0[h0];
|
|
46024
46024
|
}
|
|
46025
46025
|
return {
|
|
46026
|
-
header:
|
|
46026
|
+
header: Mn,
|
|
46027
46027
|
width: xn.width,
|
|
46028
46028
|
height: xn.height,
|
|
46029
46029
|
data: xn.byteArray,
|
|
@@ -50415,8 +50415,8 @@ if (typeof document != "undefined") {
|
|
|
50415
50415
|
var j0 = this.props;
|
|
50416
50416
|
if (qt === 1 && e0 === 0 && o0 === 0 && b0 === 0 && m0 === 0 && P0 === 1 && Q0 === 0 && Si === 0 && Ni === 0 && G0 === 0 && R0 === 1 && O0 === 0)
|
|
50417
50417
|
return j0[12] = j0[12] * qt + j0[15] * Vi, j0[13] = j0[13] * P0 + j0[15] * vi, j0[14] = j0[14] * R0 + j0[15] * Hi, j0[15] *= Yi, this._identityCalculated = !1, this;
|
|
50418
|
-
var A0 = j0[0], bi = j0[1], $0 = j0[2], Li = j0[3], d0 = j0[4], K0 = j0[5], E0 = j0[6],
|
|
50419
|
-
return j0[0] = A0 * qt + bi * m0 + $0 * Ni + Li * Vi, j0[1] = A0 * e0 + bi * P0 + $0 * G0 + Li * vi, j0[2] = A0 * o0 + bi * Q0 + $0 * R0 + Li * Hi, j0[3] = A0 * b0 + bi * Si + $0 * O0 + Li * Yi, j0[4] = d0 * qt + K0 * m0 + E0 * Ni +
|
|
50418
|
+
var A0 = j0[0], bi = j0[1], $0 = j0[2], Li = j0[3], d0 = j0[4], K0 = j0[5], E0 = j0[6], B0 = j0[7], I0 = j0[8], c0 = j0[9], r0 = j0[10], M0 = j0[11], T0 = j0[12], k0 = j0[13], w0 = j0[14], Pi = j0[15];
|
|
50419
|
+
return j0[0] = A0 * qt + bi * m0 + $0 * Ni + Li * Vi, j0[1] = A0 * e0 + bi * P0 + $0 * G0 + Li * vi, j0[2] = A0 * o0 + bi * Q0 + $0 * R0 + Li * Hi, j0[3] = A0 * b0 + bi * Si + $0 * O0 + Li * Yi, j0[4] = d0 * qt + K0 * m0 + E0 * Ni + B0 * Vi, j0[5] = d0 * e0 + K0 * P0 + E0 * G0 + B0 * vi, j0[6] = d0 * o0 + K0 * Q0 + E0 * R0 + B0 * Hi, j0[7] = d0 * b0 + K0 * Si + E0 * O0 + B0 * Yi, j0[8] = I0 * qt + c0 * m0 + r0 * Ni + M0 * Vi, j0[9] = I0 * e0 + c0 * P0 + r0 * G0 + M0 * vi, j0[10] = I0 * o0 + c0 * Q0 + r0 * R0 + M0 * Hi, j0[11] = I0 * b0 + c0 * Si + r0 * O0 + M0 * Yi, j0[12] = T0 * qt + k0 * m0 + w0 * Ni + Pi * Vi, j0[13] = T0 * e0 + k0 * P0 + w0 * G0 + Pi * vi, j0[14] = T0 * o0 + k0 * Q0 + w0 * R0 + Pi * Hi, j0[15] = T0 * b0 + k0 * Si + w0 * O0 + Pi * Yi, this._identityCalculated = !1, this;
|
|
50420
50420
|
}
|
|
50421
50421
|
function Zt() {
|
|
50422
50422
|
return this._identityCalculated || (this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1), this._identityCalculated = !0), this._identity;
|
|
@@ -50515,7 +50515,7 @@ if (typeof document != "undefined") {
|
|
|
50515
50515
|
lottie.play = animationManager.play, lottie.pause = animationManager.pause, lottie.setLocationHref = setLocation, lottie.togglePause = animationManager.togglePause, lottie.setSpeed = animationManager.setSpeed, lottie.setDirection = animationManager.setDirection, lottie.stop = animationManager.stop, lottie.searchAnimations = searchAnimations, lottie.registerAnimation = animationManager.registerAnimation, lottie.loadAnimation = loadAnimation, lottie.setSubframeRendering = setSubframeRendering, lottie.resize = animationManager.resize, lottie.goToAndStop = animationManager.goToAndStop, lottie.destroy = animationManager.destroy, lottie.setQuality = setQuality, lottie.inBrowser = inBrowser, lottie.installPlugin = installPlugin, lottie.freeze = animationManager.freeze, lottie.unfreeze = animationManager.unfreeze, lottie.setVolume = animationManager.setVolume, lottie.mute = animationManager.mute, lottie.unmute = animationManager.unmute, lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations, lottie.useWebWorker = setWebWorker, lottie.setIDPrefix = setPrefix, lottie.__getFactory = getFactory, lottie.version = "[[BM_VERSION]]";
|
|
50516
50516
|
var queryString = "";
|
|
50517
50517
|
if (standalone) {
|
|
50518
|
-
var scripts = document.getElementsByTagName("script"), index$
|
|
50518
|
+
var scripts = document.getElementsByTagName("script"), index$1 = scripts.length - 1, myScript = scripts[index$1] || {
|
|
50519
50519
|
src: ""
|
|
50520
50520
|
};
|
|
50521
50521
|
queryString = myScript.src ? myScript.src.replace(/^[^\?]+\??/, "") : "", renderer = getQueryVariable("renderer");
|
|
@@ -52798,19 +52798,19 @@ if (typeof document != "undefined") {
|
|
|
52798
52798
|
o0 = o.length;
|
|
52799
52799
|
var m0, P0 = -1, Q0, Si, Ni, G0 = Gt, R0 = wt, O0 = Xt, Vi = -1, vi, Hi, Yi, j0, A0, bi, $0, Li, d0 = "", K0 = this.defaultPropsArray, E0;
|
|
52800
52800
|
if (v.j === 2 || v.j === 1) {
|
|
52801
|
-
var
|
|
52801
|
+
var B0 = 0, I0 = 0, c0 = v.j === 2 ? -0.5 : -1, r0 = 0, M0 = !0;
|
|
52802
52802
|
for (Pe = 0; Pe < ze; Pe += 1)
|
|
52803
52803
|
if (Fe[Pe].n) {
|
|
52804
|
-
for (
|
|
52805
|
-
Fe[r0].animatorJustifyOffset =
|
|
52806
|
-
|
|
52804
|
+
for (B0 && (B0 += I0); r0 < Pe; )
|
|
52805
|
+
Fe[r0].animatorJustifyOffset = B0, r0 += 1;
|
|
52806
|
+
B0 = 0, M0 = !0;
|
|
52807
52807
|
} else {
|
|
52808
52808
|
for (e0 = 0; e0 < o0; e0 += 1)
|
|
52809
|
-
$t = o[e0].a, $t.t.propType && (M0 && v.j === 2 && (I0 += $t.t.v * c0), qt = o[e0].s, m0 = qt.getMult(Fe[Pe].anIndexes[e0], V.a[e0].s.totalChars), m0.length ?
|
|
52809
|
+
$t = o[e0].a, $t.t.propType && (M0 && v.j === 2 && (I0 += $t.t.v * c0), qt = o[e0].s, m0 = qt.getMult(Fe[Pe].anIndexes[e0], V.a[e0].s.totalChars), m0.length ? B0 += $t.t.v * m0[0] * c0 : B0 += $t.t.v * m0 * c0);
|
|
52810
52810
|
M0 = !1;
|
|
52811
52811
|
}
|
|
52812
|
-
for (
|
|
52813
|
-
Fe[r0].animatorJustifyOffset =
|
|
52812
|
+
for (B0 && (B0 += I0); r0 < Pe; )
|
|
52813
|
+
Fe[r0].animatorJustifyOffset = B0, r0 += 1;
|
|
52814
52814
|
}
|
|
52815
52815
|
for (Pe = 0; Pe < ze; Pe += 1) {
|
|
52816
52816
|
if (le.reset(), vi = 1, Fe[Pe].n)
|
|
@@ -58389,10 +58389,10 @@ class _i {
|
|
|
58389
58389
|
this.setSize(1, 1), (e = this.renderer) == null || e.clear(), (r = this.renderer) == null || r.dispose();
|
|
58390
58390
|
}
|
|
58391
58391
|
}
|
|
58392
|
-
const _e = class
|
|
58392
|
+
const _e = class Jn {
|
|
58393
58393
|
constructor(e) {
|
|
58394
58394
|
var r, o;
|
|
58395
|
-
this.raycaster = new Raycaster(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new Vector3(), this._cameraTarget = new Vector3(), this.event = new ye.EventEmitter(), this.timer = new Timer(), this.userData = {}, this.pageActiveIndex = 0, this.pages = new Et(), this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this._isDispose = !1, this.event.setMaxListeners(1 / 0), (o = (r = this.timer).connect) == null || o.call(r, document), this.options = Rt(
|
|
58395
|
+
this.raycaster = new Raycaster(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new Vector3(), this._cameraTarget = new Vector3(), this.event = new ye.EventEmitter(), this.timer = new Timer(), this.userData = {}, this.pageActiveIndex = 0, this.pages = new Et(), this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this._isDispose = !1, this.event.setMaxListeners(1 / 0), (o = (r = this.timer).connect) == null || o.call(r, document), this.options = Rt(Jn.options, e, {
|
|
58396
58396
|
isMergeableObject: y
|
|
58397
58397
|
}), this.userSetDprCache = this.options.renderer.devicePixelRatio;
|
|
58398
58398
|
const {
|
|
@@ -58748,7 +58748,7 @@ class Point extends Z$1 {
|
|
|
58748
58748
|
});
|
|
58749
58749
|
}
|
|
58750
58750
|
create() {
|
|
58751
|
-
return
|
|
58751
|
+
return U0(this, null, function* () {
|
|
58752
58752
|
const { sprite: r } = this.options, o = this.getMaterial();
|
|
58753
58753
|
r ? this.createSprite(o) : this.createMesh(new PlaneGeometry(1, 1), o), this.setScale(1), this.object3d.scale.multiplyScalar(0.1);
|
|
58754
58754
|
});
|
|
@@ -58786,7 +58786,7 @@ const l = {
|
|
|
58786
58786
|
let V = v.clone().add(e);
|
|
58787
58787
|
V = V.normalize().multiplyScalar(r);
|
|
58788
58788
|
let le;
|
|
58789
|
-
o <= 1 ? le = r / 5 * o : o > 1 && o < 2 ? le = r / 5 *
|
|
58789
|
+
o <= 1 ? le = r / 5 * o : o > 1 && o < 2 ? le = r / 5 * Ln(o, 2) : le = r / 5 * Ln(o, 1.5);
|
|
58790
58790
|
const fe = v.clone().add(V).normalize().multiplyScalar(r + le), Le = e.clone().add(V).normalize().multiplyScalar(r + le);
|
|
58791
58791
|
return new CubicBezierCurve3(v, fe, Le, e);
|
|
58792
58792
|
}, createFlyPath2 = (v, e, r = 40) => {
|
|
@@ -58823,7 +58823,7 @@ class Arc extends Z$1 {
|
|
|
58823
58823
|
};
|
|
58824
58824
|
}
|
|
58825
58825
|
create() {
|
|
58826
|
-
return
|
|
58826
|
+
return U0(this, null, function* () {
|
|
58827
58827
|
map || (map = getLineTexture(0.5));
|
|
58828
58828
|
const { color: r, lineWidth: o, globe: V } = this.options;
|
|
58829
58829
|
let { radius: le } = this.options;
|
|
@@ -58851,7 +58851,7 @@ class Arc extends Z$1 {
|
|
|
58851
58851
|
{ key: "Arc_第一控制点", position: Ce.v1 },
|
|
58852
58852
|
{ key: "Arc_第二控制点", position: Ce.v2 },
|
|
58853
58853
|
{ key: "Arc_终点", position: Ce.v3 }
|
|
58854
|
-
].map((Xt) =>
|
|
58854
|
+
].map((Xt) => U0(this, [Xt], function* ({ key: Zt, position: xt }) {
|
|
58855
58855
|
const wt = yield Pe.draw(
|
|
58856
58856
|
"Group",
|
|
58857
58857
|
{
|
|
@@ -58873,11 +58873,11 @@ class Arc extends Z$1 {
|
|
|
58873
58873
|
});
|
|
58874
58874
|
}
|
|
58875
58875
|
instantiate() {
|
|
58876
|
-
return
|
|
58876
|
+
return U0(this, arguments, function* (r = {}) {
|
|
58877
58877
|
this.update();
|
|
58878
58878
|
const o = yield this.line.instantiate(qi(gi({}, r), {
|
|
58879
58879
|
recursive: !!this.pencil.userData.EditorEnv
|
|
58880
|
-
})), V = yield
|
|
58880
|
+
})), V = yield Zn(Arc.prototype, this, "instantiate").call(this, qi(gi({}, r), {
|
|
58881
58881
|
recursive: !1,
|
|
58882
58882
|
create: (le) => {
|
|
58883
58883
|
le.line = o, le.object3d = o.object3d, le.children.length && (le.children.forEach((fe) => {
|
|
@@ -58897,7 +58897,7 @@ class Arc extends Z$1 {
|
|
|
58897
58897
|
this.line.options.nodes = Ce, this.line.setGeometry(Ce, le), this.pickTube && this.addPickTarget(this.pickTube.options.radius);
|
|
58898
58898
|
}
|
|
58899
58899
|
addPickTarget(r = 1, o = !1) {
|
|
58900
|
-
return
|
|
58900
|
+
return U0(this, null, function* () {
|
|
58901
58901
|
const V = this.pickTube, le = this.pencil.lead, fe = this.line.options.nodes, Le = new CurvePath();
|
|
58902
58902
|
for (let Pe = 0; Pe < fe.length - 1; Pe++)
|
|
58903
58903
|
Le.add(new LineCurve3(fe[Pe], fe[Pe + 1]));
|
|
@@ -58976,7 +58976,7 @@ class CrossPlane extends Z$1 {
|
|
|
58976
58976
|
this.options = gi({}, r);
|
|
58977
58977
|
}
|
|
58978
58978
|
create() {
|
|
58979
|
-
return
|
|
58979
|
+
return U0(this, null, function* () {
|
|
58980
58980
|
this.createGroup();
|
|
58981
58981
|
const r = this.options.material || new MeshBasicMaterial({
|
|
58982
58982
|
color: "#ffffff",
|
|
@@ -59011,7 +59011,7 @@ class CrossPlane extends Z$1 {
|
|
|
59011
59011
|
}
|
|
59012
59012
|
class PlaneShadow extends Z$1 {
|
|
59013
59013
|
create() {
|
|
59014
|
-
return
|
|
59014
|
+
return U0(this, null, function* () {
|
|
59015
59015
|
const e = new PlaneGeometry(100, 100, 2, 2), r = new ShadowMaterial();
|
|
59016
59016
|
r.opacity = 0.5, r.depthWrite = !1, this.createMesh(e, r), this.object3d.receiveShadow = !0, this.position.z = 0.1, this.object3d.name = "阴影接受";
|
|
59017
59017
|
});
|
|
@@ -59031,7 +59031,7 @@ class Model extends Z$1 {
|
|
|
59031
59031
|
}, r);
|
|
59032
59032
|
}
|
|
59033
59033
|
create() {
|
|
59034
|
-
return
|
|
59034
|
+
return U0(this, null, function* () {
|
|
59035
59035
|
const r = new GLTFLoader(), o = this.options.src, V = yield r.loadAsync(o);
|
|
59036
59036
|
this.object3d = V.scene;
|
|
59037
59037
|
const le = V.animations || [];
|
|
@@ -139050,7 +139050,7 @@ class SetValue extends Command {
|
|
|
139050
139050
|
this.oldValue = fe !== void 0 ? fe[o] : void 0, this.newValue = V;
|
|
139051
139051
|
}
|
|
139052
139052
|
execute() {
|
|
139053
|
-
return
|
|
139053
|
+
return U0(this, null, function* () {
|
|
139054
139054
|
const e = this.properties ? this.object[this.properties] : this.object;
|
|
139055
139055
|
if (e && !((e instanceof RectAreaLight || e instanceof AmbientLight) && this.attributeName === "castShadow")) {
|
|
139056
139056
|
if (this.attributeName === "keepCamera" && Array.isArray(this.newValue)) {
|
|
@@ -139092,7 +139092,7 @@ class SetValue extends Command {
|
|
|
139092
139092
|
(this.attributeName === "name" || this.attributeName === "prefab" || this.attributeName === "visible" || this.attributeName === "keepCamera" || this.attributeName === "castShadow" && this.object instanceof DirectionalLight) && this.editor.emit("baseObjectListChange"), this.attributeName === "keepCamera" && (this.editor.select(null), this.editor.emit("baseObjectListChange"));
|
|
139093
139093
|
}
|
|
139094
139094
|
undo() {
|
|
139095
|
-
return
|
|
139095
|
+
return U0(this, null, function* () {
|
|
139096
139096
|
const e = this.properties ? this.object[this.properties] : this.object;
|
|
139097
139097
|
if (this.attributeName === "keepCamera" && Array.isArray(this.oldValue)) {
|
|
139098
139098
|
const [r, o, V, le, ...fe] = this.oldValue;
|
|
@@ -139167,7 +139167,7 @@ class AddVis extends Command {
|
|
|
139167
139167
|
this.type = "AddVis", this.visType = o, this.visOptions = V, o !== void 0 && (this.name = `Add Vis: ${o}`);
|
|
139168
139168
|
}
|
|
139169
139169
|
execute() {
|
|
139170
|
-
return
|
|
139170
|
+
return U0(this, null, function* () {
|
|
139171
139171
|
yield this.editor.viewport.setVis(this.visType, this.visOptions), this.editor.select(null);
|
|
139172
139172
|
});
|
|
139173
139173
|
}
|
|
@@ -139193,7 +139193,7 @@ class AddObject extends Command {
|
|
|
139193
139193
|
this.type = "AddObject", this.objectType = o, this.objectOptions = V, o !== void 0 && (this.name = `Add Object: ${o}`);
|
|
139194
139194
|
}
|
|
139195
139195
|
execute() {
|
|
139196
|
-
return
|
|
139196
|
+
return U0(this, null, function* () {
|
|
139197
139197
|
var o;
|
|
139198
139198
|
const r = this.editor.viewport.vis;
|
|
139199
139199
|
this.obj = yield r.lead.draw(this.objectType, qi(gi({}, this.objectOptions), {
|
|
@@ -139229,7 +139229,7 @@ class RemoveObject extends Command {
|
|
|
139229
139229
|
}), this.object.objectType === "Model" && this.object.stopAllClips()), this.editor.emit("baseObjectListChange"), this.editor.select(null);
|
|
139230
139230
|
}
|
|
139231
139231
|
undo() {
|
|
139232
|
-
return
|
|
139232
|
+
return U0(this, null, function* () {
|
|
139233
139233
|
this.object.show(), this.object.mList.addBaseObjectMap(this.object), delete this.object.userData.selectHide, this.object.objectType === "Model" && this.object.playAllClips(), this.editor.emit("baseObjectListChange");
|
|
139234
139234
|
});
|
|
139235
139235
|
}
|
|
@@ -139251,7 +139251,7 @@ class CopyObject extends Command {
|
|
|
139251
139251
|
this.type = "CopyObject", this.name = "Copy Object", this.object = o;
|
|
139252
139252
|
}
|
|
139253
139253
|
execute() {
|
|
139254
|
-
return
|
|
139254
|
+
return U0(this, null, function* () {
|
|
139255
139255
|
var o;
|
|
139256
139256
|
const r = yield this.object.instantiate({
|
|
139257
139257
|
uId: `${this.id}`,
|
|
@@ -139261,7 +139261,7 @@ class CopyObject extends Command {
|
|
|
139261
139261
|
});
|
|
139262
139262
|
}
|
|
139263
139263
|
undo() {
|
|
139264
|
-
return
|
|
139264
|
+
return U0(this, null, function* () {
|
|
139265
139265
|
var r;
|
|
139266
139266
|
(r = this.copyObject) == null || r.erase(), this.editor.select(null);
|
|
139267
139267
|
});
|
|
@@ -139322,13 +139322,13 @@ class SetObjectMaterial extends Command {
|
|
|
139322
139322
|
), this.newValue = le;
|
|
139323
139323
|
}
|
|
139324
139324
|
execute() {
|
|
139325
|
-
return
|
|
139325
|
+
return U0(this, null, function* () {
|
|
139326
139326
|
const o = this.editor.pencil.mList.get(this.newValue);
|
|
139327
139327
|
o && (this.editor.setObjectMaterial(this.object, this.materialSlot, o), this.playVideo(o), this.editor.emit("materialChanged", this.object));
|
|
139328
139328
|
});
|
|
139329
139329
|
}
|
|
139330
139330
|
undo() {
|
|
139331
|
-
return
|
|
139331
|
+
return U0(this, null, function* () {
|
|
139332
139332
|
const r = this.oldMaterial;
|
|
139333
139333
|
this.editor.setObjectMaterial(this.object, this.materialSlot, r), this.playVideo(r), this.editor.emit("materialChanged", this.object);
|
|
139334
139334
|
});
|
|
@@ -139387,7 +139387,7 @@ class AddMaterial extends Command {
|
|
|
139387
139387
|
this.type = "AddMaterial", this.name = "Add Material", this.materialType = o, this.object = V, this.materialSlot = le;
|
|
139388
139388
|
}
|
|
139389
139389
|
execute() {
|
|
139390
|
-
return
|
|
139390
|
+
return U0(this, null, function* () {
|
|
139391
139391
|
this.addObjectUuid = `material_${this.id}`;
|
|
139392
139392
|
const r = this.editor.pencil.mList;
|
|
139393
139393
|
let o;
|
|
@@ -139422,7 +139422,7 @@ class AddMaterial extends Command {
|
|
|
139422
139422
|
});
|
|
139423
139423
|
}
|
|
139424
139424
|
undo() {
|
|
139425
|
-
return
|
|
139425
|
+
return U0(this, null, function* () {
|
|
139426
139426
|
this.setMaterialCommand && (yield this.setMaterialCommand.undo()), this.editor.pencil.mList.remove(this.addObjectUuid), this.flag && this.editor.emit("materialChanged");
|
|
139427
139427
|
});
|
|
139428
139428
|
}
|
|
@@ -139446,14 +139446,14 @@ class CopyMaterial extends Command {
|
|
|
139446
139446
|
this.type = "CopyMaterial", this.name = "Copy Material", this.objectUuid = o;
|
|
139447
139447
|
}
|
|
139448
139448
|
execute() {
|
|
139449
|
-
return
|
|
139449
|
+
return U0(this, null, function* () {
|
|
139450
139450
|
this.copyObjectUuid = `material_${this.id}`, this.editor.pencil.mList.copy(this.objectUuid, this.copyObjectUuid, {
|
|
139451
139451
|
name: `材质_${this.id}`
|
|
139452
139452
|
});
|
|
139453
139453
|
});
|
|
139454
139454
|
}
|
|
139455
139455
|
undo() {
|
|
139456
|
-
return
|
|
139456
|
+
return U0(this, null, function* () {
|
|
139457
139457
|
this.editor.pencil.mList.remove(this.copyObjectUuid);
|
|
139458
139458
|
});
|
|
139459
139459
|
}
|
|
@@ -139477,13 +139477,13 @@ class RemoveMaterial extends Command {
|
|
|
139477
139477
|
this.type = "RemoveMaterial", this.name = "Remove Material", this.objectUuid = o;
|
|
139478
139478
|
}
|
|
139479
139479
|
execute() {
|
|
139480
|
-
return
|
|
139480
|
+
return U0(this, null, function* () {
|
|
139481
139481
|
const r = this.editor.pencil.mList;
|
|
139482
139482
|
this.material = r.get(this.objectUuid), r.remove(this.objectUuid);
|
|
139483
139483
|
});
|
|
139484
139484
|
}
|
|
139485
139485
|
undo() {
|
|
139486
|
-
return
|
|
139486
|
+
return U0(this, null, function* () {
|
|
139487
139487
|
const r = this.editor.pencil.mList;
|
|
139488
139488
|
this.material && r.add(this.objectUuid, this.material);
|
|
139489
139489
|
});
|
|
@@ -139509,13 +139509,13 @@ class SetSetting extends Command {
|
|
|
139509
139509
|
this.type = "SetSetting", this.updatable = !0, this.name = `Set Setting.${o}`, this.attributeName = o, this.newValue = V, r.viewport.vis && (this.oldValue = r.viewport.vis.settings[o]);
|
|
139510
139510
|
}
|
|
139511
139511
|
execute() {
|
|
139512
|
-
return
|
|
139512
|
+
return U0(this, null, function* () {
|
|
139513
139513
|
const r = this.editor.viewport.vis;
|
|
139514
139514
|
r.settings[this.attributeName] = this.newValue, yield r.settings[this.attributeName], this.editor.emit("settingsChanged");
|
|
139515
139515
|
});
|
|
139516
139516
|
}
|
|
139517
139517
|
undo() {
|
|
139518
|
-
return
|
|
139518
|
+
return U0(this, null, function* () {
|
|
139519
139519
|
const r = this.editor.viewport.vis;
|
|
139520
139520
|
r.settings[this.attributeName] = this.oldValue, yield r.settings[this.attributeName], this.editor.emit("settingsChanged");
|
|
139521
139521
|
});
|
|
@@ -139658,7 +139658,7 @@ class History {
|
|
|
139658
139658
|
return !(e != null && e.updatable) || !(r != null && r.updatable) || o >= COMMAND_UPDATE_THRESHOLD ? !1 : e.object === r.object && e.objectUuid === r.objectUuid && e.type === r.type && e.attributeName === r.attributeName && e.attributeName2 === r.attributeName2 && e.name === r.name && e.materialSlot === r.materialSlot;
|
|
139659
139659
|
}
|
|
139660
139660
|
execute(e, r) {
|
|
139661
|
-
return
|
|
139661
|
+
return U0(this, null, function* () {
|
|
139662
139662
|
const o = this.undos[this.undos.length - 1], V = Date.now() - this.lastCmdTime;
|
|
139663
139663
|
this.canMergeCommands(o, e, V) ? (o.update(e), e = o) : (this.undos.push(e), e.id = ++this.idCounter), e.name = r !== void 0 ? r : e.name;
|
|
139664
139664
|
try {
|
|
@@ -139807,7 +139807,7 @@ class History {
|
|
|
139807
139807
|
return new Promise((r, o) => {
|
|
139808
139808
|
const V = [...this.undos], le = V.length;
|
|
139809
139809
|
let fe = 0, Le = !1;
|
|
139810
|
-
const Ce = () =>
|
|
139810
|
+
const Ce = () => U0(this, null, function* () {
|
|
139811
139811
|
var Pe;
|
|
139812
139812
|
const Re = performance.now();
|
|
139813
139813
|
for (; V.length > 0 && performance.now() - Re < e; ) {
|
|
@@ -139840,7 +139840,7 @@ class History {
|
|
|
139840
139840
|
* 执行单个撤销命令
|
|
139841
139841
|
*/
|
|
139842
139842
|
executeUndo(e) {
|
|
139843
|
-
return
|
|
139843
|
+
return U0(this, null, function* () {
|
|
139844
139844
|
if (!(e != null && e.json)) {
|
|
139845
139845
|
console.warn("Invalid undo command:", e);
|
|
139846
139846
|
return;
|
|
@@ -139991,7 +139991,7 @@ class Viewport {
|
|
|
139991
139991
|
this.vis.setSaveCamera(e), (r = this.vis.pencil.controls) == null || r.saveState(), this.cameraState = gi({}, (o = this.vis) == null ? void 0 : o.cameraState), this.editor.emit("cameraStateChanged");
|
|
139992
139992
|
}
|
|
139993
139993
|
addVis(o) {
|
|
139994
|
-
return
|
|
139994
|
+
return U0(this, arguments, function* (e, r = {}) {
|
|
139995
139995
|
this.replaceVis() && (yield this.editor.execute(new AddVis(this.editor, e, r)));
|
|
139996
139996
|
});
|
|
139997
139997
|
}
|
|
@@ -140003,7 +140003,7 @@ class Viewport {
|
|
|
140003
140003
|
return !0;
|
|
140004
140004
|
}
|
|
140005
140005
|
setVis(o) {
|
|
140006
|
-
return
|
|
140006
|
+
return U0(this, arguments, function* (e, r = {}) {
|
|
140007
140007
|
if (!this.options.visFactories && (this.editor.setViewportVis(e), !this.options.visFactories)) {
|
|
140008
140008
|
console.error("visFactories is not defined");
|
|
140009
140009
|
return;
|
|
@@ -140078,13 +140078,13 @@ class Viewport {
|
|
|
140078
140078
|
});
|
|
140079
140079
|
}
|
|
140080
140080
|
addObj(o) {
|
|
140081
|
-
return
|
|
140081
|
+
return U0(this, arguments, function* (e, r = {}) {
|
|
140082
140082
|
const V = objs$3[e].getInitOptions;
|
|
140083
140083
|
V && Object.assign(r, V(this.vis.pencil, r)), yield this.editor.execute(new AddObject(this.editor, e, r));
|
|
140084
140084
|
});
|
|
140085
140085
|
}
|
|
140086
140086
|
removeObj(e) {
|
|
140087
|
-
return
|
|
140087
|
+
return U0(this, null, function* () {
|
|
140088
140088
|
const { vis: r } = this;
|
|
140089
140089
|
if (!r || !e)
|
|
140090
140090
|
return;
|
|
@@ -140106,7 +140106,7 @@ class Viewport {
|
|
|
140106
140106
|
this.copyObjKey = void 0;
|
|
140107
140107
|
}
|
|
140108
140108
|
pasteObj() {
|
|
140109
|
-
return
|
|
140109
|
+
return U0(this, null, function* () {
|
|
140110
140110
|
const { vis: e } = this;
|
|
140111
140111
|
if (!e || !this.copyObjKey)
|
|
140112
140112
|
return;
|
|
@@ -140115,7 +140115,7 @@ class Viewport {
|
|
|
140115
140115
|
});
|
|
140116
140116
|
}
|
|
140117
140117
|
copyMListMaterial(e) {
|
|
140118
|
-
return
|
|
140118
|
+
return U0(this, null, function* () {
|
|
140119
140119
|
const { vis: r } = this;
|
|
140120
140120
|
if (!r)
|
|
140121
140121
|
return;
|
|
@@ -140128,12 +140128,12 @@ class Viewport {
|
|
|
140128
140128
|
});
|
|
140129
140129
|
}
|
|
140130
140130
|
clearCopyMListMaterial() {
|
|
140131
|
-
return
|
|
140131
|
+
return U0(this, null, function* () {
|
|
140132
140132
|
yield del("copyMaterial");
|
|
140133
140133
|
});
|
|
140134
140134
|
}
|
|
140135
140135
|
pasteMListMaterial() {
|
|
140136
|
-
return
|
|
140136
|
+
return U0(this, null, function* () {
|
|
140137
140137
|
const { vis: e } = this;
|
|
140138
140138
|
if (!e)
|
|
140139
140139
|
return;
|
|
@@ -140142,7 +140142,7 @@ class Viewport {
|
|
|
140142
140142
|
});
|
|
140143
140143
|
}
|
|
140144
140144
|
pasteMListMaterial2Replace(e) {
|
|
140145
|
-
return
|
|
140145
|
+
return U0(this, null, function* () {
|
|
140146
140146
|
var le;
|
|
140147
140147
|
const { vis: r } = this;
|
|
140148
140148
|
if (!r)
|
|
@@ -140162,7 +140162,7 @@ class Viewport {
|
|
|
140162
140162
|
});
|
|
140163
140163
|
}
|
|
140164
140164
|
addMListMaterial(e = "MeshBasicMaterial", r, o) {
|
|
140165
|
-
return
|
|
140165
|
+
return U0(this, null, function* () {
|
|
140166
140166
|
const { vis: V } = this;
|
|
140167
140167
|
if (!V)
|
|
140168
140168
|
return;
|
|
@@ -140171,7 +140171,7 @@ class Viewport {
|
|
|
140171
140171
|
});
|
|
140172
140172
|
}
|
|
140173
140173
|
removeMListMaterial(e) {
|
|
140174
|
-
return
|
|
140174
|
+
return U0(this, null, function* () {
|
|
140175
140175
|
const { vis: r } = this;
|
|
140176
140176
|
r && this.editor.execute(new RemoveMaterial(this.editor, e));
|
|
140177
140177
|
});
|
|
@@ -140207,7 +140207,7 @@ class Viewport {
|
|
|
140207
140207
|
this.editor.emit("visShow", !1), (e = this.vis) == null || e.dispose(), this.options.visFactories = void 0, this.extendsOptions = {}, this.cameraState = {}, this.delLoadObj = void 0, this.vis = void 0, this.editor.history.clear();
|
|
140208
140208
|
}
|
|
140209
140209
|
}
|
|
140210
|
-
class
|
|
140210
|
+
const vn = class vn {
|
|
140211
140211
|
constructor(e) {
|
|
140212
140212
|
C0(this, "selected", null);
|
|
140213
140213
|
C0(this, "playing", !0);
|
|
@@ -140393,50 +140393,69 @@ class Editor {
|
|
|
140393
140393
|
this.emit("mListGraphChanged");
|
|
140394
140394
|
}
|
|
140395
140395
|
execute(e, r) {
|
|
140396
|
-
return
|
|
140396
|
+
return U0(this, null, function* () {
|
|
140397
140397
|
yield this.history.execute(e, r);
|
|
140398
140398
|
});
|
|
140399
140399
|
}
|
|
140400
|
+
/**
|
|
140401
|
+
* 清除特定 URL 的缓存
|
|
140402
|
+
* @param url 要清除的 URL,如果不提供则清除所有缓存
|
|
140403
|
+
*/
|
|
140404
|
+
static clearUrlCache(e) {
|
|
140405
|
+
if (e) {
|
|
140406
|
+
const r = vn.urlCache.get(e);
|
|
140407
|
+
r && (URL.revokeObjectURL(r), vn.urlCache.delete(e));
|
|
140408
|
+
} else
|
|
140409
|
+
vn.urlCache.forEach((r) => {
|
|
140410
|
+
URL.revokeObjectURL(r);
|
|
140411
|
+
}), vn.urlCache.clear();
|
|
140412
|
+
}
|
|
140400
140413
|
fromJSON(e, r) {
|
|
140401
|
-
return
|
|
140402
|
-
var
|
|
140403
|
-
let o = null;
|
|
140414
|
+
return U0(this, null, function* () {
|
|
140415
|
+
var le, fe, Le;
|
|
140416
|
+
let o = null, V = !1;
|
|
140404
140417
|
try {
|
|
140405
140418
|
r && !y(r) ? console.warn(
|
|
140406
140419
|
"fromJSON 第二个参数已修改,{beforeSetVisOptions:(r)=>r} 替代"
|
|
140407
|
-
) : r && (o = r.
|
|
140408
|
-
let
|
|
140420
|
+
) : r && (o = r.preprocessor, V = (le = r.useCache) != null ? le : !1, delete r.preprocessor, delete r.useCache, this.hooks.addEvents(r));
|
|
140421
|
+
let Ce;
|
|
140409
140422
|
if (typeof e == "string") {
|
|
140410
|
-
const
|
|
140411
|
-
|
|
140412
|
-
|
|
140413
|
-
|
|
140414
|
-
|
|
140415
|
-
|
|
140423
|
+
const Re = e;
|
|
140424
|
+
let Pe;
|
|
140425
|
+
V && vn.urlCache.has(Re) ? Pe = vn.urlCache.get(Re) : Pe = this.options.assetsPrefix + Re, console.time("vis-core:time.json-fetch");
|
|
140426
|
+
const { res: ze, err: Fe } = yield jsonFetch(Pe);
|
|
140427
|
+
if (console.timeEnd("vis-core:time.json-fetch"), Fe)
|
|
140428
|
+
throw new Error("fromJSON error:" + Fe);
|
|
140429
|
+
if (Ce = ze, V && !vn.urlCache.has(Re)) {
|
|
140430
|
+
const ke = new Blob([JSON.stringify(Ce)], {
|
|
140431
|
+
type: "application/json"
|
|
140432
|
+
}), Gt = URL.createObjectURL(ke);
|
|
140433
|
+
vn.urlCache.set(Re, Gt);
|
|
140434
|
+
}
|
|
140416
140435
|
} else
|
|
140417
|
-
|
|
140418
|
-
if (this.hooks.dispatch("beforeFromJSON"), o && (
|
|
140436
|
+
Ce = e;
|
|
140437
|
+
if (this.hooks.dispatch("beforeFromJSON"), o && (Ce = yield o(Ce)), Ce = fixJSON(Ce), Ce.at && (accessToken.token = Ce.at), !this.storage) {
|
|
140419
140438
|
if (!accessToken.token)
|
|
140420
140439
|
throw new Error("设置 token 或平台重新下载 JSON 文件");
|
|
140421
|
-
const
|
|
140422
|
-
if (!
|
|
140440
|
+
const Re = accessToken.getInfo();
|
|
140441
|
+
if (!Re || !Re.isValid)
|
|
140423
140442
|
throw new Error("need accessToken");
|
|
140424
140443
|
}
|
|
140425
|
-
if (this.config.fromJSON(
|
|
140426
|
-
const
|
|
140427
|
-
|
|
140444
|
+
if (this.config.fromJSON(Ce.c), this.history.fromJSON(Ce.h), this.viewport.fromJSON(Ce.v), this.hooks.fromJSON(Ce.s), this.config.compareVersion(), yield this.history.processUndos(this.options.processUndosMaxFrameTime), (fe = Ce.v.bg) != null && fe.texture && this.viewport.vis) {
|
|
140445
|
+
const Re = parseTexture(Ce.v.bg.texture);
|
|
140446
|
+
Re.colorSpace = SRGBColorSpace, this.viewport.vis.pencil.scene.background = Re;
|
|
140428
140447
|
}
|
|
140429
|
-
return this.hooks.dispatch("beforeShow"), this.viewport.vis && (this.playing && this.viewport.vis.lead.prefabGroup.hide(), this.viewport.vis.show()), this.hooks.dispatch("afterShow"), (
|
|
140430
|
-
var
|
|
140431
|
-
(
|
|
140432
|
-
}), this.hooks.dispatch("afterFromJSON"),
|
|
140433
|
-
} catch (
|
|
140434
|
-
throw this.hooks.dispatch("errorFromJSON"), new Error("fromJSON error:" +
|
|
140448
|
+
return this.hooks.dispatch("beforeShow"), this.viewport.vis && (this.playing && this.viewport.vis.lead.prefabGroup.hide(), this.viewport.vis.show()), this.hooks.dispatch("afterShow"), (Le = this.pencil.controls) == null || Le.saveState(), this.select(null), window.requestIdleCallback(() => {
|
|
140449
|
+
var Re;
|
|
140450
|
+
(Re = this.viewport.vis) == null || Re.worker.dispose();
|
|
140451
|
+
}), this.hooks.dispatch("afterFromJSON"), Ce;
|
|
140452
|
+
} catch (Ce) {
|
|
140453
|
+
throw this.hooks.dispatch("errorFromJSON"), new Error("fromJSON error:" + Ce);
|
|
140435
140454
|
}
|
|
140436
140455
|
});
|
|
140437
140456
|
}
|
|
140438
140457
|
appendJSON(e) {
|
|
140439
|
-
return
|
|
140458
|
+
return U0(this, null, function* () {
|
|
140440
140459
|
let r;
|
|
140441
140460
|
if (typeof e == "string") {
|
|
140442
140461
|
const o = this.options.assetsPrefix + e;
|
|
@@ -140466,7 +140485,10 @@ class Editor {
|
|
|
140466
140485
|
dispose() {
|
|
140467
140486
|
this.events.removeAllListeners(), this.viewport.dispose(), this.history.clear(), this.hooks.clear(), this._selectOptionMaps.key.clear(), this._selectOptionMaps.object = /* @__PURE__ */ new WeakMap(), this._selectOptionMaps.baseObject = /* @__PURE__ */ new WeakMap(), this._mListOptionsMaps.key.clear(), this._mListOptionsMaps.material = /* @__PURE__ */ new WeakMap(), this._mListOptionsMaps.object = /* @__PURE__ */ new WeakMap(), this._dispose = !0;
|
|
140468
140487
|
}
|
|
140469
|
-
}
|
|
140488
|
+
};
|
|
140489
|
+
// 用于缓存 URL 的静态 Map
|
|
140490
|
+
C0(vn, "urlCache", /* @__PURE__ */ new Map());
|
|
140491
|
+
let Editor = vn;
|
|
140470
140492
|
const getScale = (v) => {
|
|
140471
140493
|
const r = window.getComputedStyle(v).transform;
|
|
140472
140494
|
if (r && r !== "none") {
|
|
@@ -140555,7 +140577,7 @@ class Camera extends Event {
|
|
|
140555
140577
|
this.cameraState[r] = [V.x, V.y, V.z, le.x, le.y, le.z];
|
|
140556
140578
|
}
|
|
140557
140579
|
useSaveCamera(r, o = !1) {
|
|
140558
|
-
return
|
|
140580
|
+
return U0(this, null, function* () {
|
|
140559
140581
|
const V = this.cameraState[r];
|
|
140560
140582
|
return V ? (yield this.lookAt(
|
|
140561
140583
|
V[0],
|
|
@@ -140569,7 +140591,7 @@ class Camera extends Event {
|
|
|
140569
140591
|
});
|
|
140570
140592
|
}
|
|
140571
140593
|
lookAt(r, o, V, le, fe, Le, Ce = !1, Re = 250) {
|
|
140572
|
-
return
|
|
140594
|
+
return U0(this, null, function* () {
|
|
140573
140595
|
this.pencil.controls.smoothTime = Re / 1e3, yield this.pencil.controls.setLookAt(
|
|
140574
140596
|
r,
|
|
140575
140597
|
o,
|
|
@@ -140582,12 +140604,12 @@ class Camera extends Event {
|
|
|
140582
140604
|
});
|
|
140583
140605
|
}
|
|
140584
140606
|
truck(r, o, V = !1, le = 250) {
|
|
140585
|
-
return
|
|
140607
|
+
return U0(this, null, function* () {
|
|
140586
140608
|
this.pencil.controls.smoothTime = le / 1e3, this.pencil.controls.restThreshold = 0, yield this.pencil.controls.truck(r, o, V), this.pencil.controls.restThreshold = 25e-4, this.pencil.controls.smoothTime = 250 / 1e3;
|
|
140587
140609
|
});
|
|
140588
140610
|
}
|
|
140589
140611
|
dollyTo(r, o = !1, V = 250) {
|
|
140590
|
-
return
|
|
140612
|
+
return U0(this, null, function* () {
|
|
140591
140613
|
let le = r;
|
|
140592
140614
|
if (typeof le == "string") {
|
|
140593
140615
|
const [fe, Le] = le.split("=");
|
|
@@ -140601,7 +140623,7 @@ class Camera extends Event {
|
|
|
140601
140623
|
return MathUtils.euclideanModulo(le + Math.PI, V) - Math.PI;
|
|
140602
140624
|
}
|
|
140603
140625
|
lookAtTarget(r, o = !1, V = 250) {
|
|
140604
|
-
return
|
|
140626
|
+
return U0(this, null, function* () {
|
|
140605
140627
|
this.pencil.controls.smoothTime = V / 1e3;
|
|
140606
140628
|
const le = this.pencil.controls.azimuthAngle, fe = this.pencil.controls.polarAngle, Le = this.pencil.controls.distance, Ce = this.pencil.cameraTarget.clone(), Re = r.azimuthAngle || le, Pe = r.polarAngle || fe, ze = r.distance || Le, Fe = r.target || Ce;
|
|
140607
140629
|
yield Promise.all([
|
|
@@ -140638,7 +140660,7 @@ class Camera extends Event {
|
|
|
140638
140660
|
});
|
|
140639
140661
|
}
|
|
140640
140662
|
resetCamera(r = !1, o = 250) {
|
|
140641
|
-
return
|
|
140663
|
+
return U0(this, null, function* () {
|
|
140642
140664
|
this.pencil.controls.smoothTime = o / 1e3, yield this.pencil.controls.reset(r), this.pencil.controls.smoothTime = 250 / 1e3;
|
|
140643
140665
|
});
|
|
140644
140666
|
}
|
|
@@ -140751,20 +140773,20 @@ class Base extends Camera {
|
|
|
140751
140773
|
loaderAdd(...r) {
|
|
140752
140774
|
}
|
|
140753
140775
|
initMaterial(...r) {
|
|
140754
|
-
return
|
|
140776
|
+
return U0(this, null, function* () {
|
|
140755
140777
|
});
|
|
140756
140778
|
}
|
|
140757
140779
|
initVis(...r) {
|
|
140758
|
-
return
|
|
140780
|
+
return U0(this, null, function* () {
|
|
140759
140781
|
});
|
|
140760
140782
|
}
|
|
140761
140783
|
init(...r) {
|
|
140762
|
-
return
|
|
140784
|
+
return U0(this, null, function* () {
|
|
140763
140785
|
yield this.initPencil(), this.loaderAdd(), console.time(`vis-core:time.${this.visName}-loader`), yield this.loader.loadAll(), console.timeEnd(`vis-core:time.${this.visName}-loader`), yield this.initMaterial(), yield this.initVis(), yield Promise.all(this.lead.objectsPromise);
|
|
140764
140786
|
});
|
|
140765
140787
|
}
|
|
140766
140788
|
initPencil() {
|
|
140767
|
-
return
|
|
140789
|
+
return U0(this, null, function* () {
|
|
140768
140790
|
var V, le, fe, Le, Ce, Re, Pe, ze;
|
|
140769
140791
|
if (this.pencil) return;
|
|
140770
140792
|
const r = gi({}, this.options.pencilConfig);
|
|
@@ -140996,7 +141018,7 @@ class Base extends Camera {
|
|
|
140996
141018
|
);
|
|
140997
141019
|
}
|
|
140998
141020
|
handleSetting(r, o) {
|
|
140999
|
-
return
|
|
141021
|
+
return U0(this, null, function* () {
|
|
141000
141022
|
const { pencil: V } = this;
|
|
141001
141023
|
if (r === "mouseWheel" || r === "mouseLeft" || r === "mouseRight") {
|
|
141002
141024
|
const le = r.replace("mouse", "").toLowerCase();
|
|
@@ -141019,12 +141041,12 @@ class Base extends Camera {
|
|
|
141019
141041
|
this.showState && (this.lead.group.hide(), this.lead.prefabGroup.hide(), this.showState = !1, this.emit("hide"));
|
|
141020
141042
|
}
|
|
141021
141043
|
addGroup() {
|
|
141022
|
-
return
|
|
141044
|
+
return U0(this, null, function* () {
|
|
141023
141045
|
return yield this.lead.draw("Group");
|
|
141024
141046
|
});
|
|
141025
141047
|
}
|
|
141026
141048
|
addCSS2D(V) {
|
|
141027
|
-
return
|
|
141049
|
+
return U0(this, arguments, function* (r, o = {}) {
|
|
141028
141050
|
typeof o == "string" && (o = { display: o }), o.display && (r.style.display = o.display);
|
|
141029
141051
|
let le = 0;
|
|
141030
141052
|
typeof o.onTop != "undefined" && (le = o.onTop);
|
|
@@ -141036,7 +141058,7 @@ class Base extends Camera {
|
|
|
141036
141058
|
});
|
|
141037
141059
|
}
|
|
141038
141060
|
addCSS3D(V) {
|
|
141039
|
-
return
|
|
141061
|
+
return U0(this, arguments, function* (r, o = {}) {
|
|
141040
141062
|
o.display && (r.style.display = o.display);
|
|
141041
141063
|
let le = 0;
|
|
141042
141064
|
typeof o.onTop != "undefined" && (le = o.onTop);
|
|
@@ -141082,7 +141104,7 @@ class Building extends Z$1 {
|
|
|
141082
141104
|
this.options = gi({}, r);
|
|
141083
141105
|
}
|
|
141084
141106
|
create() {
|
|
141085
|
-
return
|
|
141107
|
+
return U0(this, null, function* () {
|
|
141086
141108
|
const { jsonUrl: r, projection: o, cacheKey: V, meters: le, grey: fe, hasSide: Le } = this.options, Ce = this.pencil.mList, Re = this.pencil.getPlugin("worker"), Pe = this.pencil.lead, ze = fe ? "-grey" : "";
|
|
141087
141109
|
this.createGroup();
|
|
141088
141110
|
const Fe = Ce.getMultiple("building" + ze);
|
|
@@ -141131,7 +141153,7 @@ class Building extends Z$1 {
|
|
|
141131
141153
|
);
|
|
141132
141154
|
}
|
|
141133
141155
|
yield Promise.all(
|
|
141134
|
-
ke.map((Gt) =>
|
|
141156
|
+
ke.map((Gt) => U0(this, null, function* () {
|
|
141135
141157
|
const { t: Vt } = Gt.userData;
|
|
141136
141158
|
let Zt = this.options.material;
|
|
141137
141159
|
Zt || (Zt = Le ? [Fe[Vt + "Top"], Fe[Vt + "Side"]] : Fe[Vt + "Top"]);
|
|
@@ -141214,7 +141236,7 @@ class Road extends Z$1 {
|
|
|
141214
141236
|
this.options = gi({}, r);
|
|
141215
141237
|
}
|
|
141216
141238
|
create() {
|
|
141217
|
-
return
|
|
141239
|
+
return U0(this, null, function* () {
|
|
141218
141240
|
const { grey: r } = this.options;
|
|
141219
141241
|
this.createGroup();
|
|
141220
141242
|
const o = this.pencil.getPlugin("worker"), V = this.pencil.lead, le = this.pencil.mList, fe = r ? "-grey" : "", { jsonUrl: Le, projection: Ce, cacheKey: Re, meters: Pe } = this.options;
|
|
@@ -141248,7 +141270,7 @@ class Road extends Z$1 {
|
|
|
141248
141270
|
);
|
|
141249
141271
|
}
|
|
141250
141272
|
yield Promise.all(
|
|
141251
|
-
ze.map((Fe) =>
|
|
141273
|
+
ze.map((Fe) => U0(this, null, function* () {
|
|
141252
141274
|
const ke = yield V.draw(
|
|
141253
141275
|
"Line",
|
|
141254
141276
|
{
|
|
@@ -141275,7 +141297,7 @@ class Area extends Z$1 {
|
|
|
141275
141297
|
this.options = gi({}, r);
|
|
141276
141298
|
}
|
|
141277
141299
|
create() {
|
|
141278
|
-
return
|
|
141300
|
+
return U0(this, null, function* () {
|
|
141279
141301
|
this.createGroup();
|
|
141280
141302
|
const { json: r, projection: o, type: V, cacheKey: le, material: fe, oArr: Le } = this.options, Ce = this.pencil.getPlugin("worker"), Re = this.pencil.lead;
|
|
141281
141303
|
let Pe = le ? yield Ce.getCachedGeometry({
|
|
@@ -141311,7 +141333,7 @@ class Area extends Z$1 {
|
|
|
141311
141333
|
);
|
|
141312
141334
|
}
|
|
141313
141335
|
yield Promise.all(
|
|
141314
|
-
Pe.map((ze) =>
|
|
141336
|
+
Pe.map((ze) => U0(this, null, function* () {
|
|
141315
141337
|
const Fe = yield Re.draw(
|
|
141316
141338
|
"ExtrudePolygon",
|
|
141317
141339
|
{
|
|
@@ -141800,7 +141822,7 @@ class CityPlane extends Z$1 {
|
|
|
141800
141822
|
}, r);
|
|
141801
141823
|
}
|
|
141802
141824
|
create() {
|
|
141803
|
-
return
|
|
141825
|
+
return U0(this, null, function* () {
|
|
141804
141826
|
const { width: r, height: o, color: V, map: le, material: fe } = this.options, Le = new PlaneGeometry(r, o, 2, 2);
|
|
141805
141827
|
this.plane = Le;
|
|
141806
141828
|
const Ce = fe || new MeshBasicMaterial({
|
|
@@ -141928,7 +141950,7 @@ class Target extends Z$1 {
|
|
|
141928
141950
|
return le.translateZ(1), le;
|
|
141929
141951
|
}
|
|
141930
141952
|
create() {
|
|
141931
|
-
return
|
|
141953
|
+
return U0(this, null, function* () {
|
|
141932
141954
|
const { scale: r = 0.03 } = this.options;
|
|
141933
141955
|
this.createGroup();
|
|
141934
141956
|
const o = this.pencil.loader, V = "241, 241, 86", le = o.getAsset("/image/city/cylinder.webp"), fe = getCanvasTexture(V), Le = this.createRipple(fe);
|
|
@@ -142161,7 +142183,7 @@ class City$1 extends Base {
|
|
|
142161
142183
|
);
|
|
142162
142184
|
}
|
|
142163
142185
|
initMaterial() {
|
|
142164
|
-
return
|
|
142186
|
+
return U0(this, null, function* () {
|
|
142165
142187
|
if (this.mList.get("city-plane-mat")) {
|
|
142166
142188
|
console.log("city-plane-mat exist");
|
|
142167
142189
|
return;
|
|
@@ -142281,7 +142303,7 @@ class City$1 extends Base {
|
|
|
142281
142303
|
r && !r.enabled && (r.enabled = !0, console.log("enabledSSAO"));
|
|
142282
142304
|
}
|
|
142283
142305
|
init() {
|
|
142284
|
-
return
|
|
142306
|
+
return U0(this, null, function* () {
|
|
142285
142307
|
const { jsonName: r, adcode: o } = this.options;
|
|
142286
142308
|
yield this.initPencil(), this.loaderAdd(), this.loaderAddJson(r), console.time(`vis-core:time.${this.visName}${o}-loader`), yield this.loader.loadAll(), console.timeEnd(`vis-core:time.${this.visName}${o}-loader`), this.settings.mouseLeft = Xi.SCREEN_PAN, yield this.settings.mouseLeft, this.pencil.camera.userData.up = "0,0,1", this.adcode = this.options.adcode, this.options.center && (this.pcenter = this.options.center), this.projection = f({
|
|
142287
142309
|
center: this.pcenter,
|
|
@@ -142298,7 +142320,7 @@ class City$1 extends Base {
|
|
|
142298
142320
|
return (V = (o = this.projection).invert) == null ? void 0 : V.call(o, [r.x, -r.z]);
|
|
142299
142321
|
}
|
|
142300
142322
|
fitTo(r, o = !0) {
|
|
142301
|
-
return
|
|
142323
|
+
return U0(this, null, function* () {
|
|
142302
142324
|
this.pencil.controls.fitToBox(r.object3d, o), this.pencil.controls.rotatePolarTo(
|
|
142303
142325
|
this.pencil.camera.up.z === 1 ? Math.PI / 180 * 70 : Math.PI / 180 * 160,
|
|
142304
142326
|
o
|
|
@@ -142306,7 +142328,7 @@ class City$1 extends Base {
|
|
|
142306
142328
|
});
|
|
142307
142329
|
}
|
|
142308
142330
|
initVis() {
|
|
142309
|
-
return
|
|
142331
|
+
return U0(this, null, function* () {
|
|
142310
142332
|
const { fitTo: r, jsonName: o } = this.options;
|
|
142311
142333
|
this.adcode;
|
|
142312
142334
|
const V = this.loader, le = this.options.showRiver && V.getAsset(`/cityGzip/River${o}.json.gzip`), fe = this.options.showGrassland && V.getAsset(`/cityGzip/Grassland${o}.json.gzip`), Le = {};
|
|
@@ -142354,7 +142376,7 @@ class City$1 extends Base {
|
|
|
142354
142376
|
});
|
|
142355
142377
|
}
|
|
142356
142378
|
drawCityPlane(r, o) {
|
|
142357
|
-
return
|
|
142379
|
+
return U0(this, null, function* () {
|
|
142358
142380
|
const V = this.mList.get("city-plane-mat"), le = findAdcodeInfo(r).b, fe = this.projection([le[0], le[1]]), Le = this.projection([le[2], le[3]]), Ce = Math.abs(Le[0] - fe[0]), Re = Math.abs(Le[1] - fe[1]), Pe = Ce, ze = Re, Fe = yield this.lead.draw(
|
|
142359
142381
|
"CityPlane",
|
|
142360
142382
|
{
|
|
@@ -142370,7 +142392,7 @@ class City$1 extends Base {
|
|
|
142370
142392
|
});
|
|
142371
142393
|
}
|
|
142372
142394
|
drawBuilding() {
|
|
142373
|
-
return
|
|
142395
|
+
return U0(this, arguments, function* (r = {}) {
|
|
142374
142396
|
if (!r.jsonUrl) {
|
|
142375
142397
|
console.warn(" json:Building");
|
|
142376
142398
|
return;
|
|
@@ -142396,7 +142418,7 @@ class City$1 extends Base {
|
|
|
142396
142418
|
});
|
|
142397
142419
|
}
|
|
142398
142420
|
drawArea() {
|
|
142399
|
-
return
|
|
142421
|
+
return U0(this, arguments, function* (r = {}) {
|
|
142400
142422
|
if (!r.json) {
|
|
142401
142423
|
console.warn(" json:drawGeography");
|
|
142402
142424
|
return;
|
|
@@ -142424,7 +142446,7 @@ class City$1 extends Base {
|
|
|
142424
142446
|
});
|
|
142425
142447
|
}
|
|
142426
142448
|
drawRoad() {
|
|
142427
|
-
return
|
|
142449
|
+
return U0(this, arguments, function* (r = {}) {
|
|
142428
142450
|
if (!r.jsonUrl) {
|
|
142429
142451
|
console.warn(" json:Road");
|
|
142430
142452
|
return;
|
|
@@ -142496,7 +142518,7 @@ let PlaneMap$1 = class extends Z$1 {
|
|
|
142496
142518
|
}, r), ((o = this.options.projection.rotate) == null ? void 0 : o[0]) === -160 && (this.options.projection.projectionType === "winkel3" ? this.splitPolygons = 100 : this.splitPolygons = 300);
|
|
142497
142519
|
}
|
|
142498
142520
|
create() {
|
|
142499
|
-
return
|
|
142521
|
+
return U0(this, null, function* () {
|
|
142500
142522
|
const {
|
|
142501
142523
|
geojson: r,
|
|
142502
142524
|
extrudeLineGeojson: o,
|
|
@@ -142512,7 +142534,7 @@ let PlaneMap$1 = class extends Z$1 {
|
|
|
142512
142534
|
const ze = this.pencil.lead;
|
|
142513
142535
|
if (le) {
|
|
142514
142536
|
const Ht = yield Promise.all(
|
|
142515
|
-
r.features.map((Kt) =>
|
|
142537
|
+
r.features.map((Kt) => U0(this, null, function* () {
|
|
142516
142538
|
const { properties: Yt } = Kt, jt = `${this.getPropertiesKey(Yt)}`, n0 = yield ze.draw("Group", {
|
|
142517
142539
|
target: this,
|
|
142518
142540
|
key: jt
|
|
@@ -142572,11 +142594,11 @@ let PlaneMap$1 = class extends Z$1 {
|
|
|
142572
142594
|
});
|
|
142573
142595
|
}
|
|
142574
142596
|
addArea(r, o) {
|
|
142575
|
-
return
|
|
142597
|
+
return U0(this, null, function* () {
|
|
142576
142598
|
const { bbox: V, material: le, onTop: fe } = o, Le = this.geojson2Meta(r), Ce = this.pencil.getPlugin("worker"), Re = this.pencil.lead;
|
|
142577
142599
|
if (this.pencil.mList, o.areaGroup)
|
|
142578
142600
|
return yield Promise.all(
|
|
142579
|
-
Le.map((Pe) =>
|
|
142601
|
+
Le.map((Pe) => U0(this, null, function* () {
|
|
142580
142602
|
const { coords: ze, properties: Fe } = Pe, ke = this.findGroup(this.getPropertiesKey(Fe)), Gt = this.options.conic ? yield Ce.geoGeometry("conicPolygon", {
|
|
142581
142603
|
coordinatesArr: ze,
|
|
142582
142604
|
metaArray: ze.map(() => [
|
|
@@ -142661,11 +142683,11 @@ let PlaneMap$1 = class extends Z$1 {
|
|
|
142661
142683
|
});
|
|
142662
142684
|
}
|
|
142663
142685
|
addLine(r, o) {
|
|
142664
|
-
return
|
|
142686
|
+
return U0(this, null, function* () {
|
|
142665
142687
|
const { material: V, onTop: le } = o, fe = this.geojson2Meta(r), Le = this.pencil.getPlugin("worker"), Ce = this.pencil.lead;
|
|
142666
142688
|
if (o.areaGroup)
|
|
142667
142689
|
return yield Promise.all(
|
|
142668
|
-
fe.map((Re) =>
|
|
142690
|
+
fe.map((Re) => U0(this, null, function* () {
|
|
142669
142691
|
const { coords: Pe, properties: ze } = Re, Fe = this.findGroup(this.getPropertiesKey(ze)), ke = this.options.conic ? yield Le.geoGeometry("conicLine", {
|
|
142670
142692
|
coordinatesArr: Pe,
|
|
142671
142693
|
metaArray: Pe.map(() => [
|
|
@@ -142873,7 +142895,7 @@ class SphereShadow extends Z$1 {
|
|
|
142873
142895
|
}, r);
|
|
142874
142896
|
}
|
|
142875
142897
|
create() {
|
|
142876
|
-
return
|
|
142898
|
+
return U0(this, null, function* () {
|
|
142877
142899
|
const r = new SphereGeometry(this.options.radius, 128, 90), o = new MeshBasicMaterial();
|
|
142878
142900
|
this.createMesh(r, o), this.scale.multiplyScalar(1.001), this.rotation.y = Math.PI / 180 * -90, this.object3d.name = "阴影面", this.hide();
|
|
142879
142901
|
});
|
|
@@ -142888,7 +142910,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
142888
142910
|
const { loader: e } = this;
|
|
142889
142911
|
e.add(["/image/earth2/basic.jpg", "/image/earth2/NormalMap.jpg"]);
|
|
142890
142912
|
}, v.initMaterial = function() {
|
|
142891
|
-
return
|
|
142913
|
+
return U0(this, null, function* () {
|
|
142892
142914
|
const e = this.loader, r = e.getAsset("/image/earth2/basic.jpg"), o = e.getAsset("/image/earth2/NormalMap.jpg"), V = new MeshStandardMaterial({
|
|
142893
142915
|
name: "地球材质",
|
|
142894
142916
|
map: r,
|
|
@@ -142900,7 +142922,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
142900
142922
|
this.mList.add("earthMaterial", V);
|
|
142901
142923
|
});
|
|
142902
142924
|
}, v.initVis = function() {
|
|
142903
|
-
return
|
|
142925
|
+
return U0(this, null, function* () {
|
|
142904
142926
|
v.pencil.camera.near = 1, v.pencil.camera.far = 3e3, v.pencil.camera.fov = 12, v.pencil.camera.updateProjectionMatrix();
|
|
142905
142927
|
const [e, r] = yield Promise.all([
|
|
142906
142928
|
this.lead.draw("Light", {
|
|
@@ -142932,7 +142954,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
142932
142954
|
"/image/earth/chinaNormal.webp"
|
|
142933
142955
|
]);
|
|
142934
142956
|
}, v.initVis = function() {
|
|
142935
|
-
return
|
|
142957
|
+
return U0(this, null, function* () {
|
|
142936
142958
|
yield this.initLight();
|
|
142937
142959
|
const [, e, r] = yield Promise.all([
|
|
142938
142960
|
this.lead.draw("Earth", {
|
|
@@ -143015,7 +143037,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
143015
143037
|
), yield this.pencil.controls.dollyTo(99.11560932366835, !1);
|
|
143016
143038
|
});
|
|
143017
143039
|
}, v.initMaterial = function() {
|
|
143018
|
-
return
|
|
143040
|
+
return U0(this, null, function* () {
|
|
143019
143041
|
const e = this.loader, r = new MeshStandardMaterial({
|
|
143020
143042
|
side: DoubleSide,
|
|
143021
143043
|
name: "顶面",
|
|
@@ -143072,7 +143094,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
143072
143094
|
};
|
|
143073
143095
|
}, countryPlate = (v) => {
|
|
143074
143096
|
v.initVis = function() {
|
|
143075
|
-
return
|
|
143097
|
+
return U0(this, null, function* () {
|
|
143076
143098
|
yield this.initLight();
|
|
143077
143099
|
const [, e] = yield Promise.all([
|
|
143078
143100
|
this.lead.draw("Earth", {
|
|
@@ -143097,7 +143119,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
143097
143119
|
this.map = e, yield this.pencil.controls.rotateTo(1.8041576242193995, 1.2232045720480524, !1), yield this.pencil.controls.dollyTo(99.11560932366835, !1), this.playing && (this.pencil.controls.minPolarAngle = this.pencil.controls.polarAngle, this.pencil.controls.maxPolarAngle = this.pencil.controls.polarAngle);
|
|
143098
143120
|
});
|
|
143099
143121
|
}, v.initMaterial = function() {
|
|
143100
|
-
return
|
|
143122
|
+
return U0(this, null, function* () {
|
|
143101
143123
|
const e = new MeshStandardMaterial({
|
|
143102
143124
|
side: DoubleSide,
|
|
143103
143125
|
name: "侧面",
|
|
@@ -143131,7 +143153,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
143131
143153
|
base: base$2,
|
|
143132
143154
|
chinaPlate,
|
|
143133
143155
|
countryPlate
|
|
143134
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
143156
|
+
}, Symbol.toStringTag, { value: "Module" })), An = class An extends Base {
|
|
143135
143157
|
constructor() {
|
|
143136
143158
|
super(...arguments);
|
|
143137
143159
|
C0(this, "leadObjs", objs$1);
|
|
@@ -143157,8 +143179,8 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
143157
143179
|
}, styles[this.options.style](this);
|
|
143158
143180
|
}
|
|
143159
143181
|
handleSetting(r, o) {
|
|
143160
|
-
return
|
|
143161
|
-
return yield
|
|
143182
|
+
return U0(this, null, function* () {
|
|
143183
|
+
return yield Zn(An.prototype, this, "handleSetting").call(this, r, o), r === "autoRotateSpeed" ? this.pencil.autoRotate(o) : r === "autoRotate" && (o ? this.settings.autoRotateSpeed = -20 : this.settings.autoRotateSpeed = 0), o;
|
|
143162
143184
|
});
|
|
143163
143185
|
}
|
|
143164
143186
|
show() {
|
|
@@ -143173,7 +143195,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
143173
143195
|
});
|
|
143174
143196
|
}
|
|
143175
143197
|
initLight() {
|
|
143176
|
-
return
|
|
143198
|
+
return U0(this, null, function* () {
|
|
143177
143199
|
const [r, o] = yield Promise.all([
|
|
143178
143200
|
this.lead.draw("Light", {
|
|
143179
143201
|
type: "RectAreaLight",
|
|
@@ -143218,7 +143240,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
143218
143240
|
}
|
|
143219
143241
|
}
|
|
143220
143242
|
addAreaPlaneByProperty(r, o, V) {
|
|
143221
|
-
return
|
|
143243
|
+
return U0(this, null, function* () {
|
|
143222
143244
|
if (!this.map) return;
|
|
143223
143245
|
const fe = this.map.options.geojson.features.find(
|
|
143224
143246
|
(Le) => Le.properties && Le.properties[r] === o
|
|
@@ -143247,7 +143269,7 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
143247
143269
|
const Ce = r();
|
|
143248
143270
|
if (!Ce.length) return;
|
|
143249
143271
|
this.pencil.controls.getPosition(le, !1);
|
|
143250
|
-
const Re = V.clone().sub(le), Pe = Math.sqrt(
|
|
143272
|
+
const Re = V.clone().sub(le), Pe = Math.sqrt(Ln(Re.length(), 2) - Ln(fe, 2)), ze = Ce.map((Fe) => Fe.position.clone().sub(le).length() > Pe);
|
|
143251
143273
|
o(Ce, ze);
|
|
143252
143274
|
};
|
|
143253
143275
|
Le(), this.pencil.controls.addEventListener("update", () => {
|
|
@@ -143280,9 +143302,9 @@ const objs$1 = qi(gi({}, objs$3), {
|
|
|
143280
143302
|
}
|
|
143281
143303
|
}
|
|
143282
143304
|
};
|
|
143283
|
-
C0(
|
|
143284
|
-
let index
|
|
143285
|
-
const timeOut = (v) =>
|
|
143305
|
+
C0(An, "VisName", "earth");
|
|
143306
|
+
let index = An;
|
|
143307
|
+
const timeOut = (v) => U0(void 0, null, function* () {
|
|
143286
143308
|
const e = makePromiseCreator();
|
|
143287
143309
|
return setTimeout(() => {
|
|
143288
143310
|
e.resolve();
|
|
@@ -143402,10 +143424,10 @@ class ContinentsBg extends Z$1 {
|
|
|
143402
143424
|
this.options = r;
|
|
143403
143425
|
}
|
|
143404
143426
|
create() {
|
|
143405
|
-
return
|
|
143427
|
+
return U0(this, null, function* () {
|
|
143406
143428
|
const { depth: r } = this.options, o = this.pencil.mList, V = this.pencil.lead, le = o.getMultiple("continents");
|
|
143407
143429
|
this.createGroup(), this.object3d.name = "大洲", yield Promise.all(
|
|
143408
|
-
Object.values(continentsLiteJson).map((fe) =>
|
|
143430
|
+
Object.values(continentsLiteJson).map((fe) => U0(this, null, function* () {
|
|
143409
143431
|
const Le = fe.features[0], Ce = Le.properties.adcode;
|
|
143410
143432
|
if (Ce === 10) return;
|
|
143411
143433
|
const Re = centroid$1(Le).geometry.coordinates;
|
|
@@ -143493,7 +143515,7 @@ class PlaneMap extends Z$1 {
|
|
|
143493
143515
|
});
|
|
143494
143516
|
}
|
|
143495
143517
|
create() {
|
|
143496
|
-
return
|
|
143518
|
+
return U0(this, null, function* () {
|
|
143497
143519
|
const { geojson: r, bbox: o } = this.options, V = this.geojson2Meta(r), le = this.pencil.getPlugin("worker"), fe = this.pencil.lead, Ce = yield this.pencil.loader.load("/1.png"), Re = V.flatMap(({ coords: wt }) => wt), Pe = yield le.geoGeometry("extrudePolygon", {
|
|
143498
143520
|
coordinatesArr: Re,
|
|
143499
143521
|
metaArray: Re.map(() => [this.options.depth]),
|
|
@@ -143630,10 +143652,10 @@ const TEMPLATE_CONFIGS = {
|
|
|
143630
143652
|
if (!e)
|
|
143631
143653
|
throw new Error(`Adcode ${v} not found`);
|
|
143632
143654
|
return e;
|
|
143633
|
-
}, fetchGeojsonData = (v, e, r, o) =>
|
|
143655
|
+
}, fetchGeojsonData = (v, e, r, o) => U0(void 0, null, function* () {
|
|
143634
143656
|
const V = o || e, { res: le } = yield jsonFetch(`${v}/geojson/${V}/${r}.json`);
|
|
143635
143657
|
return le;
|
|
143636
|
-
}), processTemplateImages = (v, e, r, o, V) =>
|
|
143658
|
+
}), processTemplateImages = (v, e, r, o, V) => U0(void 0, null, function* () {
|
|
143637
143659
|
const le = TEMPLATE_CONFIGS[v];
|
|
143638
143660
|
if (!(!le || le.cityOnly && !V))
|
|
143639
143661
|
try {
|
|
@@ -143656,7 +143678,7 @@ const TEMPLATE_CONFIGS = {
|
|
|
143656
143678
|
} catch (fe) {
|
|
143657
143679
|
console.warn(`模板 ${v} 图像资源加载失败:`, fe);
|
|
143658
143680
|
}
|
|
143659
|
-
}), getMapConfig = (V, ...le) =>
|
|
143681
|
+
}), getMapConfig = (V, ...le) => U0(void 0, [V, ...le], function* (v, e = getBaseUrl(), r, o) {
|
|
143660
143682
|
if ((r == null ? void 0 : r.style) === "map2CityOnMap")
|
|
143661
143683
|
return getMapWithCityConfig(v, e, r, o);
|
|
143662
143684
|
if (v === 0)
|
|
@@ -143679,7 +143701,7 @@ const TEMPLATE_CONFIGS = {
|
|
|
143679
143701
|
o
|
|
143680
143702
|
);
|
|
143681
143703
|
}
|
|
143682
|
-
}), getMapWithCityConfig = (V, ...le) =>
|
|
143704
|
+
}), getMapWithCityConfig = (V, ...le) => U0(void 0, [V, ...le], function* (v, e = getBaseUrl(), r, o) {
|
|
143683
143705
|
const fe = getAdcodeInfo(v), Le = fe ? findAdcodeInfo(fe.parent) : null, Ce = (fe == null ? void 0 : fe.level) === "district" && (Le == null ? void 0 : Le.level) === "city";
|
|
143684
143706
|
return extendMapConfig(
|
|
143685
143707
|
{
|
|
@@ -143694,7 +143716,7 @@ const TEMPLATE_CONFIGS = {
|
|
|
143694
143716
|
r,
|
|
143695
143717
|
o
|
|
143696
143718
|
);
|
|
143697
|
-
}), extendMapConfig = (V, ...le) =>
|
|
143719
|
+
}), extendMapConfig = (V, ...le) => U0(void 0, [V, ...le], function* (v, e = getBaseUrl(), r, o) {
|
|
143698
143720
|
var Vt, Zt;
|
|
143699
143721
|
if (v.adcode === 0 || v.adcode === 1e5)
|
|
143700
143722
|
return gi({}, v);
|
|
@@ -143772,7 +143794,7 @@ const getLabelElement = (v) => {
|
|
|
143772
143794
|
const e = this.loader;
|
|
143773
143795
|
e.add(["/image/map/jianbian.webp"]), e.add(["/image/map/hp2.webp", "/image/map/fx2.webp"]);
|
|
143774
143796
|
}, v.initMaterial = function() {
|
|
143775
|
-
return
|
|
143797
|
+
return U0(this, null, function* () {
|
|
143776
143798
|
const e = this.loader, r = this.mList, o = (() => {
|
|
143777
143799
|
const V = e.getAsset("/image/map/hp2.webp");
|
|
143778
143800
|
V.center.set(0.5, 0.5), V.repeat.set(0.97, 1.01);
|
|
@@ -143816,7 +143838,7 @@ const getLabelElement = (v) => {
|
|
|
143816
143838
|
return;
|
|
143817
143839
|
}
|
|
143818
143840
|
v.initMaterial = function() {
|
|
143819
|
-
return
|
|
143841
|
+
return U0(this, null, function* () {
|
|
143820
143842
|
const e = this.mList, r = (() => {
|
|
143821
143843
|
const o = new MeshBasicMaterial({
|
|
143822
143844
|
name: "顶面",
|
|
@@ -143851,7 +143873,7 @@ const getLabelElement = (v) => {
|
|
|
143851
143873
|
};
|
|
143852
143874
|
}, china = (v) => {
|
|
143853
143875
|
v.options.lineOffset = 5e-3, v.loaderAdd = function() {
|
|
143854
|
-
return
|
|
143876
|
+
return U0(this, null, function* () {
|
|
143855
143877
|
this.loader.add([
|
|
143856
143878
|
"/image/map/jianbian.webp",
|
|
143857
143879
|
"/image/map/hp.webp",
|
|
@@ -143859,7 +143881,7 @@ const getLabelElement = (v) => {
|
|
|
143859
143881
|
]), this.loaderAddBg();
|
|
143860
143882
|
});
|
|
143861
143883
|
}, v.initMaterial = function() {
|
|
143862
|
-
return
|
|
143884
|
+
return U0(this, null, function* () {
|
|
143863
143885
|
const e = this.loader, r = (() => {
|
|
143864
143886
|
const o = new MeshStandardMaterial({
|
|
143865
143887
|
name: "顶面",
|
|
@@ -143895,11 +143917,11 @@ const getLabelElement = (v) => {
|
|
|
143895
143917
|
};
|
|
143896
143918
|
}, base$1 = (v) => {
|
|
143897
143919
|
v.loaderAdd = function() {
|
|
143898
|
-
return
|
|
143920
|
+
return U0(this, null, function* () {
|
|
143899
143921
|
this.loader.add(["/image/map/jianbian.webp"]), this.loaderAddBg();
|
|
143900
143922
|
});
|
|
143901
143923
|
}, v.initMaterial = function() {
|
|
143902
|
-
return
|
|
143924
|
+
return U0(this, null, function* () {
|
|
143903
143925
|
const e = this.loader, r = (() => {
|
|
143904
143926
|
const o = new MeshBasicMaterial({
|
|
143905
143927
|
name: "顶面",
|
|
@@ -143954,7 +143976,7 @@ const getLabelElement = (v) => {
|
|
|
143954
143976
|
}, v.options.parentBg && (v.extendsOptions.parentBgDepth = () => v.options.parentBgDepth), v.loaderAdd = function() {
|
|
143955
143977
|
this.loader.add(["/image/map2/side.png"]);
|
|
143956
143978
|
}, v.initMaterial = function() {
|
|
143957
|
-
return
|
|
143979
|
+
return U0(this, null, function* () {
|
|
143958
143980
|
const r = this.loader, o = (() => {
|
|
143959
143981
|
const V = new MeshBasicMaterial({
|
|
143960
143982
|
name: "板块顶面",
|
|
@@ -143990,13 +144012,13 @@ const getLabelElement = (v) => {
|
|
|
143990
144012
|
};
|
|
143991
144013
|
const e = v.init.bind(v);
|
|
143992
144014
|
v.init = function() {
|
|
143993
|
-
return
|
|
144015
|
+
return U0(this, null, function* () {
|
|
143994
144016
|
yield e(), yield this.initCityOnMap(this.mapInfo.adcode);
|
|
143995
144017
|
});
|
|
143996
144018
|
};
|
|
143997
144019
|
}, base = (v) => {
|
|
143998
144020
|
if (v.initMaterialBg = function() {
|
|
143999
|
-
return
|
|
144021
|
+
return U0(this, null, function* () {
|
|
144000
144022
|
const e = this.getRoomEnvMap();
|
|
144001
144023
|
if (this.options.parentBg) {
|
|
144002
144024
|
if (this.options.adcode !== 1e5) {
|
|
@@ -144080,11 +144102,11 @@ const getLabelElement = (v) => {
|
|
|
144080
144102
|
return;
|
|
144081
144103
|
}
|
|
144082
144104
|
v.loaderAdd = function() {
|
|
144083
|
-
return
|
|
144105
|
+
return U0(this, null, function* () {
|
|
144084
144106
|
this.loaderAddBg();
|
|
144085
144107
|
});
|
|
144086
144108
|
}, v.initMaterial = function() {
|
|
144087
|
-
return
|
|
144109
|
+
return U0(this, null, function* () {
|
|
144088
144110
|
const e = (() => {
|
|
144089
144111
|
const r = new MeshBasicMaterial({
|
|
144090
144112
|
name: "板块顶面",
|
|
@@ -144126,7 +144148,7 @@ const getLabelElement = (v) => {
|
|
|
144126
144148
|
return r === "district" && V === "province" && e ? "city" : r;
|
|
144127
144149
|
} else if (continentsType.find((r) => r.adcode === v))
|
|
144128
144150
|
return "continent";
|
|
144129
|
-
},
|
|
144151
|
+
}, Cn = class Cn extends Base {
|
|
144130
144152
|
constructor() {
|
|
144131
144153
|
super(...arguments);
|
|
144132
144154
|
C0(this, "leadObjs", objs);
|
|
@@ -144250,12 +144272,12 @@ const getLabelElement = (v) => {
|
|
|
144250
144272
|
})), this.options.equirectangular && (this.options.projectionType = "equirectangular"), this.options.winkel3 && (this.options.projectionType = "winkel3"), this.options.adcode === 0 ? this.extendsOptions.winkel3 = () => this.options.winkel3 : (this.getAdcodeShowLevel(this.options.adcode) === "province" || this.getAdcodeShowLevel(this.options.adcode) === "country") && (this.extendsOptions.clickHandleDrillDown = () => this.options.clickHandleDrillDown, this.options.clickHandleDrillDown && (this.extendsOptions.mapDepth = () => Array.isArray(this.options.mapDepth) ? this.options.mapDepth : new Array(3).fill(this.options.mapDepth), this.extendsOptions.drillDownFirstLevelUseBgMats = () => this.options.drillDownFirstLevelUseBgMats, this.extendsOptions.drillDownSecondLevelMats = () => this.options.drillDownSecondLevelMats, this.extendsOptions.drillDownThirdLevelMats = () => this.options.drillDownThirdLevelMats, this.extendsOptions.drillDownPlateInCenter = () => this.options.drillDownPlateInCenter, this.extendsOptions.clickOusideBack = () => this.options.clickOusideBack, this.extendsOptions.handleBackKeepCamvasState = () => this.options.handleBackKeepCamvasState, this.extendsOptions.showOneLevel = () => this.options.showOneLevel, this.extendsOptions.showDistrict = () => this.options.showDistrict, this.options.parentBg && (this.extendsOptions.drillDownHideParent = () => this.options.drillDownHideParent)), this.extendsOptions.parentBg = () => this.options.parentBg, this.options.parentBg && (this.extendsOptions.parentBgDepth = () => this.options.parentBgDepth, this.options.adcode === 1e5 && (this.extendsOptions.worldPacificCentre = () => this.options.worldPacificCentre)), this.extendsOptions.continentsBg = () => this.options.continentsBg, this.options.continentsBg && (this.extendsOptions.continentsBgDepth = () => this.options.continentsBgDepth)), this.options.adcode === 0 ? world(this) : this.options.style === "map2Base" || this.options.style === "map2CityOnMap" ? base(this) : this.options.adcode === 1e5 ? china(this) : base$1(this);
|
|
144251
144273
|
}
|
|
144252
144274
|
handleSetting(r, o) {
|
|
144253
|
-
return
|
|
144254
|
-
return yield
|
|
144275
|
+
return U0(this, null, function* () {
|
|
144276
|
+
return yield Zn(Cn.prototype, this, "handleSetting").call(this, r, o), r === "label" ? o === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.labelLite = !1, yield this.settings.labelLite, this.options.showLabel = !0, yield this.drawLabels()) : r === "labelLite" ? o === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.label = !1, yield this.settings.label, this.options.showLabel = "lite", yield this.drawLabels()) : r === "shadowMap" && (o === !1 ? this.shadowMapDisabled() : yield this.shadowMapEnabled()), o;
|
|
144255
144277
|
});
|
|
144256
144278
|
}
|
|
144257
144279
|
init() {
|
|
144258
|
-
return
|
|
144280
|
+
return U0(this, null, function* () {
|
|
144259
144281
|
const { adcode: r } = this.options;
|
|
144260
144282
|
this.options.center && (this.pcenter = this.options.center), this.options.worldPacificCentre && r === 1e5 && (this.pcenter = [this.pcenter[0] - 160, this.pcenter[1]]), this.projection = f({
|
|
144261
144283
|
center: this.pcenter,
|
|
@@ -144280,7 +144302,7 @@ const getLabelElement = (v) => {
|
|
|
144280
144302
|
});
|
|
144281
144303
|
}
|
|
144282
144304
|
initCityVis(r, o = !1) {
|
|
144283
|
-
return
|
|
144305
|
+
return U0(this, null, function* () {
|
|
144284
144306
|
var Le;
|
|
144285
144307
|
if ((Le = this.options.fixCity) != null && Le[r] && (r = this.options.fixCity[r]), r === 71e4)
|
|
144286
144308
|
return this.settings.mouseLeft = Xi.SCREEN_PAN, yield this.settings.mouseLeft, this.pencil.camera.userData.up = "0,0,1", null;
|
|
@@ -144310,7 +144332,7 @@ const getLabelElement = (v) => {
|
|
|
144310
144332
|
});
|
|
144311
144333
|
}
|
|
144312
144334
|
initCityOnMap(r) {
|
|
144313
|
-
return
|
|
144335
|
+
return U0(this, null, function* () {
|
|
144314
144336
|
const o = this.getAdcodeShowLevel(r);
|
|
144315
144337
|
if (o === "province") {
|
|
144316
144338
|
const V = yield this.initCityVis(r);
|
|
@@ -144341,7 +144363,7 @@ const getLabelElement = (v) => {
|
|
|
144341
144363
|
});
|
|
144342
144364
|
}
|
|
144343
144365
|
initVisBg() {
|
|
144344
|
-
return
|
|
144366
|
+
return U0(this, null, function* () {
|
|
144345
144367
|
let r = 1e3, o = 1e3;
|
|
144346
144368
|
const V = new Vector3(0, 0, 0);
|
|
144347
144369
|
if (this.options.parentBg) {
|
|
@@ -144437,7 +144459,7 @@ const getLabelElement = (v) => {
|
|
|
144437
144459
|
});
|
|
144438
144460
|
}
|
|
144439
144461
|
initVis(r) {
|
|
144440
|
-
return
|
|
144462
|
+
return U0(this, null, function* () {
|
|
144441
144463
|
var o;
|
|
144442
144464
|
if (yield this.setAdcode({
|
|
144443
144465
|
adcodes: [r],
|
|
@@ -144468,7 +144490,7 @@ const getLabelElement = (v) => {
|
|
|
144468
144490
|
);
|
|
144469
144491
|
}
|
|
144470
144492
|
initMaterialBg() {
|
|
144471
|
-
return
|
|
144493
|
+
return U0(this, null, function* () {
|
|
144472
144494
|
if (this.options.parentBg) {
|
|
144473
144495
|
const r = (() => {
|
|
144474
144496
|
const o = new MeshStandardMaterial({
|
|
@@ -144551,7 +144573,7 @@ const getLabelElement = (v) => {
|
|
|
144551
144573
|
}
|
|
144552
144574
|
}
|
|
144553
144575
|
addAreaPlaneByProperty(r, o, V) {
|
|
144554
|
-
return
|
|
144576
|
+
return U0(this, null, function* () {
|
|
144555
144577
|
if (!this.map) return;
|
|
144556
144578
|
const fe = this.map.options.geojson.features.find(
|
|
144557
144579
|
(Le) => Le.properties && Le.properties[r] === o
|
|
@@ -144610,8 +144632,8 @@ const getLabelElement = (v) => {
|
|
|
144610
144632
|
});
|
|
144611
144633
|
}
|
|
144612
144634
|
showAction() {
|
|
144613
|
-
return
|
|
144614
|
-
|
|
144635
|
+
return U0(this, null, function* () {
|
|
144636
|
+
Zn(Cn.prototype, this, "showAction").call(this), this.useSaveCamera(`map-${this.options.adcode}`);
|
|
144615
144637
|
const r = this.lead.group;
|
|
144616
144638
|
if (this.mapHistory[0]) {
|
|
144617
144639
|
const { stop: o, start: V } = sinusoidalInOut({
|
|
@@ -144628,7 +144650,7 @@ const getLabelElement = (v) => {
|
|
|
144628
144650
|
});
|
|
144629
144651
|
}
|
|
144630
144652
|
hide() {
|
|
144631
|
-
return
|
|
144653
|
+
return U0(this, null, function* () {
|
|
144632
144654
|
if (!this.showState) return;
|
|
144633
144655
|
const r = this.lead.group;
|
|
144634
144656
|
yield sinusoidalInOut({
|
|
@@ -144636,12 +144658,12 @@ const getLabelElement = (v) => {
|
|
|
144636
144658
|
r.position.z = -this.mapHistory[0].depth * o;
|
|
144637
144659
|
}
|
|
144638
144660
|
}).start(), setTimeout(() => {
|
|
144639
|
-
|
|
144661
|
+
Zn(Cn.prototype, this, "hide").call(this);
|
|
144640
144662
|
});
|
|
144641
144663
|
});
|
|
144642
144664
|
}
|
|
144643
144665
|
shadowMapEnabled() {
|
|
144644
|
-
return
|
|
144666
|
+
return U0(this, null, function* () {
|
|
144645
144667
|
if (this.pencil.scene.userData.shadowMapEnabled) return;
|
|
144646
144668
|
this.pencil.scene.userData.shadowMapEnabled = !0;
|
|
144647
144669
|
const r = yield this.lead.draw("Light", {
|
|
@@ -144709,7 +144731,7 @@ const getLabelElement = (v) => {
|
|
|
144709
144731
|
return o;
|
|
144710
144732
|
}
|
|
144711
144733
|
showMap(le) {
|
|
144712
|
-
return
|
|
144734
|
+
return U0(this, arguments, function* ({
|
|
144713
144735
|
adcode: r,
|
|
144714
144736
|
adcodes: o,
|
|
144715
144737
|
duration: V = 1e3
|
|
@@ -144722,7 +144744,7 @@ const getLabelElement = (v) => {
|
|
|
144722
144744
|
});
|
|
144723
144745
|
}
|
|
144724
144746
|
drawLabels() {
|
|
144725
|
-
return
|
|
144747
|
+
return U0(this, null, function* () {
|
|
144726
144748
|
var V;
|
|
144727
144749
|
const r = this.options.showLabel;
|
|
144728
144750
|
if (!((V = this.mapArea) != null && V.length) || !r) return;
|
|
@@ -144734,7 +144756,7 @@ const getLabelElement = (v) => {
|
|
|
144734
144756
|
},
|
|
144735
144757
|
this.group
|
|
144736
144758
|
), o.object3d.name = "地图标签组", yield Promise.all(
|
|
144737
|
-
this.mapArea.map((le) =>
|
|
144759
|
+
this.mapArea.map((le) => U0(this, null, function* () {
|
|
144738
144760
|
let { name: fe, adcode: Le, centroid: Ce } = le.userData;
|
|
144739
144761
|
const { DistrictID: Re, DistName: Pe, iso_a2: ze, center: Fe } = le.userData;
|
|
144740
144762
|
if (Le = Le || ze || Re, Ce = Ce || Fe, fe = fe || Pe, !Ce)
|
|
@@ -144840,7 +144862,7 @@ const getLabelElement = (v) => {
|
|
|
144840
144862
|
}) : !1;
|
|
144841
144863
|
}
|
|
144842
144864
|
getGeojson(r, o = !1) {
|
|
144843
|
-
return
|
|
144865
|
+
return U0(this, null, function* () {
|
|
144844
144866
|
var V, le, fe, Le;
|
|
144845
144867
|
return o ? this.options.extrudeLine ? (fe = this.options.extrudeLineGeojsonMap) != null && fe[r] ? { res: (Le = this.options.extrudeLineGeojsonMap) == null ? void 0 : Le[r] } : yield jsonFetch(
|
|
144846
144868
|
`${this.options.assetsPrefix}/geojson/json-lite/${r}.json`
|
|
@@ -144852,7 +144874,7 @@ const getLabelElement = (v) => {
|
|
|
144852
144874
|
});
|
|
144853
144875
|
}
|
|
144854
144876
|
handleDrillDown(Le) {
|
|
144855
|
-
return
|
|
144877
|
+
return U0(this, arguments, function* ({
|
|
144856
144878
|
adcode: r,
|
|
144857
144879
|
duration: o,
|
|
144858
144880
|
handleLook: V,
|
|
@@ -144896,7 +144918,7 @@ const getLabelElement = (v) => {
|
|
|
144896
144918
|
extrudelineBloom: fe
|
|
144897
144919
|
});
|
|
144898
144920
|
ke == null || ke.hide(), s0.position.setZ(jt);
|
|
144899
|
-
const $t = s0.position.z, qt = () =>
|
|
144921
|
+
const $t = s0.position.z, qt = () => U0(this, null, function* () {
|
|
144900
144922
|
yield sinusoidalInOut({
|
|
144901
144923
|
onUpdate: (e0) => {
|
|
144902
144924
|
Yt !== $t && (s0.position.z = $t + (Yt - $t) * e0);
|
|
@@ -144914,7 +144936,7 @@ const getLabelElement = (v) => {
|
|
|
144914
144936
|
enableTransition: o !== 0,
|
|
144915
144937
|
polarAngle: e0 == null ? void 0 : e0.polarAngle,
|
|
144916
144938
|
azimuthAngle: e0 == null ? void 0 : e0.azimuthAngle,
|
|
144917
|
-
handleStart: () =>
|
|
144939
|
+
handleStart: () => U0(this, null, function* () {
|
|
144918
144940
|
s0.position.z = $t, yield qt();
|
|
144919
144941
|
})
|
|
144920
144942
|
});
|
|
@@ -144956,7 +144978,7 @@ const getLabelElement = (v) => {
|
|
|
144956
144978
|
r === 0 ? (this.pencil.camera.near = 1, this.pencil.camera.far = 1e3, this.pencil.camera.updateProjectionMatrix()) : (o === "country" || o === "province") && this.pencil.camera.near !== V.camera.near * 10 ? (this.pencil.camera.near = V.camera.near * 10, this.pencil.camera.updateProjectionMatrix()) : (o === "city" || o === "district") && this.pencil.camera.near !== V.camera.near && (this.pencil.camera.near = V.camera.near, this.pencil.camera.updateProjectionMatrix());
|
|
144957
144979
|
}
|
|
144958
144980
|
fitTo(Re) {
|
|
144959
|
-
return
|
|
144981
|
+
return U0(this, arguments, function* (r, {
|
|
144960
144982
|
polarAngle: o,
|
|
144961
144983
|
azimuthAngle: V,
|
|
144962
144984
|
z: le,
|
|
@@ -144997,7 +145019,7 @@ const getLabelElement = (v) => {
|
|
|
144997
145019
|
});
|
|
144998
145020
|
}
|
|
144999
145021
|
drawPlaneMap(Ce) {
|
|
145000
|
-
return
|
|
145022
|
+
return U0(this, arguments, function* ({
|
|
145001
145023
|
geojson: r,
|
|
145002
145024
|
extrudeLineGeojson: o,
|
|
145003
145025
|
bbox: V,
|
|
@@ -145053,7 +145075,7 @@ const getLabelElement = (v) => {
|
|
|
145053
145075
|
});
|
|
145054
145076
|
}
|
|
145055
145077
|
handleBack() {
|
|
145056
|
-
return
|
|
145078
|
+
return U0(this, arguments, function* ({
|
|
145057
145079
|
duration: r = 1e3,
|
|
145058
145080
|
handleLookBack: o = !0,
|
|
145059
145081
|
keepOne: V = !0
|
|
@@ -145084,7 +145106,7 @@ const getLabelElement = (v) => {
|
|
|
145084
145106
|
});
|
|
145085
145107
|
}
|
|
145086
145108
|
handleLookBack(r) {
|
|
145087
|
-
return
|
|
145109
|
+
return U0(this, null, function* () {
|
|
145088
145110
|
const { userControls: o, controls: V } = this.mapObj;
|
|
145089
145111
|
yield this.pencil.controls.setLookAt(
|
|
145090
145112
|
...o ? o.lookAt : V.lookAt,
|
|
@@ -145104,7 +145126,7 @@ const getLabelElement = (v) => {
|
|
|
145104
145126
|
return fe;
|
|
145105
145127
|
}
|
|
145106
145128
|
setAdcode(V) {
|
|
145107
|
-
return
|
|
145129
|
+
return U0(this, arguments, function* ({
|
|
145108
145130
|
adcodes: r,
|
|
145109
145131
|
duration: o
|
|
145110
145132
|
}) {
|
|
@@ -145145,7 +145167,7 @@ const getLabelElement = (v) => {
|
|
|
145145
145167
|
[ke, Gt, Vt, Zt, xt]
|
|
145146
145168
|
);
|
|
145147
145169
|
try {
|
|
145148
|
-
for (var Re =
|
|
145170
|
+
for (var Re = Dn(Kt.entries()), Pe, ze, Fe; Pe = !(ze = yield Re.next()).done; Pe = !1) {
|
|
145149
145171
|
const [Yt, jt] = ze.value;
|
|
145150
145172
|
const n0 = Yt === Kt.length - 1 ? o : 0, a0 = Yt === Kt.length - 1;
|
|
145151
145173
|
jt === -1 ? yield this.handleBack({
|
|
@@ -145190,8 +145212,269 @@ const getLabelElement = (v) => {
|
|
|
145190
145212
|
}), this.parentBg.length = 0, (V = this.continentsBg) == null || V.dispose(), this.continentsBg = void 0, this.mapHistory.length = 0, super.dispose();
|
|
145191
145213
|
}
|
|
145192
145214
|
};
|
|
145193
|
-
C0(
|
|
145194
|
-
let
|
|
145215
|
+
C0(Cn, "VisName", "map"), C0(Cn, "getAdcodeShowLevel", getAdcodeShowLevel), C0(Cn, "findAdcodeInfo", findAdcodeInfo), C0(Cn, "findNameInfo", findNameInfo);
|
|
145216
|
+
let Map$1 = Cn;
|
|
145217
|
+
class MapManager {
|
|
145218
|
+
constructor(e) {
|
|
145219
|
+
C0(this, "container");
|
|
145220
|
+
C0(this, "controlsContainer");
|
|
145221
|
+
C0(this, "assetsPrefix");
|
|
145222
|
+
C0(this, "fixConfig");
|
|
145223
|
+
C0(this, "raycasterPointsThreshold");
|
|
145224
|
+
// 缩放控制常量
|
|
145225
|
+
C0(this, "MAX_ZOOM_FACTOR", 0.3);
|
|
145226
|
+
// 最大缩放距离因子
|
|
145227
|
+
C0(this, "MIN_ZOOM_FACTOR", 4);
|
|
145228
|
+
// 最小缩放距离因子
|
|
145229
|
+
// 地图实例管理
|
|
145230
|
+
C0(this, "mapInstances", {});
|
|
145231
|
+
C0(this, "mapDistances", {});
|
|
145232
|
+
C0(this, "mapConfigs", {});
|
|
145233
|
+
C0(this, "currentMap", null);
|
|
145234
|
+
C0(this, "currentZoom", 1);
|
|
145235
|
+
// 分组管理
|
|
145236
|
+
C0(this, "groups", {});
|
|
145237
|
+
// 事件处理器
|
|
145238
|
+
C0(this, "eventHandlers", {});
|
|
145239
|
+
// 定时器管理
|
|
145240
|
+
C0(this, "areaCloseTimer", null);
|
|
145241
|
+
this.container = e.container, this.controlsContainer = e.controlsContainer || e.container, this.assetsPrefix = e.assetsPrefix, this.fixConfig = e.fixConfig, this.raycasterPointsThreshold = e.raycasterPointsThreshold || 5e-3;
|
|
145242
|
+
}
|
|
145243
|
+
/**
|
|
145244
|
+
* 设置事件处理器
|
|
145245
|
+
*/
|
|
145246
|
+
setEventHandlers(e) {
|
|
145247
|
+
this.eventHandlers = gi(gi({}, this.eventHandlers), e);
|
|
145248
|
+
}
|
|
145249
|
+
/**
|
|
145250
|
+
* 触发事件
|
|
145251
|
+
*/
|
|
145252
|
+
emit(e, ...r) {
|
|
145253
|
+
const o = this.eventHandlers[e];
|
|
145254
|
+
o && typeof o == "function" && o(...r);
|
|
145255
|
+
}
|
|
145256
|
+
/**
|
|
145257
|
+
* 获取当前地图实例
|
|
145258
|
+
*/
|
|
145259
|
+
getCurrentMap() {
|
|
145260
|
+
return this.currentMap;
|
|
145261
|
+
}
|
|
145262
|
+
/**
|
|
145263
|
+
* 获取当前缩放级别
|
|
145264
|
+
*/
|
|
145265
|
+
getCurrentZoom() {
|
|
145266
|
+
return this.currentZoom;
|
|
145267
|
+
}
|
|
145268
|
+
/**
|
|
145269
|
+
* 初始化地图
|
|
145270
|
+
*/
|
|
145271
|
+
initMap(e, r = !1) {
|
|
145272
|
+
return U0(this, null, function* () {
|
|
145273
|
+
const o = e.at(-1) || e.at(-2);
|
|
145274
|
+
return o ? this.createMapInstance(o, r) : null;
|
|
145275
|
+
});
|
|
145276
|
+
}
|
|
145277
|
+
/**
|
|
145278
|
+
* 创建地图实例
|
|
145279
|
+
*/
|
|
145280
|
+
createMapInstance(e, r = !1) {
|
|
145281
|
+
return U0(this, null, function* () {
|
|
145282
|
+
var Pe, ze;
|
|
145283
|
+
const o = Object.values(this.mapInstances)[0], V = (Pe = Map$1.getAdcodeShowLevel(e)) != null ? Pe : "country", le = Map$1.findAdcodeInfo(e), fe = o == null ? void 0 : o.pencil, Le = this.mapInstances[V];
|
|
145284
|
+
if (Le)
|
|
145285
|
+
if (Le.pencil.controls.maxDistance = 1 / 0, Le.pencil.controls.minDistance = 0, Le.options.adcode === e && !r && !Le.options.fixedAdcode) {
|
|
145286
|
+
Le.setSceneActive(), this.currentMap = Le, Le.pencil.controls.maxDistance = this.mapDistances[V] / this.MAX_ZOOM_FACTOR, Le.pencil.controls.minDistance = this.mapDistances[V] / this.MIN_ZOOM_FACTOR;
|
|
145287
|
+
const Fe = Le.pencil.controls.distance, ke = Math.round(this.mapDistances[V] / Fe * 10) / 10;
|
|
145288
|
+
return this.currentZoom !== ke && (this.currentZoom = ke, this.emit("zoomChange", ke)), Le;
|
|
145289
|
+
} else
|
|
145290
|
+
Le.options.pencil = fe, Le.dispose(), delete this.mapInstances[V];
|
|
145291
|
+
const Ce = new Map$1({
|
|
145292
|
+
container: this.container,
|
|
145293
|
+
controlsContainer: this.controlsContainer,
|
|
145294
|
+
assetsPrefix: this.assetsPrefix,
|
|
145295
|
+
pencil: fe
|
|
145296
|
+
});
|
|
145297
|
+
let Re = 0;
|
|
145298
|
+
return yield Ce.fromJSON((ze = this.mapConfigs[V]) != null ? ze : `/${V}.gz`, {
|
|
145299
|
+
preprocessor: (Fe) => U0(this, null, function* () {
|
|
145300
|
+
if (Re = Fe.h.u[0].visOptions.adcode, V === "province" || V === "city" || V === "district") {
|
|
145301
|
+
const ke = yield getMapConfig(
|
|
145302
|
+
e,
|
|
145303
|
+
this.assetsPrefix,
|
|
145304
|
+
Fe.h.u[0].visOptions,
|
|
145305
|
+
Fe.h.i
|
|
145306
|
+
);
|
|
145307
|
+
Fe.h.u[0].visOptions = ke, le != null && le.c.length && (Fe.h.u[0].visOptions.showBuilding = !1);
|
|
145308
|
+
}
|
|
145309
|
+
return Fe;
|
|
145310
|
+
}),
|
|
145311
|
+
useCache: !0
|
|
145312
|
+
}), Ce.pencil.camera.near = 0.01, Ce.pencil.camera.updateProjectionMatrix(), Ce.pencil.raycaster.params.Points.threshold = this.raycasterPointsThreshold, Ce.pencil.controls.addEventListener("update", () => {
|
|
145313
|
+
const Fe = Ce.pencil.controls.distance, ke = Math.round(this.mapDistances[V] / Fe * 10) / 10;
|
|
145314
|
+
this.currentZoom !== ke && (this.currentZoom = ke, this.emit("zoomChange", ke));
|
|
145315
|
+
}), V !== "country" && (Ce.options.mapPadding = [220, 300, 70, 0], Ce.options.polarAngle = -Math.PI, yield Ce.fitTo(Ce.map, { enableTransition: !1 }), yield Ce.fitTo(Ce.map, { enableTransition: !1 })), this.applyFixConfig(Ce, V, Re, e), le != null && le.c.length && !r && this.bindAreaEvents(Ce), this.mapInstances[V] = Ce, Ce.setSceneActive(), this.currentMap = Ce, this.currentZoom = 1, this.emit("zoomChange", 1), this.mapDistances[V] = Ce.pencil.controls.distance, Ce.pencil.controls.maxDistance = Ce.pencil.controls.distance / this.MAX_ZOOM_FACTOR, Ce.pencil.controls.minDistance = Ce.pencil.controls.distance / this.MIN_ZOOM_FACTOR, Ce.options.fixedAdcode = r, Ce;
|
|
145316
|
+
});
|
|
145317
|
+
}
|
|
145318
|
+
/**
|
|
145319
|
+
* 应用地图修复配置
|
|
145320
|
+
*/
|
|
145321
|
+
applyFixConfig(e, r, o, V) {
|
|
145322
|
+
if (!this.fixConfig) return;
|
|
145323
|
+
const le = this.fixConfig[`level:${r}`];
|
|
145324
|
+
if (!le) return;
|
|
145325
|
+
const fe = e.findAdcodeInfo(o), Le = e.findAdcodeInfo(V), Ce = e.getReferenceScale(fe.b, Le.b);
|
|
145326
|
+
[...le.s].forEach((Re) => {
|
|
145327
|
+
const Pe = e.baseObjectByUuid(Re);
|
|
145328
|
+
if (Pe) {
|
|
145329
|
+
Pe.scale.multiplyScalar(Ce);
|
|
145330
|
+
const { center: ze } = e.map.getSize();
|
|
145331
|
+
Pe.position.x = ze.x, Pe.position.y = ze.y;
|
|
145332
|
+
}
|
|
145333
|
+
}), [...le.z].forEach((Re) => {
|
|
145334
|
+
const Pe = e.baseObjectByUuid(Re);
|
|
145335
|
+
Pe && (Pe.position.z *= Ce);
|
|
145336
|
+
});
|
|
145337
|
+
}
|
|
145338
|
+
/**
|
|
145339
|
+
* 绑定区域交互事件
|
|
145340
|
+
*/
|
|
145341
|
+
bindAreaEvents(e) {
|
|
145342
|
+
e.mapArea.forEach((r) => {
|
|
145343
|
+
r.onPointerEnter(() => {
|
|
145344
|
+
this.areaCloseTimer && (clearTimeout(this.areaCloseTimer), this.areaCloseTimer = null), r.useMListByName("顶面高亮", 0);
|
|
145345
|
+
const o = r.userData.centroid || r.userData.center;
|
|
145346
|
+
if (!o) return;
|
|
145347
|
+
const V = e.getLocationPosition([...o]), le = e.getScreenPosition(...V);
|
|
145348
|
+
this.emit("areaHover", r.userData.name, {
|
|
145349
|
+
x: le.x,
|
|
145350
|
+
y: le.y
|
|
145351
|
+
});
|
|
145352
|
+
}), r.onPointerLeave(() => {
|
|
145353
|
+
r.useMListByName("顶面", 0), this.areaCloseTimer = setTimeout(() => {
|
|
145354
|
+
this.emit("areaLeave");
|
|
145355
|
+
}, 200);
|
|
145356
|
+
}), r.onClick(() => {
|
|
145357
|
+
r.useMListByName("顶面", 0), this.emit("areaClick", r.userData.name, r.userData.adcode);
|
|
145358
|
+
});
|
|
145359
|
+
});
|
|
145360
|
+
}
|
|
145361
|
+
/**
|
|
145362
|
+
* 设置缩放级别
|
|
145363
|
+
*/
|
|
145364
|
+
setZoom(e) {
|
|
145365
|
+
var le;
|
|
145366
|
+
if (!this.currentMap || this.currentZoom === e) return;
|
|
145367
|
+
const r = (le = Map$1.getAdcodeShowLevel(this.currentMap.options.adcode)) != null ? le : "country", o = this.mapDistances[r];
|
|
145368
|
+
if (!o) return;
|
|
145369
|
+
const V = o / e;
|
|
145370
|
+
this.currentZoom = e, this.currentMap.pencil.controls.distance = V;
|
|
145371
|
+
}
|
|
145372
|
+
/**
|
|
145373
|
+
* 创建分组
|
|
145374
|
+
* @param groupId 分组ID,用于后续管理
|
|
145375
|
+
* @returns 分组实例
|
|
145376
|
+
*/
|
|
145377
|
+
createGroup(e) {
|
|
145378
|
+
return U0(this, null, function* () {
|
|
145379
|
+
if (!this.currentMap) return null;
|
|
145380
|
+
e in this.groups && this.clearGroup(e);
|
|
145381
|
+
const r = yield this.currentMap.addGroup();
|
|
145382
|
+
return this.groups[e] = r, r;
|
|
145383
|
+
});
|
|
145384
|
+
}
|
|
145385
|
+
/**
|
|
145386
|
+
* 获取分组
|
|
145387
|
+
*/
|
|
145388
|
+
getGroup(e) {
|
|
145389
|
+
return this.groups[e];
|
|
145390
|
+
}
|
|
145391
|
+
/**
|
|
145392
|
+
* 清除指定分组
|
|
145393
|
+
*/
|
|
145394
|
+
clearGroup(e) {
|
|
145395
|
+
const r = this.groups[e];
|
|
145396
|
+
r && (r.erase(), delete this.groups[e]);
|
|
145397
|
+
}
|
|
145398
|
+
/**
|
|
145399
|
+
* 清除所有分组
|
|
145400
|
+
*/
|
|
145401
|
+
clearAllGroups() {
|
|
145402
|
+
Object.values(this.groups).forEach((e) => {
|
|
145403
|
+
e.erase();
|
|
145404
|
+
}), this.groups = {};
|
|
145405
|
+
}
|
|
145406
|
+
/**
|
|
145407
|
+
* 清除区域关闭定时器(供 PortalModal 调用)
|
|
145408
|
+
*/
|
|
145409
|
+
clearAreaCloseTimer() {
|
|
145410
|
+
this.areaCloseTimer && (clearTimeout(this.areaCloseTimer), this.areaCloseTimer = null);
|
|
145411
|
+
}
|
|
145412
|
+
/**
|
|
145413
|
+
* 销毁所有地图实例
|
|
145414
|
+
*/
|
|
145415
|
+
dispose() {
|
|
145416
|
+
this.areaCloseTimer && (clearTimeout(this.areaCloseTimer), this.areaCloseTimer = null), this.clearAllGroups(), Object.values(this.mapInstances).forEach((e) => {
|
|
145417
|
+
e.dispose();
|
|
145418
|
+
}), this.mapInstances = {}, this.currentMap = null, Editor.clearUrlCache();
|
|
145419
|
+
}
|
|
145420
|
+
}
|
|
145421
|
+
C0(MapManager, "findNameInfo", Map$1.findNameInfo), C0(MapManager, "getAdcodeShowLevel", Map$1.getAdcodeShowLevel), C0(MapManager, "findAdcodeInfo", Map$1.findAdcodeInfo);
|
|
145422
|
+
const _inverseMatrix = /* @__PURE__ */ new Matrix4(), _ray = /* @__PURE__ */ new Ray(), _sphere = /* @__PURE__ */ new Sphere$1(), _position$2 = /* @__PURE__ */ new Vector3();
|
|
145423
|
+
function proposedRaycast(v, e) {
|
|
145424
|
+
const r = this.geometry, o = this.matrixWorld, V = v.params.Points.threshold, le = r.drawRange;
|
|
145425
|
+
r.boundingSphere === null && r.computeBoundingSphere(), _sphere.copy(r.boundingSphere), _sphere.applyMatrix4(o), _sphere.radius += V, _inverseMatrix.copy(o).invert(), _ray.copy(v.ray).applyMatrix4(_inverseMatrix);
|
|
145426
|
+
const fe = V / ((this.scale.x + this.scale.y + this.scale.z) / 3), Le = r.index, Re = r.attributes.position;
|
|
145427
|
+
if (Le !== null) {
|
|
145428
|
+
const Pe = Math.max(0, le.start), ze = Math.min(Le.count, le.start + le.count);
|
|
145429
|
+
for (let Fe = Pe, ke = ze; Fe < ke; Fe++) {
|
|
145430
|
+
const Gt = Le.getX(Fe);
|
|
145431
|
+
_position$2.fromBufferAttribute(Re, Gt), testPoint(
|
|
145432
|
+
_position$2,
|
|
145433
|
+
Gt,
|
|
145434
|
+
fe,
|
|
145435
|
+
o,
|
|
145436
|
+
v,
|
|
145437
|
+
e,
|
|
145438
|
+
this
|
|
145439
|
+
);
|
|
145440
|
+
}
|
|
145441
|
+
} else {
|
|
145442
|
+
const Pe = Math.max(0, le.start), ze = Math.min(
|
|
145443
|
+
Re.count,
|
|
145444
|
+
le.start + le.count
|
|
145445
|
+
);
|
|
145446
|
+
for (let Fe = Pe, ke = ze; Fe < ke; Fe++)
|
|
145447
|
+
_position$2.fromBufferAttribute(Re, Fe), testPoint(
|
|
145448
|
+
_position$2,
|
|
145449
|
+
Fe,
|
|
145450
|
+
fe,
|
|
145451
|
+
o,
|
|
145452
|
+
v,
|
|
145453
|
+
e,
|
|
145454
|
+
this
|
|
145455
|
+
);
|
|
145456
|
+
}
|
|
145457
|
+
}
|
|
145458
|
+
function testPoint(v, e, r, o, V, le, fe) {
|
|
145459
|
+
const Le = new Vector3();
|
|
145460
|
+
_ray.closestPointToPoint(v, Le), Le.applyMatrix4(o);
|
|
145461
|
+
const Ce = V.ray.origin.distanceTo(v), Re = Le.distanceTo(v), Pe = Math.asin(
|
|
145462
|
+
Re / Ce
|
|
145463
|
+
);
|
|
145464
|
+
if (Pe < r) {
|
|
145465
|
+
if (Ce < V.near || Ce > V.far)
|
|
145466
|
+
return;
|
|
145467
|
+
le.push({
|
|
145468
|
+
distance: Ce,
|
|
145469
|
+
distanceToRay: Re,
|
|
145470
|
+
angleToRay: Pe,
|
|
145471
|
+
point: Le,
|
|
145472
|
+
index: e,
|
|
145473
|
+
face: null,
|
|
145474
|
+
object: fe
|
|
145475
|
+
});
|
|
145476
|
+
}
|
|
145477
|
+
}
|
|
145195
145478
|
const access = {
|
|
145196
145479
|
set token(v) {
|
|
145197
145480
|
accessToken.token = v;
|
|
@@ -145200,8 +145483,9 @@ const access = {
|
|
|
145200
145483
|
export {
|
|
145201
145484
|
Base,
|
|
145202
145485
|
City$1 as City,
|
|
145203
|
-
index
|
|
145204
|
-
|
|
145486
|
+
index as Earth,
|
|
145487
|
+
Map$1 as Map,
|
|
145488
|
+
MapManager,
|
|
145205
145489
|
THREE,
|
|
145206
145490
|
tween_esm as TWEEN,
|
|
145207
145491
|
VERSION,
|
|
@@ -145209,5 +145493,6 @@ export {
|
|
|
145209
145493
|
animation as animationUtils,
|
|
145210
145494
|
getCityConfig,
|
|
145211
145495
|
getMapConfig,
|
|
145496
|
+
proposedRaycast,
|
|
145212
145497
|
removeCameraHistory
|
|
145213
145498
|
};
|