weasel API - v0.8.0
    Preparing search index...

    Function viewToMat3

    • Build the world→screen transform matrix for a View. Use as the transform field of a kind: 'group' DrawCommand to wrap world-space content emitted from a layer draw implementation.

      Mapping: screen = (world − {view.x, view.y}) × {view.scale.x, view.scale.y}.

      Column-major layout (matches mat3.identity()): [scale.x, 0, 0, 0, scale.y, 0, -view.x*scale.x, -view.y*scale.y, 1].

      Parameters

      • view: View

      Returns Mat3