X-Ray16 engine bindings documentation and types.
For usage with TypeScriptToLua.
Module contains xray engine globals typedefs for typescript.
By default x-ray export many bindings that can be used from lua scripts, but without game API documentation.
To check more details / correct typing you always can reference X-Ray source code.
Types documentation can be checked here.
Types are used with xrf template and can be referenced as an example.
For easier navigation over codebase and typing following rules are applied:
C++ classes can be extended in Lua code with 'class' keyword.
Class declaration registers table as userdata and adds constructor/destructor metamethods.
In TS codebase 'LuabindClass' decorator can be used to modify transformation and enable virtual calls.
Separate transformer is needed to build luabind classes instead of table-based classes.
-dump_bindings
flagscriptbindings_*.txt
filesPackage includes plugins for typescript-to-lua for easier work with xray16 typings.
Following ones are available:
Plugins can be included in tsconfig file as following:
{
"tstl": {
"luaPlugins": [
{ "name": "xray16/plugins/transform_luabind_class/plugin" },
{ "name": "xray16/plugins/global_declarations_transform" },
{ "name": "xray16/plugins/built_at_info" },
{ "name": "xray16/plugins/strip_lua_logger" },
{ "name": "xray16/plugins/inject_filename" },
{ "name": "xray16/plugins/from_cast_utils" }
]
}
}
Generated using TypeDoc