@eturnity/eturnity_3d 8.34.4 → 8.34.6
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
|
@@ -106,7 +106,7 @@ export function updateModuleFieldFittingPanels(moduleField) {
|
|
|
106
106
|
})
|
|
107
107
|
})
|
|
108
108
|
|
|
109
|
-
const hasCustomTexture = moduleField.pvData?.texture_img_url
|
|
109
|
+
const hasCustomTexture = !!moduleField.pvData?.texture_img_url
|
|
110
110
|
const defaultTextureIndex = moduleField.pvData?.module_texture_version_id || 0
|
|
111
111
|
const color = hasCustomTexture
|
|
112
112
|
? moduleField.pvData?.backsheet_color
|
|
@@ -42,11 +42,13 @@ export default {
|
|
|
42
42
|
const promiseArray = this.moduleFields.map(async (mf) => {
|
|
43
43
|
const pvId = mf.data.component_id_pv_module
|
|
44
44
|
if (!this.material.panel[pvId]) {
|
|
45
|
-
if (!mf.
|
|
45
|
+
if (!mf.pvData.texture_img_url) {
|
|
46
46
|
this.material.panel[pvId] =
|
|
47
47
|
this.material.panel[`default_${this.moduleTextureVersionId}`]
|
|
48
48
|
} else {
|
|
49
|
-
const texture = await this.loadTextureAsync(
|
|
49
|
+
const texture = await this.loadTextureAsync(
|
|
50
|
+
mf.pvData.texture_img_url
|
|
51
|
+
)
|
|
50
52
|
texture.encoding = THREE.sRGBEncoding
|
|
51
53
|
texture.colorSpace = THREE.SRGBColorSpace
|
|
52
54
|
this.material.panel[pvId] = new THREE.MeshPhongMaterial({
|
package/src/store/hydrateData.js
CHANGED
|
@@ -153,8 +153,8 @@ export async function hydratePolygons({
|
|
|
153
153
|
moduleField.pvData.module_texture_version_id =
|
|
154
154
|
moduleFieldResp.module_texture_version_id
|
|
155
155
|
moduleField.pvData.backsheet_color = moduleFieldResp.backsheet_color
|
|
156
|
+
moduleField.pvData.texture_img_url = moduleFieldResp.texture_img_url
|
|
156
157
|
moduleField.data = {}
|
|
157
|
-
moduleField.data.texture_img_url = moduleFieldResp.texture_img_url
|
|
158
158
|
moduleField.data.col_spacing_mm = moduleFieldResp.col_spacing_mm
|
|
159
159
|
moduleField.data.is_row_spacing_automatic =
|
|
160
160
|
moduleFieldResp.is_row_spacing_automatic
|
|
@@ -211,7 +211,7 @@ export async function hydratePolygons({
|
|
|
211
211
|
})
|
|
212
212
|
|
|
213
213
|
modules.forEach((module) => {
|
|
214
|
-
|
|
214
|
+
let panel = new Polygon(module.outline, '')
|
|
215
215
|
panel.id = module.module_uuid
|
|
216
216
|
panel.gridIndex = module.gridIndex
|
|
217
217
|
panel.row_index = module.row_index
|
|
@@ -223,12 +223,15 @@ export async function hydratePolygons({
|
|
|
223
223
|
panel.poolGroupUuidColor = `#${panel.poolGroupUuid.slice(0, 6)}`
|
|
224
224
|
}
|
|
225
225
|
panel.available = true
|
|
226
|
+
|
|
226
227
|
if (module.is_active) {
|
|
227
228
|
panel.layer = 'panel'
|
|
229
|
+
panel = updateComputedGeometryPolygon(panel)
|
|
228
230
|
MFpanels.push(panel)
|
|
229
231
|
panels.push(panel)
|
|
230
232
|
} else {
|
|
231
233
|
panel.layer = 'user_deactivated_panel'
|
|
234
|
+
panel = updateComputedGeometryPolygon(panel)
|
|
232
235
|
MFuserDeactivatedPanels.push(panel)
|
|
233
236
|
userDeactivatedPanels.push(panel)
|
|
234
237
|
}
|