Drag from the right edge to turn the page. Two live HTML pages render as WebGL textures with a real-time cylindrical page-curl deformation.
drag from the right edge to turn the page — or watch the auto-animation
1. Two HTML “book pages” live inside
<canvas layoutsubtree> elements, styled
with CSS fonts and layout
2. drawElementImage() captures each page’s DOM into a 2D canvas bitmap
3. Both bitmaps become WebGL textures fed to a page-curl fragment shader
4. A cylindrical deformation creates the curl. The back face shows the next page’s content, correctly mirrored
Before HTML-in-Canvas, rendering styled HTML as a deformable 3D surface meant rasterizing the DOM manually with external libraries.