vis-core 0.21.3 → 0.21.4
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.module.js
CHANGED
|
@@ -36724,7 +36724,7 @@ class Light extends Li {
|
|
|
36724
36724
|
e.userData = new Proxy(
|
|
36725
36725
|
{},
|
|
36726
36726
|
{
|
|
36727
|
-
set: (
|
|
36727
|
+
set: (Re, Le, ve) => (Le === "keepCamera" && (ve ? (this.pencil.render(), e.userData.parent = e.parent, this.pencil.camera.attach(e), e.target && this.pencil.camera.attach(e.target)) : !ve && e.userData.parent && (this.pencil.render(), e.userData.parent.attach(e), e.target && e.userData.parent.attach(e.target))), Reflect.set(Re, Le, ve))
|
|
36728
36728
|
}
|
|
36729
36729
|
);
|
|
36730
36730
|
const s = this.pencil.installPlugins.get("materialList"), h = this.options.type;
|
|
@@ -36734,11 +36734,17 @@ class Light extends Li {
|
|
|
36734
36734
|
baseObject: this,
|
|
36735
36735
|
parent: e,
|
|
36736
36736
|
remove: !1
|
|
36737
|
-
}))
|
|
36737
|
+
}));
|
|
36738
|
+
const Y = this.object3d;
|
|
36739
|
+
Y.isDirectionalLight && (Y.shadow.mapSize.width = 2048, Y.shadow.mapSize.height = 2048, s.setObject3d(e.shadow.camera, h + "Shadow", {
|
|
36738
36740
|
// baseObject: this,
|
|
36739
36741
|
parent: e,
|
|
36740
36742
|
remove: !1
|
|
36741
|
-
});
|
|
36743
|
+
}));
|
|
36744
|
+
const Ge = this.object3d;
|
|
36745
|
+
Ge.isSpotLight && Ge.shadow.mapSize.set(2048, 2048);
|
|
36746
|
+
const We = this.object3d;
|
|
36747
|
+
We.isPointLight && (We.shadow.mapSize.width = 2048, We.shadow.mapSize.height = 2048);
|
|
36742
36748
|
}
|
|
36743
36749
|
}
|
|
36744
36750
|
class Point extends D$1 {
|
|
@@ -47177,7 +47183,7 @@ function createAreaLightMaterial(c) {
|
|
|
47177
47183
|
const e = new MeshBasicMaterial();
|
|
47178
47184
|
return e.color.setScalar(c), e;
|
|
47179
47185
|
}
|
|
47180
|
-
const version = "0.21.
|
|
47186
|
+
const version = "0.21.4";
|
|
47181
47187
|
class Event {
|
|
47182
47188
|
constructor() {
|
|
47183
47189
|
F0(this, "event", new EventEmitter());
|
|
@@ -47469,35 +47475,39 @@ class SetMaterialVector extends Command {
|
|
|
47469
47475
|
}
|
|
47470
47476
|
}
|
|
47471
47477
|
class SetMaterialMapVector extends Command {
|
|
47472
|
-
constructor(e, s, h, Y, Ge) {
|
|
47473
|
-
var
|
|
47474
|
-
super(e), this.type = "SetMaterialMapVector", this.name = `Set Material.${h}
|
|
47478
|
+
constructor(e, s, h, Y, Ge, We = "repeat") {
|
|
47479
|
+
var Re;
|
|
47480
|
+
super(e), this.type = "SetMaterialMapVector", this.attributeName2 = We, this.name = `Set Material.${h}.${We}`, this.updatable = !0, this.object = s, this.materialSlot = Ge, this.material = this.editor.getObjectMaterial(s, Ge), this.material instanceof Qe && h === "map" && We === "repeat" ? this.oldValue = this.material.repeat.toArray() : (Re = this.material) != null && Re[h] && (this.oldValue = this.material[h][We].toArray()), this.newValue = Y, this.attributeName = h;
|
|
47475
47481
|
}
|
|
47476
47482
|
execute() {
|
|
47477
47483
|
var e;
|
|
47478
|
-
if (this.material instanceof Qe && this.attributeName === "map")
|
|
47479
|
-
this.material.
|
|
47484
|
+
if (this.material instanceof Qe && this.attributeName === "map" && this.attributeName2 === "repeat")
|
|
47485
|
+
this.material[this.attributeName2].fromArray(this.newValue);
|
|
47480
47486
|
else if ((e = this.material) != null && e[this.attributeName]) {
|
|
47481
47487
|
const s = this.attributeName;
|
|
47482
|
-
this.material[s].wrapS !== RepeatWrapping && (this.material[s].wrapS = RepeatWrapping, this.material[s].wrapT = RepeatWrapping, this.material[s].needsUpdate = !0), this.material[s].
|
|
47488
|
+
this.material[s].wrapS !== RepeatWrapping && (this.material[s].wrapS = RepeatWrapping, this.material[s].wrapT = RepeatWrapping, this.material[s].needsUpdate = !0), this.material[s][this.attributeName2].fromArray(
|
|
47489
|
+
this.newValue
|
|
47490
|
+
);
|
|
47483
47491
|
}
|
|
47484
47492
|
this.editor.emit("materialChanged", this.material);
|
|
47485
47493
|
}
|
|
47486
47494
|
undo() {
|
|
47487
|
-
this.material instanceof Qe && this.attributeName === "map" ? this.material.
|
|
47495
|
+
this.material instanceof Qe && this.attributeName === "map" && this.attributeName2 === "repeat" ? this.material[this.attributeName2].fromArray(this.oldValue) : this.material[this.attributeName][this.attributeName2].fromArray(
|
|
47496
|
+
this.oldValue
|
|
47497
|
+
), this.editor.emit("materialChanged", this.material);
|
|
47488
47498
|
}
|
|
47489
47499
|
update(e) {
|
|
47490
47500
|
this.newValue = e.newValue;
|
|
47491
47501
|
}
|
|
47492
47502
|
toJSON() {
|
|
47493
47503
|
const e = super.toJSON(this);
|
|
47494
|
-
return e.objectUuid = this.editor.uuidByObject(this.object), e.materialSlot = this.materialSlot, e.attributeName = this.attributeName, e.oldValue = this.oldValue, e.newValue = this.newValue, e;
|
|
47504
|
+
return e.objectUuid = this.editor.uuidByObject(this.object), e.materialSlot = this.materialSlot, e.attributeName = this.attributeName, e.attributeName2 = this.attributeName2, e.oldValue = this.oldValue, e.newValue = this.newValue, e;
|
|
47495
47505
|
}
|
|
47496
47506
|
fromJSON(e) {
|
|
47497
47507
|
super.fromJSON(e), this.object = this.editor.objectByUuid(e.objectUuid), this.materialSlot = e.materialSlot, this.material = this.editor.getObjectMaterial(
|
|
47498
47508
|
this.object,
|
|
47499
47509
|
this.materialSlot
|
|
47500
|
-
), this.attributeName = e.attributeName, this.oldValue = e.oldValue, this.newValue = e.newValue, this.attributeName === "repeat" && (this.attributeName = "map");
|
|
47510
|
+
), this.attributeName = e.attributeName, e.attributeName2 && (this.attributeName2 = e.attributeName2), this.oldValue = e.oldValue, this.newValue = e.newValue, this.attributeName === "repeat" && (this.attributeName = "map");
|
|
47501
47511
|
}
|
|
47502
47512
|
}
|
|
47503
47513
|
class SetPosition extends Command {
|
|
@@ -50037,7 +50047,14 @@ const objs$4 = sn(xi({}, objs$5), {
|
|
|
50037
50047
|
) : {
|
|
50038
50048
|
res: void 0
|
|
50039
50049
|
};
|
|
50040
|
-
if (!this.options.showDistrict && this.getAdcodeShowLevel(s) === "city" && (nt = Be, Be = void 0), nt) {
|
|
50050
|
+
if (!this.options.showDistrict && this.getAdcodeShowLevel(s) === "city" && (nt = Be, Be = void 0), [nt, Be].filter(Boolean).forEach((St) => {
|
|
50051
|
+
if (!St.features[0].properties.adcode && s !== 0) {
|
|
50052
|
+
const Yt = adcodeMap[s];
|
|
50053
|
+
St.features[0].properties = sn(xi(xi({}, St.features[0].properties), Yt), {
|
|
50054
|
+
center: [Yt.lng, Yt.lat]
|
|
50055
|
+
});
|
|
50056
|
+
}
|
|
50057
|
+
}), nt) {
|
|
50041
50058
|
const St = this.options.plateInCenter && (this.mapHistory.length < 1 || this.options.drillDownPlateInCenter);
|
|
50042
50059
|
if (St && this.fixNear(s), (Ie = this.options.fixGeojson) != null && Ie[s]) {
|
|
50043
50060
|
const d0 = (Te = this.options.fixGeojson) == null ? void 0 : Te[s];
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.21.
|
|
1
|
+
declare const _default: "0.21.4";
|
|
2
2
|
export default _default;
|