fl-web-component 1.1.7 → 1.1.8
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/README.md +4 -0
- package/dist/fl-web-component.common.js +150 -145
- package/dist/fl-web-component.css +1 -1
- package/package.json +7 -7
- package/packages/components/com-flcanvas/index.vue +281 -290
- package/packages/components/com-graphics/index.vue +15 -14
- package/packages/components/com-graphics/pid.vue +3 -2
- package/src/utils/instance-parser.js +1 -0
- package/src/utils/mock.js +14219 -83870
|
@@ -436,19 +436,20 @@
|
|
|
436
436
|
},
|
|
437
437
|
// 恢复模型原来的状态
|
|
438
438
|
updateWholeProperty() {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}
|
|
439
|
+
throw(new Error('该方法已暂停使用,请使用restore方法。'))
|
|
440
|
+
// if (scene) {
|
|
441
|
+
// scene.traverse(obj => {
|
|
442
|
+
// if (obj instanceof this.THREE.Mesh) {
|
|
443
|
+
// // 恢复颜色
|
|
444
|
+
// obj.setColorAt(obj.userData.instanceIndex, obj.material.userData.nColor)
|
|
445
|
+
// obj.instanceColor.needsUpdate = true
|
|
446
|
+
// // 修改可见性
|
|
447
|
+
// const restoreMatrix = new this.THREE.Matrix4().copy(obj.userData.copyMatrix);
|
|
448
|
+
// obj.setMatrixAt(index, restoreMatrix);
|
|
449
|
+
// obj.instanceMatrix.needsUpdate = true;
|
|
450
|
+
// }
|
|
451
|
+
// });
|
|
452
|
+
// }
|
|
452
453
|
},
|
|
453
454
|
// 清除上一次的属性修改操作 为了方便业务平台参数跟updateProperty方法的参数一样
|
|
454
455
|
resetProperty(list) {
|
|
@@ -1280,7 +1281,7 @@
|
|
|
1280
1281
|
});
|
|
1281
1282
|
},
|
|
1282
1283
|
// 添加自定义模型, 暂时只支持glb、gltf格式
|
|
1283
|
-
addCustomModel(name, position, url, scale, immediately = false, callback) {
|
|
1284
|
+
addCustomModel(name, position, url, scale = 1, immediately = false, callback) {
|
|
1284
1285
|
const loader = new GLTFLoader()
|
|
1285
1286
|
let locationModel = null;
|
|
1286
1287
|
loader.load(url, (gltf) => {
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
this.onWindowResize;
|
|
40
40
|
});
|
|
41
41
|
svgEmbed.addEventListener('load', () => {
|
|
42
|
-
|
|
42
|
+
preTargetCon.splice(0)
|
|
43
|
+
preTargetStyle.splice(0)
|
|
43
44
|
svgTigger = svgPanZoom('#svg-tigger', {
|
|
44
45
|
viewportSelector: '.svg-pan-zoom_viewport',
|
|
45
46
|
panEnabled: true,
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
/*
|
|
110
111
|
参数:svgIds: [], 需要高亮的id的集合, flag: true / false, 是否要定位目标元素, color: '', 高亮的颜色
|
|
111
112
|
*/
|
|
112
|
-
highLight(svgIds, flag, color) {
|
|
113
|
+
highLight(svgIds, flag = false, color) {
|
|
113
114
|
console.log(svgIds)
|
|
114
115
|
if (svgIds === null || svgIds === undefined) {
|
|
115
116
|
throw new Error('svgIds should be an array');
|
|
@@ -99,6 +99,7 @@ function handleInstancedMeshModel(instances, drawObjs, type, scene, customColor,
|
|
|
99
99
|
|
|
100
100
|
}
|
|
101
101
|
console.log('modelGroup', modelGroup)
|
|
102
|
+
console.log('drawObjMapInstance', drawObjMapInstance)
|
|
102
103
|
return modelGroup;
|
|
103
104
|
// timeRender();
|
|
104
105
|
// console.log('scene', scene)
|