vis-core 0.12.35 → 0.12.37

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.
@@ -40750,6 +40750,7 @@ class MI extends ye {
40750
40750
  E(this, "line");
40751
40751
  E(this, "helperMesh");
40752
40752
  E(this, "helperMeshPosition");
40753
+ E(this, "showTween");
40753
40754
  this.options = Pt({
40754
40755
  color: "#ffffff",
40755
40756
  lineWidth: 6,
@@ -40826,7 +40827,7 @@ class MI extends ye {
40826
40827
  this.line && (this.line.material.uniforms.color.value = new ht(e));
40827
40828
  }
40828
40829
  animateIn(e) {
40829
- this.line && (this.line.material.userData.tween && (this.line.material.userData.tween.stop(), this.line.material.userData.tween = null), new Ko.Tween(this.line.material.uniforms.visibility).to({ value: 1 }, 500).onComplete(() => {
40830
+ this.line && (this.line.material.userData.tween && (this.line.material.userData.tween.stop(), this.line.material.userData.tween = null), this.showTween && this.showTween.stop(), this.showTween = new Ko.Tween(this.line.material.uniforms.visibility).to({ value: 1 }, 500).onComplete(() => {
40830
40831
  this.line.material.uniforms.offset.value.x = 1, this.options.offsetLoop ? this.line.animate(e) : this.line.animate2({ duration: e, repeat: 1 / 0 });
40831
40832
  }).start());
40832
40833
  }
@@ -41144,7 +41145,7 @@ function Ql(n) {
41144
41145
  const t = new ee();
41145
41146
  return t.color.setScalar(n), t;
41146
41147
  }
41147
- const XX = "0.12.35", c1 = !1;
41148
+ const XX = "0.12.37", c1 = !1;
41148
41149
  class ml {
41149
41150
  constructor(t, e = {}) {
41150
41151
  E(this, "container");
@@ -41862,14 +41863,14 @@ class VX extends ye {
41862
41863
  getPointInContinent(e) {
41863
41864
  return !!this.getPointInContinentInfo(e);
41864
41865
  }
41865
- getLocationPosition(e) {
41866
- var s;
41867
- const i = (s = this.getPointInContinentInfo(e)) == null ? void 0 : s.properties.name;
41868
- if (i) {
41869
- const l = this.mapArr.find((a) => a.userData.name === i);
41870
- if (l) {
41871
- const { projection: a } = l.userData, [o, c] = e, [d, h] = a([o, c]), r = new Y(d, -h, this.options.depth);
41872
- return r.applyMatrix4(l.object3d.matrixWorld), [r.x, r.y, r.z];
41866
+ getLocationPosition(e, i) {
41867
+ var l;
41868
+ const s = i || ((l = this.getPointInContinentInfo(e)) == null ? void 0 : l.properties.name);
41869
+ if (s) {
41870
+ const a = this.mapArr.find((o) => o.userData.name === s);
41871
+ if (a) {
41872
+ const { projection: o } = a.userData, [c, d] = e, [h, r] = o([c, d]), u = new Y(h, -r, this.options.depth);
41873
+ return u.applyMatrix4(a.object3d.matrixWorld), [u.x, u.y, u.z];
41873
41874
  }
41874
41875
  }
41875
41876
  }
@@ -46760,7 +46761,7 @@ class L8 {
46760
46761
  const o = a;
46761
46762
  o.material && e !== void 0 && Array.isArray(o.material) && Array.isArray(s) ? o.material.every(
46762
46763
  (c, d) => c === s[d]
46763
- ) && (o.material[e] = i) : o.material && !Array.isArray(o.material) && !Array.isArray(s) && o.material === s && (o.material = i);
46764
+ ) && (o.material[e] = i) : o.material && e !== void 0 && Array.isArray(o.material) && !Array.isArray(s) ? o.material[e] === s && (o.material[e] = i) : o.material && !Array.isArray(o.material) && !Array.isArray(s) && o.material === s && (o.material = i);
46764
46765
  }), (l = this.viewport.vis) == null || l.mList.materialList.forEach((a) => {
46765
46766
  (Array.isArray(s) ? e !== void 0 && a.material === s[e] : a.material === s) && (a.material = i);
46766
46767
  }));
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.12.35";
1
+ declare const _default: "0.12.37";
2
2
  export default _default;
@@ -1,4 +1,5 @@
1
1
  import Pencil, { BaseObject } from 'gl-draw';
2
+ import { Tween } from '@tweenjs/tween.js';
2
3
  import * as THREE from 'three';
3
4
  import { Line } from 'gl-draw/dist/objects';
4
5
  interface Options {
@@ -25,6 +26,7 @@ export default class extends BaseObject {
25
26
  instantiate(): Promise<this>;
26
27
  setPath(from: THREE.Vector3 | number[], to: THREE.Vector3 | number[], radius: number, setPointWidth?: (p: number) => number): void;
27
28
  setColor(color: string): void;
29
+ showTween: Tween<any>;
28
30
  animateIn(duration?: number): void;
29
31
  update(): void;
30
32
  setMList(): void;
@@ -21,7 +21,7 @@ export default class extends BaseObject {
21
21
  };
22
22
  } | undefined;
23
23
  getPointInContinent(location: [number, number]): boolean;
24
- getLocationPosition(location: [number, number]): number[] | undefined;
24
+ getLocationPosition(location: [number, number], tName?: string): number[] | undefined;
25
25
  render(): void;
26
26
  dispose(): void;
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.12.35",
3
+ "version": "0.12.37",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version &&PUBLIC_EXCLUDE=public/city bundler",