vis-core 0.28.24 → 0.28.26
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 +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.module.js +71 -49
- package/dist/version.d.ts +1 -1
- package/dist/vis/all/objects/Arc/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -88,7 +88,7 @@ const publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRz
|
|
|
88
88
|
).toString(CryptoJS.enc.Utf8), Fe = JSON.parse(Ne), Ae = Date.now();
|
|
89
89
|
return !Fe.s || Fe.s > Ae ? (this.token = void 0, "") : Fe.e && Fe.e < Ae ? (this.token = void 0, "") : (Fe.isValid = O, Fe);
|
|
90
90
|
}
|
|
91
|
-
}, version = "0.28.
|
|
91
|
+
}, version = "0.28.26";
|
|
92
92
|
/**
|
|
93
93
|
* @license
|
|
94
94
|
* Copyright 2010-2025 Three.js Authors
|
|
@@ -57768,7 +57768,7 @@ class Arc extends ht {
|
|
|
57768
57768
|
{ key: "Arc_终点", position: I.v3 }
|
|
57769
57769
|
].map((at) => B0(this, [at], function* ({ key: je, position: ke }) {
|
|
57770
57770
|
const ct = yield Pe.draw("Group", {}, this);
|
|
57771
|
-
return ct.position.copy(ke), ct.userData.disabledC = !0, ct.userData.disabledR = !0, Pe.updateBaseObjectKey(ct, `${je}_${this.options.key}`), ct;
|
|
57771
|
+
return ct.position.copy(ke), ct.userData.disabledC = !0, ct.userData.disabledR = !0, ct.userData.disabledProcessedChildren = !0, Pe.updateBaseObjectKey(ct, `${je}_${this.options.key}`), ct;
|
|
57772
57772
|
}))
|
|
57773
57773
|
);
|
|
57774
57774
|
this.helperMesh = [Fe, Ae, De, xt], this.helperMeshPosition = [
|
|
@@ -59106,7 +59106,11 @@ function applyFixes(g, t) {
|
|
|
59106
59106
|
}
|
|
59107
59107
|
},
|
|
59108
59108
|
{
|
|
59109
|
-
version: "0.
|
|
59109
|
+
version: "1.0.0",
|
|
59110
|
+
fix: () => !1
|
|
59111
|
+
},
|
|
59112
|
+
{
|
|
59113
|
+
version: "1.0.1",
|
|
59110
59114
|
fix: () => !1
|
|
59111
59115
|
}
|
|
59112
59116
|
];
|
|
@@ -59133,7 +59137,48 @@ const fixJSON = (g) => {
|
|
|
59133
59137
|
version: g.v
|
|
59134
59138
|
}
|
|
59135
59139
|
}), (t = g.c) != null && t.key && delete g.c.key, applyFixes(g.c.version, g), g;
|
|
59136
|
-
};
|
|
59140
|
+
}, encodings = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
59141
|
+
function encodeArrayBufferToUrlSafeBase64(g) {
|
|
59142
|
+
let t = "";
|
|
59143
|
+
const r = new Uint8Array(g), m = r.byteLength, v = m % 3, C = m - v;
|
|
59144
|
+
let _, w, I, O, Pe;
|
|
59145
|
+
for (let Ne = 0; Ne < C; Ne = Ne + 3)
|
|
59146
|
+
Pe = r[Ne] << 16 | r[Ne + 1] << 8 | r[Ne + 2], _ = (Pe & 16515072) >> 18, w = (Pe & 258048) >> 12, I = (Pe & 4032) >> 6, O = Pe & 63, t += encodings[_] + encodings[w] + encodings[I] + encodings[O];
|
|
59147
|
+
return v === 1 ? (Pe = r[C], _ = (Pe & 252) >> 2, w = (Pe & 3) << 4, t += encodings[_] + encodings[w]) : v === 2 && (Pe = r[C] << 8 | r[C + 1], _ = (Pe & 64512) >> 10, w = (Pe & 1008) >> 4, I = (Pe & 15) << 2, t += encodings[_] + encodings[w] + encodings[I]), t;
|
|
59148
|
+
}
|
|
59149
|
+
function charCodeToNumber(g) {
|
|
59150
|
+
if (g >= 65 && g <= 90)
|
|
59151
|
+
return g - 65;
|
|
59152
|
+
if (g >= 97 && g <= 122)
|
|
59153
|
+
return g - 71;
|
|
59154
|
+
if (g >= 48 && g <= 57)
|
|
59155
|
+
return g + 4;
|
|
59156
|
+
if (g === 45)
|
|
59157
|
+
return 62;
|
|
59158
|
+
if (g === 95)
|
|
59159
|
+
return 63;
|
|
59160
|
+
throw new Error("Invalid char code in url safe base64: " + g);
|
|
59161
|
+
}
|
|
59162
|
+
function decodeUrlSafeBase64ToArrayBuffer(g) {
|
|
59163
|
+
const t = g.length % 4;
|
|
59164
|
+
let r = 0, m = 0, v = 0;
|
|
59165
|
+
if (t === 0)
|
|
59166
|
+
r = g.length / 4 * 3, m = g.length;
|
|
59167
|
+
else {
|
|
59168
|
+
if (t === 1)
|
|
59169
|
+
throw new Error("invalid url safe base64 encoded string: " + g);
|
|
59170
|
+
t === 2 ? (r = (g.length - 2) / 4 * 3, m = g.length - 2, v = 1) : (r = (g.length - 3) / 4 * 3, m = g.length - 3, v = 2);
|
|
59171
|
+
}
|
|
59172
|
+
let C;
|
|
59173
|
+
const _ = new Uint8Array(r + v);
|
|
59174
|
+
let w, I, O, Pe;
|
|
59175
|
+
for (let Ne = 0, Fe = 0; Ne < m; Ne += 4, Fe += 3)
|
|
59176
|
+
w = charCodeToNumber(g.charCodeAt(Ne)), I = charCodeToNumber(g.charCodeAt(Ne + 1)), O = charCodeToNumber(g.charCodeAt(Ne + 2)), Pe = charCodeToNumber(g.charCodeAt(Ne + 3)), C = (w << 18) + (I << 12) + (O << 6) + Pe, _.set(
|
|
59177
|
+
[(C & 16711680) >> 16, (C & 65280) >> 8, C & 255],
|
|
59178
|
+
Fe
|
|
59179
|
+
);
|
|
59180
|
+
return t === 2 ? (w = charCodeToNumber(g.charCodeAt(m)), I = charCodeToNumber(g.charCodeAt(m + 1)), C = (w << 2) + (I >> 4), _.set([C & 255], r)) : t === 3 && (w = charCodeToNumber(g.charCodeAt(m)), I = charCodeToNumber(g.charCodeAt(m + 1)), O = charCodeToNumber(g.charCodeAt(m + 2)), C = (w << 10) + (I << 4) + (O >> 2), _.set([(C & 65280) >> 8, C & 255], r)), _.buffer;
|
|
59181
|
+
}
|
|
59137
59182
|
class Command {
|
|
59138
59183
|
constructor(t) {
|
|
59139
59184
|
C0(this, "id");
|
|
@@ -60043,48 +60088,7 @@ const Commands = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
60043
60088
|
SetTarget,
|
|
60044
60089
|
SetValue,
|
|
60045
60090
|
SetVector
|
|
60046
|
-
}, Symbol.toStringTag, { value: "Module" }))
|
|
60047
|
-
function encodeArrayBufferToUrlSafeBase64(g) {
|
|
60048
|
-
let t = "";
|
|
60049
|
-
const r = new Uint8Array(g), m = r.byteLength, v = m % 3, C = m - v;
|
|
60050
|
-
let _, w, I, O, Pe;
|
|
60051
|
-
for (let Ne = 0; Ne < C; Ne = Ne + 3)
|
|
60052
|
-
Pe = r[Ne] << 16 | r[Ne + 1] << 8 | r[Ne + 2], _ = (Pe & 16515072) >> 18, w = (Pe & 258048) >> 12, I = (Pe & 4032) >> 6, O = Pe & 63, t += encodings[_] + encodings[w] + encodings[I] + encodings[O];
|
|
60053
|
-
return v === 1 ? (Pe = r[C], _ = (Pe & 252) >> 2, w = (Pe & 3) << 4, t += encodings[_] + encodings[w]) : v === 2 && (Pe = r[C] << 8 | r[C + 1], _ = (Pe & 64512) >> 10, w = (Pe & 1008) >> 4, I = (Pe & 15) << 2, t += encodings[_] + encodings[w] + encodings[I]), t;
|
|
60054
|
-
}
|
|
60055
|
-
function charCodeToNumber(g) {
|
|
60056
|
-
if (g >= 65 && g <= 90)
|
|
60057
|
-
return g - 65;
|
|
60058
|
-
if (g >= 97 && g <= 122)
|
|
60059
|
-
return g - 71;
|
|
60060
|
-
if (g >= 48 && g <= 57)
|
|
60061
|
-
return g + 4;
|
|
60062
|
-
if (g === 45)
|
|
60063
|
-
return 62;
|
|
60064
|
-
if (g === 95)
|
|
60065
|
-
return 63;
|
|
60066
|
-
throw new Error("Invalid char code in url safe base64: " + g);
|
|
60067
|
-
}
|
|
60068
|
-
function decodeUrlSafeBase64ToArrayBuffer(g) {
|
|
60069
|
-
const t = g.length % 4;
|
|
60070
|
-
let r = 0, m = 0, v = 0;
|
|
60071
|
-
if (t === 0)
|
|
60072
|
-
r = g.length / 4 * 3, m = g.length;
|
|
60073
|
-
else {
|
|
60074
|
-
if (t === 1)
|
|
60075
|
-
throw new Error("invalid url safe base64 encoded string: " + g);
|
|
60076
|
-
t === 2 ? (r = (g.length - 2) / 4 * 3, m = g.length - 2, v = 1) : (r = (g.length - 3) / 4 * 3, m = g.length - 3, v = 2);
|
|
60077
|
-
}
|
|
60078
|
-
let C;
|
|
60079
|
-
const _ = new Uint8Array(r + v);
|
|
60080
|
-
let w, I, O, Pe;
|
|
60081
|
-
for (let Ne = 0, Fe = 0; Ne < m; Ne += 4, Fe += 3)
|
|
60082
|
-
w = charCodeToNumber(g.charCodeAt(Ne)), I = charCodeToNumber(g.charCodeAt(Ne + 1)), O = charCodeToNumber(g.charCodeAt(Ne + 2)), Pe = charCodeToNumber(g.charCodeAt(Ne + 3)), C = (w << 18) + (I << 12) + (O << 6) + Pe, _.set(
|
|
60083
|
-
[(C & 16711680) >> 16, (C & 65280) >> 8, C & 255],
|
|
60084
|
-
Fe
|
|
60085
|
-
);
|
|
60086
|
-
return t === 2 ? (w = charCodeToNumber(g.charCodeAt(m)), I = charCodeToNumber(g.charCodeAt(m + 1)), C = (w << 2) + (I >> 4), _.set([C & 255], r)) : t === 3 && (w = charCodeToNumber(g.charCodeAt(m)), I = charCodeToNumber(g.charCodeAt(m + 1)), O = charCodeToNumber(g.charCodeAt(m + 2)), C = (w << 10) + (I << 4) + (O >> 2), _.set([(C & 65280) >> 8, C & 255], r)), _.buffer;
|
|
60087
|
-
}
|
|
60091
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
60088
60092
|
class History {
|
|
60089
60093
|
constructor(t) {
|
|
60090
60094
|
C0(this, "editor");
|
|
@@ -60330,8 +60334,8 @@ class Viewport {
|
|
|
60330
60334
|
}
|
|
60331
60335
|
if (this.vis = this.options.visFactories, this.vis.visName !== t)
|
|
60332
60336
|
throw new Error(`visName is not match, import {${t}}`);
|
|
60333
|
-
let v = q0(
|
|
60334
|
-
v = this.editor.hooks.events.beforeSetVisOptions.length ? this.editor.hooks.dispatch("beforeSetVisOptions", v) : v, this.vis.setOptions(v), this.vis.cameraState = q0({}, this.cameraState), this.delLoadObj && (this.vis.delLoadArr = this.delLoadObj), this.vis.playing = this.editor.playing, this.vis._baseObjectByUuid = this.editor.baseObjectByUuid.bind(this.editor), this.vis._objectByUuid = this.editor.objectByUuid.bind(this.editor), this.vis.on("loaderProgress", (_, w) => {
|
|
60337
|
+
let v = q0({}, r);
|
|
60338
|
+
v = this.editor.hooks.events.beforeSetVisOptions.length ? this.editor.hooks.dispatch("beforeSetVisOptions", v) : v, this.vis.setOptions(q0(q0({}, v), this.extendsOptions)), this.vis.cameraState = q0({}, this.cameraState), this.delLoadObj && (this.vis.delLoadArr = this.delLoadObj), this.vis.playing = this.editor.playing, this.vis._baseObjectByUuid = this.editor.baseObjectByUuid.bind(this.editor), this.vis._objectByUuid = this.editor.objectByUuid.bind(this.editor), this.vis.on("loaderProgress", (_, w) => {
|
|
60335
60339
|
this.editor.emit("progress", {
|
|
60336
60340
|
type: "下载资源",
|
|
60337
60341
|
value: _ / w * 100 | 0
|
|
@@ -60600,7 +60604,7 @@ class Editor {
|
|
|
60600
60604
|
});
|
|
60601
60605
|
}
|
|
60602
60606
|
const w = C.length > 0 ? r(C) : [], I = v.object3d.isGroup, O = I || ["@Scene", "@Camera"].includes(v.key) || v.userData.disabledC || v.key.includes("__c__"), Pe = ["@Scene", "@Camera"].includes(v.key) || v.userData.disabledR || v.key.includes("__c__");
|
|
60603
|
-
if (w.length === 0 && I)
|
|
60607
|
+
if (w.length === 0 && I && !v.userData.disabledProcessedChildren)
|
|
60604
60608
|
return null;
|
|
60605
60609
|
const Ne = v.key.replace(
|
|
60606
60610
|
v.key[0],
|
|
@@ -60689,6 +60693,24 @@ class Editor {
|
|
|
60689
60693
|
}
|
|
60690
60694
|
});
|
|
60691
60695
|
}
|
|
60696
|
+
appendJSON(t) {
|
|
60697
|
+
return B0(this, null, function* () {
|
|
60698
|
+
let r;
|
|
60699
|
+
if (typeof t == "string") {
|
|
60700
|
+
const m = this.options.assetsPrefix + t;
|
|
60701
|
+
console.time("vis-core:time.append-json-fetch");
|
|
60702
|
+
const { res: v, err: C } = yield jsonFetch(m);
|
|
60703
|
+
if (console.timeEnd("vis-core:time.append-json-fetch"), C)
|
|
60704
|
+
throw new Error("appendJSON error:" + C);
|
|
60705
|
+
r = v;
|
|
60706
|
+
} else
|
|
60707
|
+
r = t;
|
|
60708
|
+
this.history.undos.length = 0, this.history.fromJSON({
|
|
60709
|
+
i: r.h.i,
|
|
60710
|
+
u: r.h.u.filter((m) => m.type !== "AddVis")
|
|
60711
|
+
}), yield this.history.processUndos(this.options.processUndosMaxFrameTime);
|
|
60712
|
+
});
|
|
60713
|
+
}
|
|
60692
60714
|
toJSON() {
|
|
60693
60715
|
return {};
|
|
60694
60716
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.28.
|
|
1
|
+
declare const _default: "0.28.26";
|
|
2
2
|
export default _default;
|