Documentation
    Preparing search index...

    Function applyLayers

    • Sets layers on root and every descendant (ยง46) โ€” the subtree spelling that self-only semantics makes explicit rather than implicit (see the module header).

      applyLayers(panel, layerMask("ui"));   // the panel and everything in it
      

      Depth-first in insertion order, like every other walk in the engine, and it writes nothing else โ€” a node's transform, visibility, and components are untouched. Idempotent, so calling it after adding a child re-establishes the subtree's membership without any bookkeeping in between.

      It walks every node, cameras included โ€” and Camera.layers is the mask that camera looks at, not one it belongs to (see camera.ts). Applying layers to a subtree containing a camera therefore re-aims that camera. Apply to the branch you mean.

      Takes the node structurally rather than as a Node, so node.ts can import this module for DEFAULT_LAYER_MASK without closing a cycle.

      Parameters

      Returns void