Show raw api
{
"functions": [
{
"name": "new",
"desc": "Create a new instance\n\nTakes up to 4 numbers or Vec4 instances.\nCan also be a key value table (x/y/z/w or r/g/b/a).\n\n```lua\nv1 = Vec4.new { 1, 2, 3, 4 }\nv2 = Vec4.new { x = 1, y = 2, z = 3, w = 4 }\nv3 = Vec4.new { r = 1, g = 1, b = 1, a = 1 }\n```",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 21,
"path": "../../res/data/script/lib/system/scene3d_vec4.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_vec4.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_vec4.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_vec4.lua"
}
},
{
"name": "w",
"desc": "Get/Set the w component of the vector",
"lua_type": "number",
"source": {
"line": 51,
"path": "../../res/data/script/lib/system/scene3d_vec4.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": 60,
"path": "../../res/data/script/lib/system/scene3d_vec4.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": 69,
"path": "../../res/data/script/lib/system/scene3d_vec4.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": 78,
"path": "../../res/data/script/lib/system/scene3d_vec4.lua"
}
},
{
"name": "a",
"desc": "Get/Set the a component of the vector\n\nThis is the same as the w component.",
"lua_type": "number",
"source": {
"line": 87,
"path": "../../res/data/script/lib/system/scene3d_vec4.lua"
}
}
],
"types": [],
"name": "Vec4",
"desc": "Generic vector class",
"source": {
"line": 5,
"path": "../../res/data/script/lib/system/scene3d_vec4.lua"
}
}