@eturnity/eturnity_3d 0.0.4 → 0.0.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
|
@@ -108,7 +108,7 @@ export default {
|
|
|
108
108
|
setCamera(polygon, view_mode) {
|
|
109
109
|
console.log('viewmode', view_mode)
|
|
110
110
|
if (!polygon || view_mode == 'global') {
|
|
111
|
-
let roofsBounds = this.roofsBounds
|
|
111
|
+
let roofsBounds = this.roofsBounds
|
|
112
112
|
//let distance = 5 + objectRadius / Math.sin(((this.orthographicCamera.fov / 2) * Math.PI) / 180)
|
|
113
113
|
//console.log('distance:',distance)
|
|
114
114
|
const position = [0, 0, 100]
|
package/src/helper/threeMixin.js
CHANGED
|
@@ -49,11 +49,8 @@ export default {
|
|
|
49
49
|
helper=null
|
|
50
50
|
|
|
51
51
|
//Extention of the map with geo-map
|
|
52
|
-
console.log("this.selectedMapLayer",this.selectedMapLayer)
|
|
53
52
|
if(this.selectedMapLayer && !['googleLayerRoadmap','googleLayer','googleLayerTerrain'].includes(this.selectedMapLayer.key)){
|
|
54
|
-
console.log("creation of custom provider")
|
|
55
53
|
this.provider = new CustomProvider('',this.selectedMapLayer.key);
|
|
56
|
-
console.log( this.provider)
|
|
57
54
|
|
|
58
55
|
// Create the map view and add it to your THREE scene
|
|
59
56
|
this.three_map = new MapView(MapView.PLANAR, this.provider);
|
|
@@ -91,7 +91,17 @@ const getters = {
|
|
|
91
91
|
},
|
|
92
92
|
getGeometryEvents() {
|
|
93
93
|
return []
|
|
94
|
-
}
|
|
94
|
+
},
|
|
95
|
+
getRoofsBounds(state,getters){
|
|
96
|
+
let bounds={xMin:Infinity,xMax:-Infinity,yMin:Infinity,yMax:-Infinity}
|
|
97
|
+
getters.getRoofs.forEach(polygon=>polygon.outline.forEach(p=>{
|
|
98
|
+
if(bounds.xMin>p.x){bounds.xMin=p.x}
|
|
99
|
+
if(bounds.xMax<p.x){bounds.xMax=p.x}
|
|
100
|
+
if(bounds.yMin>p.y){bounds.yMin=p.y}
|
|
101
|
+
if(bounds.yMax<p.y){bounds.yMax=p.y}
|
|
102
|
+
}))
|
|
103
|
+
return bounds
|
|
104
|
+
},
|
|
95
105
|
}
|
|
96
106
|
|
|
97
107
|
const mutations = {
|