Show raw api
{
"functions": [
{
"name": "new",
"desc": "Create a new instance\n\nTakes up to 3 numbers or Vec3 instances.\nCan also be a key value table (x/y/z or r/g/b).\n\n```lua\nv1 = Vec3.new { 1, 2, 3 }\nv2 = Vec3.new { x = 1, y = 2, z = 3 }\nv3 = Vec3.new { r = 1, g = 1, b = 1 }\n```",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 21,
"path": "../../res/data/script/lib/system/scene3d_vec3.lua"
}
}
],
"properties": [
{
"name": "x",
"desc": "Get/Set the x component of the vector",
"lua_type": "number",
"source": {
"line": 30,
"path": "../../res/data/script/lib/system/scene3d_vec3.lua"
}
},
{
"name": "y",
"desc": "Get/Set the y component of the vector",
"lua_type": "number",
"source": {
"line": 37,
"path": "../../res/data/script/lib/system/scene3d_vec3.lua"
}
},
{
"name": "z",
"desc": "Get/Set the z component of the vector",
"lua_type": "number",
"source": {
"line": 44,
"path": "../../res/data/script/lib/system/scene3d_vec3.lua"
}
},
{
"name": "r",
"desc": "Get/Set the r component of the vector\n\nThis is the same as the x component.",
"lua_type": "number",
"source": {
"line": 53,
"path": "../../res/data/script/lib/system/scene3d_vec3.lua"
}
},
{
"name": "g",
"desc": "Get/Set the g component of the vector\n\nThis is the same as the y component.",
"lua_type": "number",
"source": {
"line": 62,
"path": "../../res/data/script/lib/system/scene3d_vec3.lua"
}
},
{
"name": "b",
"desc": "Get/Set the b component of the vector\n\nThis is the same as the z component.",
"lua_type": "number",
"source": {
"line": 71,
"path": "../../res/data/script/lib/system/scene3d_vec3.lua"
}
}
],
"types": [],
"name": "Vec3",
"desc": "Generic vector class",
"source": {
"line": 5,
"path": "../../res/data/script/lib/system/scene3d_vec3.lua"
}
}