diff --git a/src/components/organisms/InteractiveGlobe.svelte b/src/components/organisms/InteractiveGlobe.svelte index 6ac52dd..8c63c38 100644 --- a/src/components/organisms/InteractiveGlobe.svelte +++ b/src/components/organisms/InteractiveGlobe.svelte @@ -15,6 +15,7 @@ const isDev = import.meta.env.DEV export let type: string = undefined + export let autoRotate: boolean = true export let enableMarkers: boolean = true export let enableMarkersLinks: boolean = true export let speed: number = 0.1 @@ -48,7 +49,7 @@ mapFile: `/images/globe-map-${globeResolution}k.png`, mapFileDark: `/images/globe-map-dark-${globeResolution}k.png`, dpr: Math.min(Math.round(window.devicePixelRatio), 2), - autoRotate: true, + autoRotate, speed, sunAngle: 2, rotationStart: randomContinent.rotation, diff --git a/src/modules/globe/index.ts b/src/modules/globe/index.ts index e1e1cd8..44a0626 100644 --- a/src/modules/globe/index.ts +++ b/src/modules/globe/index.ts @@ -16,6 +16,7 @@ export class Globe { this.width = this.el.offsetWidth this.height = this.el.offsetHeight this.markers = options.markers || [] + this.globeZoom = 1.3075 this.globeRotation = { lat: degToRad(-this.options.rotationStart) || 0, // lng: degToRad(-this.options.rotationStart.lng) || 0, @@ -49,7 +50,6 @@ export class Globe { speed: options.speed, enableMarkers: options.enableMarkers, enableMarkersLinks: options.enableMarkersLinks, - zoom: 1.3075, sunAngle: options.sunAngle || 0, sunAngleDelta: 1.8, } @@ -93,7 +93,7 @@ export class Globe { // Create camera this.camera = new Camera(this.gl) - this.camera.position.set(0, 0, this.params.zoom) + this.camera.position.set(0, 0, this.globeZoom) // Create controls this.controls = new Orbit(this.camera, {