[wip] Add option to enable markers on Globe2

This commit is contained in:
2022-08-11 23:08:25 +02:00
parent 0c82464a98
commit 8ac95dc6a9
3 changed files with 9 additions and 0 deletions

View File

@@ -11,6 +11,9 @@
// Components
import Image from '$components/atoms/Image.svelte'
export let type: string = undefined
export let enableMarkers: boolean = true
let innerWidth: number
let globeParentEl: HTMLElement, globeEl: HTMLElement
let globe: any
@@ -41,6 +44,7 @@
autoRotate: true,
speed: 0.003,
rotationStart: randomContinent.rotation,
enableMarkers,
markers,
pane: import.meta.env.DEV,
})

View File

@@ -19,6 +19,7 @@ export class Globe {
this.params = {
autoRotate: options.autoRotate,
speed: options.speed,
enableMarkers: options.enableMarkers,
zoom: 1.305,
}
@@ -279,6 +280,7 @@ type Options = {
autoRotate: boolean
speed: number
rotationStart?: number
enableMarkers?: boolean
markers?: any[]
pane?: boolean
}

View File

@@ -15,4 +15,7 @@ export const createPane = (ctx: any) => {
max: 0.025,
step: 0.00025,
})
ctx.pane.addInput(ctx.params, 'enableMarkers', {
label: 'Enable markers',
})
}