@eturnity/eturnity_3d 1.0.43 → 1.0.45

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/index.html CHANGED
@@ -10,7 +10,6 @@
10
10
  <div id="app3"></div>
11
11
 
12
12
  <script>
13
- console.log(ThreeDLayoutView)
14
13
  const base_url='http://localhost:8080'
15
14
  const geometry={roofs:[],obstacles:[],moduleFields:[],layoutSettings:{}}
16
15
  const specificData={uuid:"d5774a28-d71c-4b1d-81bd-5bb4b57d82b6",view_mode:"top",base_url}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_3d",
3
3
  "private": false,
4
- "version": "1.0.43",
4
+ "version": "1.0.45",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {
7
7
  "dev": "vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint",
@@ -73,7 +73,6 @@ export default {
73
73
  this.$root.$on('on-roofSelected',(polygon)=>this.setCameraOrthogonalTo(polygon))
74
74
  this.updateProjectionMaterial()
75
75
 
76
- console.log('uuid to focus on:', this.uuid)
77
76
  const polygon = this.polygons.find((p) => p.id == this.uuid)
78
77
  this.setCamera(polygon, this.view_mode)
79
78
  this.isReady.geometry = true
@@ -108,7 +107,6 @@ export default {
108
107
  }),
109
108
  setCamera(polygon, view_mode) {
110
109
  let margin=0.2
111
- console.log('viewmode', view_mode)
112
110
  if (!polygon || view_mode == 'global') {
113
111
  let roofsBounds = this.roofsBounds
114
112
  //let distance = 5 + objectRadius / Math.sin(((this.orthographicCamera.fov / 2) * Math.PI) / 180)
@@ -142,7 +140,6 @@ export default {
142
140
  const geometry = mesh.geometry
143
141
 
144
142
  if (geometry.boundingSphere === null) geometry.computeBoundingSphere()
145
- console.log('geometry.boundingSphere', geometry.boundingSphere)
146
143
  target = [
147
144
  geometry.boundingSphere.center.x,
148
145
  geometry.boundingSphere.center.y,
@@ -158,7 +155,6 @@ export default {
158
155
  const targetVector = polygonRef.meanPoint
159
156
  //const target=[targetVector.x/1000,targetVector.y/1000,targetVector.z/1000]
160
157
  let cameraMoveVector = { x: 0, y: 0, z: 0 }
161
- console.log('normalVector:', polygonRef.normalVector)
162
158
  if (view_mode == 'ortho') {
163
159
  cameraMoveVector = multiplyVector(
164
160
  distance * 1000,
@@ -174,7 +170,6 @@ export default {
174
170
  const target = [0, 0, 0]
175
171
 
176
172
  let {xMin,xMax,yMin,yMax}=this.orthographicBounds(polygonBounds,margin)
177
- console.log('top POS TARGET', position, target)
178
173
  this.orthographicCamera.position.set(...position)
179
174
  this.orthographicCamera.lookAt(...target)
180
175
 
@@ -261,7 +256,6 @@ export default {
261
256
  // dispatch the custom event
262
257
  document.dispatchEvent(event)
263
258
  this.screenshotable = true
264
- console.log('screenshotable')
265
259
  }
266
260
  },
267
261
  deep: true
@@ -88,16 +88,13 @@ export class MapView extends Mesh
88
88
  */
89
89
  setRoot(root)
90
90
  {
91
- console.log('root',root)
92
91
 
93
92
  if (typeof root === 'number')
94
93
  {
95
94
  const rootConstructor = MapPlaneNode//MapView.mapModes.get(root);
96
- console.log('rootConstructor',rootConstructor)
97
95
  // @ts-ignore
98
96
  root = new rootConstructor(null, this);
99
97
  }
100
- console.log(root)
101
98
 
102
99
  // Remove old root
103
100
  if (!!this.root )
@@ -130,7 +127,6 @@ export class MapView extends Mesh
130
127
  */
131
128
  preSubdivide()
132
129
  {
133
- console.log('preSbdivide')
134
130
  const minZoom = this.provider.minZoom
135
131
  const maxZoom = this.provider.maxZoom
136
132
  function subdivide(node, depth)
@@ -154,7 +150,6 @@ export class MapView extends Mesh
154
150
  }
155
151
 
156
152
 
157
- console.log("minmax zoom",minZoom,maxZoom)
158
153
  if (minZoom > 0)
159
154
  {
160
155
  subdivide(this.root, minZoom);
@@ -17,7 +17,7 @@ material.edge=new THREE.MeshPhongMaterial({ color: beamColor,transparent:true,op
17
17
  material.node=new THREE.PointsMaterial( { size: 0.05, sizeAttenuation: true,color: node3DColor, opacity:node3dOpacity, transparent: true } );
18
18
  const loader = new THREE.TextureLoader()
19
19
  // texture.minFilter = THREE.LinearFilter
20
- material.panel={}
20
+ material.panel={}
21
21
 
22
22
  for(let k=0;k<defaultTextureUrls.length;k++){
23
23
  let texture=loader.load(defaultTextureUrls[k], function (texture) {})
@@ -825,7 +825,6 @@ export default {
825
825
  topMesh.geometry=updateBufferPanelGeometry(panelPolygon,topMesh.geometry)
826
826
  sideMesh.geometry=updateBufferPanelSideGeometry(panelPolygon,sideMesh.geometry)
827
827
  }
828
- let pvId = panelPolygon.moduleField.pvData.id
829
828
  topMesh.material= material
830
829
 
831
830
  }
@@ -11,15 +11,10 @@ import {
11
11
  } from '../helper/UpdateRoofObstacleRelations'
12
12
 
13
13
  export async function hydrateData({ state, commit }, data) {
14
- console.log(data)
15
14
  let roofsResponse = data.roofs
16
15
  let obstaclesResponse = data.obstacles
17
16
  let moduleFieldsResponse = data.moduleFields
18
17
  const layoutSettingResponse = data.layoutSettings
19
- console.log("roofsResponse",roofsResponse)
20
- console.log("obstaclesResponse",obstaclesResponse)
21
- console.log("moduleFieldsResponse",moduleFieldsResponse)
22
- console.log("layoutSettingResponse",layoutSettingResponse)
23
18
  //removing empty roof,obstacle and modulefield generated by BE on variant creation
24
19
  roofsResponse=roofsResponse.reduce((acc,cur)=>{
25
20
  if(cur.roof_outline.length>0){acc.push(cur)}
@@ -36,9 +31,9 @@ export async function hydrateData({ state, commit }, data) {
36
31
 
37
32
  if (!!layoutSettingResponse) {
38
33
  const layoutSetting = layoutSettingResponse
39
-
34
+ const module_texture_version_id=layoutSetting.module_texture_version_id || 0
40
35
  commit('mutate_layoutSettings', layoutSetting)
41
- commit('mutate_module_texture_version_id', layoutSetting.module_texture_version_id || 0)
36
+ commit('mutate_module_texture_version_id', module_texture_version_id)
42
37
  let layers=getLayers()
43
38
  let selectedLayer=layers.find(layer=>layer.key==layoutSetting.background_map_settings.layerKey)
44
39
  commit('mutate_selectedMapLayer', selectedLayer)
@@ -164,38 +159,7 @@ export async function hydrateData({ state, commit }, data) {
164
159
  //Get PV & Mounting system component Data (texture):
165
160
  pv_module_ids = [...new Set(pv_module_ids)]
166
161
  mounting_system_ids = [...new Set(mounting_system_ids)]
167
- const promiseList = []
168
- // for (let k in pv_module_ids) {
169
- // promiseList.push(
170
- // axios.get('/component_library/products/pv_modules/' + pv_module_ids[k])
171
- // )
172
- // }
173
- // for (let k in mounting_system_ids) {
174
- // promiseList.push(
175
- // axios.get(
176
- // '/component_library/products/mounting_systems/' + mounting_system_ids[k]
177
- // )
178
- // )
179
- // }
180
- // const results = await Promise.all(promiseList)
181
- // for (let k in pv_module_ids) {
182
- // const pv_module_id = pv_module_ids[k]
183
- // const pvData = results[k].data
184
- // moduleFields.forEach((m) => {
185
- // if (m.data.component_id_pv_module == pv_module_id) {
186
- // m.pvData = pvData
187
- // }
188
- // })
189
- // }
190
- // for (let k in mounting_system_ids) {
191
- // const mounting_system_id = mounting_system_ids[k]
192
- // const mountingData = results[parseInt(k) + pv_module_ids.length].data
193
- // moduleFields.forEach((m) => {
194
- // if (m.data.component_id_mounting_system == mounting_system_id) {
195
- // m.mountingData = mountingData
196
- // }
197
- // })
198
- // }
162
+
199
163
  state.polygons = [
200
164
  ...roofs,
201
165
  ...obstacles,