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.
@@ -436,19 +436,20 @@
436
436
  },
437
437
  // 恢复模型原来的状态
438
438
  updateWholeProperty() {
439
- if (scene) {
440
- scene.traverse(obj => {
441
- if (obj instanceof this.THREE.Mesh) {
442
- // 恢复颜色
443
- obj.setColorAt(obj.userData.instanceIndex, obj.material.userData.nColor)
444
- obj.instanceColor.needsUpdate = true
445
- // 修改可见性
446
- const restoreMatrix = new this.THREE.Matrix4().copy(obj.userData.copyMatrix);
447
- obj.setMatrixAt(index, restoreMatrix);
448
- obj.instanceMatrix.needsUpdate = true;
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
- console.log(svgPanZoom)
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)