Skip to main content

Scene3DModelRef

A reference to a 3D scene model instance

scene.model.pos.z = -10

Properties

pos

Scene3DModelRef.pos: Vec3

Get/Set the model position

pos_x

Scene3DModelRef.pos_x: number

Get/Set the model x position coordinate

pos_y

Scene3DModelRef.pos_y: number

Get/Set the model y position coordinate

pos_z

Scene3DModelRef.pos_z: number

Get/Set the model z position coordinate

rot

Scene3DModelRef.rot: Vec3

Get/Set the model rotation angles in radians

rot_x

Scene3DModelRef.rot_x: number

Get/Set the model x rotation angle in radians

rot_y

Scene3DModelRef.rot_y: number

Get/Set the model y rotation angle in radians

rot_z

Scene3DModelRef.rot_z: number

Get/Set the model z rotation angle in radians

Functions

clone

Scene3DModelRef:clone() → Scene3DModelRef--

cloned model instance

Clone the model to a new instance

remove

Scene3DModelRef:remove() → ()

Removes the model from all scenes it is attached to

Show raw api
{
    "functions": [
        {
            "name": "clone",
            "desc": "Clone the model to a new instance",
            "params": [],
            "returns": [
                {
                    "desc": "cloned model instance",
                    "lua_type": "Scene3DModelRef"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 16,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "remove",
            "desc": "Removes the model from all scenes it is attached to",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 23,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "pos",
            "desc": "Get/Set the model position",
            "lua_type": "Vec3",
            "source": {
                "line": 31,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "pos_x",
            "desc": "Get/Set the model x position coordinate",
            "lua_type": "number",
            "source": {
                "line": 38,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "pos_y",
            "desc": "Get/Set the model y position coordinate",
            "lua_type": "number",
            "source": {
                "line": 45,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "pos_z",
            "desc": "Get/Set the model z position coordinate",
            "lua_type": "number",
            "source": {
                "line": 52,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "rot",
            "desc": "Get/Set the model rotation angles in radians",
            "lua_type": "Vec3",
            "source": {
                "line": 59,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "rot_x",
            "desc": "Get/Set the model x rotation angle in radians",
            "lua_type": "number",
            "source": {
                "line": 66,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "rot_y",
            "desc": "Get/Set the model y rotation angle in radians",
            "lua_type": "number",
            "source": {
                "line": 73,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "rot_z",
            "desc": "Get/Set the model z rotation angle in radians",
            "lua_type": "number",
            "source": {
                "line": 80,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        }
    ],
    "types": [],
    "name": "Scene3DModelRef",
    "desc": "A reference to a 3D scene model instance\n\n```lua\nscene.model.pos.z = -10\n```",
    "source": {
        "line": 9,
        "path": "../../res/data/script/lib/system/scene3d_model.lua"
    }
}