Mat4:orthographic

Edit

Sets this matrix to represent an orthographic projection, useful for 2D/isometric rendering.

This can be used with Pass:setProjection, or it can be sent to a Shader for use in GLSL.



Arguments

NameTypeDescription
leftnumber The left edge of the projection.
rightnumber The right edge of the projection.
bottomnumber The bottom edge of the projection.
topnumber The top edge of the projection.
nearnumber The position of the near clipping plane.
farnumber The position of the far clipping plane.

Returns

NameTypeDescription
selfMat4 The modified matrix.

Arguments

NameTypeDescription
widthnumber The width of the projection.
heightnumber The height of the projection.
nearnumber The position of the near clipping plane.
farnumber The position of the far clipping plane.

Returns

NameTypeDescription
selfMat4 The modified matrix.

See also