Lua functions list
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | + | __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) | + | * [[cross]](vecA, vecB) |
− | + | {{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) | + | * [[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}) | + | * [[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) | + | * [[getMatrix]](object) |
+ | {{vspace}} | ||
* [[enableShadow]](object, shadow) | * [[enableShadow]](object, shadow) | ||
− | * [[isCastingShadow]](object) | + | * [[isCastingShadow]](object) |
− | + | {{end-box}} | |
+ | {{begin-box|Behavior}} | ||
* [[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) | * [[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) | + | * [[setCurrentFrame]](object, frame) |
− | + | {{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) | + | * [[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) | + | * [[rayHit]](start, end) |
− | + | {{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) | + | * [[getTouchPhase]](touchId) |
− | + | {{end-box}} | |
+ | {{begin-box|Sound}} | ||
* [[playSound]](object) | * [[playSound]](object) | ||
* [[pauseSound]](object) | * [[pauseSound]](object) | ||
* [[stopSound]](object) | * [[stopSound]](object) | ||
* [[getSoundGain]](object) | * [[getSoundGain]](object) | ||
− | * [[setSoundGain]](object, gain) | + | * [[setSoundGain]](object, gain) |
− | + | {{end-box}} | |
+ | {{begin-box|Scene}} | ||
* [[getScene]]("sceneName") | * [[getScene]]("sceneName") | ||
* [[changeScene]](scene) | * [[changeScene]](scene) | ||
* [[getCurrentSceneId]]() | * [[getCurrentSceneId]]() | ||
− | * [[getScenesNumber]]() | + | * [[getScenesNumber]]() |
− | + | {{end-box}} | |
− | * [[loadLevel]]("levelName") | + | {{begin-box|Level}} |
− | + | * [[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) | + | * [[setLightSpotExponent]](object, exponent) |
− | + | {{end-box}} | |
+ | {{begin-box|Camera}} | ||
* [[changeCurrentCamera]](object) | * [[changeCurrentCamera]](object) | ||
− | * [[getCurrentCamera]]() | + | * [[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) | + | * [[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) | + | * [[disableRenderToTexture]](object) |
+ | {{vspace}} | ||
* [[getProjectedPoint]](object, point) | * [[getProjectedPoint]](object, point) | ||
− | * [[getUnProjectedPoint]](object, point) | + | * [[getUnProjectedPoint]](object, point) |
− | + | {{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}) | + | * [[setTextColor]](object, {r, g, b, a}) |
− | + | {{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 11:59, 5 February 2014
3D Math |
Object
|
Behavior
|
Animation
|
Physics
|
Input
|
Sound
|
Scene
|
Level
|
Light
|
Camera
|
Text
|
System
|