vis-core 0.26.11 → 0.26.12
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 +3 -3
- package/dist/index.module.js +31 -25
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.module.js
CHANGED
|
@@ -89,7 +89,7 @@ const publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRz
|
|
|
89
89
|
).toString(CryptoJS.enc.Utf8), De = JSON.parse(ve), yt = Date.now();
|
|
90
90
|
return !De.s || De.s > yt ? (this.token = void 0, "") : De.e && De.e < yt ? (this.token = void 0, "") : (De.isValid = Re, De);
|
|
91
91
|
}
|
|
92
|
-
}, version = "0.26.
|
|
92
|
+
}, version = "0.26.12";
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
|
95
95
|
* Copyright 2010-2025 Three.js Authors
|
|
@@ -48542,7 +48542,7 @@ function te(d) {
|
|
|
48542
48542
|
function se(d) {
|
|
48543
48543
|
return Math.abs(d) < Number.MAX_VALUE ? d : d * (1 / 0);
|
|
48544
48544
|
}
|
|
48545
|
-
function
|
|
48545
|
+
function le$1(d, t, o, r, V = 1 / 0, g) {
|
|
48546
48546
|
r = Math.max(1e-4, r);
|
|
48547
48547
|
const v = 2 / r, w = v * g, _ = 1 / (1 + w + 0.48 * w * w + 0.235 * w * w * w);
|
|
48548
48548
|
let Re = d - t;
|
|
@@ -48640,7 +48640,7 @@ let Bt$1 = class {
|
|
|
48640
48640
|
}
|
|
48641
48641
|
}
|
|
48642
48642
|
};
|
|
48643
|
-
const
|
|
48643
|
+
const he$1 = 1 / 8, Zt = /Mac/.test(navigator.platform);
|
|
48644
48644
|
let x$2, ke, ce$1, Oe, z, b$1, L$1, X, ie, N, H, B, Ne, He, F, re, q, Ie, Te, je, xe, we, de, J$1 = class L1 extends Bt$1 {
|
|
48645
48645
|
/**
|
|
48646
48646
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -48936,11 +48936,11 @@ let x$2, ke, ce$1, Oe, z, b$1, L$1, X, ie, N, H, B, Ne, He, F, re, q, Ie, Te, je
|
|
|
48936
48936
|
if (V.copy(z), ((this._state & c.ROTATE) === c.ROTATE || (this._state & c.TOUCH_ROTATE) === c.TOUCH_ROTATE || (this._state & c.TOUCH_DOLLY_ROTATE) === c.TOUCH_DOLLY_ROTATE || (this._state & c.TOUCH_ZOOM_ROTATE) === c.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(Lt, Tt), this._isUserControllingRotate = !0), (this._state & c.DOLLY) === c.DOLLY || (this._state & c.ZOOM) === c.ZOOM) {
|
|
48937
48937
|
const Mt = this.dollyToCursor ? (r.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, Ht = this.dollyToCursor ? (r.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, wt = this.dollyDragInverted ? -1 : 1;
|
|
48938
48938
|
(this._state & c.DOLLY) === c.DOLLY ? (this._dollyInternal(
|
|
48939
|
-
wt * Tt *
|
|
48939
|
+
wt * Tt * he$1,
|
|
48940
48940
|
Mt,
|
|
48941
48941
|
Ht
|
|
48942
48942
|
), this._isUserControllingDolly = !0) : (this._zoomInternal(
|
|
48943
|
-
wt * Tt *
|
|
48943
|
+
wt * Tt * he$1,
|
|
48944
48944
|
Mt,
|
|
48945
48945
|
Ht
|
|
48946
48946
|
), this._isUserControllingZoom = !0);
|
|
@@ -48949,7 +48949,7 @@ let x$2, ke, ce$1, Oe, z, b$1, L$1, X, ie, N, H, B, Ne, He, F, re, q, Ie, Te, je
|
|
|
48949
48949
|
const Mt = z.x - this._activePointers[1].clientX, Ht = z.y - this._activePointers[1].clientY, wt = Math.sqrt(Mt * Mt + Ht * Ht), Pt = g.y - wt;
|
|
48950
48950
|
g.set(0, wt);
|
|
48951
48951
|
const At = this.dollyToCursor ? (V.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, Ot = this.dollyToCursor ? (V.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
48952
|
-
(this._state & c.TOUCH_DOLLY) === c.TOUCH_DOLLY || (this._state & c.TOUCH_DOLLY_ROTATE) === c.TOUCH_DOLLY_ROTATE || (this._state & c.TOUCH_DOLLY_TRUCK) === c.TOUCH_DOLLY_TRUCK || (this._state & c.TOUCH_DOLLY_SCREEN_PAN) === c.TOUCH_DOLLY_SCREEN_PAN || (this._state & c.TOUCH_DOLLY_OFFSET) === c.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(Pt *
|
|
48952
|
+
(this._state & c.TOUCH_DOLLY) === c.TOUCH_DOLLY || (this._state & c.TOUCH_DOLLY_ROTATE) === c.TOUCH_DOLLY_ROTATE || (this._state & c.TOUCH_DOLLY_TRUCK) === c.TOUCH_DOLLY_TRUCK || (this._state & c.TOUCH_DOLLY_SCREEN_PAN) === c.TOUCH_DOLLY_SCREEN_PAN || (this._state & c.TOUCH_DOLLY_OFFSET) === c.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(Pt * he$1, At, Ot), this._isUserControllingDolly = !0) : (this._zoomInternal(Pt * he$1, At, Ot), this._isUserControllingZoom = !0);
|
|
48953
48953
|
}
|
|
48954
48954
|
((this._state & c.TRUCK) === c.TRUCK || (this._state & c.TOUCH_TRUCK) === c.TOUCH_TRUCK || (this._state & c.TOUCH_DOLLY_TRUCK) === c.TOUCH_DOLLY_TRUCK || (this._state & c.TOUCH_ZOOM_TRUCK) === c.TOUCH_ZOOM_TRUCK) && (this._truckInternal(Lt, Tt, !1, !1), this._isUserControllingTruck = !0), ((this._state & c.SCREEN_PAN) === c.SCREEN_PAN || (this._state & c.TOUCH_SCREEN_PAN) === c.TOUCH_SCREEN_PAN || (this._state & c.TOUCH_DOLLY_SCREEN_PAN) === c.TOUCH_DOLLY_SCREEN_PAN || (this._state & c.TOUCH_ZOOM_SCREEN_PAN) === c.TOUCH_ZOOM_SCREEN_PAN) && (this._truckInternal(Lt, Tt, !1, !0), this._isUserControllingTruck = !0), ((this._state & c.OFFSET) === c.OFFSET || (this._state & c.TOUCH_OFFSET) === c.TOUCH_OFFSET || (this._state & c.TOUCH_DOLLY_OFFSET) === c.TOUCH_DOLLY_OFFSET || (this._state & c.TOUCH_ZOOM_OFFSET) === c.TOUCH_ZOOM_OFFSET) && (this._truckInternal(Lt, Tt, !0, !1), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
48955
48955
|
}, St = () => {
|
|
@@ -49845,7 +49845,7 @@ let x$2, ke, ce$1, Oe, z, b$1, L$1, X, ie, N, H, B, Ne, He, F, re, q, Ie, Te, je
|
|
|
49845
49845
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
|
49846
49846
|
else {
|
|
49847
49847
|
const Ce = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
49848
|
-
this._spherical.theta =
|
|
49848
|
+
this._spherical.theta = le$1(
|
|
49849
49849
|
this._spherical.theta,
|
|
49850
49850
|
this._sphericalEnd.theta,
|
|
49851
49851
|
this._thetaVelocity,
|
|
@@ -49858,7 +49858,7 @@ let x$2, ke, ce$1, Oe, z, b$1, L$1, X, ie, N, H, B, Ne, He, F, re, q, Ie, Te, je
|
|
|
49858
49858
|
this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
|
|
49859
49859
|
else {
|
|
49860
49860
|
const Ce = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
49861
|
-
this._spherical.phi =
|
|
49861
|
+
this._spherical.phi = le$1(
|
|
49862
49862
|
this._spherical.phi,
|
|
49863
49863
|
this._sphericalEnd.phi,
|
|
49864
49864
|
this._phiVelocity,
|
|
@@ -49871,7 +49871,7 @@ let x$2, ke, ce$1, Oe, z, b$1, L$1, X, ie, N, H, B, Ne, He, F, re, q, Ie, Te, je
|
|
|
49871
49871
|
this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
|
|
49872
49872
|
else {
|
|
49873
49873
|
const Ce = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
|
|
49874
|
-
this._spherical.radius =
|
|
49874
|
+
this._spherical.radius = le$1(
|
|
49875
49875
|
this._spherical.radius,
|
|
49876
49876
|
this._sphericalEnd.radius,
|
|
49877
49877
|
this._radiusVelocity,
|
|
@@ -49912,7 +49912,7 @@ let x$2, ke, ce$1, Oe, z, b$1, L$1, X, ie, N, H, B, Ne, He, F, re, q, Ie, Te, je
|
|
|
49912
49912
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
|
49913
49913
|
else {
|
|
49914
49914
|
const Ce = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
|
|
49915
|
-
this._zoom =
|
|
49915
|
+
this._zoom = le$1(
|
|
49916
49916
|
this._zoom,
|
|
49917
49917
|
this._zoomEnd,
|
|
49918
49918
|
this._zoomVelocity,
|
|
@@ -50249,7 +50249,7 @@ A.prototype.emit = function(d) {
|
|
|
50249
50249
|
if (typeof w == "function")
|
|
50250
50250
|
Ve(w, this, t);
|
|
50251
50251
|
else
|
|
50252
|
-
for (var _ = w.length, Re =
|
|
50252
|
+
for (var _ = w.length, Re = lt$1(w, _), o = 0; o < _; ++o)
|
|
50253
50253
|
Ve(Re[o], this, t);
|
|
50254
50254
|
return !0;
|
|
50255
50255
|
};
|
|
@@ -50334,7 +50334,7 @@ function nt(d, t, o) {
|
|
|
50334
50334
|
if (r === void 0)
|
|
50335
50335
|
return [];
|
|
50336
50336
|
var V = r[t];
|
|
50337
|
-
return V === void 0 ? [] : typeof V == "function" ? o ? [V.listener || V] : [V] : o ? Xt(V) :
|
|
50337
|
+
return V === void 0 ? [] : typeof V == "function" ? o ? [V.listener || V] : [V] : o ? Xt(V) : lt$1(V, V.length);
|
|
50338
50338
|
}
|
|
50339
50339
|
A.prototype.listeners = function(d) {
|
|
50340
50340
|
return nt(this, d, !0);
|
|
@@ -50360,7 +50360,7 @@ function at(d) {
|
|
|
50360
50360
|
A.prototype.eventNames = function() {
|
|
50361
50361
|
return this._eventsCount > 0 ? me(this._events) : [];
|
|
50362
50362
|
};
|
|
50363
|
-
function
|
|
50363
|
+
function lt$1(d, t) {
|
|
50364
50364
|
for (var o = new Array(t), r = 0; r < t; ++r)
|
|
50365
50365
|
o[r] = d[r];
|
|
50366
50366
|
return o;
|
|
@@ -50383,13 +50383,13 @@ function qt$1(d, t) {
|
|
|
50383
50383
|
function g() {
|
|
50384
50384
|
typeof d.removeListener == "function" && d.removeListener("error", V), o([].slice.call(arguments));
|
|
50385
50385
|
}
|
|
50386
|
-
|
|
50386
|
+
ht$1(d, t, g, { once: !0 }), t !== "error" && $t(d, V, { once: !0 });
|
|
50387
50387
|
});
|
|
50388
50388
|
}
|
|
50389
50389
|
function $t(d, t, o) {
|
|
50390
|
-
typeof d.on == "function" &&
|
|
50390
|
+
typeof d.on == "function" && ht$1(d, "error", t, o);
|
|
50391
50391
|
}
|
|
50392
|
-
function
|
|
50392
|
+
function ht$1(d, t, o, r) {
|
|
50393
50393
|
if (typeof d.on == "function")
|
|
50394
50394
|
r.once ? d.once(t, o) : d.on(t, o);
|
|
50395
50395
|
else if (typeof d.addEventListener == "function")
|
|
@@ -50772,7 +50772,7 @@ class as extends ne {
|
|
|
50772
50772
|
super.update(t, o), this.autoRotateSpeed && this.cameraControls && (this.cameraControls.azimuthAngle += this.autoRotateSpeed * t * MathUtils.DEG2RAD);
|
|
50773
50773
|
}
|
|
50774
50774
|
}
|
|
50775
|
-
class
|
|
50775
|
+
class ls {
|
|
50776
50776
|
constructor(t) {
|
|
50777
50777
|
this.event = new ge.EventEmitter();
|
|
50778
50778
|
const { renderer: o, scene: r, camera: V } = t, g = new TransformControls(
|
|
@@ -50832,7 +50832,7 @@ class hs {
|
|
|
50832
50832
|
this.event.removeAllListeners(), (t = this.controls) == null || t.dispose();
|
|
50833
50833
|
}
|
|
50834
50834
|
}
|
|
50835
|
-
const Be$1 = new Vector3(),
|
|
50835
|
+
const Be$1 = new Vector3(), hs = new Quaternion(), Ze = new Vector3(), I$1 = new Matrix4(), cs = new Matrix4();
|
|
50836
50836
|
class ds {
|
|
50837
50837
|
constructor(t = {}) {
|
|
50838
50838
|
const o = this;
|
|
@@ -50886,7 +50886,7 @@ class ds {
|
|
|
50886
50886
|
if (Ht.style.display = Mt === !0 ? "" : "none", Mt === !0) {
|
|
50887
50887
|
It.onBeforeRender(o, bt, Lt);
|
|
50888
50888
|
let wt;
|
|
50889
|
-
It.isCSS3DSprite ? (I$1.copy(Lt.matrixWorldInverse), I$1.transpose(), It.rotation2D !== 0 && I$1.multiply(cs.makeRotationZ(It.rotation2D)), It.matrixWorld.decompose(Be$1,
|
|
50889
|
+
It.isCSS3DSprite ? (I$1.copy(Lt.matrixWorldInverse), I$1.transpose(), It.rotation2D !== 0 && I$1.multiply(cs.makeRotationZ(It.rotation2D)), It.matrixWorld.decompose(Be$1, hs, Ze), I$1.setPosition(Be$1), I$1.scale(Ze), I$1.elements[3] = 0, I$1.elements[7] = 0, I$1.elements[11] = 0, I$1.elements[15] = 1, wt = yt(I$1)) : wt = yt(It.matrixWorld);
|
|
50890
50890
|
const Pt = w.objects.get(It);
|
|
50891
50891
|
if (Pt === void 0 || Pt.style !== wt) {
|
|
50892
50892
|
Ht.style.transform = wt;
|
|
@@ -51873,6 +51873,11 @@ class zs extends ne {
|
|
|
51873
51873
|
o.enabled = r;
|
|
51874
51874
|
});
|
|
51875
51875
|
}
|
|
51876
|
+
setSize(t, o) {
|
|
51877
|
+
this.controllerMap.forEach((r, V) => {
|
|
51878
|
+
V.setSize(t, o);
|
|
51879
|
+
});
|
|
51880
|
+
}
|
|
51876
51881
|
}
|
|
51877
51882
|
const ue$1 = class M1 {
|
|
51878
51883
|
constructor(t) {
|
|
@@ -52027,7 +52032,7 @@ const ue$1 = class M1 {
|
|
|
52027
52032
|
}
|
|
52028
52033
|
}
|
|
52029
52034
|
initTransformControls() {
|
|
52030
|
-
const t = new
|
|
52035
|
+
const t = new ls({
|
|
52031
52036
|
camera: this.camera,
|
|
52032
52037
|
renderer: this.renderer,
|
|
52033
52038
|
scene: this.scene
|
|
@@ -52063,11 +52068,12 @@ const ue$1 = class M1 {
|
|
|
52063
52068
|
rendererController: V,
|
|
52064
52069
|
cameraController: g,
|
|
52065
52070
|
composerController: v,
|
|
52066
|
-
cssRendererController: w
|
|
52067
|
-
|
|
52068
|
-
|
|
52069
|
-
|
|
52070
|
-
|
|
52071
|
+
cssRendererController: w,
|
|
52072
|
+
leadController: _
|
|
52073
|
+
} = this, Re = this.renderer.getSize(new Vector2());
|
|
52074
|
+
Re.x === t && Re.y === o || (g.setSize(t, o), V.setSize(t, o), v == null || v.setSize(t, o), w == null || w.setSize(t, o), _.setSize(t, o), this.installPlugins.forEach((Ce) => {
|
|
52075
|
+
var ve;
|
|
52076
|
+
(ve = Ce.setSize) == null || ve.call(Ce, t, o);
|
|
52071
52077
|
}), this.render(), r && this.event.emit("resize", { width: t, height: o }));
|
|
52072
52078
|
}
|
|
52073
52079
|
setDevicePixelRatio(t) {
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.26.
|
|
1
|
+
declare const _default: "0.26.12";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vis-core",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.12",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "npm run version && PORT=5173 bundler-dev",
|
|
6
6
|
"build:site": "npm run version && bundler",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"esus-lite": "^0.2.8",
|
|
70
70
|
"events": "^3.3.0",
|
|
71
71
|
"geojson-cn": "^0.2.5",
|
|
72
|
-
"gl-draw": "0.14.
|
|
72
|
+
"gl-draw": "0.14.13",
|
|
73
73
|
"jsrsasign": "^11.1.0",
|
|
74
74
|
"lodash-es": "^4.17.21"
|
|
75
75
|
},
|