fl-web-component 1.2.6 → 1.2.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";#fl-model[data-v-
|
|
1
|
+
@charset "UTF-8";#fl-model[data-v-9c3a6c50],#konva-container[data-v-1eba8e28]{width:100%;height:100%;cursor:pointer}#konva-container[data-v-1eba8e28]{z-index:3;overflow:hidden}span[data-v-f547d5c6]{font-weight:bolder}.text[data-v-f547d5c6]{margin-top:20px}.line[data-v-f547d5c6]{border-bottom:1px solid #dcdfe6;margin:20px 0}.center[data-v-f547d5c6]{display:flex;flex-direction:column;align-items:center}.center .cen span[data-v-f547d5c6],.center .top span[data-v-f547d5c6]{color:"#53a8ff";display:inline-block;width:30px;height:30px;text-align:center;line-height:30px;border:1px solid;padding:5px;margin-bottom:10px;background-color:#e9f3ff}.center .cen span[data-v-f547d5c6]{margin:10px}.button[data-v-f547d5c6]{display:flex;justify-content:end;margin-top:20px}@font-face{font-family:iconfont;src:url(//at.alicdn.com/t/font_3226805_qqvo3ag3r8.woff2?t=1646635700216) format("woff2"),url(//at.alicdn.com/t/font_3226805_qqvo3ag3r8.woff?t=1646635700216) format("woff"),url(//at.alicdn.com/t/font_3226805_qqvo3ag3r8.ttf?t=1646635700216) format("truetype")}.iconfont[data-v-f547d5c6]{font-family:iconfont!important;font-size:50px;font-style:normal;color:"#53a8ff";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-shubiao[data-v-f547d5c6]:before{content:""}#svg-tigger[data-v-0ec35ee4]{cursor:pointer;height:100%;width:100%}
|
package/package.json
CHANGED
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
renderer.autoClearStencil = false;
|
|
169
169
|
},
|
|
170
170
|
initScene() {
|
|
171
|
-
|
|
171
|
+
modelGroup = new this.THREE.Group();
|
|
172
172
|
scene = new this.THREE.Scene();
|
|
173
173
|
},
|
|
174
174
|
initCamera() {
|
|
@@ -216,7 +216,6 @@
|
|
|
216
216
|
}
|
|
217
217
|
const { instances, drawObjs } = parseData(data);
|
|
218
218
|
if (instances.length > 0) {
|
|
219
|
-
modelGroup = new this.THREE.Group();
|
|
220
219
|
modelGroup = handleInstancedMeshModel(
|
|
221
220
|
instances,
|
|
222
221
|
drawObjs,
|
|
@@ -669,10 +668,14 @@
|
|
|
669
668
|
},
|
|
670
669
|
// 删除场景中所有的实体
|
|
671
670
|
removeAll() {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
671
|
+
return new Promise((resolve) => {
|
|
672
|
+
if (scene) {
|
|
673
|
+
this.removeTraverse()
|
|
674
|
+
resolve()
|
|
675
|
+
} else {
|
|
676
|
+
resolve()
|
|
677
|
+
}
|
|
678
|
+
})
|
|
676
679
|
},
|
|
677
680
|
removeTraverse() {
|
|
678
681
|
let length = modelGroup.children.length
|
|
@@ -683,21 +686,23 @@
|
|
|
683
686
|
item.material.dispose();
|
|
684
687
|
item.geometry.dispose();
|
|
685
688
|
item.clear();
|
|
689
|
+
item.material = null;
|
|
690
|
+
item.geometry = null;
|
|
686
691
|
modelGroup.remove(item);
|
|
692
|
+
item = null;
|
|
687
693
|
}
|
|
688
694
|
});
|
|
689
695
|
modelGroup.remove(list);
|
|
690
696
|
this.removeTraverse();
|
|
691
697
|
} else {
|
|
692
698
|
// 在这里清除一些标记之类的
|
|
693
|
-
scene.traverse(item => {
|
|
694
|
-
scene.remove(item)
|
|
695
|
-
})
|
|
696
699
|
scene.remove(modelGroup);
|
|
697
700
|
renderer.clear();
|
|
698
|
-
modelGroup = null
|
|
701
|
+
modelGroup = null;
|
|
702
|
+
modelGroup = new this.THREE.Group();
|
|
703
|
+
this.initCamera();
|
|
704
|
+
this.initControl();
|
|
699
705
|
}
|
|
700
|
-
|
|
701
706
|
},
|
|
702
707
|
// 销毁场景 释放内存
|
|
703
708
|
destroyScene() {
|