Wunderlust

multipleWindow3dScene

A three.js scene synced across several browser windows with only localStorage

Worth exploring

Use localStorage as a bus of window positions and sizes to split one scene across them

Why it works
Each window draws its own slice of one shared scene from its position alone, so dragging a window feels like moving a camera across one world.
Watch out
Treat it as a desktop showpiece. Phones and tablets cannot tile browser windows, so give them a single-window version.

What it is

A demo by Bjørn Staal in which a WindowManager stores each window's position and size in localStorage, and each window draws its part of the same 3D scene. To use it, clone the repo and open index.html; the project bundles a three.js r124 build.

What it’s for

For someone making interactive art with Three.js who wants a scene that spans several windows, like two windows showing parts of the same field.

Benefits

  • Only localStorage and static files, no server
  • WindowManager.js creates, syncs and removes windows
  • Three files: index.html, main.js and WindowManager.js

Caveats

  • The license is MIT; the bundled three.js build is r124, which is old.

More like this

Three.js3D & WebGLReact Three Fiber3D & WebGLReact Postprocessing3D & WebGLReact Three Rapier3D & WebGLLiquid Logo3D & WebGLLiquid Glass JSUI components

Featured on Wunderlust

Is this yours? Show it’s in the stash.

Featured on Wunderlust

Open the stash

Open in Wunderlust