@eturnity/eturnity_3d 1.0.39 → 1.0.40
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
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
hydrateData: 'hydrateData'
|
|
105
105
|
}),
|
|
106
106
|
...mapMutations({
|
|
107
|
-
|
|
107
|
+
setModuleTextureVersionId: 'mutate_moduleTextureVersionId'
|
|
108
108
|
}),
|
|
109
109
|
setCamera(polygon, view_mode) {
|
|
110
110
|
let margin=0.2
|
|
@@ -159,6 +159,7 @@ export default {
|
|
|
159
159
|
//const target=[targetVector.x/1000,targetVector.y/1000,targetVector.z/1000]
|
|
160
160
|
let cameraMoveVector = { x: 0, y: 0, z: 0 }
|
|
161
161
|
console.log('normalVector:', polygonRef.normalVector)
|
|
162
|
+
let flatRoof=polygonRef.normalVector.x==0 && polygonRef.normalVector.y==0
|
|
162
163
|
if (view_mode == 'ortho') {
|
|
163
164
|
cameraMoveVector = multiplyVector(
|
|
164
165
|
distance * 1000,
|
|
@@ -187,12 +188,14 @@ export default {
|
|
|
187
188
|
//street view
|
|
188
189
|
const horizontalVector = { ...polygonRef.normalVector, z: 0 }
|
|
189
190
|
if (horizontalVector.x == 0 && horizontalVector.y == 0) {
|
|
191
|
+
//if flat roof=> go south
|
|
190
192
|
horizontalVector.y = 1
|
|
191
193
|
}
|
|
192
|
-
cameraMoveVector = multiplyVector(distance *
|
|
194
|
+
cameraMoveVector = multiplyVector(distance * 2000, horizontalVector)
|
|
193
195
|
}
|
|
194
196
|
|
|
195
197
|
const positionVector = addVector(polygonRef.meanPoint, cameraMoveVector)
|
|
198
|
+
if(flatRoof) positionVector.z+=2000
|
|
196
199
|
const position = [
|
|
197
200
|
positionVector.x / 1000,
|
|
198
201
|
positionVector.y / 1000 - 1,
|
|
@@ -79,7 +79,7 @@ export default {
|
|
|
79
79
|
|
|
80
80
|
computed: {
|
|
81
81
|
...mapState({
|
|
82
|
-
|
|
82
|
+
moduleTextureVersionId: (state) => state.threeDModule.moduleTextureVersionId,
|
|
83
83
|
selectedMapLayer: (state) => state.threeDModule.selectedMapLayer,
|
|
84
84
|
pvDataMemo: (state) => state.threeDModule.pvDataMemo
|
|
85
85
|
}),
|
|
@@ -777,7 +777,7 @@ export default {
|
|
|
777
777
|
this.panels.forEach((panelPolygon) => {
|
|
778
778
|
//definition of the material
|
|
779
779
|
if(panelPolygon.moduleField.data.number_of_panels_override) return
|
|
780
|
-
let material = this.material.panel['default_'+this.
|
|
780
|
+
let material = this.material.panel['default_'+this.moduleTextureVersionId]
|
|
781
781
|
if (panelPolygon.moduleField.pvData) {
|
|
782
782
|
let pvId = panelPolygon.moduleField.pvData.id
|
|
783
783
|
if (this.material.panel[pvId]) {
|
package/src/store/hydrateData.js
CHANGED
|
@@ -38,7 +38,7 @@ export async function hydrateData({ state, commit }, data) {
|
|
|
38
38
|
const layoutSetting = layoutSettingResponse
|
|
39
39
|
|
|
40
40
|
commit('mutate_layoutSettings', layoutSetting)
|
|
41
|
-
commit('
|
|
41
|
+
commit('mutate_moduleTextureVersionId', layoutSetting.module_texture_version_id)
|
|
42
42
|
let layers=getLayers()
|
|
43
43
|
let selectedLayer=layers.find(layer=>layer.key==layoutSetting.background_map_settings.layerKey)
|
|
44
44
|
commit('mutate_selectedMapLayer', selectedLayer)
|
|
@@ -30,7 +30,7 @@ const init_state = {
|
|
|
30
30
|
//useless state for viewer
|
|
31
31
|
pvDataMemo:[],
|
|
32
32
|
mountingDataMemo:[],
|
|
33
|
-
|
|
33
|
+
moduleTextureVersionId:0,
|
|
34
34
|
selectedMapLayer:null,
|
|
35
35
|
globalProjectProperties: [],
|
|
36
36
|
}
|
|
@@ -129,11 +129,8 @@ const mutations = {
|
|
|
129
129
|
mutate_buildingLocation(state, value) {
|
|
130
130
|
state.buildingLocation = value
|
|
131
131
|
},
|
|
132
|
-
|
|
133
|
-
state.
|
|
134
|
-
},
|
|
135
|
-
mutate_module_texture_version_id(state,value){
|
|
136
|
-
state.module_texture_version_id=value
|
|
132
|
+
mutate_moduleTextureVersionId(state,value){
|
|
133
|
+
state.moduleTextureVersionId=value
|
|
137
134
|
},
|
|
138
135
|
mutate_selectedMapLayer(state,value){
|
|
139
136
|
state.selectedMapLayer=value
|