vis-core 0.12.30 → 0.12.31
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 +19 -16
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -40524,10 +40524,10 @@ class Sc extends X0 {
|
|
|
40524
40524
|
const e = this.options;
|
|
40525
40525
|
if (e.type === "AmbientLight") {
|
|
40526
40526
|
const b = new Ch(e.color);
|
|
40527
|
-
b.name = "
|
|
40527
|
+
b.name = "环境光", this.object3d = b;
|
|
40528
40528
|
} else if (e.type === "DirectionalLight") {
|
|
40529
40529
|
const b = new Vc(e.color, e.intensity);
|
|
40530
|
-
b.name = "
|
|
40530
|
+
b.name = "平行光", b.target.position.set(0, 0, 0), this.object3d = b, b.target.name = "平行光目标", this.pencil.scene.add(b.target), this.directionalLight = b;
|
|
40531
40531
|
} else if (e.type === "PointLight") {
|
|
40532
40532
|
const b = new yc(
|
|
40533
40533
|
(i = e.color) != null ? i : 16777215,
|
|
@@ -40535,7 +40535,7 @@ class Sc extends X0 {
|
|
|
40535
40535
|
(l = e.distance) != null ? l : 0,
|
|
40536
40536
|
(a = e.decay) != null ? a : 2
|
|
40537
40537
|
);
|
|
40538
|
-
b.name = "
|
|
40538
|
+
b.name = "点光源", this.object3d = b, this.pointLight = b;
|
|
40539
40539
|
} else if (e.type === "SpotLight") {
|
|
40540
40540
|
const b = new Wc(
|
|
40541
40541
|
(o = e.color) != null ? o : 16777215,
|
|
@@ -40545,31 +40545,31 @@ class Sc extends X0 {
|
|
|
40545
40545
|
(r = e.penumbra) != null ? r : 1,
|
|
40546
40546
|
(u = e.decay) != null ? u : 2
|
|
40547
40547
|
);
|
|
40548
|
-
b.name = "
|
|
40548
|
+
b.name = "聚光灯", this.object3d = b, this.spotLight = b, b.target.name = "聚光灯目标", this.pencil.scene.add(b.target);
|
|
40549
40549
|
} else if (e.type === "HemisphereLight") {
|
|
40550
40550
|
const b = new Z2(
|
|
40551
40551
|
(m = e.color) != null ? m : 16777215,
|
|
40552
40552
|
(p = e.groundColor) != null ? p : 16777215,
|
|
40553
40553
|
(G = e.intensity) != null ? G : 1
|
|
40554
40554
|
);
|
|
40555
|
-
b.name = "
|
|
40555
|
+
b.name = "半球光", this.object3d = b, this.hemisphereLight = b;
|
|
40556
40556
|
}
|
|
40557
40557
|
}
|
|
40558
40558
|
render() {
|
|
40559
|
-
const e = this.object3d, i = this.pencil.installPlugins.get("materialList");
|
|
40560
|
-
i.setObject3d(e,
|
|
40559
|
+
const e = this.object3d, i = this.pencil.installPlugins.get("materialList"), s = this.options.type;
|
|
40560
|
+
i.setObject3d(e, s, {
|
|
40561
40561
|
baseObject: this
|
|
40562
|
-
}), e.target && i.setObject3d(e.target,
|
|
40562
|
+
}), e.target && i.setObject3d(e.target, s + "Target", {
|
|
40563
40563
|
baseObject: this,
|
|
40564
40564
|
parent: e,
|
|
40565
40565
|
remove: !1
|
|
40566
40566
|
});
|
|
40567
|
-
const
|
|
40567
|
+
const l = this.pencil.cameraControls.getTarget(new Y());
|
|
40568
40568
|
if (this.spotLight || this.directionalLight) {
|
|
40569
|
-
const
|
|
40570
|
-
|
|
40569
|
+
const a = this.spotLight || this.directionalLight;
|
|
40570
|
+
a.position.copy(l), a.target.position.copy(l);
|
|
40571
40571
|
} else
|
|
40572
|
-
this.pointLight && this.pointLight.position.copy(
|
|
40572
|
+
this.pointLight && this.pointLight.position.copy(l);
|
|
40573
40573
|
}
|
|
40574
40574
|
dispose() {
|
|
40575
40575
|
const e = this.object3d;
|
|
@@ -41033,7 +41033,7 @@ function Ql(n) {
|
|
|
41033
41033
|
const t = new t0();
|
|
41034
41034
|
return t.color.setScalar(n), t;
|
|
41035
41035
|
}
|
|
41036
|
-
const GX = "0.12.
|
|
41036
|
+
const GX = "0.12.31", a1 = !1;
|
|
41037
41037
|
class pl {
|
|
41038
41038
|
constructor(t, e = {}) {
|
|
41039
41039
|
P(this, "container");
|
|
@@ -42147,7 +42147,10 @@ const jM = {
|
|
|
42147
42147
|
}
|
|
42148
42148
|
handleClick(e) {
|
|
42149
42149
|
var l;
|
|
42150
|
-
const { drillDownRestrictions: i } = this.options
|
|
42150
|
+
const { drillDownRestrictions: i } = this.options;
|
|
42151
|
+
if (this.isAnimating)
|
|
42152
|
+
return;
|
|
42153
|
+
const s = (l = this.map) == null ? void 0 : l.pickArea(e);
|
|
42151
42154
|
if (s && s.userData.adcode && this.getAdcodeShowLevel(s.userData.adcode) !== i)
|
|
42152
42155
|
this.clickArea({
|
|
42153
42156
|
adcodes: [...this.adcodes, s.userData.adcode]
|
|
@@ -45680,10 +45683,10 @@ class MF extends ke {
|
|
|
45680
45683
|
super(t), this.type = "SetMaterialValue", this.name = `Set Material.${i}`, this.updatable = !0, this.object = e, this.materialSlot = l, this.material = this.editor.getObjectMaterial(e, l), this.oldValue = this.material !== void 0 ? this.material[i] : void 0, this.newValue = s, this.attributeName = i;
|
|
45681
45684
|
}
|
|
45682
45685
|
execute() {
|
|
45683
|
-
this.material[this.attributeName] = this.newValue, J5.includes(this.attributeName) && (this.material.needsUpdate = !0), this.editor.emit("objectChanged", this.object), this.editor.emit("materialChanged", this.material);
|
|
45686
|
+
this.material[this.attributeName] = this.newValue, J5.includes(this.attributeName) && (this.material.needsUpdate = !0), this.editor.emit("objectChanged", this.object), this.editor.emit("materialChanged", this.material), this.attributeName === "name" && this.editor.pencil.event.emit("object3dListChange");
|
|
45684
45687
|
}
|
|
45685
45688
|
undo() {
|
|
45686
|
-
this.material[this.attributeName] = this.oldValue, J5.includes(this.attributeName) && (this.material.needsUpdate = !0), this.editor.emit("objectChanged", this.object), this.editor.emit("materialChanged", this.material);
|
|
45689
|
+
this.material[this.attributeName] = this.oldValue, J5.includes(this.attributeName) && (this.material.needsUpdate = !0), this.editor.emit("objectChanged", this.object), this.editor.emit("materialChanged", this.material), this.attributeName === "name" && this.editor.pencil.event.emit("object3dListChange");
|
|
45687
45690
|
}
|
|
45688
45691
|
update(t) {
|
|
45689
45692
|
this.newValue = t.newValue;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.12.
|
|
1
|
+
declare const _default: "0.12.31";
|
|
2
2
|
export default _default;
|