Lua functions list

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
===3d Math===
+
__NOTOC__
  
 +
{{begin-box|3D Math}}
 
* [[vec3]](x, y, z)
 
* [[vec3]](x, y, z)
 
* [[length]](vec3)
 
* [[length]](vec3)
 
* [[normalize]](vec3)
 
* [[normalize]](vec3)
 
* [[dot]](vecA, vecB)
 
* [[dot]](vecA, vecB)
* [[cross]](vecA, vecB)<br><br>
+
* [[cross]](vecA, vecB)
===Object===
+
{{end-box}}
  
 +
{{begin-box|Object}}
 
* [[getObject]]("name")
 
* [[getObject]]("name")
 
* [[getParent]](object)
 
* [[getParent]](object)
Line 17: Line 19:
 
* [[deactivate]](object)
 
* [[deactivate]](object)
 
* [[isVisible]](object)
 
* [[isVisible]](object)
* [[isActive]](object)<br><br>
+
* [[isActive]](object)
 +
{{vspace}}
 
* [[rotate]](object, {x, y, z}, angle, ''"local"'')
 
* [[rotate]](object, {x, y, z}, angle, ''"local"'')
 
* [[translate]](object, {x, y, z}, ''"local"'')
 
* [[translate]](object, {x, y, z}, ''"local"'')
Line 25: Line 28:
 
* [[setPosition]](object, {x, y, z})
 
* [[setPosition]](object, {x, y, z})
 
* [[setRotation]](object, {x, y, z})
 
* [[setRotation]](object, {x, y, z})
* [[setScale]](object, {x, y, z})<br><br>
+
* [[setScale]](object, {x, y, z})
 +
{{vspace}}
 
* [[getTransformedPosition]](object)
 
* [[getTransformedPosition]](object)
 
* [[getTransformedRotation]](object)
 
* [[getTransformedRotation]](object)
Line 34: Line 38:
 
* [[getTransformedVector]](object)
 
* [[getTransformedVector]](object)
 
* [[updateMatrix]](object)
 
* [[updateMatrix]](object)
* [[getMatrix]](object)<br><br>
+
* [[getMatrix]](object)
 +
{{vspace}}
 
* [[enableShadow]](object, shadow)
 
* [[enableShadow]](object, shadow)
* [[isCastingShadow]](object)<br><br>
+
* [[isCastingShadow]](object)
===Behavior===
+
{{end-box}}
  
 +
{{begin-box|Behavior}}
 
* [[getBehaviorVariable]](object, behaviorId, "variableName")
 
* [[getBehaviorVariable]](object, behaviorId, "variableName")
* [[setBehaviorVariable]](object, behaviorId, "variableName", value)<br><br>
+
* [[setBehaviorVariable]](object, behaviorId, "variableName", value)
===Animation===
+
{{end-box}}
  
 +
{{begin-box|Animation}}
 
* [[getCurrentAnimation]](object)
 
* [[getCurrentAnimation]](object)
 
* [[changeAnimation]](object, animationId)
 
* [[changeAnimation]](object, animationId)
Line 49: Line 56:
 
* [[setAnimationSpeed]](object, speed)
 
* [[setAnimationSpeed]](object, speed)
 
* [[getCurrentFrame]](object)
 
* [[getCurrentFrame]](object)
* [[setCurrentFrame]](object, frame)<br><br>
+
* [[setCurrentFrame]](object, frame)
===Physics===
+
{{end-box}}
  
 +
{{begin-box|Physics}}
 
* [[setGravity]]({x, y, z})
 
* [[setGravity]]({x, y, z})
 
* [[getGravity]]()<br><br>
 
* [[getGravity]]()<br><br>
Line 67: Line 75:
 
* [[setFriction]](object, friction)
 
* [[setFriction]](object, friction)
 
* [[getRestitution]](object)
 
* [[getRestitution]](object)
* [[setRestitution]](object, restitution)<br><br>
+
* [[setRestitution]](object, restitution)
 +
{{vspace}}
 
* [[clearForces]](object)
 
* [[clearForces]](object)
 
* [[addCentralForce]](object, {x, y, z}, ''"local"'')
 
* [[addCentralForce]](object, {x, y, z}, ''"local"'')
Line 76: Line 85:
 
* [[isCollisionBetween]](object1, object2)
 
* [[isCollisionBetween]](object1, object2)
 
* [[getNumCollisions]](object)
 
* [[getNumCollisions]](object)
* [[rayHit]](start, end)<br><br>
+
* [[rayHit]](start, end)
===Inputs===
+
{{end-box}}
  
 +
{{begin-box|Input}}
 
* [[isKeyPressed]]([[Keys|key]])
 
* [[isKeyPressed]]([[Keys|key]])
 
* [[onKeyDown]]([[Keys|key]])
 
