VoxelEngine/doc/en/scripting.md
2025-09-16 20:27:35 +03:00

2.6 KiB

Scripting

Project uses LuaJIT as a scripting language.

Subsections:

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