Lua scripting

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
m (External LUA Documentation)
(Lua)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Maratis3D uses LUA as internal scripting language.
+
__NOTOC__ __NOEDITSECTION__
 +
{{begin-box|Welcome to the [http://maratis3d.org Maratis] Scripting Reference|h=2}}
 +
Maratis uses Lua as internal scripting language.
 +
{{end-box}}
  
=== Maratis LUA Documentation: ===
 
* [[Lua functions list|Functions list]]
 
* [[keys|Keys list]]
 
* [[axis|Axis list]]
 
  
=== Code Snippets ===
+
<div style="margin: -3px auto 0.2em; text-align: center; font-size: 95%;">
* [[Lua Hello World example|Hello World]]
+
[[#Functions|Functions]] - [[#Key literals|Key literals]] - [[#Axis literals|Axis literals]] - [[#Lua|Lua]]
* [[Lua object programming example|Object programming]]
+
</div>
  
=== External LUA Documentation ===
+
==Functions==
 +
{{:Lua functions list}}
 +
 
 +
<div style="margin: -3px auto 0.2em; text-align: center; font-size: 95%;">
 +
[[#top|Back to top]] - [[#Functions|Functions]] - [[#Key literals|Key literals]] - [[#Axis literals|Axis literals]] - [[#Lua|Lua]]
 +
</div>
 +
 
 +
==Key literals==
 +
{{:Keys}}
 +
 
 +
<div style="margin: -3px auto 0.2em; text-align: center; font-size: 95%;">
 +
[[#top|Back to top]] - [[#Functions|Functions]] - [[#Key literals|Key literals]] - [[#Axis literals|Axis literals]] - [[#Lua|Lua]]
 +
</div>
 +
 
 +
==Axis literals==
 +
{{:Axis}}
 +
 
 +
<div style="margin: -3px auto 0.2em; text-align: center; font-size: 95%;">
 +
[[#top|Back to top]] - [[#Functions|Functions]] - [[#Key literals|Key literals]] - [[#Axis literals|Axis literals]] - [[#Lua|Lua]]
 +
</div>
 +
 
 +
==Lua==
 +
{{column-box-begin}}
 +
 
 +
{{begin-box|Lua Documentation}}
 
* [http://www.lua.org Lua official website]
 
* [http://www.lua.org Lua official website]
 
* [http://www.lua.org/pil/ Programming in Lua ebook]
 
* [http://www.lua.org/pil/ Programming in Lua ebook]
* [http://coffeeghost.net/2010/11/01/lua-cheat-sheet-for-programmers/ All LUA in one page]
+
* [http://www.lua.org/gems/ Lua Programming Gems ebook]
* [http://www.gammon.com.au/scripts/doc.php?general=lua_syntax LUA syntax overview] by Nick Gammon
+
* [http://coffeeghost.net/2010/11/01/lua-cheat-sheet-for-programmers/ All Lua in one page]
 +
* [http://www.gammon.com.au/scripts/doc.php?general=lua_syntax Lua syntax overview] by Nick Gammon
 +
{{end-box}}
 +
 
 +
{{begin-box|Tools}}
 +
* [http://unknownworlds.com/decoda/download/ Decoda] - Lua IDE and debugger
 +
{{end-box}}
 +
 
 +
{{column-box-breaker}}
 +
 
 +
{{begin-box|Code Snippets}}
 +
* [[Lua Hello World example|Hello World]]
 +
* [[Lua object programming example|Object programming]]
 +
* [[Object Oriented Programming in Maratis]]
 +
* [[Timers]]
 +
{{end-box}}
 +
 
 +
{{column-box-end}}
 +
 
 +
[[Category:Lua scripting]]

Latest revision as of 12:43, 11 February 2014

Welcome to the Maratis Scripting Reference

Maratis uses Lua as internal scripting language.


Functions - Key literals - Axis literals - Lua

Functions

3D Math

Input

Scene

Level

System

Animation

Sound

Text

Camera

Object

Transformation

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

Behavior

Physics

Light


Back to top - Functions - Key literals - Axis literals - Lua

Key literals

Keyboard

  • A to Z
  • 0 to 9
  • F1 to F12
  • BACKSPACE
  • TAB
  • ESCAPE
  • SPACE
  • DELETE
  • ENTER
  • UP
  • DOWN
  • LEFT
  • RIGHT
  • RSHIFT
  • LSHIFT
  • RCONTROL
  • LCONTROL
  • RALT
  • LALT

Mouse

  • MOUSE_BUTTON1
  • MOUSE_BUTTON2
  • MOUSE_BUTTON3

Joystick 1

  • JOY1_BUTTON1
  • JOY1_BUTTON2
  • JOY1_BUTTON3
  • JOY1_BUTTON4
  • JOY1_BUTTON5
  • JOY1_BUTTON6
  • JOY1_BUTTON7
  • JOY1_BUTTON8

Joystick 2

  • JOY2_BUTTON1
  • JOY2_BUTTON2
  • JOY2_BUTTON3
  • JOY2_BUTTON4
  • JOY2_BUTTON5
  • JOY2_BUTTON6
  • JOY2_BUTTON7
  • JOY2_BUTTON8


Back to top - Functions - Key literals - Axis literals - Lua

Axis literals

Accelerometer

  • MOTION_X
  • MOTION_Y
  • MOTION_Z
  • ACCEL_X
  • ACCEL_Y
  • ACCEL_Z
  • GRAVITY_X
  • GRAVITY_Y
  • GRAVITY_Z
  • YAW
  • PITCH
  • ROLL

Mouse

  • MOUSE_X
  • MOUSE_Y

Joystick 1

  • JOY1_X
  • JOY1_Y
  • JOY1_Z
  • JOY1_R
  • JOY1_U
  • JOY1_V

Joystick 2

  • JOY2_X
  • JOY2_Y
  • JOY2_Z
  • JOY2_R
  • JOY2_U
  • JOY2_V


Back to top - Functions - Key literals - Axis literals - Lua

Lua

Lua Documentation

Tools

  • Decoda - Lua IDE and debugger

Code Snippets

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox