Lua functions list

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
  
{{begin-box|3D Math}}
+
{{column-box-begin}}
* [[vec3]](x, y, z)
+
* [[length]](vec3)
+
* [[normalize]](vec3)
+
* [[dot]](vecA, vecB)
+
* [[cross]](vecA, vecB)
+
{{end-box}}
+
  
 
{{begin-box|Object}}
 
{{begin-box|Object}}
* [[getObject]]("name")
+
* [[getObject]]("objectName")
 
* [[getParent]](object)
 
* [[getParent]](object)
 
* [[getChilds]](object)
 
* [[getChilds]](object)
Line 21: Line 15:
 
* [[isActive]](object)
 
* [[isActive]](object)
 
{{vspace}}
 
{{vspace}}
 +
* [[enableShadow]](object, shadow)
 +
* [[isCastingShadow]](object)
 +
{{end-box}}
 +
 +
{{begin-box|Transformation}}
 
* [[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"'')
 +
{{vspace}}
 
* [[getPosition]](object)
 
* [[getPosition]](object)
 
* [[getRotation]](object)
 
* [[getRotation]](object)
Line 37: Line 37:
 
* [[getInverseVector]](object)
 
* [[getInverseVector]](object)
 
* [[getTransformedVector]](object)
 
* [[getTransformedVector]](object)
 +
{{vspace}}
 
* [[updateMatrix]](object)
 
* [[updateMatrix]](object)
 
* [[getMatrix]](object)
 
* [[getMatrix]](object)
{{vspace}}
 
* [[enableShadow]](object, shadow)
 
* [[isCastingShadow]](object)
 
 
{{end-box}}
 
{{end-box}}
  
Line 86: Line 84:
 
* [[getNumCollisions]](object)
 
* [[getNumCollisions]](object)
 
* [[rayHit]](start, end)
 
* [[rayHit]](start, end)
{{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}}
 
{{end-box}}
  
Line 105: Line 92:
 
* [[getSoundGain]](object)
 
* [[getSoundGain]](object)
 
* [[setSoundGain]](object, gain)
 
* [[setSoundGain]](object, gain)
{{end-box}}
 
 
{{begin-box|Scene}}
 
* [[getScene]]("sceneName")
 
* [[changeScene]](scene)
 
* [[getCurrentSceneId]]()
 
* [[getScenesNumber]]()
 
{{end-box}}
 
 
{{begin-box|Level}}
 
* [[loadLevel]]("levelName")
 
 
{{end-box}}
 
{{end-box}}
  
Line 170: Line 146:
 
* [[getTextColor]](object)
 
* [[getTextColor]](object)
 
* [[setTextColor]](object, {r, g, b, a})
 
* [[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}}
 
{{end-box}}
  
Line 181: Line 189:
 
* [[dofile]]("filename.lua")
 
* [[dofile]]("filename.lua")
 
{{end-box}}
 
{{end-box}}
 +
 +
{{column-box-end}}
  
 
[[Category:Lua scripting]]
 
[[Category:Lua scripting]]

Revision as of 13:11, 5 February 2014


Object

Transformation

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

Behavior

Animation

Physics

Sound

Light

Camera

Text

3D Math

Input

Scene

Level

System

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox