diff options
Diffstat (limited to 'meta/3rd/lovr')
-rw-r--r-- | meta/3rd/lovr/library/lovr.data.lua | 10 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.graphics.lua | 48 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.math.lua | 90 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.physics.lua | 6 |
4 files changed, 77 insertions, 77 deletions
diff --git a/meta/3rd/lovr/library/lovr.data.lua b/meta/3rd/lovr/library/lovr.data.lua index aca66f8f..9c34b189 100644 --- a/meta/3rd/lovr/library/lovr.data.lua +++ b/meta/3rd/lovr/library/lovr.data.lua @@ -307,9 +307,9 @@ function Sound:getFrameCount() end --- ---Reads frames from the Sound into a table, Blob, or another Sound. --- ----@overload fun(t: table, count: number, srcOffset: number, dstOffset: number):table, number ----@overload fun(blob: lovr.Blob, count: number, srcOffset: number, dstOffset: number):number ----@overload fun(sound: lovr.Sound, count: number, srcOffset: number, dstOffset: number):number +---@overload fun(self: lovr.Sound, t: table, count: number, srcOffset: number, dstOffset: number):table, number +---@overload fun(self: lovr.Sound, blob: lovr.Blob, count: number, srcOffset: number, dstOffset: number):number +---@overload fun(self: lovr.Sound, sound: lovr.Sound, count: number, srcOffset: number, dstOffset: number):number ---@param count? number # The number of frames to read. If nil, reads as many frames as possible. Compressed sounds will automatically be decoded. @@ -347,8 +347,8 @@ function Sound:isStream() end --- ---Writes frames to the Sound. --- ----@overload fun(blob: lovr.Blob, count: number, dstOffset: number, srcOffset: number):number ----@overload fun(sound: lovr.Sound, count: number, dstOffset: number, srcOffset: number):number +---@overload fun(self: lovr.Sound, blob: lovr.Blob, count: number, dstOffset: number, srcOffset: number):number +---@overload fun(self: lovr.Sound, sound: lovr.Sound, count: number, dstOffset: number, srcOffset: number):number ---@param t table # A table containing frames to write. ---@param count? number # How many frames to write. If nil, writes as many as possible. ---@param dstOffset? number # A frame offset to apply when writing the frames. diff --git a/meta/3rd/lovr/library/lovr.graphics.lua b/meta/3rd/lovr/library/lovr.graphics.lua index 61cf4d5f..788126f7 100644 --- a/meta/3rd/lovr/library/lovr.graphics.lua +++ b/meta/3rd/lovr/library/lovr.graphics.lua @@ -895,7 +895,7 @@ function Font:setLineHeight(lineHeight) end --- ---Sets the pixel density for the Font. Normally, this is in pixels per meter. When rendering to a 2D texture, the units are pixels. --- ----@overload fun() +---@overload fun(self: lovr.Font) ---@param pixelDensity number # The new pixel density. function Font:setPixelDensity(pixelDensity) end @@ -942,9 +942,9 @@ function Material:getTransform() end --- ---Sets a color property for a Material. Different types of colors are supported for different lighting parameters. Colors default to `(1.0, 1.0, 1.0, 1.0)` and are gamma corrected. --- ----@overload fun(r: number, g: number, b: number, a: number) ----@overload fun(colorType: lovr.MaterialColor, hex: number, a: number) ----@overload fun(hex: number, a: number) +---@overload fun(self: lovr.Material, r: number, g: number, b: number, a: number) +---@overload fun(self: lovr.Material, colorType: lovr.MaterialColor, hex: number, a: number) +---@overload fun(self: lovr.Material, hex: number, a: number) ---@param colorType? lovr.MaterialColor # The type of color to set. ---@param r number # The red component of the color. ---@param g number # The green component of the color. @@ -962,7 +962,7 @@ function Material:setScalar(scalarType, x) end --- ---Sets a texture for a Material. Several predefined `MaterialTexture`s are supported. Any texture that is `nil` will use a single white pixel as a fallback. --- ----@overload fun(texture: lovr.Texture) +---@overload fun(self: lovr.Material, texture: lovr.Texture) ---@param textureType? lovr.MaterialTexture # The type of texture to set. ---@param texture lovr.Texture # The texture to apply, or `nil` to use the default. function Material:setTexture(textureType, texture) end @@ -992,8 +992,8 @@ local Mesh = {} --- ---Attaches attributes from another Mesh onto this one. This can be used to share vertex data across multiple meshes without duplicating the data, and can also be used for instanced rendering by using the `divisor` parameter. --- ----@overload fun(mesh: lovr.Mesh, divisor: number, ...) ----@overload fun(mesh: lovr.Mesh, divisor: number, attributes: table) +---@overload fun(self: lovr.Mesh, mesh: lovr.Mesh, divisor: number, ...) +---@overload fun(self: lovr.Mesh, mesh: lovr.Mesh, divisor: number, attributes: table) ---@param mesh lovr.Mesh # The Mesh to attach attributes from. ---@param divisor? number # The attribute divisor for all attached attributes. function Mesh:attachAttributes(mesh, divisor) end @@ -1001,15 +1001,15 @@ function Mesh:attachAttributes(mesh, divisor) end --- ---Detaches attributes that were attached using `Mesh:attachAttributes`. --- ----@overload fun(mesh: lovr.Mesh, ...) ----@overload fun(mesh: lovr.Mesh, attributes: table) +---@overload fun(self: lovr.Mesh, mesh: lovr.Mesh, ...) +---@overload fun(self: lovr.Mesh, mesh: lovr.Mesh, attributes: table) ---@param mesh lovr.Mesh # A Mesh. The names of all of the attributes from this Mesh will be detached. function Mesh:detachAttributes(mesh) end --- ---Draws the contents of the Mesh. --- ----@overload fun(transform: lovr.mat4, instances: number) +---@overload fun(self: lovr.Mesh, transform: lovr.mat4, instances: number) ---@param x? number # The x coordinate to draw the Mesh at. ---@param y? number # The y coordinate to draw the Mesh at. ---@param z? number # The z coordinate to draw the Mesh at. @@ -1068,8 +1068,8 @@ function Mesh:getVertexFormat() end --- ---Returns the current vertex map for the Mesh. The vertex map is a list of indices in the Mesh, allowing the reordering or reuse of vertices. --- ----@overload fun(t: table):table ----@overload fun(blob: lovr.Blob) +---@overload fun(self: lovr.Mesh, t: table):table +---@overload fun(self: lovr.Mesh, blob: lovr.Blob) ---@return table map # The list of indices in the vertex map, or `nil` if no vertex map is set. function Mesh:getVertexMap() end @@ -1096,7 +1096,7 @@ function Mesh:setDrawMode(mode) end --- ---Set the draw range for the Mesh. The draw range is a subset of the vertices of the Mesh that will be drawn. --- ----@overload fun() +---@overload fun(self: lovr.Mesh) ---@param start number # The first vertex that will be drawn. ---@param count number # The number of vertices that will be drawn. function Mesh:setDrawRange(start, count) end @@ -1125,14 +1125,14 @@ function Mesh:setVertexAttribute(index, attribute) end --- ---Often, a vertex map is used to improve performance, since it usually requires less data to specify the index of a vertex than it does to specify all of the data for a vertex. --- ----@overload fun(blob: lovr.Blob, size: number) +---@overload fun(self: lovr.Mesh, blob: lovr.Blob, size: number) ---@param map table # The new vertex map. Each element of the table is an index of a vertex. function Mesh:setVertexMap(map) end --- ---Updates multiple vertices in the Mesh. --- ----@overload fun(blob: lovr.Blob, start: number, count: number) +---@overload fun(self: lovr.Mesh, blob: lovr.Blob, start: number, count: number) ---@param vertices table # The new set of vertices. ---@param start? number # The index of the vertex to start replacing at. ---@param count? number # The number of vertices to replace. If nil, all vertices will be used. @@ -1149,7 +1149,7 @@ local Model = {} --- ---The animation is evaluated at the specified timestamp, and mixed with the current pose of the Model using the alpha value. An alpha value of 1.0 will completely override the pose of the Model with the animation's pose. --- ----@overload fun(index: number, time: number, alpha: number) +---@overload fun(self: lovr.Model, index: number, time: number, alpha: number) ---@param name string # The name of an animation. ---@param time number # The timestamp to evaluate the keyframes at, in seconds. ---@param alpha? number # How much of the animation to mix in, from 0 to 1. @@ -1158,7 +1158,7 @@ function Model:animate(name, time, alpha) end --- ---Draw the Model. --- ----@overload fun(transform: lovr.mat4, instances: number) +---@overload fun(self: lovr.Model, transform: lovr.mat4, instances: number) ---@param x? number # The x coordinate to draw the Model at. ---@param y? number # The y coordinate to draw the Model at. ---@param z? number # The z coordinate to draw the Model at. @@ -1190,7 +1190,7 @@ function Model:getAnimationCount() end --- ---Returns the duration of an animation in the Model, in seconds. --- ----@overload fun(index: number):number +---@overload fun(self: lovr.Model, index: number):number ---@param name string # The name of the animation. ---@return number duration # The duration of the animation, in seconds. function Model:getAnimationDuration(name) end @@ -1207,7 +1207,7 @@ function Model:getAnimationName(index) end --- ---This includes `Texture` objects and other properties like colors, metalness/roughness, and more. --- ----@overload fun(index: number):lovr.Material +---@overload fun(self: lovr.Model, index: number):lovr.Material ---@param name string # The name of the Material to return. ---@return lovr.Material material # The material. function Model:getMaterial(name) end @@ -1241,7 +1241,7 @@ function Model:getNodeName(index) end --- ---Returns the pose of a single node in the Model in a given `CoordinateSpace`. --- ----@overload fun(index: number, space: lovr.CoordinateSpace):number, number, number, number, number, number, number +---@overload fun(self: lovr.Model, index: number, space: lovr.CoordinateSpace):number, number, number, number, number, number, number ---@param name string # The name of the node. ---@param space? lovr.CoordinateSpace # Whether the pose should be returned relative to the node's parent or relative to the root node of the Model. ---@return number x # The x position of the node. @@ -1275,8 +1275,8 @@ function Model:hasJoints() end --- ---The alpha parameter can be used to mix between the node's current pose and the input pose. --- ----@overload fun(index: number, x: number, y: number, z: number, angle: number, ax: number, ay: number, az: number, alpha: number) ----@overload fun() +---@overload fun(self: lovr.Model, index: number, x: number, y: number, z: number, angle: number, ax: number, ay: number, az: number, alpha: number) +---@overload fun(self: lovr.Model) ---@param name string # The name of the node. ---@param x number # The x position. ---@param y number # The y position. @@ -1337,7 +1337,7 @@ function Shader:sendBlock(name, block, access) end --- ---Sends a Texture to a Shader for writing. This is meant to be used with compute shaders and only works with uniforms declared as `image2D`, `imageCube`, `image2DArray`, and `image3D`. The normal `Shader:send` function accepts Textures and should be used most of the time. --- ----@overload fun(name: string, index: number, texture: lovr.Texture, slice: number, mipmap: number, access: lovr.UniformAccess) +---@overload fun(self: lovr.Shader, name: string, index: number, texture: lovr.Texture, slice: number, mipmap: number, access: lovr.UniformAccess) ---@param name string # The name of the image uniform. ---@param texture lovr.Texture # The Texture to assign. ---@param slice? number # The slice of a cube, array, or volume texture to use, or `nil` for all slices. @@ -1399,7 +1399,7 @@ function ShaderBlock:read(name) end --- ---Updates a variable in the ShaderBlock. --- ----@overload fun(blob: lovr.Blob, offset: number, extent: number):number +---@overload fun(self: lovr.ShaderBlock, blob: lovr.Blob, offset: number, extent: number):number ---@param variable string # The name of the variable to update. ---@param value any # The new value of the uniform. function ShaderBlock:send(variable, value) end diff --git a/meta/3rd/lovr/library/lovr.math.lua b/meta/3rd/lovr/library/lovr.math.lua index a5660ec4..9c47ec48 100644 --- a/meta/3rd/lovr/library/lovr.math.lua +++ b/meta/3rd/lovr/library/lovr.math.lua @@ -278,8 +278,8 @@ function Mat4:lookAt(from, to, up) end --- ---Multiplies this matrix by another value. Multiplying by a matrix combines their two transforms together. Multiplying by a vector applies the transformation from the matrix to the vector and returns the vector. --- ----@overload fun(v3: lovr.Vec3):lovr.Vec3 ----@overload fun(v4: lovr.Vec4):lovr.Vec4 +---@overload fun(self: lovr.Mat4, v3: lovr.Vec3):lovr.Vec3 +---@overload fun(self: lovr.Mat4, v4: lovr.Vec4):lovr.Vec4 ---@param n lovr.Mat4 # The matrix. ---@return lovr.Mat4 m # The original matrix, containing the result. function Mat4:mul(n) end @@ -313,7 +313,7 @@ function Mat4:perspective(near, far, fov, aspect) end --- ---Rotates the matrix using a quaternion or an angle/axis rotation. --- ----@overload fun(angle: number, ax: number, ay: number, az: number):lovr.Mat4 +---@overload fun(self: lovr.Mat4, angle: number, ax: number, ay: number, az: number):lovr.Mat4 ---@param q lovr.Quat # The rotation to apply to the matrix. ---@return lovr.Mat4 m # The original matrix. function Mat4:rotate(q) end @@ -321,7 +321,7 @@ function Mat4:rotate(q) end --- ---Scales the matrix. --- ----@overload fun(sx: number, sy: number, sz: number):lovr.Mat4 +---@overload fun(self: lovr.Mat4, sx: number, sy: number, sz: number):lovr.Mat4 ---@param scale lovr.Vec3 # The 3D scale to apply. ---@return lovr.Mat4 m # The original matrix. function Mat4:scale(scale) end @@ -329,11 +329,11 @@ function Mat4:scale(scale) end --- ---Sets the components of the matrix from separate position, rotation, and scale arguments or an existing matrix. --- ----@overload fun(n: lovr.mat4):lovr.Mat4 ----@overload fun(position: lovr.Vec3, scale: lovr.Vec3, rotation: lovr.Quat):lovr.Mat4 ----@overload fun(position: lovr.Vec3, rotation: lovr.Quat):lovr.Mat4 ----@overload fun(...):lovr.Mat4 ----@overload fun(d: number):lovr.Mat4 +---@overload fun(self: lovr.Mat4, n: lovr.mat4):lovr.Mat4 +---@overload fun(self: lovr.Mat4, position: lovr.Vec3, scale: lovr.Vec3, rotation: lovr.Quat):lovr.Mat4 +---@overload fun(self: lovr.Mat4, position: lovr.Vec3, rotation: lovr.Quat):lovr.Mat4 +---@overload fun(self: lovr.Mat4, ...):lovr.Mat4 +---@overload fun(self: lovr.Mat4, d: number):lovr.Mat4 ---@return lovr.Mat4 m # The input matrix. function Mat4:set() end @@ -353,7 +353,7 @@ function Mat4:target(from, to, up) end --- ---Translates the matrix. --- ----@overload fun(x: number, y: number, z: number):lovr.Mat4 +---@overload fun(self: lovr.Mat4, x: number, y: number, z: number):lovr.Mat4 ---@param v lovr.Vec3 # The translation vector. ---@return lovr.Mat4 m # The original matrix. function Mat4:translate(v) end @@ -397,7 +397,7 @@ function Quat:length() end --- ---Multiplies this quaternion by another value. If the value is a quaternion, the rotations in the two quaternions are applied sequentially and the result is stored in the first quaternion. If the value is a vector, then the input vector is rotated by the quaternion and returned. --- ----@overload fun(v3: lovr.vec3):lovr.vec3 +---@overload fun(self: lovr.Quat, v3: lovr.vec3):lovr.vec3 ---@param r lovr.quat # A quaternion to combine with the original. ---@return lovr.quat q # The original quaternion. function Quat:mul(r) end @@ -420,11 +420,11 @@ function Quat:normalize() end --- two vectors. ---- A matrix can be passed in to extract the rotation of the matrix into a quaternion. --- ----@overload fun(r: lovr.quat):lovr.quat ----@overload fun(v: lovr.vec3):lovr.quat ----@overload fun(v: lovr.vec3, u: lovr.vec3):lovr.quat ----@overload fun(m: lovr.mat4):lovr.quat ----@overload fun():lovr.quat +---@overload fun(self: lovr.Quat, r: lovr.quat):lovr.quat +---@overload fun(self: lovr.Quat, v: lovr.vec3):lovr.quat +---@overload fun(self: lovr.Quat, v: lovr.vec3, u: lovr.vec3):lovr.quat +---@overload fun(self: lovr.Quat, m: lovr.mat4):lovr.quat +---@overload fun(self: lovr.Quat):lovr.quat ---@param angle? any # The angle to use for the rotation, in radians. ---@param ax? number # The x component of the axis of rotation. ---@param ay? number # The y component of the axis of rotation. @@ -475,8 +475,8 @@ function RandomGenerator:getState() end --- ---Returns the next uniformly distributed pseudo-random number from the RandomGenerator's sequence. --- ----@overload fun(high: number):number ----@overload fun(low: number, high: number):number +---@overload fun(self: lovr.RandomGenerator, high: number):number +---@overload fun(self: lovr.RandomGenerator, low: number, high: number):number ---@return number x # A pseudo-random number. function RandomGenerator:random() end @@ -491,7 +491,7 @@ function RandomGenerator:randomNormal(sigma, mu) end --- ---Seed the RandomGenerator with a new seed. Each seed will cause the RandomGenerator to produce a unique sequence of random numbers. --- ----@overload fun(low: number, high: number) +---@overload fun(self: lovr.RandomGenerator, low: number, high: number) ---@param seed number # The random seed. function RandomGenerator:setSeed(seed) end @@ -510,7 +510,7 @@ local Vec2 = {} --- ---Adds a vector or a number to the vector. --- ----@overload fun(x: number, y: number):lovr.Vec2 +---@overload fun(self: lovr.Vec2, x: number, y: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector. ---@return lovr.Vec2 v # The original vector. function Vec2:add(u) end @@ -518,7 +518,7 @@ function Vec2:add(u) end --- ---Returns the distance to another vector. --- ----@overload fun(x: number, y: number):number +---@overload fun(self: lovr.Vec2, x: number, y: number):number ---@param u lovr.Vec2 # The vector to measure the distance to. ---@return number distance # The distance to `u`. function Vec2:distance(u) end @@ -526,7 +526,7 @@ function Vec2:distance(u) end --- ---Divides the vector by a vector or a number. --- ----@overload fun(x: number, y: number):lovr.Vec2 +---@overload fun(self: lovr.Vec2, x: number, y: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector to divide the components by. ---@return lovr.Vec2 v # The original vector. function Vec2:div(u) end @@ -534,7 +534,7 @@ function Vec2:div(u) end --- ---Returns the dot product between this vector and another one. --- ----@overload fun(x: number, y: number):number +---@overload fun(self: lovr.Vec2, x: number, y: number):number ---@param u lovr.Vec2 # The vector to compute the dot product with. ---@return number dot # The dot product between `v` and `u`. function Vec2:dot(u) end @@ -548,14 +548,14 @@ function Vec2:length() end --- ---Performs a linear interpolation between this vector and another one, which can be used to smoothly animate between two vectors, based on a parameter value. A parameter value of `0` will leave the vector unchanged, a parameter value of `1` will set the vector to be equal to the input vector, and a value of `.5` will set the components to be halfway between the two vectors. --- ----@overload fun(x: number, y: number):lovr.Vec2 +---@overload fun(self: lovr.Vec2, x: number, y: number):lovr.Vec2 ---@return lovr.Vec2 v # The original vector, containing the new lerped values. function Vec2:lerp() end --- ---Multiplies the vector by a vector or a number. --- ----@overload fun(x: number, y: number):lovr.Vec2 +---@overload fun(self: lovr.Vec2, x: number, y: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector to multiply the components by. ---@return lovr.Vec2 v # The original vector. function Vec2:mul(u) end @@ -569,7 +569,7 @@ function Vec2:normalize() end --- ---Sets the components of the vector, either from numbers or an existing vector. --- ----@overload fun(u: lovr.Vec2):lovr.Vec2 +---@overload fun(self: lovr.Vec2, u: lovr.Vec2):lovr.Vec2 ---@param x? number # The new x value of the vector. ---@param y? number # The new y value of the vector. ---@return lovr.Vec2 v # The input vector. @@ -578,7 +578,7 @@ function Vec2:set(x, y) end --- ---Subtracts a vector or a number from the vector. --- ----@overload fun(x: number, y: number):lovr.Vec2 +---@overload fun(self: lovr.Vec2, x: number, y: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector. ---@return lovr.Vec2 v # The original vector. function Vec2:sub(u) end @@ -599,7 +599,7 @@ local Vec3 = {} --- ---Adds a vector or a number to the vector. --- ----@overload fun(x: number, y: number, z: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector. ---@return lovr.Vec3 v # The original vector. function Vec3:add(u) end @@ -607,7 +607,7 @@ function Vec3:add(u) end --- ---Sets this vector to be equal to the cross product between this vector and another one. The new `v` will be perpendicular to both the old `v` and `u`. --- ----@overload fun(x: number, y: number, z: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 ---@param u lovr.Vec3 # The vector to compute the cross product with. ---@return lovr.Vec3 v # The original vector, with the cross product as its values. function Vec3:cross(u) end @@ -615,7 +615,7 @@ function Vec3:cross(u) end --- ---Returns the distance to another vector. --- ----@overload fun(x: number, y: number, z: number):number +---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):number ---@param u lovr.Vec3 # The vector to measure the distance to. ---@return number distance # The distance to `u`. function Vec3:distance(u) end @@ -623,7 +623,7 @@ function Vec3:distance(u) end --- ---Divides the vector by a vector or a number. --- ----@overload fun(x: number, y: number, z: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector to divide the components by. ---@return lovr.Vec3 v # The original vector. function Vec3:div(u) end @@ -631,7 +631,7 @@ function Vec3:div(u) end --- ---Returns the dot product between this vector and another one. --- ----@overload fun(x: number, y: number, z: number):number +---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):number ---@param u lovr.Vec3 # The vector to compute the dot product with. ---@return number dot # The dot product between `v` and `u`. function Vec3:dot(u) end @@ -645,7 +645,7 @@ function Vec3:length() end --- ---Performs a linear interpolation between this vector and another one, which can be used to smoothly animate between two vectors, based on a parameter value. A parameter value of `0` will leave the vector unchanged, a parameter value of `1` will set the vector to be equal to the input vector, and a value of `.5` will set the components to be halfway between the two vectors. --- ----@overload fun(x: number, y: number, z: number, t: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y: number, z: number, t: number):lovr.Vec3 ---@param u lovr.Vec3 # The vector to lerp towards. ---@param t number # The lerping parameter. ---@return lovr.Vec3 v # The original vector, containing the new lerped values. @@ -654,7 +654,7 @@ function Vec3:lerp(u, t) end --- ---Multiplies the vector by a vector or a number. --- ----@overload fun(x: number, y: number, z: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector to multiply the components by. ---@return lovr.Vec3 v # The original vector. function Vec3:mul(u) end @@ -668,8 +668,8 @@ function Vec3:normalize() end --- ---Sets the components of the vector, either from numbers or an existing vector. --- ----@overload fun(u: lovr.Vec3):lovr.Vec3 ----@overload fun(m: lovr.Mat4):lovr.Vec3 +---@overload fun(self: lovr.Vec3, u: lovr.Vec3):lovr.Vec3 +---@overload fun(self: lovr.Vec3, m: lovr.Mat4):lovr.Vec3 ---@param x? number # The new x value of the vector. ---@param y? number # The new y value of the vector. ---@param z? number # The new z value of the vector. @@ -679,7 +679,7 @@ function Vec3:set(x, y, z) end --- ---Subtracts a vector or a number from the vector. --- ----@overload fun(x: number, y: number, z: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector. ---@return lovr.Vec3 v # The original vector. function Vec3:sub(u) end @@ -701,7 +701,7 @@ local Vec4 = {} --- ---Adds a vector or a number to the vector. --- ----@overload fun(x: number, y: number, z: number, w: number):lovr.Vec4 +---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector. ---@return lovr.Vec4 v # The original vector. function Vec4:add(u) end @@ -709,7 +709,7 @@ function Vec4:add(u) end --- ---Returns the distance to another vector. --- ----@overload fun(x: number, y: number, z: number, w: number):number +---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):number ---@param u lovr.Vec4 # The vector to measure the distance to. ---@return number distance # The distance to `u`. function Vec4:distance(u) end @@ -717,7 +717,7 @@ function Vec4:distance(u) end --- ---Divides the vector by a vector or a number. --- ----@overload fun(x: number, y: number, z: number, w: number):lovr.Vec4 +---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector to divide the components by. ---@return lovr.Vec4 v # The original vector. function Vec4:div(u) end @@ -725,7 +725,7 @@ function Vec4:div(u) end --- ---Returns the dot product between this vector and another one. --- ----@overload fun(x: number, y: number, z: number, w: number):number +---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):number ---@param u lovr.Vec4 # The vector to compute the dot product with. ---@return number dot # The dot product between `v` and `u`. function Vec4:dot(u) end @@ -739,7 +739,7 @@ function Vec4:length() end --- ---Performs a linear interpolation between this vector and another one, which can be used to smoothly animate between two vectors, based on a parameter value. A parameter value of `0` will leave the vector unchanged, a parameter value of `1` will set the vector to be equal to the input vector, and a value of `.5` will set the components to be halfway between the two vectors. --- ----@overload fun(x: number, y: number, z: number, w: number, t: number):lovr.Vec4 +---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number, t: number):lovr.Vec4 ---@param u lovr.Vec4 # The vector to lerp towards. ---@param t number # The lerping parameter. ---@return lovr.Vec4 v # The original vector, containing the new lerped values. @@ -748,7 +748,7 @@ function Vec4:lerp(u, t) end --- ---Multiplies the vector by a vector or a number. --- ----@overload fun(x: number, y: number, z: number, w: number):lovr.Vec4 +---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector to multiply the components by. ---@return lovr.Vec4 v # The original vector. function Vec4:mul(u) end @@ -762,7 +762,7 @@ function Vec4:normalize() end --- ---Sets the components of the vector, either from numbers or an existing vector. --- ----@overload fun(u: lovr.Vec4):lovr.Vec4 +---@overload fun(self: lovr.Vec4, u: lovr.Vec4):lovr.Vec4 ---@param x? number # The new x value of the vector. ---@param y? number # The new y value of the vector. ---@param z? number # The new z value of the vector. @@ -773,7 +773,7 @@ function Vec4:set(x, y, z, w) end --- ---Subtracts a vector or a number from the vector. --- ----@overload fun(x: number, y: number, z: number, w: number):lovr.Vec4 +---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector. ---@return lovr.Vec4 v # The original vector. function Vec4:sub(u) end diff --git a/meta/3rd/lovr/library/lovr.physics.lua b/meta/3rd/lovr/library/lovr.physics.lua index e4b44aba..7fef948b 100644 --- a/meta/3rd/lovr/library/lovr.physics.lua +++ b/meta/3rd/lovr/library/lovr.physics.lua @@ -215,7 +215,7 @@ function Collider:addShape(shape) end --- ---Applies a force to the Collider. --- ----@overload fun(x: number, y: number, z: number, px: number, py: number, pz: number) +---@overload fun(self: lovr.Collider, x: number, y: number, z: number, px: number, py: number, pz: number) ---@param x number # The x component of the force to apply. ---@param y number # The y component of the force to apply. ---@param z number # The z component of the force to apply. @@ -1059,7 +1059,7 @@ function World:getAngularDamping() end --- ---Returns a table of all Colliders in the World. --- ----@overload fun(t: table):table +---@overload fun(self: lovr.World, t: table):table ---@return table colliders # A table of `Collider` objects. function World:getColliders() end @@ -1154,7 +1154,7 @@ function World:newCylinderCollider(x, y, z, radius, length) end --- ---Adds a new Collider to the World with a MeshShape already attached. --- ----@overload fun(model: lovr.Model):lovr.Collider +---@overload fun(self: lovr.World, model: lovr.Model):lovr.Collider ---@param vertices table # The table of vertices in the mesh. Each vertex is a table with 3 numbers. ---@param indices table # A table of triangle indices representing how the vertices are connected in the Mesh. ---@return lovr.Collider collider # The new Collider. |