@eturnity/eturnity_3d 7.2.4-qa-7.6.3 → 7.4.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": "7.2.4-qa-7.6.3",
4
+ "version": "7.4.0",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {
7
7
  "dev": "vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint",
@@ -10,7 +10,7 @@
10
10
  "prettier": "prettier --write \"**/*.{js,vue}\""
11
11
  },
12
12
  "dependencies": {
13
- "@eturnity/eturnity_maths": "7.2.3-qa-7.6.0",
13
+ "@eturnity/eturnity_maths": "7.4.0",
14
14
  "core-js": "^2.6.12",
15
15
  "cors": "^2.8.5",
16
16
  "earcut": "^2.2.4",
@@ -89,6 +89,7 @@ export default {
89
89
  },
90
90
  turnOrthogonalCameraToPerspective() {
91
91
  this.camera = this.perspectiveCamera
92
+ console.log(this.orthographicCamera)
92
93
  let altitude =
93
94
  (this.orthographicCamera.right - this.orthographicCamera.left) /
94
95
  ((this.perspectiveCamera.fov * Math.PI) / 180) /
@@ -343,6 +344,7 @@ export default {
343
344
  onCompleteCallback()
344
345
  })
345
346
  } else {
347
+ console.log('setTween Camera not Vertical')
346
348
  this.camera.up = { x: 0, y: 0, z: 1 }
347
349
  this.tweenCamera = new TWEEN.Tween(currentTweenVar)
348
350
  .to({ t: 1 }, 2000)
@@ -35,18 +35,18 @@ export default {
35
35
  let meshTop = this.meshes.panelsMeshes[panel.id + '_top']
36
36
  let meshSide = this.meshes.panelsMeshes[panel.id + '_side']
37
37
  if (meshTop || meshSide) {
38
- this.clearMeshFromScene(meshTop, this.scene)
39
- this.clearMeshFromScene(meshSide, this.scene)
38
+ this.clearMesh(meshTop)
39
+ this.clearMesh(meshSide)
40
40
  }
41
41
  })
42
42
  )
43
43
  )
44
44
  },
45
- clearMeshFromScene(mesh, scene) {
46
- if (!mesh || !scene) {
45
+ clearMesh(mesh) {
46
+ if (!mesh || !this.scene) {
47
47
  return
48
48
  }
49
- scene.remove(mesh)
49
+ this.scene.remove(mesh)
50
50
  if (mesh.geometry && mesh.geometry.dispose) {
51
51
  mesh.geometry.dispose()
52
52
  mesh.geometry = null
@@ -72,14 +72,14 @@ export default {
72
72
  clearEdgesRemovedOnes() {
73
73
  Object.values(this.meshes['edgeMeshes']).forEach((mesh) => {
74
74
  if (!this.edgeIds.includes(mesh.userData.edgeId)) {
75
- this.clearMeshFromScene(mesh, this.scene)
75
+ this.clearMesh(mesh)
76
76
  }
77
77
  })
78
78
  },
79
79
  clearRemovedOnes(type) {
80
80
  Object.values(this.meshes[type]).forEach((mesh) => {
81
81
  if (!this.polygonIds.includes(mesh.userData.polygonId)) {
82
- this.clearMeshFromScene(mesh, this.scene)
82
+ this.clearMesh(mesh)
83
83
  }
84
84
  })
85
85
  },
@@ -34,7 +34,7 @@ export default {
34
34
  methods: {
35
35
  renderImageOverlayOnBackground() {
36
36
  if (!this.imageOverlay || !this.imageOverlayMaterial) {
37
- this.clearMeshFromScene(this.meshes.backgroundMesh, this.scene)
37
+ this.clearMesh(this.meshes.backgroundMesh)
38
38
  this.meshes.backgroundMesh = null
39
39
  return
40
40
  }
@@ -45,14 +45,14 @@ export default {
45
45
  poly.layer == 'user_deactivated_panel'
46
46
  )
47
47
  ) {
48
- this.clearMeshFromScene(mesh, this.scene)
48
+ this.clearMesh(mesh)
49
49
  }
50
50
  //clear panel on moduleField with overriden number of panel
51
51
  let panel = this.polygons.find(
52
52
  (poly) => mesh.userData.polygonId == poly.id
53
53
  )
54
54
  if (!panel || panel.moduleField.data.number_of_panels_override) {
55
- this.clearMeshFromScene(mesh, this.scene)
55
+ this.clearMesh(mesh)
56
56
  }
57
57
  })
58
58
 
@@ -182,7 +182,7 @@ export default {
182
182
  )
183
183
  //if no panels, no materialIds,
184
184
  for (let materialId of materialIdsToRemove) {
185
- this.clearMeshFromScene(this.mergedPanelTopMeshes[materialId], this.scene)
185
+ this.clearMesh(this.mergedPanelTopMeshes[materialId])
186
186
  delete this.mergedPanelTopMeshes[materialId]
187
187
  }
188
188
  this.mergedPanelSideMesh = this.updateOrCreateMergedMesh(
@@ -56,7 +56,7 @@ export default {
56
56
  return !tileToRenderIds.includes(id)
57
57
  })
58
58
  for (let id of idsToRemove) {
59
- this.clearMeshFromScene(this.meshes.tileMeshes[id], this.scene)
59
+ this.clearMesh(this.meshes.tileMeshes[id])
60
60
  }
61
61
  },
62
62
  async renderProviderTiles() {
@@ -211,11 +211,6 @@ export default {
211
211
  method: this.renderObstacles,
212
212
  arg: []
213
213
  })
214
- methodList.push({
215
- name: 'renderNodes',
216
- method: this.renderNodes,
217
- arg: []
218
- })
219
214
  } else if (params.layer == 'obstacle') {
220
215
  methodList.push({
221
216
  name: 'renderBase',
@@ -233,6 +228,11 @@ export default {
233
228
  arg: []
234
229
  })
235
230
  }
231
+ methodList.push({
232
+ name: 'renderRoofsMargin',
233
+ method: this.renderRoofsMargin,
234
+ arg: []
235
+ })
236
236
  break
237
237
  case 'removePanels': //params.panels
238
238
  case 'removeModuleField': //params:moduleField
@@ -106,10 +106,10 @@ export default {
106
106
  this.camera,
107
107
  this.renderer.domElement
108
108
  )
109
- this.orbitControl.maxPolarAngle = Math.PI / 2
109
+ this.orbitControl.maxPolarAngle = (0.95 * Math.PI) / 2
110
110
  this.orbitControl.mouseButtons = {
111
- LEFT: THREE.MOUSE.ROTATE,
112
111
  RIGHT: THREE.MOUSE.PAN,
112
+ LEFT: THREE.MOUSE.ROTATE,
113
113
  MIDDLE: THREE.MOUSE.DOLLY
114
114
  }
115
115
  this.orbitControl.screenSpacePanning = false