Lua functions list

(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
  
 
{{column-box-begin}}
 
{{column-box-begin}}
 +
 +
{{begin-box|3D Math}}
 +
* [[vec3]](x, y, z)
 +
* [[length]](vec3)
 +
* [[normalize]](vec3)
 +
* [[dot]](vecA, vecB)
 +
* [[cross]](vecA, vecB)
 +
{{end-box}}
 +
 +
{{begin-box|Input}}
 +
* [[isKeyPressed]]([[Keys|key]])
 +
* [[onKeyDown]]([[Keys|key]])
 +
* [[onKeyUp]]([[Keys|key]])
 +
* [[getAxis]]([[Axis|axis]])
 +
* [[getProperty]]("propertyName")
 +
* [[getTouchPosition]](touchId)
 +
* [[getLastTouchPosition]](touchId)
 +
* [[getTouchPhase]](touchId)
 +
{{end-box}}
 +
 +
{{begin-box|Scene}}
 +
* [[getScene]]("sceneName")
 +
* [[changeScene]](scene)
 +
* [[getCurrentSceneId]]()
 +
* [[getScenesNumber]]()
 +
{{end-box}}
 +
 +
{{begin-box|Level}}
 +
* [[loadLevel]]("levelName")
 +
{{end-box}}
 +
 +
{{begin-box|System}}
 +
* [[centerCursor]]()
 +
* [[hideCursor]]()
 +
* [[showCursor]]()
 +
* [[getWindowScale]]()
 +
* [[getSystemTick]]()
 +
* [[quit]]()
 +
* [[dofile]]("filename.lua")
 +
{{end-box}}
 +
 +
{{begin-box|Animation}}
 +
* [[getCurrentAnimation]](object)
 +
* [[changeAnimation]](object, animationId)
 +
* [[isAnimationOver]](object)
 +
* [[getAnimationSpeed]](object)
 +
* [[setAnimationSpeed]](object, speed)
 +
* [[getCurrentFrame]](object)
 +
* [[setCurrentFrame]](object, frame)
 +
{{end-box}}
 +
 +
{{begin-box|Sound}}
 +
* [[playSound]](object)
 +
* [[pauseSound]](object)
 +
* [[stopSound]](object)
 +
* [[getSoundGain]](object)
 +
* [[setSoundGain]](object, gain)
 +
{{end-box}}
 +
 +
{{begin-box|Text}}
 +
* [[setText]](object , "text")
 +
* [[getText]](object)
 +
* [[getTextColor]](object)
 +
* [[setTextColor]](object, {r, g, b, a})
 +
{{end-box}}
 +
 +
{{begin-box|Camera}}
 +
* [[changeCurrentCamera]](object)
 +
* [[getCurrentCamera]]()
 +
 +
* [[getCameraClearColor]](object)
 +
* [[getCameraFov]](object)
 +
* [[getCameraNear]](object)
 +
* [[getCameraFar]](object)
 +
* [[getCameraFogDistance]](object)
 +
* [[isCameraOrtho]](object)
 +
* [[isCameraFogEnabled]](object)
 +
* [[setCameraClearColor]](object, {r, g, b})
 +
* [[setCameraFov]](object, fov)
 +
* [[setCameraNear]](object, near)
 +
* [[setCameraFar]](object, far)
 +
* [[setCameraFogDistance]](object, fogDistance)
 +
* [[enableCameraOrtho]](object, ortho)
 +
* [[enableCameraFog]](object, fog)
 +
{{vspace}}
 +
* [[enableCameraLayer]](object, scene)
 +
* [[disableCameraLayer]](object)
 +
* [[enableRenderToTexture]](object, "textureName", renderWith, renderHeight)
 +
* [[disableRenderToTexture]](object)
 +
{{vspace}}
 +
* [[getProjectedPoint]](object, point)
 +
* [[getUnProjectedPoint]](object, point)
 +
{{end-box}}
 +
 +
{{column-box-breaker}}
  
 
{{begin-box|Object}}
 
{{begin-box|Object}}
Line 45: Line 140:
 
* [[getBehaviorVariable]](object, behaviorId, "variableName")
 
* [[getBehaviorVariable]](object, behaviorId, "variableName")
 
* [[setBehaviorVariable]](object, behaviorId, "variableName", value)
 
* [[setBehaviorVariable]](object, behaviorId, "variableName", value)
{{end-box}}
 
 
{{begin-box|Animation}}
 
* [[getCurrentAnimation]](object)
 
* [[changeAnimation]](object, animationId)
 
* [[isAnimationOver]](object)
 
* [[getAnimationSpeed]](object)
 
* [[setAnimationSpeed]](object, speed)
 
* [[getCurrentFrame]](object)
 
* [[setCurrentFrame]](object, frame)
 
 
{{end-box}}
 
{{end-box}}
  
Line 84: Line 169:
 
* [[getNumCollisions]](object)
 
* [[getNumCollisions]](object)
 
* [[rayHit]](start, end)
 
* [[rayHit]](start, end)
{{end-box}}
 
 
{{begin-box|Sound}}
 
* [[playSound]](object)
 
* [[pauseSound]](object)
 
* [[stopSound]](object)
 
* [[getSoundGain]](object)
 
* [[setSoundGain]](object, gain)
 
 
{{end-box}}
 
{{end-box}}
  
Line 111: Line 188:
 
* [[setLightSpotAngle]](object, spotAngle)
 
* [[setLightSpotAngle]](object, spotAngle)
 
* [[setLightSpotExponent]](object, exponent)
 
* [[setLightSpotExponent]](object, exponent)
{{end-box}}
 
 
{{begin-box|Camera}}
 
* [[changeCurrentCamera]](object)
 
* [[getCurrentCamera]]()
 
 
* [[getCameraClearColor]](object)
 
* [[getCameraFov]](object)
 
* [[getCameraNear]](object)
 
* [[getCameraFar]](object)
 
* [[getCameraFogDistance]](object)
 
* [[isCameraOrtho]](object)
 
* [[isCameraFogEnabled]](object)
 
* [[setCameraClearColor]](object, {r, g, b})
 
* [[setCameraFov]](object, fov)
 
* [[setCameraNear]](object, near)
 
* [[setCameraFar]](object, far)
 
* [[setCameraFogDistance]](object, fogDistance)
 
* [[enableCameraOrtho]](object, ortho)
 
* [[enableCameraFog]](object, fog)
 
{{vspace}}
 
* [[enableCameraLayer]](object, scene)
 
* [[disableCameraLayer]](object)
 
* [[enableRenderToTexture]](object, "textureName", renderWith, renderHeight)
 
* [[disableRenderToTexture]](object)
 
{{vspace}}
 
* [[getProjectedPoint]](object, point)
 
* [[getUnProjectedPoint]](object, point)
 
{{end-box}}
 
 
{{begin-box|Text}}
 
* [[setText]](object , "text")
 
* [[getText]](object)
 
* [[getTextColor]](object)
 
* [[setTextColor]](object, {r, g, b, a})
 
{{end-box}}
 
 
{{column-box-breaker}}
 
 
{{begin-box|3D Math}}
 
* [[vec3]](x, y, z)
 
* [[length]](vec3)
 
* [[normalize]](vec3)
 
* [[dot]](vecA, vecB)
 
* [[cross]](vecA, vecB)
 
{{end-box}}
 
 
{{begin-box|Input}}
 
* [[isKeyPressed]]([[Keys|key]])
 
* [[onKeyDown]]([[Keys|key]])
 
* [[onKeyUp]]([[Keys|key]])
 
* [[getAxis]]([[Axis|axis]])
 
* [[getProperty]]("propertyName")
 
* [[getTouchPosition]](touchId)
 
* [[getLastTouchPosition]](touchId)
 
* [[getTouchPhase]](touchId)
 
{{end-box}}
 
 
{{begin-box|Scene}}
 
* [[getScene]]("sceneName")
 
* [[changeScene]](scene)
 
* [[getCurrentSceneId]]()
 
* [[getScenesNumber]]()
 
{{end-box}}
 
 
{{begin-box|Level}}
 
* [[loadLevel]]("levelName")
 
{{end-box}}
 
 
{{begin-box|System}}
 
* [[centerCursor]]()
 
* [[hideCursor]]()
 
* [[showCursor]]()
 
* [[getWindowScale]]()
 
* [[getSystemTick]]()
 
* [[quit]]()
 
* [[dofile]]("filename.lua")
 
 
{{end-box}}
 
{{end-box}}
  

Revision as of 14:17, 5 February 2014


3D Math

Input

Scene

Level

System

Animation

Sound

Text

Camera

Object

Transformation

  • rotate(object, {x, y, z}, angle, "local")
  • translate(object, {x, y, z}, "local")

Behavior

Physics

Light

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox