|
| 1 | +---@meta |
| 2 | + |
| 3 | +---@class Color |
| 4 | +---@field r number The red component (0-1) |
| 5 | +---@field g number The green component (0-1) |
| 6 | +---@field b number The blue component (0-1) |
| 7 | +---@field a number The alpha component (0-1) |
| 8 | + |
| 9 | +--- Creates a new Color with the specified RGBA components |
| 10 | +---@param r number The red component (0-1) |
| 11 | +---@param g number The green component (0-1) |
| 12 | +---@param b number The blue component (0-1) |
| 13 | +---@param a? number The alpha component (0-1), defaults to 1.0 |
| 14 | +---@return Color |
| 15 | +function Color(r, g, b, a) end |
| 16 | + |
| 17 | +--- Red color (1, 0, 0, 1) |
| 18 | +---@type Color |
| 19 | +Color.red = nil |
| 20 | + |
| 21 | +--- Green color (0, 1, 0, 1) |
| 22 | +---@type Color |
| 23 | +Color.green = nil |
| 24 | + |
| 25 | +--- Blue color (0, 0, 1, 1) |
| 26 | +---@type Color |
| 27 | +Color.blue = nil |
| 28 | + |
| 29 | +--- White color (1, 1, 1, 1) |
| 30 | +---@type Color |
| 31 | +Color.white = nil |
| 32 | + |
| 33 | +--- Black color (0, 0, 0, 1) |
| 34 | +---@type Color |
| 35 | +Color.black = nil |
| 36 | + |
| 37 | +--- Yellow color (1, 1, 0, 1) |
| 38 | +---@type Color |
| 39 | +Color.yellow = nil |
| 40 | + |
| 41 | +--- Cyan color (0, 1, 1, 1) |
| 42 | +---@type Color |
| 43 | +Color.cyan = nil |
| 44 | + |
| 45 | +--- Magenta color (1, 0, 1, 1) |
| 46 | +---@type Color |
| 47 | +Color.magenta = nil |
| 48 | + |
| 49 | +--- Gray color (0.5, 0.5, 0.5, 1) |
| 50 | +---@type Color |
| 51 | +Color.gray = nil |
| 52 | + |
| 53 | +--- Clear color (0, 0, 0, 0) |
| 54 | +---@type Color |
| 55 | +Color.clear = nil |
| 56 | + |
| 57 | +--- Linearly interpolates between two colors |
| 58 | +---@param a Color The starting color |
| 59 | +---@param b Color The target color |
| 60 | +---@param t number The interpolation factor (0-1) |
| 61 | +---@return Color # The interpolated color |
| 62 | +function ColorLerp(a, b, t) end |
| 63 | + |
| 64 | +---@class Vector3 |
| 65 | +---@field x number The x component |
| 66 | +---@field y number The y component |
| 67 | +---@field z number The z component |
| 68 | +---@field magnitude number The length of the vector (read-only) |
| 69 | +---@field sqrMagnitude number The squared length of the vector (read-only) |
| 70 | +---@field normalized Vector3 The normalized version of the vector (read-only) |
| 71 | +---@operator add(Vector3): Vector3 # Adds two vectors together |
| 72 | +---@operator sub(Vector3): Vector3 # Subtracts the second vector from the first |
| 73 | +---@operator mul(number): Vector3 # Multiplies the vector by a scalar |
| 74 | +---@operator div(number): Vector3 # Divides the vector by a scalar |
| 75 | + |
| 76 | +--- Creates a new Vector3 with the specified components |
| 77 | +---@param x number The x component |
| 78 | +---@param y number The y component |
| 79 | +---@param z number The z component |
| 80 | +---@return Vector3 |
| 81 | +function Vector3(x, y, z) end |
| 82 | + |
| 83 | +--- Vector3 with components (0, 0, 0) |
| 84 | +---@type Vector3 |
| 85 | +Vector3.zero = nil |
| 86 | + |
| 87 | +--- Vector3 with components (1, 1, 1) |
| 88 | +---@type Vector3 |
| 89 | +Vector3.one = nil |
| 90 | + |
| 91 | +--- Vector3 pointing up (0, 1, 0) |
| 92 | +---@type Vector3 |
| 93 | +Vector3.up = nil |
| 94 | + |
| 95 | +--- Vector3 pointing down (0, -1, 0) |
| 96 | +---@type Vector3 |
| 97 | +Vector3.down = nil |
| 98 | + |
| 99 | +--- Vector3 pointing left (-1, 0, 0) |
| 100 | +---@type Vector3 |
| 101 | +Vector3.left = nil |
| 102 | + |
| 103 | +--- Vector3 pointing right (1, 0, 0) |
| 104 | +---@type Vector3 |
| 105 | +Vector3.right = nil |
| 106 | + |
| 107 | +--- Vector3 pointing forward (0, 0, 1) |
| 108 | +---@type Vector3 |
| 109 | +Vector3.forward = nil |
| 110 | + |
| 111 | +--- Vector3 pointing backward (0, 0, -1) |
| 112 | +---@type Vector3 |
| 113 | +Vector3.back = nil |
| 114 | + |
| 115 | +--- Returns the distance between two vectors |
| 116 | +---@param a Vector3 The first vector |
| 117 | +---@param b Vector3 The second vector |
| 118 | +---@return number # The distance between the vectors |
| 119 | +function Vector3Distance(a, b) end |
| 120 | + |
| 121 | +--- Linearly interpolates between two vectors |
| 122 | +---@param a Vector3 The starting vector |
| 123 | +---@param b Vector3 The target vector |
| 124 | +---@param t number The interpolation factor (0-1) |
| 125 | +---@return Vector3 # The interpolated vector |
| 126 | +function Vector3Lerp(a, b, t) end |
0 commit comments