vis-core 0.12.28 → 0.12.30
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
|
@@ -40885,14 +40885,6 @@ const BM = {
|
|
|
40885
40885
|
Point: RM,
|
|
40886
40886
|
Arc: CM
|
|
40887
40887
|
}, EM = {
|
|
40888
|
-
Box: SM,
|
|
40889
|
-
Capsule: YM,
|
|
40890
|
-
Circle: NM,
|
|
40891
|
-
Cylinder: IM,
|
|
40892
|
-
Dodecahedron: MM,
|
|
40893
|
-
Icosahedron: FM,
|
|
40894
|
-
Lathe: TM,
|
|
40895
|
-
Octahedron: vM,
|
|
40896
40888
|
Plane: wM,
|
|
40897
40889
|
Ring: HM,
|
|
40898
40890
|
Sphere: q2,
|
|
@@ -40900,7 +40892,15 @@ const BM = {
|
|
|
40900
40892
|
Tetrahedron: kM,
|
|
40901
40893
|
Torus: JM,
|
|
40902
40894
|
TorusKnot: KM,
|
|
40903
|
-
Tube: UM
|
|
40895
|
+
Tube: UM,
|
|
40896
|
+
Box: SM,
|
|
40897
|
+
Capsule: YM,
|
|
40898
|
+
Circle: NM,
|
|
40899
|
+
Cylinder: IM,
|
|
40900
|
+
Dodecahedron: MM,
|
|
40901
|
+
Icosahedron: FM,
|
|
40902
|
+
Lathe: TM,
|
|
40903
|
+
Octahedron: vM
|
|
40904
40904
|
}, cn = new Ca(Bt(Bt({}, BM), EM));
|
|
40905
40905
|
cn.pluginName += "_all";
|
|
40906
40906
|
class PM {
|
|
@@ -40910,6 +40910,7 @@ class PM {
|
|
|
40910
40910
|
P(this, "materialList", /* @__PURE__ */ new Map());
|
|
40911
40911
|
//兼容旧版本
|
|
40912
40912
|
P(this, "showMaterialList", /* @__PURE__ */ new Map());
|
|
40913
|
+
P(this, "showMaterialListTitle", /* @__PURE__ */ new Map());
|
|
40913
40914
|
P(this, "objectList", /* @__PURE__ */ new Map());
|
|
40914
40915
|
}
|
|
40915
40916
|
install(t) {
|
|
@@ -40955,6 +40956,9 @@ class PM {
|
|
|
40955
40956
|
setObject3d(t, e, i) {
|
|
40956
40957
|
this.objectList.has(t) && console.warn(`ObjectList: ${t.uuid} already exists`), this.objectList.set(t, { name: e, meta: i }), this.emitObject3dChange();
|
|
40957
40958
|
}
|
|
40959
|
+
delObject3d(t) {
|
|
40960
|
+
this.objectList.delete(t), this.emitObject3dChange();
|
|
40961
|
+
}
|
|
40958
40962
|
changeObject3dName(t, e) {
|
|
40959
40963
|
this.objectList.forEach((i, s) => {
|
|
40960
40964
|
var o;
|
|
@@ -40976,7 +40980,7 @@ class PM {
|
|
|
40976
40980
|
t.material && Mh({
|
|
40977
40981
|
material: t.material
|
|
40978
40982
|
});
|
|
40979
|
-
}), this.materialList.clear(), this.objectList.clear(), this.showMaterialList.clear(), this.pencil.event.emit("materialListChange");
|
|
40983
|
+
}), this.materialList.clear(), this.objectList.clear(), this.showMaterialList.clear(), this.showMaterialListTitle.clear(), this.pencil.event.emit("materialListChange");
|
|
40980
40984
|
}
|
|
40981
40985
|
}
|
|
40982
40986
|
class QM extends $s {
|
|
@@ -41029,7 +41033,7 @@ function Ql(n) {
|
|
|
41029
41033
|
const t = new t0();
|
|
41030
41034
|
return t.color.setScalar(n), t;
|
|
41031
41035
|
}
|
|
41032
|
-
const GX = "0.12.
|
|
41036
|
+
const GX = "0.12.30", a1 = !1;
|
|
41033
41037
|
class pl {
|
|
41034
41038
|
constructor(t, e = {}) {
|
|
41035
41039
|
P(this, "container");
|
|
@@ -41285,7 +41289,7 @@ class pl {
|
|
|
41285
41289
|
}
|
|
41286
41290
|
dispose() {
|
|
41287
41291
|
var t, e, i, s;
|
|
41288
|
-
this.loader.clearLoadObj(), (t = this.pencil) == null || t.dispose(), (e = this.pmremGenerator) == null || e.dispose(), (i = this.re) == null || i.dispose(), this.removeAllListeners(), this.event.removeAllListeners(), (s = this.checkDprTimer) == null || s.stop();
|
|
41292
|
+
this.loader.clearLoadObj(), (t = this.pencil) == null || t.dispose(), (e = this.pmremGenerator) == null || e.dispose(), (i = this.re) == null || i.dispose(), this.removeAllListeners(), this.event.removeAllListeners(), (s = this.checkDprTimer) == null || s.stop(), this.loadObjState && (this.loadObjState.length = 0);
|
|
41289
41293
|
}
|
|
41290
41294
|
}
|
|
41291
41295
|
P(pl, "VisName", "base");
|
|
@@ -41737,6 +41741,18 @@ class yX extends X0 {
|
|
|
41737
41741
|
}
|
|
41738
41742
|
}
|
|
41739
41743
|
}
|
|
41744
|
+
render() {
|
|
41745
|
+
const e = this.pencil.installPlugins.get("materialList");
|
|
41746
|
+
e.setObject3d(this.object3d, "continents-group", {
|
|
41747
|
+
baseObject: this,
|
|
41748
|
+
remove: !1
|
|
41749
|
+
}), this.mapArr.forEach((i) => {
|
|
41750
|
+
e.setObject3d(i.object3d, "continents-" + i.userData.name, {
|
|
41751
|
+
baseObject: i,
|
|
41752
|
+
remove: !1
|
|
41753
|
+
});
|
|
41754
|
+
});
|
|
41755
|
+
}
|
|
41740
41756
|
dispose() {
|
|
41741
41757
|
this.mapArr.forEach((e) => {
|
|
41742
41758
|
e.dispose();
|
|
@@ -41747,7 +41763,7 @@ class VX extends X0 {
|
|
|
41747
41763
|
create() {
|
|
41748
41764
|
return Gt(this, null, function* () {
|
|
41749
41765
|
const t = new Oi(100, 100, 1, 1), e = new h2();
|
|
41750
|
-
e.opacity = 0.5, this.createMesh(t, e), this.object3d.receiveShadow = !0, this.position.z = 1e-3;
|
|
41766
|
+
e.opacity = 0.5, this.createMesh(t, e), this.object3d.receiveShadow = !0, this.position.z = 1e-3, this.object3d.name = "阴影接受";
|
|
41751
41767
|
});
|
|
41752
41768
|
}
|
|
41753
41769
|
}
|
|
@@ -41904,7 +41920,7 @@ const jM = {
|
|
|
41904
41920
|
this.mList.showMaterialList.set(h + "area", [
|
|
41905
41921
|
"parentPlane#topMat",
|
|
41906
41922
|
"parentPlane#sideMat"
|
|
41907
|
-
]), this.mList.showMaterialList.set(h + "line", "parentPlane#lineMat");
|
|
41923
|
+
]), this.mList.showMaterialList.set(h + "line", "parentPlane#lineMat"), this.mList.showMaterialListTitle.set(h + "area", "背景板块"), this.mList.showMaterialListTitle.set(h + "line", "背景线");
|
|
41908
41924
|
const r = yield this.drawController.draw("PlaneMap", {
|
|
41909
41925
|
geojson: o,
|
|
41910
41926
|
projection: {
|
|
@@ -41924,19 +41940,7 @@ const jM = {
|
|
|
41924
41940
|
depth: this.options.continentsBgDepth,
|
|
41925
41941
|
equirectangular: this.options.equirectangular,
|
|
41926
41942
|
scale: this.pscale
|
|
41927
|
-
}), this.continentsBg.position.z = 0.1, this.
|
|
41928
|
-
baseObject: this.continentsBg,
|
|
41929
|
-
remove: !1
|
|
41930
|
-
}), this.continentsBg.mapArr.forEach((a) => {
|
|
41931
|
-
this.mList.setObject3d(
|
|
41932
|
-
a.object3d,
|
|
41933
|
-
"continents-" + a.userData.name,
|
|
41934
|
-
{
|
|
41935
|
-
baseObject: a,
|
|
41936
|
-
remove: !1
|
|
41937
|
-
}
|
|
41938
|
-
);
|
|
41939
|
-
})), yield this.setAdcode({
|
|
41943
|
+
}), this.continentsBg.position.z = 0.1), yield this.setAdcode({
|
|
41940
41944
|
adcodes: [e],
|
|
41941
41945
|
duration: 0
|
|
41942
41946
|
});
|
|
@@ -42023,7 +42027,7 @@ const jM = {
|
|
|
42023
42027
|
this.mList.setMaterialObj("continents", l), this.mList.showMaterialList.set("continentsArea", [
|
|
42024
42028
|
"continents#topMat",
|
|
42025
42029
|
"continents#sideMat"
|
|
42026
|
-
]), this.mList.showMaterialList.set("continentsLine", "continents#lineMat");
|
|
42030
|
+
]), this.mList.showMaterialList.set("continentsLine", "continents#lineMat"), this.mList.showMaterialListTitle.set("continentsArea", "大洲"), this.mList.showMaterialListTitle.set("continentsLine", "大洲线");
|
|
42027
42031
|
}
|
|
42028
42032
|
const s = (() => {
|
|
42029
42033
|
const l = e === 1e5 ? new le({
|
|
@@ -42052,7 +42056,7 @@ const jM = {
|
|
|
42052
42056
|
extrudeLineMat: c
|
|
42053
42057
|
};
|
|
42054
42058
|
})();
|
|
42055
|
-
this.mList.setMaterialObj("plane", s), this.mList.showMaterialList.set("area", ["plane#topMat", "plane#sideMat"]), this.mList.showMaterialList.set("line", "plane#lineMat"), this.mList.showMaterialList.set("extrudeline", "plane#extrudeLineMat");
|
|
42059
|
+
this.mList.setMaterialObj("plane", s), this.mList.showMaterialList.set("area", ["plane#topMat", "plane#sideMat"]), this.mList.showMaterialList.set("line", "plane#lineMat"), this.mList.showMaterialList.set("extrudeline", "plane#extrudeLineMat"), this.mList.showMaterialListTitle.set("area", "板块"), this.mList.showMaterialListTitle.set("line", "板块线"), this.mList.showMaterialListTitle.set("extrudeline", "板块边线");
|
|
42056
42060
|
});
|
|
42057
42061
|
}
|
|
42058
42062
|
setAreaColor(e, i) {
|
|
@@ -42108,14 +42112,21 @@ const jM = {
|
|
|
42108
42112
|
penumbra: 1,
|
|
42109
42113
|
decay: 0
|
|
42110
42114
|
}), i = e.object3d;
|
|
42111
|
-
this.mList.changeObject3dName(i, "Shadow$1"), this.mList.changeObject3dName(i.target, "Shadow$1"), this.shadowMapLight = e, e.object3d.position.set(0.281, 32.487, 43.077), e.object3d.castShadow = !0
|
|
42112
|
-
|
|
42115
|
+
this.mList.changeObject3dName(i, "Shadow$1"), this.mList.changeObject3dName(i.target, "Shadow$1"), this.shadowMapLight = e, e.object3d.position.set(0.281, 32.487, 43.077), e.object3d.castShadow = !0;
|
|
42116
|
+
const s = yield this.drawController.draw("PlaneShadow");
|
|
42117
|
+
this.mList.setObject3d(s.object3d, "PlaneShadow", {
|
|
42118
|
+
baseObject: s,
|
|
42119
|
+
remove: !1
|
|
42120
|
+
}), this.map && this.map.areaArr.forEach((l) => {
|
|
42121
|
+
l.object3d.castShadow = !0;
|
|
42113
42122
|
});
|
|
42114
42123
|
});
|
|
42115
42124
|
}
|
|
42116
42125
|
shadowMapDisabled() {
|
|
42117
|
-
this.pencil.renderer.shadowMap.enabled = !1, this.shadowMapLight && (this.shadowMapLight.erase(), this.mList.removeObject3d(this.shadowMapLight.object3d))
|
|
42118
|
-
|
|
42126
|
+
this.pencil.renderer.shadowMap.enabled = !1, this.shadowMapLight && (this.shadowMapLight.erase(), this.mList.removeObject3d(this.shadowMapLight.object3d));
|
|
42127
|
+
const e = this.drawController.getObject("PlaneShadow");
|
|
42128
|
+
e && (this.mList.removeObject3d(e.object3d), e.erase()), this.map && this.map.areaArr.forEach((i) => {
|
|
42129
|
+
i.object3d.castShadow = !1;
|
|
42119
42130
|
});
|
|
42120
42131
|
}
|
|
42121
42132
|
getDepth(e) {
|
|
@@ -42632,7 +42643,7 @@ const Go = class Go extends pl {
|
|
|
42632
42643
|
lineMat: o
|
|
42633
42644
|
};
|
|
42634
42645
|
})();
|
|
42635
|
-
i.setMaterialObj("plane", s), i.showMaterialList.set("area", ["plane#topMat", "plane#sideMat"]), i.showMaterialList.set("line", "plane#lineMat");
|
|
42646
|
+
i.setMaterialObj("plane", s), i.showMaterialList.set("area", ["plane#topMat", "plane#sideMat"]), i.showMaterialList.set("line", "plane#lineMat"), this.mList.showMaterialListTitle.set("area", "板块"), this.mList.showMaterialListTitle.set("line", "板块线");
|
|
42636
42647
|
});
|
|
42637
42648
|
}
|
|
42638
42649
|
eraseLabels() {
|
|
@@ -43691,11 +43702,11 @@ const nF = {
|
|
|
43691
43702
|
const a = this.loader.getAsset(`/image/city/${l}-1.jpg`), o = this.loader.getAsset(`/image/city/${l}.webp`);
|
|
43692
43703
|
return s[l] = [
|
|
43693
43704
|
new t0({
|
|
43694
|
-
name: "
|
|
43705
|
+
name: "建筑顶面-板块内" + l + "高",
|
|
43695
43706
|
color: "#00a3bc"
|
|
43696
43707
|
}),
|
|
43697
43708
|
new le({
|
|
43698
|
-
name: "
|
|
43709
|
+
name: "建筑侧面-板块内" + l + "高",
|
|
43699
43710
|
map: a,
|
|
43700
43711
|
normalMap: o,
|
|
43701
43712
|
envMap: this.getRoomEnvMap()
|
|
@@ -43720,11 +43731,11 @@ const nF = {
|
|
|
43720
43731
|
const a = this.loader.getAsset(`/image/city/${l}-1.jpg`), o = this.loader.getAsset(`/image/city/${l}.webp`);
|
|
43721
43732
|
return s[l] = [
|
|
43722
43733
|
new t0({
|
|
43723
|
-
name: "
|
|
43734
|
+
name: "建筑顶面-板块外" + l + "高",
|
|
43724
43735
|
color: "#133144"
|
|
43725
43736
|
}),
|
|
43726
43737
|
new le({
|
|
43727
|
-
name: "
|
|
43738
|
+
name: "建筑侧面-块外" + l + "高",
|
|
43728
43739
|
map: a,
|
|
43729
43740
|
normalMap: o,
|
|
43730
43741
|
envMap: this.getRoomEnvMap()
|
|
@@ -43747,10 +43758,14 @@ const nF = {
|
|
|
43747
43758
|
}
|
|
43748
43759
|
if (!this.mList.getMaterialObj("road")) {
|
|
43749
43760
|
const e = new z0({
|
|
43761
|
+
//@ts-ignore
|
|
43762
|
+
name: "道路-板块内",
|
|
43750
43763
|
color: "#ffc457",
|
|
43751
43764
|
sizeAttenuation: 0,
|
|
43752
43765
|
lineWidth: 40
|
|
43753
43766
|
}), i = new z0({
|
|
43767
|
+
//@ts-ignore
|
|
43768
|
+
name: "道路-板块外",
|
|
43754
43769
|
color: "#4a3f15",
|
|
43755
43770
|
sizeAttenuation: 0,
|
|
43756
43771
|
lineWidth: 40
|
|
@@ -43763,16 +43778,20 @@ const nF = {
|
|
|
43763
43778
|
}
|
|
43764
43779
|
if (this.mList.getMaterialObj("area") || (this.mList.setMaterialObj("area", {
|
|
43765
43780
|
river: new t0({
|
|
43781
|
+
name: "河流-板块内",
|
|
43766
43782
|
color: "#115d8a"
|
|
43767
43783
|
}),
|
|
43768
43784
|
grassland: new t0({
|
|
43785
|
+
name: "绿地-板块内",
|
|
43769
43786
|
color: "#043141"
|
|
43770
43787
|
})
|
|
43771
43788
|
}), this.mList.setMaterialObj("area-grey", {
|
|
43772
43789
|
river: new t0({
|
|
43790
|
+
name: "河流-板块外",
|
|
43773
43791
|
color: "#19354f"
|
|
43774
43792
|
}),
|
|
43775
43793
|
grassland: new t0({
|
|
43794
|
+
name: "绿地-板块外",
|
|
43776
43795
|
color: "#133341"
|
|
43777
43796
|
})
|
|
43778
43797
|
})), !this.mList.getMaterial("city-plane")) {
|
|
@@ -44737,15 +44756,17 @@ class yF extends Ao {
|
|
|
44737
44756
|
if (this.options.adcode !== 1e5) {
|
|
44738
44757
|
const l = (() => {
|
|
44739
44758
|
const a = new le({
|
|
44740
|
-
name: "
|
|
44759
|
+
name: "父级板块顶面",
|
|
44741
44760
|
color: "#031529",
|
|
44742
44761
|
emissive: "#010f1f",
|
|
44743
44762
|
envMap: e
|
|
44744
44763
|
}), o = new t0({
|
|
44745
|
-
name: "
|
|
44764
|
+
name: "父级板块侧面",
|
|
44746
44765
|
color: "#064d73",
|
|
44747
44766
|
side: K0
|
|
44748
44767
|
}), c = new z0({
|
|
44768
|
+
//@ts-ignore
|
|
44769
|
+
name: "父级板块线",
|
|
44749
44770
|
color: new rt("#3f648c"),
|
|
44750
44771
|
lineWidth: 4,
|
|
44751
44772
|
sizeAttenuation: 0
|
|
@@ -44760,15 +44781,17 @@ class yF extends Ao {
|
|
|
44760
44781
|
}
|
|
44761
44782
|
const s = (() => {
|
|
44762
44783
|
const l = new le({
|
|
44763
|
-
name: "
|
|
44784
|
+
name: "世界板块顶面",
|
|
44764
44785
|
color: "#031529",
|
|
44765
44786
|
emissive: "#010f1f",
|
|
44766
44787
|
envMap: e
|
|
44767
44788
|
}), a = new t0({
|
|
44768
|
-
name: "
|
|
44789
|
+
name: "世界板块侧面",
|
|
44769
44790
|
color: "#064d73",
|
|
44770
44791
|
side: K0
|
|
44771
44792
|
}), o = new z0({
|
|
44793
|
+
//@ts-ignore
|
|
44794
|
+
name: "世界板块线",
|
|
44772
44795
|
color: new rt("#3f648c"),
|
|
44773
44796
|
lineWidth: 4,
|
|
44774
44797
|
sizeAttenuation: 0
|
|
@@ -44784,13 +44807,15 @@ class yF extends Ao {
|
|
|
44784
44807
|
if (this.options.continentsBg) {
|
|
44785
44808
|
const s = (() => {
|
|
44786
44809
|
const l = new le({
|
|
44787
|
-
name: "
|
|
44810
|
+
name: "大洲板块顶面",
|
|
44788
44811
|
emissive: "#235278"
|
|
44789
44812
|
}), a = new t0({
|
|
44790
|
-
name: "
|
|
44813
|
+
name: "大洲板块侧面",
|
|
44791
44814
|
color: "#0c1528"
|
|
44792
44815
|
}), o = new z0({
|
|
44793
44816
|
// color: new THREE.Color('#0a88e5'),
|
|
44817
|
+
//@ts-ignore
|
|
44818
|
+
name: "大洲板块线",
|
|
44794
44819
|
color: new rt("#1488e0"),
|
|
44795
44820
|
sizeAttenuation: 0,
|
|
44796
44821
|
lineWidth: this.options.lineWidth
|
|
@@ -44805,25 +44830,37 @@ class yF extends Ao {
|
|
|
44805
44830
|
}
|
|
44806
44831
|
const i = (() => {
|
|
44807
44832
|
const s = new t0({
|
|
44808
|
-
name: "
|
|
44833
|
+
name: "板块顶面",
|
|
44809
44834
|
color: new rt("#064773")
|
|
44810
44835
|
}), l = new t0({
|
|
44811
|
-
name: "
|
|
44836
|
+
name: "板块侧面",
|
|
44812
44837
|
color: new rt("#064d73"),
|
|
44813
44838
|
side: K0
|
|
44814
44839
|
}), a = new z0({
|
|
44840
|
+
//@ts-ignore
|
|
44841
|
+
name: "板块线",
|
|
44815
44842
|
color: new rt("#02BAF7"),
|
|
44816
44843
|
lineWidth: 3,
|
|
44817
44844
|
sizeAttenuation: 0
|
|
44818
44845
|
}), o = new z0({
|
|
44846
|
+
//@ts-ignore
|
|
44847
|
+
name: "板块边框线",
|
|
44819
44848
|
color: new rt("#02BAF7"),
|
|
44820
44849
|
lineWidth: 3,
|
|
44821
44850
|
sizeAttenuation: 0
|
|
44822
|
-
}), c = s.clone()
|
|
44851
|
+
}), c = s.clone();
|
|
44852
|
+
c.name = "板块下钻背景顶面";
|
|
44853
|
+
const d = l.clone();
|
|
44854
|
+
d.name = "板块下钻背景侧面";
|
|
44855
|
+
const h = new z0({
|
|
44856
|
+
//@ts-ignore
|
|
44857
|
+
name: "板块下钻背景线",
|
|
44823
44858
|
color: new rt("#3773b0"),
|
|
44824
44859
|
lineWidth: 2,
|
|
44825
44860
|
sizeAttenuation: 0
|
|
44826
44861
|
}), r = new z0({
|
|
44862
|
+
//@ts-ignore
|
|
44863
|
+
name: "板块下钻背景边框线",
|
|
44827
44864
|
color: new rt("#3773b0"),
|
|
44828
44865
|
lineWidth: 4,
|
|
44829
44866
|
sizeAttenuation: 0
|
|
@@ -44896,19 +44933,7 @@ class yF extends Ao {
|
|
|
44896
44933
|
scale: this.pscale
|
|
44897
44934
|
},
|
|
44898
44935
|
this.group
|
|
44899
|
-
), this.continentsBg.position.z = 0.1, this.
|
|
44900
|
-
baseObject: this.continentsBg,
|
|
44901
|
-
remove: !1
|
|
44902
|
-
}), this.continentsBg.mapArr.forEach((a) => {
|
|
44903
|
-
this.mList.setObject3d(
|
|
44904
|
-
a.object3d,
|
|
44905
|
-
"continents-" + a.userData.name,
|
|
44906
|
-
{
|
|
44907
|
-
baseObject: a,
|
|
44908
|
-
remove: !1
|
|
44909
|
-
}
|
|
44910
|
-
);
|
|
44911
|
-
})), yield this.setAdcode({
|
|
44936
|
+
), this.continentsBg.position.z = 0.1), yield this.setAdcode({
|
|
44912
44937
|
adcodes: [e],
|
|
44913
44938
|
duration: 0
|
|
44914
44939
|
}), this.options.bottomPlane) {
|
|
@@ -45198,12 +45223,15 @@ const VF = (n) => {
|
|
|
45198
45223
|
return Gt(this, null, function* () {
|
|
45199
45224
|
const t = n.loader, e = (() => {
|
|
45200
45225
|
const i = new t0({
|
|
45226
|
+
name: "板块顶面",
|
|
45201
45227
|
color: "#094253"
|
|
45202
45228
|
}), s = new t0({
|
|
45203
|
-
name: "
|
|
45229
|
+
name: "板块侧面",
|
|
45204
45230
|
map: t.getAsset("/image/map2/side.png"),
|
|
45205
45231
|
side: K0
|
|
45206
45232
|
}), l = new z0({
|
|
45233
|
+
// @ts-ignore
|
|
45234
|
+
name: "板块边框",
|
|
45207
45235
|
color: new rt("#02f7eb"),
|
|
45208
45236
|
lineWidth: 6,
|
|
45209
45237
|
sizeAttenuation: 0,
|
|
@@ -45808,11 +45836,11 @@ class vF extends ke {
|
|
|
45808
45836
|
}
|
|
45809
45837
|
execute() {
|
|
45810
45838
|
const t = this.properties ? this.object[this.properties] : this.object;
|
|
45811
|
-
t && (t[this.attributeName] = this.newValue, this.editor.emit("objectChanged", this.object));
|
|
45839
|
+
t && (t[this.attributeName] = this.newValue, this.editor.emit("objectChanged", this.object), this.attributeName === "name" && this.editor.pencil.event.emit("object3dListChange"));
|
|
45812
45840
|
}
|
|
45813
45841
|
undo() {
|
|
45814
45842
|
const t = this.properties ? this.object[this.properties] : this.object;
|
|
45815
|
-
t[this.attributeName] = this.oldValue, this.editor.emit("objectChanged", this.object);
|
|
45843
|
+
t[this.attributeName] = this.oldValue, this.editor.emit("objectChanged", this.object), this.attributeName === "name" && this.editor.pencil.event.emit("object3dListChange");
|
|
45816
45844
|
}
|
|
45817
45845
|
update(t) {
|
|
45818
45846
|
this.newValue = t.newValue;
|
|
@@ -46597,8 +46625,12 @@ class gT {
|
|
|
46597
46625
|
changeSelectOption() {
|
|
46598
46626
|
const t = this.viewport.vis, { pencil: e, mList: i } = t, s = i == null ? void 0 : i.showMaterialList.size, l = (s ? [...i.showMaterialList.keys()] : [...i.materialList.keys()]).map((c) => {
|
|
46599
46627
|
const d = s ? i.getShowMaterial(c) : i.getMaterial(c), h = new yt(this.fixBufferGeometry, d);
|
|
46600
|
-
|
|
46601
|
-
|
|
46628
|
+
h.userData.fixBufferGeometry = !0;
|
|
46629
|
+
const r = c.replace(c[0], c[0].toLowerCase());
|
|
46630
|
+
let u;
|
|
46631
|
+
return s && i.showMaterialListTitle.has(c) ? u = i.showMaterialListTitle.get(c) : !s && (d != null && d.name) && (u = d == null ? void 0 : d.name), {
|
|
46632
|
+
uuid: r,
|
|
46633
|
+
name: u,
|
|
46602
46634
|
object: h
|
|
46603
46635
|
};
|
|
46604
46636
|
}), a = [...i.objectList.keys()].map(
|
|
@@ -46607,14 +46639,15 @@ class gT {
|
|
|
46607
46639
|
let r = !1;
|
|
46608
46640
|
return h != null && h.baseObject && h.remove !== !1 && (r = !0), We(Bt({
|
|
46609
46641
|
uuid: d.replace(d[0], d[0].toLowerCase()),
|
|
46610
|
-
object: c
|
|
46642
|
+
object: c,
|
|
46643
|
+
name: c.name
|
|
46611
46644
|
}, h), {
|
|
46612
46645
|
remove: r
|
|
46613
46646
|
});
|
|
46614
46647
|
}
|
|
46615
46648
|
), o = [...l, ...a];
|
|
46616
46649
|
if (o.unshift({
|
|
46617
|
-
name: "
|
|
46650
|
+
name: "相机",
|
|
46618
46651
|
object: e.camera,
|
|
46619
46652
|
uuid: "camera"
|
|
46620
46653
|
}), !this.jsonVersion) {
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.12.
|
|
1
|
+
declare const _default: "0.12.30";
|
|
2
2
|
export default _default;
|
|
@@ -7,6 +7,7 @@ export default class MaterialList {
|
|
|
7
7
|
material: THREE.Material;
|
|
8
8
|
}>;
|
|
9
9
|
showMaterialList: Map<string, string | string[]>;
|
|
10
|
+
showMaterialListTitle: Map<string, string>;
|
|
10
11
|
objectList: Map<THREE.Object3D<THREE.Object3DEventMap>, {
|
|
11
12
|
name: string;
|
|
12
13
|
meta?: any;
|
|
@@ -19,6 +20,7 @@ export default class MaterialList {
|
|
|
19
20
|
getShowMaterial(name: string): THREE.Material | THREE.Material[];
|
|
20
21
|
emitObject3dChange(): void;
|
|
21
22
|
setObject3d(object3d: THREE.Object3D, name: string, meta?: any): void;
|
|
23
|
+
delObject3d(object3d: THREE.Object3D): void;
|
|
22
24
|
changeObject3dName(object3d: THREE.Object3D, name: string): void;
|
|
23
25
|
removeObject3d(object3d: THREE.Object3D): void;
|
|
24
26
|
dispose(): void;
|
|
@@ -20,14 +20,6 @@ import Torus from './Torus';
|
|
|
20
20
|
import TorusKnot from './TorusKnot';
|
|
21
21
|
import Tube from './Tube';
|
|
22
22
|
export declare const objs2: {
|
|
23
|
-
Box: typeof Box;
|
|
24
|
-
Capsule: typeof Capsule;
|
|
25
|
-
Circle: typeof Circle;
|
|
26
|
-
Cylinder: typeof Cylinder;
|
|
27
|
-
Dodecahedron: typeof Dodecahedron;
|
|
28
|
-
Icosahedron: typeof Icosahedron;
|
|
29
|
-
Lathe: typeof Lathe;
|
|
30
|
-
Octahedron: typeof Octahedron;
|
|
31
23
|
Plane: typeof Plane;
|
|
32
24
|
Ring: typeof Ring;
|
|
33
25
|
Sphere: typeof Sphere;
|
|
@@ -36,8 +28,6 @@ export declare const objs2: {
|
|
|
36
28
|
Torus: typeof Torus;
|
|
37
29
|
TorusKnot: typeof TorusKnot;
|
|
38
30
|
Tube: typeof Tube;
|
|
39
|
-
};
|
|
40
|
-
declare const d: DrawController<{
|
|
41
31
|
Box: typeof Box;
|
|
42
32
|
Capsule: typeof Capsule;
|
|
43
33
|
Circle: typeof Circle;
|
|
@@ -46,6 +36,8 @@ declare const d: DrawController<{
|
|
|
46
36
|
Icosahedron: typeof Icosahedron;
|
|
47
37
|
Lathe: typeof Lathe;
|
|
48
38
|
Octahedron: typeof Octahedron;
|
|
39
|
+
};
|
|
40
|
+
declare const d: DrawController<{
|
|
49
41
|
Plane: typeof Plane;
|
|
50
42
|
Ring: typeof Ring;
|
|
51
43
|
Sphere: typeof Sphere;
|
|
@@ -54,6 +46,14 @@ declare const d: DrawController<{
|
|
|
54
46
|
Torus: typeof Torus;
|
|
55
47
|
TorusKnot: typeof TorusKnot;
|
|
56
48
|
Tube: typeof Tube;
|
|
49
|
+
Box: typeof Box;
|
|
50
|
+
Capsule: typeof Capsule;
|
|
51
|
+
Circle: typeof Circle;
|
|
52
|
+
Cylinder: typeof Cylinder;
|
|
53
|
+
Dodecahedron: typeof Dodecahedron;
|
|
54
|
+
Icosahedron: typeof Icosahedron;
|
|
55
|
+
Lathe: typeof Lathe;
|
|
56
|
+
Octahedron: typeof Octahedron;
|
|
57
57
|
Node: typeof Node;
|
|
58
58
|
Image: typeof Image;
|
|
59
59
|
Line: typeof Line;
|