Cannon.Math.Matrix
y-lohse edited this page Dec 27, 2012
·
4 revisions
An implementation of a mathematical Matrix. It is mainly used as a mean to apply transformations to a canvas rendering context.
Default is 1
Default is 0
Default is 0
Default is 1
Default is 0
Default is 0
- a:Float
- b:Float
- c:Float
- d:Float
- tx:Float
- ty:Float
Creates a new matrix. All parameters are optional.
- ctx:CanvasRenderingContext
Applies the matrix to a given context, combining it with the current modifications
- ctx:CanvasRenderingContext
Applies the current matrix to the context, ovveriding all current context settings
Returns a clone of the current matrix
- m2:Cannon.Math.Matrix
Multiplies the current matrix by another one, effectively combining theire effect
Resets the matrix so that it will have no effect
Inverts the current effect of the matrix
- angle:Float : rotation angle in radians
Rotates the matrix
- sx:Float : x scale
- sy:Float : y scale
Scales the matrix
- tx:Float : x translation
- ty:Float : y translation
Applies a translation to the matrix