@eturnity/eturnity_3d 6.33.0 → 6.34.1

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.
Files changed (42) hide show
  1. package/.editorconfig +5 -0
  2. package/bitbucket-pipelines.yml +702 -319
  3. package/package.json +9 -5
  4. package/src/App.vue +16 -16
  5. package/src/assets/theme.js +4 -4
  6. package/src/components/ThreeCanvasViewer.vue +61 -44
  7. package/src/config.js +139 -65
  8. package/src/helper/MapView.js +214 -241
  9. package/src/helper/UpdateRoofModuleFieldRelations.js +17 -23
  10. package/src/helper/UpdateRoofObstacleRelations.js +48 -41
  11. package/src/helper/cameraMixin.js +97 -93
  12. package/src/helper/customProvider.js +28 -28
  13. package/src/helper/materialMixin.js +86 -70
  14. package/src/helper/materials.js +64 -49
  15. package/src/helper/render/background.js +2 -5
  16. package/src/helper/render/base.js +43 -40
  17. package/src/helper/render/clear.js +96 -84
  18. package/src/helper/render/edge.js +59 -65
  19. package/src/helper/render/geometryHandler.js +166 -128
  20. package/src/helper/render/imageOverlay.js +157 -106
  21. package/src/helper/render/index.js +21 -3
  22. package/src/helper/render/loader.js +34 -34
  23. package/src/helper/render/mapProjection.js +88 -74
  24. package/src/helper/render/margin.js +46 -50
  25. package/src/helper/render/moduleField.js +26 -24
  26. package/src/helper/render/node.js +43 -43
  27. package/src/helper/render/obstacle.js +50 -48
  28. package/src/helper/render/panel.js +85 -79
  29. package/src/helper/render/projectionMaterial.js +58 -50
  30. package/src/helper/render/roof.js +136 -133
  31. package/src/helper/render/texture.js +17 -17
  32. package/src/helper/render/tile.js +291 -0
  33. package/src/helper/renderMixin.js +30 -37
  34. package/src/helper/threeMixin.js +40 -101
  35. package/src/main.js +22 -18
  36. package/src/store/AddMargin.js +87 -83
  37. package/src/store/hydrateData.js +40 -30
  38. package/src/store/nodesEdgesCreation.js +177 -160
  39. package/src/store/three-d-module.js +41 -27
  40. package/src/utils/cancellablePromise.js +23 -0
  41. package/.eslintrc.json +0 -18
  42. package/src/helper/geo-three.module.js +0 -1903
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_3d",
3
3
  "private": false,
4
- "version": "6.33.0",
4
+ "version": "6.34.1",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {
7
7
  "dev": "vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint",
8
- "build": "vue-cli-service build --skip-plugins @vue/cli-plugin-eslint"
8
+ "build": "vue-cli-service build --skip-plugins @vue/cli-plugin-eslint",
9
+ "lint": "eslint --fix --ext .js,.vue ./src",
10
+ "prettier": "prettier --write \"**/*.{js,vue}\""
9
11
  },
10
12
  "dependencies": {
11
- "@eturnity/eturnity_maths": "6.33.0",
13
+ "@eturnity/eturnity_maths": "6.34.1",
12
14
  "axios": "^1.3.2",
13
15
  "core-js": "^2.6.12",
14
16
  "cors": "^2.8.5",
@@ -32,6 +34,7 @@
32
34
  "@vue/cli-plugin-babel": "^3.12.1",
33
35
  "@vue/cli-plugin-eslint": "^3.12.1",
34
36
  "@vue/cli-service": "^3.12.1",
37
+ "babel-eslint": "^10.1.0",
35
38
  "babel-loader": "^8.3.0",
36
39
  "eslint": "5.16.0",
37
40
  "eslint-config-prettier": "6.15.0",
@@ -39,7 +42,8 @@
39
42
  "eslint-plugin-vue": "5.2.3",
40
43
  "html-webpack-plugin": "^3.2.0",
41
44
  "webpack": "^4.46.0",
42
- "webpack-cli": "^4.10.0"
45
+ "webpack-cli": "^4.10.0",
46
+ "prettier": "2.8.4"
43
47
  },
