2024-01-21 22:39:32 +00:00
|
|
|
--A type map for the luau analyzer
|
2024-01-23 04:28:48 +00:00
|
|
|
type f32 = number
|
2024-01-21 22:39:32 +00:00
|
|
|
|
2024-01-23 04:28:48 +00:00
|
|
|
type struct_Vector2 = {x: f32, y: f32}
|
|
|
|
type struct_Vector3 = struct_Vector2 & {z: f32}
|
|
|
|
type struct_Vector4 = struct_Vector3 & {w: f32}
|
2024-01-21 22:39:32 +00:00
|
|
|
|
2024-01-22 19:19:52 +00:00
|
|
|
export type warn = (message: string) -> ()
|
|
|
|
|
2024-01-22 03:17:30 +00:00
|
|
|
export type Vector2 = {
|
2024-01-23 04:28:48 +00:00
|
|
|
new: (x: f32?, y: f32?) -> struct_Vector2,
|
2024-01-22 03:17:30 +00:00
|
|
|
ONE: struct_Vector2,
|
|
|
|
ZERO: struct_Vector2,
|
|
|
|
NEG_ZERO: struct_Vector2,
|
|
|
|
NEG_ONE: struct_Vector2,
|
|
|
|
NEG_X: struct_Vector2,
|
|
|
|
NEG_Y: struct_Vector2,
|
2024-01-22 01:25:19 +00:00
|
|
|
}
|
2024-01-22 03:17:30 +00:00
|
|
|
export type Vector3 = {
|
2024-01-23 04:28:48 +00:00
|
|
|
new: (x: f32?, y: f32?, z: f32?) -> struct_Vector3,
|
2024-01-22 03:17:30 +00:00
|
|
|
ONE: struct_Vector3,
|
|
|
|
ZERO: struct_Vector3,
|
|
|
|
NEG_ZERO: struct_Vector3,
|
|
|
|
NEG_ONE: struct_Vector3,
|
|
|
|
NEG_X: struct_Vector3,
|
|
|
|
NEG_Y: struct_Vector3,
|
2024-01-22 01:25:19 +00:00
|
|
|
}
|
2024-01-22 03:17:30 +00:00
|
|
|
export type Vector4 = {
|
2024-01-23 04:28:48 +00:00
|
|
|
new: (x: f32?, y: f32?, z: f32?, w: f32?) -> struct_Vector4,
|
2024-01-22 03:17:30 +00:00
|
|
|
ONE: struct_Vector4,
|
|
|
|
ZERO: struct_Vector4,
|
|
|
|
NEG_ZERO: struct_Vector4,
|
|
|
|
NEG_ONE: struct_Vector4,
|
|
|
|
NEG_X: struct_Vector4,
|
|
|
|
NEG_Y: struct_Vector4,
|
2024-01-22 01:25:19 +00:00
|
|
|
}
|
2024-01-21 22:39:32 +00:00
|
|
|
|
2024-01-22 01:25:19 +00:00
|
|
|
local Vector2: Vector2 = Vector2
|
|
|
|
local Vector3: Vector3 = Vector3
|
|
|
|
local Vector4: Vector4 = Vector4
|
2024-01-22 19:19:52 +00:00
|
|
|
local warn: warn = warn
|
2024-01-21 22:39:32 +00:00
|
|
|
|
|
|
|
return {
|
2024-01-22 01:25:19 +00:00
|
|
|
Vector2 = Vector2,
|
|
|
|
Vector3 = Vector3,
|
|
|
|
Vector4 = Vector4,
|
2024-01-22 19:19:52 +00:00
|
|
|
warn = warn
|
2024-01-21 22:39:32 +00:00
|
|
|
}
|