toOffset method
Returns an offset representing this particle's position, optionally with a transformation applied.
Implementation
Offset toOffset([Matrix4? transform]) {
Offset o = Offset(x, y);
if (transform == null) return o;
return MatrixUtils.transformPoint(transform, o);
}