44
48
  "eslintConfig": {
45
49
  "root": true,
@@ -69,4 +73,4 @@
69
73
  "> 1%",
70
74
  "last 2 versions"
71
75
  ]
72
- }
76
+ }
package/src/App.vue CHANGED
@@ -1,28 +1,28 @@
1
1
  <template>
2
- <div class="frame" :style="{height:'100%'}">
2
+ <div class="frame" :style="{ height: '100%' }">
3
3
  <ThreeCanvas />
4
4
  </div>
5
5
  </template>
6
6
 
7
7
  <script>
8
- import {mapState} from 'vuex'
9
- import ThreeCanvas from './components/ThreeCanvasViewer.vue'
10
- export default {
11
- components:{
12
- ThreeCanvas
13
- },
14
- computed:{
15
- ...mapState({
16
- uuid:(state)=>state.uuid,
17
- view_mode:(state)=>state.view_mode,
18
- })
19
- }
8
+ import { mapState } from 'vuex'
9
+ import ThreeCanvas from './components/ThreeCanvasViewer.vue'
10
+ export default {
11
+ components: {
12
+ ThreeCanvas
13
+ },
14
+ computed: {
15
+ ...mapState({
16
+ uuid: (state) => state.uuid,
17
+ view_mode: (state) => state.view_mode
18
+ })
20
19
  }
20
+ }
21
21
  </script>
22
22
 
23
23
  <style scoped>
24
- .frame{
25
- width:100%;
26
- height:100%;
24
+ .frame {
25
+ width: 100%;
26
+ height: 100%;
27
27
  }
28
28
  </style>
@@ -18,15 +18,15 @@ const theme = {
18
18
  grey3: '#b2b9c5',
19
19
  grey4: '#dee2eb',
20
20
  grey5: '#fafafa',
21
- grey6: '#555d61',
22
- turquoise:'#20A4CA',
21
+ grey6: '#555d61',
22
+ turquoise: '#20A4CA',
23
23
  green: '#99db0c',
24
24
  purple: '#505ca6',
25
25
  disabled: '#dfe1e1',
26
26
  transparentWhite1: '#ffffff32',
27
27
  transparentBlack1: '#263238e6',
28
- transparentBlue1:'#20a4cae6',
29
- blueElectric:'#66dffa',
28
+ transparentBlue1: '#20a4cae6',
29
+ blueElectric: '#66dffa',
30
30
  eturnityGrey: '#263238'
31
31
  },
32
32
 
@@ -1,9 +1,14 @@
1
1
  <template>
2
- <div class="canvas3DContainer" ref="canvas3DContainer" :style="{height:'100%'}" crossorigin />
2
+ <div
3
+ class="canvas3DContainer"
4
+ ref="canvas3DContainer"
5
+ :style="{ height: '100%' }"
6
+ crossorigin
7
+ />
3
8
  </template>
4
9
 
5
10
  <script>
6
- import { mapActions, mapState, mapGetters,mapMutations } from 'vuex'
11
+ import { mapActions, mapState, mapGetters, mapMutations } from 'vuex'
7
12
  import * as THREE from 'three'
8
13
  import { addVector, multiplyVector } from '@eturnity/eturnity_maths'
9
14
  import { updateComputedGeometryPolygon } from '@eturnity/eturnity_maths'
@@ -25,14 +30,14 @@ export default {
25
30
  1,
26
31
  1000
27
32
  ),
28
- provider:null,
33
+ provider: null,
29
34
  cameraprojection: null,
30
35
  texture: null,
31
36
  renderer: new THREE.WebGLRenderer({
32
37
  antialias: true,
33
38
  preserveDrawingBuffer: true
34
39
  }),
35
- orbitControl:null,
40
+ orbitControl: null,
36
41
  raycaster: new THREE.Raycaster(),
37
42
  loader: new THREE.TextureLoader(),
38
43
  pointer: { x: 0, y: 0 },
@@ -53,10 +58,10 @@ export default {
53
58
  camera: false
54
59
  },
55
60
  screenshotable: false,
56
- areModuleFieldsVisible:false
61
+ areModuleFieldsVisible: false
57
62
  }
58
63
  },
