@eturnity/eturnity_3d 1.0.43 → 1.0.44

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": "1.0.43",
4
+ "version": "1.0.44",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {
7
7
  "dev": "vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint",
@@ -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) {})
@@ -26,6 +26,7 @@ material.node=new THREE.PointsMaterial( { size: 0.05, sizeAttenuation: true,colo
26
26
  side: THREE.DoubleSide,
27
27
  })
28
28
  }
29
+ console.log('panel texture:',material.panel)
29
30
 
30
31
  material.flatRoof = new THREE.MeshPhongMaterial({
31
32
  color: 0x00ff00,
@@ -776,7 +776,9 @@ export default {
776
776
 
777
777
  this.panels.forEach((panelPolygon) => {
778
778
  //definition of the material
779
+ console.log('panelPolygon.moduleField.data.number_of_panels_override',panelPolygon.moduleField.data.number_of_panels_override)
779
780
  if(panelPolygon.moduleField.data.number_of_panels_override) return
781
+ console.log('material panel:','default_'+this.module_texture_version_id,this.material.panel)
780
782
  let material = this.material.panel['default_'+this.module_texture_version_id]
781
783
  if (panelPolygon.moduleField.pvData) {
782
784
  let pvId = panelPolygon.moduleField.pvData.id
@@ -825,7 +827,6 @@ export default {
825
827
  topMesh.geometry=updateBufferPanelGeometry(panelPolygon,topMesh.geometry)
826
828
  sideMesh.geometry=updateBufferPanelSideGeometry(panelPolygon,sideMesh.geometry)
827
829
  }
828
- let pvId = panelPolygon.moduleField.pvData.id
829
830
  topMesh.material= material
830
831
 
831
832
  }
@@ -36,9 +36,10 @@ export async function hydrateData({ state, commit }, data) {
36
36
 
37
37
  if (!!layoutSettingResponse) {
38
38
  const layoutSetting = layoutSettingResponse
39
-
39
+ const module_texture_version_id=layoutSetting.module_texture_version_id || 0
40
+ console.log("module_texture_version_id",module_texture_version_id)
40
41
  commit('mutate_layoutSettings', layoutSetting)
41
- commit('mutate_module_texture_version_id', layoutSetting.module_texture_version_id || 0)
42
+ commit('mutate_module_texture_version_id', module_texture_version_id)
42
43
  let layers=getLayers()
43
44
  let selectedLayer=layers.find(layer=>layer.key==layoutSetting.background_map_settings.layerKey)
44
45
  commit('mutate_selectedMapLayer', selectedLayer)
@@ -164,38 +165,7 @@ export async function hydrateData({ state, commit }, data) {
164
165
  //Get PV & Mounting system component Data (texture):
165
166
  pv_module_ids = [...new Set(pv_module_ids)]
166
167
  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
- // }
168
+
199
169
  state.polygons = [
200
170
  ...roofs,
201
171
  ...obstacles,