Templates
Fragment comes with a collection of pre-defined templates that can be used to quickly start new sketches or projects. Templates provide pre-configured structure, assets, and example code so you can focus on development without setting up boilerplate manually.
Available templates
| Template | Description |
|---|---|
blank |
Empty sketch with no predefined rendering, props, or lifecycle logic |
2d |
Minimal 2D canvas sketch with init and update lifecycle hooks. |
fragment-gl |
A lightweight WebGL fullscreen shader |
p5 |
A basic p5.js sketch template with setup and draw functions pre-configured |
p5-gl |
A p5.js sketch in WebGL mode and a fullscreen shader |
three-fragment |
Three.js template using a fullscreen shader |
three-orthographic |
Three.js template using an orthographic camera |
three-perspective |
Three.js template using a perspective camera |