@eturnity/eturnity_3d 6.34.2 → 6.34.3-EPDM-8085.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.
@@ -829,34 +829,6 @@ pipelines:
829
829
 
830
830
  - step: *build_and_push_image
831
831
  - step: *dev_deploy_only
832
- staging-all:
833
- - parallel:
834
-
835
- - step:
836
- name: Deploy to staging-01
837
- script:
838
- - pipe: atlassian/trigger-pipeline:5.2.0
839
- variables:
840
- BITBUCKET_ACCESS_TOKEN: $BB_ETURNITY_DEPLOY_ACCESS_TOKEN_1
841
- REPOSITORY: 'eturnity_expert'
842
- CUSTOM_PIPELINE_NAME: 'staging-01-deploy'
843
- REF_TYPE: 'branch'
844
- REF_NAME: 'staging-v.${BB_STAGING_VERSION}'
845
- DEBUG: 'true'
846
- WAIT: 'true'
847
-
848
- - step:
849
- name: Deploy to staging-02
850
- script:
851
- - pipe: atlassian/trigger-pipeline:5.2.0
852
- variables:
853
- BITBUCKET_ACCESS_TOKEN: $BB_ETURNITY_DEPLOY_ACCESS_TOKEN_1
854
- REPOSITORY: 'eturnity_expert'
855
- CUSTOM_PIPELINE_NAME: 'staging-02-deploy'
856
- REF_TYPE: 'branch'
857
- REF_NAME: 'staging-v.${BB_STAGING_VERSION}'
858
- DEBUG: 'true'
859
- WAIT: 'true'
860
832
 
861
833
 
862
834
  ####################################################################################################################
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_3d",
3
3
  "private": false,
4
- "version": "6.34.2",
4
+ "version": "6.34.3-EPDM-8085.1",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {
7
7
  "dev": "vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint",
@@ -10,8 +10,7 @@
10
10
  <script>
11
11
  import { mapActions, mapState, mapGetters, mapMutations } from 'vuex'
12
12
  import * as THREE from 'three'
13
- import { addVector, multiplyVector } from '@eturnity/eturnity_maths'
14
- import { updateComputedGeometryPolygon } from '@eturnity/eturnity_maths'
13
+ import { addVector, multiplyVector,updateComputedGeometryPolygon, normalizeVector } from '@eturnity/eturnity_maths'
15
14
 
16
15
  import threeMixin from '../helper/threeMixin'
17
16
  import materialMixin from '../helper/materialMixin'
@@ -154,14 +153,13 @@ export default {
154
153
  geometry.boundingSphere.center.z
155
154
  ]
156
155
  let objectRadius = geometry.boundingSphere.radius
156
+
157
157
  distance =
158
- 5 + objectRadius / Math.sin(((this.camera.fov / 2) * Math.PI) / 180)
159
- //_sphere.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );
158
+ 5+(objectRadius) / (Math.sin(((this.camera.fov / 2) * Math.PI) / 180))
160
159
  }
161
160
 
162
161
  polygonRef = updateComputedGeometryPolygon(polygonRef)
163
162
  const targetVector = polygonRef.meanPoint
164
- //const target=[targetVector.x/1000,targetVector.y/1000,targetVector.z/1000]
165
163
  let cameraMoveVector = { x: 0, y: 0, z: 0 }
166
164
  let flatRoof =
167
165
  polygonRef.normalVector.x == 0 && polygonRef.normalVector.y == 0
