html-in-canvas
Game UI in Canvas
Real HTML/CSS HUD panels rendered into the canvas, distorted by the water in front of them.
Quest log, inventory and status bar laid out in real HTML/CSS, then rendered into the same WebGL canvas as the ocean. The water treats the UI as part of the world: waves distort it, depth refracts it, gameplay can occlude it. Inspired by @dangreenheck's ocean experiments.
Game UI on the web is almost always a flat overlay. The HUD lives on top of the canvas, not inside it. The puzzle was whether the same html-in-canvas pipeline could fold the UI into the scene properly, so the water reacted to the inventory the same way it reacted to a boat.
HTML/CSS layout for the HUD panels. Render the layout to a texture. Project that texture as part of the scene rather than as a screen-space overlay. Apply the same shader passes (wave distortion, depth refraction, post-processing) to the UI texture as to everything else. Pointer events route back through the inverse projection so the HUD stays interactive.
Once html-in-canvas lands, game UI stops being a flat overlay. Full HTML/CSS layout, unified post-processing, depth-correct occlusion. This is the proof. Same instinct applies to immersive product UIs: when the interface lives inside the scene rather than on top of it, everything reads as more real.
If your interface needs to react to its environment, or your environment needs to react to its interface, the same pipeline applies.
All experimentsIf your interface needs to live inside the scene rather than on top of it, the same pipeline applies.
Misbehaving stack? Codebase that won't play fair?