TestRenderer beta
Interface of @v12-engine/render/testing
export interface TestRenderer extends RendererA renderer that draws nothing and keeps what it is handed, its frames run when the test says (the file's comment)
Members
cascadesNow
readonly cascadesNow: readonly TestCascadeFrame[];What each cascade of the main view drew in the last frame, as the real one decides it: its still layer again (still: its box moved, or what stands still in it changed: a copy came, went or was touched, what it carries changed, its material, its range or its limit, or its vertices moved), and the cascade at all (drawn: the still layer put back and what moves over it, where that or anything moving in it changed). The first frames draw every cascade; one no pixel reads draws nothing, and its still layer again once one does. stats.cascadesDrawn and stats.stillDrawn count them
copies
copies(filter?: (batch: TestBatch) => boolean, seen?: boolean): number;Copies of the live batches: as many as their counts, or (seen) as the last frame's view kept
drawOrder
drawOrder(): (TestBatch | TestStream)[];What the main view's pass draws, in its order: the batches and streams with something to draw, the hiding first ('first' then 'last'), the blended after by their order and, at the same order, as they were made
frame
frame(deltaMs?: number): void;A frame, now: the callbacks of onFrame with deltaMs, then the view culled and its stats
frames
frames(count: number, deltaMs?: number): void;count frames of deltaMs each
layersNow
readonly layersNow: {
glow: boolean;
};Which layers the last frame ran, as the real one decides it: the glow's only while what glows enough is in view (layers.ts)
live
live(filter?: (batch: TestBatch) => boolean): TestBatch[];The batches not let go of (those that pass filter)
post
readonly post: Renderer['post'] & {
resets: number;
checkPass(code: string): string | undefined;
};The passes after the view's: resets counts reset; checkPass says what is wrong with a game's pass's whole WGSL (nothing: right), as the card would, a promise after it is added
recorded
readonly recorded: Recorded;Everything it was asked for, kept
size
size(width: number, height: number): void;The canvas at another size (what resize then takes)
timing
readonly timing: {
on: boolean;
passes?: {
name: string;
ms: number;
}[];
gpuMs?: number;
cpu?: {
name: string;
ms: number;
}[];
};Whether the frame is timed (timePasses), and what its passes are taken to take, by name, for stats().passTimes while it is (the card's frame time gpuMs with them, and the processor's parts cpu, where set); none timed until a test says