@eturnity/eturnity_3d 6.37.1 → 6.37.2
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
|
@@ -34,6 +34,7 @@ export default {
|
|
|
34
34
|
1,
|
|
35
35
|
1000
|
|
36
36
|
),
|
|
37
|
+
layers:null,
|
|
37
38
|
provider: null,
|
|
38
39
|
cameraProjection: null,
|
|
39
40
|
texture: null,
|
|
@@ -128,7 +129,8 @@ export default {
|
|
|
128
129
|
hydrateData: 'hydrateData'
|
|
129
130
|
}),
|
|
130
131
|
...mapMutations({
|
|
131
|
-
setModuleTextureVersionId: 'mutate_moduleTextureVersionId'
|
|
132
|
+
setModuleTextureVersionId: 'mutate_moduleTextureVersionId',
|
|
133
|
+
setSelectedMapLayer: 'mutate_selectedMapLayer'
|
|
132
134
|
}),
|
|
133
135
|
hideMesh(mesh){
|
|
134
136
|
if(mesh){
|
package/src/helper/threeMixin.js
CHANGED
|
@@ -2,14 +2,37 @@ import * as THREE from 'three'
|
|
|
2
2
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
|
|
3
3
|
import { Sky } from 'three/examples/jsm/objects/Sky.js'
|
|
4
4
|
import { CustomProvider } from './customProvider'
|
|
5
|
+
import getLayers from '../utils/layers'
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
methods: {
|
|
8
9
|
initialiseThreeMap() {
|
|
9
10
|
//Extention of the map with geo-map
|
|
11
|
+
if (!this.selectedMapLayer) {
|
|
12
|
+
this.setInitialMapLayer()
|
|
13
|
+
}
|
|
10
14
|
this.provider = new CustomProvider('', this.selectedMapLayer.key)
|
|
11
15
|
this.renderTiles()
|
|
12
16
|
},
|
|
17
|
+
setInitialMapLayer() {
|
|
18
|
+
if (!this.layers || this.layers.length == 0) {
|
|
19
|
+
this.layers = getLayers()
|
|
20
|
+
}
|
|
21
|
+
this.setSelectedMapLayer(null)
|
|
22
|
+
|
|
23
|
+
if (this.selectedMapLayer === null) {
|
|
24
|
+
for (var i in this.layers) {
|
|
25
|
+
if (this.globalProjectProperties && this.layers[i].key === this.globalProjectProperties.map_type) {
|
|
26
|
+
this.setSelectedMapLayer(this.layers[i])
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (this.selectedMapLayer === null) {
|
|
32
|
+
this.setSelectedMapLayer(this.layers[7])
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
|
|
13
36
|
initSky() {
|
|
14
37
|
// Add Sky
|
|
15
38
|
let sky = new Sky()
|
|
@@ -35,7 +58,6 @@ export default {
|
|
|
35
58
|
sun = null
|
|
36
59
|
},
|
|
37
60
|
initialiseThree(isInteractive = true) {
|
|
38
|
-
|
|
39
61
|
this.scene.background = new THREE.Color(0xb0b0b0)
|
|
40
62
|
|
|
41
63
|
this.camera.position.set(0, -100, 50)
|