vis-core 0.12.30 → 0.12.32
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 +32 -21
- 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.32", 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]
|
|
@@ -45529,10 +45532,10 @@ class LF extends ke {
|
|
|
45529
45532
|
}
|
|
45530
45533
|
class CF extends ke {
|
|
45531
45534
|
constructor(t, e, i, s) {
|
|
45532
|
-
var l, a;
|
|
45533
|
-
super(t), this.type = "SetMaterial", this.name = "New Material", this.object = e, this.materialSlot = s, this.oldMaterial = this.editor.getObjectMaterial(e, s), this.newMaterial = i, this.loaderSrc = [], (l = this.oldMaterial) != null && l.map && this.loaderSrc.push(
|
|
45535
|
+
var l, a, o;
|
|
45536
|
+
super(t), this.type = "SetMaterial", this.name = "New Material", this.object = e, this.materialSlot = s, this.oldMaterial = this.editor.getObjectMaterial(e, s), this.newMaterial = i, this.loaderSrc = [], (l = this.oldMaterial) != null && l.name && (this.newMaterial.name = this.oldMaterial.name), (a = this.oldMaterial) != null && a.map && this.loaderSrc.push(
|
|
45534
45537
|
this.editor.viewport.vis.loader.getSrcByAsset(this.oldMaterial.map)
|
|
45535
|
-
), (
|
|
45538
|
+
), (o = this.oldMaterial) != null && o.normalMap && this.loaderSrc.push(
|
|
45536
45539
|
this.editor.viewport.vis.loader.getSrcByAsset(
|
|
45537
45540
|
this.oldMaterial.normalMap
|
|
45538
45541
|
)
|
|
@@ -45680,10 +45683,14 @@ 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), setTimeout(() => {
|
|
45687
|
+
this.attributeName === "name" && this.editor.pencil.event.emit("object3dListChange");
|
|
45688
|
+
});
|
|
45684
45689
|
}
|
|
45685
45690
|
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)
|
|
45691
|
+
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), setTimeout(() => {
|
|
45692
|
+
this.attributeName === "name" && this.editor.pencil.event.emit("object3dListChange");
|
|
45693
|
+
});
|
|
45687
45694
|
}
|
|
45688
45695
|
update(t) {
|
|
45689
45696
|
this.newValue = t.newValue;
|
|
@@ -45836,11 +45843,15 @@ class vF extends ke {
|
|
|
45836
45843
|
}
|
|
45837
45844
|
execute() {
|
|
45838
45845
|
const t = this.properties ? this.object[this.properties] : this.object;
|
|
45839
|
-
t && (t[this.attributeName] = this.newValue, this.editor.emit("objectChanged", this.object),
|
|
45846
|
+
t && (t[this.attributeName] = this.newValue, this.editor.emit("objectChanged", this.object), setTimeout(() => {
|
|
45847
|
+
this.attributeName === "name" && this.editor.pencil.event.emit("object3dListChange");
|
|
45848
|
+
}));
|
|
45840
45849
|
}
|
|
45841
45850
|
undo() {
|
|
45842
45851
|
const t = this.properties ? this.object[this.properties] : this.object;
|
|
45843
|
-
t[this.attributeName] = this.oldValue, this.editor.emit("objectChanged", this.object),
|
|
45852
|
+
t[this.attributeName] = this.oldValue, this.editor.emit("objectChanged", this.object), setTimeout(() => {
|
|
45853
|
+
this.attributeName === "name" && this.editor.pencil.event.emit("object3dListChange");
|
|
45854
|
+
});
|
|
45844
45855
|
}
|
|
45845
45856
|
update(t) {
|
|
45846
45857
|
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.32";
|
|
2
2
|
export default _default;
|