Globe: Position camera to current continent

Quite complex to figure out but needed to use spherical coordinates to apply to the camera, inspired from Three.js
Thanks @Tape on Discord/Three.js!
This commit is contained in:
2022-09-26 20:00:17 +02:00
parent 6ca570c745
commit 7cc778e1cc
3 changed files with 28 additions and 11 deletions

View File

@@ -44,7 +44,8 @@ export const load: PageServerLoad = async () => {
continents: continent (filter: { countries: { slug: { _neq: "_empty" }}}) {
name
slug
rotation
rotation_x
rotation_y
}
settings {