Duna is a browser-based WebXR engine for exploring shared 3D worlds. It renders glTF scenes with three.js (DRACO-compressed assets, animated avatars, BVH collision detection via three-mesh-bvh) and runs in a normal browser or in a VR headset through WebXR, with in-world 3D interfaces built on three-mesh-ui.
Multiple people can be in the same world at once: presence and movement are synced peer-to-peer over PeerJS, with voice chat on the same connection. Portals rendered by custom GLSL shaders link one scene to the next. Sign-in is handled by Firebase, and a wallet can be connected through WalletConnect to resolve an ENS name as the in-world identity. Movement uses WASD plus pointer lock on desktop, an on-screen joystick on touch devices, and controller locomotion in VR.
Built with Angular 14 and three.js by Niccolò Fanton. See more of his work on Niccolò Fanton's personal site or browse the three.js and WebGL demo hub.