Show raw api
{
"functions": [
{
"name": "new",
"desc": "Creates a new scene",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Scene3DRef"
}
],
"function_type": "static",
"source": {
"line": 18,
"path": "../../res/data/script/lib/system/scene3d.lua"
}
},
{
"name": "model",
"desc": "Create a new model\n\nCurrent supported file formats:\n- .obj/.mtl (specify the path to the .obj file)\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| path | string | - | model file path |",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [
{
"desc": "",
"lua_type": "Scene3DModelRef"
}
],
"function_type": "static",
"source": {
"line": 44,
"path": "../../res/data/script/lib/system/scene3d.lua"
}
},
{
"name": "axes",
"desc": "Create new axes\n\nUseful for debugging purposes.\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| length | number | 5000 | axes line length |",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [
{
"desc": "",
"lua_type": "Scene3DModelRef"
}
],
"function_type": "static",
"source": {
"line": 61,
"path": "../../res/data/script/lib/system/scene3d.lua"
}
},
{
"name": "triangle",
"desc": "Create a new triangle face\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| vertices | table | - | list of vertices (3x Vec3) |\n| colors | table | - | list of colors (3x Vec3) |\n| back | bool | true | add the back side face |",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [
{
"desc": "",
"lua_type": "Scene3DModelRef"
}
],
"function_type": "static",
"source": {
"line": 78,
"path": "../../res/data/script/lib/system/scene3d.lua"
}
},
{
"name": "quad",
"desc": "Create a new quad face\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| vertices | table | - | list of vertices (4x Vec3) |\n| colors | table | - | list of colors (4x Vec3) |\n| back | bool | true | add the back side face |",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [
{
"desc": "",
"lua_type": "Scene3DModelRef"
}
],
"function_type": "static",
"source": {
"line": 95,
"path": "../../res/data/script/lib/system/scene3d.lua"
}
}
],
"properties": [
{
"name": "last",
"desc": "Get the last created scene instance.\n\nThis is useful when using the in-game lua console for debugging.",
"lua_type": "Scene3DRef",
"source": {
"line": 29,
"path": "../../res/data/script/lib/system/scene3d.lua"
}
}
],
"types": [],
"name": "Scene3D",
"desc": "The 3D scene interface\n\n```lua\nscene = Scene3D.new()\nscene.add_model(Scene3D.axes { length = 1000 })\nscene.control = true\n```",
"source": {
"line": 11,
"path": "../../res/data/script/lib/system/scene3d.lua"
}
}