Documentation
    Preparing search index...

    Class ClipPlaneAllocator

    Assigns §67's bit planes to the clips of one frame, in traversal order, and emits §67's required diagnostic when they run out.

    One allocator per render list (render-list.ts keeps it in the list's pool), reset by ClipPlaneAllocator.begin at the start of every build, so plane 0 is always the first clip the depth-first walk meets. Traversal order, never Map order (§33): the same scene built twice assigns the same planes, and a plane number is therefore a deterministic function of the scene rather than of insertion history in a hash table.

    The ninth clip of a frame gets no plane. §61 forbids throwing inside a frame, so the limit is a warning plus a defined behaviour, and the behaviour is the one that fails toward drawing:

    • the over-limit clip is dropped. Its subtree keeps every clip it inherited — up to eight of them — and simply is not narrowed by this one;
    • it is not "unclipped": the region drawn is the intersection of the eight constraints that did fit, which is a superset of the region the author asked for. Content spills outside the ninth boundary and nothing that should be visible disappears.

    The alternative — dropping the subtree, i.e. failing toward fully clipped — was rejected on the R-8 precedent ("cannot be bounded ⇒ drawn"). A spill is a visible, localized, diagnosable artefact that points straight at the clip that caused it; a vanished subtree is indistinguishable from a scene-graph bug, a culling bug, a material bug, or a camera bug, and the warning that would explain it is in a console the author may never open. Between two wrong pictures, prefer the one that shows the content and the mistake.

    The warning fires once per allocator, not once per exhausted build: an over-budget scene is over budget on every frame it renders, and a warning repeated at the frame rate hides its own first line — the same argument behind §42's once-only authority-conflict warning and §39's once-only undispatched-queue warning. begin therefore resets the plane counter and not the warned flag; the message names the first clip refused, which is the one an author goes looking for.

    Index
    • get refused(): number

      How many clips this build refused for want of a plane (§84).

      Returns number

    • Assigns the next bit plane to a clip whose enclosing clips have written inheritedBits, or returns null when the frame's eight planes are gone.

      nodeId appears only in the diagnostic, and only in a development build.

      Parameters

      • inheritedBits: number
      • nodeId: string

      Returns ClipScope | null

      the subtree's clip and the mask draw's, or null — in which case the caller keeps the clip it already had (see the class documentation).

    • Resets the allocator for a new build. Called by both list builders before traversal, so plane numbers are a function of the scene and not of how many frames have been drawn.

      Returns void