vis-core 0.12.16 → 0.12.18
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.js +3 -3
- package/dist/index.module.js +20 -19
- package/dist/version.d.ts +1 -1
- package/dist/vis/map/objects/ContinentsBg.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -41029,7 +41029,7 @@ function Ql(n) {
|
|
|
41029
41029
|
const t = new t0();
|
|
41030
41030
|
return t.color.setScalar(n), t;
|
|
41031
41031
|
}
|
|
41032
|
-
const XX = "0.12.
|
|
41032
|
+
const XX = "0.12.18", o1 = !1;
|
|
41033
41033
|
class pl {
|
|
41034
41034
|
constructor(t, e = {}) {
|
|
41035
41035
|
P(this, "container");
|
|
@@ -41191,13 +41191,10 @@ class pl {
|
|
|
41191
41191
|
return Gt(this, null, function* () {
|
|
41192
41192
|
const { pencil: i } = this;
|
|
41193
41193
|
if (t === "mouseWheel" || t === "mouseLeft" || t === "mouseRight") {
|
|
41194
|
-
if (yield this.settings.mouseNone, !this.settings.mouseNone)
|
|
41195
|
-
|
|
41196
|
-
|
|
41197
|
-
|
|
41198
|
-
i.cameraControls.mouseButtons[s] = e;
|
|
41199
|
-
} else
|
|
41200
|
-
this.playing && (this.mouseButtonsActiveStore[t] = e, i.cameraControls.mouseButtons.left = ii.NONE);
|
|
41194
|
+
if (yield this.settings.mouseNone, !this.settings.mouseNone) {
|
|
41195
|
+
const s = t.replace("mouse", "").toLowerCase();
|
|
41196
|
+
e ? (this.mouseButtonsActiveStore[t] = e, i.cameraControls.mouseButtons[s] = e) : this.playing && (this.mouseButtonsActiveStore[t] = e, i.cameraControls.mouseButtons[s] = ii.NONE);
|
|
41197
|
+
}
|
|
41201
41198
|
} else
|
|
41202
41199
|
t === "mouseNone" && (e ? (i.cameraControls.mouseButtons.left = ii.NONE, i.cameraControls.mouseButtons.right = ii.NONE, i.cameraControls.mouseButtons.wheel = ii.NONE) : setTimeout(() => {
|
|
41203
41200
|
this.handleSetting(
|
|
@@ -41721,23 +41718,26 @@ class VX extends X0 {
|
|
|
41721
41718
|
);
|
|
41722
41719
|
});
|
|
41723
41720
|
}
|
|
41724
|
-
|
|
41721
|
+
getPointInContinentInfo(e) {
|
|
41725
41722
|
return a9.features.find((i) => i.geometry.coordinates.some((s) => s.length ? Fm(P5(e), qo(s)) : !1));
|
|
41726
41723
|
}
|
|
41724
|
+
getPointInContinent(e) {
|
|
41725
|
+
return !!this.getPointInContinentInfo(e);
|
|
41726
|
+
}
|
|
41727
41727
|
getLocationPosition(e) {
|
|
41728
41728
|
var s;
|
|
41729
|
-
const i = (s = this.
|
|
41729
|
+
const i = (s = this.getPointInContinentInfo(e)) == null ? void 0 : s.properties.name;
|
|
41730
41730
|
if (i) {
|
|
41731
41731
|
const l = this.mapArr.find((a) => a.userData.name === i);
|
|
41732
41732
|
if (l) {
|
|
41733
|
-
const { projection: a } = l.userData, [o, c] = e, [d, r] = a([o, c]), h = new S(d, -r, 0).add(
|
|
41733
|
+
const { projection: a } = l.userData, [o, c] = e, [d, r] = a([o, c]), h = l.object3d.getWorldPosition(new S()), u = new S(d, -r, 0).add(
|
|
41734
41734
|
new S(
|
|
41735
|
-
|
|
41736
|
-
|
|
41737
|
-
|
|
41735
|
+
h.x,
|
|
41736
|
+
h.y,
|
|
41737
|
+
h.z + this.options.depth
|
|
41738
41738
|
)
|
|
41739
41739
|
);
|
|
41740
|
-
return [
|
|
41740
|
+
return [u.x, u.y, u.z];
|
|
41741
41741
|
}
|
|
41742
41742
|
}
|
|
41743
41743
|
}
|
|
@@ -46561,11 +46561,12 @@ class gT {
|
|
|
46561
46561
|
var l;
|
|
46562
46562
|
let s = t.material;
|
|
46563
46563
|
Array.isArray(t.material) && e !== void 0 ? (s = [...t.material], t.material[e] = i) : t.material = i, s && t.userData.fixBufferGeometry && (this.pencil.scene.traverse((a) => {
|
|
46564
|
-
|
|
46565
|
-
|
|
46566
|
-
|
|
46564
|
+
const o = a;
|
|
46565
|
+
o.material && e !== void 0 && Array.isArray(o.material) && Array.isArray(s) ? o.material.every(
|
|
46566
|
+
(c, d) => c === s[d]
|
|
46567
|
+
) && (o.material[e] = i) : o.material && !Array.isArray(o.material) && !Array.isArray(s) && o.material === s && (o.material = i);
|
|
46567
46568
|
}), (l = this.viewport.vis) == null || l.mList.materialList.forEach((a) => {
|
|
46568
|
-
a.material === s && (a.material = i);
|
|
46569
|
+
(Array.isArray(s) ? e !== void 0 && a.material === s[e] : a.material === s) && (a.material = i);
|
|
46569
46570
|
}));
|
|
46570
46571
|
}
|
|
46571
46572
|
uuidByObject(t) {
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.12.
|
|
1
|
+
declare const _default: "0.12.18";
|
|
2
2
|
export default _default;
|
|
@@ -10,7 +10,7 @@ export default class extends BaseObject {
|
|
|
10
10
|
mapArr: PlaneMap[];
|
|
11
11
|
constructor(options: Options);
|
|
12
12
|
create(): Promise<void>;
|
|
13
|
-
|
|
13
|
+
getPointInContinentInfo(location: [number, number]): {
|
|
14
14
|
type: string;
|
|
15
15
|
properties: {
|
|
16
16
|
name: string;
|
|
@@ -20,6 +20,7 @@ export default class extends BaseObject {
|
|
|
20
20
|
coordinates: number[][][][];
|
|
21
21
|
};
|
|
22
22
|
} | undefined;
|
|
23
|
+
getPointInContinent(location: [number, number]): boolean;
|
|
23
24
|
getLocationPosition(location: [number, number]): number[] | undefined;
|
|
24
25
|
dispose(): void;
|
|
25
26
|
}
|