@@ -193,20 +191,22 @@ export default {
193
191
  this.orthographicCamera.updateProjectionMatrix()
194
192
  } else {
195
193
  //street view
196
- const horizontalVector = { ...polygonRef.normalVector, z: 0 }
194
+ let horizontalVector = { ...polygonRef.normalVector, z: 0 }
195
+
197
196
  if (horizontalVector.x == 0 && horizontalVector.y == 0) {
198
197
  //if flat roof=> go south
199
198
  horizontalVector.y = 1
200
199
  }
201
- let distanceCoefficient = 2
202
- if(flatRoof){
203
- distanceCoefficient = 1.5
204
- }
205
- cameraMoveVector = multiplyVector(distance * 1000 * distanceCoefficient, horizontalVector)
200
+ horizontalVector=normalizeVector(horizontalVector)
201
+ // let distanceCoefficient = 2
202
+ // if(flatRoof){
203
+ // distanceCoefficient = 1.5
204
+ // }
205
+ cameraMoveVector = multiplyVector(distance * 1000 , horizontalVector)
206
206
  }
207
207
 
208
208
  const positionVector = addVector(polygonRef.meanPoint, cameraMoveVector)
209
- if (flatRoof) positionVector.z += 2000
209
+ positionVector.z += 1000
210
210
  const position = [
211
211
  positionVector.x / 1000,
212
212
  positionVector.y / 1000 - 1,
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  methods: {
3
3
  applyTextureOnMesh(materials, mesh) {
4
- if (materials && materials.length > 0) {
4
+ if (mesh && materials && materials.length > 0) {
5
5
  let geometry = mesh.geometry
6
6
  geometry.clearGroups()
7
7
  for (let k = 0; k < materials.length; k++) {
@@ -267,8 +267,8 @@ export default {
267
267
  y: (yMax + yMin) / 2000
268
268
  }
269
269
  let deltaLatLng = distanceToDeltaLatLng(
270
- roofsBoundCenterMeter.x,
271
- roofsBoundCenterMeter.y,
270
+ roofsBoundCenterMeter.x*1000,
271
+ roofsBoundCenterMeter.y*1000,
272
272
  this.layoutSettings.layout_latitude
273
273
  )
274
274
  let roofsBoundCenterLatLng = {
@@ -298,17 +298,18 @@ export default {
298
298
  (Math.cos((this.layoutSettings.layout_latitude * Math.PI) / 180) *
299
299
  2 *
300
300
  Math.PI *
301
- 6378137) /
302
- (256 * Math.pow(2, zoomLevel))
303
- let sizeInMeter = groundResolution * size
301
+ earthRadius) /
302
+ ( Math.pow(2, zoomLevel))
303
+ let sizeInMeter = groundResolution * size / 256
304
304
  planeGeometry[indexGoogleBackground] = new THREE.PlaneGeometry(
305
305
  sizeInMeter,
306
- sizeInMeter * 0.9
306
+ //sizeInMeter * 0.9
307
+ sizeInMeter
307
308
  )
308
-
309
309
  //to remove attribution in bottom of the image
310
310
  var uvs = new Float32Array([
311
- 0, 0.95, 1, 0.95, 0, 0.05, 1, 0.05, 0, 0.05, 1, 0.95
311
+ //0, 0.95, 1, 0.95, 0, 0.05, 1, 0.05, 0, 0.05, 1, 0.95
312
+ 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0
312
313
  ])
313
314
  planeGeometry[indexGoogleBackground].setAttribute(
314
315
  'uv',
@@ -353,6 +354,7 @@ export default {
353
354
  this.scene.add(this.backgroundMap)
354
355
  },
355
356
  async renderGoogleTilesCenter() {
357
+
356
358
  this.clearByType('tileMeshes')
357
359
  if (this.backgroundMap) {
358
360
  this.backgroundMap.clear()
@@ -392,7 +394,7 @@ export default {
392
394
  (Math.cos((this.layoutSettings.layout_latitude * Math.PI) / 180) *
393
395
  2 *
394
396
  Math.PI *
395
- 6378137) /
397
+ earthRadius) /
396
398
  (256 * Math.pow(2, zoomLevel))
397
399
  let sizeInMeter = groundResolution * size
398
400
  planeGeometry[indexGoogleBackground] = new THREE.PlaneGeometry(