@eturnity/eturnity_3d 6.46.2 → 6.46.3-EPDM-8268.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_3d",
3
3
  "private": false,
4
- "version": "6.46.2",
4
+ "version": "6.46.3-EPDM-8268.0",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {
7
7
  "dev": "vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint",
@@ -61,11 +61,13 @@ export default {
61
61
  },
62
62
  screenshotable: false,
63
63
  areModuleFieldsVisible: false,
64
- intervalId: null
64
+ intervalId: null,
65
+ requestAnimationFrameId: null,
65
66
  }
66
67
  },
67
68
  beforeDestroy() {
68
69
  clearInterval(this.intervalId)
70
+ cancelAnimationFrame(this.requestAnimationFrameId)
69
71
  },
70
72
  mixins: [renderMixin, threeMixin, materialMixin],
71
73
  async mounted() {
@@ -286,7 +288,7 @@ export default {
286
288
  },
287
289
  animate() {
288
290
  this.render()
289
- requestAnimationFrame(this.animate)
291
+ this.requestAnimationFrameId = requestAnimationFrame(this.animate)
290
292
  },
291
293
  render() {
292
294
  this.renderer.clear()
@@ -76,14 +76,11 @@ export default {
76
76
  }
77
77
  },
78
78
  setTweenTo(position, target) {
79
+ TWEEN.removeAll()
79
80
  if (this.orbitControl) {
80
81
  this.tweenOrbit = new TWEEN.Tween(this.orbitControl.target)
81
82
  .to({ x: target[0], y: target[1], z: target[2] }, 2000)
82
83
  .easing(TWEEN.Easing.Sinusoidal.Out)
83
- .onUpdate(() => {
84
- if (this.orbitControl && this.orbitControl.update)
85
- this.orbitControl.update()
86
- })
87
84
  .start()
88
85
  }
89
86
  if (this.camera) {
@@ -97,5 +94,8 @@ export default {
97
94
  .start()
98
95
  }
99
96
  }
97
+ },
98
+ beforeDestroy(){
99
+ TWEEN.removeAll()
100
100
  }
101
101
  }
@@ -63,7 +63,7 @@ export default {
63
63
  }
64
64
  const moduleTextureId = panelPolygon.moduleField.pvData.hasOwnProperty(
65
65
  'module_texture_version_id'
66
- )
66
+ ) && panelPolygon.moduleField.pvData.module_texture_version_id
67
67
  ? panelPolygon.moduleField.pvData.module_texture_version_id
68
68
  : 0
69
69
  let materialId = 'default_' + moduleTextureId