Show raw api
{
"functions": [
{
"name": "new",
"desc": "Create a new instance\n\nTakes up to 2 numbers or Vec2 instances.\nCan also be a key value table (x/y).\n\n```lua\nv1 = Vec2.new { 1, 2 }\nv2 = Vec2.new { x = 1, y = 2 }\n```",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 20,
"path": "../../res/data/script/lib/system/scene3d_vec2.lua"
}
}
],
"properties": [
{
"name": "x",
"desc": "Get/Set the x component of the vector",
"lua_type": "number",
"source": {
"line": 29,
"path": "../../res/data/script/lib/system/scene3d_vec2.lua"
}
},
{
"name": "y",
"desc": "Get/Set the y component of the vector",
"lua_type": "number",
"source": {
"line": 36,
"path": "../../res/data/script/lib/system/scene3d_vec2.lua"
}
}
],
"types": [],
"name": "Vec2",
"desc": "Generic vector class",
"source": {
"line": 5,
"path": "../../res/data/script/lib/system/scene3d_vec2.lua"
}
}