Tiramisu examples #
These examples are a guide to the public API. The first examples form a learnable path. Later sections are focused capability demos and integrations.
Run most examples with:
gleam run -m lustre/dev start
Then open http://localhost:1234.
Core path #
-
01-basics/01-first-visible-sceneThe smallest useful scene: renderer, scene, active camera, one visible object, and basic lighting. -
01-basics/02-transforms-and-hierarchyUsestiramisu.emptyto show how transforms compose through the scene graph. -
01-basics/03-camerasCompares perspective and orthographic cameras on the same subject. -
01-basics/04-lighting-and-materialsShows the main light types and the most important built-in material families. -
01-basics/05-primitive-galleryA visual reference for built-in geometry and visibility/shadow toggles.
Scene and effects #
-
02-scene/01-backgrounds-and-fogDemonstrates texture and equirectangular backgrounds plus fog. -
02-effects/01-on-tick-animationUsesrenderer.on_tickto animate transforms from Lustre state.
Assets and layout #
-
03-assets/01-model-loadingLoads an external mesh and handles both success and error events. -
03-assets/02-material-texturesDemonstrates texture-driven material attributes. -
03-assets/03-async-capabilitiesStresses async asset and scene loading with rapid owner churn, failures, and background swaps. -
04-layout/01-multiple-renderersShows multiple independent renderer instances on the same page.
Integrations #
05-server-components/01-basic-setupRenders a Tiramisu scene from a Lustre server component and drives movement withrenderer.on_tick. See that example's README for run steps.