CameraFit.fromMatrix constructor

CameraFit.fromMatrix(
  1. Matrix4 m
)

Decompose a translate + uniform-scale Matrix4. Assumes the matrix has no rotation and m[0] == m[5] — true for the host camera and the draw viewer (both built by composing translate and uniform-scale only).

Implementation

factory CameraFit.fromMatrix(vmath.Matrix4 m) =>
    CameraFit(tx: m.storage[12], ty: m.storage[13], scale: m.storage[0]);