Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

outline

The public outline API — mark entities to draw with a coloured silhouette rim. Its registry (entity id → { color, thickness }) is read every frame by the @builtin::renderFeatures.outline render feature, which draws a screen-space jump-flood rim hugging each marked entity's silhouette (uniform width, no gaps on hard-edge or multi-part meshes). The feature is ensured live on first use, so outline.set(entity) is all a caller needs.

An entity's outline lasts as long as the entity: when it is despawned, by entity.despawn, a parent's cascade, a scene rebuild or reload, its id leaves the registry, so the feature's per-frame cost follows the outlined entities in the world. A Model or SkinnedModel drawing an outline from its outline fields clears it when the component is removed.

local outline = require("modules.outline")
outline.set(entity, { color = { 1, 0.5, 0, 1 }, thickness = 3 })
outline.clear(entity)
outline.clearAll()