localTransform property
This node's local transform.
The returned matrix is owned by this node and should not be retained.
Implementation
MMatrix3 get localTransform {
final transform = _lastLocalTransform;
final cosA = math.cos(angle);
final sinA = math.sin(angle);
transform.setValues(
// dart format off
cosA * scale.x, sinA * scale.x, 0,
-sinA * scale.y, cosA * scale.y, 0,
position.x, position.y, 1,
// dart format on
);
return transform;
}