Linkable 3D experiments
Webpack auto-discovers photonic modules, and /viz/ can load them directly from the query string. That gives CodeCube a way to publish 3D experiments as ordinary site routes instead of screenshots or isolated prototypes.
Behind /viz/
The 3D engine that gives CodeCube a browser-native space for scene modules, camera-driven exploration, immersive WebXR handoff, and visual storytelling — now open source as the @codecube/photonic package.
Photonic started life inside this site, and it is now a standalone open-source library: the package @codecube/photonic, MIT licensed, developed in public on GitHub with documentation and live examples on its documentation site. CodeCube no longer carries its own copy — /viz/ runs on the published package, taken as a dependency from the GitHub upstream, so every improvement to the library shows up here and every scene on this site exercises the same code other projects use. It remains the focused technology that makes 3D experiments loadable from URLs, inspectable from the console, and headset-ready on supported browsers.
Webpack auto-discovers photonic modules, and /viz/ can load them directly from the query string. That gives CodeCube a way to publish 3D experiments as ordinary site routes instead of screenshots or isolated prototypes.
Photonic wraps common scene operations behind a higher-level API for boxes, spheres, planes, arrows, materials, lights, view placement, and camera movement so CodeCube can focus on the experience instead of low-level Three.js plumbing.
Modules can define a default viewer pose once, and Photonic uses that same pose as the starting head position when a visitor enters immersive WebXR. That keeps desktop, mobile, and headset entry aligned instead of branching into unrelated camera setups.
Scene modules can expose Load, Update, and Unload hooks, publish descriptions, respond to clicks, and attach objects together for parent-child motion that evolves frame by frame.
Photonic is not a detached experiment. It is wired directly into the site's build, navigation, asset versioning, and runtime interaction surfaces so new visual capabilities become part of the publishing surface the moment they are shipped. The site takes Photonic as the @codecube/photonic dependency from its GitHub upstream instead of an integrated copy, so the engine that renders /viz/ is the published library itself.
Photonic lets CodeCube turn ideas into experiences people can pan around, inspect, revisit, and now step inside on supported headsets, instead of flattening everything into static screenshots.
Objects, motion, room-scale viewpoint, and camera controls create room for narratives that make more sense in space than in paragraphs.
Because the runtime is part of the site, new modules can move quickly from idea to public artifact without needing a separate demo stack.
Photonic is MIT licensed and public: read the documentation, browse the source on GitHub, and take @codecube/photonic as a dependency the same way this site does. It gives any project the workflow CodeCube uses to publish 3D ideas: build the module, link the URL, and let readers step inside the experience on screens today and supported headsets when the scene calls for it.