diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-20 17:20:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-20 17:20:24 +0800 |
commit | 15e011e334099a9c0c6bc34399fb90769600210f (patch) | |
tree | bb05a8349a61d6e19d59c8582b5e9e5a965c336a /meta/3rd | |
parent | 002e0c1673fdc5bd76331aaa1359cbb0925dad2e (diff) | |
download | lua-language-server-15e011e334099a9c0c6bc34399fb90769600210f.zip |
update
Diffstat (limited to 'meta/3rd')
20 files changed, 507 insertions, 796 deletions
diff --git a/meta/3rd/love2d/library/love.audio.lua b/meta/3rd/love2d/library/love.audio.lua index d1580612..cdf2ed05 100644 --- a/meta/3rd/love2d/library/love.audio.lua +++ b/meta/3rd/love2d/library/love.audio.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.audio love.audio = {} @@ -16,7 +18,7 @@ function love.audio.getActiveSourceCount() end --- ---Returns the distance attenuation model. --- ----@return love.audio.DistanceModel model # The current distance model. The default is 'inverseclamped'. +---@return love.DistanceModel model # The current distance model. The default is 'inverseclamped'. function love.audio.getDistanceModel() end --- @@ -47,16 +49,17 @@ function love.audio.getMaxSourceEffects() end --- ---Returns the orientation of the listener. --- ----@return number fx, fy, fz # Forward vector of the listener orientation. ----@return number ux, uy, uz # Up vector 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 --- ---Returns the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. --- ----@return number x # The X position of the listener. ----@return number y # The Y position of the listener. ----@return number z # The Z position of the listener. function love.audio.getPosition() end --- @@ -78,9 +81,6 @@ function love.audio.getSourceCount() end --- ---Returns the velocity of the listener. --- ----@return number x # The X velocity of the listener. ----@return number y # The Y velocity of the listener. ----@return number z # The Z velocity of the listener. function love.audio.getVelocity() end --- @@ -102,7 +102,7 @@ function love.audio.isEffectsSupported() end ---@param bitdepth number # Bits per sample (8 or 16). ---@param channels number # 1 for mono or 2 for stereo. ---@param buffercount number # The number of buffers that can be queued up at any given time with Source:queue. Cannot be greater than 64. A sensible default (~8) is chosen if no value is specified. ----@return love.audio.Source source # The new Source usable with Source:queue. +---@return love.Source source # The new Source usable with Source:queue. function love.audio.newQueueableSource(samplerate, bitdepth, channels, buffercount) end --- @@ -111,8 +111,8 @@ function love.audio.newQueueableSource(samplerate, bitdepth, channels, buffercou ---Sources created from SoundData are always static. --- ---@param filename string # The filepath to the audio file. ----@param type love.audio.SourceType # Streaming or static source. ----@return love.audio.Source source # A new Source that can play the specified audio. +---@param type love.SourceType # Streaming or static source. +---@return love.Source source # A new Source that can play the specified audio. function love.audio.newSource(filename, type) end --- @@ -124,13 +124,13 @@ function love.audio.pause() end --- ---Plays the specified Source. --- ----@param source love.audio.Source # The Source to play. +---@param source love.Source # The Source to play. function love.audio.play(source) end --- ---Sets the distance attenuation model. --- ----@param model love.audio.DistanceModel # The new distance model. +---@param model love.DistanceModel # The new distance model. function love.audio.setDistanceModel(model) end --- @@ -159,25 +159,23 @@ function love.audio.setMixWithSystem(mix) end --- ---Sets the orientation of the listener. --- ----@param fx, fy, fz number # Forward vector of the listener orientation. ----@param ux, uy, uz number # Up vector of the listener orientation. +---@param fx number # Forward vector of the listener orientation. +---@param fy number # Forward vector of the listener orientation. +---@param fz number # Forward vector of the listener orientation. +---@param ux number # Up vector of the listener orientation. +---@param uy number # Up vector of the listener orientation. +---@param uz number # Up vector of the listener orientation. function love.audio.setOrientation(fx, fy, fz, ux, uy, uz) end --- ---Sets the position of the listener, which determines how sounds play. --- ----@param x number # The x position of the listener. ----@param y number # The y position of the listener. ----@param z number # The z position of the listener. -function love.audio.setPosition(x, y, z) end +function love.audio.setPosition() end --- ---Sets the velocity of the listener. --- ----@param x number # The X velocity of the listener. ----@param y number # The Y velocity of the listener. ----@param z number # The Z velocity of the listener. -function love.audio.setVelocity(x, y, z) end +function love.audio.setVelocity() end --- ---Sets the master volume. @@ -190,7 +188,7 @@ function love.audio.setVolume(volume) end --- function love.audio.stop() end ----@class love.audio.RecordingDevice: love.audio.Object +---@class love.RecordingDevice: love.Object local RecordingDevice = {} --- @@ -216,7 +214,7 @@ function RecordingDevice:getChannelCount() end --- ---The internal ring buffer is cleared when this function is called, so calling it again will only get audio recorded after the previous call. If the device's internal ring buffer completely fills up before getData is called, the oldest data that doesn't fit into the buffer will be lost. --- ----@return love.audio.SoundData data # The recorded audio data, or nil if the device isn't recording. +---@return love.SoundData data # The recorded audio data, or nil if the device isn't recording. function RecordingDevice:getData() end --- @@ -256,10 +254,10 @@ function RecordingDevice:start(samplecount, samplerate, bitdepth, channels) end --- ---Stops recording audio from this device. Any sound data currently in the device's buffer will be returned. --- ----@return love.audio.SoundData data # The sound data currently in the device's buffer, or nil if the device wasn't recording. +---@return love.SoundData data # The sound data currently in the device's buffer, or nil if the device wasn't recording. function RecordingDevice:stop() end ----@class love.audio.Source: love.audio.Object +---@class love.Source: love.Object local Source = {} --- @@ -267,7 +265,7 @@ local Source = {} --- ---Static Sources will use significantly less memory and take much less time to be created if Source:clone is used to create them instead of love.audio.newSource, so this method should be preferred when making multiple Sources which play the same sound. --- ----@return love.audio.Source source # The new identical copy of this Source. +---@return love.Source source # The new identical copy of this Source. function Source:clone() end --- @@ -308,15 +306,12 @@ function Source:getCone() end --- ---Gets the direction of the Source. --- ----@return number x # The X part of the direction vector. ----@return number y # The Y part of the direction vector. ----@return number z # The Z part of the direction vector. function Source:getDirection() end --- ---Gets the duration of the Source. For streaming Sources it may not always be sample-accurate, and may return -1 if the duration cannot be determined at all. --- ----@param unit love.audio.TimeUnit # The time unit for the return value. +---@param unit love.TimeUnit # The time unit for the return value. ---@return number duration # The duration of the Source, or -1 if it cannot be determined. function Source:getDuration(unit) end @@ -351,9 +346,6 @@ function Source:getPitch() end --- ---Gets the position of the Source. --- ----@return number x # The X position of the Source. ----@return number y # The Y position of the Source. ----@return number z # The Z position of the Source. function Source:getPosition() end --- @@ -365,15 +357,12 @@ function Source:getRolloff() end --- ---Gets the type of the Source. --- ----@return love.audio.SourceType sourcetype # The type of the source. +---@return love.SourceType sourcetype # The type of the source. function Source:getType() end --- ---Gets the velocity of the Source. --- ----@return number x # The X part of the velocity vector. ----@return number y # The Y part of the velocity vector. ----@return number z # The Z part of the velocity vector. function Source:getVelocity() end --- @@ -423,7 +412,7 @@ function Source:play() end --- ---This method requires the Source to be created via love.audio.newQueueableSource. --- ----@param sounddata love.audio.SoundData # The data to queue. The SoundData's sample rate, bit depth, and channel count must match the Source's. +---@param sounddata love.SoundData # The data to queue. The SoundData's sample rate, bit depth, and channel count must match the Source's. ---@return boolean success # True if the data was successfully queued for playback, false if there were no available buffers to use for queueing. function Source:queue(sounddata) end @@ -431,7 +420,7 @@ function Source:queue(sounddata) end ---Sets the currently playing position of the Source. --- ---@param offset number # The position to seek to. ----@param unit love.audio.TimeUnit # The unit of the position value. +---@param unit love.TimeUnit # The unit of the position value. function Source:seek(offset, unit) end --- @@ -464,10 +453,7 @@ function Source:setCone(innerAngle, outerAngle, outerVolume) end --- ---Sets the direction vector of the Source. A zero vector makes the source non-directional. --- ----@param x number # The X part of the direction vector. ----@param y number # The Y part of the direction vector. ----@param z number # The Z part of the direction vector. -function Source:setDirection(x, y, z) end +function Source:setDirection() end --- ---Applies an audio effect to the Source. @@ -501,10 +487,7 @@ function Source:setPitch(pitch) end --- ---Sets the position of the Source. Please note that this only works for mono (i.e. non-stereo) sound files! --- ----@param x number # The X position of the Source. ----@param y number # The Y position of the Source. ----@param z number # The Z position of the Source. -function Source:setPosition(x, y, z) end +function Source:setPosition() end --- ---Sets whether the Source's position, velocity, direction, and cone angles are relative to the listener, or absolute. @@ -527,10 +510,7 @@ function Source:setRolloff(rolloff) end --- ---This does '''not''' change the position of the Source, but lets the application know how it has to calculate the doppler effect. --- ----@param x number # The X part of the velocity vector. ----@param y number # The Y part of the velocity vector. ----@param z number # The Z part of the velocity vector. -function Source:setVelocity(x, y, z) end +function Source:setVelocity() end --- ---Sets the current volume of the Source. @@ -553,6 +533,6 @@ function Source:stop() end --- ---Gets the currently playing position of the Source. --- ----@param unit love.audio.TimeUnit # The type of unit for the return value. +---@param unit love.TimeUnit # The type of unit for the return value. ---@return number position # The currently playing position of the Source. function Source:tell(unit) end diff --git a/meta/3rd/love2d/library/love.data.lua b/meta/3rd/love2d/library/love.data.lua index d9cfba5f..4cac6c92 100644 --- a/meta/3rd/love2d/library/love.data.lua +++ b/meta/3rd/love2d/library/love.data.lua @@ -1,41 +1,43 @@ +---@meta + ---@class love.data love.data = {} --- ---Compresses a string or data using a specific compression algorithm. --- ----@param container love.data.ContainerType # What type to return the compressed data as. ----@param format love.data.CompressedDataFormat # The format to use when compressing the string. +---@param container love.ContainerType # What type to return the compressed data as. +---@param format love.CompressedDataFormat # The format to use when compressing the string. ---@param rawstring string # The raw (un-compressed) string to compress. ---@param level number # The level of compression to use, between 0 and 9. -1 indicates the default level. The meaning of this argument depends on the compression format being used. ----@return love.data.CompressedData or string compressedData # CompressedData/string which contains the compressed version of rawstring. +---@return love.CompressedData or string compressedData # CompressedData/string which contains the compressed version of rawstring. function love.data.compress(container, format, rawstring, level) end --- ---Decode Data or a string from any of the EncodeFormats to Data or string. --- ----@param container love.data.ContainerType # What type to return the decoded data as. ----@param format love.data.EncodeFormat # The format of the input data. +---@param container love.ContainerType # What type to return the decoded data as. +---@param format love.EncodeFormat # The format of the input data. ---@param sourceString string # The raw (encoded) data to decode. ----@return love.data.ByteData or string decoded # ByteData/string which contains the decoded version of source. +---@return love.ByteData or string decoded # ByteData/string which contains the decoded version of source. function love.data.decode(container, format, sourceString) end --- ---Decompresses a CompressedData or previously compressed string or Data object. --- ----@param container love.data.ContainerType # What type to return the decompressed data as. ----@param compressedData love.data.CompressedData # The compressed data to decompress. ----@return love.data.Data or string decompressedData # Data/string containing the raw decompressed data. +---@param container love.ContainerType # What type to return the decompressed data as. +---@param compressedData love.CompressedData # The compressed data to decompress. +---@return love.Data or string decompressedData # Data/string containing the raw decompressed data. function love.data.decompress(container, compressedData) end --- ---Encode Data or a string to a Data or string in one of the EncodeFormats. --- ----@param container love.data.ContainerType # What type to return the encoded data as. ----@param format love.data.EncodeFormat # The format of the output data. +---@param container love.ContainerType # What type to return the encoded data as. +---@param format love.EncodeFormat # The format of the output data. ---@param sourceString string # The raw data to encode. ---@param linelength number # The maximum line length of the output. Only supported for base64, ignored if 0. ----@return love.data.ByteData or string encoded # ByteData/string which contains the encoded version of source. +---@return love.ByteData or string encoded # ByteData/string which contains the encoded version of source. function love.data.encode(container, format, sourceString, linelength) end --- @@ -50,7 +52,7 @@ function love.data.getPackedSize(format) end --- ---Compute the message digest of a string using a specified hash algorithm. --- ----@param hashFunction love.data.HashFunction # Hash algorithm to use. +---@param hashFunction love.HashFunction # Hash algorithm to use. ---@param string string # String to hash. ---@return string rawdigest # Raw message digest string. function love.data.hash(hashFunction, string) end @@ -61,16 +63,16 @@ function love.data.hash(hashFunction, string) end ---Data:getPointer along with LuaJIT's FFI can be used to manipulate the contents of the ByteData object after it has been created. --- ---@param datastring string # The byte string to copy. ----@return love.data.ByteData bytedata # The new Data object. +---@return love.ByteData bytedata # The new Data object. function love.data.newByteData(datastring) end --- ---Creates a new Data referencing a subsection of an existing Data object. --- ----@param data love.data.Data # The Data object to reference. +---@param data love.Data # The Data object to reference. ---@param offset number # The offset of the subsection to reference, in bytes. ---@param size number # The size in bytes of the subsection to reference. ----@return love.data.Data view # The new Data view. +---@return love.Data view # The new Data view. function love.data.newDataView(data, offset, size) end --- @@ -78,12 +80,11 @@ function love.data.newDataView(data, offset, size) end --- ---This function behaves the same as Lua 5.3's string.pack. --- ----@param container love.data.ContainerType # What type to return the encoded data as. +---@param container love.ContainerType # What type to return the encoded data as. ---@param format string # A string determining how the values are packed. Follows the rules of Lua 5.3's string.pack format strings. ----@param v1 love.data.number or boolean or string # The first value (number, boolean, or string) to serialize. ----@param ... love.data.number or boolean or string # Additional values to serialize. ----@return love.data.Data or string data # Data/string which contains the serialized data. -function love.data.pack(container, format, v1, ...) end +---@param v1 love.number or boolean or string # The first value (number, boolean, or string) to serialize. +---@return love.Data or string data # Data/string which contains the serialized data. +function love.data.pack(container, format, v1) end --- ---Unpacks (deserializes) a byte-string or Data into simple Lua values. @@ -93,19 +94,18 @@ function love.data.pack(container, format, v1, ...) end ---@param format string # A string determining how the values were packed. Follows the rules of Lua 5.3's string.pack format strings. ---@param datastring string # A string containing the packed (serialized) data. ---@param pos number # Where to start reading in the string. Negative values can be used to read relative from the end of the string. ----@return love.data.number or boolean or string v1 # The first value (number, boolean, or string) that was unpacked. ----@return love.data.number or boolean or string ... # Additional unpacked values. +---@return love.number or boolean or string v1 # The first value (number, boolean, or string) that was unpacked. ---@return number index # The index of the first unread byte in the data string. function love.data.unpack(format, datastring, pos) end ----@class love.data.ByteData: love.data.Object, love.data.Data +---@class love.ByteData: love.Object, love.Data local ByteData = {} ----@class love.data.CompressedData: love.data.Data, love.data.Object +---@class love.CompressedData: love.Data, love.Object local CompressedData = {} --- ---Gets the compression format of the CompressedData. --- ----@return love.data.CompressedDataFormat format # The format of the CompressedData. +---@return love.CompressedDataFormat format # The format of the CompressedData. function CompressedData:getFormat() end diff --git a/meta/3rd/love2d/library/love.event.lua b/meta/3rd/love2d/library/love.event.lua index 83f9e536..1dfbbcc5 100644 --- a/meta/3rd/love2d/library/love.event.lua +++ b/meta/3rd/love2d/library/love.event.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.event love.event = {} @@ -9,7 +11,6 @@ function love.event.clear() end --- ---Returns an iterator for messages in the event queue. --- ----@return function i # Iterator function usable in a for loop. function love.event.poll() end --- @@ -28,15 +29,7 @@ function love.event.pump() end --- ---From 0.10.0 onwards, you may pass an arbitrary amount of arguments with this function, though the default callbacks don't ever use more than six. --- ----@param n love.event.Event # The name of the event. ----@param a love.event.Variant # First event argument. ----@param b love.event.Variant # Second event argument. ----@param c love.event.Variant # Third event argument. ----@param d love.event.Variant # Fourth event argument. ----@param e love.event.Variant # Fifth event argument. ----@param f love.event.Variant # Sixth event argument. ----@param ... love.event.Variant # Further event arguments may follow. -function love.event.push(n, a, b, c, d, e, f, ...) end +function love.event.push() end --- ---Adds the quit event to the queue. @@ -49,12 +42,4 @@ function love.event.quit(exitstatus) end --- ---Like love.event.poll(), but blocks until there is an event in the queue. --- ----@return love.event.Event n # The name of event. ----@return love.event.Variant a # First event argument. ----@return love.event.Variant b # Second event argument. ----@return love.event.Variant c # Third event argument. ----@return love.event.Variant d # Fourth event argument. ----@return love.event.Variant e # Fifth event argument. ----@return love.event.Variant f # Sixth event argument. ----@return love.event.Variant ... # Further event arguments may follow. function love.event.wait() end diff --git a/meta/3rd/love2d/library/love.filesystem.lua b/meta/3rd/love2d/library/love.filesystem.lua index 85ed717b..a76658ba 100644 --- a/meta/3rd/love2d/library/love.filesystem.lua +++ b/meta/3rd/love2d/library/love.filesystem.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.filesystem love.filesystem = {} @@ -63,7 +65,7 @@ function love.filesystem.getIdentity() end ---Gets information about the specified file or directory. --- ---@param path string # The file or directory path to check. ----@param filtertype love.filesystem.FileType # If supplied, this parameter causes getInfo to only return the info table if the item at the given path matches the specified file type. +---@param filtertype love.FileType # If supplied, this parameter causes getInfo to only return the info table if the item at the given path matches the specified file type. ---@return table info # A table containing information about the specified path, or nil if nothing exists at the path. The table contains the following fields: function love.filesystem.getInfo(path, filtertype) end @@ -170,7 +172,7 @@ function love.filesystem.mount(archive, mountpoint, appendToPath) end ---It needs to be opened before it can be accessed. --- ---@param filename string # The filename of the file. ----@return love.filesystem.File file # The new File object. +---@return love.File file # The new File object. function love.filesystem.newFile(filename) end --- @@ -178,7 +180,7 @@ function love.filesystem.newFile(filename) end --- ---@param contents string # The contents of the file. ---@param name string # The name of the file. ----@return love.filesystem.FileData data # Your new FileData. +---@return love.FileData data # Your new FileData. function love.filesystem.newFileData(contents, name) end --- @@ -256,10 +258,10 @@ function love.filesystem.unmount(archive) end ---@return string message # Error message if operation was unsuccessful. function love.filesystem.write(name, data, size) end ----@class love.filesystem.DroppedFile: love.filesystem.File, love.filesystem.Object +---@class love.DroppedFile: love.File, love.Object local DroppedFile = {} ----@class love.filesystem.File: love.filesystem.Object +---@class love.File: love.Object local File = {} --- @@ -278,7 +280,7 @@ function File:flush() end --- ---Gets the buffer mode of a file. --- ----@return love.filesystem.BufferMode mode # The current buffer mode of the file. +---@return love.BufferMode mode # The current buffer mode of the file. ---@return number size # The maximum size in bytes of the file's buffer. function File:getBuffer() end @@ -291,7 +293,7 @@ function File:getFilename() end --- ---Gets the FileMode the file has been opened with. --- ----@return love.filesystem.FileMode mode # The mode this file has been opened with. +---@return love.FileMode mode # The mode this file has been opened with. function File:getMode() end --- @@ -321,7 +323,7 @@ function File:lines() end --- ---Open the file for write, read or append. --- ----@param mode love.filesystem.FileMode # The mode to open the file in. +---@param mode love.FileMode # The mode to open the file in. ---@return boolean ok # True on success, false otherwise. ---@return string err # The error string if an error occurred. function File:open(mode) end @@ -346,7 +348,7 @@ function File:seek(pos) end --- ---File:flush will force any buffered data to be written to the disk. --- ----@param mode love.filesystem.BufferMode # The buffer mode to use. +---@param mode love.BufferMode # The buffer mode to use. ---@param size number # The maximum size in bytes of the file's buffer. ---@return boolean success # Whether the buffer mode was successfully set. ---@return string errorstr # The error string, if the buffer mode could not be set and an error occurred. @@ -367,7 +369,7 @@ function File:tell() end ---@return string err # The error string if an error occurred. function File:write(data, size) end ----@class love.filesystem.FileData: love.filesystem.Data, love.filesystem.Object +---@class love.FileData: love.Data, love.Object local FileData = {} --- diff --git a/meta/3rd/love2d/library/love.font.lua b/meta/3rd/love2d/library/love.font.lua index 3037758d..043bf81c 100644 --- a/meta/3rd/love2d/library/love.font.lua +++ b/meta/3rd/love2d/library/love.font.lua @@ -1,49 +1,51 @@ +---@meta + ---@class love.font love.font = {} --- ---Creates a new BMFont Rasterizer. --- ----@param imageData love.font.ImageData # The image data containing the drawable pictures of font glyphs. +---@param imageData love.ImageData # The image data containing the drawable pictures of font glyphs. ---@param glyphs string # The sequence of glyphs in the ImageData. ---@param dpiscale number # DPI scale. ----@return love.font.Rasterizer rasterizer # The rasterizer. +---@return love.Rasterizer rasterizer # The rasterizer. function love.font.newBMFontRasterizer(imageData, glyphs, dpiscale) end --- ---Creates a new GlyphData. --- ----@param rasterizer love.font.Rasterizer # The Rasterizer containing the font. +---@param rasterizer love.Rasterizer # The Rasterizer containing the font. ---@param glyph number # The character code of the glyph. function love.font.newGlyphData(rasterizer, glyph) end --- ---Creates a new Image Rasterizer. --- ----@param imageData love.font.ImageData # Font image data. +---@param imageData love.ImageData # Font image data. ---@param glyphs string # String containing font glyphs. ---@param extraSpacing number # Font extra spacing. ---@param dpiscale number # Font DPI scale. ----@return love.font.Rasterizer rasterizer # The rasterizer. +---@return love.Rasterizer rasterizer # The rasterizer. function love.font.newImageRasterizer(imageData, glyphs, extraSpacing, dpiscale) end --- ---Creates a new Rasterizer. --- ---@param filename string # The font file. ----@return love.font.Rasterizer rasterizer # The rasterizer. +---@return love.Rasterizer rasterizer # The rasterizer. function love.font.newRasterizer(filename) end --- ---Creates a new TrueType Rasterizer. --- ---@param size number # The font size. ----@param hinting love.font.HintingMode # True Type hinting mode. +---@param hinting love.HintingMode # True Type hinting mode. ---@param dpiscale number # The font DPI scale. ----@return love.font.Rasterizer rasterizer # The rasterizer. +---@return love.Rasterizer rasterizer # The rasterizer. function love.font.newTrueTypeRasterizer(size, hinting, dpiscale) end ----@class love.font.GlyphData: love.font.Data, love.font.Object +---@class love.GlyphData: love.Data, love.Object local GlyphData = {} --- @@ -62,8 +64,6 @@ function GlyphData:getBearing() end --- ---Gets glyph bounding box. --- ----@return number x # Glyph position x. ----@return number y # Glyph position y. ---@return number width # Glyph width. ---@return number height # Glyph height. function GlyphData:getBoundingBox() end @@ -78,7 +78,7 @@ function GlyphData:getDimensions() end --- ---Gets glyph pixel format. --- ----@return love.font.PixelFormat format # Glyph pixel format. +---@return love.PixelFormat format # Glyph pixel format. function GlyphData:getFormat() end --- @@ -105,7 +105,7 @@ function GlyphData:getHeight() end ---@return number width # Glyph width. function GlyphData:getWidth() end ----@class love.font.Rasterizer: love.font.Object +---@class love.Rasterizer: love.Object local Rasterizer = {} --- @@ -136,7 +136,7 @@ function Rasterizer:getGlyphCount() end ---Gets glyph data of a specified glyph. --- ---@param glyph string # Glyph ----@return love.font.GlyphData glyphData # Glyph data +---@return love.GlyphData glyphData # Glyph data function Rasterizer:getGlyphData(glyph) end --- @@ -154,8 +154,7 @@ function Rasterizer:getLineHeight() end --- ---Checks if font contains specified glyphs. --- ----@param glyph1 love.font.string or number # Glyph ----@param glyph2 love.font.string or number # Glyph ----@param ... love.font.string or number # Additional glyphs +---@param glyph1 love.string or number # Glyph +---@param glyph2 love.string or number # Glyph ---@return boolean hasGlyphs # Whatever font contains specified glyphs. -function Rasterizer:hasGlyphs(glyph1, glyph2, ...) end +function Rasterizer:hasGlyphs(glyph1, glyph2) end diff --git a/meta/3rd/love2d/library/love.graphics.lua b/meta/3rd/love2d/library/love.graphics.lua index a73cdcd6..88078efb 100644 --- a/meta/3rd/love2d/library/love.graphics.lua +++ b/meta/3rd/love2d/library/love.graphics.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.graphics love.graphics = {} @@ -6,20 +8,18 @@ love.graphics = {} --- ---This effectively multiplies the existing coordinate transformation's matrix with the Transform object's internal matrix to produce the new coordinate transformation. --- ----@param transform love.graphics.Transform # The Transform object to apply to the current graphics coordinate transform. +---@param transform love.Transform # The Transform object to apply to the current graphics coordinate transform. function love.graphics.applyTransform(transform) end --- ---Draws a filled or unfilled arc at position (x, y). The arc is drawn from angle1 to angle2 in radians. The segments parameter determines how many segments are used to draw the arc. The more segments, the smoother the edge. --- ----@param drawmode love.graphics.DrawMode # How to draw the arc. ----@param x number # The position of the center along x-axis. ----@param y number # The position of the center along y-axis. +---@param drawmode love.DrawMode # How to draw the arc. ---@param radius number # Radius of the arc. ---@param angle1 number # The angle at which the arc begins. ---@param angle2 number # The angle at which the arc terminates. ---@param segments number # The number of segments used for drawing the arc. -function love.graphics.arc(drawmode, x, y, radius, angle1, angle2, segments) end +function love.graphics.arc(drawmode, radius, angle1, angle2, segments) end --- ---Creates a screenshot once the current frame is done (after love.draw has finished). @@ -32,11 +32,9 @@ function love.graphics.captureScreenshot(filename) end --- ---Draws a circle. --- ----@param mode love.graphics.DrawMode # How to draw the circle. ----@param x number # The position of the center along x-axis. ----@param y number # The position of the center along y-axis. +---@param mode love.DrawMode # How to draw the circle. ---@param radius number # The radius of the circle. -function love.graphics.circle(mode, x, y, radius) end +function love.graphics.circle(mode, radius) end --- ---Clears the screen or active Canvas to the specified color. @@ -75,17 +73,14 @@ function love.graphics.discard(discardcolor, discardstencil) end --- ---When using the default shader anything drawn with this function will be tinted according to the currently selected color. Set it to pure white to preserve the object's original colors. --- ----@param drawable love.graphics.Drawable # A drawable object. ----@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). +---@param drawable love.Drawable # A drawable object. ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). ---@param ox number # Origin offset (x-axis). ---@param oy number # Origin offset (y-axis). ---@param kx number # Shearing factor (x-axis). ---@param ky number # Shearing factor (y-axis). -function love.graphics.draw(drawable, x, y, r, sx, sy, ox, oy, kx, ky) end +function love.graphics.draw(drawable, sx, sy, ox, oy, kx, ky) end --- ---Draws many instances of a Mesh with a single draw call, using hardware geometry instancing. @@ -94,44 +89,36 @@ function love.graphics.draw(drawable, x, y, r, sx, sy, ox, oy, kx, ky) end --- ---Instancing is not supported by some older GPUs that are only capable of using OpenGL ES 2 or OpenGL 2. Use love.graphics.getSupported to check. --- ----@param mesh love.graphics.Mesh # The mesh to render. +---@param mesh love.Mesh # The mesh to render. ---@param instancecount number # The number of instances to render. ----@param x number # The position to draw the instances (x-axis). ----@param y number # The position to draw the instances (y-axis). ----@param r number # Orientation (radians). ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). ---@param ox number # Origin offset (x-axis). ---@param oy number # Origin offset (y-axis). ---@param kx number # Shearing factor (x-axis). ---@param ky number # Shearing factor (y-axis). -function love.graphics.drawInstanced(mesh, instancecount, x, y, r, sx, sy, ox, oy, kx, ky) end +function love.graphics.drawInstanced(mesh, instancecount, sx, sy, ox, oy, kx, ky) end --- ---Draws a layer of an Array Texture. --- ----@param texture love.graphics.Texture # The Array Texture to draw. +---@param texture love.Texture # The Array Texture to draw. ---@param layerindex number # The index of the layer to use when drawing. ----@param x number # The position to draw the texture (x-axis). ----@param y number # The position to draw the texture (y-axis). ----@param r number # Orientation (radians). ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). ---@param ox number # Origin offset (x-axis). ---@param oy number # Origin offset (y-axis). ---@param kx number # Shearing factor (x-axis). ---@param ky number # Shearing factor (y-axis). -function love.graphics.drawLayer(texture, layerindex, x, y, r, sx, sy, ox, oy, kx, ky) end +function love.graphics.drawLayer(texture, layerindex, sx, sy, ox, oy, kx, ky) end --- ---Draws an ellipse. --- ----@param mode love.graphics.DrawMode # How to draw the ellipse. ----@param x number # The position of the center along x-axis. ----@param y number # The position of the center along y-axis. +---@param mode love.DrawMode # How to draw the ellipse. ---@param radiusx number # The radius of the ellipse along the x-axis (half the ellipse's width). ---@param radiusy number # The radius of the ellipse along the y-axis (half the ellipse's height). -function love.graphics.ellipse(mode, x, y, radiusx, radiusy) end +function love.graphics.ellipse(mode, radiusx, radiusy) end --- ---Immediately renders any pending automatically batched draws. @@ -149,23 +136,19 @@ function love.graphics.flushBatch() end --- ---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. --- ----@return number r # The red component (0-1). ----@return number g # The green component (0-1). ----@return number b # The blue component (0-1). ----@return number a # The alpha component (0-1). function love.graphics.getBackgroundColor() end --- ---Gets the blending mode. --- ----@return love.graphics.BlendMode mode # The current blend mode. ----@return love.graphics.BlendAlphaMode alphamode # The current blend alpha mode – it determines how the alpha of drawn objects affects blending. +---@return love.BlendMode mode # The current blend mode. +---@return love.BlendAlphaMode alphamode # The current blend alpha mode – it determines how the alpha of drawn objects affects blending. function love.graphics.getBlendMode() end --- ---Gets the current target Canvas. --- ----@return love.graphics.Canvas canvas # The Canvas set by setCanvas. Returns nil if drawing to the real screen. +---@return love.Canvas canvas # The Canvas set by setCanvas. Returns nil if drawing to the real screen. function love.graphics.getCanvas() end --- @@ -179,10 +162,6 @@ function love.graphics.getCanvasFormats() end --- ---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. --- ----@return number r # The red component (0-1). ----@return number g # The green component (0-1). ----@return number b # The blue component (0-1). ----@return number a # The alpha component (0-1). function love.graphics.getColor() end --- @@ -190,10 +169,6 @@ function love.graphics.getColor() end --- ---The color mask determines whether individual components of the colors of drawn objects will affect the color of the screen. They affect love.graphics.clear and Canvas:clear as well. --- ----@return boolean r # Whether the red color component is active when rendering. ----@return boolean g # Whether the green color component is active when rendering. ----@return boolean b # Whether the blue color component is active when rendering. ----@return boolean a # Whether the alpha color component is active when rendering. function love.graphics.getColorMask() end --- @@ -211,8 +186,8 @@ function love.graphics.getDPIScale() end --- ---Returns the default scaling filters used with Images, Canvases, and Fonts. --- ----@return love.graphics.FilterMode min # Filter mode used when scaling the image down. ----@return love.graphics.FilterMode mag # Filter mode used when scaling the image up. +---@return love.FilterMode min # Filter mode used when scaling the image down. +---@return love.FilterMode mag # Filter mode used when scaling the image up. ---@return number anisotropy # Maximum amount of Anisotropic Filtering used. function love.graphics.getDefaultFilter() end @@ -221,7 +196,7 @@ function love.graphics.getDefaultFilter() end --- ---This is low-level functionality designed for use with custom vertex shaders and Meshes with custom vertex attributes. No higher level APIs are provided to set the depth of 2D graphics such as shapes, lines, and Images. --- ----@return love.graphics.CompareMode comparemode # Depth comparison mode used for depth testing. +---@return love.CompareMode comparemode # Depth comparison mode used for depth testing. ---@return boolean write # Whether to write update / write values to the depth buffer when rendering. function love.graphics.getDepthMode() end @@ -235,7 +210,7 @@ function love.graphics.getDimensions() end --- ---Gets the current Font object. --- ----@return love.graphics.Font font # The current Font. Automatically creates and sets the default font, if none is set yet. +---@return love.Font font # The current Font. Automatically creates and sets the default font, if none is set yet. function love.graphics.getFont() end --- @@ -243,7 +218,7 @@ function love.graphics.getFont() end --- ---This is designed for use in combination with Mesh face culling. Other love.graphics shapes, lines, and sprites are not guaranteed to have a specific winding order to their internal vertices. --- ----@return love.graphics.VertexWinding winding # The winding mode being used. The default winding is counterclockwise ('ccw'). +---@return love.VertexWinding winding # The winding mode being used. The default winding is counterclockwise ('ccw'). function love.graphics.getFrontFaceWinding() end --- @@ -261,13 +236,13 @@ function love.graphics.getImageFormats() end --- ---Gets the line join style. --- ----@return love.graphics.LineJoin join # The LineJoin style. +---@return love.LineJoin join # The LineJoin style. function love.graphics.getLineJoin() end --- ---Gets the line style. --- ----@return love.graphics.LineStyle style # The current line style. +---@return love.LineStyle style # The current line style. function love.graphics.getLineStyle() end --- @@ -281,7 +256,7 @@ function love.graphics.getLineWidth() end --- ---Mesh face culling is designed for use with low level custom hardware-accelerated 3D rendering via custom vertex attributes on Meshes, custom vertex shaders, and depth testing with a depth buffer. --- ----@return love.graphics.CullMode mode # The Mesh face culling mode in use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). +---@return love.CullMode mode # The Mesh face culling mode in use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). function love.graphics.getMeshCullMode() end --- @@ -327,8 +302,6 @@ function love.graphics.getRendererInfo() end --- ---Gets the current scissor box. --- ----@return number x # The x-component of the top-left point of the box. ----@return number y # The y-component of the top-left point of the box. ---@return number width # The width of the box. ---@return number height # The height of the box. function love.graphics.getScissor() end @@ -336,7 +309,7 @@ function love.graphics.getScissor() end --- ---Gets the current Shader. Returns nil if none is set. --- ----@return love.graphics.Shader shader # The currently active Shader, or nil if none is set. +---@return love.Shader shader # The currently active Shader, or nil if none is set. function love.graphics.getShader() end --- @@ -358,7 +331,7 @@ function love.graphics.getStats() end --- ---Each Canvas has its own per-pixel stencil values. --- ----@return love.graphics.CompareMode comparemode # The type of comparison that is made for each pixel. Will be 'always' if stencil testing is disabled. +---@return love.CompareMode comparemode # The type of comparison that is made for each pixel. Will be 'always' if stencil testing is disabled. ---@return number comparevalue # The value used when comparing with the stencil value of each pixel. function love.graphics.getStencilTest() end @@ -395,11 +368,9 @@ function love.graphics.getWidth() end --- ---The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...). --- ----@param x number # The x-coordinate of the upper left corner of the rectangle to intersect with the existing scissor rectangle. ----@param y number # The y-coordinate of the upper left corner of the rectangle to intersect with the existing scissor rectangle. ---@param width number # The width of the rectangle to intersect with the existing scissor rectangle. ---@param height number # The height of the rectangle to intersect with the existing scissor rectangle. -function love.graphics.intersectScissor(x, y, width, height) end +function love.graphics.intersectScissor(width, height) end --- ---Converts the given 2D position from screen-space into global coordinates. @@ -440,8 +411,7 @@ function love.graphics.isWireframe() end ---@param y1 number # The position of first point on the y-axis. ---@param x2 number # The position of second point on the x-axis. ---@param y2 number # The position of second point on the y-axis. ----@param ... number # You can continue passing point positions to draw a polyline. -function love.graphics.line(x1, y1, x2, y2, ...) end +function love.graphics.line(x1, y1, x2, y2) end --- ---Creates a new array Image. @@ -454,13 +424,13 @@ function love.graphics.line(x1, y1, x2, y2, ...) end --- ---@param slices table # A table containing filepaths to images (or File, FileData, ImageData, or CompressedImageData objects), in an array. Each sub-image must have the same dimensions. A table of tables can also be given, where each sub-table contains all mipmap levels for the slice index of that sub-table. ---@param settings table # Optional table of settings to configure the array image, containing the following fields: ----@return love.graphics.Image image # An Array Image object. +---@return love.Image image # An Array Image object. function love.graphics.newArrayImage(slices, settings) end --- ---Creates a new Canvas object for offscreen rendering. --- ----@return love.graphics.Canvas canvas # A new Canvas with dimensions equal to the window's size in pixels. +---@return love.Canvas canvas # A new Canvas with dimensions equal to the window's size in pixels. function love.graphics.newCanvas() end --- @@ -510,7 +480,7 @@ function love.graphics.newCanvas() end --- ---@param filename string # The filepath to a cubemap image file (or a File, FileData, or ImageData). ---@param settings table # Optional table of settings to configure the cubemap image, containing the following fields: ----@return love.graphics.Image image # An cubemap Image object. +---@return love.Image image # An cubemap Image object. function love.graphics.newCubeImage(filename, settings) end --- @@ -519,14 +489,14 @@ function love.graphics.newCubeImage(filename, settings) end ---All variants which accept a filename can also accept a Data object instead. --- ---@param filename string # The filepath to the BMFont or TrueType font file. ----@return love.graphics.Font font # A Font object which can be used to draw text on screen. +---@return love.Font font # A Font object which can be used to draw text on screen. function love.graphics.newFont(filename) end --- ---Creates a new Image from a filepath, FileData, an ImageData, or a CompressedImageData, and optionally generates or specifies mipmaps for the image. --- ---@param filename string # The filepath to the image file. ----@return love.graphics.Image image # An Image object which can be drawn on screen. +---@return love.Image image # An Image object which can be drawn on screen. function love.graphics.newImage(filename) end --- @@ -536,7 +506,7 @@ function love.graphics.newImage(filename) end --- ---@param filename string # The filepath to the image file. ---@param glyphs string # A string of the characters in the image in order from left to right. ----@return love.graphics.Font font # A Font object which can be used to draw text on screen. +---@return love.Font font # A Font object which can be used to draw text on screen. function love.graphics.newImageFont(filename, glyphs) end --- @@ -547,17 +517,17 @@ function love.graphics.newImageFont(filename, glyphs) end ---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. --- ---@param vertices table # The table filled with vertex information tables for each vertex as follows: ----@param mode love.graphics.MeshDrawMode # How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons. ----@param usage love.graphics.SpriteBatchUsage # The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance. ----@return love.graphics.Mesh mesh # The new mesh. +---@param mode love.MeshDrawMode # How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons. +---@param usage love.SpriteBatchUsage # The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance. +---@return love.Mesh mesh # The new mesh. function love.graphics.newMesh(vertices, mode, usage) end --- ---Creates a new ParticleSystem. --- ----@param image love.graphics.Image # The image to use. +---@param image love.Image # The image to use. ---@param buffer number # The max number of particles at the same time. ----@return love.graphics.ParticleSystem system # A new ParticleSystem. +---@return love.ParticleSystem system # A new ParticleSystem. function love.graphics.newParticleSystem(image, buffer) end --- @@ -565,14 +535,12 @@ function love.graphics.newParticleSystem(image, buffer) end --- ---The purpose of a Quad is to use a fraction of an image to draw objects, as opposed to drawing entire image. It is most useful for sprite sheets and atlases: in a sprite atlas, multiple sprites reside in same image, quad is used to draw a specific sprite from that image; in animated sprites with all frames residing in the same image, quad is used to draw specific frame from the animation. --- ----@param x number # The top-left position in the Image along the x-axis. ----@param y number # The top-left position in the Image along the y-axis. ---@param width number # The width of the Quad in the Image. (Must be greater than 0.) ---@param height number # The height of the Quad in the Image. (Must be greater than 0.) ---@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.) ----@return love.graphics.Quad quad # The new Quad. -function love.graphics.newQuad(x, y, width, height, sw, sh) end +---@return love.Quad quad # The new Quad. +function love.graphics.newQuad(width, height, sw, sh) end --- ---Creates a new Shader object for hardware-accelerated vertex and pixel effects. A Shader contains either vertex shader code, pixel shader code, or both. @@ -580,30 +548,30 @@ function love.graphics.newQuad(x, y, width, height, sw, sh) end ---Shaders are small programs which are run on the graphics card when drawing. Vertex shaders are run once for each vertex (for example, an image has 4 vertices - one at each corner. A Mesh might have many more.) Pixel shaders are run once for each pixel on the screen which the drawn object touches. Pixel shader code is executed after all the object's vertices have been processed by the vertex shader. --- ---@param code string # The pixel shader or vertex shader code, or a filename pointing to a file with the code. ----@return love.graphics.Shader shader # A Shader object for use in drawing operations. +---@return love.Shader shader # A Shader object for use in drawing operations. function love.graphics.newShader(code) end --- ---Creates a new SpriteBatch object. --- ----@param image love.graphics.Image # The Image to use for the sprites. +---@param image love.Image # The Image to use for the sprites. ---@param maxsprites number # The maximum number of sprites that the SpriteBatch can contain at any given time. Since version 11.0, additional sprites added past this number will automatically grow the spritebatch. ----@return love.graphics.SpriteBatch spriteBatch # The new SpriteBatch. +---@return love.SpriteBatch spriteBatch # The new SpriteBatch. function love.graphics.newSpriteBatch(image, maxsprites) end --- ---Creates a new drawable Text object. --- ----@param font love.graphics.Font # The font to use for the text. +---@param font love.Font # The font to use for the text. ---@param textstring string # The initial string of text that the new Text object will contain. May be nil. ----@return love.graphics.Text text # The new drawable Text object. +---@return love.Text text # The new drawable Text object. function love.graphics.newText(font, textstring) end --- ---Creates a new drawable Video. Currently only Ogg Theora video files are supported. --- ---@param filename string # The file path to the Ogg Theora video file. ----@return love.graphics.Video video # A new Video. +---@return love.Video video # A new Video. function love.graphics.newVideo(filename) end --- @@ -619,7 +587,7 @@ function love.graphics.newVideo(filename) end --- ---@param layers table # A table containing filepaths to images (or File, FileData, ImageData, or CompressedImageData objects), in an array. A table of tables can also be given, where each sub-table represents a single mipmap level and contains all layers for that mipmap. ---@param settings table # Optional table of settings to configure the volume image, containing the following fields: ----@return love.graphics.Image image # A volume Image object. +---@return love.Image image # A volume Image object. function love.graphics.newVolumeImage(layers, settings) end --- @@ -632,19 +600,15 @@ function love.graphics.origin() end --- ---Draws one or more points. --- ----@param x number # The position of the first point on the x-axis. ----@param y number # The position of the first point on the y-axis. ----@param ... number # The x and y coordinates of additional points. -function love.graphics.points(x, y, ...) end +function love.graphics.points() end --- ---Draw a polygon. --- ---Following the mode argument, this function can accept multiple numeric arguments or a single table of numeric arguments. In either case the arguments are interpreted as alternating x and y coordinates of the polygon's vertices. --- ----@param mode love.graphics.DrawMode # How to draw the polygon. ----@param ... number # The vertices of the polygon. -function love.graphics.polygon(mode, ...) end +---@param mode love.DrawMode # How to draw the polygon. +function love.graphics.polygon(mode) end --- ---Pops the current coordinate transformation from the transformation stack. @@ -670,16 +634,13 @@ function love.graphics.present() end ---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. --- ---@param text string # 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). ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). ---@param ox number # Origin offset (x-axis). ---@param oy number # Origin offset (y-axis). ---@param kx number # Shearing factor (x-axis). ---@param ky number # Shearing factor (y-axis). -function love.graphics.print(text, x, y, r, sx, sy, ox, oy, kx, ky) end +function love.graphics.print(text, sx, sy, ox, oy, kx, ky) end --- ---Draws formatted text, with word wrap and alignment. @@ -693,18 +654,15 @@ function love.graphics.print(text, x, y, r, sx, sy, ox, oy, kx, ky) end ---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. --- ---@param text string # 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. ----@param align love.graphics.AlignMode # The alignment. ----@param r number # Orientation (radians). +---@param align love.AlignMode # The alignment. ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). ---@param ox number # Origin offset (x-axis). ---@param oy number # Origin offset (y-axis). ---@param kx number # Shearing factor (x-axis). ---@param ky number # Shearing factor (y-axis). -function love.graphics.printf(text, x, y, limit, align, r, sx, sy, ox, oy, kx, ky) end +function love.graphics.printf(text, limit, align, sx, sy, ox, oy, kx, ky) end --- ---Copies and pushes the current coordinate transformation to the transformation stack. @@ -716,17 +674,15 @@ function love.graphics.push() end --- ---Draws a rectangle. --- ----@param mode love.graphics.DrawMode # How to draw the rectangle. ----@param x number # The position of top-left corner along the x-axis. ----@param y number # The position of top-left corner along the y-axis. +---@param mode love.DrawMode # How to draw the rectangle. ---@param width number # Width of the rectangle. ---@param height number # Height of the rectangle. -function love.graphics.rectangle(mode, x, y, width, height) end +function love.graphics.rectangle(mode, width, height) end --- ---Replaces the current coordinate transformation with the given Transform object. --- ----@param transform love.graphics.Transform # The Transform object to replace the current graphics coordinate transform with. +---@param transform love.Transform # The Transform object to replace the current graphics coordinate transform with. function love.graphics.replaceTransform(transform) end --- @@ -771,13 +727,13 @@ function love.graphics.setBackgroundColor(red, green, blue, alpha) end --- ---Sets the blending mode. --- ----@param mode love.graphics.BlendMode # The blend mode to use. +---@param mode love.BlendMode # The blend mode to use. function love.graphics.setBlendMode(mode) end --- ---Captures drawing operations to a Canvas. --- ----@param canvas love.graphics.Canvas # The new target. +---@param canvas love.Canvas # The new target. ---@param mipmap number # The mipmap level to render to, for Canvases with mipmaps. function love.graphics.setCanvas(canvas, mipmap) end @@ -804,8 +760,8 @@ function love.graphics.setColorMask(red, green, blue, alpha) end --- ---Sets the default scaling filters used with Images, Canvases, and Fonts. --- ----@param min love.graphics.FilterMode # Filter mode used when scaling the image down. ----@param mag love.graphics.FilterMode # Filter mode used when scaling the image up. +---@param min love.FilterMode # Filter mode used when scaling the image down. +---@param mag love.FilterMode # Filter mode used when scaling the image up. ---@param anisotropy number # Maximum amount of Anisotropic Filtering used. function love.graphics.setDefaultFilter(min, mag, anisotropy) end @@ -814,7 +770,7 @@ function love.graphics.setDefaultFilter(min, mag, anisotropy) end --- ---This is low-level functionality designed for use with custom vertex shaders and Meshes with custom vertex attributes. No higher level APIs are provided to set the depth of 2D graphics such as shapes, lines, and Images. --- ----@param comparemode love.graphics.CompareMode # Depth comparison mode used for depth testing. +---@param comparemode love.CompareMode # Depth comparison mode used for depth testing. ---@param write boolean # Whether to write update / write values to the depth buffer when rendering. function love.graphics.setDepthMode(comparemode, write) end @@ -823,7 +779,7 @@ function love.graphics.setDepthMode(comparemode, write) end --- ---It's recommended that Font objects are created with love.graphics.newFont in the loading stage and then passed to this function in the drawing stage. --- ----@param font love.graphics.Font # The Font object to use. +---@param font love.Font # The Font object to use. function love.graphics.setFont(font) end --- @@ -831,19 +787,19 @@ function love.graphics.setFont(font) end --- ---This is designed for use in combination with Mesh face culling. Other love.graphics shapes, lines, and sprites are not guaranteed to have a specific winding order to their internal vertices. --- ----@param winding love.graphics.VertexWinding # The winding mode to use. The default winding is counterclockwise ('ccw'). +---@param winding love.VertexWinding # The winding mode to use. The default winding is counterclockwise ('ccw'). function love.graphics.setFrontFaceWinding(winding) end --- ---Sets the line join style. See LineJoin for the possible options. --- ----@param join love.graphics.LineJoin # The LineJoin to use. +---@param join love.LineJoin # The LineJoin to use. function love.graphics.setLineJoin(join) end --- ---Sets the line style. --- ----@param style love.graphics.LineStyle # The LineStyle to use. Line styles include smooth and rough. +---@param style love.LineStyle # The LineStyle to use. Line styles include smooth and rough. function love.graphics.setLineStyle(style) end --- @@ -859,14 +815,14 @@ function love.graphics.setLineWidth(width) end --- ---By default, both front- and back-facing triangles in Meshes are rendered. --- ----@param mode love.graphics.CullMode # The Mesh face culling mode to use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). +---@param mode love.CullMode # The Mesh face culling mode to use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). function love.graphics.setMeshCullMode(mode) end --- ---Creates and sets a new Font. --- ---@param size number # The size of the font. ----@return love.graphics.Font font # The new font. +---@return love.Font font # The new font. function love.graphics.setNewFont(size) end --- @@ -882,16 +838,14 @@ function love.graphics.setPointSize(size) end --- ---The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...). --- ----@param x number # x coordinate of upper left corner. ----@param y number # y coordinate of upper left corner. ---@param width number # width of clipping rectangle. ---@param height number # height of clipping rectangle. -function love.graphics.setScissor(x, y, width, height) end +function love.graphics.setScissor(width, height) end --- ---Sets or resets a Shader as the current pixel effect or vertex shaders. All drawing operations until the next ''love.graphics.setShader'' will be drawn using the Shader object specified. --- ----@param shader love.graphics.Shader # The new shader. +---@param shader love.Shader # The new shader. function love.graphics.setShader(shader) end --- @@ -899,7 +853,7 @@ function love.graphics.setShader(shader) end --- ---When stencil testing is enabled, the geometry of everything that is drawn afterward will be clipped / stencilled out based on a comparison between the arguments of this function and the stencil value of each pixel that the geometry touches. The stencil values of pixels are affected via love.graphics.stencil. --- ----@param comparemode love.graphics.CompareMode # The type of comparison to make for each pixel. +---@param comparemode love.CompareMode # The type of comparison to make for each pixel. ---@param comparevalue number # The value to use when comparing with the stencil value of each pixel. Must be between 0 and 255. function love.graphics.setStencilTest(comparemode, comparevalue) end @@ -924,7 +878,7 @@ function love.graphics.shear(kx, ky) end ---Stencil values are integers within the range of 255. --- ---@param stencilfunction function # Function which draws geometry. The stencil values of pixels, rather than the color of each pixel, will be affected by the geometry. ----@param action love.graphics.StencilAction # How to modify any stencil values of pixels that are touched by what's drawn in the stencil function. +---@param action love.StencilAction # How to modify any stencil values of pixels that are touched by what's drawn in the stencil function. ---@param value number # The new stencil value to use for pixels if the 'replace' stencil action is used. Has no effect with other stencil actions. Must be between 0 and 255. ---@param keepvalues boolean # True to preserve old stencil values of pixels, false to re-set every pixel's stencil value to 0 before executing the stencil function. love.graphics.clear will also re-set all stencil values. function love.graphics.stencil(stencilfunction, action, value, keepvalues) end @@ -964,7 +918,7 @@ function love.graphics.translate(dx, dy) end ---@return string message # Reason why shader code validation failed (or nil if validation succeded). function love.graphics.validateShader(gles, code) end ----@class love.graphics.Canvas: love.graphics.Texture, love.graphics.Drawable, love.graphics.Object +---@class love.Canvas: love.Texture, love.Drawable, love.Object local Canvas = {} --- @@ -987,13 +941,13 @@ function Canvas:getMSAA() end --- ---Gets the MipmapMode this Canvas was created with. --- ----@return love.graphics.MipmapMode mode # The mipmap mode this Canvas was created with. +---@return love.MipmapMode mode # The mipmap mode this Canvas was created with. function Canvas:getMipmapMode() end --- ---Generates ImageData from the contents of the Canvas. --- ----@return love.graphics.ImageData data # The new ImageData made from the Canvas' contents. +---@return love.ImageData data # The new ImageData made from the Canvas' contents. function Canvas:newImageData() end --- @@ -1014,10 +968,10 @@ function Canvas:newImageData() end ---@param func function # A function performing drawing operations. function Canvas:renderTo(func) end ----@class love.graphics.Drawable: love.graphics.Object +---@class love.Drawable: love.Object local Drawable = {} ----@class love.graphics.Font: love.graphics.Object +---@class love.Font: love.Object local Font = {} --- @@ -1057,8 +1011,8 @@ function Font:getDescent() end --- ---Gets the filter mode for a font. --- ----@return love.graphics.FilterMode min # Filter mode used when minifying the font. ----@return love.graphics.FilterMode mag # Filter mode used when magnifying the font. +---@return love.FilterMode min # Filter mode used when minifying the font. +---@return love.FilterMode mag # Filter mode used when magnifying the font. ---@return number anisotropy # Maximum amount of anisotropic filtering used. function Font:getFilter() end @@ -1106,15 +1060,14 @@ function Font:hasGlyphs(text) end --- ---Sets the fallback fonts. When the Font doesn't contain a glyph, it will substitute the glyph from the next subsequent fallback Fonts. This is akin to setting a 'font stack' in Cascading Style Sheets (CSS). --- ----@param fallbackfont1 love.graphics.Font # The first fallback Font to use. ----@param ... love.graphics.Font # Additional fallback Fonts. -function Font:setFallbacks(fallbackfont1, ...) end +---@param fallbackfont1 love.Font # The first fallback Font to use. +function Font:setFallbacks(fallbackfont1) end --- ---Sets the filter mode for a font. --- ----@param min love.graphics.FilterMode # How to scale a font down. ----@param mag love.graphics.FilterMode # How to scale a font up. +---@param min love.FilterMode # How to scale a font down. +---@param mag love.FilterMode # How to scale a font up. ---@param anisotropy number # Maximum amount of anisotropic filtering used. function Font:setFilter(min, mag, anisotropy) end @@ -1126,7 +1079,7 @@ function Font:setFilter(min, mag, anisotropy) end ---@param height number # The new line height. function Font:setLineHeight(height) end ----@class love.graphics.Image: love.graphics.Texture, love.graphics.Drawable, love.graphics.Object +---@class love.Image: love.Texture, love.Drawable, love.Object local Image = {} --- @@ -1146,29 +1099,27 @@ function Image:isCompressed() end --- ---Replace the contents of an Image. --- ----@param data love.graphics.ImageData # The new ImageData to replace the contents with. +---@param data love.ImageData # The new ImageData to replace the contents with. ---@param slice number # Which cubemap face, array index, or volume layer to replace, if applicable. ---@param mipmap number # The mimap level to replace, if the Image has mipmaps. ----@param x number # The x-offset in pixels from the top-left of the image to replace. The given ImageData's width plus this value must not be greater than the pixel width of the Image's specified mipmap level. ----@param y number # The y-offset in pixels from the top-left of the image to replace. The given ImageData's height plus this value must not be greater than the pixel height of the Image's specified mipmap level. ---@param reloadmipmaps boolean # Whether to generate new mipmaps after replacing the Image's pixels. True by default if the Image was created with automatically generated mipmaps, false by default otherwise. -function Image:replacePixels(data, slice, mipmap, x, y, reloadmipmaps) end +function Image:replacePixels(data, slice, mipmap, reloadmipmaps) end ----@class love.graphics.Mesh: love.graphics.Drawable, love.graphics.Object +---@class love.Mesh: love.Drawable, love.Object local Mesh = {} --- ---Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. This can be used to share vertex attribute data between several different Meshes. --- ---@param name string # The name of the vertex attribute to attach. ----@param mesh love.graphics.Mesh # The Mesh to get the vertex attribute from. +---@param mesh love.Mesh # The Mesh to get the vertex attribute from. function Mesh:attachAttribute(name, mesh) end --- ---Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. This can be used to share vertex attribute data between several different Meshes. --- ---@param name string # The name of the vertex attribute to attach. ----@param mesh love.graphics.Mesh # The Mesh to get the vertex attribute from. +---@param mesh love.Mesh # The Mesh to get the vertex attribute from. function Mesh:attachAttribute(name, mesh) end --- @@ -1181,7 +1132,7 @@ function Mesh:detachAttribute(name) end --- ---Gets the mode used when drawing the Mesh. --- ----@return love.graphics.MeshDrawMode mode # The mode used when drawing the Mesh. +---@return love.MeshDrawMode mode # The mode used when drawing the Mesh. function Mesh:getDrawMode() end --- @@ -1194,7 +1145,7 @@ function Mesh:getDrawRange() end --- ---Gets the texture (Image or Canvas) used when drawing the Mesh. --- ----@return love.graphics.Texture texture # The Image or Canvas to texture the Mesh with when drawing, or nil if none is set. +---@return love.Texture texture # The Image or Canvas to texture the Mesh with when drawing, or nil if none is set. function Mesh:getTexture() end --- @@ -1204,7 +1155,6 @@ function Mesh:getTexture() end --- ---@param index number # The one-based index of the vertex you want to retrieve the information for. ---@return number attributecomponent # The first component of the first vertex attribute in the specified vertex. ----@return number ... # Additional components of all vertex attributes in the specified vertex. function Mesh:getVertex(index) end --- @@ -1216,7 +1166,6 @@ function Mesh:getVertex(index) end ---@param attributeindex number # The index of the attribute within the vertex to be retrieved (one-based). ---@return number value1 # The value of the first component of the attribute. ---@return number value2 # The value of the second component of the attribute. ----@return number ... # Any additional vertex attribute components. function Mesh:getVertexAttribute(vertexindex, attributeindex) end --- @@ -1256,7 +1205,7 @@ function Mesh:setAttributeEnabled(name, enable) end --- ---Sets the mode used when drawing the Mesh. --- ----@param mode love.graphics.MeshDrawMode # The mode to use when drawing the Mesh. +---@param mode love.MeshDrawMode # The mode to use when drawing the Mesh. function Mesh:setDrawMode(mode) end --- @@ -1269,7 +1218,7 @@ function Mesh:setDrawRange(start, count) end --- ---Sets the texture (Image or Canvas) used when drawing the Mesh. --- ----@param texture love.graphics.Texture # The Image or Canvas to texture the Mesh with when drawing. +---@param texture love.Texture # The Image or Canvas to texture the Mesh with when drawing. function Mesh:setTexture(texture) end --- @@ -1279,8 +1228,7 @@ function Mesh:setTexture(texture) end --- ---@param index number # The index of the the vertex you want to modify (one-based). ---@param attributecomponent number # The first component of the first vertex attribute in the specified vertex. ----@param ... number # Additional components of all vertex attributes in the specified vertex. -function Mesh:setVertex(index, attributecomponent, ...) end +function Mesh:setVertex(index, attributecomponent) end --- ---Sets the properties of a specific attribute within a vertex in the Mesh. @@ -1291,8 +1239,7 @@ function Mesh:setVertex(index, attributecomponent, ...) end ---@param attributeindex number # The index of the attribute within the vertex to be modified (one-based). ---@param value1 number # The new value for the first component of the attribute. ---@param value2 number # The new value for the second component of the attribute. ----@param ... number # Any additional vertex attribute components. -function Mesh:setVertexAttribute(vertexindex, attributeindex, value1, value2, ...) end +function Mesh:setVertexAttribute(vertexindex, attributeindex, value1, value2) end --- ---Sets the vertex map for the Mesh. The vertex map describes the order in which the vertices are used when the Mesh is drawn. The vertices, vertex map, and mesh draw mode work together to determine what exactly is displayed on the screen. @@ -1309,13 +1256,13 @@ function Mesh:setVertexMap(map) end ---@param startvertex number # The index of the first vertex to replace. function Mesh:setVertices(vertices, startvertex) end ----@class love.graphics.ParticleSystem: love.graphics.Drawable, love.graphics.Object +---@class love.ParticleSystem: love.Drawable, love.Object local ParticleSystem = {} --- ---Creates an identical copy of the ParticleSystem in the stopped state. --- ----@return love.graphics.ParticleSystem particlesystem # The new identical copy of this ParticleSystem. +---@return love.ParticleSystem particlesystem # The new identical copy of this ParticleSystem. function ParticleSystem:clone() end --- @@ -1364,7 +1311,7 @@ function ParticleSystem:getDirection() end --- ---Gets the area-based spawn parameters for the particles. --- ----@return love.graphics.AreaSpreadDistribution distribution # The type of distribution for new particles. +---@return love.AreaSpreadDistribution distribution # The type of distribution for new particles. ---@return number dx # The maximum spawn distance from the emitter along the x-axis for uniform distribution, or the standard deviation along the x-axis for normal distribution. ---@return number dy # The maximum spawn distance from the emitter along the y-axis for uniform distribution, or the standard deviation along the y-axis for normal distribution. ---@return number angle # The angle in radians of the emission area. @@ -1386,7 +1333,7 @@ function ParticleSystem:getEmitterLifetime() end --- ---Gets the mode used when the ParticleSystem adds new particles. --- ----@return love.graphics.ParticleInsertMode mode # The mode used when the ParticleSystem adds new particles. +---@return love.ParticleInsertMode mode # The mode used when the ParticleSystem adds new particles. function ParticleSystem:getInsertMode() end --- @@ -1424,8 +1371,6 @@ function ParticleSystem:getParticleLifetime() end --- ---Gets the position of the emitter. --- ----@return number x # Position along x-axis. ----@return number y # Position along y-axis. function ParticleSystem:getPosition() end --- @@ -1499,7 +1444,7 @@ function ParticleSystem:getTangentialAcceleration() end --- ---Gets the texture (Image or Canvas) used for the particles. --- ----@return love.graphics.Texture texture # The Image or Canvas used for the particles. +---@return love.Texture texture # The Image or Canvas used for the particles. function ParticleSystem:getTexture() end --- @@ -1529,9 +1474,7 @@ function ParticleSystem:isStopped() end --- ---Moves the position of the emitter. This results in smoother particle spawning behaviour than if ParticleSystem:setPosition is used every frame. --- ----@param x number # Position along x-axis. ----@param y number # Position along y-axis. -function ParticleSystem:moveTo(x, y) end +function ParticleSystem:moveTo() end --- ---Pauses the particle emitter. @@ -1579,7 +1522,7 @@ function ParticleSystem:setDirection(direction) end --- ---Sets area-based spawn parameters for the particles. Newly created particles will spawn in an area around the emitter based on the parameters to this function. --- ----@param distribution love.graphics.AreaSpreadDistribution # The type of distribution for new particles. +---@param distribution love.AreaSpreadDistribution # The type of distribution for new particles. ---@param dx number # The maximum spawn distance from the emitter along the x-axis for uniform distribution, or the standard deviation along the x-axis for normal distribution. ---@param dy number # The maximum spawn distance from the emitter along the y-axis for uniform distribution, or the standard deviation along the y-axis for normal distribution. ---@param angle number # The angle in radians of the emission area. @@ -1601,7 +1544,7 @@ function ParticleSystem:setEmitterLifetime(life) end --- ---Sets the mode to use when the ParticleSystem adds new particles. --- ----@param mode love.graphics.ParticleInsertMode # The mode to use when the ParticleSystem adds new particles. +---@param mode love.ParticleInsertMode # The mode to use when the ParticleSystem adds new particles. function ParticleSystem:setInsertMode(mode) end --- @@ -1627,9 +1570,7 @@ function ParticleSystem:setLinearDamping(min, max) end --- ---If this function is not used, the particles rotate around their center. --- ----@param x number # The x coordinate of the rotation offset. ----@param y number # The y coordinate of the rotation offset. -function ParticleSystem:setOffset(x, y) end +function ParticleSystem:setOffset() end --- ---Sets the lifetime of the particles. @@ -1641,15 +1582,13 @@ function ParticleSystem:setParticleLifetime(min, max) end --- ---Sets the position of the emitter. --- ----@param x number # Position along x-axis. ----@param y number # Position along y-axis. -function ParticleSystem:setPosition(x, y) end +function ParticleSystem:setPosition() end --- ---Sets a series of Quads to use for the particle sprites. Particles will choose a Quad from the list based on the particle's current lifetime, allowing for the use of animated sprite sheets with ParticleSystems. --- ----@param quad1 love.graphics.Quad # The first Quad to use. ----@param quad2 love.graphics.Quad # The second Quad to use. +---@param quad1 love.Quad # The first Quad to use. +---@param quad2 love.Quad # The second Quad to use. function ParticleSystem:setQuads(quad1, quad2) end --- @@ -1724,7 +1663,7 @@ function ParticleSystem:setTangentialAcceleration(min, max) end --- ---Sets the texture (Image or Canvas) to be used for the particles. --- ----@param texture love.graphics.Texture # An Image or Canvas to use for the particles. +---@param texture love.Texture # An Image or Canvas to use for the particles. function ParticleSystem:setTexture(texture) end --- @@ -1743,7 +1682,7 @@ function ParticleSystem:stop() end ---@param dt number # The time (seconds) since last frame. function ParticleSystem:update(dt) end ----@class love.graphics.Quad: love.graphics.Object +---@class love.Quad: love.Object local Quad = {} --- @@ -1756,24 +1695,16 @@ function Quad:getTextureDimensions() end --- ---Gets the current viewport of this Quad. --- ----@return number x # The top-left corner along the x-axis. ----@return number y # The top-left corner along the y-axis. ----@return number w # The width of the viewport. ----@return number h # The height of the viewport. function Quad:getViewport() end --- ---Sets the texture coordinates according to a viewport. --- ----@param x number # The top-left corner along the x-axis. ----@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 # 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 +function Quad:setViewport(sw, sh) end ----@class love.graphics.Shader: love.graphics.Object +---@class love.Shader: love.Object local Shader = {} --- @@ -1814,8 +1745,7 @@ function Shader:hasUniform(name) end --- ---@param name string # Name of the number to send to the shader. ---@param number number # Number to send to store in the uniform variable. ----@param ... number # Additional numbers to send if the uniform variable is an array. -function Shader:send(name, number, ...) end +function Shader:send(name, number) end --- ---Sends one or more colors to a special (''extern'' / ''uniform'') vec3 or vec4 variable inside the shader. The color components must be in the range of 1. The colors are gamma-corrected if global gamma-correction is enabled. @@ -1834,18 +1764,14 @@ function Shader:send(name, number, ...) end --- ---@param name string # The name of the color extern variable to send to in the shader. ---@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. ----@param ... 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 +function Shader:sendColor(name, color) end ----@class love.graphics.SpriteBatch: love.graphics.Drawable, love.graphics.Object +---@class love.SpriteBatch: love.Drawable, love.Object local SpriteBatch = {} --- ---Adds a sprite to the batch. Sprites are drawn in the order they are added. --- ----@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). ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). ---@param ox number # Origin offset (x-axis). @@ -1853,15 +1779,12 @@ local SpriteBatch = {} ---@param kx number # Shear factor (x-axis). ---@param ky number # Shear factor (y-axis). ---@return number id # An identifier for the added sprite. -function SpriteBatch:add(x, y, r, sx, sy, ox, oy, kx, ky) end +function SpriteBatch:add(sx, sy, ox, oy, kx, ky) end --- ---Adds a sprite to a batch created with an Array Texture. --- ---@param layerindex number # The index of the layer to use for this sprite. ----@param x number # The position to draw the sprite (x-axis). ----@param y number # The position to draw the sprite (y-axis). ----@param r number # Orientation (radians). ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). ---@param ox number # Origin offset (x-axis). @@ -1869,7 +1792,7 @@ function SpriteBatch:add(x, y, r, sx, sy, ox, oy, kx, ky) end ---@param kx number # Shearing factor (x-axis). ---@param ky number # Shearing factor (y-axis). ---@return number spriteindex # The index of the added sprite, for use with SpriteBatch:set or SpriteBatch:setLayer. -function SpriteBatch:addLayer(layerindex, x, y, r, sx, sy, ox, oy, kx, ky) end +function SpriteBatch:addLayer(layerindex, sx, sy, ox, oy, kx, ky) end --- ---Attaches a per-vertex attribute from a Mesh onto this SpriteBatch, for use when drawing. This can be combined with a Shader to augment a SpriteBatch with per-vertex or additional per-sprite information instead of just having per-sprite colors. @@ -1877,7 +1800,7 @@ function SpriteBatch:addLayer(layerindex, x, y, r, sx, sy, ox, oy, kx, ky) end ---Each sprite in a SpriteBatch has 4 vertices in the following order: top-left, bottom-left, top-right, bottom-right. The index returned by SpriteBatch:add (and used by SpriteBatch:set) can used to determine the first vertex of a specific sprite with the formula 1 + 4 * ( id - 1 ). --- ---@param name string # The name of the vertex attribute to attach. ----@param mesh love.graphics.Mesh # The Mesh to get the vertex attribute from. +---@param mesh love.Mesh # The Mesh to get the vertex attribute from. function SpriteBatch:attachAttribute(name, mesh) end --- @@ -1907,10 +1830,6 @@ function SpriteBatch:getBufferSize() end --- ---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. --- ----@return number r # The red component (0-1). ----@return number g # The green component (0-1). ----@return number b # The blue component (0-1). ----@return number a # The alpha component (0-1). function SpriteBatch:getColor() end --- @@ -1922,23 +1841,20 @@ function SpriteBatch:getCount() end --- ---Gets the texture (Image or Canvas) used by the SpriteBatch. --- ----@return love.graphics.Texture texture # The Image or Canvas used by the SpriteBatch. +---@return love.Texture texture # The Image or Canvas used by the SpriteBatch. function SpriteBatch:getTexture() end --- ---Changes a sprite in the batch. This requires the sprite index returned by SpriteBatch:add or SpriteBatch:addLayer. --- ---@param spriteindex number # The index of the sprite that will be changed. ----@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). ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). ---@param ox number # Origin offset (x-axis). ---@param oy number # Origin offset (y-axis). ---@param kx number # Shear factor (x-axis). ---@param ky number # Shear factor (y-axis). -function SpriteBatch:set(spriteindex, x, y, r, sx, sy, ox, oy, kx, ky) end +function SpriteBatch:set(spriteindex, sx, sy, ox, oy, kx, ky) end --- ---Sets the color that will be used for the next add and set operations. Calling the function without arguments will disable all per-sprite colors for the SpriteBatch. @@ -1947,11 +1863,7 @@ function SpriteBatch:set(spriteindex, x, y, r, sx, sy, ox, oy, kx, ky) end --- ---In version 0.9.2 and older, the global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color. --- ----@param r number # The amount of red. ----@param g number # The amount of green. ----@param b number # The amount of blue. ----@param a number # The amount of alpha. -function SpriteBatch:setColor(r, g, b, a) end +function SpriteBatch:setColor() end --- ---Restricts the drawn sprites in the SpriteBatch to a subset of the total. @@ -1965,32 +1877,27 @@ function SpriteBatch:setDrawRange(start, count) end --- ---@param spriteindex number # The index of the existing sprite to replace. ---@param layerindex number # The index of the layer in the Array Texture to use for this sprite. ----@param x number # The position to draw the sprite (x-axis). ----@param y number # The position to draw the sprite (y-axis). ----@param r number # Orientation (radians). ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). ---@param ox number # Origin offset (x-axis). ---@param oy number # Origin offset (y-axis). ---@param kx number # Shearing factor (x-axis). ---@param ky number # Shearing factor (y-axis). -function SpriteBatch:setLayer(spriteindex, layerindex, x, y, r, sx, sy, ox, oy, kx, ky) end +function SpriteBatch:setLayer(spriteindex, layerindex, sx, sy, ox, oy, kx, ky) end --- ---Sets the texture (Image or Canvas) used for the sprites in the batch, when drawing. --- ----@param texture love.graphics.Texture # The new Image or Canvas to use for the sprites in the batch. +---@param texture love.Texture # The new Image or Canvas to use for the sprites in the batch. function SpriteBatch:setTexture(texture) end ----@class love.graphics.Text: love.graphics.Drawable, love.graphics.Object +---@class love.Text: love.Drawable, love.Object local Text = {} --- ---Adds additional colored text to the Text object at the specified position. --- ---@param textstring string # The text to add to the object. ----@param x number # The position of the new text on the x-axis. ----@param y number # The position of the new text on the y-axis. ---@param angle number # The orientation of the new text in radians. ---@param sx number # Scale factor on the x-axis. ---@param sy number # Scale factor on the y-axis. @@ -1999,7 +1906,7 @@ local Text = {} ---@param kx number # Shearing / skew factor on the x-axis. ---@param ky number # Shearing / skew factor on the y-axis. ---@return number index # An index number that can be used with Text:getWidth or Text:getHeight. -function Text:add(textstring, x, y, angle, sx, sy, ox, oy, kx, ky) end +function Text:add(textstring, angle, sx, sy, ox, oy, kx, ky) end --- ---Adds additional formatted / colored text to the Text object at the specified position. @@ -2008,9 +1915,7 @@ function Text:add(textstring, x, y, angle, sx, sy, ox, oy, kx, ky) end --- ---@param textstring string # The text to add to the object. ---@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line. ----@param align love.graphics.AlignMode # The alignment of the text. ----@param x number # The position of the new text (x-axis). ----@param y number # The position of the new text (y-axis). +---@param align love.AlignMode # The alignment of the text. ---@param angle number # Orientation (radians). ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). @@ -2019,7 +1924,7 @@ function Text:add(textstring, x, y, angle, sx, sy, ox, oy, kx, ky) end ---@param kx number # Shearing / skew factor (x-axis). ---@param ky number # Shearing / skew factor (y-axis). ---@return number index # An index number that can be used with Text:getWidth or Text:getHeight. -function Text:addf(textstring, wraplimit, align, x, y, angle, sx, sy, ox, oy, kx, ky) end +function Text:addf(textstring, wraplimit, align, angle, sx, sy, ox, oy, kx, ky) end --- ---Clears the contents of the Text object. @@ -2036,13 +1941,13 @@ function Text:getDimensions() end --- ---Gets the Font used with the Text object. --- ----@return love.graphics.Font font # The font used with this Text object. +---@return love.Font font # The font used with this Text object. function Text:getFont() end --- ---Gets the height of the text in pixels. --- ----@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned. +---@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned. function Text:getHeight() end --- @@ -2060,7 +1965,7 @@ function Text:set(textstring) end --- ---Replaces the Font used with the text. --- ----@param font love.graphics.Font # The new font to use with this Text object. +---@param font love.Font # The new font to use with this Text object. function Text:setFont(font) end --- @@ -2068,10 +1973,10 @@ function Text:setFont(font) end --- ---@param textstring string # The new string of text to use. ---@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line. ----@param align love.graphics.AlignMode # The alignment of the text. +---@param align love.AlignMode # The alignment of the text. function Text:setf(textstring, wraplimit, align) end ----@class love.graphics.Texture: love.graphics.Drawable, love.graphics.Object +---@class love.Texture: love.Drawable, love.Object local Texture = {} --- @@ -2095,7 +2000,7 @@ function Texture:getDepth() end --- ---Depth texture comparison modes are advanced low-level functionality typically used with shadow mapping in 3D. --- ----@return love.graphics.CompareMode compare # The comparison mode used when sampling from this texture in a shader, or nil if setDepthSampleMode has not been called on this Texture. +---@return love.CompareMode compare # The comparison mode used when sampling from this texture in a shader, or nil if setDepthSampleMode has not been called on this Texture. function Texture:getDepthSampleMode() end --- @@ -2108,15 +2013,15 @@ function Texture:getDimensions() end --- ---Gets the filter mode of the Texture. --- ----@return love.graphics.FilterMode min # Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels). ----@return love.graphics.FilterMode mag # Filter mode to use when magnifying the texture (rendering it at a smaller size on-screen than its size in pixels). +---@return love.FilterMode min # Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels). +---@return love.FilterMode mag # Filter mode to use when magnifying the texture (rendering it at a smaller size on-screen than its size in pixels). ---@return number anisotropy # Maximum amount of anisotropic filtering used. function Texture:getFilter() end --- ---Gets the pixel format of the Texture. --- ----@return love.graphics.PixelFormat format # The pixel format the Texture was created with. +---@return love.PixelFormat format # The pixel format the Texture was created with. function Texture:getFormat() end --- @@ -2140,7 +2045,7 @@ function Texture:getMipmapCount() end --- ---Gets the mipmap filter mode for a Texture. Prior to 11.0 this method only worked on Images. --- ----@return love.graphics.FilterMode mode # The filter mode used in between mipmap levels. nil if mipmap filtering is not enabled. +---@return love.FilterMode mode # The filter mode used in between mipmap levels. nil if mipmap filtering is not enabled. ---@return number sharpness # Value used to determine whether the image should use more or less detailed mipmap levels than normal when drawing. function Texture:getMipmapFilter() end @@ -2172,7 +2077,7 @@ function Texture:getPixelWidth() end --- ---Gets the type of the Texture. --- ----@return love.graphics.TextureType texturetype # The type of the Texture. +---@return love.TextureType texturetype # The type of the Texture. function Texture:getTextureType() end --- @@ -2186,9 +2091,9 @@ function Texture:getWidth() end --- ---This function returns the currently set horizontal and vertical wrapping modes for the texture. --- ----@return love.graphics.WrapMode horiz # Horizontal wrapping mode of the texture. ----@return love.graphics.WrapMode vert # Vertical wrapping mode of the texture. ----@return love.graphics.WrapMode depth # Wrapping mode for the z-axis of a Volume texture. +---@return love.WrapMode horiz # Horizontal wrapping mode of the texture. +---@return love.WrapMode vert # Vertical wrapping mode of the texture. +---@return love.WrapMode depth # Wrapping mode for the z-axis of a Volume texture. function Texture:getWrap() end --- @@ -2208,14 +2113,14 @@ function Texture:isReadable() end --- ---Depth texture comparison can only be used with readable depth-formatted Canvases. --- ----@param compare love.graphics.CompareMode # The comparison mode used when sampling from this texture in a shader. +---@param compare love.CompareMode # The comparison mode used when sampling from this texture in a shader. function Texture:setDepthSampleMode(compare) end --- ---Sets the filter mode of the Texture. --- ----@param min love.graphics.FilterMode # Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels). ----@param mag love.graphics.FilterMode # Filter mode to use when magnifying the texture (rendering it at a larger size on-screen than its size in pixels). +---@param min love.FilterMode # Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels). +---@param mag love.FilterMode # Filter mode to use when magnifying the texture (rendering it at a larger size on-screen than its size in pixels). ---@param anisotropy number # Maximum amount of anisotropic filtering to use. function Texture:setFilter(min, mag, anisotropy) end @@ -2228,7 +2133,7 @@ function Texture:setFilter(min, mag, anisotropy) end --- ---Due to hardware restrictions and driver bugs, in versions prior to 0.10.0 images that weren't loaded from a CompressedData must have power-of-two dimensions (64x64, 512x256, etc.) to use mipmaps. --- ----@param filtermode love.graphics.FilterMode # The filter mode to use in between mipmap levels. 'nearest' will often give better performance. +---@param filtermode love.FilterMode # The filter mode to use in between mipmap levels. 'nearest' will often give better performance. ---@param sharpness number # A positive sharpness value makes the texture use a more detailed mipmap level when drawing, at the expense of performance. A negative value does the reverse. function Texture:setMipmapFilter(filtermode, sharpness) end @@ -2239,12 +2144,12 @@ function Texture:setMipmapFilter(filtermode, sharpness) end --- ---Clamped textures appear only once (with the edges of the texture stretching to fill the extent of the Quad), whereas repeated ones repeat as many times as there is room in the Quad. --- ----@param horiz love.graphics.WrapMode # Horizontal wrapping mode of the texture. ----@param vert love.graphics.WrapMode # Vertical wrapping mode of the texture. ----@param depth love.graphics.WrapMode # Wrapping mode for the z-axis of a Volume texture. +---@param horiz love.WrapMode # Horizontal wrapping mode of the texture. +---@param vert love.WrapMode # Vertical wrapping mode of the texture. +---@param depth love.WrapMode # Wrapping mode for the z-axis of a Volume texture. function Texture:setWrap(horiz, vert, depth) end ----@class love.graphics.Video: love.graphics.Drawable, love.graphics.Object +---@class love.Video: love.Drawable, love.Object local Video = {} --- @@ -2257,8 +2162,8 @@ function Video:getDimensions() end --- ---Gets the scaling filters used when drawing the Video. --- ----@return love.graphics.FilterMode min # The filter mode used when scaling the Video down. ----@return love.graphics.FilterMode mag # The filter mode used when scaling the Video up. +---@return love.FilterMode min # The filter mode used when scaling the Video down. +---@return love.FilterMode mag # The filter mode used when scaling the Video up. ---@return number anisotropy # Maximum amount of anisotropic filtering used. function Video:getFilter() end @@ -2271,13 +2176,13 @@ function Video:getHeight() end --- ---Gets the audio Source used for playing back the video's audio. May return nil if the video has no audio, or if Video:setSource is called with a nil argument. --- ----@return love.graphics.Source source # The audio Source used for audio playback, or nil if the video has no audio. +---@return love.Source source # The audio Source used for audio playback, or nil if the video has no audio. function Video:getSource() end --- ---Gets the VideoStream object used for decoding and controlling the video. --- ----@return love.graphics.VideoStream stream # The VideoStream used for decoding and controlling the video. +---@return love.VideoStream stream # The VideoStream used for decoding and controlling the video. function Video:getStream() end --- @@ -2316,15 +2221,15 @@ function Video:seek(offset) end --- ---Sets the scaling filters used when drawing the Video. --- ----@param min love.graphics.FilterMode # The filter mode used when scaling the Video down. ----@param mag love.graphics.FilterMode # The filter mode used when scaling the Video up. +---@param min love.FilterMode # The filter mode used when scaling the Video down. +---@param mag love.FilterMode # The filter mode used when scaling the Video up. ---@param anisotropy number # Maximum amount of anisotropic filtering used. function Video:setFilter(min, mag, anisotropy) end --- ---Sets the audio Source used for playing back the video's audio. The audio Source also controls playback speed and synchronization. --- ----@param source love.graphics.Source # The audio Source used for audio playback, or nil to disable audio synchronization. +---@param source love.Source # The audio Source used for audio playback, or nil to disable audio synchronization. function Video:setSource(source) end --- diff --git a/meta/3rd/love2d/library/love.image.lua b/meta/3rd/love2d/library/love.image.lua index be6c7411..5591153a 100644 --- a/meta/3rd/love2d/library/love.image.lua +++ b/meta/3rd/love2d/library/love.image.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.image love.image = {} @@ -12,7 +14,7 @@ function love.image.isCompressed(filename) end ---Create a new CompressedImageData object from a compressed image file. LÖVE supports several compressed texture formats, enumerated in the CompressedImageFormat page. --- ---@param filename string # The filename of the compressed image file. ----@return love.image.CompressedImageData compressedImageData # The new CompressedImageData object. +---@return love.CompressedImageData compressedImageData # The new CompressedImageData object. function love.image.newCompressedData(filename) end --- @@ -20,10 +22,10 @@ function love.image.newCompressedData(filename) end --- ---@param width number # The width of the ImageData. ---@param height number # The height of the ImageData. ----@return love.image.ImageData imageData # The new blank ImageData object. Each pixel's color values, (including the alpha values!) will be set to zero. +---@return love.ImageData imageData # The new blank ImageData object. Each pixel's color values, (including the alpha values!) will be set to zero. function love.image.newImageData(width, height) end ----@class love.image.CompressedImageData: love.image.Data, love.image.Object +---@class love.CompressedImageData: love.Data, love.Object local CompressedImageData = {} --- @@ -36,7 +38,7 @@ function CompressedImageData:getDimensions() end --- ---Gets the format of the CompressedImageData. --- ----@return love.image.CompressedImageFormat format # The format of the CompressedImageData. +---@return love.CompressedImageFormat format # The format of the CompressedImageData. function CompressedImageData:getFormat() end --- @@ -57,15 +59,15 @@ function CompressedImageData:getMipmapCount() end ---@return number width # The width of the CompressedImageData. function CompressedImageData:getWidth() end ----@class love.image.ImageData: love.image.Data, love.image.Object +---@class love.ImageData: love.Data, love.Object local ImageData = {} --- ---Encodes the ImageData and optionally writes it to the save directory. --- ----@param format love.image.ImageFormat # The format to encode the image as. +---@param format love.ImageFormat # The format to encode the image as. ---@param filename string # The filename to write the file to. If nil, no file will be written but the FileData will still be returned. ----@return love.image.FileData filedata # The encoded image as a new FileData object. +---@return love.FileData filedata # The encoded image as a new FileData object. function ImageData:encode(format, filename) end --- @@ -88,13 +90,7 @@ function ImageData:getHeight() end --- ---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. --- ----@param x number # The position of the pixel on the x-axis. ----@param y number # The position of the pixel on the y-axis. ----@return number r # The red component (0-1). ----@return number g # The green component (0-1). ----@return number b # The blue component (0-1). ----@return number a # The alpha component (0-1). -function ImageData:getPixel(x, y) end +function ImageData:getPixel() end --- ---Gets the width of the ImageData in pixels. @@ -124,16 +120,14 @@ function ImageData:getWidth() end ---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. --- ---@param pixelFunction function # Function to apply to every pixel. ----@param x number # The x-axis of the top-left corner of the area within the ImageData to apply the function to. ----@param y number # The y-axis of the top-left corner of the area within the ImageData to apply the function to. ---@param width number # The width of the area within the ImageData to apply the function to. ---@param height number # The height of the area within the ImageData to apply the function to. -function ImageData:mapPixel(pixelFunction, x, y, width, height) end +function ImageData:mapPixel(pixelFunction, width, height) end --- ---Paste into ImageData from another source ImageData. --- ----@param source love.image.ImageData # Source ImageData from which to copy. +---@param source love.ImageData # Source ImageData from which to copy. ---@param dx number # Destination top-left position on x-axis. ---@param dy number # Destination top-left position on y-axis. ---@param sx number # Source top-left position on x-axis. @@ -149,10 +143,4 @@ function ImageData:paste(source, dx, dy, sx, sy, sw, sh) end --- ---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. --- ----@param x number # The position of the pixel on the x-axis. ----@param y number # The position of the pixel on the y-axis. ----@param r number # The red component (0-1). ----@param g number # The green component (0-1). ----@param b number # The blue component (0-1). ----@param a number # The alpha component (0-1). -function ImageData:setPixel(x, y, r, g, b, a) end +function ImageData:setPixel() end diff --git a/meta/3rd/love2d/library/love.joystick.lua b/meta/3rd/love2d/library/love.joystick.lua index 193f2b94..0af1b5dc 100644 --- a/meta/3rd/love2d/library/love.joystick.lua +++ b/meta/3rd/love2d/library/love.joystick.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.joystick love.joystick = {} @@ -47,14 +49,14 @@ function love.joystick.saveGamepadMappings(filename) end ---The virtual gamepad buttons and axes are designed around the Xbox 360 controller layout. --- ---@param guid string # The OS-dependent GUID for the type of Joystick the binding will affect. ----@param button love.joystick.GamepadButton # The virtual gamepad button to bind. ----@param inputtype love.joystick.JoystickInputType # The type of input to bind the virtual gamepad button to. +---@param button love.GamepadButton # The virtual gamepad button to bind. +---@param inputtype love.JoystickInputType # The type of input to bind the virtual gamepad button to. ---@param inputindex number # The index of the axis, button, or hat to bind the virtual gamepad button to. ----@param hatdir love.joystick.JoystickHat # The direction of the hat, if the virtual gamepad button will be bound to a hat. nil otherwise. +---@param hatdir love.JoystickHat # The direction of the hat, if the virtual gamepad button will be bound to a hat. nil otherwise. ---@return boolean success # Whether the virtual gamepad button was successfully bound. function love.joystick.setGamepadMapping(guid, button, inputtype, inputindex, hatdir) end ----@class love.joystick.Joystick: love.joystick.Object +---@class love.Joystick: love.Object local Joystick = {} --- @@ -103,17 +105,17 @@ function Joystick:getGUID() end --- ---Gets the direction of a virtual gamepad axis. If the Joystick isn't recognized as a gamepad or isn't connected, this function will always return 0. --- ----@param axis love.joystick.GamepadAxis # The virtual axis to be checked. +---@param axis love.GamepadAxis # The virtual axis to be checked. ---@return number direction # Current value of the axis. function Joystick:getGamepadAxis(axis) end --- ---Gets the button, axis or hat that a virtual gamepad input is bound to. --- ----@param axis love.joystick.GamepadAxis # The virtual gamepad axis to get the binding for. ----@return love.joystick.JoystickInputType inputtype # The type of input the virtual gamepad axis is bound to. +---@param axis love.GamepadAxis # The virtual gamepad axis to get the binding for. +---@return love.JoystickInputType inputtype # The type of input the virtual gamepad axis is bound to. ---@return number inputindex # The index of the Joystick's button, axis or hat that the virtual gamepad axis is bound to. ----@return love.joystick.JoystickHat hatdirection # The direction of the hat, if the virtual gamepad axis is bound to a hat. nil otherwise. +---@return love.JoystickHat hatdirection # The direction of the hat, if the virtual gamepad axis is bound to a hat. nil otherwise. function Joystick:getGamepadMapping(axis) end --- @@ -128,7 +130,7 @@ function Joystick:getGamepadMappingString() end ---Gets the direction of the Joystick's hat. --- ---@param hat number # The index of the hat to be checked. ----@return love.joystick.JoystickHat direction # The direction the hat is pushed. +---@return love.JoystickHat direction # The direction the hat is pushed. function Joystick:getHat(hat) end --- @@ -183,7 +185,7 @@ function Joystick:isGamepad() end --- ---Checks if a virtual gamepad button on the Joystick is pressed. If the Joystick is not recognized as a Gamepad or isn't connected, then this function will always return false. --- ----@param buttonN love.joystick.GamepadButton # The gamepad button to check. +---@param buttonN love.GamepadButton # The gamepad button to check. ---@return boolean anyDown # True if any supplied button is down, false if not. function Joystick:isGamepadDown(buttonN) end diff --git a/meta/3rd/love2d/library/love.keyboard.lua b/meta/3rd/love2d/library/love.keyboard.lua index 87674b27..00cb9677 100644 --- a/meta/3rd/love2d/library/love.keyboard.lua +++ b/meta/3rd/love2d/library/love.keyboard.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.keyboard love.keyboard = {} @@ -8,8 +10,8 @@ love.keyboard = {} --- ---Scancodes are useful for creating default controls that have the same physical locations on on all systems. --- ----@param scancode love.keyboard.Scancode # The scancode to get the key from. ----@return love.keyboard.KeyConstant key # The key corresponding to the given scancode, or 'unknown' if the scancode doesn't map to a KeyConstant on the current system. +---@param scancode love.Scancode # The scancode to get the key from. +---@return love.KeyConstant key # The key corresponding to the given scancode, or 'unknown' if the scancode doesn't map to a KeyConstant on the current system. function love.keyboard.getKeyFromScancode(scancode) end --- @@ -19,8 +21,8 @@ function love.keyboard.getKeyFromScancode(scancode) end --- ---Scancodes are useful for creating default controls that have the same physical locations on on all systems. --- ----@param key love.keyboard.KeyConstant # The key to get the scancode from. ----@return love.keyboard.Scancode scancode # The scancode corresponding to the given key, or 'unknown' if the given key has no known physical representation on the current system. +---@param key love.KeyConstant # The key to get the scancode from. +---@return love.Scancode scancode # The scancode corresponding to the given key, or 'unknown' if the given key has no known physical representation on the current system. function love.keyboard.getScancodeFromKey(key) end --- @@ -44,7 +46,7 @@ function love.keyboard.hasTextInput() end --- ---Checks whether a certain key is down. Not to be confused with love.keypressed or love.keyreleased. --- ----@param key love.keyboard.KeyConstant # The key to check. +---@param key love.KeyConstant # The key to check. ---@return boolean down # True if the key is down, false if not. function love.keyboard.isDown(key) end @@ -53,10 +55,9 @@ function love.keyboard.isDown(key) end --- ---Unlike regular KeyConstants, Scancodes are keyboard layout-independent. The scancode 'w' is used if the key in the same place as the 'w' key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are. --- ----@param scancode love.keyboard.Scancode # A Scancode to check. ----@param ... love.keyboard.Scancode # Additional Scancodes to check. +---@param scancode love.Scancode # A Scancode to check. ---@return boolean down # True if any supplied Scancode is down, false if not. -function love.keyboard.isScancodeDown(scancode, ...) end +function love.keyboard.isScancodeDown(scancode) end --- ---Enables or disables key repeat for love.keypressed. It is disabled by default. diff --git a/meta/3rd/love2d/library/love.lua b/meta/3rd/love2d/library/love.lua index 96d1dca1..25ebcf0b 100644 --- a/meta/3rd/love2d/library/love.lua +++ b/meta/3rd/love2d/library/love.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love love = {} @@ -82,5 +84,4 @@ function Object:type() end ---Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true. --- ---@param name string # The name of the type to check for. ----@return boolean b # True if the object is of the specified type, false otherwise. function Object:typeOf(name) end diff --git a/meta/3rd/love2d/library/love.math.lua b/meta/3rd/love2d/library/love.math.lua index 137d506d..2f63a8e8 100644 --- a/meta/3rd/love2d/library/love.math.lua +++ b/meta/3rd/love2d/library/love.math.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.math love.math = {} @@ -8,38 +10,30 @@ love.math = {} ---@param gb number # Green color component in 0..255 range. ---@param bb number # Blue color component in 0..255 range. ---@param ab number # Alpha color component in 0..255 range. ----@return number r # Red color component in 0..1 range. ----@return number g # Green color component in 0..1 range. ----@return number b # Blue color component in 0..1 range. ----@return number a # Alpha color component in 0..1 range or nil if alpha is not specified. function love.math.colorFromBytes(rb, gb, bb, ab) end --- ---Converts a color from 0..1 to 0..255 range. --- ----@param r number # Red color component. ----@param g number # Green color component. ----@param b number # Blue color component. ----@param a number # Alpha color component. ---@return number rb # Red color component in 0..255 range. ---@return number gb # Green color component in 0..255 range. ---@return number bb # Blue color component in 0..255 range. ---@return number ab # Alpha color component in 0..255 range or nil if alpha is not specified. -function love.math.colorToBytes(r, g, b, a) end +function love.math.colorToBytes() end --- ---Compresses a string or data using a specific compression algorithm. --- ---@param rawstring string # The raw (un-compressed) string to compress. ----@param format love.math.CompressedDataFormat # The format to use when compressing the string. +---@param format love.CompressedDataFormat # The format to use when compressing the string. ---@param level number # The level of compression to use, between 0 and 9. -1 indicates the default level. The meaning of this argument depends on the compression format being used. ----@return love.math.CompressedData compressedData # A new Data object containing the compressed version of the string. +---@return love.CompressedData compressedData # A new Data object containing the compressed version of the string. function love.math.compress(rawstring, format, level) end --- ---Decompresses a CompressedData or previously compressed string or Data object. --- ----@param compressedData love.math.CompressedData # The compressed data to decompress. +---@param compressedData love.CompressedData # The compressed data to decompress. ---@return string rawstring # A string containing the raw decompressed data. function love.math.decompress(compressedData) end @@ -50,13 +44,10 @@ function love.math.decompress(compressedData) end --- ---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. --- ----@param r number # The red channel of the sRGB color to convert. ----@param g number # The green channel of the sRGB color to convert. ----@param b number # The blue channel of the sRGB color to convert. ---@return number lr # The red channel of the converted color in linear RGB space. ---@return number lg # The green channel of the converted color in linear RGB space. ---@return number lb # The blue channel of the converted color in linear RGB space. -function love.math.gammaToLinear(r, g, b) end +function love.math.gammaToLinear() end --- ---Gets the seed of the random number generator. @@ -107,19 +98,19 @@ function love.math.linearToGamma(lr, lg, lb) end ---The number of vertices in the control polygon determines the degree of the curve, e.g. three vertices define a quadratic (degree 2) Bézier curve, four vertices define a cubic (degree 3) Bézier curve, etc. --- ---@param vertices table # The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. ----@return love.math.BezierCurve curve # A Bézier curve object. +---@return love.BezierCurve curve # A Bézier curve object. function love.math.newBezierCurve(vertices) end --- ---Creates a new RandomGenerator object which is completely independent of other RandomGenerator objects and random functions. --- ----@return love.math.RandomGenerator rng # The new Random Number Generator object. +---@return love.RandomGenerator rng # The new Random Number Generator object. function love.math.newRandomGenerator() end --- ---Creates a new Transform object. --- ----@return love.math.Transform transform # The new Transform object. +---@return love.Transform transform # The new Transform object. function love.math.newTransform() end --- @@ -129,9 +120,8 @@ function love.math.newTransform() end --- ---There are many webpages which discuss Perlin and Simplex noise in detail. --- ----@param x number # The number used to generate the noise value. ---@return number value # The noise value in the range of 1. -function love.math.noise(x) end +function love.math.noise() end --- ---Generates a pseudo-random number in a platform independent manner. The default love.run seeds this function at startup, so you generally don't need to seed it yourself. @@ -168,7 +158,7 @@ function love.math.setRandomState(state) end ---@return table triangles # List of triangles the polygon is composed of, in the form of {{x1, y1, x2, y2, x3, y3}, {x1, y1, x2, y2, x3, y3}, ...}. function love.math.triangulate(polygon) end ----@class love.math.BezierCurve: love.math.Object +---@class love.BezierCurve: love.Object local BezierCurve = {} --- @@ -176,18 +166,12 @@ local BezierCurve = {} --- ---This function can be used to move objects along paths or tween parameters. However it should not be used to render the curve, see BezierCurve:render for that purpose. --- ----@param t number # Where to evaluate the curve. ----@return number x # x coordinate of the curve at parameter t. ----@return number y # y coordinate of the curve at parameter t. -function BezierCurve:evaluate(t) end +function BezierCurve:evaluate() end --- ---Get coordinates of the i-th control point. Indices start with 1. --- ----@param i number # Index of the control point. ----@return number x # Position of the control point along the x axis. ----@return number y # Position of the control point along the y axis. -function BezierCurve:getControlPoint(i) end +function BezierCurve:getControlPoint() end --- ---Get the number of control points in the Bézier curve. @@ -206,7 +190,7 @@ function BezierCurve:getDegree() end --- ---This function can be used to rotate sprites moving along a curve in the direction of the movement and compute the direction perpendicular to the curve at some parameter t. --- ----@return love.math.BezierCurve derivative # The derivative curve. +---@return love.BezierCurve derivative # The derivative curve. function BezierCurve:getDerivative() end --- @@ -214,16 +198,13 @@ function BezierCurve:getDerivative() end --- ---@param startpoint number # The starting point along the curve. Must be between 0 and 1. ---@param endpoint number # The end of the segment. Must be between 0 and 1. ----@return love.math.BezierCurve curve # A BezierCurve that corresponds to the specified segment. +---@return love.BezierCurve curve # A BezierCurve that corresponds to the specified segment. function BezierCurve:getSegment(startpoint, endpoint) end --- ---Insert control point as the new i-th control point. Existing control points from i onwards are pushed back by 1. Indices start with 1. Negative indices wrap around: -1 is the last control point, -2 the one before the last, etc. --- ----@param x number # Position of the control point along the x axis. ----@param y number # Position of the control point along the y axis. ----@param i number # Index of the control point. -function BezierCurve:insertControlPoint(x, y, i) end +function BezierCurve:insertControlPoint() end --- ---Removes the specified control point. @@ -266,18 +247,14 @@ function BezierCurve:rotate(angle, ox, oy) end --- ---Scale the Bézier curve by a factor. --- ----@param s number # Scale factor. ---@param ox number # X coordinate of the scaling center. ---@param oy number # Y coordinate of the scaling center. -function BezierCurve:scale(s, ox, oy) end +function BezierCurve:scale(ox, oy) end --- ---Set coordinates of the i-th control point. Indices start with 1. --- ----@param i number # Index of the control point. ----@param x number # Position of the control point along the x axis. ----@param y number # Position of the control point along the y axis. -function BezierCurve:setControlPoint(i, x, y) end +function BezierCurve:setControlPoint() end --- ---Move the Bézier curve by an offset. @@ -286,7 +263,7 @@ function BezierCurve:setControlPoint(i, x, y) end ---@param dy number # Offset along the y axis. function BezierCurve:translate(dx, dy) end ----@class love.math.RandomGenerator: love.math.Object +---@class love.RandomGenerator: love.Object local RandomGenerator = {} --- @@ -334,7 +311,7 @@ function RandomGenerator:setSeed(seed) end ---@param state string # The new state of the RandomGenerator object, represented as a string. This should originate from a previous call to RandomGenerator:getState. function RandomGenerator:setState(state) end ----@class love.math.Transform: love.math.Object +---@class love.Transform: love.Object local Transform = {} --- @@ -342,14 +319,14 @@ local Transform = {} --- ---This effectively multiplies this Transform's internal transformation matrix with the other Transform's (i.e. self * other), and stores the result in this object. --- ----@param other love.math.Transform # The other Transform object to apply to this Transform. ----@return love.math.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. +---@param other love.Transform # The other Transform object to apply to this Transform. +---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. function Transform:apply(other) end --- ---Creates a new copy of this Transform. --- ----@return love.math.Transform clone # The copy of this Transform. +---@return love.Transform clone # The copy of this Transform. function Transform:clone() end --- @@ -357,14 +334,13 @@ function Transform:clone() end --- ---@return number e1_1 # The first column of the first row of the matrix. ---@return number e1_2 # The second column of the first row of the matrix. ----@return number ... # Additional matrix elements. ---@return number e4_4 # The fourth column of the fourth row of the matrix. function Transform:getMatrix() end --- ---Creates a new Transform containing the inverse of this Transform. --- ----@return love.math.Transform inverse # A new Transform object representing the inverse of this Transform's matrix. +---@return love.Transform inverse # A new Transform object representing the inverse of this Transform's matrix. function Transform:inverse() end --- @@ -389,14 +365,14 @@ function Transform:isAffine2DTransform() end --- ---Resets the Transform to an identity state. All previously applied transformations are erased. --- ----@return love.math.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. +---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. function Transform:reset() end --- ---Applies a rotation to the Transform's coordinate system. This method does not reset any previously applied transformations. --- ---@param angle number # The relative angle in radians to rotate this Transform by. ----@return love.math.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. +---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. function Transform:rotate(angle) end --- @@ -404,7 +380,7 @@ function Transform:rotate(angle) end --- ---@param sx number # The relative scale factor along the x-axis. ---@param sy number # The relative scale factor along the y-axis. ----@return love.math.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. +---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. function Transform:scale(sx, sy) end --- @@ -412,16 +388,13 @@ function Transform:scale(sx, sy) end --- ---@param e1_1 number # The first column of the first row of the matrix. ---@param e1_2 number # The second column of the first row of the matrix. ----@param ... number # Additional matrix elements. ---@param e4_4 number # The fourth column of the fourth row of the matrix. ----@return love.math.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:setMatrix(e1_1, e1_2, ..., e4_4) end +---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. +function Transform:setMatrix(e1_1, e1_2, e4_4) end --- ---Resets the Transform to the specified transformation parameters. --- ----@param x number # The position of the Transform on the x-axis. ----@param y number # The position of the Transform on the y-axis. ---@param angle number # The orientation of the Transform in radians. ---@param sx number # Scale factor on the x-axis. ---@param sy number # Scale factor on the y-axis. @@ -429,15 +402,15 @@ function Transform:setMatrix(e1_1, e1_2, ..., e4_4) end ---@param oy number # Origin offset on the y-axis. ---@param kx number # Shearing / skew factor on the x-axis. ---@param ky number # Shearing / skew factor on the y-axis. ----@return love.math.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky) end +---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. +function Transform:setTransformation(angle, sx, sy, ox, oy, kx, ky) end --- ---Applies a shear factor (skew) to the Transform's coordinate system. This method does not reset any previously applied transformations. --- ---@param kx number # The shear factor along the x-axis. ---@param ky number # The shear factor along the y-axis. ----@return love.math.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. +---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. function Transform:shear(kx, ky) end --- @@ -456,5 +429,5 @@ function Transform:transformPoint(globalX, globalY) end --- ---@param dx number # The relative translation along the x-axis. ---@param dy number # The relative translation along the y-axis. ----@return love.math.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. +---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. function Transform:translate(dx, dy) end diff --git a/meta/3rd/love2d/library/love.mouse.lua b/meta/3rd/love2d/library/love.mouse.lua index 3db27a46..c4399876 100644 --- a/meta/3rd/love2d/library/love.mouse.lua +++ b/meta/3rd/love2d/library/love.mouse.lua @@ -1,17 +1,17 @@ +---@meta + ---@class love.mouse love.mouse = {} --- ---Gets the current Cursor. --- ----@return love.mouse.Cursor cursor # The current cursor, or nil if no cursor is set. +---@return love.Cursor cursor # The current cursor, or nil if no cursor is set. function love.mouse.getCursor() end --- ---Returns the current position of the mouse. --- ----@return number x # The position of the mouse along the x-axis. ----@return number y # The position of the mouse along the y-axis. function love.mouse.getPosition() end --- @@ -29,20 +29,18 @@ function love.mouse.getRelativeMode() end --- ---Hardware cursors are framerate-independent and work the same way as normal operating system cursors. Unlike drawing an image at the mouse's current coordinates, hardware cursors never have visible lag between when the mouse is moved and when the cursor position updates, even at low framerates. --- ----@param ctype love.mouse.CursorType # The type of system cursor to get. ----@return love.mouse.Cursor cursor # The Cursor object representing the system cursor type. +---@param ctype love.CursorType # The type of system cursor to get. +---@return love.Cursor cursor # The Cursor object representing the system cursor type. function love.mouse.getSystemCursor(ctype) end --- ---Returns the current x-position of the mouse. --- ----@return number x # The position of the mouse along the x-axis. function love.mouse.getX() end --- ---Returns the current y-position of the mouse. --- ----@return number y # The position of the mouse along the y-axis. function love.mouse.getY() end --- @@ -59,9 +57,8 @@ function love.mouse.isCursorSupported() end ---This function does not detect mouse wheel scrolling; you must use the love.wheelmoved (or love.mousepressed in version 0.9.2 and older) callback for that. --- ---@param button number # The index of a button to check. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependant. ----@param ... number # Additional button numbers to check. ---@return boolean down # True if any specified button is down. -function love.mouse.isDown(button, ...) end +function love.mouse.isDown(button) end --- ---Checks if the mouse is grabbed. @@ -82,16 +79,16 @@ function love.mouse.isVisible() end --- ---The hot spot is the point the operating system uses to determine what was clicked and at what position the mouse cursor is. For example, the normal arrow pointer normally has its hot spot at the top left of the image, but a crosshair cursor might have it in the middle. --- ----@param imageData love.mouse.ImageData # The ImageData to use for the new Cursor. +---@param imageData love.ImageData # The ImageData to use for the new Cursor. ---@param hotx number # The x-coordinate in the ImageData of the cursor's hot spot. ---@param hoty number # The y-coordinate in the ImageData of the cursor's hot spot. ----@return love.mouse.Cursor cursor # The new Cursor object. +---@return love.Cursor cursor # The new Cursor object. function love.mouse.newCursor(imageData, hotx, hoty) end --- ---Sets the current mouse cursor. --- ----@param cursor love.mouse.Cursor # The Cursor object to use as the current mouse cursor. +---@param cursor love.Cursor # The Cursor object to use as the current mouse cursor. function love.mouse.setCursor(cursor) end --- @@ -103,9 +100,7 @@ function love.mouse.setGrabbed(grab) end --- ---Sets the current position of the mouse. Non-integer values are floored. --- ----@param x number # The new position of the mouse along the x-axis. ----@param y number # The new position of the mouse along the y-axis. -function love.mouse.setPosition(x, y) end +function love.mouse.setPosition() end --- ---Sets whether relative mode is enabled for the mouse. @@ -128,22 +123,20 @@ function love.mouse.setVisible(visible) end --- ---Non-integer values are floored. --- ----@param x number # The new position of the mouse along the x-axis. -function love.mouse.setX(x) end +function love.mouse.setX() end --- ---Sets the current Y position of the mouse. --- ---Non-integer values are floored. --- ----@param y number # The new position of the mouse along the y-axis. -function love.mouse.setY(y) end +function love.mouse.setY() end ----@class love.mouse.Cursor: love.mouse.Object +---@class love.Cursor: love.Object local Cursor = {} --- ---Gets the type of the Cursor. --- ----@return love.mouse.CursorType ctype # The type of the Cursor. +---@return love.CursorType ctype # The type of the Cursor. function Cursor:getType() end diff --git a/meta/3rd/love2d/library/love.physics.lua b/meta/3rd/love2d/library/love.physics.lua index 4d6d99ea..7004b5d5 100644 --- a/meta/3rd/love2d/library/love.physics.lua +++ b/meta/3rd/love2d/library/love.physics.lua @@ -1,11 +1,13 @@ +---@meta + ---@class love.physics love.physics = {} --- ---Returns the two closest points between two fixtures and their distance. --- ----@param fixture1 love.physics.Fixture # The first fixture. ----@param fixture2 love.physics.Fixture # The second fixture. +---@param fixture1 love.Fixture # The first fixture. +---@param fixture2 love.Fixture # The second fixture. ---@return number distance # The distance of the two points. ---@return number x1 # The x-coordinate of the first point. ---@return number y1 # The y-coordinate of the first point. @@ -36,12 +38,10 @@ function love.physics.getMeter() end --- ---The mass of the body gets calculated when a Fixture is attached or removed, but can be changed at any time with Body:setMass or Body:resetMassData. --- ----@param world love.physics.World # The world to create the body in. ----@param x number # The x position of the body. ----@param y number # The y position of the body. ----@param type love.physics.BodyType # The type of the body. ----@return love.physics.Body body # A new body. -function love.physics.newBody(world, x, y, type) end +---@param world love.World # The world to create the body in. +---@param type love.BodyType # The type of the body. +---@return love.Body body # A new body. +function love.physics.newBody(world, type) end --- ---Creates a new ChainShape. @@ -51,15 +51,14 @@ function love.physics.newBody(world, x, y, type) end ---@param y1 number # The y position of the first point. ---@param x2 number # The x position of the second point. ---@param y2 number # The y position of the second point. ----@param ... number # Additional point positions. ----@return love.physics.ChainShape shape # The new shape. -function love.physics.newChainShape(loop, x1, y1, x2, y2, ...) end +---@return love.ChainShape shape # The new shape. +function love.physics.newChainShape(loop, x1, y1, x2, y2) end --- ---Creates a new CircleShape. --- ---@param radius number # The radius of the circle. ----@return love.physics.CircleShape shape # The new shape. +---@return love.CircleShape shape # The new shape. function love.physics.newCircleShape(radius) end --- @@ -67,14 +66,14 @@ function love.physics.newCircleShape(radius) end --- ---This joint constrains the distance between two points on two bodies to be constant. These two points are specified in world coordinates and the two bodies are assumed to be in place when this joint is created. The first anchor point is connected to the first body and the second to the second body, and the points define the length of the distance joint. --- ----@param body1 love.physics.Body # The first body to attach to the joint. ----@param body2 love.physics.Body # The second body to attach to the joint. +---@param body1 love.Body # The first body to attach to the joint. +---@param body2 love.Body # The second body to attach to the joint. ---@param x1 number # The x position of the first anchor point (world space). ---@param y1 number # The y position of the first anchor point (world space). ---@param x2 number # The x position of the second anchor point (world space). ---@param y2 number # The y position of the second anchor point (world space). ---@param collideConnected boolean # Specifies whether the two bodies should collide with each other. ----@return love.physics.DistanceJoint joint # The new distance joint. +---@return love.DistanceJoint joint # The new distance joint. function love.physics.newDistanceJoint(body1, body2, x1, y1, x2, y2, collideConnected) end --- @@ -84,7 +83,7 @@ function love.physics.newDistanceJoint(body1, body2, x1, y1, x2, y2, collideConn ---@param y1 number # The y position of the first point. ---@param x2 number # The x position of the second point. ---@param y2 number # The y position of the second point. ----@return love.physics.EdgeShape shape # The new shape. +---@return love.EdgeShape shape # The new shape. function love.physics.newEdgeShape(x1, y1, x2, y2) end --- @@ -92,22 +91,20 @@ function love.physics.newEdgeShape(x1, y1, x2, y2) end --- ---Note that the Shape object is copied rather than kept as a reference when the Fixture is created. To get the Shape object that the Fixture owns, use Fixture:getShape. --- ----@param body love.physics.Body # The body which gets the fixture attached. ----@param shape love.physics.Shape # The shape to be copied to the fixture. +---@param body love.Body # The body which gets the fixture attached. +---@param shape love.Shape # The shape to be copied to the fixture. ---@param density number # The density of the fixture. ----@return love.physics.Fixture fixture # The new fixture. +---@return love.Fixture fixture # The new fixture. function love.physics.newFixture(body, shape, density) end --- ---Create a friction joint between two bodies. A FrictionJoint applies friction to a body. --- ----@param body1 love.physics.Body # The first body to attach to the joint. ----@param body2 love.physics.Body # The second body to attach to the joint. ----@param x number # The x position of the anchor point. ----@param y number # The y position of the anchor point. +---@param body1 love.Body # The first body to attach to the joint. +---@param body2 love.Body # The second body to attach to the joint. ---@param collideConnected boolean # Specifies whether the two bodies should collide with each other. ----@return love.physics.FrictionJoint joint # The new FrictionJoint. -function love.physics.newFrictionJoint(body1, body2, x, y, collideConnected) end +---@return love.FrictionJoint joint # The new FrictionJoint. +function love.physics.newFrictionJoint(body1, body2, collideConnected) end --- ---Create a GearJoint connecting two Joints. @@ -116,11 +113,11 @@ function love.physics.newFrictionJoint(body1, body2, x, y, collideConnected) end --- ---The gear joint has a ratio the determines how the angular or distance values of the connected joints relate to each other. The formula coordinate1 + ratio * coordinate2 always has a constant value that is set when the gear joint is created. --- ----@param joint1 love.physics.Joint # The first joint to connect with a gear joint. ----@param joint2 love.physics.Joint # The second joint to connect with a gear joint. +---@param joint1 love.Joint # The first joint to connect with a gear joint. +---@param joint2 love.Joint # The second joint to connect with a gear joint. ---@param ratio number # The gear ratio. ---@param collideConnected boolean # Specifies whether the two bodies should collide with each other. ----@return love.physics.GearJoint joint # The new gear joint. +---@return love.GearJoint joint # The new gear joint. function love.physics.newGearJoint(joint1, joint2, ratio, collideConnected) end --- @@ -128,10 +125,10 @@ function love.physics.newGearJoint(joint1, joint2, ratio, collideConnected) end --- ---Position and rotation offsets can be specified once the MotorJoint has been created, as well as the maximum motor force and torque that will be be applied to reach the target offsets. --- ----@param body1 love.physics.Body # The first body to attach to the joint. ----@param body2 love.physics.Body # The second body to attach to the joint. +---@param body1 love.Body # The first body to attach to the joint. +---@param body2 love.Body # The second body to attach to the joint. ---@param correctionFactor number # The joint's initial position correction factor, in the range of 1. ----@return love.physics.MotorJoint joint # The new MotorJoint. +---@return love.MotorJoint joint # The new MotorJoint. function love.physics.newMotorJoint(body1, body2, correctionFactor) end --- @@ -141,11 +138,9 @@ function love.physics.newMotorJoint(body1, body2, correctionFactor) end --- ---The advantage of using a MouseJoint instead of just changing a body position directly is that collisions and reactions to other joints are handled by the physics engine. --- ----@param body love.physics.Body # The body to attach to the mouse. ----@param x number # The x position of the connecting point. ----@param y number # The y position of the connecting point. ----@return love.physics.MouseJoint joint # The new mouse joint. -function love.physics.newMouseJoint(body, x, y) end +---@param body love.Body # The body to attach to the mouse. +---@return love.MouseJoint joint # The new mouse joint. +function love.physics.newMouseJoint(body) end --- ---Creates a new PolygonShape. @@ -158,24 +153,21 @@ function love.physics.newMouseJoint(body, x, y) end ---@param y2 number # The y position of the second point. ---@param x3 number # The x position of the third point. ---@param y3 number # The y position of the third point. ----@param ... number # You can continue passing more point positions to create the PolygonShape. ----@return love.physics.PolygonShape shape # A new PolygonShape. -function love.physics.newPolygonShape(x1, y1, x2, y2, x3, y3, ...) end +---@return love.PolygonShape shape # A new PolygonShape. +function love.physics.newPolygonShape(x1, y1, x2, y2, x3, y3) end --- ---Creates a PrismaticJoint between two bodies. --- ---A prismatic joint constrains two bodies to move relatively to each other on a specified axis. It does not allow for relative rotation. Its definition and operation are similar to a revolute joint, but with translation and force substituted for angle and torque. --- ----@param body1 love.physics.Body # The first body to connect with a prismatic joint. ----@param body2 love.physics.Body # The second body to connect with a prismatic joint. ----@param x number # The x coordinate of the anchor point. ----@param y number # The y coordinate of the anchor point. +---@param body1 love.Body # The first body to connect with a prismatic joint. +---@param body2 love.Body # The second body to connect with a prismatic joint. ---@param ax number # The x coordinate of the axis vector. ---@param ay number # The y coordinate of the axis vector. ---@param collideConnected boolean # Specifies whether the two bodies should collide with each other. ----@return love.physics.PrismaticJoint joint # The new prismatic joint. -function love.physics.newPrismaticJoint(body1, body2, x, y, ax, ay, collideConnected) end +---@return love.PrismaticJoint joint # The new prismatic joint. +function love.physics.newPrismaticJoint(body1, body2, ax, ay, collideConnected) end --- ---Creates a PulleyJoint to join two bodies to each other and the ground. @@ -184,8 +176,8 @@ function love.physics.newPrismaticJoint(body1, body2, x, y, ax, ay, collideConne --- ---Pulley joints can behave unpredictably if one side is fully extended. It is recommended that the method setMaxLengths be used to constrain the maximum lengths each side can attain. --- ----@param body1 love.physics.Body # The first body to connect with a pulley joint. ----@param body2 love.physics.Body # The second body to connect with a pulley joint. +---@param body1 love.Body # The first body to connect with a pulley joint. +---@param body2 love.Body # The second body to connect with a pulley joint. ---@param gx1 number # The x coordinate of the first body's ground anchor. ---@param gy1 number # The y coordinate of the first body's ground anchor. ---@param gx2 number # The x coordinate of the second body's ground anchor. @@ -196,7 +188,7 @@ function love.physics.newPrismaticJoint(body1, body2, x, y, ax, ay, collideConne ---@param y2 number # The y coordinate of the pulley joint anchor in the second body. ---@param ratio number # The joint ratio. ---@param collideConnected boolean # Specifies whether the two bodies should collide with each other. ----@return love.physics.PulleyJoint joint # The new pulley joint. +---@return love.PulleyJoint joint # The new pulley joint. function love.physics.newPulleyJoint(body1, body2, gx1, gy1, gx2, gy2, x1, y1, x2, y2, ratio, collideConnected) end --- @@ -206,7 +198,7 @@ function love.physics.newPulleyJoint(body1, body2, gx1, gy1, gx2, gy2, x1, y1, x --- ---@param width number # The width of the rectangle. ---@param height number # The height of the rectangle. ----@return love.physics.PolygonShape shape # A new PolygonShape. +---@return love.PolygonShape shape # A new PolygonShape. function love.physics.newRectangleShape(width, height) end --- @@ -214,51 +206,45 @@ function love.physics.newRectangleShape(width, height) end --- ---This joint connects two bodies to a point around which they can pivot. --- ----@param body1 love.physics.Body # The first body. ----@param body2 love.physics.Body # The second body. ----@param x number # The x position of the connecting point. ----@param y number # The y position of the connecting point. +---@param body1 love.Body # The first body. +---@param body2 love.Body # The second body. ---@param collideConnected boolean # Specifies whether the two bodies should collide with each other. ----@return love.physics.RevoluteJoint joint # The new revolute joint. -function love.physics.newRevoluteJoint(body1, body2, x, y, collideConnected) end +---@return love.RevoluteJoint joint # The new revolute joint. +function love.physics.newRevoluteJoint(body1, body2, collideConnected) end --- ---Creates a joint between two bodies. Its only function is enforcing a max distance between these bodies. --- ----@param body1 love.physics.Body # The first body to attach to the joint. ----@param body2 love.physics.Body # The second body to attach to the joint. +---@param body1 love.Body # The first body to attach to the joint. +---@param body2 love.Body # The second body to attach to the joint. ---@param x1 number # The x position of the first anchor point. ---@param y1 number # The y position of the first anchor point. ---@param x2 number # The x position of the second anchor point. ---@param y2 number # The y position of the second anchor point. ---@param maxLength number # The maximum distance for the bodies. ---@param collideConnected boolean # Specifies whether the two bodies should collide with each other. ----@return love.physics.RopeJoint joint # The new RopeJoint. +---@return love.RopeJoint joint # The new RopeJoint. function love.physics.newRopeJoint(body1, body2, x1, y1, x2, y2, maxLength, collideConnected) end --- ---Creates a constraint joint between two bodies. A WeldJoint essentially glues two bodies together. The constraint is a bit soft, however, due to Box2D's iterative solver. --- ----@param body1 love.physics.Body # The first body to attach to the joint. ----@param body2 love.physics.Body # The second body to attach to the joint. ----@param x number # The x position of the anchor point (world space). ----@param y number # The y position of the anchor point (world space). +---@param body1 love.Body # The first body to attach to the joint. +---@param body2 love.Body # The second body to attach to the joint. ---@param collideConnected boolean # Specifies whether the two bodies should collide with each other. ----@return love.physics.WeldJoint joint # The new WeldJoint. -function love.physics.newWeldJoint(body1, body2, x, y, collideConnected) end +---@return love.WeldJoint joint # The new WeldJoint. +function love.physics.newWeldJoint(body1, body2, collideConnected) end --- ---Creates a wheel joint. --- ----@param body1 love.physics.Body # The first body. ----@param body2 love.physics.Body # The second body. ----@param x number # The x position of the anchor point. ----@param y number # The y position of the anchor point. +---@param body1 love.Body # The first body. +---@param body2 love.Body # The second body. ---@param ax number # The x position of the axis unit vector. ---@param ay number # The y position of the axis unit vector. ---@param collideConnected boolean # Specifies whether the two bodies should collide with each other. ----@return love.physics.WheelJoint joint # The new WheelJoint. -function love.physics.newWheelJoint(body1, body2, x, y, ax, ay, collideConnected) end +---@return love.WheelJoint joint # The new WheelJoint. +function love.physics.newWheelJoint(body1, body2, ax, ay, collideConnected) end --- ---Creates a new World. @@ -266,7 +252,7 @@ function love.physics.newWheelJoint(body1, body2, x, y, ax, ay, collideConnected ---@param xg number # The x component of gravity. ---@param yg number # The y component of gravity. ---@param sleep boolean # Whether the bodies in this world are allowed to sleep. ----@return love.physics.World world # A brave new World. +---@return love.World world # A brave new World. function love.physics.newWorld(xg, yg, sleep) end --- @@ -279,7 +265,7 @@ function love.physics.newWorld(xg, yg, sleep) end ---@param scale number # The scale factor as an integer. function love.physics.setMeter(scale) end ----@class love.physics.Body: love.physics.Object +---@class love.Body: love.Object local Body = {} --- @@ -364,7 +350,6 @@ function Body:getAngularDamping() end --- ---If you need the ''rate of change of position over time'', use Body:getLinearVelocity. --- ----@return number w # The angular velocity in radians/second. function Body:getAngularVelocity() end --- @@ -424,8 +409,6 @@ function Body:getLinearDamping() end --- ---See page 136 of 'Essential Mathematics for Games and Interactive Applications' for definitions of local and world coordinates. --- ----@return number x # The x-component of the velocity vector ----@return number y # The y-component of the velocity vector function Body:getLinearVelocity() end --- @@ -435,11 +418,9 @@ function Body:getLinearVelocity() end --- ---The point on the body must given in local coordinates. Use Body:getLinearVelocityFromWorldPoint to specify this with world coordinates. --- ----@param x number # The x position to measure velocity. ----@param y number # The y position to measure velocity. ---@return number vx # The x component of velocity at point (x,y). ---@return number vy # The y component of velocity at point (x,y). -function Body:getLinearVelocityFromLocalPoint(x, y) end +function Body:getLinearVelocityFromLocalPoint() end --- ---Get the linear velocity of a point on the body. @@ -448,19 +429,15 @@ function Body:getLinearVelocityFromLocalPoint(x, y) end --- ---The point on the body must given in world coordinates. Use Body:getLinearVelocityFromLocalPoint to specify this with local coordinates. --- ----@param x number # The x position to measure velocity. ----@param y number # The y position to measure velocity. ---@return number vx # The x component of velocity at point (x,y). ---@return number vy # The y component of velocity at point (x,y). -function Body:getLinearVelocityFromWorldPoint(x, y) end +function Body:getLinearVelocityFromWorldPoint() end --- ---Get the center of mass position in local coordinates. --- ---Use Body:getWorldCenter to get the center of mass in world coordinates. --- ----@return number x # The x coordinate of the center of mass. ----@return number y # The y coordinate of the center of mass. function Body:getLocalCenter() end --- @@ -492,8 +469,6 @@ function Body:getMass() end --- ---Returns the mass, its center, and the rotational inertia. --- ----@return number x # The x position of the center of mass. ----@return number y # The y position of the center of mass. ---@return number mass # The mass of the body. ---@return number inertia # The rotational inertia. function Body:getMassData() end @@ -503,8 +478,6 @@ function Body:getMassData() end --- ---Note that this may not be the center of mass of the body. --- ----@return number x # The x position. ----@return number y # The y position. function Body:getPosition() end --- @@ -512,27 +485,25 @@ function Body:getPosition() end --- ---Note that the position may not be the center of mass of the body. An angle of 0 radians will mean 'looking to the right'. Although radians increase counter-clockwise, the y axis points down so it becomes clockwise from our point of view. --- ----@return number x # The x component of the position. ----@return number y # The y component of the position. ---@return number angle # The angle in radians. function Body:getTransform() end --- ---Returns the type of the body. --- ----@return love.physics.BodyType type # The body type. +---@return love.BodyType type # The body type. function Body:getType() end --- ---Returns the Lua value associated with this Body. --- ----@return love.physics.any value # The Lua value associated with the Body. +---@return any value # The Lua value associated with the Body. function Body:getUserData() end --- ---Gets the World the body lives in. --- ----@return love.physics.World world # The world the body lives in. +---@return love.World world # The world the body lives in. function Body:getWorld() end --- @@ -540,8 +511,6 @@ function Body:getWorld() end --- ---Use Body:getLocalCenter to get the center of mass in local coordinates. --- ----@return number x # The x coordinate of the center of mass. ----@return number y # The y coordinate of the center of mass. function Body:getWorldCenter() end --- @@ -578,13 +547,11 @@ function Body:getWorldVector(localX, localY) end --- ---Get the x position of the body in world coordinates. --- ----@return number x # The x position in world coordinates. function Body:getX() end --- ---Get the y position of the body in world coordinates. --- ----@return number y # The y position in world coordinates. function Body:getY() end --- @@ -636,7 +603,7 @@ function Body:isSleepingAllowed() end --- ---Gets whether the Body is touching the given other Body. --- ----@param otherbody love.physics.Body # The other body to check. +---@param otherbody love.Body # The other body to check. ---@return boolean touching # True if this body is touching the other body, false otherwise. function Body:isTouching(otherbody) end @@ -682,8 +649,7 @@ function Body:setAngularDamping(damping) end --- ---This function will not accumulate anything; any impulses previously applied since the last call to World:update will be lost. --- ----@param w number # The new angular velocity, in radians per second -function Body:setAngularVelocity(w) end +function Body:setAngularVelocity() end --- ---Wakes the body up or puts it to sleep. @@ -742,9 +708,7 @@ function Body:setLinearDamping(ld) end --- ---This function will not accumulate anything; any impulses previously applied since the last call to World:update will be lost. --- ----@param x number # The x-component of the velocity vector. ----@param y number # The y-component of the velocity vector. -function Body:setLinearVelocity(x, y) end +function Body:setLinearVelocity() end --- ---Sets a new body mass. @@ -755,11 +719,9 @@ function Body:setMass(mass) end --- ---Overrides the calculated mass data. --- ----@param x number # The x position of the center of mass. ----@param y number # The y position of the center of mass. ---@param mass number # The mass of the body. ---@param inertia number # The rotational inertia. -function Body:setMassData(x, y, mass, inertia) end +function Body:setMassData(mass, inertia) end --- ---Set the position of the body. @@ -768,9 +730,7 @@ function Body:setMassData(x, y, mass, inertia) end --- ---This function cannot wake up the body. --- ----@param x number # The x position. ----@param y number # The y position. -function Body:setPosition(x, y) end +function Body:setPosition() end --- ---Sets the sleeping behaviour of the body. Should sleeping be allowed, a body at rest will automatically sleep. A sleeping body is not simulated unless it collided with an awake body. Be wary that one can end up with a situation like a floating sleeping body if the floor was removed. @@ -785,15 +745,13 @@ function Body:setSleepingAllowed(allowed) end --- ---This function cannot wake up the body. --- ----@param x number # The x component of the position. ----@param y number # The y component of the position. ---@param angle number # The angle in radians. -function Body:setTransform(x, y, angle) end +function Body:setTransform(angle) end --- ---Sets a new body type. --- ----@param type love.physics.BodyType # The new type. +---@param type love.BodyType # The new type. function Body:setType(type) end --- @@ -801,7 +759,7 @@ function Body:setType(type) end --- ---To delete the reference, explicitly pass nil. --- ----@param value love.physics.any # The Lua value to associate with the Body. +---@param value any # The Lua value to associate with the Body. function Body:setUserData(value) end --- @@ -809,25 +767,23 @@ function Body:setUserData(value) end --- ---This function cannot wake up the body. --- ----@param x number # The x position. -function Body:setX(x) end +function Body:setX() end --- ---Set the y position of the body. --- ---This function cannot wake up the body. --- ----@param y number # The y position. -function Body:setY(y) end +function Body:setY() end ----@class love.physics.ChainShape: love.physics.Shape, love.physics.Object +---@class love.ChainShape: love.Shape, love.Object local ChainShape = {} --- ---Returns a child of the shape as an EdgeShape. --- ---@param index number # The index of the child. ----@return love.physics.EdgeShape shape # The child as an EdgeShape. +---@return love.EdgeShape shape # The child as an EdgeShape. function ChainShape:getChildEdge(index) end --- @@ -835,16 +791,12 @@ function ChainShape:getChildEdge(index) end --- ---Setting next and previous ChainShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. --- ----@return number x # The x-component of the vertex, or nil if ChainShape:setNextVertex hasn't been called. ----@return number y # The y-component of the vertex, or nil if ChainShape:setNextVertex hasn't been called. function ChainShape:getNextVertex() end --- ---Returns a point of the shape. --- ---@param index number # The index of the point to return. ----@return number x # The x-coordinate of the point. ----@return number y # The y-coordinate of the point. function ChainShape:getPoint(index) end --- @@ -861,8 +813,6 @@ function ChainShape:getPoints() end --- ---Setting next and previous ChainShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. --- ----@return number x # The x-component of the vertex, or nil if ChainShape:setPreviousVertex hasn't been called. ----@return number y # The y-component of the vertex, or nil if ChainShape:setPreviousVertex hasn't been called. function ChainShape:getPreviousVertex() end --- @@ -876,27 +826,21 @@ function ChainShape:getVertexCount() end --- ---This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. --- ----@param x number # The x-component of the vertex. ----@param y number # The y-component of the vertex. -function ChainShape:setNextVertex(x, y) end +function ChainShape:setNextVertex() end --- ---Sets a vertex that establishes a connection to the previous shape. --- ---This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. --- ----@param x number # The x-component of the vertex. ----@param y number # The y-component of the vertex. -function ChainShape:setPreviousVertex(x, y) end +function ChainShape:setPreviousVertex() end ----@class love.physics.CircleShape: love.physics.Shape, love.physics.Object +---@class love.CircleShape: love.Shape, love.Object local CircleShape = {} --- ---Gets the center point of the circle shape. --- ----@return number x # The x-component of the center point of the circle. ----@return number y # The y-component of the center point of the circle. function CircleShape:getPoint() end --- @@ -908,9 +852,7 @@ function CircleShape:getRadius() end --- ---Sets the location of the center of the circle shape. --- ----@param x number # The x-component of the new center point of the circle. ----@param y number # The y-component of the new center point of the circle. -function CircleShape:setPoint(x, y) end +function CircleShape:setPoint() end --- ---Sets the radius of the circle. @@ -918,14 +860,14 @@ function CircleShape:setPoint(x, y) end ---@param radius number # The radius of the circle function CircleShape:setRadius(radius) end ----@class love.physics.Contact: love.physics.Object +---@class love.Contact: love.Object local Contact = {} --- ---Gets the two Fixtures that hold the shapes that are in contact. --- ----@return love.physics.Fixture fixtureA # The first Fixture. ----@return love.physics.Fixture fixtureB # The second Fixture. +---@return love.Fixture fixtureA # The first Fixture. +---@return love.Fixture fixtureB # The second Fixture. function Contact:getFixtures() end --- @@ -998,7 +940,7 @@ function Contact:setFriction(friction) end ---@param restitution number # The contact restitution. function Contact:setRestitution(restitution) end ----@class love.physics.DistanceJoint: love.physics.Joint, love.physics.Object +---@class love.DistanceJoint: love.Joint, love.Object local DistanceJoint = {} --- @@ -1016,7 +958,6 @@ function DistanceJoint:getFrequency() end --- ---Gets the equilibrium distance between the two Bodies. --- ----@return number l # The length between the two Bodies. function DistanceJoint:getLength() end --- @@ -1034,10 +975,9 @@ function DistanceJoint:setFrequency(Hz) end --- ---Sets the equilibrium distance between the two Bodies. --- ----@param l number # The length between the two Bodies. -function DistanceJoint:setLength(l) end +function DistanceJoint:setLength() end ----@class love.physics.EdgeShape: love.physics.Shape, love.physics.Object +---@class love.EdgeShape: love.Shape, love.Object local EdgeShape = {} --- @@ -1045,8 +985,6 @@ local EdgeShape = {} --- ---Setting next and previous EdgeShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. --- ----@return number x # The x-component of the vertex, or nil if EdgeShape:setNextVertex hasn't been called. ----@return number y # The y-component of the vertex, or nil if EdgeShape:setNextVertex hasn't been called. function EdgeShape:getNextVertex() end --- @@ -1063,8 +1001,6 @@ function EdgeShape:getPoints() end --- ---Setting next and previous EdgeShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. --- ----@return number x # The x-component of the vertex, or nil if EdgeShape:setPreviousVertex hasn't been called. ----@return number y # The y-component of the vertex, or nil if EdgeShape:setPreviousVertex hasn't been called. function EdgeShape:getPreviousVertex() end --- @@ -1072,20 +1008,16 @@ function EdgeShape:getPreviousVertex() end --- ---This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. --- ----@param x number # The x-component of the vertex. ----@param y number # The y-component of the vertex. -function EdgeShape:setNextVertex(x, y) end +function EdgeShape:setNextVertex() end --- ---Sets a vertex that establishes a connection to the previous shape. --- ---This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. --- ----@param x number # The x-component of the vertex. ----@param y number # The y-component of the vertex. -function EdgeShape:setPreviousVertex(x, y) end +function EdgeShape:setPreviousVertex() end ----@class love.physics.Fixture: love.physics.Object +---@class love.Fixture: love.Object local Fixture = {} --- @@ -1096,7 +1028,7 @@ function Fixture:destroy() end --- ---Returns the body to which the fixture is attached. --- ----@return love.physics.Body body # The parent body. +---@return love.Body body # The parent body. function Fixture:getBody() end --- @@ -1156,8 +1088,6 @@ function Fixture:getMask() end --- ---Returns the mass, its center and the rotational inertia. --- ----@return number x # The x position of the center of mass. ----@return number y # The y position of the center of mass. ---@return number mass # The mass of the fixture. ---@return number inertia # The rotational inertia. function Fixture:getMassData() end @@ -1171,13 +1101,13 @@ function Fixture:getRestitution() end --- ---Returns the shape of the fixture. This shape is a reference to the actual data used in the simulation. It's possible to change its values between timesteps. --- ----@return love.physics.Shape shape # The fixture's shape. +---@return love.Shape shape # The fixture's shape. function Fixture:getShape() end --- ---Returns the Lua value associated with this fixture. --- ----@return love.physics.any value # The Lua value associated with the fixture. +---@return any value # The Lua value associated with the fixture. function Fixture:getUserData() end --- @@ -1291,18 +1221,16 @@ function Fixture:setSensor(sensor) end --- ---To delete the reference, explicitly pass nil. --- ----@param value love.physics.any # The Lua value to associate with the fixture. +---@param value any # The Lua value to associate with the fixture. function Fixture:setUserData(value) end --- ---Checks if a point is inside the shape of the fixture. --- ----@param x number # The x position of the point. ----@param y number # The y position of the point. ---@return boolean isInside # True if the point is inside or false if it is outside. -function Fixture:testPoint(x, y) end +function Fixture:testPoint() end ----@class love.physics.FrictionJoint: love.physics.Joint, love.physics.Object +---@class love.FrictionJoint: love.Joint, love.Object local FrictionJoint = {} --- @@ -1329,14 +1257,14 @@ function FrictionJoint:setMaxForce(maxForce) end ---@param torque number # Maximum torque in Newton-meters. function FrictionJoint:setMaxTorque(torque) end ----@class love.physics.GearJoint: love.physics.Joint, love.physics.Object +---@class love.GearJoint: love.Joint, love.Object local GearJoint = {} --- ---Get the Joints connected by this GearJoint. --- ----@return love.physics.Joint joint1 # The first connected Joint. ----@return love.physics.Joint joint2 # The second connected Joint. +---@return love.Joint joint1 # The first connected Joint. +---@return love.Joint joint2 # The second connected Joint. function GearJoint:getJoints() end --- @@ -1351,7 +1279,7 @@ function GearJoint:getRatio() end ---@param ratio number # The new ratio of the joint. function GearJoint:setRatio(ratio) end ----@class love.physics.Joint: love.physics.Object +---@class love.Joint: love.Object local Joint = {} --- @@ -1375,23 +1303,19 @@ function Joint:getAnchors() end --- ---Gets the bodies that the Joint is attached to. --- ----@return love.physics.Body bodyA # The first Body. ----@return love.physics.Body bodyB # The second Body. +---@return love.Body bodyA # The first Body. +---@return love.Body bodyB # The second Body. function Joint:getBodies() end --- ---Gets whether the connected Bodies collide. --- ----@return boolean c # True if they collide, false otherwise. function Joint:getCollideConnected() end --- ---Returns the reaction force in newtons on the second body --- ----@param x number # How long the force applies. Usually the inverse time step or 1/dt. ----@return number x # The x-component of the force. ----@return number y # The y-component of the force. -function Joint:getReactionForce(x) end +function Joint:getReactionForce() end --- ---Returns the reaction torque on the second body. @@ -1403,13 +1327,13 @@ function Joint:getReactionTorque(invdt) end --- ---Gets a string representing the type. --- ----@return love.physics.JointType type # A string with the name of the Joint type. +---@return love.JointType type # A string with the name of the Joint type. function Joint:getType() end --- ---Returns the Lua value associated with this Joint. --- ----@return love.physics.any value # The Lua value associated with the Joint. +---@return any value # The Lua value associated with the Joint. function Joint:getUserData() end --- @@ -1423,10 +1347,10 @@ function Joint:isDestroyed() end --- ---To delete the reference, explicitly pass nil. --- ----@param value love.physics.any # The Lua value to associate with the Joint. +---@param value any # The Lua value to associate with the Joint. function Joint:setUserData(value) end ----@class love.physics.MotorJoint: love.physics.Joint, love.physics.Object +---@class love.MotorJoint: love.Joint, love.Object local MotorJoint = {} --- @@ -1438,8 +1362,6 @@ function MotorJoint:getAngularOffset() end --- ---Gets the target linear offset between the two Bodies the Joint is attached to. --- ----@return number x # The x component of the target linear offset, relative to the first Body. ----@return number y # The y component of the target linear offset, relative to the first Body. function MotorJoint:getLinearOffset() end --- @@ -1451,11 +1373,9 @@ function MotorJoint:setAngularOffset(angleoffset) end --- ---Sets the target linear offset between the two Bodies the Joint is attached to. --- ----@param x number # The x component of the target linear offset, relative to the first Body. ----@param y number # The y component of the target linear offset, relative to the first Body. -function MotorJoint:setLinearOffset(x, y) end +function MotorJoint:setLinearOffset() end ----@class love.physics.MouseJoint: love.physics.Joint, love.physics.Object +---@class love.MouseJoint: love.Joint, love.Object local MouseJoint = {} --- @@ -1473,14 +1393,11 @@ function MouseJoint:getFrequency() end --- ---Gets the highest allowed force. --- ----@return number f # The max allowed force. function MouseJoint:getMaxForce() end --- ---Gets the target point. --- ----@return number x # The x-component of the target. ----@return number y # The x-component of the target. function MouseJoint:getTarget() end --- @@ -1498,17 +1415,14 @@ function MouseJoint:setFrequency(freq) end --- ---Sets the highest allowed force. --- ----@param f number # The max allowed force. -function MouseJoint:setMaxForce(f) end +function MouseJoint:setMaxForce() end --- ---Sets the target point. --- ----@param x number # The x-component of the target. ----@param y number # The y-component of the target. -function MouseJoint:setTarget(x, y) end +function MouseJoint:setTarget() end ----@class love.physics.PolygonShape: love.physics.Shape, love.physics.Object +---@class love.PolygonShape: love.Shape, love.Object local PolygonShape = {} --- @@ -1522,7 +1436,7 @@ local PolygonShape = {} ---@return number y2 # The y-component of the second vertex. function PolygonShape:getPoints() end ----@class love.physics.PrismaticJoint: love.physics.Joint, love.physics.Object +---@class love.PrismaticJoint: love.Joint, love.Object local PrismaticJoint = {} --- @@ -1534,20 +1448,16 @@ function PrismaticJoint:areLimitsEnabled() end --- ---Gets the world-space axis vector of the Prismatic Joint. --- ----@return number x # The x-axis coordinate of the world-space axis vector. ----@return number y # The y-axis coordinate of the world-space axis vector. function PrismaticJoint:getAxis() end --- ---Get the current joint angle speed. --- ----@return number s # Joint angle speed in meters/second. function PrismaticJoint:getJointSpeed() end --- ---Get the current joint translation. --- ----@return number t # Joint translation, usually in meters.. function PrismaticJoint:getJointTranslation() end --- @@ -1566,7 +1476,6 @@ function PrismaticJoint:getLowerLimit() end --- ---Gets the maximum motor force. --- ----@return number f # The maximum motor force, usually in N. function PrismaticJoint:getMaxMotorForce() end --- @@ -1579,7 +1488,6 @@ function PrismaticJoint:getMotorForce(invdt) end --- ---Gets the motor speed. --- ----@return number s # The motor speed, usually in meters per second. function PrismaticJoint:getMotorSpeed() end --- @@ -1616,8 +1524,7 @@ function PrismaticJoint:setLowerLimit(lower) end --- ---Set the maximum motor force. --- ----@param f number # The maximum motor force, usually in N. -function PrismaticJoint:setMaxMotorForce(f) end +function PrismaticJoint:setMaxMotorForce() end --- ---Enables/disables the joint motor. @@ -1628,8 +1535,7 @@ function PrismaticJoint:setMotorEnabled(enable) end --- ---Sets the motor speed. --- ----@param s number # The motor speed, usually in meters per second. -function PrismaticJoint:setMotorSpeed(s) end +function PrismaticJoint:setMotorSpeed() end --- ---Sets the upper limit. @@ -1637,7 +1543,7 @@ function PrismaticJoint:setMotorSpeed(s) end ---@param upper number # The upper limit, usually in meters. function PrismaticJoint:setUpperLimit(upper) end ----@class love.physics.PulleyJoint: love.physics.Joint, love.physics.Object +---@class love.PulleyJoint: love.Joint, love.Object local PulleyJoint = {} --- @@ -1703,7 +1609,7 @@ function PulleyJoint:setMaxLengths(max1, max2) end ---@param ratio number # The new pulley ratio of the joint. function PulleyJoint:setRatio(ratio) end ----@class love.physics.RevoluteJoint: love.physics.Joint, love.physics.Object +---@class love.RevoluteJoint: love.Joint, love.Object local RevoluteJoint = {} --- @@ -1721,7 +1627,6 @@ function RevoluteJoint:getJointAngle() end --- ---Get the current joint angle speed. --- ----@return number s # Joint angle speed in radians/second. function RevoluteJoint:getJointSpeed() end --- @@ -1740,19 +1645,16 @@ function RevoluteJoint:getLowerLimit() end --- ---Gets the maximum motor force. --- ----@return number f # The maximum motor force, in Nm. function RevoluteJoint:getMaxMotorTorque() end --- ---Gets the motor speed. --- ----@return number s # The motor speed, radians per second. function RevoluteJoint:getMotorSpeed() end --- ---Get the current motor force. --- ----@return number f # The current motor force, in Nm. function RevoluteJoint:getMotorTorque() end --- @@ -1795,8 +1697,7 @@ function RevoluteJoint:setLowerLimit(lower) end --- ---Set the maximum motor force. --- ----@param f number # The maximum motor force, in Nm. -function RevoluteJoint:setMaxMotorTorque(f) end +function RevoluteJoint:setMaxMotorTorque() end --- ---Enables/disables the joint motor. @@ -1807,8 +1708,7 @@ function RevoluteJoint:setMotorEnabled(enable) end --- ---Sets the motor speed. --- ----@param s number # The motor speed, radians per second. -function RevoluteJoint:setMotorSpeed(s) end +function RevoluteJoint:setMotorSpeed() end --- ---Sets the upper limit. @@ -1816,7 +1716,7 @@ function RevoluteJoint:setMotorSpeed(s) end ---@param upper number # The upper limit, in radians. function RevoluteJoint:setUpperLimit(upper) end ----@class love.physics.RopeJoint: love.physics.Joint, love.physics.Object +---@class love.RopeJoint: love.Joint, love.Object local RopeJoint = {} --- @@ -1831,7 +1731,7 @@ function RopeJoint:getMaxLength() end ---@param maxLength number # The new maximum length of the RopeJoint. function RopeJoint:setMaxLength(maxLength) end ----@class love.physics.Shape: love.physics.Object +---@class love.Shape: love.Object local Shape = {} --- @@ -1851,8 +1751,6 @@ function Shape:computeAABB(tx, ty, tr, childIndex) end ---Computes the mass properties for the shape with the specified density. --- ---@param density number # The shape density. ----@return number x # The x postition of the center of mass. ----@return number y # The y postition of the center of mass. ---@return number mass # The mass of the shape. ---@return number inertia # The rotational inertia. function Shape:computeMass(density) end @@ -1874,7 +1772,7 @@ function Shape:getRadius() end --- ---This function can be useful for conditional debug drawing. --- ----@return love.physics.ShapeType type # The type of the Shape. +---@return love.ShapeType type # The type of the Shape. function Shape:getType() end --- @@ -1908,12 +1806,10 @@ function Shape:rayCast(x1, y1, x2, y2, maxFraction, tx, ty, tr, childIndex) end ---@param tx number # Translates the shape along the x-axis. ---@param ty number # Translates the shape along the y-axis. ---@param tr number # Rotates the shape. ----@param x number # The x-component of the point. ----@param y number # The y-component of the point. ---@return boolean hit # True if inside, false if outside -function Shape:testPoint(tx, ty, tr, x, y) end +function Shape:testPoint(tx, ty, tr) end ----@class love.physics.WeldJoint: love.physics.Joint, love.physics.Object +---@class love.WeldJoint: love.Joint, love.Object local WeldJoint = {} --- @@ -1940,14 +1836,12 @@ function WeldJoint:setDampingRatio(ratio) end ---@param freq number # The new frequency in hertz. function WeldJoint:setFrequency(freq) end ----@class love.physics.WheelJoint: love.physics.Joint, love.physics.Object +---@class love.WheelJoint: love.Joint, love.Object local WheelJoint = {} --- ---Gets the world-space axis vector of the Wheel Joint. --- ----@return number x # The x-axis coordinate of the world-space axis vector. ----@return number y # The y-axis coordinate of the world-space axis vector. function WheelJoint:getAxis() end --- @@ -2023,7 +1917,7 @@ function WheelJoint:setSpringDampingRatio(ratio) end ---@param freq number # The new frequency in hertz. function WheelJoint:setSpringFrequency(freq) end ----@class love.physics.World: love.physics.Object +---@class love.World: love.Object local World = {} --- @@ -2042,7 +1936,6 @@ function World:getBodies() end --- ---Returns the number of bodies in the world. --- ----@return number n # The number of bodies in the world. function World:getBodyCount() end --- @@ -2057,7 +1950,6 @@ function World:getCallbacks() end --- ---Returns the number of contacts in the world. --- ----@return number n # The number of contacts in the world. function World:getContactCount() end --- @@ -2075,14 +1967,11 @@ function World:getContacts() end --- ---Get the gravity of the world. --- ----@return number x # The x component of gravity. ----@return number y # The y component of gravity. function World:getGravity() end --- ---Returns the number of joints in the world. --- ----@return number n # The number of joints in the world. function World:getJointCount() end --- @@ -2124,14 +2013,12 @@ function World:queryBoundingBox(topLeftX, topLeftY, bottomRightX, bottomRightY, --- ---Casts a ray and calls a function for each fixtures it intersects. --- ----@param fixture love.physics.Fixture # The fixture intersecting the ray. ----@param x number # The x position of the intersection point. ----@param y number # The y position of the intersection point. +---@param fixture love.Fixture # The fixture intersecting the ray. ---@param xn number # The x value of the surface normal vector of the shape edge. ---@param yn number # The y value of the surface normal vector of the shape edge. ---@param fraction number # The position of the intersection on the ray as a number from 0 to 1 (or even higher if the ray length was changed with the return value). ---@return number control # The ray can be controlled with the return value. A positive value sets a new ray length where 1 is the default value. A value of 0 terminates the ray. If the callback function returns -1, the intersection gets ignored as if it didn't happen. -function World:rayCast(fixture, x, y, xn, yn, fraction) end +function World:rayCast(fixture, xn, yn, fraction) end --- ---Sets functions for the collision callbacks during the world update. @@ -2159,9 +2046,7 @@ function World:setContactFilter(filter) end --- ---Set the gravity of the world. --- ----@param x number # The x component of gravity. ----@param y number # The y component of gravity. -function World:setGravity(x, y) end +function World:setGravity() end --- ---Sets the sleep behaviour of the world. @@ -2172,9 +2057,7 @@ function World:setSleepingAllowed(allow) end --- ---Translates the World's origin. Useful in large worlds where floating point precision issues become noticeable at far distances from the origin. --- ----@param x number # The x component of the new origin with respect to the old origin. ----@param y number # The y component of the new origin with respect to the old origin. -function World:translateOrigin(x, y) end +function World:translateOrigin() end --- ---Update the state of the world. diff --git a/meta/3rd/love2d/library/love.sound.lua b/meta/3rd/love2d/library/love.sound.lua index 75c2923a..1dcb7b72 100644 --- a/meta/3rd/love2d/library/love.sound.lua +++ b/meta/3rd/love2d/library/love.sound.lua @@ -1,12 +1,14 @@ +---@meta + ---@class love.sound love.sound = {} --- ---Attempts to find a decoder for the encoded sound data in the specified file. --- ----@param file love.sound.File # The file with encoded sound data. +---@param file love.File # The file with encoded sound data. ---@param buffer number # The size of each decoded chunk, in bytes. ----@return love.sound.Decoder decoder # A new Decoder object. +---@return love.Decoder decoder # A new Decoder object. function love.sound.newDecoder(file, buffer) end --- @@ -15,10 +17,10 @@ function love.sound.newDecoder(file, buffer) end ---The sound data will be decoded to the memory in a raw format. It is recommended to create only short sounds like effects, as a 3 minute song uses 30 MB of memory this way. --- ---@param filename string # The file name of the file to load. ----@return love.sound.SoundData soundData # A new SoundData object. +---@return love.SoundData soundData # A new SoundData object. function love.sound.newSoundData(filename) end ----@class love.sound.Decoder: love.sound.Object +---@class love.Decoder: love.Object local Decoder = {} --- @@ -26,7 +28,7 @@ local Decoder = {} --- ---The new decoder will start decoding from the beginning of the audio stream. --- ----@return love.sound.Decoder decoder # New copy of the decoder. +---@return love.Decoder decoder # New copy of the decoder. function Decoder:clone() end --- @@ -53,7 +55,7 @@ function Decoder:getDuration() end ---@return number rate # Number of samples per second. function Decoder:getSampleRate() end ----@class love.sound.SoundData: love.sound.Data, love.sound.Object +---@class love.SoundData: love.Data, love.Object local SoundData = {} --- @@ -77,9 +79,8 @@ function SoundData:getDuration() end --- ---Gets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order. --- ----@param i number # An integer value specifying the position of the sample (starting at 0). ---@return number sample # The normalized samplepoint (range -1.0 to 1.0). -function SoundData:getSample(i) end +function SoundData:getSample() end --- ---Returns the number of samples per channel of the SoundData. @@ -96,6 +97,5 @@ function SoundData:getSampleRate() end --- ---Sets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order. --- ----@param i number # An integer value specifying the position of the sample (starting at 0). ---@param sample number # The normalized samplepoint (range -1.0 to 1.0). -function SoundData:setSample(i, sample) end +function SoundData:setSample(sample) end diff --git a/meta/3rd/love2d/library/love.system.lua b/meta/3rd/love2d/library/love.system.lua index 7eae76ad..aea8a292 100644 --- a/meta/3rd/love2d/library/love.system.lua +++ b/meta/3rd/love2d/library/love.system.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.system love.system = {} @@ -16,7 +18,7 @@ function love.system.getOS() end --- ---Gets information about the system's power supply. --- ----@return love.system.PowerState state # The basic state of the power supply. +---@return love.PowerState state # The basic state of the power supply. ---@return number percent # Percentage of battery life left, between 0 and 100. nil if the value can't be determined or there's no battery. ---@return number seconds # Seconds of battery life left. nil if the value can't be determined or there's no battery. function love.system.getPowerInfo() end diff --git a/meta/3rd/love2d/library/love.thread.lua b/meta/3rd/love2d/library/love.thread.lua index 86a0325a..4331da02 100644 --- a/meta/3rd/love2d/library/love.thread.lua +++ b/meta/3rd/love2d/library/love.thread.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.thread love.thread = {} @@ -5,7 +7,7 @@ love.thread = {} ---Creates or retrieves a named thread channel. --- ---@param name string # The name of the channel you want to create or retrieve. ----@return love.thread.Channel channel # The Channel object associated with the name. +---@return love.Channel channel # The Channel object associated with the name. function love.thread.getChannel(name) end --- @@ -13,17 +15,17 @@ function love.thread.getChannel(name) end --- ---One use for them is to pass new unnamed channels to other threads via Channel:push on a named channel. --- ----@return love.thread.Channel channel # The new Channel object. +---@return love.Channel channel # The new Channel object. function love.thread.newChannel() end --- ---Creates a new Thread from a filename, string or FileData object containing Lua code. --- ---@param filename string # The name of the Lua file to use as the source. ----@return love.thread.Thread thread # A new Thread that has yet to be started. +---@return love.Thread thread # A new Thread that has yet to be started. function love.thread.newThread(filename) end ----@class love.thread.Channel: love.thread.Object +---@class love.Channel: love.Object local Channel = {} --- @@ -36,7 +38,7 @@ function Channel:clear() end --- ---It waits until a message is in the queue then returns the message value. --- ----@return love.thread.Variant value # The contents of the message. +---@return love.Variant value # The contents of the message. function Channel:demand() end --- @@ -57,7 +59,7 @@ function Channel:hasRead(id) end --- ---It returns nil if there's no message in the queue. --- ----@return love.thread.Variant value # The contents of the message. +---@return love.Variant value # The contents of the message. function Channel:peek() end --- @@ -68,18 +70,16 @@ function Channel:peek() end ---This method avoids that issue by making sure the Thread calling the method has exclusive access to the Channel until the specified function has returned. --- ---@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 love.thread.any # Additional arguments that the given function will receive when it is called. ----@param ... love.thread.any # Additional arguments that the given function will receive when it is called. ----@return love.thread.any ret1 # The first return value of the given function (if any.) ----@return love.thread.any ... # Any other return values. -function Channel:performAtomic(func, arg1, ...) end +---@param arg1 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, arg1) end --- ---Retrieves the value of a Channel message and removes it from the message queue. --- ---It returns nil if there are no messages in the queue. --- ----@return love.thread.Variant value # The contents of the message. +---@return love.Variant value # The contents of the message. function Channel:pop() end --- @@ -87,7 +87,7 @@ function Channel:pop() end --- ---See Variant for the list of supported types. --- ----@param value love.thread.Variant # The contents of the message. +---@param value love.Variant # The contents of the message. ---@return number id # Identifier which can be supplied to Channel:hasRead function Channel:push(value) end @@ -96,11 +96,11 @@ function Channel:push(value) end --- ---See Variant for the list of supported types. --- ----@param value love.thread.Variant # The contents of the message. +---@param value love.Variant # The contents of the message. ---@return boolean success # Whether the message was successfully supplied (always true). function Channel:supply(value) end ----@class love.thread.Thread: love.thread.Object +---@class love.Thread: love.Object local Thread = {} --- diff --git a/meta/3rd/love2d/library/love.timer.lua b/meta/3rd/love2d/library/love.timer.lua index 16667fbe..cedb6a43 100644 --- a/meta/3rd/love2d/library/love.timer.lua +++ b/meta/3rd/love2d/library/love.timer.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.timer love.timer = {} @@ -30,8 +32,7 @@ function love.timer.getTime() end --- ---Pauses the current thread for the specified amount of time. --- ----@param s number # Seconds to sleep for. -function love.timer.sleep(s) end +function love.timer.sleep() end --- ---Measures the time between two frames. diff --git a/meta/3rd/love2d/library/love.touch.lua b/meta/3rd/love2d/library/love.touch.lua index 976b9f29..a5f9b073 100644 --- a/meta/3rd/love2d/library/love.touch.lua +++ b/meta/3rd/love2d/library/love.touch.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.touch love.touch = {} @@ -5,8 +7,6 @@ love.touch = {} ---Gets the current position of the specified touch-press, in pixels. --- ---@param id lightuserdata # The identifier of the touch-press. Use love.touch.getTouches, love.touchpressed, or love.touchmoved to obtain touch id values. ----@return number x # The position along the x-axis of the touch-press inside the window, in pixels. ----@return number y # The position along the y-axis of the touch-press inside the window, in pixels. function love.touch.getPosition(id) end --- diff --git a/meta/3rd/love2d/library/love.video.lua b/meta/3rd/love2d/library/love.video.lua index 98fb0ea8..18d174b5 100644 --- a/meta/3rd/love2d/library/love.video.lua +++ b/meta/3rd/love2d/library/love.video.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.video love.video = {} @@ -5,8 +7,8 @@ love.video = {} ---Creates a new VideoStream. Currently only Ogg Theora video files are supported. VideoStreams can't draw videos, see love.graphics.newVideo for that. --- ---@param filename string # The file path to the Ogg Theora video file. ----@return love.video.VideoStream videostream # A new VideoStream. +---@return love.VideoStream videostream # A new VideoStream. function love.video.newVideoStream(filename) end ----@class love.video.VideoStream: love.video.Object +---@class love.VideoStream: love.Object local VideoStream = {} diff --git a/meta/3rd/love2d/library/love.window.lua b/meta/3rd/love2d/library/love.window.lua index f11e9cb1..aea7ae26 100644 --- a/meta/3rd/love2d/library/love.window.lua +++ b/meta/3rd/love2d/library/love.window.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.window love.window = {} @@ -56,14 +58,14 @@ function love.window.getDisplayName(displayindex) end ---Gets current device display orientation. --- ---@param displayindex number # Display index to get its display orientation, or nil for default display index. ----@return love.window.DisplayOrientation orientation # Current device display orientation. +---@return love.DisplayOrientation orientation # Current device display orientation. function love.window.getDisplayOrientation(displayindex) end --- ---Gets whether the window is fullscreen. --- ---@return boolean fullscreen # True if the window is fullscreen, false otherwise. ----@return love.window.FullscreenType fstype # The type of fullscreen mode used. +---@return love.FullscreenType fstype # The type of fullscreen mode used. function love.window.getFullscreen() end --- @@ -76,7 +78,7 @@ function love.window.getFullscreenModes(displayindex) end --- ---Gets the window icon. --- ----@return love.window.ImageData imagedata # The window icon imagedata, or nil if no icon has been set with love.window.setIcon. +---@return love.ImageData imagedata # The window icon imagedata, or nil if no icon has been set with love.window.setIcon. function love.window.getIcon() end --- @@ -92,18 +94,12 @@ function love.window.getMode() end --- ---The window position is in the coordinate space of the display it is currently in. --- ----@return number x # The x-coordinate of the window's position. ----@return number y # The y-coordinate of the window's position. ---@return number displayindex # The index of the display that the window is in. function love.window.getPosition() end --- ---Gets area inside the window which is known to be unobstructed by a system title bar, the iPhone X notch, etc. Useful for making sure UI elements can be seen by the user. --- ----@return number x # Starting position of safe area (x-axis). ----@return number y # Starting position of safe area (y-axis). ----@return number w # Width of safe area. ----@return number h # Height of safe area. function love.window.getSafeArea() end --- @@ -209,7 +205,7 @@ function love.window.setFullscreen(fullscreen) end --- ---Sets the window icon until the game is quit. Not all operating systems support very large icon images. --- ----@param imagedata love.window.ImageData # The window icon image. +---@param imagedata love.ImageData # The window icon image. ---@return boolean success # Whether the icon has been set successfully. function love.window.setIcon(imagedata) end @@ -231,10 +227,8 @@ function love.window.setMode(width, height, flags) end --- ---The window position is in the coordinate space of the specified display. --- ----@param x number # The x-coordinate of the window's position. ----@param y number # The y-coordinate of the window's position. ---@param displayindex number # The index of the display that the new window position is relative to. -function love.window.setPosition(x, y, displayindex) end +function love.window.setPosition(displayindex) end --- ---Sets the window title. @@ -253,7 +247,7 @@ function love.window.setVSync(vsync) end --- ---@param title string # The title of the message box. ---@param message string # The text inside the message box. ----@param type love.window.MessageBoxType # The type of the message box. +---@param type love.MessageBoxType # The type of the message box. ---@param attachtowindow boolean # Whether the message box should be attached to the love window or free-floating. ---@return boolean success # Whether the message box was successfully displayed. function love.window.showMessageBox(title, message, type, attachtowindow) end |