vis-core 0.28.5 → 0.28.7

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.
@@ -88,7 +88,7 @@ const publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRz
88
88
  ).toString(CryptoJS.enc.Utf8), ke = JSON.parse(Ae), He = Date.now();
89
89
  return !ke.s || ke.s > He ? (this.token = void 0, "") : ke.e && ke.e < He ? (this.token = void 0, "") : (ke.isValid = Pe, ke);
90
90
  }
91
- }, version = "0.28.5";
91
+ }, version = "0.28.7";
92
92
  /**
93
93
  * @license
94
94
  * Copyright 2010-2025 Three.js Authors
@@ -58906,7 +58906,14 @@ class AddMaterial extends Command {
58906
58906
  execute() {
58907
58907
  return B0(this, null, function* () {
58908
58908
  this.addObjectUuid = `material_${this.id}`;
58909
- const r = this.editor.pencil.mList, m = new THREE[this.materialType]();
58909
+ const r = this.editor.pencil.mList, m = this.materialType === "MeshLineMaterial" ? new Ie$2({
58910
+ color: new Color$1(16777215),
58911
+ lineWidth: 1,
58912
+ sizeAttenuation: 0
58913
+ }) : (
58914
+ // @ts-ignore
58915
+ new THREE[this.materialType]()
58916
+ );
58910
58917
  m.name = `材质_${this.id}`, r.add(this.addObjectUuid, m);
58911
58918
  });
58912
58919
  }
@@ -59891,7 +59898,10 @@ class Editor {
59891
59898
  }
59892
59899
  setObjectMaterial(t, r, m) {
59893
59900
  let v = t.material;
59894
- Array.isArray(t.material) && r !== void 0 ? (v = t.material[r], t.material[r] = m) : t.material = m, v != null && v.onBeforeCompile && (m.onBeforeCompile = v.onBeforeCompile), v != null && v.name && !m.name && (m.name = v.name);
59901
+ Array.isArray(t.material) && r !== void 0 ? (v = t.material[r], t.material[r] = m) : t.material = m, v != null && v.onBeforeCompile && (m.onBeforeCompile = v.onBeforeCompile), v != null && v.name && !m.name && (m.name = v.name), m instanceof Ie$2 && (m.resolution = new Vector2(
59902
+ this.pencil.renderer.domElement.width,
59903
+ this.pencil.renderer.domElement.height
59904
+ ));
59895
59905
  }
59896
59906
  uuidByObject(t) {
59897
59907
  var r;
@@ -59996,7 +60006,7 @@ class Editor {
59996
60006
  object: r.object3d,
59997
60007
  baseObject: r,
59998
60008
  material: m,
59999
- use: !!this.pencil.mList.getBaseObjectMap(m).size
60009
+ use: this.pencil.mList.getBaseObjectMap(m).size
60000
60010
  };
60001
60011
  }), this.emit("mListGraphChanged");
60002
60012
  }
@@ -60738,7 +60748,7 @@ class Base extends Camera {
60738
60748
  if (this.options.css2DContainer && (r.css2DRendererParams = {
60739
60749
  container: this.options.css2DContainer
60740
60750
  }), this.options.pencil)
60741
- this.pencil = this.options.pencil, this.sceneActive = this.pencil.addPage({
60751
+ this.pencil = this.options.pencil, this.pencil.stop(), this.sceneActive = this.pencil.addPage({
60742
60752
  cameraOptions: {
60743
60753
  fov: (C = (v = r.camera) == null ? void 0 : v.fov) != null ? C : 45,
60744
60754
  near: (O = (w = r.camera) == null ? void 0 : w.near) != null ? O : 0.1,
@@ -60936,7 +60946,7 @@ class Base extends Camera {
60936
60946
  this.showState || (this.useSaveCamera("visShow"), this.options.disableInitShow || this.showAction());
60937
60947
  }
60938
60948
  showAction() {
60939
- this.lead.group.show(), this.playing || this.lead.prefabGroup.show(), this.pencil.start(), this.showState = !0, this.emit("show");
60949
+ this.showState || (this.lead.group.show(), this.playing || this.lead.prefabGroup.show(), this.pencil.start(), this.showState = !0, this.emit("show"));
60940
60950
  }
60941
60951
  hide() {
60942
60952
  this.showState && (this.lead.group.hide(), this.lead.prefabGroup.hide(), this.showState = !1, this.emit("hide"));
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.28.5";
1
+ declare const _default: "0.28.7";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.28.5",
3
+ "version": "0.28.7",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && bundler",