VFX-JS
    Preparing search index...

    Type Alias EffectDims

    Per-stage layout snapshot. Same shape on EffectContext.dims
    (frame-fresh in update / render) and as the argument to
    Effect.outputRect.

    Units:

    • Physical pixels: contentRect, srcRect, canvasRect, elementPixel, canvasPixel.
    • Logical (CSS) pixels: element, canvas. Multiply by
      pixelRatio to get the matching elementPixel / canvasPixel.

    In a post-effect there is no element, so element / elementPixel
    mirror canvas / canvasPixel, and contentRect mirrors
    canvasRect.

    type EffectDims = {
        element: readonly [number, number];
        elementPixel: readonly [number, number];
        canvas: readonly [number, number];
        canvasPixel: readonly [number, number];
        pixelRatio: number;
        contentRect: ElementRect;
        srcRect: ElementRect;
        canvasRect: ElementRect;
    }
    Index

    Properties

    element: readonly [number, number]
    elementPixel: readonly [number, number]
    canvas: readonly [number, number]
    canvasPixel: readonly [number, number]
    pixelRatio: number
    contentRect: ElementRect

    Element rect in element-local px: [0, 0, elementPixel[0], elementPixel[1]].

    srcRect: ElementRect

    Src buffer's rect in element-local px (= prev stage's outputRect, or contentRect at stage 0).

    canvasRect: ElementRect

    Canvas rect in element-local px.