Skip to content

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.

  • 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.

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.

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

Each effect is an entity type, with a page of its components, props, events and a first script:

EntityTypeWhat it is
Decalent-decalStamps an image onto every surface inside its box, like a sticker.
Fireent-fireA particle flame; many fires share one draw call.
Maskent-maskShows everything under it only through its 2D shape: windows, portals, peepholes, reveals.
ComponentTypeWhat it does
Decalcomp-decalStamps an image onto every surface inside its box, like a sticker.
Firecomp-fireA particle flame; many fires share one draw call.
Mask Meshcomp-mask-meshShows everything under it only through its 2D shape: windows, portals, peepholes, reveals.
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.