Whirld
Sun 04 April 2021Whirld is a little experiment into interacting with a three.js object in Mapbox GL JS.
Some highlights:
- loads a threejs SphereGeometry into a custom layer
- fancy rotational math to make the sphere appear to roll on the map surface
- simple dat.GUI to control a TextureLoader for switching the texture on a MeshBasicMaterial
Here's "Whirld", an app in which you roll a globe around by tilting the map (desktop right-click, mobile two-fingers). There's not much point to it, but figured some might enjoy the code.https://t.co/9KsQF98XDd pic.twitter.com/joLkp3qK6F
— Darren Wiens (@dkwiens) April 5, 2021
Enjoy! As always, reach out on Twitter if you want to continue the discussion!