Effects
Updated
Effects change how other things look rather than being objects of their own: a flame that burns in the air, an image stamped onto walls and floors, a portal that hides everything outside its shape. Each effect is one entity with one required component, placed and aimed by its transform.
Key concepts
Section titled “Key concepts”- Fire. An animated flame drawn from a shared batch: every fire in the scene shares one draw call.
- Decal. An image painted onto existing surfaces. A fixed decal paints once and then belongs to the mesh it painted.
- Mask. A portal or window that shows its content only through a shape. It only marks pixels, without touching materials, and clips only meshes placed under it in the hierarchy.
How it works
Section titled “How it works”All three are built to stay cheap. Change them through their component’s setProps, and animate sizes or opacity with Tween.value.
They also interact. Fire is drawn from a shared batch, so a Mask does not clip it and a Decal does not stamp it.
Choosing
Section titled “Choosing”| If you want … | Use … | Read |
|---|---|---|
| An animated flame: a campfire, a torch, a brazier | Fire | Fire |
| An image painted onto existing surfaces: a logo, a mark, a scorch mark, a stain, a puddle | Decal | Decals |
| A portal or window into another world, that shows its content only through a shape | A Mask entity | Masks |
Entity types
Section titled “Entity types”Each effect is an entity type, with a page of its components, props, events and a first script:
| Entity | Type | What it is |
|---|---|---|
| Decal | ent-decal | Stamps an image onto every surface inside its box, like a sticker. |
| Fire | ent-fire | A particle flame; many fires share one draw call. |
| Mask | ent-mask | Shows everything under it only through its 2D shape: windows, portals, peepholes, reveals. |
Components
Section titled “Components”| Component | Type | What it does |
|---|---|---|
| Decal | comp-decal | Stamps an image onto every surface inside its box, like a sticker. |
| Fire | comp-fire | A particle flame; many fires share one draw call. |
| Mask Mesh | comp-mask-mesh | Shows everything under it only through its 2D shape: windows, portals, peepholes, reveals. |
In this section
Section titled “In this section”| Topic | Description |
|---|---|
| Decals | Images stamped onto surfaces like stickers or paint. |
| Fire | Cheap animated particle fire for campfires, torches and braziers. |
| Masks | Stencil portals that show content only through a shape. |
Next steps
Section titled “Next steps”DecalsStamp a logo or a stain onto the surfaces around it.
MeshesThe models and surfaces that effects are drawn on.
Post-processingEffects on a camera that change the whole image.