vis-core 0.28.33 → 0.28.34
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/detect/WebGL.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.module.js +58 -34
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.module.js
CHANGED
|
@@ -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.28.
|
|
66
|
+
const version = "0.28.34", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
|
|
67
67
|
token: void 0,
|
|
68
68
|
getInfo() {
|
|
69
69
|
if (!this.token)
|
|
@@ -57150,8 +57150,8 @@ class li {
|
|
|
57150
57150
|
this.renderer.setViewport(C, _, I, O), ve && (this.renderer.setScissor(C, _, I, O), this.renderer.setScissorTest(Ce));
|
|
57151
57151
|
}
|
|
57152
57152
|
dispose() {
|
|
57153
|
-
var t, r;
|
|
57154
|
-
this.setSize(
|
|
57153
|
+
var t, r, m;
|
|
57154
|
+
this.setSize(0, 0), (t = this.renderer) == null || t.clear(), (r = this.renderer) == null || r.dispose(), (m = this.renderer) == null || m.forceContextLoss();
|
|
57155
57155
|
}
|
|
57156
57156
|
}
|
|
57157
57157
|
const hi = {
|
|
@@ -57362,7 +57362,7 @@ function fi() {
|
|
|
57362
57362
|
const _e = class Nn {
|
|
57363
57363
|
constructor(t) {
|
|
57364
57364
|
var r, m;
|
|
57365
|
-
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 ui(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this.event.setMaxListeners(1 / 0), (m = (r = this.timer).connect) == null || m.call(r, document), this.options = Dt(Nn.options, t, {
|
|
57365
|
+
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 ui(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this._isDispose = !1, this.event.setMaxListeners(1 / 0), (m = (r = this.timer).connect) == null || m.call(r, document), this.options = Dt(Nn.options, t, {
|
|
57366
57366
|
isMergeableObject: f$1
|
|
57367
57367
|
}), this.userSetDprCache = this.options.renderer.devicePixelRatio;
|
|
57368
57368
|
const {
|
|
@@ -57661,10 +57661,10 @@ const _e = class Nn {
|
|
|
57661
57661
|
}
|
|
57662
57662
|
dispose() {
|
|
57663
57663
|
var t, r, m, C, _, I, O, ve, Ce, Pe, Ne, Fe, ke, Ue;
|
|
57664
|
-
this.stop(), this.timer.dispose(), removeAll(), this.event.removeAllListeners(), (t = this.resizeObserver) == null || t.unobserve(this.options.container), this.installPlugins.forEach((ht) => {
|
|
57664
|
+
this.handeleResize(1, 1, !1), this.stop(), this.timer.dispose(), removeAll(), this.event.removeAllListeners(), (t = this.resizeObserver) == null || t.unobserve(this.options.container), this.installPlugins.forEach((ht) => {
|
|
57665
57665
|
var at;
|
|
57666
57666
|
(at = ht.dispose) == null || at.call(ht);
|
|
57667
|
-
}), (r = this.controlsController) == null || r.dispose(), (m = this.transformController) == null || m.dispose(), (C = this.cssRendererController) == null || C.dispose(), (_ = this.sceneController) == null || _.dispose(), (I = this.cameraController) == null || I.dispose(), (O = this.helperController) == null || O.dispose(), (ve = this.composerController) == null || ve.dispose(), (Ce = this.rendererController) == null || Ce.dispose(), (Pe = this.loaderController) == null || Pe.dispose(), (Ne = this.leadController) == null || Ne.dispose(), (Fe = this.mListController) == null || Fe.dispose(), this.cssRendererController = void 0, this.installPlugins.clear(), (ke = this.stats) == null || ke.dom.remove(), (Ue = this.renderer) == null || Ue.domElement.remove();
|
|
57667
|
+
}), (r = this.controlsController) == null || r.dispose(), (m = this.transformController) == null || m.dispose(), (C = this.cssRendererController) == null || C.dispose(), (_ = this.sceneController) == null || _.dispose(), (I = this.cameraController) == null || I.dispose(), (O = this.helperController) == null || O.dispose(), (ve = this.composerController) == null || ve.dispose(), (Ce = this.rendererController) == null || Ce.dispose(), (Pe = this.loaderController) == null || Pe.dispose(), (Ne = this.leadController) == null || Ne.dispose(), (Fe = this.mListController) == null || Fe.dispose(), this.cssRendererController = void 0, this.installPlugins.clear(), (ke = this.stats) == null || ke.dom.remove(), (Ue = this.renderer) == null || Ue.domElement.remove(), this._isDispose = !0;
|
|
57668
57668
|
}
|
|
57669
57669
|
};
|
|
57670
57670
|
_e.options = {
|
|
@@ -58895,14 +58895,42 @@ class WebGL {
|
|
|
58895
58895
|
const r = this.getRenderer();
|
|
58896
58896
|
this.renderer = r;
|
|
58897
58897
|
}
|
|
58898
|
-
|
|
58898
|
+
withWebGLContext(t, r, m) {
|
|
58899
|
+
let C = null, _ = null;
|
|
58899
58900
|
try {
|
|
58900
|
-
|
|
58901
|
-
|
|
58902
|
-
|
|
58903
|
-
|
|
58901
|
+
return C = document.createElement("canvas"), C.width = 1, C.height = 1, t === "webgl" ? _ = C.getContext("webgl") || C.getContext(
|
|
58902
|
+
"experimental-webgl"
|
|
58903
|
+
) : _ = C.getContext("webgl2"), _ ? r(C, _) : m;
|
|
58904
|
+
} catch (I) {
|
|
58905
|
+
return m;
|
|
58906
|
+
} finally {
|
|
58907
|
+
if (_) {
|
|
58908
|
+
const I = _.getExtension("WEBGL_lose_context");
|
|
58909
|
+
I == null || I.loseContext();
|
|
58910
|
+
}
|
|
58911
|
+
C && (C.width = 0, C.height = 0);
|
|
58912
|
+
}
|
|
58913
|
+
}
|
|
58914
|
+
withCanvas(t, r) {
|
|
58915
|
+
let m = null;
|
|
58916
|
+
try {
|
|
58917
|
+
return m = document.createElement("canvas"), m.width = 1, m.height = 1, t(m);
|
|
58918
|
+
} catch (C) {
|
|
58919
|
+
return r;
|
|
58920
|
+
} finally {
|
|
58921
|
+
m && (m.width = 0, m.height = 0);
|
|
58904
58922
|
}
|
|
58905
58923
|
}
|
|
58924
|
+
getRawRenderer() {
|
|
58925
|
+
return this.withWebGLContext(
|
|
58926
|
+
"webgl",
|
|
58927
|
+
(t, r) => {
|
|
58928
|
+
const m = r.getExtension("WEBGL_debug_renderer_info");
|
|
58929
|
+
return m ? r.getParameter(m.UNMASKED_RENDERER_WEBGL) : "";
|
|
58930
|
+
},
|
|
58931
|
+
""
|
|
58932
|
+
);
|
|
58933
|
+
}
|
|
58906
58934
|
getRenderer() {
|
|
58907
58935
|
const t = this.rawRenderer;
|
|
58908
58936
|
return t ? t.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i, "$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g, "").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/, "$1") : "";
|
|
@@ -58917,20 +58945,18 @@ class WebGL {
|
|
|
58917
58945
|
};
|
|
58918
58946
|
}
|
|
58919
58947
|
isWebGLAvailable() {
|
|
58920
|
-
|
|
58921
|
-
|
|
58922
|
-
|
|
58923
|
-
|
|
58924
|
-
|
|
58925
|
-
}
|
|
58948
|
+
return this.withWebGLContext(
|
|
58949
|
+
"webgl",
|
|
58950
|
+
(t, r) => !!(window.WebGLRenderingContext && r),
|
|
58951
|
+
!1
|
|
58952
|
+
);
|
|
58926
58953
|
}
|
|
58927
58954
|
isWebGL2Available() {
|
|
58928
|
-
|
|
58929
|
-
|
|
58930
|
-
|
|
58931
|
-
|
|
58932
|
-
|
|
58933
|
-
}
|
|
58955
|
+
return this.withWebGLContext(
|
|
58956
|
+
"webgl2",
|
|
58957
|
+
(t, r) => !!(window.WebGL2RenderingContext && r),
|
|
58958
|
+
!1
|
|
58959
|
+
);
|
|
58934
58960
|
}
|
|
58935
58961
|
isWebGL2RenderingContextAvailable() {
|
|
58936
58962
|
return typeof window.WebGL2RenderingContext != "undefined";
|
|
@@ -58940,19 +58966,17 @@ class WebGL {
|
|
|
58940
58966
|
return !/SwiftShader/gi.test(t);
|
|
58941
58967
|
}
|
|
58942
58968
|
isColorSpaceAvailable(t) {
|
|
58943
|
-
|
|
58944
|
-
|
|
58945
|
-
|
|
58946
|
-
|
|
58947
|
-
|
|
58948
|
-
|
|
58969
|
+
return this.withWebGLContext(
|
|
58970
|
+
"webgl2",
|
|
58971
|
+
(r, m) => {
|
|
58972
|
+
const C = m;
|
|
58973
|
+
return C.drawingBufferColorSpace = t, C.drawingBufferColorSpace === t;
|
|
58974
|
+
},
|
|
58975
|
+
!1
|
|
58976
|
+
);
|
|
58949
58977
|
}
|
|
58950
58978
|
isWebPAvailable() {
|
|
58951
|
-
|
|
58952
|
-
return document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") === 0;
|
|
58953
|
-
} catch (t) {
|
|
58954
|
-
return !1;
|
|
58955
|
-
}
|
|
58979
|
+
return this.withCanvas((t) => t.toDataURL("image/webp").indexOf("data:image/webp") === 0, !1);
|
|
58956
58980
|
}
|
|
58957
58981
|
}
|
|
58958
58982
|
const detect = () => {
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.28.
|
|
1
|
+
declare const _default: "0.28.34";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vis-core",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.34",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "npm run version && PORT=5173 bundler-dev",
|
|
6
6
|
"build:site": "npm run version && PUBLIC_EXCLUDE=true bundler",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"esus-lite": "^0.2.8",
|
|
67
67
|
"events": "^3.3.0",
|
|
68
68
|
"geojson-cn": "^0.2.5",
|
|
69
|
-
"gl-draw": "0.15.
|
|
69
|
+
"gl-draw": "0.15.29",
|
|
70
70
|
"jsrsasign": "^11.1.0",
|
|
71
71
|
"lodash-es": "^4.17.21"
|
|
72
72
|
},
|