* [[onKeyDown]]([[Keys|key]])
Line 86: Line 96:
 
* [[getTouchPosition]](touchId)
 
* [[getTouchPosition]](touchId)
 
* [[getLastTouchPosition]](touchId)
 
* [[getLastTouchPosition]](touchId)
* [[getTouchPhase]](touchId)<br><br>
+
* [[getTouchPhase]](touchId)
===Sound===
+
{{end-box}}
  
 +
{{begin-box|Sound}}
 
* [[playSound]](object)
 
* [[playSound]](object)
 
* [[pauseSound]](object)
 
* [[pauseSound]](object)
 
* [[stopSound]](object)
 
* [[stopSound]](object)
 
* [[getSoundGain]](object)
 
* [[getSoundGain]](object)
* [[setSoundGain]](object, gain)<br><br>
+
* [[setSoundGain]](object, gain)
===Scene===
+
{{end-box}}
  
 +
{{begin-box|Scene}}
 
* [[getScene]]("sceneName")
 
* [[getScene]]("sceneName")
 
* [[changeScene]](scene)
 
* [[changeScene]](scene)
 
* [[getCurrentSceneId]]()
 
* [[getCurrentSceneId]]()
* [[getScenesNumber]]()<br><br>
+
* [[getScenesNumber]]()
===Level===
+
{{end-box}}
  
* [[loadLevel]]("levelName")<br><br>
+
{{begin-box|Level}}
===Light===
+
* [[loadLevel]]("levelName")
 +
{{end-box}}
  
 +
{{begin-box|Light}}
 
* [[getLightColor]](object)
 
* [[getLightColor]](object)
 
* [[getLightRadius]](object)
 
* [[getLightRadius]](object)
Line 120: Line 134:
 
* [[setLightShadowBlur]](object, blur)
 
* [[setLightShadowBlur]](object, blur)
 
* [[setLightSpotAngle]](object, spotAngle)
 
* [[setLightSpotAngle]](object, spotAngle)
* [[setLightSpotExponent]](object, exponent)<br><br>
+
* [[setLightSpotExponent]](object, exponent)
===Camera===
+
{{end-box}}
  
 +
{{begin-box|Camera}}
 
* [[changeCurrentCamera]](object)
 
* [[changeCurrentCamera]](object)
* [[getCurrentCamera]]()<br><br>
+
* [[getCurrentCamera]]()
 +
 
 
* [[getCameraClearColor]](object)
 
* [[getCameraClearColor]](object)
 
* [[getCameraFov]](object)
 
* [[getCameraFov]](object)
Line 138: Line 154:
 
* [[setCameraFogDistance]](object, fogDistance)
 
* [[setCameraFogDistance]](object, fogDistance)
 
* [[enableCameraOrtho]](object, ortho)
 
* [[enableCameraOrtho]](object, ortho)
* [[enableCameraFog]](object, fog)<br><br>
+
* [[enableCameraFog]](object, fog)
 +
{{vspace}}
 
* [[enableCameraLayer]](object, scene)
 
* [[enableCameraLayer]](object, scene)
 
* [[disableCameraLayer]](object)
 
* [[disableCameraLayer]](object)
 
* [[enableRenderToTexture]](object, "textureName", renderWith, renderHeight)
 
* [[enableRenderToTexture]](object, "textureName", renderWith, renderHeight)
* [[disableRenderToTexture]](object)<br><br>
+
* [[disableRenderToTexture]](object)
 +
{{vspace}}
 
* [[getProjectedPoint]](object, point)
 
* [[getProjectedPoint]](object, point)
* [[getUnProjectedPoint]](object, point)<br><br>
+
* [[getUnProjectedPoint]](object, point)
===Text===
+
{{end-box}}
  
 +
{{begin-box|Text}}
 
* [[setText]](object , "text")
 
* [[setText]](object , "text")
 
* [[getText]](object)
 
* [[getText]](object)
 
* [[getTextColor]](object)
 
* [[getTextColor]](object)
* [[setTextColor]](object, {r, g, b, a})<br><br>
+
* [[setTextColor]](object, {r, g, b, a})
===System===
+
{{end-box}}
  
 +
{{begin-box|System}}
 
* [[centerCursor]]()
 
* [[centerCursor]]()
 
* [[hideCursor]]()
 
* [[hideCursor]]()
Line 160: Line 180:
 
* [[quit]]()
 
* [[quit]]()
 
* [[dofile]]("filename.lua")
 
* [[dofile]]("filename.lua")
 +
{{end-box}}
  
 
[[Category:Lua scripting]]
 
[[Category:Lua scripting]]

Revision as of 12:59, 5 February 2014


3D Math

Object

Behavior

Animation

Physics

Input

Sound

Scene

Level

Light

Camera

Text

System

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox