diff --git a/library/love/audio.lua b/library/love/audio.lua index 13a08f02..1978e63e 100644 --- a/library/love/audio.lua +++ b/library/love/audio.lua @@ -15,7 +15,7 @@ love.audio = {} --- ---[Open in Browser](https://love2d.org/wiki/love.audio.getActiveEffects) --- ----@return string[] effects # The list of the names of the currently enabled effects. +---@return table effects # The list of the names of the currently enabled effects. function love.audio.getActiveEffects() end --- @@ -79,12 +79,12 @@ function love.audio.getMaxSourceEffects() end --- ---[Open in Browser](https://love2d.org/wiki/love.audio.getOrientation) --- ----@return number fx # Forward x of the listener orientation. ----@return number fy # Forward y of the listener orientation. ----@return number fz # Forward z of the listener orientation. ----@return number ux # Up x of the listener orientation. ----@return number uy # Up y of the listener orientation. ----@return number uz # Up z of the listener orientation. +---@return number fx # Forward vector of the listener orientation. +---@return number fy # Forward vector of the listener orientation. +---@return number fz # Forward vector of the listener orientation. +---@return number ux # Up vector of the listener orientation. +---@return number uy # Up vector of the listener orientation. +---@return number uz # Up vector of the listener orientation. function love.audio.getOrientation() end --- @@ -108,7 +108,7 @@ function love.audio.getPosition() end --- ---[Open in Browser](https://love2d.org/wiki/love.audio.getRecordingDevices) --- ----@return love.RecordingDevice[] devices # The list of connected recording devices. +---@return table devices # The list of connected recording devices. function love.audio.getRecordingDevices() end --- @@ -178,7 +178,7 @@ function love.audio.newSource(filename, type) end --- ---@overload fun(source: love.Source, ...) ---@overload fun(sources: table) ----@return love.Source[] Sources # A table containing a list of Sources that were paused by this call. +---@return table Sources # A table containing a list of Sources that were paused by this call. function love.audio.pause() end --- @@ -416,7 +416,7 @@ function Source:clone() end --- ---[Open in Browser](https://love2d.org/wiki/Source:getActiveEffects) --- ----@return string[] effects # A list of the source's active effect names. +---@return table effects # A list of the source's active effect names. function Source:getActiveEffects() end --- diff --git a/library/love/filesystem.lua b/library/love/filesystem.lua index 94bfd488..945352df 100644 --- a/library/love/filesystem.lua +++ b/library/love/filesystem.lua @@ -76,7 +76,7 @@ function love.filesystem.getCRequirePath() end --- ---@overload fun(dir: string, callback: function):table ---@param dir string # The directory. ----@return string[] files # A sequence with the names of all files and subdirectories as strings. +---@return table files # A sequence with the names of all files and subdirectories as strings. function love.filesystem.getDirectoryItems(dir) end --- diff --git a/library/love/graphics.lua b/library/love/graphics.lua index 3ac2545d..e428b96c 100644 --- a/library/love/graphics.lua +++ b/library/love/graphics.lua @@ -945,12 +945,14 @@ function love.graphics.present() end --- ---[Open in Browser](https://love2d.org/wiki/love.graphics.print) --- ----@overload fun(coloredtext: table, x?: number, y?: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(text: string, transform: love.Transform) ----@overload fun(coloredtext: table, transform: love.Transform) ---@overload fun(text: string, font: love.Font, transform: love.Transform) +---@overload fun(text: number, transform: love.Transform) +---@overload fun(test: number, font: love.Font, transform: love.Transform) +---@overload fun(coloredtext: table, x?: number, y?: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) +---@overload fun(coloredtext: table, transform: love.Transform) ---@overload fun(coloredtext: table, font: love.Font, transform: love.Transform) ----@param text string # The text to draw. +---@param text string|number # The text to draw. ---@param x? number # The position to draw the object (x-axis). ---@param y? number # The position to draw the object (y-axis). ---@param r? number # Orientation (radians). @@ -979,11 +981,14 @@ function love.graphics.print(text, x, y, r, sx, sy, ox, oy, kx, ky) end ---@overload fun(text: string, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(text: string, transform: love.Transform, limit: number, align?: love.AlignMode) ---@overload fun(text: string, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) +---@overload fun(text: number, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) +---@overload fun(text: number, transform: love.Transform, limit: number, align?: love.AlignMode) +---@overload fun(text: number, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) ---@overload fun(coloredtext: table, x: number, y: number, limit: number, align: love.AlignMode, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(coloredtext: table, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(coloredtext: table, transform: love.Transform, limit: number, align?: love.AlignMode) ---@overload fun(coloredtext: table, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) ----@param text string # A text string. +---@param text string|number # A text string. ---@param x number # The position on the x-axis. ---@param y number # The position on the y-axis. ---@param limit number # Wrap the line after this many horizontal pixels. @@ -1438,8 +1443,7 @@ function Canvas:newImageData() end ---[Open in Browser](https://love2d.org/wiki/Canvas:renderTo) --- ---@param func function # A function performing drawing operations. ----@vararg any # Additional arguments to call the function with. -function Canvas:renderTo(func, ...) end +function Canvas:renderTo(func) end --- ---Superclass for all things that can be drawn on screen. This is an abstract type that can't be created directly. @@ -1558,7 +1562,7 @@ function Font:getLineHeight() end --- ---[Open in Browser](https://love2d.org/wiki/Font:getWidth) --- ----@param text string # A string. +---@param text string|number # A string or number. ---@return number width # The width of the text. function Font:getWidth(text) end @@ -1573,7 +1577,7 @@ function Font:getWidth(text) end ---@param text string # The text that will be wrapped. ---@param wraplimit number # The maximum width in pixels of each line that ''text'' is allowed before wrapping. ---@return number width # The maximum width of the wrapped text. ----@return string[] wrappedtext # A sequence containing each line of text that was wrapped. +---@return table wrappedtext # A sequence containing each line of text that was wrapped. function Font:getWrap(text, wraplimit) end --- @@ -1788,7 +1792,7 @@ function Mesh:getVertexFormat() end --- ---[Open in Browser](https://love2d.org/wiki/Mesh:getVertexMap) --- ----@return number[] map # A table containing the list of vertex indices used when drawing. +---@return table map # A table containing the list of vertex indices used when drawing. function Mesh:getVertexMap() end --- @@ -2078,7 +2082,7 @@ function ParticleSystem:getPosition() end --- ---[Open in Browser](https://love2d.org/wiki/ParticleSystem:getQuads) --- ----@return love.Quad[] quads # A table containing the Quads used. +---@return table quads # A table containing the Quads used. function ParticleSystem:getQuads() end --- @@ -2260,13 +2264,20 @@ function ParticleSystem:setBufferSize(size) end --- ---[Open in Browser](https://love2d.org/wiki/ParticleSystem:setColors) --- ----@overload fun(self: love.ParticleSystem, rgba1: table, ...) +---@overload fun(self: love.ParticleSystem, rgba1: table, rgba2: table, rgba8: table) ---@param r1 number # First color, red component (0-1). ---@param g1 number # First color, green component (0-1). ---@param b1 number # First color, blue component (0-1). ---@param a1? number # First color, alpha component (0-1). ----@vararg number # Additional colors. -function ParticleSystem:setColors(r1, g1, b1, a1, ...) end +---@param r2? number # Second color, red component (0-1). +---@param g2? number # Second color, green component (0-1). +---@param b2? number # Second color, blue component (0-1). +---@param a2? number # Second color, alpha component (0-1). +---@param r8? number # Eighth color, red component (0-1). +---@param g8? number # Eighth color, green component (0-1). +---@param b8? number # Eighth color, blue component (0-1). +---@param a8? number # Eighth color, alpha component (0-1). +function ParticleSystem:setColors(r1, g1, b1, a1, r2, g2, b2, a2, r8, g8, b8, a8) end --- ---Sets the direction the particles will be emitted in. @@ -2381,8 +2392,8 @@ function ParticleSystem:setPosition(x, y) end --- ---@overload fun(self: love.ParticleSystem, quads: table) ---@param quad1 love.Quad # The first Quad to use. ----@vararg love.Quad # Additional Quads to use. -function ParticleSystem:setQuads(quad1, ...) end +---@param quad2 love.Quad # The second Quad to use. +function ParticleSystem:setQuads(quad1, quad2) end --- ---Set the radial acceleration (away from the emitter). @@ -2560,8 +2571,8 @@ function Quad:getViewport() end ---@param y number # The top-left corner along the y-axis. ---@param w number # The width of the viewport. ---@param h number # The height of the viewport. ----@param sw? number # Optional new reference width, the width of the Texture. Must be greater than 0 if set. ----@param sh? number # Optional new reference height, the height of the Texture. Must be greater than 0 if set. +---@param sw number # The reference width, the width of the Image. (Must be greater than 0.) +---@param sh number # The reference height, the height of the Image. (Must be greater than 0.) function Quad:setViewport(x, y, w, h, sw, sh) end --- @@ -2652,8 +2663,8 @@ function Shader:send(name, number, ...) end ---[Open in Browser](https://love2d.org/wiki/Shader:sendColor) --- ---@param name string # The name of the color extern variable to send to in the shader. ----@param color number[] # A table with red, green, blue, and optional alpha color components in the range of 1 to send to the extern as a vector. ----@vararg number[] # Additional colors to send in case the extern is an array. All colors need to be of the same size (e.g. only vec3's). +---@param color table # A table with red, green, blue, and optional alpha color components in the range of 1 to send to the extern as a vector. +---@vararg table # Additional colors to send in case the extern is an array. All colors need to be of the same size (e.g. only vec3's). function Shader:sendColor(name, color, ...) end --- diff --git a/library/love/joystick.lua b/library/love/joystick.lua index 9bdd8a97..039674f1 100644 --- a/library/love/joystick.lua +++ b/library/love/joystick.lua @@ -36,7 +36,7 @@ function love.joystick.getJoystickCount() end --- ---[Open in Browser](https://love2d.org/wiki/love.joystick.getJoysticks) --- ----@return love.Joystick[] joysticks # The list of currently connected Joysticks. +---@return table joysticks # The list of currently connected Joysticks. function love.joystick.getJoysticks() end --- diff --git a/library/love/math.lua b/library/love/math.lua index 8fd90c98..48a444e7 100644 --- a/library/love/math.lua +++ b/library/love/math.lua @@ -92,8 +92,8 @@ function love.math.getRandomState() end --- ---[Open in Browser](https://love2d.org/wiki/love.math.isConvex) --- ----@overload fun(x1: number, y1: number, x2: number, y2: number, ...):boolean ----@param vertices number[] # The vertices of the polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. +---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):boolean +---@param vertices table # The vertices of the polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. ---@return boolean convex # Whether the given polygon is convex. function love.math.isConvex(vertices) end @@ -127,8 +127,8 @@ function love.math.linearToGamma(lr, lg, lb) end --- ---[Open in Browser](https://love2d.org/wiki/love.math.newBezierCurve) --- ----@overload fun(x1: number, y1: number, x2: number, y2: number, ...):love.BezierCurve ----@param vertices number[] # The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. +---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):love.BezierCurve +---@param vertices table # The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. ---@return love.BezierCurve curve # A Bézier curve object. function love.math.newBezierCurve(vertices) end @@ -330,7 +330,7 @@ function BezierCurve:removeControlPoint(index) end ---[Open in Browser](https://love2d.org/wiki/BezierCurve:render) --- ---@param depth? number # Number of recursive subdivision steps. ----@return number[] coordinates # List of x,y-coordinate pairs of points on the curve. +---@return table coordinates # List of x,y-coordinate pairs of points on the curve. function BezierCurve:render(depth) end --- @@ -346,7 +346,7 @@ function BezierCurve:render(depth) end ---@param startpoint number # The starting point along the curve. Must be between 0 and 1. ---@param endpoint number # The end of the segment to render. Must be between 0 and 1. ---@param depth? number # Number of recursive subdivision steps. ----@return number[] coordinates # List of x,y-coordinate pairs of points on the specified part of the curve. +---@return table coordinates # List of x,y-coordinate pairs of points on the specified part of the curve. function BezierCurve:renderSegment(startpoint, endpoint, depth) end --- diff --git a/library/love/physics.lua b/library/love/physics.lua index e9118142..a2eebd2f 100644 --- a/library/love/physics.lua +++ b/library/love/physics.lua @@ -491,7 +491,7 @@ function Body:getAngularVelocity() end --- ---[Open in Browser](https://love2d.org/wiki/Body:getContacts) --- ----@return love.Contact[] contacts # A list with all contacts associated with the Body. +---@return table contacts # A list with all contacts associated with the Body. function Body:getContacts() end --- @@ -500,7 +500,7 @@ function Body:getContacts() end --- ---[Open in Browser](https://love2d.org/wiki/Body:getFixtures) --- ----@return love.Fixture[] fixtures # A sequence with all fixtures. +---@return table fixtures # A sequence with all fixtures. function Body:getFixtures() end --- @@ -529,7 +529,7 @@ function Body:getInertia() end --- ---[Open in Browser](https://love2d.org/wiki/Body:getJoints) --- ----@return love.Joint[] joints # A sequence with the Joints attached to the Body. +---@return table joints # A sequence with the Joints attached to the Body. function Body:getJoints() end --- @@ -2989,7 +2989,7 @@ function World:destroy() end --- ---[Open in Browser](https://love2d.org/wiki/World:getBodies) --- ----@return love.Body[] bodies # A sequence with all bodies. +---@return table bodies # A sequence with all bodies. function World:getBodies() end --- @@ -3037,7 +3037,7 @@ function World:getContactFilter() end --- ---[Open in Browser](https://love2d.org/wiki/World:getContacts) --- ----@return love.Contact[] contacts # A sequence with all Contacts. +---@return table contacts # A sequence with all Contacts. function World:getContacts() end --- @@ -3065,7 +3065,7 @@ function World:getJointCount() end --- ---[Open in Browser](https://love2d.org/wiki/World:getJoints) --- ----@return love.Joint[] joints # A sequence with all joints. +---@return table joints # A sequence with all joints. function World:getJoints() end --- diff --git a/library/love/thread.lua b/library/love/thread.lua index 523f593b..0b903080 100644 --- a/library/love/thread.lua +++ b/library/love/thread.lua @@ -118,9 +118,10 @@ function Channel:peek() end ---[Open in Browser](https://love2d.org/wiki/Channel:performAtomic) --- ---@param func function # The function to call, the form of function(channel, arg1, arg2, ...) end. The Channel is passed as the first argument to the function when it is called. +---@param arg1 any # Additional arguments that the given function will receive when it is called. ---@vararg any # Additional arguments that the given function will receive when it is called. ---@return any ret1 # The first return value of the given function (if any.) -function Channel:performAtomic(func, ...) end +function Channel:performAtomic(func, arg1, ...) end --- ---Retrieves the value of a Channel message and removes it from the message queue. diff --git a/library/love/touch.lua b/library/love/touch.lua index a1501bcd..bacf8e30 100644 --- a/library/love/touch.lua +++ b/library/love/touch.lua @@ -36,5 +36,5 @@ function love.touch.getPressure(id) end --- ---[Open in Browser](https://love2d.org/wiki/love.touch.getTouches) --- ----@return lightuserdata[] touches # A list of active touch-press id values, which can be used with love.touch.getPosition. +---@return table touches # A list of active touch-press id values, which can be used with love.touch.getPosition. function love.touch.getTouches() end diff --git a/library/love/window.lua b/library/love/window.lua index 79d9758a..fa72a2a4 100644 --- a/library/love/window.lua +++ b/library/love/window.lua @@ -106,7 +106,7 @@ function love.window.getFullscreen() end ---[Open in Browser](https://love2d.org/wiki/love.window.getFullscreenModes) --- ---@param displayindex? number # The index of the display, if multiple monitors are available. ----@return {width: number, height: number} modes # A table of width/height pairs. (Note that this may not be in order.) +---@return table modes # A table of width/height pairs. (Note that this may not be in order.) function love.window.getFullscreenModes(displayindex) end ---