Skip to main content

Scene3DRef

A reference to a 3D scene instance

scene = Scene3D.new()

Properties

camera

Scene3DRef.camera: Scene3DCameraRef

light

Scene3DRef.light: Scene3DLightRef

control

Scene3DRef.control: bool

Get/Set the toggle for manual debug camera controls

Functions

project

Scene3DRef:project(
postable--

position vector

) → table | nil

Project a position into screen coordinates

model_add

Scene3DRef:model_add(
modelScene3DModelRef--

model instance

) → ()

Add a model to the scene instance

model_remove

Scene3DRef:model_remove(
modelScene3DModelRef--

model instance

) → ()

Remove a model from the scene instance

Show raw api
{
    "functions": [
        {
            "name": "project",
            "desc": "Project a position into screen coordinates",
            "params": [
                {
                    "name": "pos",
                    "desc": "position vector",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table|nil"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 36,
                "path": "../../res/data/script/lib/system/scene3d_ref.lua"
            }
        },
        {
            "name": "model_add",
            "desc": "Add a model to the scene instance",
            "params": [
                {
                    "name": "model",
                    "desc": "model instance",
                    "lua_type": "Scene3DModelRef"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 44,
                "path": "../../res/data/script/lib/system/scene3d_ref.lua"
            }
        },
        {
            "name": "model_remove",
            "desc": "Remove a model from the scene instance",
            "params": [
                {
                    "name": "model",
                    "desc": "model instance",
                    "lua_type": "Scene3DModelRef"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 52,
                "path": "../../res/data/script/lib/system/scene3d_ref.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "camera",
            "desc": "",
            "lua_type": "Scene3DCameraRef",
            "source": {
                "line": 16,
                "path": "../../res/data/script/lib/system/scene3d_ref.lua"
            }
        },
        {
            "name": "light",
            "desc": "",
            "lua_type": "Scene3DLightRef",
            "source": {
                "line": 22,
                "path": "../../res/data/script/lib/system/scene3d_ref.lua"
            }
        },
        {
            "name": "control",
            "desc": "Get/Set the toggle for manual debug camera controls",
            "lua_type": "bool",
            "source": {
                "line": 29,
                "path": "../../res/data/script/lib/system/scene3d_ref.lua"
            }
        }
    ],
    "types": [],
    "name": "Scene3DRef",
    "desc": "A reference to a 3D scene instance\n\n```lua\nscene = Scene3D.new()\n```",
    "source": {
        "line": 9,
        "path": "../../res/data/script/lib/system/scene3d_ref.lua"
    }
}