2.6 KiB
2.6 KiB
Scripting
Project uses LuaJIT as a scripting language.
Subsections:
- Engine events
- User input
- Filesystem and serialization
- UI properties and methods
- Entities and components
- Libraries
- Module core:bit_converter
- Module core:data_buffer
- Module core:vector2, core:vector3
Type annotations
The documentation for Lua libraries uses type annotations, not part of Lua syntax.
- vector - an array of three or four numbers
- vec2 - array of two numbers
- vec3 - array of three numbers
- vec4 - array of four numbers
- quat - array of four numbers - quaternion
- matrix - array of 16 numbers - matrix
Core functions
require "packid:module_name" -- load Lua module from pack-folder/modules/
-- no extension included, just name