Skip to main content

Scene3DCameraRef

A reference to a 3D scene camera instance

scene.camera.pos = { 1, 2, 3 }
scene.camera.fov = 125

Properties

pos

Scene3DCameraRef.pos: Vec3

Get/Set the camera position

pos_x

Scene3DCameraRef.pos_x: number

Get/Set the camera x position coordinate

pos_y

Scene3DCameraRef.pos_y: number

Get/Set the camera y position coordinate

pos_z

Scene3DCameraRef.pos_z: number

Get/Set the camera z position coordinate

dir

Scene3DCameraRef.dir: Vec3

Get/Set the camera direction angles in radians

dir_x

Scene3DCameraRef.dir_x: number

Get/Set the camera x direction angle in radians

dir_y

Scene3DCameraRef.dir_y: number

Get/Set the camera y direction angle in radians

dir_z

Scene3DCameraRef.dir_z: number

Get/Set the camera z direction angle in radians

near

Scene3DCameraRef.near: number

Get/Set the near plane distance

far

Scene3DCameraRef.far: number

Get/Set the far plane distance

aspect

Scene3DCameraRef.aspect: number

Get/Set the aspect ration (width by height)

fov

Scene3DCameraRef.fov: number

Get/Set the field of view angle in degrees

clip_z

Scene3DCameraRef.clip_z: number

Get/Set the z clipping distance to the near plane

Show raw api
{
    "functions": [],
    "properties": [
        {
            "name": "pos",
            "desc": "Get/Set the camera position",
            "lua_type": "Vec3",
            "source": {
                "line": 18,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "pos_x",
            "desc": "Get/Set the camera x position coordinate",
            "lua_type": "number",
            "source": {
                "line": 25,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "pos_y",
            "desc": "Get/Set the camera y position coordinate",
            "lua_type": "number",
            "source": {
                "line": 32,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "pos_z",
            "desc": "Get/Set the camera z position coordinate",
            "lua_type": "number",
            "source": {
                "line": 39,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "dir",
            "desc": "Get/Set the camera direction angles in radians",
            "lua_type": "Vec3",
            "source": {
                "line": 46,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "dir_x",
            "desc": "Get/Set the camera x direction angle in radians",
            "lua_type": "number",
            "source": {
                "line": 53,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "dir_y",
            "desc": "Get/Set the camera y direction angle in radians",
            "lua_type": "number",
            "source": {
                "line": 60,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "dir_z",
            "desc": "Get/Set the camera z direction angle in radians",
            "lua_type": "number",
            "source": {
                "line": 67,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "near",
            "desc": "Get/Set the near plane distance",
            "lua_type": "number",
            "source": {
                "line": 74,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "far",
            "desc": "Get/Set the far plane distance",
            "lua_type": "number",
            "source": {
                "line": 81,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "aspect",
            "desc": "Get/Set the aspect ration (width by height)",
            "lua_type": "number",
            "source": {
                "line": 88,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "fov",
            "desc": "Get/Set the field of view angle in degrees",
            "lua_type": "number",
            "source": {
                "line": 95,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        },
        {
            "name": "clip_z",
            "desc": "Get/Set the z clipping distance to the near plane",
            "lua_type": "number",
            "source": {
                "line": 102,
                "path": "../../res/data/script/lib/system/scene3d_camera.lua"
            }
        }
    ],
    "types": [],
    "name": "Scene3DCameraRef",
    "desc": "A reference to a 3D scene camera instance\n\n```lua\nscene.camera.pos = { 1, 2, 3 }\nscene.camera.fov = 125\n```",
    "source": {
        "line": 10,
        "path": "../../res/data/script/lib/system/scene3d_camera.lua"
    }
}