Lua functions list
From MaratisWiki
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) m |
||
Line 5: | Line 5: | ||
{{begin-box|3D Math}} | {{begin-box|3D Math}} | ||
− | * [[vec3]](x, y, z) | + | * <code>'''[[vec3]](x, y, z)'''</code> |
− | * [[length]](vec3) | + | * <code>'''[[length]](vec3)'''</code> |
− | * [[normalize]](vec3) | + | * <code>'''[[normalize]](vec3)'''</code> |
− | * [[dot]](vecA, vecB) | + | * <code>'''[[dot]](vecA, vecB)'''</code> |
− | * [[cross]](vecA, vecB) | + | * <code>'''[[cross]](vecA, vecB)'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Input}} | {{begin-box|Input}} | ||
− | * [[isKeyPressed]]([[Keys|key]]) | + | * <code>'''[[isKeyPressed]]([[Keys|key]])'''</code> |
− | * [[onKeyDown]]([[Keys|key]]) | + | * <code>'''[[onKeyDown]]([[Keys|key]])'''</code> |
− | * [[onKeyUp]]([[Keys|key]]) | + | * <code>'''[[onKeyUp]]([[Keys|key]])'''</code> |
− | * [[getAxis]]([[Axis|axis]]) | + | * <code>'''[[getAxis]]([[Axis|axis]])'''</code> |
− | * [[getProperty]]("propertyName") | + | * <code>'''[[getProperty]]("propertyName")'''</code> |
− | * [[getTouchPosition]](touchId) | + | * <code>'''[[getTouchPosition]](touchId)'''</code> |
− | * [[getLastTouchPosition]](touchId) | + | * <code>'''[[getLastTouchPosition]](touchId)'''</code> |
− | * [[getTouchPhase]](touchId) | + | * <code>'''[[getTouchPhase]](touchId)'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Scene}} | {{begin-box|Scene}} | ||
− | * [[getScene]]("sceneName") | + | * <code>'''[[getScene]]("sceneName")'''</code> |
− | * [[changeScene]](scene) | + | * <code>'''[[changeScene]](scene)'''</code> |
− | * [[getCurrentSceneId]]() | + | * <code>'''[[getCurrentSceneId]]()'''</code> |
− | * [[getScenesNumber]]() | + | * <code>'''[[getScenesNumber]]()'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Level}} | {{begin-box|Level}} | ||
− | * [[loadLevel]]("levelName") | + | * <code>'''[[loadLevel]]("levelName")'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|System}} | {{begin-box|System}} | ||
− | * [[centerCursor]]() | + | * <code>'''[[centerCursor]]()'''</code> |
− | * [[hideCursor]]() | + | * <code>'''[[hideCursor]]()'''</code> |
− | * [[showCursor]]() | + | * <code>'''[[showCursor]]()'''</code> |
− | * [[getWindowScale]]() | + | * <code>'''[[getWindowScale]]()'''</code> |
− | * [[getSystemTick]]() | + | * <code>'''[[getSystemTick]]()'''</code> |
− | * [[quit]]() | + | * <code>'''[[quit]]()'''</code> |
− | * [[dofile]]("filename.lua") | + | * <code>'''[[dofile]]("filename.lua")'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Animation}} | {{begin-box|Animation}} | ||
− | * [[getCurrentAnimation]](object) | + | * <code>'''[[getCurrentAnimation]](object)'''</code> |
− | * [[changeAnimation]](object, animationId) | + | * <code>'''[[changeAnimation]](object, animationId)'''</code> |
− | * [[isAnimationOver]](object) | + | * <code>'''[[isAnimationOver]](object)'''</code> |
− | * [[getAnimationSpeed]](object) | + | * <code>'''[[getAnimationSpeed]](object)'''</code> |
− | * [[setAnimationSpeed]](object, speed) | + | * <code>'''[[setAnimationSpeed]](object, speed)'''</code> |
− | * [[getCurrentFrame]](object) | + | * <code>'''[[getCurrentFrame]](object)'''</code> |
− | * [[setCurrentFrame]](object, frame) | + | * <code>'''[[setCurrentFrame]](object, frame)'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Sound}} | {{begin-box|Sound}} | ||
− | * [[playSound]](object) | + | * <code>'''[[playSound]](object)'''</code> |
− | * [[pauseSound]](object) | + | * <code>'''[[pauseSound]](object)'''</code> |
− | * [[stopSound]](object) | + | * <code>'''[[stopSound]](object)'''</code> |
− | * [[getSoundGain]](object) | + | * <code>'''[[getSoundGain]](object)'''</code> |
− | * [[setSoundGain]](object, gain) | + | * <code>'''[[setSoundGain]](object, gain)'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Text}} | {{begin-box|Text}} | ||
− | * [[setText]](object , "text") | + | * <code>'''[[setText]](object , "text")'''</code> |
− | * [[getText]](object) | + | * <code>'''[[getText]](object)'''</code> |
− | * [[getTextColor]](object) | + | * <code>'''[[getTextColor]](object)'''</code> |
− | * [[setTextColor]](object, {r, g, b, a}) | + | * <code>'''[[setTextColor]](object, {r, g, b, a})'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Camera}} | {{begin-box|Camera}} | ||
− | * [[changeCurrentCamera]](object) | + | * <code>'''[[changeCurrentCamera]](object)'''</code> |
− | * [[getCurrentCamera]]() | + | * <code>'''[[getCurrentCamera]]()'''</code> |
− | * [[getCameraClearColor]](object) | + | * <code>'''[[getCameraClearColor]](object)'''</code> |
− | * [[getCameraFov]](object) | + | * <code>'''[[getCameraFov]](object)'''</code> |
− | * [[getCameraNear]](object) | + | * <code>'''[[getCameraNear]](object)'''</code> |
− | * [[getCameraFar]](object) | + | * <code>'''[[getCameraFar]](object)'''</code> |
− | * [[getCameraFogDistance]](object) | + | * <code>'''[[getCameraFogDistance]](object)'''</code> |
− | * [[isCameraOrtho]](object) | + | * <code>'''[[isCameraOrtho]](object)'''</code> |
− | * [[isCameraFogEnabled]](object) | + | * <code>'''[[isCameraFogEnabled]](object)'''</code> |
− | * [[setCameraClearColor]](object, {r, g, b}) | + | * <code>'''[[setCameraClearColor]](object, {r, g, b})'''</code> |
− | * [[setCameraFov]](object, fov) | + | * <code>'''[[setCameraFov]](object, fov)'''</code> |
− | * [[setCameraNear]](object, near) | + | * <code>'''[[setCameraNear]](object, near)'''</code> |
− | * [[setCameraFar]](object, far) | + | * <code>'''[[setCameraFar]](object, far)'''</code> |
− | * [[setCameraFogDistance]](object, fogDistance) | + | * <code>'''[[setCameraFogDistance]](object, fogDistance)'''</code> |
− | * [[enableCameraOrtho]](object, ortho) | + | * <code>'''[[enableCameraOrtho]](object, ortho)'''</code> |
− | * [[enableCameraFog]](object, fog) | + | * <code>'''[[enableCameraFog]](object, fog)'''</code> |
{{vspace}} | {{vspace}} | ||
− | * [[enableCameraLayer]](object, scene) | + | * <code>'''[[enableCameraLayer]](object, scene)'''</code> |
− | * [[disableCameraLayer]](object) | + | * <code>'''[[disableCameraLayer]](object)'''</code> |
− | * [[enableRenderToTexture]](object, "textureName", renderWith, renderHeight) | + | * <code>'''[[enableRenderToTexture]](object, "textureName", renderWith, renderHeight)'''</code> |
− | * [[disableRenderToTexture]](object) | + | * <code>'''[[disableRenderToTexture]](object)'''</code> |
{{vspace}} | {{vspace}} | ||
− | * [[getProjectedPoint]](object, point) | + | * <code>'''[[getProjectedPoint]](object, point)'''</code> |
− | * [[getUnProjectedPoint]](object, point) | + | * <code>'''[[getUnProjectedPoint]](object, point)'''</code> |
{{end-box}} | {{end-box}} | ||
Line 100: | Line 100: | ||
{{begin-box|Object}} | {{begin-box|Object}} | ||
− | * [[getObject]]("objectName") | + | * <code>'''[[getObject]]("objectName")'''</code> |
− | * [[getParent]](object) | + | * <code>'''[[getParent]](object)'''</code> |
− | * [[getChilds]](object) | + | * <code>'''[[getChilds]](object)'''</code> |
− | * [[getClone]](object) | + | * <code>'''[[getClone]](object)'''</code> |
− | * [[setParent]](object, parent) | + | * <code>'''[[setParent]](object, parent)'''</code> |
− | * [[getName]](object) | + | * <code>'''[[getName]](object)'''</code> |
− | * [[activate]](object) | + | * <code>'''[[activate]](object)'''</code> |
− | * [[deactivate]](object) | + | * <code>'''[[deactivate]](object)'''</code> |
− | * [[isVisible]](object) | + | * <code>'''[[isVisible]](object)'''</code> |
− | * [[isActive]](object) | + | * <code>'''[[isActive]](object)'''</code> |
{{vspace}} | {{vspace}} | ||
− | * [[enableShadow]](object, shadow) | + | * <code>'''[[enableShadow]](object, shadow)'''</code> |
− | * [[isCastingShadow]](object) | + | * <code>'''[[isCastingShadow]](object)'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Transformation}} | {{begin-box|Transformation}} | ||
− | * [[rotate]](object, {x, y, z}, angle, ''"local"'') | + | * <code>'''[[rotate]](object, {x, y, z}, angle, ''"local"'')'''</code> |
− | * [[translate]](object, {x, y, z}, ''"local"'') | + | * <code>'''[[translate]](object, {x, y, z}, ''"local"'')'''</code> |
{{vspace}} | {{vspace}} | ||
− | * [[getPosition]](object) | + | * <code>'''[[getPosition]](object)'''</code> |
− | * [[getRotation]](object) | + | * <code>'''[[getRotation]](object)'''</code> |
− | * [[getScale]](object) | + | * <code>'''[[getScale]](object)'''</code> |
− | * [[setPosition]](object, {x, y, z}) | + | * <code>'''[[setPosition]](object, {x, y, z})'''</code> |
− | * [[setRotation]](object, {x, y, z}) | + | * <code>'''[[setRotation]](object, {x, y, z})'''</code> |
− | * [[setScale]](object, {x, y, z}) | + | * <code>'''[[setScale]](object, {x, y, z})'''</code> |
{{vspace}} | {{vspace}} | ||
− | * [[getTransformedPosition]](object) | + | * <code>'''[[getTransformedPosition]](object)'''</code> |
− | * [[getTransformedRotation]](object) | + | * <code>'''[[getTransformedRotation]](object)'''</code> |
− | * [[getTransformedScale]](object) | + | * <code>'''[[getTransformedScale]](object)'''</code> |
− | * [[getInverseRotatedVector]](object) | + | * <code>'''[[getInverseRotatedVector]](object)'''</code> |
− | * [[getRotatedVector]](object) | + | * <code>'''[[getRotatedVector]](object)'''</code> |
− | * [[getInverseVector]](object) | + | * <code>'''[[getInverseVector]](object)'''</code> |
− | * [[getTransformedVector]](object) | + | * <code>'''[[getTransformedVector]](object)'''</code> |
{{vspace}} | {{vspace}} | ||
− | * [[updateMatrix]](object) | + | * <code>'''[[updateMatrix]](object)'''</code> |
− | * [[getMatrix]](object) | + | * <code>'''[[getMatrix]](object)'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Behavior}} | {{begin-box|Behavior}} | ||
− | * [[getBehaviorVariable]](object, behaviorId, "variableName") | + | * <code>'''[[getBehaviorVariable]](object, behaviorId, "variableName")'''</code> |
− | * [[setBehaviorVariable]](object, behaviorId, "variableName", value) | + | * <code>'''[[setBehaviorVariable]](object, behaviorId, "variableName", value)'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Physics}} | {{begin-box|Physics}} | ||
− | * [[setGravity]]({x, y, z}) | + | * <code>'''[[setGravity]]({x, y, z})'''</code> |
− | * [[getGravity]]()<br><br> | + | * <code>'''[[getGravity]]()'''</code><br><br> |
− | * [[getLinearDamping]](object) | + | * <code>'''[[getLinearDamping]](object)'''</code> |
− | * [[setLinearDamping]](object, damping) | + | * <code>'''[[setLinearDamping]](object, damping)'''</code> |
− | * [[getAngularDamping]](object) | + | * <code>'''[[getAngularDamping]](object)'''</code> |
− | * [[setAngularDamping]](object, damping) | + | * <code>'''[[setAngularDamping]](object, damping)'''</code> |
− | * [[getLinearFactor]](object) | + | * <code>'''[[getLinearFactor]](object)'''</code> |
− | * [[setLinearFactor]](object, {x, y, z}) | + | * <code>'''[[setLinearFactor]](object, {x, y, z})'''</code> |
− | * [[getAngularFactor]](object) | + | * <code>'''[[getAngularFactor]](object)'''</code> |
− | * [[setAngularFactor]](object, factor) | + | * <code>'''[[setAngularFactor]](object, factor)'''</code> |
− | * [[getMass]](object) | + | * <code>'''[[getMass]](object)'''</code> |
− | * [[setMass]](object, mass) | + | * <code>'''[[setMass]](object, mass)'''</code> |
− | * [[getFriction]](object) | + | * <code>'''[[getFriction]](object)'''</code> |
− | * [[setFriction]](object, friction) | + | * <code>'''[[setFriction]](object, friction)'''</code> |
− | * [[getRestitution]](object) | + | * <code>'''[[getRestitution]](object)'''</code> |
− | * [[setRestitution]](object, restitution) | + | * <code>'''[[setRestitution]](object, restitution)'''</code> |
{{vspace}} | {{vspace}} | ||
− | * [[clearForces]](object) | + | * <code>'''[[clearForces]](object)'''</code> |
− | * [[addCentralForce]](object, {x, y, z}, ''"local"'') | + | * <code>'''[[addCentralForce]](object, {x, y, z}, ''"local"'')'''</code> |
− | * [[addTorque]](object, {x, y, z}, ''"local"'') | + | * <code>'''[[addTorque]](object, {x, y, z}, ''"local"'')'''</code> |
− | * [[getCentralForce]](object) | + | * <code>'''[[getCentralForce]](object)'''</code> |
− | * [[getTorque]](object) | + | * <code>'''[[getTorque]](object)'''</code> |
− | * [[isCollisionTest]](object) | + | * <code>'''[[isCollisionTest]](object)'''</code> |
− | * [[isCollisionBetween]](object1, object2) | + | * <code>'''[[isCollisionBetween]](object1, object2)'''</code> |
− | * [[getNumCollisions]](object) | + | * <code>'''[[getNumCollisions]](object)'''</code> |
− | * [[rayHit]](start, end) | + | * <code>'''[[rayHit]](start, end)'''</code> |
{{end-box}} | {{end-box}} | ||
{{begin-box|Light}} | {{begin-box|Light}} | ||
− | * [[getLightColor]](object) | + | * <code>'''[[getLightColor]](object)'''</code> |
− | * [[getLightRadius]](object) | + | * <code>'''[[getLightRadius]](object)'''</code> |
− | * [[getLightIntensity]](object) | + | * <code>'''[[getLightIntensity]](object)'''</code> |
− | * [[getLightShadowQuality]](object) | + | * <code>'''[[getLightShadowQuality]](object)'''</code> |
− | * [[getLightShadowBias]](object) | + | * <code>'''[[getLightShadowBias]](object)'''</code> |
− | * [[getLightShadowBlur]](object) | + | * <code>'''[[getLightShadowBlur]](object)'''</code> |
− | * [[getLightSpotAngle]](object) | + | * <code>'''[[getLightSpotAngle]](object)'''</code> |
− | * [[getLightSpotExponent]](object) | + | * <code>'''[[getLightSpotExponent]](object)'''</code> |
− | * [[setLightColor]](object, {r, g, b}) | + | * <code>'''[[setLightColor]](object, {r, g, b})'''</code> |
− | * [[setLightRadius]](object, radius) | + | * <code>'''[[setLightRadius]](object, radius)'''</code> |
− | * [[setLightIntensity]](object, intensity) | + | * <code>'''[[setLightIntensity]](object, intensity)'''</code> |
− | * [[setLightShadowQuality]](object, quality) | + | * <code>'''[[setLightShadowQuality]](object, quality)'''</code> |
− | * [[setLightShadowBias]](object, bias) | + | * <code>'''[[setLightShadowBias]](object, bias)'''</code> |
− | * [[setLightShadowBlur]](object, blur) | + | * <code>'''[[setLightShadowBlur]](object, blur)'''</code> |
− | * [[setLightSpotAngle]](object, spotAngle) | + | * <code>'''[[setLightSpotAngle]](object, spotAngle)'''</code> |
− | * [[setLightSpotExponent]](object, exponent) | + | * <code>'''[[setLightSpotExponent]](object, exponent)'''</code> |
{{end-box}} | {{end-box}} | ||
Latest revision as of 01:08, 9 February 2014