Renderer · class
FrameBudget
Every ceiling a backend imposes, counted for the frame just drawn.
Explained in Hello world.
class FrameBudgetimport { FrameBudget } from '@driftengine/core';In depth
The lines and the array holding them are allocated once and updated in place, so a consumer
reading this every frame allocates nothing — which is what AGENTS.md requires of anything on a
per-frame path, and a budget nobody can afford to read every frame is a budget nobody reads.
Accessors
| Name | Type | Description |
|---|---|---|
linesget | readonly BudgetLine[] | Every line, in the order declared. The same array every frame. |
droppedget | boolean | Whether anything at all was refused this frame.MoreThe one thing worth asserting on, and the reason it is a field rather than a walk over
|
Methods
line
line(name: string, ceiling: number | null): BudgetCounterDeclare a line. Called at construction, never in a frame.
| Parameter | Type | Description |
|---|---|---|
name | string | |
ceiling | number | null |
More
ceiling is null for a backend that imposes none — reported rather than omitted, because a
line that disappears on one backend is a line a cross-backend check cannot compare.
markDropped
markDropped(): voidreset
reset(): voidStart a frame. Keeps every line object; clears what they hold.