Moai SDK
1.5 revision 1 (MoaiEdition)
|
SUPPRESS_EMPTY_FILE_WARNING clear | |
Remove all props from the layer's partition.
function clear ( MOAILayer2D self )
self | ( MOAILayer2D ) |
Computes a camera fitting for a given world rect along with an optional screen space padding. To do a fitting, compute the world rect based on whatever you are fitting to, use this method to get the fitting, then animate the camera to match.
function getFitting ( MOAILayer2D self, number xMin, number yMin, number xMax, number yMax [, number xPad, number yPad ] )
self | ( MOAILayer2D ) |
xMin | ( number ) |
yMin | ( number ) |
xMax | ( number ) |
yMax | ( number ) |
xPad | ( number ) Optional. |
yPad | ( number ) Optional. |
Returns the partition (if any) currently attached to this layer.
function getPartition ( MOAILayer2D self )
self | ( MOAILayer2D ) |
Get the sort mode for rendering.
function getSortMode ( MOAILayer2D self )
self | ( MOAILayer2D ) |
Return the scalar applied to axis sorts.
function getSortScale ( MOAILayer2D self )
self | ( MOAILayer2D ) |
Adds a prop to the layer's partition.
function insertProp ( MOAILayer2D self, MOAIProp prop )
self | ( MOAILayer2D ) |
prop | ( MOAIProp ) |
Removes a prop from the layer's partition.
function removeProp ( MOAILayer2D self, MOAIProp prop )
self | ( MOAILayer2D ) |
prop | ( MOAIProp ) |
Sets a Box2D world for debug drawing.
function setBox2DWorld ( MOAILayer2D self, MOAIBox2DWorld world )
self | ( MOAILayer2D ) |
world | ( MOAIBox2DWorld ) |
Sets a camera for the layer. If no camera is supplied, layer will render using the identity matrix as view/proj.
function setCamera ( MOAILayer2D self [, MOAICamera2D camera ] )
self | ( MOAILayer2D ) |
camera | ( MOAICamera2D ) Optional. Default value is nil. |
function setCamera ( MOAILayer2D self [, MOAICamera camera ] )
self | ( MOAILayer2D ) |
camera | ( MOAICamera ) Optional. Default value is nil. |
Sets a Chipmunk space for debug drawing.
function setCpSpace ( MOAILayer2D self, MOAICpSpace space )
self | ( MOAILayer2D ) |
space | ( MOAICpSpace ) |
Attach a frame buffer. Layer will render to frame buffer instead of the main view.
function setFrameBuffer ( MOAILayer2D self, MOAIFrameBufferTexture frameBuffer )
self | ( MOAILayer2D ) |
frameBuffer | ( MOAIFrameBufferTexture ) |
Sets the parallax scale for this layer. This is simply a scalar applied to the view transform before rendering.
function setParallax ( MOAILayer2D self, number xParallax, number yParallax )
self | ( MOAILayer2D ) |
xParallax | ( number ) Default value is 1. |
yParallax | ( number ) Default value is 1. |
Sets a partition for the layer to use. The layer will automatically create a partition when the first prop is added if no partition has been set.
function setPartition ( MOAILayer2D self, MOAIPartition partition )
self | ( MOAILayer2D ) |
partition | ( MOAIPartition ) |
Set the sort mode for rendering.
function setSortMode ( MOAILayer2D self, number sortMode )
self | ( MOAILayer2D ) |
sortMode | ( number ) One of MOAILayer2D.SORT_NONE, MOAILayer2D.SORT_PRIORITY_ASCENDING, MOAILayer2D.SORT_PRIORITY_DESCENDING, MOAILayer2D.SORT_X_ASCENDING, MOAILayer2D.SORT_X_DESCENDING, MOAILayer2D.SORT_Y_ASCENDING, MOAILayer2D.SORT_Y_DESCENDING |
Set the scalar applied to axis sorts.
function setSortScale ( MOAILayer2D self [, number x, number y, number priority ] )
self | ( MOAILayer2D ) |
x | ( number ) Optional. Default value is 0. |
y | ( number ) Optional. Default value is 0. |
priority | ( number ) Optional. Default value is 1. |
Set the layer's viewport.
function setViewport ( MOAILayer2D self, MOAIViewport viewport )
self | ( MOAILayer2D ) |
viewport | ( MOAIViewport ) |
Display debug lines for props in this layer.
function showDebugLines ( MOAILayer2D self [, boolean showDebugLines ] )
self | ( MOAILayer2D ) |
showDebugLines | ( boolean ) Optional. Default value is 'true'. |
Project a point from window space into world space.
function wndToWorld ( MOAILayer2D self, number x, number y )
self | ( MOAILayer2D ) |
x | ( number ) |
y | ( number ) |
Transform a point from world space to window space.
function worldToWnd ( MOAILayer2D self, number x, number y )
self | ( MOAILayer2D ) |
x | ( number ) |
y | ( number ) |