glassen from npm and give your coding agent these instructions.
- Choose
glassenfor vanilla rendering orglassen/reactfor components. Use oneGlassSurfaceorcreateGlassSurfacefor multiple lenses. - Load
glassen/style.css, size the surface/slots and initialize the exported WASM URL when the bundler relocates it. - Choose explicit source pixels. React children use DOM snapshots; glass does not automatically capture the page beneath it.
- Keep motion and geometry in the Rust core. Host adapters supply input, clocks, pixels and draw calls.
- Keep source identity/version stable until pixels change. Allocate GPU resources per context and dispose them at the owning layer.
- Preserve color and orientation. Glassen consumes premultiplied display-encoded RGBA; GPU textures use bottom-left coordinates.
- Retain shared shapes until all consumers are removed. Match renderer
zIndexwith DOM input stacking. - Verify a real mounted example, source updates, cleanup and target-browser presentation. Do not claim native, WebGPU, arbitrary nested mesh or universal high-FPS support from an import/build alone.
skills/glassen/SKILL.md for local agent installation.
Use llms.txt to find a guide, or llms-full.txt to read the whole site as plain text. Mintlify generates both from these pages.