59
- mixins: [renderMixin,threeMixin,materialMixin],
64
+ mixins: [renderMixin, threeMixin, materialMixin],
60
65
  async mounted() {
61
66
  await this.hydrateData(this.geometryData)
62
67
  this.renderer.domElement.style.width = '100%'
@@ -69,9 +74,11 @@ export default {
69
74
  this.onWindowResize()
70
75
  // this.updateProjectionMaterials()
71
76
  this.animate()
72
- this.$root.$on('on-roofSelected',(polygon)=>this.setCameraOrthogonalTo(polygon))
77
+ this.$root.$on('on-roofSelected', (polygon) =>
78
+ this.setCameraOrthogonalTo(polygon)
79
+ )
73
80
  this.initializeProjectionMaterial()
74
-
81
+
75
82
  const polygon = this.polygons.find((p) => p.id == this.uuid)
76
83
  this.setCamera(polygon, this.view_mode)
77
84
  this.isReady.geometry = true
@@ -82,7 +89,7 @@ export default {
82
89
  uuid: (state) => state.threeDModule.uuid,
83
90
  view_mode: (state) => state.threeDModule.view_mode,
84
91
  isInteractive: (state) => state.threeDModule.isInteractive,
85
- imageOverlay: (state) => state.threeDModule.imageOverlay,
92
+ imageOverlay: (state) => state.threeDModule.imageOverlay
86
93
  }),
87
94
  ...mapGetters({
88
95
  polygons: 'getPolygons',
@@ -106,7 +113,7 @@ export default {
106
113
  setModuleTextureVersionId: 'mutate_moduleTextureVersionId'
107
114
  }),
108
115
  setCamera(polygon, view_mode) {
109
- let margin=0.2
116
+ let margin = 0.2
110
117
  if (!polygon || view_mode == 'global') {
111
118
  let roofsBounds = this.roofsBounds
112
119
  const position = [0, 0, 100]
@@ -114,9 +121,12 @@ export default {
114
121
  this.orthographicCamera.position.set(...position)
115
122
  this.orthographicCamera.lookAt(...target)
116
123
  this.isReady.camera = true
117
-
118
- let {xMin,xMax,yMin,yMax}=this.orthographicBounds(roofsBounds,margin)
119
-
124
+
125
+ let { xMin, xMax, yMin, yMax } = this.orthographicBounds(
126
+ roofsBounds,
127
+ margin
128
+ )
129
+
120
130
  this.orthographicCamera.left = xMin / 1000
121
131
  this.orthographicCamera.right = xMax / 1000
122
132
  this.orthographicCamera.top = yMax / 1000
@@ -153,7 +163,8 @@ export default {
153
163
  const targetVector = polygonRef.meanPoint
154
164
  //const target=[targetVector.x/1000,targetVector.y/1000,targetVector.z/1000]
155
165
  let cameraMoveVector = { x: 0, y: 0, z: 0 }
156
- let flatRoof=polygonRef.normalVector.x==0 && polygonRef.normalVector.y==0
166
+ let flatRoof =
167
+ polygonRef.normalVector.x == 0 && polygonRef.normalVector.y == 0
157
168
  if (view_mode == 'ortho') {
158
169
  cameraMoveVector = multiplyVector(
159
170
  distance * 1000,
@@ -161,14 +172,17 @@ export default {
161
172
  )
162
173
  } else if (view_mode == 'top') {
163
174
  let polygonBounds = polygonRef.getBounds()
164
- polygonBounds.xMin-=1000
165
- polygonBounds.xMax+=1000
166
- polygonBounds.yMin-=1000
167
- polygonBounds.yMax+=1000
168
- const position = [0,0, 100]
175
+ polygonBounds.xMin -= 1000
176
+ polygonBounds.xMax += 1000
177
+ polygonBounds.yMin -= 1000
178
+ polygonBounds.yMax += 1000
179
+ const position = [0, 0, 100]
169
180
  const target = [0, 0, 0]
170
181
 
171
- let {xMin,xMax,yMin,yMax}=this.orthographicBounds(polygonBounds,margin)
182
+ let { xMin, xMax, yMin, yMax } = this.orthographicBounds(
183
+ polygonBounds,
184
+ margin
185
+ )
172
186
  this.orthographicCamera.position.set(...position)
173
187
  this.orthographicCamera.lookAt(...target)
174
188
 
@@ -184,11 +198,15 @@ export default {
184
198
  //if flat roof=> go south
185
199
  horizontalVector.y = 1
186
200
  }
187
- cameraMoveVector = multiplyVector(distance * 2000, horizontalVector)
201
+ let distanceCoefficient = 2
202
+ if(flatRoof){
203
+ distanceCoefficient = 1.5
204
+ }
205
+ cameraMoveVector = multiplyVector(distance * 1000 * distanceCoefficient, horizontalVector)
188
206
  }
189
207
 
190
208
  const positionVector = addVector(polygonRef.meanPoint, cameraMoveVector)
191
- if(flatRoof) positionVector.z+=2000
209
+ if (flatRoof) positionVector.z += 2000
192
210
  const position = [
193
211
  positionVector.x / 1000,
194
212
  positionVector.y / 1000 - 1,
@@ -202,34 +220,32 @@ export default {
202
220
  this.isReady.camera = true
203
221
  }
204
222
  },
205
- orthographicBounds(bounds,margin){
206
- let ratioCanvas=this.canvasHeight/this.canvasWidth
223
+ orthographicBounds(bounds, margin) {
224
+ let ratioCanvas = this.canvasHeight / this.canvasWidth
207
225
 
226
+ let width = (bounds.xMax - bounds.xMin) * (1 + margin)
227
+ let height = (bounds.yMax - bounds.yMin) * (1 + margin)
228
+ let ratio = height / width
208
229
 
209
- let width=(bounds.xMax-bounds.xMin)*(1+margin)
210
- let height=(bounds.yMax-bounds.yMin)*(1+margin)
211
- let ratio=height/width
212
-
213
- let xCenter=(bounds.xMax+bounds.xMin)/2
214
- let yCenter=(bounds.yMax+bounds.yMin)/2
230
+ let xCenter = (bounds.xMax + bounds.xMin) / 2
231
+ let yCenter = (bounds.yMax + bounds.yMin) / 2
215
232
  let xMin
216
233
  let xMax
217
234
  let yMin
218
235
  let yMax
219
- if(ratioCanvas<ratio){
236
+ if (ratioCanvas < ratio) {
220
237
  //canvas wider
221
- xMin=xCenter-height/(2*ratioCanvas)
222
- xMax=xCenter+height/(2*ratioCanvas)
223
- yMin=yCenter-height/2
224
- yMax=yCenter+height/2
225
-
226
- }else{
227
- xMin=xCenter-width/2
228
- xMax=xCenter+width/2
229
- yMin=yCenter-(width*ratioCanvas/2)
230
- yMax=yCenter+(width*ratioCanvas/2)
238
+ xMin = xCenter - height / (2 * ratioCanvas)
239
+ xMax = xCenter + height / (2 * ratioCanvas)
240
+ yMin = yCenter - height / 2
241
+ yMax = yCenter + height / 2
242
+ } else {
243
+ xMin = xCenter - width / 2
244
+ xMax = xCenter + width / 2
245
+ yMin = yCenter - (width * ratioCanvas) / 2
246
+ yMax = yCenter + (width * ratioCanvas) / 2
231
247
  }
232
- return {xMin,xMax,yMin,yMax}
248
+ return { xMin, xMax, yMin, yMax }
233
249
  },
234
250
  animate() {
235
251
  this.render()
@@ -250,7 +266,7 @@ export default {
250
266
  } else {
251
267
  this.renderer.render(this.scene, this.camera)
252
268
  }
253
- },
269
+ }
254
270
  },
255
271
  watch: {
256
272
  isReady: {
@@ -279,7 +295,8 @@ export default {
279
295
  width: 100%;
280
296
  height: 100%;
281
297
  }
282
- .canvas3DContainer > canvas {
298
+
299
+ .canvas3DContainer>canvas {
283
300
  width: 100%;
284
301
  height: 100%;
285
302
  }
package/src/config.js CHANGED
@@ -1,79 +1,153 @@
1
1
  import theme from './assets/theme'
2
- export const polygonCloseTolerance=15
2
+ export const polygonCloseTolerance = 15
3
3
  export const snapToPointTolerance = 15
4
4
  export const snapToIntersectionPointTolerance = 15
5
5
  export const snapToLineTolerance = 10
6
6
  export const distanceToCloseNode = 70
7
- export const mmTolerance=50
8
- export const earthRadius=6371008
7
+ export const mmTolerance = 50
8
+ export const earthRadius = 6371008
9
9
 
10
10
  export const layerColors = {
11
- construction: { fillColor: 'transparent', strokeColor: theme.colors.blueElectric ,strokeWidth:3 },
12
- roof: { fillColor: 'rgba(255, 255, 255, 0.1)', strokeColor: 'white' ,strokeWidth:0 },
13
- roofInside: { fillColor: 'rgba(255, 255, 255, 0.1)', strokeColor: 'white' ,strokeWidth:1},
14
- obstacle: { fillColor: theme.colors.red, strokeColor: 'red' ,strokeWidth:1 },
15
- panel: { fillColor: 'rgba(115, 115, 229, 0.1)', strokeColor: '#ffffff' ,strokeWidth:1},
16
- user_deactivated_panel: { fillColor: 'rgba(115, 115, 229, 0.1)', strokeColor: 'white' ,strokeWidth:4},
17
- selectedPanel: { fillColor: '#0068DE80', strokeColor: theme.colors.blue ,strokeWidth:1},
11
+ construction: {
12
+ fillColor: 'transparent',
13
+ strokeColor: theme.colors.blueElectric,
14
+ strokeWidth: 3
15
+ },
16
+ roof: {
17
+ fillColor: 'rgba(255, 255, 255, 0.1)',
18
+ strokeColor: 'white',
19
+ strokeWidth: 0
20
+ },
21
+ roofInside: {
22
+ fillColor: 'rgba(255, 255, 255, 0.1)',
23
+ strokeColor: 'white',
24
+ strokeWidth: 1
25
+ },
26
+ obstacle: { fillColor: theme.colors.red, strokeColor: 'red', strokeWidth: 1 },
27
+ panel: {
28
+ fillColor: 'rgba(115, 115, 229, 0.1)',
29
+ strokeColor: '#ffffff',
30
+ strokeWidth: 1
31
+ },
32
+ user_deactivated_panel: {
33
+ fillColor: 'rgba(115, 115, 229, 0.1)',
34
+ strokeColor: 'white',
35
+ strokeWidth: 4
36
+ },
37
+ selectedPanel: {
38
+ fillColor: '#0068DE80',
39
+ strokeColor: theme.colors.blue,
40
+ strokeWidth: 1
41
+ },
18
42
  snap: { fillColor: 'transparent', strokeColor: 'white' },
19
- moduleField: { fillColor: 'rgba(255, 255, 255, 0.1)', strokeColor: 'white' ,strokeWidth:3 },
20
- hoveredModuleFieldEdge: { strokeColor: theme.colors.blue ,strokeWidth:6 },
21
- tmpModuleField: { fillColor: 'rgba(115, 115, 229, 0.4)', strokeColor: theme.colors.blue ,strokeWidth:2 },
22
- selectedModuleField: {fillColor: '#0068DE80', strokeColor: theme.colors.blue ,strokeWidth:3},
23
- highlight: { fillColor: 'rgba(255, 255, 255, 0.2)', strokeColor: 'white' ,strokeWidth:1 },
24
- selectedRoof: { fillColor: '#0068DE80', strokeColor: 'white' ,strokeWidth:3 },
25
- selectedObstacle: { fillColor: '#0068DE80', strokeColor: theme.colors.blue ,strokeWidth:2 },
26
- selectedAndHighlighted: {fillColor: '#0068DEA0', strokeColor: theme.colors.blue ,strokeWidth:3},
27
- flatWarning: {fillColor: '#ffff0090', strokeColor: 'yellow' ,strokeWidth:1},
28
- customLength: { fillColor: 'transparent', strokeColor: theme.colors.blueElectric ,strokeWidth:1 },
29
- snapDirectionIncline: { fillColor: 'transparent', strokeColor: theme.colors.blue ,strokeWidth:1 },
30
- inclineDirectionArrow: { fillColor: 'transparent', strokeColor: "#FF5656" ,strokeWidth:5 },
31
- inclineLabel: { fillColor: theme.colors.transparentBlack1, textColor: "white"},
32
- directionLabel: { fillColor: theme.colors.transparentBlack1, textColor: "white"},
43
+ moduleField: {
44
+ fillColor: 'rgba(255, 255, 255, 0.1)',
45
+ strokeColor: 'white',
46
+ strokeWidth: 3
47
+ },
48
+ hoveredModuleFieldEdge: { strokeColor: theme.colors.blue, strokeWidth: 6 },
49
+ tmpModuleField: {
50
+ fillColor: 'rgba(115, 115, 229, 0.4)',
51
+ strokeColor: theme.colors.blue,
52
+ strokeWidth: 2
53
+ },
54
+ selectedModuleField: {
55
+ fillColor: '#0068DE80',
56
+ strokeColor: theme.colors.blue,
57
+ strokeWidth: 3
58
+ },
59
+ highlight: {
60
+ fillColor: 'rgba(255, 255, 255, 0.2)',
61
+ strokeColor: 'white',
62
+ strokeWidth: 1
63
+ },
64
+ selectedRoof: {
65
+ fillColor: '#0068DE80',
66
+ strokeColor: 'white',
67
+ strokeWidth: 3
68
+ },
69
+ selectedObstacle: {
70
+ fillColor: '#0068DE80',
71
+ strokeColor: theme.colors.blue,
72
+ strokeWidth: 2
73
+ },
74
+ selectedAndHighlighted: {
75
+ fillColor: '#0068DEA0',
76
+ strokeColor: theme.colors.blue,
77
+ strokeWidth: 3
78
+ },
79
+ flatWarning: {
80
+ fillColor: '#ffff0090',
81
+ strokeColor: 'yellow',
82
+ strokeWidth: 1
83
+ },
84
+ customLength: {
85
+ fillColor: 'transparent',
86
+ strokeColor: theme.colors.blueElectric,
87
+ strokeWidth: 1
88
+ },
89
+ snapDirectionIncline: {
90
+ fillColor: 'transparent',
91
+ strokeColor: theme.colors.blue,
92
+ strokeWidth: 1
93
+ },
94
+ inclineDirectionArrow: {
95
+ fillColor: 'transparent',
96
+ strokeColor: '#FF5656',
97
+ strokeWidth: 5
98
+ },
99
+ inclineLabel: {
100
+ fillColor: theme.colors.transparentBlack1,
101
+ textColor: 'white'
102
+ },
103
+ directionLabel: {
104
+ fillColor: theme.colors.transparentBlack1,
105
+ textColor: 'white'
106
+ }
33
107
  }
34
108
 
35
- export const snapInclineTolerance=5
36
- export const snapDirectionTolerance=15
37
- export const radiusPadding=20
38
- export const InclineDirectionCircleRadius=250
39
- export const inclineDirectionMinRadius=50
40
- export const baseEdgeOfModuleField=theme.colors.blueElectric
41
- export const maximumGapLimit=500
42
- export const defaultBaseHeight=3000
43
- export const colorArrayBase=[
44
- "#FF5656",
45
- "#FDB813",
46
- "#505CA6",
47
- "#8392EE",
48
- "#6CD5D5",
49
- "#C84E4E",
50
- "#90A650",
51
- "#D27CCA",
52
- "#6276DF",
109
+ export const snapInclineTolerance = 5
110
+ export const snapDirectionTolerance = 15
111
+ export const radiusPadding = 20
112
+ export const InclineDirectionCircleRadius = 250
113
+ export const inclineDirectionMinRadius = 50
114
+ export const baseEdgeOfModuleField = theme.colors.blueElectric
115
+ export const maximumGapLimit = 500
116
+ export const defaultBaseHeight = 3000
117
+ export const colorArrayBase = [
118
+ '#FF5656',
119
+ '#FDB813',
120
+ '#505CA6',
121
+ '#8392EE',
122
+ '#6CD5D5',
123
+ '#C84E4E',
124
+ '#90A650',
125
+ '#D27CCA',
126
+ '#6276DF'
53
127
  ]
54
- export const colorArray=colorArrayBase.map(c=>c+"c0")
55
- export const layerTools={
56
- map:[],
57
- roof:["drawRoof","selectRoof"],
58
- obstacle:["drawObstacle"],
59
- margin:["selectMargin"],
60
- panel:["selectModuleField"],
128
+ export const colorArray = colorArrayBase.map((c) => c + 'c0')
129
+ export const layerTools = {
130
+ map: [],
131
+ roof: ['drawRoof', 'selectRoof'],
132
+ obstacle: ['drawObstacle'],
133
+ margin: ['selectMargin'],
134
+ panel: ['selectModuleField']
61
135
  }
62
136
  //3D visualisation:
63
- export const beamRadius=0.05
64
- export const maxMargin=2500
65
- export const node3DRadius=0.05
66
- export const beamColor="#ffffff"
67
- export const node3DColor="white"
68
- export const beamOpacity=0.4
69
- export const node3dOpacity=0.3
70
- export const dimMarginColor='#ff000020'
71
- export const defaultTextureUrl=require('./assets/images/panels/reneSola_Virtus_2_JC320S_24_Bbw.png')
72
- const textureImageDomain='https://public-data.eturnity.io/'
137
+ export const beamRadius = 0.05
138
+ export const maxMargin = 2500
139
+ export const node3DRadius = 0.05
140
+ export const beamColor = '#ffffff'
141
+ export const node3DColor = 'white'
142
+ export const beamOpacity = 0.4
143
+ export const node3dOpacity = 0.3
144
+ export const dimMarginColor = '#ff000020'
145
+ export const defaultTextureUrl = require('./assets/images/panels/reneSola_Virtus_2_JC320S_24_Bbw.png')
146
+ const textureImageDomain = 'https://public-data.eturnity.io/'
73
147
  export const defaultTextureUrls = [
74
- textureImageDomain+'textures/reneSola_Virtus_2_JC320S_24_Bbw.png',
75
- textureImageDomain+'textures/longiSolarLR4_60HPH_370M.png',
76
- textureImageDomain+'textures/longiSolarLR4_60HPH_350M.png',
148
+ textureImageDomain + 'textures/reneSola_Virtus_2_JC320S_24_Bbw.png',
149
+ textureImageDomain + 'textures/longiSolarLR4_60HPH_370M.png',
150
+ textureImageDomain + 'textures/longiSolarLR4_60HPH_350M.png'
77
151
  ]
78
152
 
79
153
  export const hitOption = {
@@ -82,7 +156,7 @@ export const hitOption = {
82
156
  fill: true,
83
157
  tolerance: 10
84
158
  }
85
- export const zoomFactor=Math.exp(Math.log(2)/10)
159
+ export const zoomFactor = Math.exp(Math.log(2) / 10)
86
160
  export const hitOptionPolygonStrict = {
87
161
  segments: false,
88
162
  stroke: false,
@@ -102,5 +176,5 @@ export const hitOptionStroke = {
102
176
  tolerance: 2
103
177
  }
104
178
 
105
- export const dragHeightSensitivity=20
106
- export const snapLimit=100
179
+ export const dragHeightSensitivity = 20
180
+ export const snapLimit = 100