vis-core 0.24.9 → 0.24.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/index.module.js +122 -103
- package/dist/version.d.ts +1 -1
- package/dist/vis/base/index.d.ts +1 -0
- package/dist/vis/map/index.d.ts +1 -2
- package/dist/vis/map2/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.module.js
CHANGED
|
@@ -90,7 +90,7 @@ const publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRz
|
|
|
90
90
|
).toString(CryptoJS.enc.Utf8), ct = JSON.parse(rt), Zt = Date.now();
|
|
91
91
|
return !ct.s || ct.s > Zt ? (this.token = void 0, "") : ct.e && ct.e < Zt ? (this.token = void 0, "") : (ct.isValid = qe, ct);
|
|
92
92
|
}
|
|
93
|
-
}, version = "0.24.
|
|
93
|
+
}, version = "0.24.11";
|
|
94
94
|
/**
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright 2010-2025 Three.js Authors
|
|
@@ -22890,7 +22890,7 @@ o$3.prototype._events = void 0;
|
|
|
22890
22890
|
o$3.prototype._eventsCount = 0;
|
|
22891
22891
|
o$3.prototype._maxListeners = void 0;
|
|
22892
22892
|
var L$2 = 10;
|
|
22893
|
-
function v$
|
|
22893
|
+
function v$1(de) {
|
|
22894
22894
|
if (typeof de != "function")
|
|
22895
22895
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof de);
|
|
22896
22896
|
}
|
|
@@ -22945,7 +22945,7 @@ o$3.prototype.emit = function(de) {
|
|
|
22945
22945
|
};
|
|
22946
22946
|
function g$2(de, e, r, c) {
|
|
22947
22947
|
var Je, Ke, Qe;
|
|
22948
|
-
if (v$
|
|
22948
|
+
if (v$1(r), Ke = de._events, Ke === void 0 ? (Ke = de._events = /* @__PURE__ */ Object.create(null), de._eventsCount = 0) : (Ke.newListener !== void 0 && (de.emit(
|
|
22949
22949
|
"newListener",
|
|
22950
22950
|
e,
|
|
22951
22951
|
r.listener ? r.listener : r
|
|
@@ -22974,14 +22974,14 @@ function _$1(de, e, r) {
|
|
|
22974
22974
|
return Je.listener = r, c.wrapFn = Je, Je;
|
|
22975
22975
|
}
|
|
22976
22976
|
o$3.prototype.once = function(de, e) {
|
|
22977
|
-
return v$
|
|
22977
|
+
return v$1(e), this.on(de, _$1(this, de, e)), this;
|
|
22978
22978
|
};
|
|
22979
22979
|
o$3.prototype.prependOnceListener = function(de, e) {
|
|
22980
|
-
return v$
|
|
22980
|
+
return v$1(e), this.prependListener(de, _$1(this, de, e)), this;
|
|
22981
22981
|
};
|
|
22982
22982
|
o$3.prototype.removeListener = function(de, e) {
|
|
22983
22983
|
var r, c, Je, Ke, Qe;
|
|
22984
|
-
if (v$
|
|
22984
|
+
if (v$1(e), c = this._events, c === void 0)
|
|
22985
22985
|
return this;
|
|
22986
22986
|
if (r = c[de], r === void 0)
|
|
22987
22987
|
return this;
|
|
@@ -33696,7 +33696,7 @@ const g$1 = (de, e = 1) => {
|
|
|
33696
33696
|
`;
|
|
33697
33697
|
}, new Points(r, Je);
|
|
33698
33698
|
};
|
|
33699
|
-
|
|
33699
|
+
class v {
|
|
33700
33700
|
constructor() {
|
|
33701
33701
|
this.objectType = "BaseObject", this.userData = {}, this.prefab = !1, this.isInstantiate = !1, this.pm = makePromiseCreator(), this.materialList = {}, this.useMaterialType = "origin", this.onPointerIndex = [];
|
|
33702
33702
|
}
|
|
@@ -33906,7 +33906,7 @@ let v$1 = class {
|
|
|
33906
33906
|
this.drawController.removePick(e);
|
|
33907
33907
|
}), this.object3d && E$3(this.object3d, !1);
|
|
33908
33908
|
}
|
|
33909
|
-
}
|
|
33909
|
+
}
|
|
33910
33910
|
var Xt = Object.defineProperty, Kt = Object.defineProperties, qt$1 = Object.getOwnPropertyDescriptors, Et = Object.getOwnPropertySymbols, Qt = Object.prototype.hasOwnProperty, jt$1 = Object.prototype.propertyIsEnumerable, Ot = (de, e, r) => e in de ? Xt(de, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : de[e] = r, V$1 = (de, e) => {
|
|
33911
33911
|
for (var r in e || (e = {}))
|
|
33912
33912
|
Qt.call(e, r) && Ot(de, r, e[r]);
|
|
@@ -34066,7 +34066,7 @@ class fe {
|
|
|
34066
34066
|
}
|
|
34067
34067
|
}
|
|
34068
34068
|
const nt = 1 / 8, ge = /Mac/.test(navigator.platform);
|
|
34069
|
-
let
|
|
34069
|
+
let T$1, Pt, at, ut, L, S, P$1, W, J, F$1, I, N$1, At, Dt, z$1, tt, G$1, bt, ft$1, Ut$1, gt$1, Ct, ht$1;
|
|
34070
34070
|
class q extends fe {
|
|
34071
34071
|
/**
|
|
34072
34072
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -34109,7 +34109,7 @@ class q extends fe {
|
|
|
34109
34109
|
* @category Statics
|
|
34110
34110
|
*/
|
|
34111
34111
|
static install(e) {
|
|
34112
|
-
|
|
34112
|
+
T$1 = e.THREE, Pt = Object.freeze(new T$1.Vector3(0, 0, 0)), at = Object.freeze(new T$1.Vector3(0, 1, 0)), ut = Object.freeze(new T$1.Vector3(0, 0, 1)), L = new T$1.Vector2(), S = new T$1.Vector3(), P$1 = new T$1.Vector3(), W = new T$1.Vector3(), J = new T$1.Vector3(), F$1 = new T$1.Vector3(), I = new T$1.Vector3(), N$1 = new T$1.Vector3(), At = new T$1.Vector3(), Dt = new T$1.Vector3(), z$1 = new T$1.Spherical(), tt = new T$1.Spherical(), G$1 = new T$1.Box3(), bt = new T$1.Box3(), ft$1 = new T$1.Sphere(), Ut$1 = new T$1.Quaternion(), gt$1 = new T$1.Quaternion(), Ct = new T$1.Matrix4(), ht$1 = new T$1.Raycaster();
|
|
34113
34113
|
}
|
|
34114
34114
|
/**
|
|
34115
34115
|
* list all ACTIONs
|
|
@@ -34137,7 +34137,7 @@ class q extends fe {
|
|
|
34137
34137
|
*/
|
|
34138
34138
|
constructor(e, r) {
|
|
34139
34139
|
super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.verticalDragToForward = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
|
|
34140
|
-
}, this._enabled = !0, this._state = h.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = Y.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new
|
|
34140
|
+
}, this._enabled = !0, this._state = h.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = Y.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new T$1.Vector3(), this._focalOffsetVelocity = new T$1.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (dt, vt, Jt) => {
|
|
34141
34141
|
let $t, e0;
|
|
34142
34142
|
if (B$1(this._camera)) {
|
|
34143
34143
|
const t0 = S.copy(this._camera.position).sub(this._target), i0 = this._camera.getEffectiveFOV() * Q, n0 = t0.length() * Math.tan(i0 * 0.5);
|
|
@@ -34171,22 +34171,22 @@ class q extends fe {
|
|
|
34171
34171
|
}, this._zoomInternal = (dt, vt, Jt) => {
|
|
34172
34172
|
const $t = Math.pow(0.95, dt * this.dollySpeed), e0 = this._zoom, t0 = this._zoom * $t;
|
|
34173
34173
|
this.zoomTo(t0, !0), this.dollyToCursor && (this._changedZoom += t0 - e0, this._dollyControlCoord.set(vt, Jt));
|
|
34174
|
-
}, typeof
|
|
34174
|
+
}, typeof T$1 == "undefined" && console.error(
|
|
34175
34175
|
"camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."
|
|
34176
|
-
), this._camera = e, this._yAxisUpSpace = new
|
|
34176
|
+
), this._camera = e, this._yAxisUpSpace = new T$1.Quaternion().setFromUnitVectors(
|
|
34177
34177
|
this._camera.up,
|
|
34178
34178
|
at
|
|
34179
|
-
), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = h.NONE, this._target = new
|
|
34179
|
+
), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = h.NONE, this._target = new T$1.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new T$1.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new T$1.Spherical().setFromVector3(
|
|
34180
34180
|
S.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)
|
|
34181
34181
|
), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
|
|
34182
|
-
new
|
|
34183
|
-
new
|
|
34184
|
-
new
|
|
34185
|
-
new
|
|
34186
|
-
], this._updateNearPlaneCorners(), this._boundary = new
|
|
34187
|
-
new
|
|
34188
|
-
new
|
|
34189
|
-
), this._cameraUp0 = this._camera.up.clone(), this._target0 = this._target.clone(), this._position0 = this._camera.position.clone(), this._zoom0 = this._zoom, this._focalOffset0 = this._focalOffset.clone(), this._dollyControlCoord = new
|
|
34182
|
+
new T$1.Vector3(),
|
|
34183
|
+
new T$1.Vector3(),
|
|
34184
|
+
new T$1.Vector3(),
|
|
34185
|
+
new T$1.Vector3()
|
|
34186
|
+
], this._updateNearPlaneCorners(), this._boundary = new T$1.Box3(
|
|
34187
|
+
new T$1.Vector3(-1 / 0, -1 / 0, -1 / 0),
|
|
34188
|
+
new T$1.Vector3(1 / 0, 1 / 0, 1 / 0)
|
|
34189
|
+
), this._cameraUp0 = this._camera.up.clone(), this._target0 = this._target.clone(), this._position0 = this._camera.position.clone(), this._zoom0 = this._zoom, this._focalOffset0 = this._focalOffset.clone(), this._dollyControlCoord = new T$1.Vector2(), this.mouseButtons = {
|
|
34190
34190
|
left: h.ROTATE,
|
|
34191
34191
|
middle: h.DOLLY,
|
|
34192
34192
|
right: h.TRUCK,
|
|
@@ -34196,7 +34196,7 @@ class q extends fe {
|
|
|
34196
34196
|
two: B$1(this._camera) ? h.TOUCH_DOLLY_TRUCK : k(this._camera) ? h.TOUCH_ZOOM_TRUCK : h.NONE,
|
|
34197
34197
|
three: h.TOUCH_TRUCK
|
|
34198
34198
|
};
|
|
34199
|
-
const c = new
|
|
34199
|
+
const c = new T$1.Vector2(), Je = new T$1.Vector2(), Ke = new T$1.Vector2(), Qe = (dt) => {
|
|
34200
34200
|
if (!this._enabled || !this._domElement) return;
|
|
34201
34201
|
if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
|
|
34202
34202
|
const $t = this._domElement.getBoundingClientRect(), e0 = (dt.clientX - $t.left) / ($t.right - $t.left), t0 = (dt.clientY - $t.top) / ($t.bottom - $t.top);
|
|
@@ -35115,7 +35115,7 @@ class q extends fe {
|
|
|
35115
35115
|
this._viewport = null;
|
|
35116
35116
|
return;
|
|
35117
35117
|
}
|
|
35118
|
-
this._viewport = this._viewport || new
|
|
35118
|
+
this._viewport = this._viewport || new T$1.Vector4(), typeof e == "number" ? this._viewport.set(e, r, c, Je) : this._viewport.copy(e);
|
|
35119
35119
|
}
|
|
35120
35120
|
/**
|
|
35121
35121
|
* Calculate the distance to fit the box.
|
|
@@ -35150,7 +35150,7 @@ class q extends fe {
|
|
|
35150
35150
|
* @category Methods
|
|
35151
35151
|
*/
|
|
35152
35152
|
getTarget(e, r = !0) {
|
|
35153
|
-
return (e && e.isVector3 ? e : new
|
|
35153
|
+
return (e && e.isVector3 ? e : new T$1.Vector3()).copy(r ? this._targetEnd : this._target);
|
|
35154
35154
|
}
|
|
35155
35155
|
/**
|
|
35156
35156
|
* Returns the camera position.
|
|
@@ -35159,7 +35159,7 @@ class q extends fe {
|
|
|
35159
35159
|
* @category Methods
|
|
35160
35160
|
*/
|
|
35161
35161
|
getPosition(e, r = !0) {
|
|
35162
|
-
return (e && e.isVector3 ? e : new
|
|
35162
|
+
return (e && e.isVector3 ? e : new T$1.Vector3()).setFromSpherical(r ? this._sphericalEnd : this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(r ? this._targetEnd : this._target);
|
|
35163
35163
|
}
|
|
35164
35164
|
/**
|
|
35165
35165
|
* Returns the spherical coordinates of the orbit.
|
|
@@ -35168,7 +35168,7 @@ class q extends fe {
|
|
|
35168
35168
|
* @category Methods
|
|
35169
35169
|
*/
|
|
35170
35170
|
getSpherical(e, r = !0) {
|
|
35171
|
-
return (e || new
|
|
35171
|
+
return (e || new T$1.Spherical()).copy(r ? this._sphericalEnd : this._spherical);
|
|
35172
35172
|
}
|
|
35173
35173
|
/**
|
|
35174
35174
|
* Returns the focal offset, which is how much the camera appears to be translated in screen parallel coordinates.
|
|
@@ -35177,7 +35177,7 @@ class q extends fe {
|
|
|
35177
35177
|
* @category Methods
|
|
35178
35178
|
*/
|
|
35179
35179
|
getFocalOffset(e, r = !0) {
|
|
35180
|
-
return (e && e.isVector3 ? e : new
|
|
35180
|
+
return (e && e.isVector3 ? e : new T$1.Vector3()).copy(
|
|
35181
35181
|
r ? this._focalOffsetEnd : this._focalOffset
|
|
35182
35182
|
);
|
|
35183
35183
|
}
|
|
@@ -35503,10 +35503,10 @@ class q extends fe {
|
|
|
35503
35503
|
if (!(this.colliderMeshes.length >= 1) || _t(this._camera, "_collisionTest"))
|
|
35504
35504
|
return e;
|
|
35505
35505
|
const r = this._getTargetDirection(J);
|
|
35506
|
-
|
|
35506
|
+
Ct.lookAt(Pt, r, this._camera.up);
|
|
35507
35507
|
for (let c = 0; c < 4; c++) {
|
|
35508
35508
|
const Je = P$1.copy(this._nearPlaneCorners[c]);
|
|
35509
|
-
Je.applyMatrix4(
|
|
35509
|
+
Je.applyMatrix4(Ct);
|
|
35510
35510
|
const Ke = W.addVectors(this._target, Je);
|
|
35511
35511
|
ht$1.set(Ke, r), ht$1.far = this._spherical.radius + 1;
|
|
35512
35512
|
const Qe = ht$1.intersectObjects(this.colliderMeshes);
|
|
@@ -35575,7 +35575,7 @@ class q extends fe {
|
|
|
35575
35575
|
".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."
|
|
35576
35576
|
);
|
|
35577
35577
|
}
|
|
35578
|
-
static createBoundingSphere(e, r = new
|
|
35578
|
+
static createBoundingSphere(e, r = new T$1.Sphere()) {
|
|
35579
35579
|
const c = r, Je = c.center;
|
|
35580
35580
|
G$1.makeEmpty(), e.traverseVisible((Qe) => {
|
|
35581
35581
|
Qe.isMesh && G$1.expandByObject(Qe);
|
|
@@ -35591,7 +35591,7 @@ class q extends fe {
|
|
|
35591
35591
|
}), c.radius = Math.sqrt(Ke), c;
|
|
35592
35592
|
}
|
|
35593
35593
|
}
|
|
35594
|
-
const
|
|
35594
|
+
const Ce = {
|
|
35595
35595
|
antialias: !1,
|
|
35596
35596
|
devicePixelRatio: window.devicePixelRatio,
|
|
35597
35597
|
powerPreference: "high-performance",
|
|
@@ -35604,7 +35604,7 @@ const ye = {
|
|
|
35604
35604
|
depth: !1,
|
|
35605
35605
|
physicallyCorrectLights: !1
|
|
35606
35606
|
};
|
|
35607
|
-
class
|
|
35607
|
+
class ye {
|
|
35608
35608
|
constructor(e) {
|
|
35609
35609
|
this.options = e;
|
|
35610
35610
|
const { width: r, height: c, rendererParams: Je } = e, {
|
|
@@ -35685,13 +35685,13 @@ class Oe {
|
|
|
35685
35685
|
this.setSize(1, 1), (e = this.renderer) == null || e.clear(), (r = this.renderer) == null || r.dispose();
|
|
35686
35686
|
}
|
|
35687
35687
|
}
|
|
35688
|
-
const
|
|
35688
|
+
const ve = {
|
|
35689
35689
|
fov: 45,
|
|
35690
35690
|
near: 1,
|
|
35691
35691
|
far: 1e3,
|
|
35692
35692
|
up: new Vector3(0, 1, 0)
|
|
35693
35693
|
};
|
|
35694
|
-
class
|
|
35694
|
+
let Te$1 = class {
|
|
35695
35695
|
constructor(e) {
|
|
35696
35696
|
this.event = new P$2.EventEmitter(), this.cameraArr = [], this.cameraActiveIndex = 0, this.customCamera = !1, this.width = 0, this.height = 0, this.width = e.width, this.height = e.height;
|
|
35697
35697
|
}
|
|
@@ -35702,6 +35702,9 @@ class ve {
|
|
|
35702
35702
|
const { fov: r, far: c, near: Je, up: Ke, aspect: Qe } = e, _e = Qe != null ? Qe : this.width / this.height, $e = new PerspectiveCamera(r, _e, Je, c);
|
|
35703
35703
|
return $e.up = Ke, this.cameraArr.push($e), $e;
|
|
35704
35704
|
}
|
|
35705
|
+
removeCamera(e) {
|
|
35706
|
+
e === this.cameraActiveIndex && (this.cameraActiveIndex = 0), this.cameraArr.splice(e, 1);
|
|
35707
|
+
}
|
|
35705
35708
|
setCameraActive(e) {
|
|
35706
35709
|
this.cameraActiveIndex = e, this.event.emit("cameraChange", this.camera);
|
|
35707
35710
|
}
|
|
@@ -35763,7 +35766,7 @@ class ve {
|
|
|
35763
35766
|
(this.camera.fov !== r.fov || this.camera.aspect !== qe || !this.camera.matrixWorld.equals(Ke) || !this.camera.matrixWorldInverse.equals(Qe)) && (this.camera.fov = r.fov, this.camera.updateProjectionMatrix(), this.camera.matrixAutoUpdate = !1, this.camera.matrixWorld.copy(Ke), this.camera.matrixWorldInverse.copy(Qe), this.camera.aspect = qe, this.camera.updateProjectionMatrix());
|
|
35764
35767
|
}
|
|
35765
35768
|
}
|
|
35766
|
-
}
|
|
35769
|
+
};
|
|
35767
35770
|
const xe = {
|
|
35768
35771
|
background: null
|
|
35769
35772
|
}, we = new Scene();
|
|
@@ -35778,6 +35781,9 @@ let Se$1 = class {
|
|
|
35778
35781
|
const r = new Scene();
|
|
35779
35782
|
return e != null && e.background && (r.background = e.background), this.sceneArr.push(r), r;
|
|
35780
35783
|
}
|
|
35784
|
+
removeScene(e) {
|
|
35785
|
+
e === this.sceneActiveIndex && (this.sceneActiveIndex = 0), this.sceneArr.splice(e, 1);
|
|
35786
|
+
}
|
|
35781
35787
|
setSceneActive(e) {
|
|
35782
35788
|
this.sceneActiveIndex = e, this.event.emit("sceneChange", this.scene);
|
|
35783
35789
|
}
|
|
@@ -35893,6 +35899,10 @@ class Ae {
|
|
|
35893
35899
|
});
|
|
35894
35900
|
})), this.cameraControlsArr.push(Je), Je;
|
|
35895
35901
|
}
|
|
35902
|
+
removeCameraControls(e) {
|
|
35903
|
+
var r;
|
|
35904
|
+
e === this.cameraControlsActiveIndex && (this.cameraControlsActiveIndex = 0), (r = this.cameraControlsArr[e]) == null || r.dispose(), this.cameraControlsArr.splice(e, 1);
|
|
35905
|
+
}
|
|
35896
35906
|
setCameraControlsActive(e) {
|
|
35897
35907
|
this.cameraControlsActiveIndex = e;
|
|
35898
35908
|
}
|
|
@@ -36326,7 +36336,7 @@ const Ie = (de) => {
|
|
|
36326
36336
|
"baseTexture"
|
|
36327
36337
|
);
|
|
36328
36338
|
return e.needsSwap = !0, e;
|
|
36329
|
-
},
|
|
36339
|
+
}, yt = 1, K$2 = !1, He = new MeshBasicMaterial({ color: "black" }), ke = new PointsMaterial({
|
|
36330
36340
|
color: "black",
|
|
36331
36341
|
sizeAttenuation: !1
|
|
36332
36342
|
}), Ve = new PointsMaterial({
|
|
@@ -36433,7 +36443,7 @@ class Xe {
|
|
|
36433
36443
|
const $e = new EffectComposer(r);
|
|
36434
36444
|
$e.renderToScreen = !1, $e.addPass(this.renderPass), $e.addPass(_e), this.bloomComposer = $e;
|
|
36435
36445
|
const qe = Ie($e);
|
|
36436
|
-
qe.uniforms.bloomAlphaType.value = Qe, this.bloomComposer = $e, this.finalComposer.addPass(qe), this.mixPass = qe, this.bloomLayer.set(
|
|
36446
|
+
qe.uniforms.bloomAlphaType.value = Qe, this.bloomComposer = $e, this.finalComposer.addPass(qe), this.mixPass = qe, this.bloomLayer.set(yt);
|
|
36437
36447
|
}
|
|
36438
36448
|
addBloomGui(e) {
|
|
36439
36449
|
this.bloomComposer && new kt$1({
|
|
@@ -36469,9 +36479,9 @@ class Xe {
|
|
|
36469
36479
|
return;
|
|
36470
36480
|
let Je = r;
|
|
36471
36481
|
r === void 0 && (Je = !this.bloomSelection.has(c)), Je ? (this.bloomSelection.add(c), c.traverse((Ke) => {
|
|
36472
|
-
Ke.layers.enable(
|
|
36482
|
+
Ke.layers.enable(yt);
|
|
36473
36483
|
})) : (this.bloomSelection.delete(c), c.traverse((Ke) => {
|
|
36474
|
-
Ke.layers.disable(
|
|
36484
|
+
Ke.layers.disable(yt);
|
|
36475
36485
|
})), this.bloomSelection.size === 0 ? this.bloomComposerActive = !1 : this.bloomComposerActive = !0;
|
|
36476
36486
|
}
|
|
36477
36487
|
enable() {
|
|
@@ -36595,6 +36605,9 @@ const lt$1 = class J1 {
|
|
|
36595
36605
|
const c = this.cameraController.addPerspectiveCamera(r);
|
|
36596
36606
|
return this.sceneController.addScene(e).add(c), this.controlsController.addCameraControls(c), this.sceneController.sceneArr.length - 1;
|
|
36597
36607
|
}
|
|
36608
|
+
removePage(e) {
|
|
36609
|
+
e <= 0 || (this.cameraController.removeCamera(e), this.sceneController.removeScene(e), this.controlsController.removeCameraControls(e), this.pageActiveIndex === e && this.showPage(0));
|
|
36610
|
+
}
|
|
36598
36611
|
showPage(e) {
|
|
36599
36612
|
if (e !== this.pageActiveIndex) {
|
|
36600
36613
|
if (e !== -1 && !this.sceneController.sceneArr[e]) {
|
|
@@ -36617,13 +36630,13 @@ const lt$1 = class J1 {
|
|
|
36617
36630
|
height: $e,
|
|
36618
36631
|
renderer: r.WebGPURenderer,
|
|
36619
36632
|
rendererParams: Ee
|
|
36620
|
-
}) : new
|
|
36633
|
+
}) : new ye({
|
|
36621
36634
|
width: _e,
|
|
36622
36635
|
height: $e,
|
|
36623
36636
|
rendererParams: mt$1(V$1({}, Ke), {
|
|
36624
36637
|
antialias: !1
|
|
36625
36638
|
})
|
|
36626
|
-
}), st = new
|
|
36639
|
+
}), st = new Te$1({
|
|
36627
36640
|
width: _e,
|
|
36628
36641
|
height: $e
|
|
36629
36642
|
}), rt = new Se$1({}), ct = new Ae({
|
|
@@ -36826,10 +36839,10 @@ lt$1.options = {
|
|
|
36826
36839
|
viewHelper: K$2,
|
|
36827
36840
|
controls: !0,
|
|
36828
36841
|
transformControls: K$2,
|
|
36829
|
-
renderer:
|
|
36842
|
+
renderer: Ce,
|
|
36830
36843
|
composer: Ge$1,
|
|
36831
36844
|
scene: xe,
|
|
36832
|
-
camera:
|
|
36845
|
+
camera: ve,
|
|
36833
36846
|
bloom: !1,
|
|
36834
36847
|
bloomParams: We,
|
|
36835
36848
|
ssao: !1,
|
|
@@ -36841,7 +36854,7 @@ lt$1.options = {
|
|
|
36841
36854
|
};
|
|
36842
36855
|
let Vt$1 = lt$1;
|
|
36843
36856
|
const ws = q.ACTION;
|
|
36844
|
-
let t$1 = class extends v
|
|
36857
|
+
let t$1 = class extends v {
|
|
36845
36858
|
create() {
|
|
36846
36859
|
this.createGroup();
|
|
36847
36860
|
}
|
|
@@ -36954,7 +36967,7 @@ var kt = Object.defineProperty, Ft = Object.defineProperties, qt = Object.getOwn
|
|
|
36954
36967
|
}, _e = ($e) => $e.done ? c($e.value) : Promise.resolve($e.value).then(Ke, Qe);
|
|
36955
36968
|
_e((r = r.apply(de, e)).next());
|
|
36956
36969
|
});
|
|
36957
|
-
class Se extends v
|
|
36970
|
+
class Se extends v {
|
|
36958
36971
|
constructor(e) {
|
|
36959
36972
|
super(), this.objectType = "BaseObject#Node", this.onNodePointerIndex = [], this.options = P({
|
|
36960
36973
|
type: "2d"
|
|
@@ -37001,7 +37014,7 @@ class Se extends v$1 {
|
|
|
37001
37014
|
}), super.dispose();
|
|
37002
37015
|
}
|
|
37003
37016
|
}
|
|
37004
|
-
class Me extends v
|
|
37017
|
+
class Me extends v {
|
|
37005
37018
|
constructor(e) {
|
|
37006
37019
|
super(), this.rectAreaLightUniformsLibInit = !1, this.options = e;
|
|
37007
37020
|
}
|
|
@@ -37234,7 +37247,7 @@ const Vt = (de) => {
|
|
|
37234
37247
|
const { points: e } = de, r = e.reduce((c, Je, Ke) => (Ke < e.length - 1 && c.push(Je, e[Ke + 1]), c), []);
|
|
37235
37248
|
return new BufferGeometry().setFromPoints(r);
|
|
37236
37249
|
};
|
|
37237
|
-
let Te = class extends v
|
|
37250
|
+
let Te = class extends v {
|
|
37238
37251
|
constructor(de = {}) {
|
|
37239
37252
|
super(), this.options = P({}, de);
|
|
37240
37253
|
}
|
|
@@ -37391,7 +37404,7 @@ const gt = (de) => {
|
|
|
37391
37404
|
const { setPointWidth: e, nodes: r } = de, c = new he();
|
|
37392
37405
|
return c.setPoints(r, e), c;
|
|
37393
37406
|
};
|
|
37394
|
-
class Ge extends v
|
|
37407
|
+
class Ge extends v {
|
|
37395
37408
|
constructor(e = {}) {
|
|
37396
37409
|
super(), this.options = P({}, e);
|
|
37397
37410
|
}
|
|
@@ -37505,7 +37518,7 @@ const zt = (de) => {
|
|
|
37505
37518
|
endHeight: Qe
|
|
37506
37519
|
}));
|
|
37507
37520
|
};
|
|
37508
|
-
class Be extends v
|
|
37521
|
+
class Be extends v {
|
|
37509
37522
|
constructor(e) {
|
|
37510
37523
|
super(), this.options = P({}, e);
|
|
37511
37524
|
}
|
|
@@ -37890,7 +37903,7 @@ const Rt = (de) => {
|
|
|
37890
37903
|
});
|
|
37891
37904
|
return E(), rt;
|
|
37892
37905
|
};
|
|
37893
|
-
class je extends v
|
|
37906
|
+
class je extends v {
|
|
37894
37907
|
constructor(e) {
|
|
37895
37908
|
super(), this.options = P({
|
|
37896
37909
|
depth: 1
|
|
@@ -37984,7 +37997,7 @@ class Light extends Me {
|
|
|
37984
37997
|
Qe.isPointLight && (Qe.shadow.mapSize.width = 2048, Qe.shadow.mapSize.height = 2048);
|
|
37985
37998
|
}
|
|
37986
37999
|
}
|
|
37987
|
-
class Point extends v
|
|
38000
|
+
class Point extends v {
|
|
37988
38001
|
constructor(r) {
|
|
37989
38002
|
super();
|
|
37990
38003
|
J0(this, "options");
|
|
@@ -38062,7 +38075,7 @@ const V = {
|
|
|
38062
38075
|
return e * de.renderer.getPixelRatio() / Qe.width / (1 / $e);
|
|
38063
38076
|
};
|
|
38064
38077
|
let map;
|
|
38065
|
-
class Arc extends v
|
|
38078
|
+
class Arc extends v {
|
|
38066
38079
|
constructor(r) {
|
|
38067
38080
|
super();
|
|
38068
38081
|
J0(this, "options");
|
|
@@ -38238,7 +38251,7 @@ class Arc extends v$1 {
|
|
|
38238
38251
|
});
|
|
38239
38252
|
}
|
|
38240
38253
|
}
|
|
38241
|
-
class CrossPlane extends v
|
|
38254
|
+
class CrossPlane extends v {
|
|
38242
38255
|
constructor(r) {
|
|
38243
38256
|
super();
|
|
38244
38257
|
J0(this, "options");
|
|
@@ -38258,7 +38271,7 @@ class CrossPlane extends v$1 {
|
|
|
38258
38271
|
});
|
|
38259
38272
|
}
|
|
38260
38273
|
}
|
|
38261
|
-
class PlaneShadow extends v
|
|
38274
|
+
class PlaneShadow extends v {
|
|
38262
38275
|
create() {
|
|
38263
38276
|
return ti(this, null, function* () {
|
|
38264
38277
|
const e = new PlaneGeometry(100, 100, 2, 2), r = new ShadowMaterial();
|
|
@@ -38266,7 +38279,7 @@ class PlaneShadow extends v$1 {
|
|
|
38266
38279
|
});
|
|
38267
38280
|
}
|
|
38268
38281
|
}
|
|
38269
|
-
class Model extends v
|
|
38282
|
+
class Model extends v {
|
|
38270
38283
|
constructor(r) {
|
|
38271
38284
|
super();
|
|
38272
38285
|
J0(this, "options");
|
|
@@ -38294,25 +38307,25 @@ class Model extends v$1 {
|
|
|
38294
38307
|
});
|
|
38295
38308
|
}
|
|
38296
38309
|
}
|
|
38297
|
-
class Box extends v
|
|
38310
|
+
class Box extends v {
|
|
38298
38311
|
create() {
|
|
38299
38312
|
const e = new BoxGeometry(1, 1, 1, 1, 1, 1);
|
|
38300
38313
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38301
38314
|
}
|
|
38302
38315
|
}
|
|
38303
|
-
class Capsule extends v
|
|
38316
|
+
class Capsule extends v {
|
|
38304
38317
|
create() {
|
|
38305
38318
|
const e = new CapsuleGeometry(1, 1, 4, 8);
|
|
38306
38319
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38307
38320
|
}
|
|
38308
38321
|
}
|
|
38309
|
-
class Circle extends v
|
|
38322
|
+
class Circle extends v {
|
|
38310
38323
|
create() {
|
|
38311
38324
|
const e = new CircleGeometry(1, 32, 0, Math.PI * 2);
|
|
38312
38325
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38313
38326
|
}
|
|
38314
38327
|
}
|
|
38315
|
-
class Cylinder extends v
|
|
38328
|
+
class Cylinder extends v {
|
|
38316
38329
|
create() {
|
|
38317
38330
|
const e = new CylinderGeometry(
|
|
38318
38331
|
1,
|
|
@@ -38327,19 +38340,19 @@ class Cylinder extends v$1 {
|
|
|
38327
38340
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38328
38341
|
}
|
|
38329
38342
|
}
|
|
38330
|
-
class Dodecahedron extends v
|
|
38343
|
+
class Dodecahedron extends v {
|
|
38331
38344
|
create() {
|
|
38332
38345
|
const e = new DodecahedronGeometry(1, 0);
|
|
38333
38346
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38334
38347
|
}
|
|
38335
38348
|
}
|
|
38336
|
-
class Icosahedron extends v
|
|
38349
|
+
class Icosahedron extends v {
|
|
38337
38350
|
create() {
|
|
38338
38351
|
const e = new IcosahedronGeometry(1, 0);
|
|
38339
38352
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38340
38353
|
}
|
|
38341
38354
|
}
|
|
38342
|
-
class Lathe extends v
|
|
38355
|
+
class Lathe extends v {
|
|
38343
38356
|
create() {
|
|
38344
38357
|
const e = new LatheGeometry();
|
|
38345
38358
|
this.createMesh(
|
|
@@ -38348,25 +38361,25 @@ class Lathe extends v$1 {
|
|
|
38348
38361
|
), this.scale.multiplyScalar(20);
|
|
38349
38362
|
}
|
|
38350
38363
|
}
|
|
38351
|
-
class Octahedron extends v
|
|
38364
|
+
class Octahedron extends v {
|
|
38352
38365
|
create() {
|
|
38353
38366
|
const e = new OctahedronGeometry(1, 0);
|
|
38354
38367
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38355
38368
|
}
|
|
38356
38369
|
}
|
|
38357
|
-
class Plane extends v
|
|
38370
|
+
class Plane extends v {
|
|
38358
38371
|
create() {
|
|
38359
38372
|
const e = new PlaneGeometry(1, 1, 2, 2);
|
|
38360
38373
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38361
38374
|
}
|
|
38362
38375
|
}
|
|
38363
|
-
class Ring extends v
|
|
38376
|
+
class Ring extends v {
|
|
38364
38377
|
create() {
|
|
38365
38378
|
const e = new RingGeometry(0.5, 1, 32, 1, 0, Math.PI * 2);
|
|
38366
38379
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38367
38380
|
}
|
|
38368
38381
|
}
|
|
38369
|
-
class Sphere extends v
|
|
38382
|
+
class Sphere extends v {
|
|
38370
38383
|
constructor() {
|
|
38371
38384
|
super(...arguments);
|
|
38372
38385
|
J0(this, "radius", 100);
|
|
@@ -38380,7 +38393,7 @@ class Sphere extends v$1 {
|
|
|
38380
38393
|
this.createMesh(r, this.material), this.object3d.rotation.y = Math.PI / 180 * 90;
|
|
38381
38394
|
}
|
|
38382
38395
|
}
|
|
38383
|
-
class Sprite extends v
|
|
38396
|
+
class Sprite extends v {
|
|
38384
38397
|
create() {
|
|
38385
38398
|
this.createSprite(new SpriteMaterial()), this.scale.multiplyScalar(20);
|
|
38386
38399
|
}
|
|
@@ -38399,25 +38412,25 @@ class Sprite extends v$1 {
|
|
|
38399
38412
|
}
|
|
38400
38413
|
}
|
|
38401
38414
|
}
|
|
38402
|
-
class Tetrahedron extends v
|
|
38415
|
+
class Tetrahedron extends v {
|
|
38403
38416
|
create() {
|
|
38404
38417
|
const e = new TetrahedronGeometry(1, 0);
|
|
38405
38418
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38406
38419
|
}
|
|
38407
38420
|
}
|
|
38408
|
-
class Torus extends v
|
|
38421
|
+
class Torus extends v {
|
|
38409
38422
|
create() {
|
|
38410
38423
|
const e = new TorusGeometry(1, 0.4, 12, 48, Math.PI * 2);
|
|
38411
38424
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38412
38425
|
}
|
|
38413
38426
|
}
|
|
38414
|
-
class TorusKnot extends v
|
|
38427
|
+
class TorusKnot extends v {
|
|
38415
38428
|
create() {
|
|
38416
38429
|
const e = new TorusKnotGeometry(1, 0.4, 64, 8, 2, 3);
|
|
38417
38430
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38418
38431
|
}
|
|
38419
38432
|
}
|
|
38420
|
-
class Tube extends v
|
|
38433
|
+
class Tube extends v {
|
|
38421
38434
|
constructor(r) {
|
|
38422
38435
|
super();
|
|
38423
38436
|
J0(this, "options");
|
|
@@ -50915,6 +50928,16 @@ class Base extends Event {
|
|
|
50915
50928
|
this.pencil.controls.smoothTime = Ke / 1e3, this.pencil.controls.restThreshold = 0, yield this.pencil.controls.truck(r, c, Je), this.pencil.controls.restThreshold = 25e-4, this.pencil.controls.smoothTime = 250 / 1e3;
|
|
50916
50929
|
});
|
|
50917
50930
|
}
|
|
50931
|
+
dollyTo(r, c = !1, Je = 250) {
|
|
50932
|
+
return ti(this, null, function* () {
|
|
50933
|
+
let Ke = r;
|
|
50934
|
+
if (typeof Ke == "string") {
|
|
50935
|
+
const [Qe, _e] = Ke.split("=");
|
|
50936
|
+
Qe === "+" ? Ke = this.pencil.controls.distance + +_e : Qe === "-" ? Ke = this.pencil.controls.distance - +_e : Qe === "*" ? Ke = this.pencil.controls.distance * +_e : Qe === "/" ? Ke = this.pencil.controls.distance / +_e : console.error("dollyTo distance error");
|
|
50937
|
+
}
|
|
50938
|
+
this.pencil.controls.smoothTime = Je / 1e3, yield this.pencil.controls.dollyTo(Ke, c), this.pencil.controls.smoothTime = 250 / 1e3;
|
|
50939
|
+
});
|
|
50940
|
+
}
|
|
50918
50941
|
absoluteAngle(r, c) {
|
|
50919
50942
|
const Je = Math.PI * 2, Ke = r - c;
|
|
50920
50943
|
return MathUtils.euclideanModulo(Ke + Math.PI, Je) - Math.PI;
|
|
@@ -50965,9 +50988,9 @@ class Base extends Event {
|
|
|
50965
50988
|
}
|
|
50966
50989
|
dispose() {
|
|
50967
50990
|
var r, c, Je, Ke;
|
|
50968
|
-
super.dispose(), this.editor && (this.editor.viewport.vis = void 0, this.editor.dispose()), this.cameraState = {}, this.publicDir = {}, this.
|
|
50991
|
+
super.dispose(), this.editor && (this.editor.viewport.vis = void 0, this.editor.dispose()), this.cameraState = {}, this.publicDir = {}, this.sceneActive > 0 ? (this.drawController.objects.forEach((Qe) => {
|
|
50969
50992
|
Qe.erase();
|
|
50970
|
-
}), this.drawController.dispose(), (r = this.mList) == null || r.dispose()) : (c = this.pencil) == null || c.dispose(), (Je = this.pmremGenerator) == null || Je.dispose(), (Ke = this.re) == null || Ke.dispose();
|
|
50993
|
+
}), this.drawController.dispose(), (r = this.mList) == null || r.dispose(), this.pencil.removePage(this.sceneActive)) : (c = this.pencil) == null || c.dispose(), (Je = this.pmremGenerator) == null || Je.dispose(), (Ke = this.re) == null || Ke.dispose();
|
|
50971
50994
|
}
|
|
50972
50995
|
}
|
|
50973
50996
|
J0(Base, "VisName", "base");
|
|
@@ -129352,7 +129375,7 @@ const continentsM49 = {
|
|
|
129352
129375
|
colorWrite: !1,
|
|
129353
129376
|
transparent: !0
|
|
129354
129377
|
});
|
|
129355
|
-
let PlaneMap$1 = class extends v
|
|
129378
|
+
let PlaneMap$1 = class extends v {
|
|
129356
129379
|
constructor(r) {
|
|
129357
129380
|
super();
|
|
129358
129381
|
J0(this, "options");
|
|
@@ -130231,7 +130254,7 @@ Water.WaterShader = {
|
|
|
130231
130254
|
}`
|
|
130232
130255
|
)
|
|
130233
130256
|
};
|
|
130234
|
-
class CityPlane extends v
|
|
130257
|
+
class CityPlane extends v {
|
|
130235
130258
|
constructor(r) {
|
|
130236
130259
|
super();
|
|
130237
130260
|
J0(this, "options");
|
|
@@ -130268,7 +130291,7 @@ class CityPlane extends v$1 {
|
|
|
130268
130291
|
this.water = c, c.position.z = 1e-3, this.add(c);
|
|
130269
130292
|
}
|
|
130270
130293
|
}
|
|
130271
|
-
class ContinentsBg extends v
|
|
130294
|
+
class ContinentsBg extends v {
|
|
130272
130295
|
constructor(r) {
|
|
130273
130296
|
super();
|
|
130274
130297
|
J0(this, "options");
|
|
@@ -130353,7 +130376,7 @@ class ContinentsBg extends v$1 {
|
|
|
130353
130376
|
}), this.mapArr.length = 0;
|
|
130354
130377
|
}
|
|
130355
130378
|
}
|
|
130356
|
-
class PlaneMap extends v
|
|
130379
|
+
class PlaneMap extends v {
|
|
130357
130380
|
constructor(r) {
|
|
130358
130381
|
super();
|
|
130359
130382
|
J0(this, "options");
|
|
@@ -130726,7 +130749,6 @@ const objs$4 = Pi(li({}, objs$5), {
|
|
|
130726
130749
|
showOneLevel: !1,
|
|
130727
130750
|
drillDownRestrictions: "district",
|
|
130728
130751
|
showDistrict: !0,
|
|
130729
|
-
showDistrictStreetView: !1,
|
|
130730
130752
|
showLabel: !1,
|
|
130731
130753
|
lineWidth: 2,
|
|
130732
130754
|
lineOffset: 0,
|
|
@@ -130748,7 +130770,7 @@ const objs$4 = Pi(li({}, objs$5), {
|
|
|
130748
130770
|
geojsonMap: c,
|
|
130749
130771
|
extrudeLineGeojsonMap: Je,
|
|
130750
130772
|
bboxMap: Ke
|
|
130751
|
-
})), this.options.equirectangular && (this.options.projectionType = "equirectangular"), this.options.fahey && (this.options.projectionType = "fahey", this.pscale = 100, this.pcenter = [0, 0]), this.pencilConfig = PENCIL_CONFIG$4, (this.getAdcodeShowLevel(this.options.adcode) === "province" || this.getAdcodeShowLevel(this.options.adcode) === "country") && (this.extendsOptions.clickHandleDrillDown = () => this.options.clickHandleDrillDown, this.options.clickHandleDrillDown && (this.workerOnce = !1, this.extendsOptions.mapDepth = () => Array.isArray(this.options.mapDepth) ? this.options.mapDepth : new Array(3).fill(this.options.mapDepth), 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.
|
|
130773
|
+
})), this.options.equirectangular && (this.options.projectionType = "equirectangular"), this.options.fahey && (this.options.projectionType = "fahey", this.pscale = 100, this.pcenter = [0, 0]), this.pencilConfig = PENCIL_CONFIG$4, (this.getAdcodeShowLevel(this.options.adcode) === "province" || this.getAdcodeShowLevel(this.options.adcode) === "country") && (this.extendsOptions.clickHandleDrillDown = () => this.options.clickHandleDrillDown, this.options.clickHandleDrillDown && (this.workerOnce = !1, this.extendsOptions.mapDepth = () => Array.isArray(this.options.mapDepth) ? this.options.mapDepth : new Array(3).fill(this.options.mapDepth), 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.extendsOptions.parentBgTopSegments = () => this.options.parentBgTopSegments), this.extendsOptions.continentsBg = () => this.options.continentsBg, this.options.continentsBg && (this.extendsOptions.continentsBgDepth = () => this.options.continentsBgDepth)), this.options.adcode === 0 ? world(this) : this.options.style === "map2" || (this.options.adcode === 1e5 ? china(this) : base$1(this));
|
|
130752
130774
|
}
|
|
130753
130775
|
handleSetting(r, c) {
|
|
130754
130776
|
return ti(this, null, function* () {
|
|
@@ -131227,27 +131249,23 @@ const objs$4 = Pi(li({}, objs$5), {
|
|
|
131227
131249
|
const Je = Math.abs(c[3] - c[1]) / Math.abs(r[3] - r[1]), Ke = Math.abs(c[2] - c[0]) / Math.abs(r[2] - r[0]);
|
|
131228
131250
|
return Math.max(Je, Ke);
|
|
131229
131251
|
}
|
|
131230
|
-
getAdcodeShowLevel(r) {
|
|
131231
|
-
var
|
|
131232
|
-
if ((
|
|
131252
|
+
getAdcodeShowLevel(r, c = !0) {
|
|
131253
|
+
var Je;
|
|
131254
|
+
if ((Je = this.options.fixCity) != null && Je[r] && (r = this.options.fixCity[r]), r === 0)
|
|
131233
131255
|
return "world";
|
|
131234
131256
|
if (r === 1e5)
|
|
131235
131257
|
return "country";
|
|
131236
131258
|
if (/^\d{6}$/.test(`${r}`)) {
|
|
131237
|
-
const { level:
|
|
131238
|
-
return
|
|
131239
|
-
} else if (continentsType.find((
|
|
131259
|
+
const { level: Ke, parent: Qe } = adcodeMap[r], _e = Qe && adcodeMap[Qe].level;
|
|
131260
|
+
return Ke === "district" && _e === "province" && c ? "city" : Ke;
|
|
131261
|
+
} else if (continentsType.find((Ke) => Ke.adcode === r))
|
|
131240
131262
|
return "continent";
|
|
131241
131263
|
}
|
|
131242
131264
|
handleClick(r) {
|
|
131243
131265
|
const { drillDownRestrictions: c } = this.options;
|
|
131244
|
-
this.isAnimating || (r && r.userData.adcode
|
|
131245
|
-
"beforeDrillDown",
|
|
131246
|
-
[...this.adcodes, r.userData.adcode],
|
|
131247
|
-
"city"
|
|
131248
|
-
) : r && r.userData.adcode && this.getAdcodeShowLevel(r.userData.adcode) !== c ? this.showMap({
|
|
131266
|
+
this.isAnimating || (r && r.userData.adcode ? this.getAdcodeShowLevel(r.userData.adcode, !1) !== c ? this.showMap({
|
|
131249
131267
|
adcode: r.userData.adcode
|
|
131250
|
-
}) : !r && this.mapHistory.length > 1 && this.showMap({
|
|
131268
|
+
}) : this.emit("drilldownRestrictions", r.userData.adcode) : !r && this.mapHistory.length > 1 && this.showMap({
|
|
131251
131269
|
adcode: this.adcodes.at(-2)
|
|
131252
131270
|
}));
|
|
131253
131271
|
}
|
|
@@ -131719,7 +131737,7 @@ const getBoxMultiPoly = (de) => {
|
|
|
131719
131737
|
const e = de.features.map((r) => r.geometry.type === "Polygon" ? [r.geometry.coordinates] : r.geometry.coordinates).flat();
|
|
131720
131738
|
return Array.from({ length: e.length }, (r, c) => polygon(e[c]));
|
|
131721
131739
|
};
|
|
131722
|
-
class Building extends v
|
|
131740
|
+
class Building extends v {
|
|
131723
131741
|
constructor(r) {
|
|
131724
131742
|
super();
|
|
131725
131743
|
J0(this, "options");
|
|
@@ -131864,7 +131882,7 @@ class Building extends v$1 {
|
|
|
131864
131882
|
super.dispose(), this.outJson.clear();
|
|
131865
131883
|
}
|
|
131866
131884
|
}
|
|
131867
|
-
class Road extends v
|
|
131885
|
+
class Road extends v {
|
|
131868
131886
|
constructor(r) {
|
|
131869
131887
|
super();
|
|
131870
131888
|
J0(this, "options");
|
|
@@ -131967,7 +131985,7 @@ class Road extends v$1 {
|
|
|
131967
131985
|
}), this.linePrimary = [], this.lineSecondary = [], this.outJson.clear();
|
|
131968
131986
|
}
|
|
131969
131987
|
}
|
|
131970
|
-
class Area extends v
|
|
131988
|
+
class Area extends v {
|
|
131971
131989
|
constructor(r) {
|
|
131972
131990
|
super();
|
|
131973
131991
|
J0(this, "options");
|
|
@@ -132064,7 +132082,7 @@ function getCanvasTexture(de) {
|
|
|
132064
132082
|
const Je = new CanvasTexture(e);
|
|
132065
132083
|
return Je.colorSpace = SRGBColorSpace, Je.wrapT = RepeatWrapping, Je.magFilter = NearestFilter, Je.minFilter = NearestFilter, e.remove(), Je;
|
|
132066
132084
|
}
|
|
132067
|
-
class Target extends v
|
|
132085
|
+
class Target extends v {
|
|
132068
132086
|
constructor(r) {
|
|
132069
132087
|
super();
|
|
132070
132088
|
J0(this, "options");
|
|
@@ -133145,7 +133163,7 @@ class City$1 extends Base {
|
|
|
133145
133163
|
console.warn(" json:Building");
|
|
133146
133164
|
return;
|
|
133147
133165
|
}
|
|
133148
|
-
const c = `building-${this.options.cacheKey
|
|
133166
|
+
const c = this.options.cacheKey ? `building-${this.options.cacheKey}${r.grey ? "-grey" : ""}` : void 0, Je = yield this.drawController.draw(
|
|
133149
133167
|
"Building",
|
|
133150
133168
|
{
|
|
133151
133169
|
projection: {
|
|
@@ -133183,7 +133201,7 @@ class City$1 extends Base {
|
|
|
133183
133201
|
return;
|
|
133184
133202
|
}
|
|
133185
133203
|
if (!r.type) return;
|
|
133186
|
-
const { grey: c } = r, Je = c ? "-grey" : "", Ke = `${r.type}-${this.options.cacheKey
|
|
133204
|
+
const { grey: c } = r, Je = c ? "-grey" : "", Ke = this.options.cacheKey ? `${r.type}-${this.options.cacheKey}${r.grey ? "-grey" : ""}` : void 0, Qe = yield this.drawController.draw(
|
|
133187
133205
|
"Area",
|
|
133188
133206
|
{
|
|
133189
133207
|
projection: {
|
|
@@ -133222,7 +133240,7 @@ class City$1 extends Base {
|
|
|
133222
133240
|
console.warn(" json:Road");
|
|
133223
133241
|
return;
|
|
133224
133242
|
}
|
|
133225
|
-
const c = `road-${this.options.cacheKey
|
|
133243
|
+
const c = this.options.cacheKey ? `road-${this.options.cacheKey}${r.grey ? "-grey" : ""}` : void 0, Je = yield this.drawController.draw(
|
|
133226
133244
|
"Road",
|
|
133227
133245
|
{
|
|
133228
133246
|
projection: {
|
|
@@ -133304,6 +133322,7 @@ const m1 = class m1 extends Map$1 {
|
|
|
133304
133322
|
showBuilding: !0,
|
|
133305
133323
|
buildingSideGradient: !1,
|
|
133306
133324
|
showRoad: !0,
|
|
133325
|
+
cacheCity: !0,
|
|
133307
133326
|
showGrassland: !0,
|
|
133308
133327
|
showRiver: !0,
|
|
133309
133328
|
setWaterMaterial: !1,
|
|
@@ -133351,7 +133370,7 @@ const m1 = class m1 extends Map$1 {
|
|
|
133351
133370
|
bbox: Qe,
|
|
133352
133371
|
fitTo: !1,
|
|
133353
133372
|
adcode: r,
|
|
133354
|
-
cacheKey: this.options.adcode
|
|
133373
|
+
cacheKey: this.options.cacheCity ? `${this.options.adcode}-${r}` : void 0,
|
|
133355
133374
|
jsonName: _e,
|
|
133356
133375
|
grey: c.grey,
|
|
133357
133376
|
greyFull: this.options.greyFull,
|
|
@@ -133440,7 +133459,7 @@ const m1 = class m1 extends Map$1 {
|
|
|
133440
133459
|
}
|
|
133441
133460
|
dispose() {
|
|
133442
133461
|
Object.values(this.cityVisObj).forEach((r) => {
|
|
133443
|
-
r.city &&
|
|
133462
|
+
r.city && r.city.dispose(), r.state.reject();
|
|
133444
133463
|
}), super.dispose();
|
|
133445
133464
|
}
|
|
133446
133465
|
};
|
|
@@ -133459,7 +133478,7 @@ class Earth$1 extends Sphere {
|
|
|
133459
133478
|
this.material = c, super.create(), this.rotation.y = Math.PI / 180 * -90, this.object3d.name = "地球", r.setObject3d(this.object3d, "earth");
|
|
133460
133479
|
}
|
|
133461
133480
|
}
|
|
133462
|
-
class Countries extends v
|
|
133481
|
+
class Countries extends v {
|
|
133463
133482
|
constructor(r) {
|
|
133464
133483
|
super();
|
|
133465
133484
|
J0(this, "options");
|
|
@@ -133580,7 +133599,7 @@ class Countries extends v$1 {
|
|
|
133580
133599
|
return Qe.emissive.set(c), Qe.emissiveIntensity = Je, r.useMaterial(Ke), Qe;
|
|
133581
133600
|
}
|
|
133582
133601
|
}
|
|
133583
|
-
class SphereShadow extends v
|
|
133602
|
+
class SphereShadow extends v {
|
|
133584
133603
|
constructor(r) {
|
|
133585
133604
|
super();
|
|
133586
133605
|
J0(this, "options");
|