to3DPerspectiveMatrix method
Compute an equivalent 3D perspective matrix (4x4) that can be used to transform a canvas or as argument for the Transform widget in Flutter.
Implementation
Float64List to3DPerspectiveMatrix() {
return Float64List.fromList([
_matrix(1, 1), _matrix(1, 2), 0, _matrix(1, 3), //
_matrix(2, 1), _matrix(2, 2), 0, _matrix(2, 3), //
0, 0, 1, 1, //
_matrix(3, 1), _matrix(3, 2), 0, _matrix(3, 3), //
]);
}