Moai SDK
1.5 revision 1 (MoaiEdition)
|
Remove all camera anchors from the fitter.
function clearAnchors ( MOAICameraFitter2D self )
self | ( MOAICameraFitter2D ) |
Clears bits in the fitting mask.
function clearFitMode ( MOAICameraFitter2D self [, number mask ] )
self | ( MOAICameraFitter2D ) |
mask | ( number ) Optional. Default value is FITTING_MODE_MASK |
Returns the distance between the camera's current x, y, scale and the target x, y, scale. As the camera approaches its target, the distance approaches 0. Check the value returned by this function against a small epsilon value.
function getFitDistance ( MOAICameraFitter2D self )
self | ( MOAICameraFitter2D ) |
Get the fitter location.
function getFitLoc ( MOAICameraFitter2D self )
self | ( MOAICameraFitter2D ) |
Gets bits in the fitting mask.
function getFitMode ( MOAICameraFitter2D self )
self | ( MOAICameraFitter2D ) |
Returns the fit scale.
function getFitScale ( MOAICameraFitter2D self )
self | ( MOAICameraFitter2D ) |
Get the target location.
function getTargetLoc ( MOAICameraFitter2D self )
self | ( MOAICameraFitter2D ) |
Returns the target scale.
function getTargetScale ( MOAICameraFitter2D self )
self | ( MOAICameraFitter2D ) |
Add an anchor to the fitter.
function insertAnchor ( MOAICameraFitter2D self, MOAICameraAnchor2D anchor )
self | ( MOAICameraFitter2D ) |
anchor | ( MOAICameraAnchor2D ) |
Remove an anchor from the fitter.
function removeAnchor ( MOAICameraFitter2D self, MOAICameraAnchor2D anchor )
self | ( MOAICameraFitter2D ) |
anchor | ( MOAICameraAnchor2D ) |
Sets or clears the world bounds of the fitter. The camera will not move outside of the fitter's bounds.
function setBounds ( MOAICameraFitter2D self, number xMin, number yMin, number xMax, number yMax )
self | ( MOAICameraFitter2D ) |
xMin | ( number ) |
yMin | ( number ) |
xMax | ( number ) |
yMax | ( number ) |
function setBounds ( MOAICameraFitter2D self )
self | ( MOAICameraFitter2D ) |
Set a MOAITransform for the fitter to use as a camera. The fitter will dynamically change the location and scale of the camera to keep all of the anchors on the screen.
function setCamera ( MOAICameraFitter2D self [, MOAITransform camera ] )
self | ( MOAICameraFitter2D ) |
camera | ( MOAITransform ) Optional. Default value is nil. |
Sets the fitter's damper coefficient. This is a scalar applied to the difference between the camera transform's location and the fitter's target location every frame. The smaller the coefficient, the tighter the fit will be. A value of '0' will not dampen at all; a value of '1' will never move the camera.
function setDamper ( MOAICameraFitter2D self [, number damper ] )
self | ( MOAICameraFitter2D ) |
damper | ( number ) Optional. Default value is 0. |
Set the fitter's location.
function setFitLoc ( MOAICameraFitter2D self [, number x, number y, boolean snap ] )
self | ( MOAICameraFitter2D ) |
x | ( number ) Optional. Default value is 0. |
y | ( number ) Optional. Default value is 0. |
snap | ( boolean ) Optional. Default value is false. |
Sets bits in the fitting mask.
function setFitMode ( MOAICameraFitter2D self [, number mask ] )
self | ( MOAICameraFitter2D ) |
mask | ( number ) Optional. Default value is FITTING_MODE_DEFAULT |
Set the fitter's scale.
function setFitScale ( MOAICameraFitter2D self [, number scale, boolean snap ] )
self | ( MOAICameraFitter2D ) |
scale | ( number ) Optional. Default value is 1. |
snap | ( boolean ) Optional. Default value is false. |
Set the minimum number of world units to be displayed by the camera along either axis.
function setMin ( MOAICameraFitter2D self [, number min ] )
self | ( MOAICameraFitter2D ) |
min | ( number ) Optional. Default value is 0. |
Set the viewport to be used for fitting.
function setViewport ( MOAICameraFitter2D self [, MOAIViewport viewport ] )
self | ( MOAICameraFitter2D ) |
viewport | ( MOAIViewport ) Optional. Default value is nil. |
Snap the camera to the target fitting.
function snapToTarget ( MOAICameraFitter2D self )
self | ( MOAICameraFitter2D ) |
function snapToTarget ( MOAICameraFitter2D self, MOAITransform transform )
self | ( MOAICameraFitter2D ) |
transform | ( MOAITransform ) |