@eturnity/eturnity_3d 1.0.22 → 1.0.25
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,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eturnity/eturnity_3d",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.25",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint",
|
|
8
8
|
"build": "vue-cli-service build --skip-plugins @vue/cli-plugin-eslint"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@eturnity/eturnity_maths": "1.0.2",
|
|
11
|
+
"@eturnity/eturnity_maths": "^1.0.2",
|
|
12
12
|
"axios": "^1.3.2",
|
|
13
13
|
"cors": "^2.8.5",
|
|
14
14
|
"earcut": "^2.2.4",
|
package/src/App.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div class="canvas3DContainer" ref="canvas3DContainer" crossorigin />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -268,11 +268,11 @@ export default {
|
|
|
268
268
|
</script>
|
|
269
269
|
|
|
270
270
|
<style>
|
|
271
|
-
|
|
271
|
+
.canvas3DContainer {
|
|
272
272
|
width: 100%;
|
|
273
273
|
height: 100%;
|
|
274
274
|
}
|
|
275
|
-
|
|
275
|
+
.canvas3DContainer > canvas {
|
|
276
276
|
width: 100%;
|
|
277
277
|
height: 100%;
|
|
278
278
|
}
|
|
@@ -143,7 +143,6 @@ export default {
|
|
|
143
143
|
},
|
|
144
144
|
renderingMethodsByEvent(geometryEvent) {
|
|
145
145
|
const name = geometryEvent.name
|
|
146
|
-
console.log(name)
|
|
147
146
|
const params = geometryEvent.params
|
|
148
147
|
let methodList = []
|
|
149
148
|
switch (name) {
|
|
@@ -735,16 +734,17 @@ export default {
|
|
|
735
734
|
clearPanelsFromChangingRoofs(roofIds){
|
|
736
735
|
const roofs=this.polygons.filter(polygon=>roofIds.includes(polygon.id))
|
|
737
736
|
roofs.forEach(roof=>roof.moduleFields.forEach(mf=>mf.panels.forEach(panel=>{
|
|
738
|
-
let
|
|
739
|
-
|
|
740
|
-
|
|
737
|
+
let meshTop=this.meshes.panelsMeshes[panel.id+'_top']
|
|
738
|
+
let meshSide=this.meshes.panelsMeshes[panel.id+'_side']
|
|
739
|
+
if(meshTop || meshSide){
|
|
740
|
+
this.clearMesh(meshTop)
|
|
741
|
+
this.clearMesh(meshSide)
|
|
741
742
|
}
|
|
742
743
|
})
|
|
743
744
|
)
|
|
744
745
|
)
|
|
745
746
|
},
|
|
746
747
|
renderPanels() {
|
|
747
|
-
console.log('renderPanels')
|
|
748
748
|
this.clearRemovedOnes('panelsMeshes')
|
|
749
749
|
//clear UserDeactivatedModules
|
|
750
750
|
Object.values(this.meshes.panelsMeshes).forEach((mesh) => {
|
|
@@ -1081,12 +1081,9 @@ export default {
|
|
|
1081
1081
|
let mf=this.moduleFields[k]
|
|
1082
1082
|
const pvId = mf.data.component_id_pv_module
|
|
1083
1083
|
if (!this.material.panel[pvId]) {
|
|
1084
|
-
console.log('TEXTURE NOT YET in material',this.material)
|
|
1085
1084
|
if (!mf.data.texture_img_url) {
|
|
1086
|
-
console.log('no texture for this mf=>go to default')
|
|
1087
1085
|
this.material.panel[pvId] = this.material.panel.default
|
|
1088
1086
|
} else {
|
|
1089
|
-
console.log('load texture ...')
|
|
1090
1087
|
let texture = await this.loader.load(mf.data.texture_img_url)
|
|
1091
1088
|
this.material.panel[pvId] = new THREE.MeshBasicMaterial({
|
|
1092
1089
|
map: texture,
|