Builtin Library
README.md
renderLayer
Render layers end to end — put entities on a layer, choose which layers a camera or UI screen draws, and see what layers exist, all by layer name.
This is how a wall, prop or overlay stays out of a shot while it still exists for lighting, shadows and physics. Everything here speaks layer names; no caller ever builds a bitmask.
A render layer is a name: a shared coordination namespace. An entity is a
member of one or more layers; a camera renders a filter over them
("all !shell !ui"). The two sides let geometry exist for lighting and
physics while staying out of a given shot — a near wall that still
occludes and bounces light in a bake, but does not block the view.
Membership
- set — put one or many entities on named layers, optionally the whole subtree.
- get — read which layers entities are on, optionally the whole subtree.
Both report the extent of what they covered: set returns moved and
skipped per target, get returns skipped per entity read. A call on a
root of 46 children reports moved = 1, skipped = 46 on its own and
moved = 47, skipped = 0 with tree = true, so the size of the write is
in the reply.
Visibility
- camera — set what a camera renders, as a name filter.
- screen — set which layers a UI screen draws into.
Introspection
- list — every layer that exists, which entities are on each, and which cameras include or exclude it.
Referencing a layer name that does not exist yet creates it. That means a
typo produces a real, empty layer that renders nothing and reports no
error — list is how you see that.
Scene layers (wld.layers) are a different concept: those are
additive scene composition, the mechanism for merging one scene's content
into another. These are render layers, which govern what draws.