Skip to content
Fungi

View-only point lights

Add deterministic point lighting to a game visual.

A visual binding can draw a point light around an actor. It changes the view only: the radius, color and flicker never enter simulation state or affect game rules. The radius is in screen pixels, color is a 24-bit RGB number, and flicker is between 0 and 1.

In the Acorn starter, set the tree entry in page.visuals like this:

TS
page: {
// Keep the other page settings and visuals.
visuals: {
...libraryVisuals,
"colony.tree": {
...libraryVisuals["colony.tree"],
light: { radius: 68, color: 0xff8a3d, flicker: 0.3 },
},
},
}

The light follows each tree that uses this visual. Since it is presentation data, adding or tuning it leaves saved simulation digests unchanged.

TERMINAL
vishnu check && vishnu test && vishnu build