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