Interface RendererClassEntry<P>

Renderer entry that provides a class to be instantiated by the layer. The layer passes its own width and height to the constructor, so the renderer's buffers always match the frame it will process.

Prefer the rendererEntry helper over a raw object literal — it infers P from the class so the compiler can catch excess / wrong-type params.

interface RendererClassEntry<P> {
    id: string;
    rendererClass: (new (width, height, params?) => LayerRenderer<never>);
    params?: P;
    active?: boolean;
}

Type Parameters

  • P = unknown

Properties

id: string

Unique identifier for this renderer within the layer.

rendererClass: (new (width, height, params?) => LayerRenderer<never>)

The renderer class to instantiate.

Type declaration

params?: P

Optional params forwarded to the renderer constructor.

active?: boolean

Whether the renderer is initially active in the render queue. Default: true.