diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-05-31 01:03:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-05-31 01:03:33 +0800 |
commit | 805f972c424805c361a7cc12d1752c7a23d533f6 (patch) | |
tree | 6b2f078a3ebd05ed14066b65adf7772d1f3c5536 /meta/3rd | |
parent | 7162bc37691916125ba5065c476c866693a39216 (diff) | |
download | lua-language-server-805f972c424805c361a7cc12d1752c7a23d533f6.zip |
update API for `love2d` and `lovr`
Diffstat (limited to 'meta/3rd')
23 files changed, 1183 insertions, 1173 deletions
diff --git a/meta/3rd/love2d/library/love.audio.lua b/meta/3rd/love2d/library/love.audio.lua index 0d8b3296..fc6fba25 100644 --- a/meta/3rd/love2d/library/love.audio.lua +++ b/meta/3rd/love2d/library/love.audio.lua @@ -161,7 +161,7 @@ function love.audio.setDopplerScale(scale) end --- ---Not all system supports audio effects. Use love.audio.isEffectsSupported to check. --- ----@overload fun(name: string, enabled: boolean):boolean +---@overload fun(name: string, enabled?: boolean):boolean ---@param name string # The name of the effect. ---@param settings {type: love.EffectType, volume: number} # The settings to use for this effect, with the following fields: ---@return boolean success # Whether the effect was successfully created. @@ -355,7 +355,7 @@ function Source:getDuration(unit) end ---This function returns nil if the effect was applied with no filter settings associated to it. --- ---@param name string # The name of the effect. ----@param filtersettings? table # An optional empty table that will be filled with the filter settings. +---@param filtersettings table # An optional empty table that will be filled with the filter settings. ---@return {volume: number, highgain: number, lowgain: number} filtersettings # The settings for the filter associated to this effect, or nil if the effect is not present in this Source or has no filter associated. The table has the following fields: function Source:getEffect(name, filtersettings) end @@ -597,31 +597,31 @@ function Source:tell(unit) end --- ---Sources do not get attenuated. --- ----| '"none"' +---| "none" --- ---Inverse distance attenuation. --- ----| '"inverse"' +---| "inverse" --- ---Inverse distance attenuation. Gain is clamped. In version 0.9.2 and older this is named '''inverse clamped'''. --- ----| '"inverseclamped"' +---| "inverseclamped" --- ---Linear attenuation. --- ----| '"linear"' +---| "linear" --- ---Linear attenuation. Gain is clamped. In version 0.9.2 and older this is named '''linear clamped'''. --- ----| '"linearclamped"' +---| "linearclamped" --- ---Exponential attenuation. --- ----| '"exponent"' +---| "exponent" --- ---Exponential attenuation. Gain is clamped. In version 0.9.2 and older this is named '''exponent clamped'''. --- ----| '"exponentclamped"' +---| "exponentclamped" --- ---The different types of effects supported by love.audio.setEffect. @@ -630,35 +630,35 @@ function Source:tell(unit) end --- ---Plays multiple copies of the sound with slight pitch and time variation. Used to make sounds sound "fuller" or "thicker". --- ----| '"chorus"' +---| "chorus" --- ---Decreases the dynamic range of the sound, making the loud and quiet parts closer in volume, producing a more uniform amplitude throughout time. --- ----| '"compressor"' +---| "compressor" --- ---Alters the sound by amplifying it until it clips, shearing off parts of the signal, leading to a compressed and distorted sound. --- ----| '"distortion"' +---| "distortion" --- ---Decaying feedback based effect, on the order of seconds. Also known as delay; causes the sound to repeat at regular intervals at a decreasing volume. --- ----| '"echo"' +---| "echo" --- ---Adjust the frequency components of the sound using a 4-band (low-shelf, two band-pass and a high-shelf) equalizer. --- ----| '"equalizer"' +---| "equalizer" --- ---Plays two copies of the sound; while varying the phase, or equivalently delaying one of them, by amounts on the order of milliseconds, resulting in phasing sounds. --- ----| '"flanger"' +---| "flanger" --- ---Decaying feedback based effect, on the order of milliseconds. Used to simulate the reflection off of the surroundings. --- ----| '"reverb"' +---| "reverb" --- ---An implementation of amplitude modulation; multiplies the source signal with a simple waveform, to produce either volume changes, or inharmonic overtones. --- ----| '"ringmodulator"' +---| "ringmodulator" --- ---The different types of waveforms that can be used with the '''ringmodulator''' EffectType. @@ -667,19 +667,19 @@ function Source:tell(unit) end --- ---A sawtooth wave, also known as a ramp wave. Named for its linear rise, and (near-)instantaneous fall along time. --- ----| '"sawtooth"' +---| "sawtooth" --- ---A sine wave. Follows a trigonometric sine function. --- ----| '"sine"' +---| "sine" --- ---A square wave. Switches between high and low states (near-)instantaneously. --- ----| '"square"' +---| "square" --- ---A triangle wave. Follows a linear rise and fall that repeats periodically. --- ----| '"triangle"' +---| "triangle" --- ---Types of filters for Sources. @@ -688,15 +688,15 @@ function Source:tell(unit) end --- ---Low-pass filter. High frequency sounds are attenuated. --- ----| '"lowpass"' +---| "lowpass" --- ---High-pass filter. Low frequency sounds are attenuated. --- ----| '"highpass"' +---| "highpass" --- ---Band-pass filter. Both high and low frequency sounds are attenuated based on the given parameters. --- ----| '"bandpass"' +---| "bandpass" --- ---Types of audio sources. @@ -707,15 +707,15 @@ function Source:tell(unit) end --- ---The whole audio is decoded. --- ----| '"static"' +---| "static" --- ---The audio is decoded in chunks when needed. --- ----| '"stream"' +---| "stream" --- ---The audio must be manually queued by the user. --- ----| '"queue"' +---| "queue" --- ---Units that represent time. @@ -724,8 +724,8 @@ function Source:tell(unit) end --- ---Regular seconds. --- ----| '"seconds"' +---| "seconds" --- ---Audio samples. --- ----| '"samples"' +---| "samples" diff --git a/meta/3rd/love2d/library/love.data.lua b/meta/3rd/love2d/library/love.data.lua index af67a9d1..433b035d 100644 --- a/meta/3rd/love2d/library/love.data.lua +++ b/meta/3rd/love2d/library/love.data.lua @@ -9,7 +9,7 @@ love.data = {} --- ---Compresses a string or data using a specific compression algorithm. --- ----@overload fun(container: love.ContainerType, format: love.CompressedDataFormat, data: love.Data, level: number):love.CompressedData|string +---@overload fun(container: love.ContainerType, format: love.CompressedDataFormat, data: love.Data, level?: number):love.CompressedData|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. @@ -40,7 +40,7 @@ function love.data.decompress(container, compressedData) end --- ---Encode Data or a string to a Data or string in one of the EncodeFormats. --- ----@overload fun(container: love.ContainerType, format: love.EncodeFormat, sourceData: love.Data, linelength: number):love.ByteData|string +---@overload fun(container: love.ContainerType, format: love.EncodeFormat, sourceData: love.Data, linelength?: number):love.ByteData|string ---@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. @@ -71,7 +71,7 @@ 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. --- ----@overload fun(Data: love.Data, offset: number, size: number):love.ByteData +---@overload fun(Data: love.Data, offset?: number, size?: number):love.ByteData ---@overload fun(size: number):love.ByteData ---@param datastring string # The byte string to copy. ---@return love.ByteData bytedata # The new Data object. @@ -103,7 +103,7 @@ function love.data.pack(container, format, v1, ...) end --- ---This function behaves the same as Lua 5.3's string.unpack. --- ----@overload fun(format: string, data: love.Data, pos: number):number|boolean|string, number|boolean|string, number +---@overload fun(format: string, data: love.Data, pos?: number):number|boolean|string, number|boolean|string, number ---@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. @@ -140,19 +140,19 @@ function CompressedData:getFormat() end --- ---The LZ4 compression format. Compresses and decompresses very quickly, but the compression ratio is not the best. LZ4-HC is used when compression level 9 is specified. Some benchmarks are available here. --- ----| '"lz4"' +---| "lz4" --- ---The zlib format is DEFLATE-compressed data with a small bit of header data. Compresses relatively slowly and decompresses moderately quickly, and has a decent compression ratio. --- ----| '"zlib"' +---| "zlib" --- ---The gzip format is DEFLATE-compressed data with a slightly larger header than zlib. Since it uses DEFLATE it has the same compression characteristics as the zlib format. --- ----| '"gzip"' +---| "gzip" --- ---Raw DEFLATE-compressed data (no header). --- ----| '"deflate"' +---| "deflate" --- ---Return type of various data-returning functions. @@ -161,11 +161,11 @@ function CompressedData:getFormat() end --- ---Return type is ByteData. --- ----| '"data"' +---| "data" --- ---Return type is string. --- ----| '"string"' +---| "string" --- ---Encoding format used to encode or decode data. @@ -174,11 +174,11 @@ function CompressedData:getFormat() end --- ---Encode/decode data as base64 binary-to-text encoding. --- ----| '"base64"' +---| "base64" --- ---Encode/decode data as hexadecimal string. --- ----| '"hex"' +---| "hex" --- ---Hash algorithm of love.data.hash. @@ -187,24 +187,24 @@ function CompressedData:getFormat() end --- ---MD5 hash algorithm (16 bytes). --- ----| '"md5"' +---| "md5" --- ---SHA1 hash algorithm (20 bytes). --- ----| '"sha1"' +---| "sha1" --- ---SHA2 hash algorithm with message digest size of 224 bits (28 bytes). --- ----| '"sha224"' +---| "sha224" --- ---SHA2 hash algorithm with message digest size of 256 bits (32 bytes). --- ----| '"sha256"' +---| "sha256" --- ---SHA2 hash algorithm with message digest size of 384 bits (48 bytes). --- ----| '"sha384"' +---| "sha384" --- ---SHA2 hash algorithm with message digest size of 512 bits (64 bytes). --- ----| '"sha512"' +---| "sha512" diff --git a/meta/3rd/love2d/library/love.event.lua b/meta/3rd/love2d/library/love.event.lua index 12212c0b..c43f4bbd 100644 --- a/meta/3rd/love2d/library/love.event.lua +++ b/meta/3rd/love2d/library/love.event.lua @@ -48,7 +48,7 @@ function love.event.push(n, a, b, c, d, e, f, ...) end --- ---The quit event is a signal for the event handler to close LÖVE. It's possible to abort the exit process with the love.quit callback. --- ----@overload fun(restart: string|"'restart'") +---@overload fun('restart': string|'restart') ---@param exitstatus? number # The program exit status to use when closing the application. function love.event.quit(exitstatus) end @@ -73,148 +73,148 @@ function love.event.wait() end --- ---Window focus gained or lost --- ----| '"focus"' +---| "focus" --- ---Joystick pressed --- ----| '"joystickpressed"' +---| "joystickpressed" --- ---Joystick released --- ----| '"joystickreleased"' +---| "joystickreleased" --- ---Key pressed --- ----| '"keypressed"' +---| "keypressed" --- ---Key released --- ----| '"keyreleased"' +---| "keyreleased" --- ---Mouse pressed --- ----| '"mousepressed"' +---| "mousepressed" --- ---Mouse released --- ----| '"mousereleased"' +---| "mousereleased" --- ---Quit --- ----| '"quit"' +---| "quit" --- ---Window size changed by the user --- ----| '"resize"' +---| "resize" --- ---Window is minimized or un-minimized by the user --- ----| '"visible"' +---| "visible" --- ---Window mouse focus gained or lost --- ----| '"mousefocus"' +---| "mousefocus" --- ---A Lua error has occurred in a thread --- ----| '"threaderror"' +---| "threaderror" --- ---Joystick connected --- ----| '"joystickadded"' +---| "joystickadded" --- ---Joystick disconnected --- ----| '"joystickremoved"' +---| "joystickremoved" --- ---Joystick axis motion --- ----| '"joystickaxis"' +---| "joystickaxis" --- ---Joystick hat pressed --- ----| '"joystickhat"' +---| "joystickhat" --- ---Joystick's virtual gamepad button pressed --- ----| '"gamepadpressed"' +---| "gamepadpressed" --- ---Joystick's virtual gamepad button released --- ----| '"gamepadreleased"' +---| "gamepadreleased" --- ---Joystick's virtual gamepad axis moved --- ----| '"gamepadaxis"' +---| "gamepadaxis" --- ---User entered text --- ----| '"textinput"' +---| "textinput" --- ---Mouse position changed --- ----| '"mousemoved"' +---| "mousemoved" --- ---Running out of memory on mobile devices system --- ----| '"lowmemory"' +---| "lowmemory" --- ---Candidate text for an IME changed --- ----| '"textedited"' +---| "textedited" --- ---Mouse wheel moved --- ----| '"wheelmoved"' +---| "wheelmoved" --- ---Touch screen touched --- ----| '"touchpressed"' +---| "touchpressed" --- ---Touch screen stop touching --- ----| '"touchreleased"' +---| "touchreleased" --- ---Touch press moved inside touch screen --- ----| '"touchmoved"' +---| "touchmoved" --- ---Directory is dragged and dropped onto the window --- ----| '"directorydropped"' +---| "directorydropped" --- ---File is dragged and dropped onto the window. --- ----| '"filedropped"' +---| "filedropped" --- ---Joystick pressed --- ----| '"jp"' +---| "jp" --- ---Joystick released --- ----| '"jr"' +---| "jr" --- ---Key pressed --- ----| '"kp"' +---| "kp" --- ---Key released --- ----| '"kr"' +---| "kr" --- ---Mouse pressed --- ----| '"mp"' +---| "mp" --- ---Mouse released --- ----| '"mr"' +---| "mr" --- ---Quit --- ----| '"q"' +---| "q" --- ---Window focus gained or lost --- ----| '"f"' +---| "f" diff --git a/meta/3rd/love2d/library/love.filesystem.lua b/meta/3rd/love2d/library/love.filesystem.lua index 4c4a8f4e..d706793d 100644 --- a/meta/3rd/love2d/library/love.filesystem.lua +++ b/meta/3rd/love2d/library/love.filesystem.lua @@ -9,7 +9,7 @@ love.filesystem = {} --- ---Append data to an existing file. --- ----@overload fun(name: string, data: love.Data, size: number):boolean, string +---@overload fun(name: string, data: love.Data, size?: number):boolean, string ---@param name string # The name (and path) of the file. ---@param data string # The string data to append to the file. ---@param size? number # How many bytes to write. @@ -167,8 +167,8 @@ function love.filesystem.load(name) end --- ---It is also possible to mount love.filesystem.getSourceBaseDirectory if the game is in fused mode. --- ----@overload fun(filedata: love.FileData, mountpoint: string, appendToPath: boolean):boolean ----@overload fun(data: love.Data, archivename: string, mountpoint: string, appendToPath: boolean):boolean +---@overload fun(filedata: love.FileData, mountpoint: string, appendToPath?: boolean):boolean +---@overload fun(data: love.Data, archivename: string, mountpoint: string, appendToPath?: boolean):boolean ---@param archive string # The folder or zip file in the game's save directory to mount. ---@param mountpoint string # The new path the archive will be mounted to. ---@param appendToPath? boolean # Whether the archive will be searched when reading a filepath before or after already-mounted archives. This includes the game's source and save directories. @@ -198,7 +198,7 @@ function love.filesystem.newFileData(contents, name) end --- ---Read the contents of a file. --- ----@overload fun(container: love.ContainerType, name: string, size: number):love.FileData|string, number, nil, string +---@overload fun(container: love.ContainerType, name: string, size?: number):love.FileData|string, number, nil, string ---@param name string # The name (and path) of the file. ---@param size? number # How many bytes to read. ---@return string contents # The file contents. @@ -265,7 +265,7 @@ function love.filesystem.unmount(archive) end --- ---Write data to a file in the save directory. If the file existed already, it will be completely replaced by the new contents. --- ----@overload fun(name: string, data: love.Data, size: number):boolean, string +---@overload fun(name: string, data: love.Data, size?: number):boolean, string ---@param name string # The name (and path) of the file. ---@param data string # The string data to write to the file. ---@param size? number # How many bytes to write. @@ -354,7 +354,7 @@ function File:open(mode) end --- ---Read a number of bytes from a file. --- ----@overload fun(self: love.File, container: love.ContainerType, bytes: number):love.FileData|string, number +---@overload fun(self: love.File, container: love.ContainerType, bytes?: number):love.FileData|string, number ---@param bytes? number # The number of bytes to read. ---@return string contents # The contents of the read bytes. ---@return number size # How many bytes have been read. @@ -387,7 +387,7 @@ function File:tell() end --- ---Write data to a file. --- ----@overload fun(self: love.File, data: love.Data, size: number):boolean, string +---@overload fun(self: love.File, data: love.Data, size?: number):boolean, string ---@param data string # The string data to write. ---@param size? number # How many bytes to write. ---@return boolean success # Whether the operation was successful. @@ -419,15 +419,15 @@ function FileData:getFilename() end --- ---No buffering. The result of write and append operations appears immediately. --- ----| '"none"' +---| "none" --- ---Line buffering. Write and append operations are buffered until a newline is output or the buffer size limit is reached. --- ----| '"line"' +---| "line" --- ---Full buffering. Write and append operations are always buffered until the buffer size limit is reached. --- ----| '"full"' +---| "full" --- ---How to decode a given FileData. @@ -436,11 +436,11 @@ function FileData:getFilename() end --- ---The data is unencoded. --- ----| '"file"' +---| "file" --- ---The data is base64-encoded. --- ----| '"base64"' +---| "base64" --- ---The different modes you can open a File in. @@ -449,19 +449,19 @@ function FileData:getFilename() end --- ---Open a file for read. --- ----| '"r"' +---| "r" --- ---Open a file for write. --- ----| '"w"' +---| "w" --- ---Open a file for append. --- ----| '"a"' +---| "a" --- ---Do not open a file (represents a closed file.) --- ----| '"c"' +---| "c" --- ---The type of a file. @@ -470,16 +470,16 @@ function FileData:getFilename() end --- ---Regular file. --- ----| '"file"' +---| "file" --- ---Directory. --- ----| '"directory"' +---| "directory" --- ---Symbolic link. --- ----| '"symlink"' +---| "symlink" --- ---Something completely different like a device. --- ----| '"other"' +---| "other" diff --git a/meta/3rd/love2d/library/love.font.lua b/meta/3rd/love2d/library/love.font.lua index 21666912..e7977b8c 100644 --- a/meta/3rd/love2d/library/love.font.lua +++ b/meta/3rd/love2d/library/love.font.lua @@ -9,7 +9,7 @@ love.font = {} --- ---Creates a new BMFont Rasterizer. --- ----@overload fun(fileName: string, glyphs: string, dpiscale: number):love.Rasterizer +---@overload fun(fileName: string, glyphs: string, dpiscale?: number):love.Rasterizer ---@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. @@ -37,11 +37,11 @@ function love.font.newImageRasterizer(imageData, glyphs, extraSpacing, dpiscale) ---Creates a new Rasterizer. --- ---@overload fun(data: love.FileData):love.Rasterizer ----@overload fun(size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer ----@overload fun(fileName: string, size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer ----@overload fun(fileData: love.FileData, size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer ----@overload fun(imageData: love.ImageData, glyphs: string, dpiscale: number):love.Rasterizer ----@overload fun(fileName: string, glyphs: string, dpiscale: number):love.Rasterizer +---@overload fun(size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer +---@overload fun(fileName: string, size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer +---@overload fun(fileData: love.FileData, size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer +---@overload fun(imageData: love.ImageData, glyphs: string, dpiscale?: number):love.Rasterizer +---@overload fun(fileName: string, glyphs: string, dpiscale?: number):love.Rasterizer ---@param filename string # The font file. ---@return love.Rasterizer rasterizer # The rasterizer. function love.font.newRasterizer(filename) end @@ -49,8 +49,8 @@ function love.font.newRasterizer(filename) end --- ---Creates a new TrueType Rasterizer. --- ----@overload fun(fileName: string, size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer ----@overload fun(fileData: love.FileData, size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer +---@overload fun(fileName: string, size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer +---@overload fun(fileData: love.FileData, size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer ---@param size? number # The font size. ---@param hinting? love.HintingMode # True Type hinting mode. ---@param dpiscale? number # The font DPI scale. @@ -188,16 +188,16 @@ function Rasterizer:hasGlyphs(glyph1, glyph2, ...) end --- ---Default hinting. Should be preferred for typical antialiased fonts. --- ----| '"normal"' +---| "normal" --- ---Results in fuzzier text but can sometimes preserve the original glyph shapes of the text better than normal hinting. --- ----| '"light"' +---| "light" --- ---Results in aliased / unsmoothed text with either full opacity or completely transparent pixels. Should be used when antialiasing is not desired for the font. --- ----| '"mono"' +---| "mono" --- ---Disables hinting for the font. Results in fuzzier text. --- ----| '"none"' +---| "none" diff --git a/meta/3rd/love2d/library/love.graphics.lua b/meta/3rd/love2d/library/love.graphics.lua index 8e7a2ab5..d6adf2e4 100644 --- a/meta/3rd/love2d/library/love.graphics.lua +++ b/meta/3rd/love2d/library/love.graphics.lua @@ -23,7 +23,7 @@ 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. --- ----@overload fun(drawmode: love.DrawMode, arctype: love.ArcType, x: number, y: number, radius: number, angle1: number, angle2: number, segments: number) +---@overload fun(drawmode: love.DrawMode, arctype: love.ArcType, x: number, y: number, radius: number, angle1: number, angle2: number, segments?: number) ---@param drawmode love.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. @@ -64,8 +64,8 @@ function love.graphics.circle(mode, x, y, radius) end --- ---In versions prior to background color instead. --- ----@overload fun(r: number, g: number, b: number, a: number, clearstencil: boolean, cleardepth: boolean) ----@overload fun(color: table, ..., clearstencil: boolean, cleardepth: boolean) +---@overload fun(r: number, g: number, b: number, a?: number, clearstencil?: boolean, cleardepth?: boolean) +---@overload fun(color: table, ..., clearstencil?: boolean, cleardepth?: boolean) ---@overload fun(clearcolor: boolean, clearstencil: boolean, cleardepth: boolean) function love.graphics.clear() end @@ -76,7 +76,7 @@ function love.graphics.clear() end --- ---On some desktop systems this function may do nothing. --- ----@overload fun(discardcolors: table, discardstencil: boolean) +---@overload fun(discardcolors: table, discardstencil?: boolean) ---@param discardcolor? boolean # Whether to discard the texture(s) of the active Canvas(es) (the contents of the screen if no Canvas is active.) ---@param discardstencil? boolean # Whether to discard the contents of the stencil buffer of the screen / active Canvas. function love.graphics.discard(discardcolor, discardstencil) end @@ -96,7 +96,7 @@ function love.graphics.discard(discardcolor, discardstencil) end --- ---Set it to pure white to preserve the object's original colors. --- ----@overload fun(texture: love.Texture, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) +---@overload fun(texture: love.Texture, quad: love.Quad, x: number, y: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(drawable: love.Drawable, transform: love.Transform) ---@overload fun(texture: love.Texture, quad: love.Quad, transform: love.Transform) ---@param drawable love.Drawable # A drawable object. @@ -135,7 +135,7 @@ function love.graphics.drawInstanced(mesh, instancecount, x, y, r, sx, sy, ox, o --- ---Draws a layer of an Array Texture. --- ----@overload fun(texture: love.Texture, layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) +---@overload fun(texture: love.Texture, layerindex: number, quad: love.Quad, x?: number, y?: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(texture: love.Texture, layerindex: number, transform: love.Transform) ---@overload fun(texture: love.Texture, layerindex: number, quad: love.Quad, transform: love.Transform) ---@param texture love.Texture # The Array Texture to draw. @@ -545,7 +545,7 @@ function love.graphics.newCanvas() end --- ---+x -x +y -y +z -z --- ----@overload fun(faces: table, settings: table):love.Image +---@overload fun(faces: table, settings?: table):love.Image ---@param filename string # The filepath to a cubemap image file (or a File, FileData, or ImageData). ---@param settings? {mipmaps: boolean, linear: boolean} # Optional table of settings to configure the cubemap image, containing the following fields: ---@return love.Image image # An cubemap Image object. @@ -556,9 +556,9 @@ function love.graphics.newCubeImage(filename, settings) end --- ---All variants which accept a filename can also accept a Data object instead. --- ----@overload fun(filename: string, size: number, hinting: love.HintingMode, dpiscale: number):love.Font +---@overload fun(filename: string, size: number, hinting?: love.HintingMode, dpiscale?: number):love.Font ---@overload fun(filename: string, imagefilename: string):love.Font ----@overload fun(size: number, hinting: love.HintingMode, dpiscale: number):love.Font +---@overload fun(size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Font ---@param filename string # The filepath to the BMFont or TrueType font file. ---@return love.Font font # A Font object which can be used to draw text on screen. function love.graphics.newFont(filename) end @@ -566,9 +566,9 @@ 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. --- ----@overload fun(fileData: love.FileData, flags: table):love.Image ----@overload fun(imageData: love.ImageData, flags: table):love.Image ----@overload fun(compressedImageData: love.CompressedImageData, flags: table):love.Image +---@overload fun(fileData: love.FileData, flags?: table):love.Image +---@overload fun(imageData: love.ImageData, flags?: table):love.Image +---@overload fun(compressedImageData: love.CompressedImageData, flags?: table):love.Image ---@param filename string # The filepath to the image file. ---@param flags? {dpiscale: number, linear: boolean, mipmaps: boolean} # A table containing the following fields: ---@return love.Image image # A new Image object which can be drawn on screen. @@ -593,10 +593,10 @@ 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. --- ----@overload fun(vertexcount: number, mode: love.MeshDrawMode, usage: love.SpriteBatchUsage):love.Mesh ----@overload fun(vertexformat: table, vertices: table, mode: love.MeshDrawMode, usage: love.SpriteBatchUsage):love.Mesh ----@overload fun(vertexformat: table, vertexcount: number, mode: love.MeshDrawMode, usage: love.SpriteBatchUsage):love.Mesh ----@overload fun(vertexcount: number, texture: love.Texture, mode: love.MeshDrawMode):love.Mesh +---@overload fun(vertexcount: number, mode?: love.MeshDrawMode, usage?: love.SpriteBatchUsage):love.Mesh +---@overload fun(vertexformat: table, vertices: table, mode?: love.MeshDrawMode, usage?: love.SpriteBatchUsage):love.Mesh +---@overload fun(vertexformat: table, vertexcount: number, mode?: love.MeshDrawMode, usage?: love.SpriteBatchUsage):love.Mesh +---@overload fun(vertexcount: number, texture?: love.Texture, mode?: love.MeshDrawMode):love.Mesh ---@param vertices {["1"]: number, ["2"]: number, ["3"]: number, ["4"]: number, ["5"]: number, ["6"]: number, ["7"]: number, ["8"]: number} # The table filled with vertex information tables for each vertex as follows: ---@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. @@ -606,7 +606,7 @@ function love.graphics.newMesh(vertices, mode, usage) end --- ---Creates a new ParticleSystem. --- ----@overload fun(texture: love.Texture, buffer: number):love.ParticleSystem +---@overload fun(texture: love.Texture, buffer?: number):love.ParticleSystem ---@param image love.Image # The image to use. ---@param buffer? number # The max number of particles at the same time. ---@return love.ParticleSystem system # A new ParticleSystem. @@ -639,8 +639,8 @@ function love.graphics.newShader(code) end --- ---Creates a new SpriteBatch object. --- ----@overload fun(image: love.Image, maxsprites: number, usage: love.SpriteBatchUsage):love.SpriteBatch ----@overload fun(texture: love.Texture, maxsprites: number, usage: love.SpriteBatchUsage):love.SpriteBatch +---@overload fun(image: love.Image, maxsprites?: number, usage?: love.SpriteBatchUsage):love.SpriteBatch +---@overload fun(texture: love.Texture, maxsprites?: number, usage?: love.SpriteBatchUsage):love.SpriteBatch ---@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.SpriteBatch spriteBatch # The new SpriteBatch. @@ -658,9 +658,9 @@ function love.graphics.newText(font, textstring) end ---Creates a new drawable Video. Currently only Ogg Theora video files are supported. --- ---@overload fun(videostream: love.VideoStream):love.Video ----@overload fun(filename: string, settings: table):love.Video ----@overload fun(filename: string, loadaudio: boolean):love.Video ----@overload fun(videostream: love.VideoStream, loadaudio: boolean):love.Video +---@overload fun(filename: string, settings?: table):love.Video +---@overload fun(filename: string, loadaudio?: boolean):love.Video +---@overload fun(videostream: love.VideoStream, loadaudio?: boolean):love.Video ---@param filename string # The file path to the Ogg Theora video file. ---@return love.Video video # A new Video. function love.graphics.newVideo(filename) end @@ -733,7 +733,7 @@ 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. --- ----@overload fun(coloredtext: table, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) +---@overload fun(coloredtext: table, x?: number, y?: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(text: string, transform: love.Transform) ---@overload fun(coloredtext: table, transform: love.Transform) ---@overload fun(text: string, font: love.Font, transform: love.Transform) @@ -761,13 +761,13 @@ 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. --- ----@overload fun(text: string, font: love.Font, x: number, y: number, limit: number, align: love.AlignMode, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) ----@overload fun(text: string, transform: love.Transform, limit: number, align: love.AlignMode) ----@overload fun(text: string, font: love.Font, transform: love.Transform, limit: number, align: love.AlignMode) ----@overload fun(coloredtext: table, x: number, y: number, limit: number, align: love.AlignMode, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) ----@overload fun(coloredtext: table, font: love.Font, x: number, y: number, limit: number, align: love.AlignMode, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) ----@overload fun(coloredtext: table, transform: love.Transform, limit: number, align: love.AlignMode) ----@overload fun(coloredtext: table, font: love.Font, transform: love.Transform, limit: number, align: love.AlignMode) +---@overload fun(text: string, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) +---@overload fun(text: string, transform: love.Transform, limit: number, align?: love.AlignMode) +---@overload fun(text: string, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) +---@overload fun(coloredtext: table, x: number, y: number, limit: number, align: love.AlignMode, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) +---@overload fun(coloredtext: table, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) +---@overload fun(coloredtext: table, transform: love.Transform, limit: number, align?: love.AlignMode) +---@overload fun(coloredtext: table, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) ---@param text string # A text string. ---@param x number # The position on the x-axis. ---@param y number # The position on the y-axis. @@ -793,7 +793,7 @@ function love.graphics.push() end --- ---Draws a rectangle. --- ----@overload fun(mode: love.DrawMode, x: number, y: number, width: number, height: number, rx: number, ry: number, segments: number) +---@overload fun(mode: love.DrawMode, x: number, y: number, width: number, height: number, rx: number, ry?: number, segments?: number) ---@param mode love.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. @@ -851,7 +851,7 @@ function love.graphics.setBackgroundColor(red, green, blue, alpha) end --- ---Sets the blending mode. --- ----@overload fun(mode: love.BlendMode, alphamode: love.BlendAlphaMode) +---@overload fun(mode: love.BlendMode, alphamode?: love.BlendAlphaMode) ---@param mode love.BlendMode # The blend mode to use. function love.graphics.setBlendMode(mode) end @@ -860,7 +860,7 @@ function love.graphics.setBlendMode(mode) end --- ---@overload fun() ---@overload fun(canvas1: love.Canvas, canvas2: love.Canvas, ...) ----@overload fun(canvas: love.Canvas, slice: number, mipmap: number) +---@overload fun(canvas: love.Canvas, slice: number, mipmap?: number) ---@overload fun(setup: table) ---@param canvas love.Canvas # The new target. ---@param mipmap? number # The mipmap level to render to, for Canvases with mipmaps. @@ -953,9 +953,9 @@ function love.graphics.setMeshCullMode(mode) end --- ---Creates and sets a new Font. --- ----@overload fun(filename: string, size: number):love.Font ----@overload fun(file: love.File, size: number):love.Font ----@overload fun(data: love.Data, size: number):love.Font +---@overload fun(filename: string, size?: number):love.Font +---@overload fun(file: love.File, size?: number):love.Font +---@overload fun(data: love.Data, size?: number):love.Font ---@overload fun(rasterizer: love.Rasterizer):love.Font ---@param size? number # The size of the font. ---@return love.Font font # The new font. @@ -1096,7 +1096,7 @@ function Canvas:getMipmapMode() end --- ---Generates ImageData from the contents of the Canvas. --- ----@overload fun(self: love.Canvas, slice: number, mipmap: number, x: number, y: number, width: number, height: number):love.ImageData +---@overload fun(self: love.Canvas, slice: number, mipmap?: number, x: number, y: number, width: number, height: number):love.ImageData ---@return love.ImageData data # The new ImageData made from the Canvas' contents. function Canvas:newImageData() end @@ -1289,7 +1289,7 @@ 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. --- ----@overload fun(self: love.Mesh, name: string, mesh: love.Mesh, step: love.VertexAttributeStep, attachname: string) +---@overload fun(self: love.Mesh, name: string, mesh: love.Mesh, step?: love.VertexAttributeStep, attachname?: string) ---@param name string # The name of the vertex attribute to attach. ---@param mesh love.Mesh # The Mesh to get the vertex attribute from. function Mesh:attachAttribute(name, mesh) end @@ -1402,7 +1402,7 @@ function Mesh:setTexture(texture) 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. --- ---@overload fun(self: love.Mesh, index: number, vertex: table) ----@overload fun(self: love.Mesh, index: number, x: number, y: number, u: number, v: number, r: number, g: number, b: number, a: number) +---@overload fun(self: love.Mesh, index: number, x: number, y: number, u: number, v: number, r?: number, g?: number, b?: number, a?: number) ---@overload fun(self: love.Mesh, index: number, vertex: table) ---@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. @@ -1434,7 +1434,7 @@ function Mesh:setVertexMap(map) end --- ---Replaces a range of vertices in the Mesh with new ones. The total number of vertices in a Mesh cannot be changed after it has been created. This is often more efficient than calling Mesh:setVertex in a loop. --- ----@overload fun(self: love.Mesh, data: love.Data, startvertex: number) +---@overload fun(self: love.Mesh, data: love.Data, startvertex?: number) ---@overload fun(self: love.Mesh, vertices: table) ---@param vertices {attributecomponent: number} # The table filled with vertex information tables for each vertex, in the form of {vertex, ...} where each vertex is a table in the form of {attributecomponent, ...}. ---@param startvertex? number # The index of the first vertex to replace. @@ -1966,9 +1966,9 @@ function Shader:hasUniform(name) end ---@overload fun(self: love.Shader, name: string, texture: love.Texture) ---@overload fun(self: love.Shader, name: string, boolean: boolean, ...) ---@overload fun(self: love.Shader, name: string, matrixlayout: love.MatrixLayout, matrix: table, ...) ----@overload fun(self: love.Shader, name: string, data: love.Data, offset: number, size: number) ----@overload fun(self: love.Shader, name: string, data: love.Data, matrixlayout: love.MatrixLayout, offset: number, size: number) ----@overload fun(self: love.Shader, name: string, matrixlayout: love.MatrixLayout, data: love.Data, offset: number, size: number) +---@overload fun(self: love.Shader, name: string, data: love.Data, offset?: number, size?: number) +---@overload fun(self: love.Shader, name: string, data: love.Data, matrixlayout: love.MatrixLayout, offset?: number, size?: number) +---@overload fun(self: love.Shader, name: string, matrixlayout: love.MatrixLayout, data: love.Data, offset?: number, size?: number) ---@param name string # Name of the number to send to the shader. ---@param number number # Number to send to store in the uniform variable. ---@vararg number # Additional numbers to send if the uniform variable is an array. @@ -2005,7 +2005,7 @@ local SpriteBatch = {} --- ---Adds a sprite to the batch. Sprites are drawn in the order they are added. --- ----@overload fun(self: love.SpriteBatch, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number +---@overload fun(self: love.SpriteBatch, quad: love.Quad, x: number, y: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):number ---@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). @@ -2021,7 +2021,7 @@ function SpriteBatch:add(x, y, r, sx, sy, ox, oy, kx, ky) end --- ---Adds a sprite to a batch created with an Array Texture. --- ----@overload fun(self: love.SpriteBatch, layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number +---@overload fun(self: love.SpriteBatch, layerindex: number, quad: love.Quad, x?: number, y?: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):number ---@overload fun(self: love.SpriteBatch, layerindex: number, transform: love.Transform):number ---@overload fun(self: love.SpriteBatch, layerindex: number, quad: love.Quad, transform: love.Transform):number ---@param layerindex number # The index of the layer to use for this sprite. @@ -2094,7 +2094,7 @@ function SpriteBatch:getTexture() end --- ---Changes a sprite in the batch. This requires the sprite index returned by SpriteBatch:add or SpriteBatch:addLayer. --- ----@overload fun(self: love.SpriteBatch, spriteindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) +---@overload fun(self: love.SpriteBatch, spriteindex: number, quad: love.Quad, x: number, y: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@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). @@ -2132,7 +2132,7 @@ function SpriteBatch:setDrawRange(start, count) end --- ---Changes a sprite previously added with add or addLayer, in a batch created with an Array Texture. --- ----@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number) +---@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, quad: love.Quad, x?: number, y?: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, transform: love.Transform) ---@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, quad: love.Quad, transform: love.Transform) ---@param spriteindex number # The index of the existing sprite to replace. @@ -2163,7 +2163,7 @@ local Text = {} --- ---Adds additional colored text to the Text object at the specified position. --- ----@overload fun(self: love.Text, coloredtext: table, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number +---@overload fun(self: love.Text, coloredtext: table, x?: number, y?: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):number ---@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. @@ -2182,7 +2182,7 @@ function Text:add(textstring, x, y, angle, sx, sy, ox, oy, kx, ky) end --- ---The word wrap limit is applied before any scaling, rotation, and other coordinate transformations. Therefore the amount of text per line stays constant given the same wrap limit, even if the scale arguments change. --- ----@overload fun(self: love.Text, coloredtext: table, wraplimit: number, align: love.AlignMode, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number +---@overload fun(self: love.Text, coloredtext: table, wraplimit: number, align: love.AlignMode, x: number, y: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):number ---@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.AlignMode # The alignment of the text. @@ -2529,19 +2529,19 @@ function Video:tell() end --- ---Align text center. --- ----| '"center"' +---| "center" --- ---Align text left. --- ----| '"left"' +---| "left" --- ---Align text right. --- ----| '"right"' +---| "right" --- ---Align text both left and right. --- ----| '"justify"' +---| "justify" --- ---Different types of arcs that can be drawn. @@ -2550,15 +2550,15 @@ function Video:tell() end --- ---The arc is drawn like a slice of pie, with the arc circle connected to the center at its end-points. --- ----| '"pie"' +---| "pie" --- ---The arc circle's two end-points are unconnected when the arc is drawn as a line. Behaves like the "closed" arc type when the arc is drawn in filled mode. --- ----| '"open"' +---| "open" --- ---The arc circle's two end-points are connected to each other. --- ----| '"closed"' +---| "closed" --- ---Types of particle area spread distribution. @@ -2567,27 +2567,27 @@ function Video:tell() end --- ---Uniform distribution. --- ----| '"uniform"' +---| "uniform" --- ---Normal (gaussian) distribution. --- ----| '"normal"' +---| "normal" --- ---Uniform distribution in an ellipse. --- ----| '"ellipse"' +---| "ellipse" --- ---Distribution in an ellipse with particles spawning at the edges of the ellipse. --- ----| '"borderellipse"' +---| "borderellipse" --- ---Distribution in a rectangle with particles spawning at the edges of the rectangle. --- ----| '"borderrectangle"' +---| "borderrectangle" --- ---No distribution - area spread is disabled. --- ----| '"none"' +---| "none" --- ---Different ways alpha affects color blending. See BlendMode and the BlendMode Formulas for additional notes. @@ -2596,11 +2596,11 @@ function Video:tell() end --- ---The RGB values of what's drawn are multiplied by the alpha values of those colors during blending. This is the default alpha mode. --- ----| '"alphamultiply"' +---| "alphamultiply" --- ---The RGB values of what's drawn are '''not''' multiplied by the alpha values of those colors during blending. For most blend modes to work correctly with this alpha mode, the colors of a drawn object need to have had their RGB values multiplied by their alpha values at some point previously ("premultiplied alpha"). --- ----| '"premultiplied"' +---| "premultiplied" --- ---Different ways to do color blending. See BlendAlphaMode and the BlendMode Formulas for additional notes. @@ -2609,51 +2609,51 @@ function Video:tell() end --- ---Alpha blending (normal). The alpha of what's drawn determines its opacity. --- ----| '"alpha"' +---| "alpha" --- ---The colors of what's drawn completely replace what was on the screen, with no additional blending. The BlendAlphaMode specified in love.graphics.setBlendMode still affects what happens. --- ----| '"replace"' +---| "replace" --- ---'Screen' blending. --- ----| '"screen"' +---| "screen" --- ---The pixel colors of what's drawn are added to the pixel colors already on the screen. The alpha of the screen is not modified. --- ----| '"add"' +---| "add" --- ---The pixel colors of what's drawn are subtracted from the pixel colors already on the screen. The alpha of the screen is not modified. --- ----| '"subtract"' +---| "subtract" --- ---The pixel colors of what's drawn are multiplied with the pixel colors already on the screen (darkening them). The alpha of drawn objects is multiplied with the alpha of the screen rather than determining how much the colors on the screen are affected, even when the "alphamultiply" BlendAlphaMode is used. --- ----| '"multiply"' +---| "multiply" --- ---The pixel colors of what's drawn are compared to the existing pixel colors, and the larger of the two values for each color component is used. Only works when the "premultiplied" BlendAlphaMode is used in love.graphics.setBlendMode. --- ----| '"lighten"' +---| "lighten" --- ---The pixel colors of what's drawn are compared to the existing pixel colors, and the smaller of the two values for each color component is used. Only works when the "premultiplied" BlendAlphaMode is used in love.graphics.setBlendMode. --- ----| '"darken"' +---| "darken" --- ---Additive blend mode. --- ----| '"additive"' +---| "additive" --- ---Subtractive blend mode. --- ----| '"subtractive"' +---| "subtractive" --- ---Multiply blend mode. --- ----| '"multiplicative"' +---| "multiplicative" --- ---Premultiplied alpha blend mode. --- ----| '"premultiplied"' +---| "premultiplied" --- ---Different types of per-pixel stencil test and depth test comparisons. The pixels of an object will be drawn if the comparison succeeds, for each pixel that the object touches. @@ -2663,40 +2663,40 @@ function Video:tell() end ---* stencil tests: the stencil value of the pixel must be equal to the supplied value. ---* depth tests: the depth value of the drawn object at that pixel must be equal to the existing depth value of that pixel. --- ----| '"equal"' +---| "equal" --- ---* stencil tests: the stencil value of the pixel must not be equal to the supplied value. ---* depth tests: the depth value of the drawn object at that pixel must not be equal to the existing depth value of that pixel. --- ----| '"notequal"' +---| "notequal" --- ---* stencil tests: the stencil value of the pixel must be less than the supplied value. ---* depth tests: the depth value of the drawn object at that pixel must be less than the existing depth value of that pixel. --- ----| '"less"' +---| "less" --- ---* stencil tests: the stencil value of the pixel must be less than or equal to the supplied value. ---* depth tests: the depth value of the drawn object at that pixel must be less than or equal to the existing depth value of that pixel. --- ----| '"lequal"' +---| "lequal" --- ---* stencil tests: the stencil value of the pixel must be greater than or equal to the supplied value. ---* depth tests: the depth value of the drawn object at that pixel must be greater than or equal to the existing depth value of that pixel. --- ----| '"gequal"' +---| "gequal" --- ---* stencil tests: the stencil value of the pixel must be greater than the supplied value. ---* depth tests: the depth value of the drawn object at that pixel must be greater than the existing depth value of that pixel. --- ----| '"greater"' +---| "greater" --- ---Objects will never be drawn. --- ----| '"never"' +---| "never" --- ---Objects will always be drawn. Effectively disables the depth or stencil test. --- ----| '"always"' +---| "always" --- ---How Mesh geometry is culled when rendering. @@ -2705,15 +2705,15 @@ function Video:tell() end --- ---Back-facing triangles in Meshes are culled (not rendered). The vertex order of a triangle determines whether it is back- or front-facing. --- ----| '"back"' +---| "back" --- ---Front-facing triangles in Meshes are culled. --- ----| '"front"' +---| "front" --- ---Both back- and front-facing triangles in Meshes are rendered. --- ----| '"none"' +---| "none" --- ---Controls whether shapes are drawn as an outline, or filled. @@ -2722,11 +2722,11 @@ function Video:tell() end --- ---Draw filled shape. --- ----| '"fill"' +---| "fill" --- ---Draw outlined shape. --- ----| '"line"' +---| "line" --- ---How the image is filtered when scaling. @@ -2735,11 +2735,11 @@ function Video:tell() end --- ---Scale image with linear interpolation. --- ----| '"linear"' +---| "linear" --- ---Scale image with nearest neighbor interpolation. --- ----| '"nearest"' +---| "nearest" --- ---Graphics features that can be checked for with love.graphics.getSupported. @@ -2748,35 +2748,35 @@ function Video:tell() end --- ---Whether the "clampzero" WrapMode is supported. --- ----| '"clampzero"' +---| "clampzero" --- ---Whether the "lighten" and "darken" BlendModes are supported. --- ----| '"lighten"' +---| "lighten" --- ---Whether multiple formats can be used in the same love.graphics.setCanvas call. --- ----| '"multicanvasformats"' +---| "multicanvasformats" --- ---Whether GLSL 3 Shaders can be used. --- ----| '"glsl3"' +---| "glsl3" --- ---Whether mesh instancing is supported. --- ----| '"instancing"' +---| "instancing" --- ---Whether textures with non-power-of-two dimensions can use mipmapping and the 'repeat' WrapMode. --- ----| '"fullnpot"' +---| "fullnpot" --- ---Whether pixel shaders can use "highp" 32 bit floating point numbers (as opposed to just 16 bit or lower precision). --- ----| '"pixelshaderhighp"' +---| "pixelshaderhighp" --- ---Whether shaders can use the dFdx, dFdy, and fwidth functions for computing derivatives. --- ----| '"shaderderivatives"' +---| "shaderderivatives" --- ---Types of system-dependent graphics limits checked for using love.graphics.getSystemLimits. @@ -2785,35 +2785,35 @@ function Video:tell() end --- ---The maximum size of points. --- ----| '"pointsize"' +---| "pointsize" --- ---The maximum width or height of Images and Canvases. --- ----| '"texturesize"' +---| "texturesize" --- ---The maximum number of simultaneously active canvases (via love.graphics.setCanvas.) --- ----| '"multicanvas"' +---| "multicanvas" --- ---The maximum number of antialiasing samples for a Canvas. --- ----| '"canvasmsaa"' +---| "canvasmsaa" --- ---The maximum number of layers in an Array texture. --- ----| '"texturelayers"' +---| "texturelayers" --- ---The maximum width, height, or depth of a Volume texture. --- ----| '"volumetexturesize"' +---| "volumetexturesize" --- ---The maximum width or height of a Cubemap texture. --- ----| '"cubetexturesize"' +---| "cubetexturesize" --- ---The maximum amount of anisotropic filtering. Texture:setMipmapFilter internally clamps the given anisotropy value to the system's limit. --- ----| '"anisotropy"' +---| "anisotropy" --- ---Vertex map datatype for Data variant of Mesh:setVertexMap. @@ -2822,11 +2822,11 @@ function Video:tell() end --- ---The vertex map is array of unsigned word (16-bit). --- ----| '"uint16"' +---| "uint16" --- ---The vertex map is array of unsigned dword (32-bit). --- ----| '"uint32"' +---| "uint32" --- ---Line join style. @@ -2835,15 +2835,15 @@ function Video:tell() end --- ---The ends of the line segments beveled in an angle so that they join seamlessly. --- ----| '"miter"' +---| "miter" --- ---No cap applied to the ends of the line segments. --- ----| '"none"' +---| "none" --- ---Flattens the point where line segments join together. --- ----| '"bevel"' +---| "bevel" --- ---The styles in which lines are drawn. @@ -2852,11 +2852,11 @@ function Video:tell() end --- ---Draw rough lines. --- ----| '"rough"' +---| "rough" --- ---Draw smooth lines. --- ----| '"smooth"' +---| "smooth" --- ---How a Mesh's vertices are used when drawing. @@ -2865,19 +2865,19 @@ function Video:tell() end --- ---The vertices create a "fan" shape with the first vertex acting as the hub point. Can be easily used to draw simple convex polygons. --- ----| '"fan"' +---| "fan" --- ---The vertices create a series of connected triangles using vertices 1, 2, 3, then 3, 2, 4 (note the order), then 3, 4, 5, and so on. --- ----| '"strip"' +---| "strip" --- ---The vertices create unconnected triangles. --- ----| '"triangles"' +---| "triangles" --- ---The vertices are drawn as unconnected points (see love.graphics.setPointSize.) --- ----| '"points"' +---| "points" --- ---Controls whether a Canvas has mipmaps, and its behaviour when it does. @@ -2886,15 +2886,15 @@ function Video:tell() end --- ---The Canvas has no mipmaps. --- ----| '"none"' +---| "none" --- ---The Canvas has mipmaps. love.graphics.setCanvas can be used to render to a specific mipmap level, or Canvas:generateMipmaps can (re-)compute all mipmap levels based on the base level. --- ----| '"auto"' +---| "auto" --- ---The Canvas has mipmaps, and all mipmap levels will automatically be recomputed when switching away from the Canvas with love.graphics.setCanvas. --- ----| '"manual"' +---| "manual" --- ---How newly created particles are added to the ParticleSystem. @@ -2903,15 +2903,15 @@ function Video:tell() end --- ---Particles are inserted at the top of the ParticleSystem's list of particles. --- ----| '"top"' +---| "top" --- ---Particles are inserted at the bottom of the ParticleSystem's list of particles. --- ----| '"bottom"' +---| "bottom" --- ---Particles are inserted at random positions in the ParticleSystem's list of particles. --- ----| '"random"' +---| "random" --- ---Usage hints for SpriteBatches and Meshes to optimize data storage and access. @@ -2920,15 +2920,15 @@ function Video:tell() end --- ---The object's data will change occasionally during its lifetime. --- ----| '"dynamic"' +---| "dynamic" --- ---The object will not be modified after initial sprites or vertices are added. --- ----| '"static"' +---| "static" --- ---The object data will always change between draws. --- ----| '"stream"' +---| "stream" --- ---Graphics state stack types used with love.graphics.push. @@ -2937,11 +2937,11 @@ function Video:tell() end --- ---The transformation stack (love.graphics.translate, love.graphics.rotate, etc.) --- ----| '"transform"' +---| "transform" --- ---All love.graphics state, including transform state. --- ----| '"all"' +---| "all" --- ---How a stencil function modifies the stencil values of pixels it touches. @@ -2950,27 +2950,27 @@ function Video:tell() end --- ---The stencil value of a pixel will be replaced by the value specified in love.graphics.stencil, if any object touches the pixel. --- ----| '"replace"' +---| "replace" --- ---The stencil value of a pixel will be incremented by 1 for each object that touches the pixel. If the stencil value reaches 255 it will stay at 255. --- ----| '"increment"' +---| "increment" --- ---The stencil value of a pixel will be decremented by 1 for each object that touches the pixel. If the stencil value reaches 0 it will stay at 0. --- ----| '"decrement"' +---| "decrement" --- ---The stencil value of a pixel will be incremented by 1 for each object that touches the pixel. If a stencil value of 255 is incremented it will be set to 0. --- ----| '"incrementwrap"' +---| "incrementwrap" --- ---The stencil value of a pixel will be decremented by 1 for each object that touches the pixel. If the stencil value of 0 is decremented it will be set to 255. --- ----| '"decrementwrap"' +---| "decrementwrap" --- ---The stencil value of a pixel will be bitwise-inverted for each object that touches the pixel. If a stencil value of 0 is inverted it will become 255. --- ----| '"invert"' +---| "invert" --- ---Types of textures (2D, cubemap, etc.) @@ -2979,19 +2979,19 @@ function Video:tell() end --- ---Regular 2D texture with width and height. --- ----| '"2d"' +---| "2d" --- ---Several same-size 2D textures organized into a single object. Similar to a texture atlas / sprite sheet, but avoids sprite bleeding and other issues. --- ----| '"array"' +---| "array" --- ---Cubemap texture with 6 faces. Requires a custom shader (and Shader:send) to use. Sampling from a cube texture in a shader takes a 3D direction vector instead of a texture coordinate. --- ----| '"cube"' +---| "cube" --- ---3D texture with width, height, and depth. Requires a custom shader to use. Volume textures can have texture filtering applied along the 3rd axis. --- ----| '"volume"' +---| "volume" --- ---The frequency at which a vertex shader fetches the vertex attribute's data from the Mesh when it's drawn. @@ -3002,11 +3002,11 @@ function Video:tell() end --- ---The vertex attribute will have a unique value for each vertex in the Mesh. --- ----| '"pervertex"' +---| "pervertex" --- ---The vertex attribute will have a unique value for each instance of the Mesh. --- ----| '"perinstance"' +---| "perinstance" --- ---How Mesh geometry vertices are ordered. @@ -3015,11 +3015,11 @@ function Video:tell() end --- ---Clockwise. --- ----| '"cw"' +---| "cw" --- ---Counter-clockwise. --- ----| '"ccw"' +---| "ccw" --- ---How the image wraps inside a Quad with a larger quad size than image size. This also affects how Meshes with texture coordinates which are outside the range of 1 are drawn, and the color returned by the Texel Shader function when using it to sample from texture coordinates outside of the range of 1. @@ -3028,16 +3028,16 @@ function Video:tell() end --- ---Clamp the texture. Appears only once. The area outside the texture's normal range is colored based on the edge pixels of the texture. --- ----| '"clamp"' +---| "clamp" --- ---Repeat the texture. Fills the whole available extent. --- ----| '"repeat"' +---| "repeat" --- ---Repeat the texture, flipping it each time it repeats. May produce better visual results than the repeat mode when the texture doesn't seamlessly tile. --- ----| '"mirroredrepeat"' +---| "mirroredrepeat" --- ---Clamp the texture. Fills the area outside the texture's normal range with transparent black (or opaque black for textures with no alpha channel.) --- ----| '"clampzero"' +---| "clampzero" diff --git a/meta/3rd/love2d/library/love.image.lua b/meta/3rd/love2d/library/love.image.lua index 19d6f825..e3a1565f 100644 --- a/meta/3rd/love2d/library/love.image.lua +++ b/meta/3rd/love2d/library/love.image.lua @@ -25,7 +25,7 @@ function love.image.newCompressedData(filename) end --- ---Creates a new ImageData object. --- ----@overload fun(width: number, height: number, format: love.PixelFormat, data: string):love.ImageData +---@overload fun(width: number, height: number, format?: love.PixelFormat, data?: string):love.ImageData ---@overload fun(width: number, height: number, data: string):love.ImageData ---@overload fun(filename: string):love.ImageData ---@overload fun(filedata: love.FileData):love.ImageData @@ -200,147 +200,147 @@ function ImageData:getFormat() end --- ---The DXT1 format. RGB data at 4 bits per pixel (compared to 32 bits for ImageData and regular Images.) Suitable for fully opaque images on desktop systems. --- ----| '"DXT1"' +---| "DXT1" --- ---The DXT3 format. RGBA data at 8 bits per pixel. Smooth variations in opacity do not mix well with this format. --- ----| '"DXT3"' +---| "DXT3" --- ---The DXT5 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on desktop systems. --- ----| '"DXT5"' +---| "DXT5" --- ---The BC4 format (also known as 3Dc+ or ATI1.) Stores just the red channel, at 4 bits per pixel. --- ----| '"BC4"' +---| "BC4" --- ---The signed variant of the BC4 format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. --- ----| '"BC4s"' +---| "BC4s" --- ---The BC5 format (also known as 3Dc or ATI2.) Stores red and green channels at 8 bits per pixel. --- ----| '"BC5"' +---| "BC5" --- ---The signed variant of the BC5 format. --- ----| '"BC5s"' +---| "BC5s" --- ---The BC6H format. Stores half-precision floating-point RGB data in the range of 65504 at 8 bits per pixel. Suitable for HDR images on desktop systems. --- ----| '"BC6h"' +---| "BC6h" --- ---The signed variant of the BC6H format. Stores RGB data in the range of +65504. --- ----| '"BC6hs"' +---| "BC6hs" --- ---The BC7 format (also known as BPTC.) Stores RGB or RGBA data at 8 bits per pixel. --- ----| '"BC7"' +---| "BC7" --- ---The ETC1 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on older Android devices. --- ----| '"ETC1"' +---| "ETC1" --- ---The RGB variant of the ETC2 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on newer mobile devices. --- ----| '"ETC2rgb"' +---| "ETC2rgb" --- ---The RGBA variant of the ETC2 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on newer mobile devices. --- ----| '"ETC2rgba"' +---| "ETC2rgba" --- ---The RGBA variant of the ETC2 format where pixels are either fully transparent or fully opaque. RGBA data at 4 bits per pixel. --- ----| '"ETC2rgba1"' +---| "ETC2rgba1" --- ---The single-channel variant of the EAC format. Stores just the red channel, at 4 bits per pixel. --- ----| '"EACr"' +---| "EACr" --- ---The signed single-channel variant of the EAC format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. --- ----| '"EACrs"' +---| "EACrs" --- ---The two-channel variant of the EAC format. Stores red and green channels at 8 bits per pixel. --- ----| '"EACrg"' +---| "EACrg" --- ---The signed two-channel variant of the EAC format. --- ----| '"EACrgs"' +---| "EACrgs" --- ---The 2 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 2 bits per pixel. Textures compressed with PVRTC1 formats must be square and power-of-two sized. --- ----| '"PVR1rgb2"' +---| "PVR1rgb2" --- ---The 4 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 4 bits per pixel. --- ----| '"PVR1rgb4"' +---| "PVR1rgb4" --- ---The 2 bit per pixel RGBA variant of the PVRTC1 format. --- ----| '"PVR1rgba2"' +---| "PVR1rgba2" --- ---The 4 bit per pixel RGBA variant of the PVRTC1 format. --- ----| '"PVR1rgba4"' +---| "PVR1rgba4" --- ---The 4x4 pixels per block variant of the ASTC format. RGBA data at 8 bits per pixel. --- ----| '"ASTC4x4"' +---| "ASTC4x4" --- ---The 5x4 pixels per block variant of the ASTC format. RGBA data at 6.4 bits per pixel. --- ----| '"ASTC5x4"' +---| "ASTC5x4" --- ---The 5x5 pixels per block variant of the ASTC format. RGBA data at 5.12 bits per pixel. --- ----| '"ASTC5x5"' +---| "ASTC5x5" --- ---The 6x5 pixels per block variant of the ASTC format. RGBA data at 4.27 bits per pixel. --- ----| '"ASTC6x5"' +---| "ASTC6x5" --- ---The 6x6 pixels per block variant of the ASTC format. RGBA data at 3.56 bits per pixel. --- ----| '"ASTC6x6"' +---| "ASTC6x6" --- ---The 8x5 pixels per block variant of the ASTC format. RGBA data at 3.2 bits per pixel. --- ----| '"ASTC8x5"' +---| "ASTC8x5" --- ---The 8x6 pixels per block variant of the ASTC format. RGBA data at 2.67 bits per pixel. --- ----| '"ASTC8x6"' +---| "ASTC8x6" --- ---The 8x8 pixels per block variant of the ASTC format. RGBA data at 2 bits per pixel. --- ----| '"ASTC8x8"' +---| "ASTC8x8" --- ---The 10x5 pixels per block variant of the ASTC format. RGBA data at 2.56 bits per pixel. --- ----| '"ASTC10x5"' +---| "ASTC10x5" --- ---The 10x6 pixels per block variant of the ASTC format. RGBA data at 2.13 bits per pixel. --- ----| '"ASTC10x6"' +---| "ASTC10x6" --- ---The 10x8 pixels per block variant of the ASTC format. RGBA data at 1.6 bits per pixel. --- ----| '"ASTC10x8"' +---| "ASTC10x8" --- ---The 10x10 pixels per block variant of the ASTC format. RGBA data at 1.28 bits per pixel. --- ----| '"ASTC10x10"' +---| "ASTC10x10" --- ---The 12x10 pixels per block variant of the ASTC format. RGBA data at 1.07 bits per pixel. --- ----| '"ASTC12x10"' +---| "ASTC12x10" --- ---The 12x12 pixels per block variant of the ASTC format. RGBA data at 0.89 bits per pixel. --- ----| '"ASTC12x12"' +---| "ASTC12x12" --- ---Encoded image formats. @@ -349,19 +349,19 @@ function ImageData:getFormat() end --- ---Targa image format. --- ----| '"tga"' +---| "tga" --- ---PNG image format. --- ----| '"png"' +---| "png" --- ---JPG image format. --- ----| '"jpg"' +---| "jpg" --- ---BMP image format. --- ----| '"bmp"' +---| "bmp" --- ---Pixel formats for Textures, ImageData, and CompressedImageData. @@ -370,256 +370,256 @@ function ImageData:getFormat() end --- ---Indicates unknown pixel format, used internally. --- ----| '"unknown"' +---| "unknown" --- ---Alias for rgba8, or srgba8 if gamma-correct rendering is enabled. --- ----| '"normal"' +---| "normal" --- ---A format suitable for high dynamic range content - an alias for the rgba16f format, normally. --- ----| '"hdr"' +---| "hdr" --- ---Single-channel (red component) format (8 bpp). --- ----| '"r8"' +---| "r8" --- ---Two channels (red and green components) with 8 bits per channel (16 bpp). --- ----| '"rg8"' +---| "rg8" --- ---8 bits per channel (32 bpp) RGBA. Color channel values range from 0-255 (0-1 in shaders). --- ----| '"rgba8"' +---| "rgba8" --- ---gamma-correct version of rgba8. --- ----| '"srgba8"' +---| "srgba8" --- ---Single-channel (red component) format (16 bpp). --- ----| '"r16"' +---| "r16" --- ---Two channels (red and green components) with 16 bits per channel (32 bpp). --- ----| '"rg16"' +---| "rg16" --- ---16 bits per channel (64 bpp) RGBA. Color channel values range from 0-65535 (0-1 in shaders). --- ----| '"rgba16"' +---| "rgba16" --- ---Floating point single-channel format (16 bpp). Color values can range from [-65504, +65504]. --- ----| '"r16f"' +---| "r16f" --- ---Floating point two-channel format with 16 bits per channel (32 bpp). Color values can range from [-65504, +65504]. --- ----| '"rg16f"' +---| "rg16f" --- ---Floating point RGBA with 16 bits per channel (64 bpp). Color values can range from [-65504, +65504]. --- ----| '"rgba16f"' +---| "rgba16f" --- ---Floating point single-channel format (32 bpp). --- ----| '"r32f"' +---| "r32f" --- ---Floating point two-channel format with 32 bits per channel (64 bpp). --- ----| '"rg32f"' +---| "rg32f" --- ---Floating point RGBA with 32 bits per channel (128 bpp). --- ----| '"rgba32f"' +---| "rgba32f" --- ---Same as rg8, but accessed as (L, L, L, A) --- ----| '"la8"' +---| "la8" --- ---4 bits per channel (16 bpp) RGBA. --- ----| '"rgba4"' +---| "rgba4" --- ---RGB with 5 bits each, and a 1-bit alpha channel (16 bpp). --- ----| '"rgb5a1"' +---| "rgb5a1" --- ---RGB with 5, 6, and 5 bits each, respectively (16 bpp). There is no alpha channel in this format. --- ----| '"rgb565"' +---| "rgb565" --- ---RGB with 10 bits per channel, and a 2-bit alpha channel (32 bpp). --- ----| '"rgb10a2"' +---| "rgb10a2" --- ---Floating point RGB with 11 bits in the red and green channels, and 10 bits in the blue channel (32 bpp). There is no alpha channel. Color values can range from [0, +65024]. --- ----| '"rg11b10f"' +---| "rg11b10f" --- ---No depth buffer and 8-bit stencil buffer. --- ----| '"stencil8"' +---| "stencil8" --- ---16-bit depth buffer and no stencil buffer. --- ----| '"depth16"' +---| "depth16" --- ---24-bit depth buffer and no stencil buffer. --- ----| '"depth24"' +---| "depth24" --- ---32-bit float depth buffer and no stencil buffer. --- ----| '"depth32f"' +---| "depth32f" --- ---24-bit depth buffer and 8-bit stencil buffer. --- ----| '"depth24stencil8"' +---| "depth24stencil8" --- ---32-bit float depth buffer and 8-bit stencil buffer. --- ----| '"depth32fstencil8"' +---| "depth32fstencil8" --- ---The DXT1 format. RGB data at 4 bits per pixel (compared to 32 bits for ImageData and regular Images.) Suitable for fully opaque images on desktop systems. --- ----| '"DXT1"' +---| "DXT1" --- ---The DXT3 format. RGBA data at 8 bits per pixel. Smooth variations in opacity do not mix well with this format. --- ----| '"DXT3"' +---| "DXT3" --- ---The DXT5 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on desktop systems. --- ----| '"DXT5"' +---| "DXT5" --- ---The BC4 format (also known as 3Dc+ or ATI1.) Stores just the red channel, at 4 bits per pixel. --- ----| '"BC4"' +---| "BC4" --- ---The signed variant of the BC4 format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. --- ----| '"BC4s"' +---| "BC4s" --- ---The BC5 format (also known as 3Dc or ATI2.) Stores red and green channels at 8 bits per pixel. --- ----| '"BC5"' +---| "BC5" --- ---The signed variant of the BC5 format. --- ----| '"BC5s"' +---| "BC5s" --- ---The BC6H format. Stores half-precision floating-point RGB data in the range of 65504 at 8 bits per pixel. Suitable for HDR images on desktop systems. --- ----| '"BC6h"' +---| "BC6h" --- ---The signed variant of the BC6H format. Stores RGB data in the range of +65504. --- ----| '"BC6hs"' +---| "BC6hs" --- ---The BC7 format (also known as BPTC.) Stores RGB or RGBA data at 8 bits per pixel. --- ----| '"BC7"' +---| "BC7" --- ---The ETC1 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on older Android devices. --- ----| '"ETC1"' +---| "ETC1" --- ---The RGB variant of the ETC2 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on newer mobile devices. --- ----| '"ETC2rgb"' +---| "ETC2rgb" --- ---The RGBA variant of the ETC2 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on newer mobile devices. --- ----| '"ETC2rgba"' +---| "ETC2rgba" --- ---The RGBA variant of the ETC2 format where pixels are either fully transparent or fully opaque. RGBA data at 4 bits per pixel. --- ----| '"ETC2rgba1"' +---| "ETC2rgba1" --- ---The single-channel variant of the EAC format. Stores just the red channel, at 4 bits per pixel. --- ----| '"EACr"' +---| "EACr" --- ---The signed single-channel variant of the EAC format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. --- ----| '"EACrs"' +---| "EACrs" --- ---The two-channel variant of the EAC format. Stores red and green channels at 8 bits per pixel. --- ----| '"EACrg"' +---| "EACrg" --- ---The signed two-channel variant of the EAC format. --- ----| '"EACrgs"' +---| "EACrgs" --- ---The 2 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 2 bits per pixel. Textures compressed with PVRTC1 formats must be square and power-of-two sized. --- ----| '"PVR1rgb2"' +---| "PVR1rgb2" --- ---The 4 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 4 bits per pixel. --- ----| '"PVR1rgb4"' +---| "PVR1rgb4" --- ---The 2 bit per pixel RGBA variant of the PVRTC1 format. --- ----| '"PVR1rgba2"' +---| "PVR1rgba2" --- ---The 4 bit per pixel RGBA variant of the PVRTC1 format. --- ----| '"PVR1rgba4"' +---| "PVR1rgba4" --- ---The 4x4 pixels per block variant of the ASTC format. RGBA data at 8 bits per pixel. --- ----| '"ASTC4x4"' +---| "ASTC4x4" --- ---The 5x4 pixels per block variant of the ASTC format. RGBA data at 6.4 bits per pixel. --- ----| '"ASTC5x4"' +---| "ASTC5x4" --- ---The 5x5 pixels per block variant of the ASTC format. RGBA data at 5.12 bits per pixel. --- ----| '"ASTC5x5"' +---| "ASTC5x5" --- ---The 6x5 pixels per block variant of the ASTC format. RGBA data at 4.27 bits per pixel. --- ----| '"ASTC6x5"' +---| "ASTC6x5" --- ---The 6x6 pixels per block variant of the ASTC format. RGBA data at 3.56 bits per pixel. --- ----| '"ASTC6x6"' +---| "ASTC6x6" --- ---The 8x5 pixels per block variant of the ASTC format. RGBA data at 3.2 bits per pixel. --- ----| '"ASTC8x5"' +---| "ASTC8x5" --- ---The 8x6 pixels per block variant of the ASTC format. RGBA data at 2.67 bits per pixel. --- ----| '"ASTC8x6"' +---| "ASTC8x6" --- ---The 8x8 pixels per block variant of the ASTC format. RGBA data at 2 bits per pixel. --- ----| '"ASTC8x8"' +---| "ASTC8x8" --- ---The 10x5 pixels per block variant of the ASTC format. RGBA data at 2.56 bits per pixel. --- ----| '"ASTC10x5"' +---| "ASTC10x5" --- ---The 10x6 pixels per block variant of the ASTC format. RGBA data at 2.13 bits per pixel. --- ----| '"ASTC10x6"' +---| "ASTC10x6" --- ---The 10x8 pixels per block variant of the ASTC format. RGBA data at 1.6 bits per pixel. --- ----| '"ASTC10x8"' +---| "ASTC10x8" --- ---The 10x10 pixels per block variant of the ASTC format. RGBA data at 1.28 bits per pixel. --- ----| '"ASTC10x10"' +---| "ASTC10x10" --- ---The 12x10 pixels per block variant of the ASTC format. RGBA data at 1.07 bits per pixel. --- ----| '"ASTC12x10"' +---| "ASTC12x10" --- ---The 12x12 pixels per block variant of the ASTC format. RGBA data at 0.89 bits per pixel. --- ----| '"ASTC12x12"' +---| "ASTC12x12" diff --git a/meta/3rd/love2d/library/love.joystick.lua b/meta/3rd/love2d/library/love.joystick.lua index 29e21cd8..a6c8b206 100644 --- a/meta/3rd/love2d/library/love.joystick.lua +++ b/meta/3rd/love2d/library/love.joystick.lua @@ -53,7 +53,7 @@ function love.joystick.saveGamepadMappings(filename) end --- ---The virtual gamepad buttons and axes are designed around the Xbox 360 controller layout. --- ----@overload fun(guid: string, axis: love.GamepadAxis, inputtype: love.JoystickInputType, inputindex: number, hatdir: love.JoystickHat):boolean +---@overload fun(guid: string, axis: love.GamepadAxis, inputtype: love.JoystickInputType, inputindex: number, hatdir?: love.JoystickHat):boolean ---@param guid string # The OS-dependent GUID for the type of Joystick the binding will affect. ---@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. @@ -209,7 +209,7 @@ function Joystick:isVibrationSupported() end ---Sets the vibration motor speeds on a Joystick with rumble support. Most common gamepads have this functionality, although not all drivers give proper support. Use Joystick:isVibrationSupported to check. --- ---@overload fun(self: love.Joystick):boolean ----@overload fun(self: love.Joystick, left: number, right: number, duration: number):boolean +---@overload fun(self: love.Joystick, left: number, right: number, duration?: number):boolean ---@param left number # Strength of the left vibration motor on the Joystick. Must be in the range of 1. ---@param right number # Strength of the right vibration motor on the Joystick. Must be in the range of 1. ---@return boolean success # True if the vibration was successfully applied, false if not. @@ -222,27 +222,27 @@ function Joystick:setVibration(left, right) end --- ---The x-axis of the left thumbstick. --- ----| '"leftx"' +---| "leftx" --- ---The y-axis of the left thumbstick. --- ----| '"lefty"' +---| "lefty" --- ---The x-axis of the right thumbstick. --- ----| '"rightx"' +---| "rightx" --- ---The y-axis of the right thumbstick. --- ----| '"righty"' +---| "righty" --- ---Left analog trigger. --- ----| '"triggerleft"' +---| "triggerleft" --- ---Right analog trigger. --- ----| '"triggerright"' +---| "triggerright" --- ---Virtual gamepad buttons. @@ -251,63 +251,63 @@ function Joystick:setVibration(left, right) end --- ---Bottom face button (A). --- ----| '"a"' +---| "a" --- ---Right face button (B). --- ----| '"b"' +---| "b" --- ---Left face button (X). --- ----| '"x"' +---| "x" --- ---Top face button (Y). --- ----| '"y"' +---| "y" --- ---Back button. --- ----| '"back"' +---| "back" --- ---Guide button. --- ----| '"guide"' +---| "guide" --- ---Start button. --- ----| '"start"' +---| "start" --- ---Left stick click button. --- ----| '"leftstick"' +---| "leftstick" --- ---Right stick click button. --- ----| '"rightstick"' +---| "rightstick" --- ---Left bumper. --- ----| '"leftshoulder"' +---| "leftshoulder" --- ---Right bumper. --- ----| '"rightshoulder"' +---| "rightshoulder" --- ---D-pad up. --- ----| '"dpup"' +---| "dpup" --- ---D-pad down. --- ----| '"dpdown"' +---| "dpdown" --- ---D-pad left. --- ----| '"dpleft"' +---| "dpleft" --- ---D-pad right. --- ----| '"dpright"' +---| "dpright" --- ---Joystick hat positions. @@ -316,39 +316,39 @@ function Joystick:setVibration(left, right) end --- ---Centered --- ----| '"c"' +---| "c" --- ---Down --- ----| '"d"' +---| "d" --- ---Left --- ----| '"l"' +---| "l" --- ---Left+Down --- ----| '"ld"' +---| "ld" --- ---Left+Up --- ----| '"lu"' +---| "lu" --- ---Right --- ----| '"r"' +---| "r" --- ---Right+Down --- ----| '"rd"' +---| "rd" --- ---Right+Up --- ----| '"ru"' +---| "ru" --- ---Up --- ----| '"u"' +---| "u" --- ---Types of Joystick inputs. @@ -357,12 +357,12 @@ function Joystick:setVibration(left, right) end --- ---Analog axis. --- ----| '"axis"' +---| "axis" --- ---Button. --- ----| '"button"' +---| "button" --- ---8-direction hat value. --- ----| '"hat"' +---| "hat" diff --git a/meta/3rd/love2d/library/love.keyboard.lua b/meta/3rd/love2d/library/love.keyboard.lua index 2f68c50f..0d06744f 100644 --- a/meta/3rd/love2d/library/love.keyboard.lua +++ b/meta/3rd/love2d/library/love.keyboard.lua @@ -86,579 +86,579 @@ function love.keyboard.setTextInput(enable) end --- ---The A key --- ----| '"a"' +---| "a" --- ---The B key --- ----| '"b"' +---| "b" --- ---The C key --- ----| '"c"' +---| "c" --- ---The D key --- ----| '"d"' +---| "d" --- ---The E key --- ----| '"e"' +---| "e" --- ---The F key --- ----| '"f"' +---| "f" --- ---The G key --- ----| '"g"' +---| "g" --- ---The H key --- ----| '"h"' +---| "h" --- ---The I key --- ----| '"i"' +---| "i" --- ---The J key --- ----| '"j"' +---| "j" --- ---The K key --- ----| '"k"' +---| "k" --- ---The L key --- ----| '"l"' +---| "l" --- ---The M key --- ----| '"m"' +---| "m" --- ---The N key --- ----| '"n"' +---| "n" --- ---The O key --- ----| '"o"' +---| "o" --- ---The P key --- ----| '"p"' +---| "p" --- ---The Q key --- ----| '"q"' +---| "q" --- ---The R key --- ----| '"r"' +---| "r" --- ---The S key --- ----| '"s"' +---| "s" --- ---The T key --- ----| '"t"' +---| "t" --- ---The U key --- ----| '"u"' +---| "u" --- ---The V key --- ----| '"v"' +---| "v" --- ---The W key --- ----| '"w"' +---| "w" --- ---The X key --- ----| '"x"' +---| "x" --- ---The Y key --- ----| '"y"' +---| "y" --- ---The Z key --- ----| '"z"' +---| "z" --- ---The zero key --- ----| '"0"' +---| "0" --- ---The one key --- ----| '"1"' +---| "1" --- ---The two key --- ----| '"2"' +---| "2" --- ---The three key --- ----| '"3"' +---| "3" --- ---The four key --- ----| '"4"' +---| "4" --- ---The five key --- ----| '"5"' +---| "5" --- ---The six key --- ----| '"6"' +---| "6" --- ---The seven key --- ----| '"7"' +---| "7" --- ---The eight key --- ----| '"8"' +---| "8" --- ---The nine key --- ----| '"9"' +---| "9" --- ---Space key --- ----| '"space"' +---| "space" --- ---Exclamation mark key --- ----| '"!"' +---| "!" --- ---Double quote key --- ----| '"\""' +---| "\"" --- ---Hash key --- ----| '"#"' +---| "#" --- ---Dollar key --- ----| '"$"' +---| "$" --- ---Ampersand key --- ----| '"&"' +---| "&" --- ---Single quote key --- ----| '"\'"' +---| "'" --- ---Left parenthesis key --- ----| '"("' +---| "(" --- ---Right parenthesis key --- ----| '")"' +---| ")" --- ---Asterisk key --- ----| '"*"' +---| "*" --- ---Plus key --- ----| '"+"' +---| "+" --- ---Comma key --- ----| '","' +---| "," --- ---Hyphen-minus key --- ----| '"-"' +---| "-" --- ---Full stop key --- ----| '"."' +---| "." --- ---Slash key --- ----| '"/"' +---| "/" --- ---Colon key --- ----| '":"' +---| ":" --- ---Semicolon key --- ----| '";"' +---| ";" --- ---Less-than key --- ----| '"<"' +---| "<" --- ---Equal key --- ----| '"="' +---| "=" --- ---Greater-than key --- ----| '">"' +---| ">" --- ---Question mark key --- ----| '"?"' +---| "?" --- ---At sign key --- ----| '"@"' +---| "@" --- ---Left square bracket key --- ----| '"["' +---| "[" --- ---Backslash key --- ----| '"\\"' +---| "\\" --- ---Right square bracket key --- ----| '"]"' +---| "]" --- ---Caret key --- ----| '"^"' +---| "^" --- ---Underscore key --- ----| '"_"' +---| "_" --- ---Grave accent key --- ----| '"`"' +---| "`" --- ---The numpad zero key --- ----| '"kp0"' +---| "kp0" --- ---The numpad one key --- ----| '"kp1"' +---| "kp1" --- ---The numpad two key --- ----| '"kp2"' +---| "kp2" --- ---The numpad three key --- ----| '"kp3"' +---| "kp3" --- ---The numpad four key --- ----| '"kp4"' +---| "kp4" --- ---The numpad five key --- ----| '"kp5"' +---| "kp5" --- ---The numpad six key --- ----| '"kp6"' +---| "kp6" --- ---The numpad seven key --- ----| '"kp7"' +---| "kp7" --- ---The numpad eight key --- ----| '"kp8"' +---| "kp8" --- ---The numpad nine key --- ----| '"kp9"' +---| "kp9" --- ---The numpad decimal point key --- ----| '"kp."' +---| "kp." --- ---The numpad division key --- ----| '"kp/"' +---| "kp/" --- ---The numpad multiplication key --- ----| '"kp*"' +---| "kp*" --- ---The numpad substraction key --- ----| '"kp-"' +---| "kp-" --- ---The numpad addition key --- ----| '"kp+"' +---| "kp+" --- ---The numpad enter key --- ----| '"kpenter"' +---| "kpenter" --- ---The numpad equals key --- ----| '"kp="' +---| "kp=" --- ---Up cursor key --- ----| '"up"' +---| "up" --- ---Down cursor key --- ----| '"down"' +---| "down" --- ---Right cursor key --- ----| '"right"' +---| "right" --- ---Left cursor key --- ----| '"left"' +---| "left" --- ---Home key --- ----| '"home"' +---| "home" --- ---End key --- ----| '"end"' +---| "end" --- ---Page up key --- ----| '"pageup"' +---| "pageup" --- ---Page down key --- ----| '"pagedown"' +---| "pagedown" --- ---Insert key --- ----| '"insert"' +---| "insert" --- ---Backspace key --- ----| '"backspace"' +---| "backspace" --- ---Tab key --- ----| '"tab"' +---| "tab" --- ---Clear key --- ----| '"clear"' +---| "clear" --- ---Return key --- ----| '"return"' +---| "return" --- ---Delete key --- ----| '"delete"' +---| "delete" --- ---The 1st function key --- ----| '"f1"' +---| "f1" --- ---The 2nd function key --- ----| '"f2"' +---| "f2" --- ---The 3rd function key --- ----| '"f3"' +---| "f3" --- ---The 4th function key --- ----| '"f4"' +---| "f4" --- ---The 5th function key --- ----| '"f5"' +---| "f5" --- ---The 6th function key --- ----| '"f6"' +---| "f6" --- ---The 7th function key --- ----| '"f7"' +---| "f7" --- ---The 8th function key --- ----| '"f8"' +---| "f8" --- ---The 9th function key --- ----| '"f9"' +---| "f9" --- ---The 10th function key --- ----| '"f10"' +---| "f10" --- ---The 11th function key --- ----| '"f11"' +---| "f11" --- ---The 12th function key --- ----| '"f12"' +---| "f12" --- ---The 13th function key --- ----| '"f13"' +---| "f13" --- ---The 14th function key --- ----| '"f14"' +---| "f14" --- ---The 15th function key --- ----| '"f15"' +---| "f15" --- ---Num-lock key --- ----| '"numlock"' +---| "numlock" --- ---Caps-lock key --- ----| '"capslock"' +---| "capslock" --- ---Scroll-lock key --- ----| '"scrollock"' +---| "scrollock" --- ---Right shift key --- ----| '"rshift"' +---| "rshift" --- ---Left shift key --- ----| '"lshift"' +---| "lshift" --- ---Right control key --- ----| '"rctrl"' +---| "rctrl" --- ---Left control key --- ----| '"lctrl"' +---| "lctrl" --- ---Right alt key --- ----| '"ralt"' +---| "ralt" --- ---Left alt key --- ----| '"lalt"' +---| "lalt" --- ---Right meta key --- ----| '"rmeta"' +---| "rmeta" --- ---Left meta key --- ----| '"lmeta"' +---| "lmeta" --- ---Left super key --- ----| '"lsuper"' +---| "lsuper" --- ---Right super key --- ----| '"rsuper"' +---| "rsuper" --- ---Mode key --- ----| '"mode"' +---| "mode" --- ---Compose key --- ----| '"compose"' +---| "compose" --- ---Pause key --- ----| '"pause"' +---| "pause" --- ---Escape key --- ----| '"escape"' +---| "escape" --- ---Help key --- ----| '"help"' +---| "help" --- ---Print key --- ----| '"print"' +---| "print" --- ---System request key --- ----| '"sysreq"' +---| "sysreq" --- ---Break key --- ----| '"break"' +---| "break" --- ---Menu key --- ----| '"menu"' +---| "menu" --- ---Power key --- ----| '"power"' +---| "power" --- ---Euro (€) key --- ----| '"euro"' +---| "euro" --- ---Undo key --- ----| '"undo"' +---| "undo" --- ---WWW key --- ----| '"www"' +---| "www" --- ---Mail key --- ----| '"mail"' +---| "mail" --- ---Calculator key --- ----| '"calculator"' +---| "calculator" --- ---Application search key --- ----| '"appsearch"' +---| "appsearch" --- ---Application home key --- ----| '"apphome"' +---| "apphome" --- ---Application back key --- ----| '"appback"' +---| "appback" --- ---Application forward key --- ----| '"appforward"' +---| "appforward" --- ---Application refresh key --- ----| '"apprefresh"' +---| "apprefresh" --- ---Application bookmarks key --- ----| '"appbookmarks"' +---| "appbookmarks" --- ---Keyboard scancodes. @@ -673,776 +673,776 @@ function love.keyboard.setTextInput(enable) end --- ---The 'A' key on an American layout. --- ----| '"a"' +---| "a" --- ---The 'B' key on an American layout. --- ----| '"b"' +---| "b" --- ---The 'C' key on an American layout. --- ----| '"c"' +---| "c" --- ---The 'D' key on an American layout. --- ----| '"d"' +---| "d" --- ---The 'E' key on an American layout. --- ----| '"e"' +---| "e" --- ---The 'F' key on an American layout. --- ----| '"f"' +---| "f" --- ---The 'G' key on an American layout. --- ----| '"g"' +---| "g" --- ---The 'H' key on an American layout. --- ----| '"h"' +---| "h" --- ---The 'I' key on an American layout. --- ----| '"i"' +---| "i" --- ---The 'J' key on an American layout. --- ----| '"j"' +---| "j" --- ---The 'K' key on an American layout. --- ----| '"k"' +---| "k" --- ---The 'L' key on an American layout. --- ----| '"l"' +---| "l" --- ---The 'M' key on an American layout. --- ----| '"m"' +---| "m" --- ---The 'N' key on an American layout. --- ----| '"n"' +---| "n" --- ---The 'O' key on an American layout. --- ----| '"o"' +---| "o" --- ---The 'P' key on an American layout. --- ----| '"p"' +---| "p" --- ---The 'Q' key on an American layout. --- ----| '"q"' +---| "q" --- ---The 'R' key on an American layout. --- ----| '"r"' +---| "r" --- ---The 'S' key on an American layout. --- ----| '"s"' +---| "s" --- ---The 'T' key on an American layout. --- ----| '"t"' +---| "t" --- ---The 'U' key on an American layout. --- ----| '"u"' +---| "u" --- ---The 'V' key on an American layout. --- ----| '"v"' +---| "v" --- ---The 'W' key on an American layout. --- ----| '"w"' +---| "w" --- ---The 'X' key on an American layout. --- ----| '"x"' +---| "x" --- ---The 'Y' key on an American layout. --- ----| '"y"' +---| "y" --- ---The 'Z' key on an American layout. --- ----| '"z"' +---| "z" --- ---The '1' key on an American layout. --- ----| '"1"' +---| "1" --- ---The '2' key on an American layout. --- ----| '"2"' +---| "2" --- ---The '3' key on an American layout. --- ----| '"3"' +---| "3" --- ---The '4' key on an American layout. --- ----| '"4"' +---| "4" --- ---The '5' key on an American layout. --- ----| '"5"' +---| "5" --- ---The '6' key on an American layout. --- ----| '"6"' +---| "6" --- ---The '7' key on an American layout. --- ----| '"7"' +---| "7" --- ---The '8' key on an American layout. --- ----| '"8"' +---| "8" --- ---The '9' key on an American layout. --- ----| '"9"' +---| "9" --- ---The '0' key on an American layout. --- ----| '"0"' +---| "0" --- ---The 'return' / 'enter' key on an American layout. --- ----| '"return"' +---| "return" --- ---The 'escape' key on an American layout. --- ----| '"escape"' +---| "escape" --- ---The 'backspace' key on an American layout. --- ----| '"backspace"' +---| "backspace" --- ---The 'tab' key on an American layout. --- ----| '"tab"' +---| "tab" --- ---The spacebar on an American layout. --- ----| '"space"' +---| "space" --- ---The minus key on an American layout. --- ----| '"-"' +---| "-" --- ---The equals key on an American layout. --- ----| '"="' +---| "=" --- ---The left-bracket key on an American layout. --- ----| '"["' +---| "[" --- ---The right-bracket key on an American layout. --- ----| '"]"' +---| "]" --- ---The backslash key on an American layout. --- ----| '"\\"' +---| "\\" --- ---The non-U.S. hash scancode. --- ----| '"nonus#"' +---| "nonus#" --- ---The semicolon key on an American layout. --- ----| '";"' +---| ";" --- ---The apostrophe key on an American layout. --- ----| '"\'"' +---| "'" --- ---The back-tick / grave key on an American layout. --- ----| '"`"' +---| "`" --- ---The comma key on an American layout. --- ----| '","' +---| "," --- ---The period key on an American layout. --- ----| '"."' +---| "." --- ---The forward-slash key on an American layout. --- ----| '"/"' +---| "/" --- ---The capslock key on an American layout. --- ----| '"capslock"' +---| "capslock" --- ---The F1 key on an American layout. --- ----| '"f1"' +---| "f1" --- ---The F2 key on an American layout. --- ----| '"f2"' +---| "f2" --- ---The F3 key on an American layout. --- ----| '"f3"' +---| "f3" --- ---The F4 key on an American layout. --- ----| '"f4"' +---| "f4" --- ---The F5 key on an American layout. --- ----| '"f5"' +---| "f5" --- ---The F6 key on an American layout. --- ----| '"f6"' +---| "f6" --- ---The F7 key on an American layout. --- ----| '"f7"' +---| "f7" --- ---The F8 key on an American layout. --- ----| '"f8"' +---| "f8" --- ---The F9 key on an American layout. --- ----| '"f9"' +---| "f9" --- ---The F10 key on an American layout. --- ----| '"f10"' +---| "f10" --- ---The F11 key on an American layout. --- ----| '"f11"' +---| "f11" --- ---The F12 key on an American layout. --- ----| '"f12"' +---| "f12" --- ---The F13 key on an American layout. --- ----| '"f13"' +---| "f13" --- ---The F14 key on an American layout. --- ----| '"f14"' +---| "f14" --- ---The F15 key on an American layout. --- ----| '"f15"' +---| "f15" --- ---The F16 key on an American layout. --- ----| '"f16"' +---| "f16" --- ---The F17 key on an American layout. --- ----| '"f17"' +---| "f17" --- ---The F18 key on an American layout. --- ----| '"f18"' +---| "f18" --- ---The F19 key on an American layout. --- ----| '"f19"' +---| "f19" --- ---The F20 key on an American layout. --- ----| '"f20"' +---| "f20" --- ---The F21 key on an American layout. --- ----| '"f21"' +---| "f21" --- ---The F22 key on an American layout. --- ----| '"f22"' +---| "f22" --- ---The F23 key on an American layout. --- ----| '"f23"' +---| "f23" --- ---The F24 key on an American layout. --- ----| '"f24"' +---| "f24" --- ---The left control key on an American layout. --- ----| '"lctrl"' +---| "lctrl" --- ---The left shift key on an American layout. --- ----| '"lshift"' +---| "lshift" --- ---The left alt / option key on an American layout. --- ----| '"lalt"' +---| "lalt" --- ---The left GUI (command / windows / super) key on an American layout. --- ----| '"lgui"' +---| "lgui" --- ---The right control key on an American layout. --- ----| '"rctrl"' +---| "rctrl" --- ---The right shift key on an American layout. --- ----| '"rshift"' +---| "rshift" --- ---The right alt / option key on an American layout. --- ----| '"ralt"' +---| "ralt" --- ---The right GUI (command / windows / super) key on an American layout. --- ----| '"rgui"' +---| "rgui" --- ---The printscreen key on an American layout. --- ----| '"printscreen"' +---| "printscreen" --- ---The scroll-lock key on an American layout. --- ----| '"scrolllock"' +---| "scrolllock" --- ---The pause key on an American layout. --- ----| '"pause"' +---| "pause" --- ---The insert key on an American layout. --- ----| '"insert"' +---| "insert" --- ---The home key on an American layout. --- ----| '"home"' +---| "home" --- ---The numlock / clear key on an American layout. --- ----| '"numlock"' +---| "numlock" --- ---The page-up key on an American layout. --- ----| '"pageup"' +---| "pageup" --- ---The forward-delete key on an American layout. --- ----| '"delete"' +---| "delete" --- ---The end key on an American layout. --- ----| '"end"' +---| "end" --- ---The page-down key on an American layout. --- ----| '"pagedown"' +---| "pagedown" --- ---The right-arrow key on an American layout. --- ----| '"right"' +---| "right" --- ---The left-arrow key on an American layout. --- ----| '"left"' +---| "left" --- ---The down-arrow key on an American layout. --- ----| '"down"' +---| "down" --- ---The up-arrow key on an American layout. --- ----| '"up"' +---| "up" --- ---The non-U.S. backslash scancode. --- ----| '"nonusbackslash"' +---| "nonusbackslash" --- ---The application key on an American layout. Windows contextual menu, compose key. --- ----| '"application"' +---| "application" --- ---The 'execute' key on an American layout. --- ----| '"execute"' +---| "execute" --- ---The 'help' key on an American layout. --- ----| '"help"' +---| "help" --- ---The 'menu' key on an American layout. --- ----| '"menu"' +---| "menu" --- ---The 'select' key on an American layout. --- ----| '"select"' +---| "select" --- ---The 'stop' key on an American layout. --- ----| '"stop"' +---| "stop" --- ---The 'again' key on an American layout. --- ----| '"again"' +---| "again" --- ---The 'undo' key on an American layout. --- ----| '"undo"' +---| "undo" --- ---The 'cut' key on an American layout. --- ----| '"cut"' +---| "cut" --- ---The 'copy' key on an American layout. --- ----| '"copy"' +---| "copy" --- ---The 'paste' key on an American layout. --- ----| '"paste"' +---| "paste" --- ---The 'find' key on an American layout. --- ----| '"find"' +---| "find" --- ---The keypad forward-slash key on an American layout. --- ----| '"kp/"' +---| "kp/" --- ---The keypad '*' key on an American layout. --- ----| '"kp*"' +---| "kp*" --- ---The keypad minus key on an American layout. --- ----| '"kp-"' +---| "kp-" --- ---The keypad plus key on an American layout. --- ----| '"kp+"' +---| "kp+" --- ---The keypad equals key on an American layout. --- ----| '"kp="' +---| "kp=" --- ---The keypad enter key on an American layout. --- ----| '"kpenter"' +---| "kpenter" --- ---The keypad '1' key on an American layout. --- ----| '"kp1"' +---| "kp1" --- ---The keypad '2' key on an American layout. --- ----| '"kp2"' +---| "kp2" --- ---The keypad '3' key on an American layout. --- ----| '"kp3"' +---| "kp3" --- ---The keypad '4' key on an American layout. --- ----| '"kp4"' +---| "kp4" --- ---The keypad '5' key on an American layout. --- ----| '"kp5"' +---| "kp5" --- ---The keypad '6' key on an American layout. --- ----| '"kp6"' +---| "kp6" --- ---The keypad '7' key on an American layout. --- ----| '"kp7"' +---| "kp7" --- ---The keypad '8' key on an American layout. --- ----| '"kp8"' +---| "kp8" --- ---The keypad '9' key on an American layout. --- ----| '"kp9"' +---| "kp9" --- ---The keypad '0' key on an American layout. --- ----| '"kp0"' +---| "kp0" --- ---The keypad period key on an American layout. --- ----| '"kp."' +---| "kp." --- ---The 1st international key on an American layout. Used on Asian keyboards. --- ----| '"international1"' +---| "international1" --- ---The 2nd international key on an American layout. --- ----| '"international2"' +---| "international2" --- ---The 3rd international key on an American layout. Yen. --- ----| '"international3"' +---| "international3" --- ---The 4th international key on an American layout. --- ----| '"international4"' +---| "international4" --- ---The 5th international key on an American layout. --- ----| '"international5"' +---| "international5" --- ---The 6th international key on an American layout. --- ----| '"international6"' +---| "international6" --- ---The 7th international key on an American layout. --- ----| '"international7"' +---| "international7" --- ---The 8th international key on an American layout. --- ----| '"international8"' +---| "international8" --- ---The 9th international key on an American layout. --- ----| '"international9"' +---| "international9" --- ---Hangul/English toggle scancode. --- ----| '"lang1"' +---| "lang1" --- ---Hanja conversion scancode. --- ----| '"lang2"' +---| "lang2" --- ---Katakana scancode. --- ----| '"lang3"' +---| "lang3" --- ---Hiragana scancode. --- ----| '"lang4"' +---| "lang4" --- ---Zenkaku/Hankaku scancode. --- ----| '"lang5"' +---| "lang5" --- ---The mute key on an American layout. --- ----| '"mute"' +---| "mute" --- ---The volume up key on an American layout. --- ----| '"volumeup"' +---| "volumeup" --- ---The volume down key on an American layout. --- ----| '"volumedown"' +---| "volumedown" --- ---The audio next track key on an American layout. --- ----| '"audionext"' +---| "audionext" --- ---The audio previous track key on an American layout. --- ----| '"audioprev"' +---| "audioprev" --- ---The audio stop key on an American layout. --- ----| '"audiostop"' +---| "audiostop" --- ---The audio play key on an American layout. --- ----| '"audioplay"' +---| "audioplay" --- ---The audio mute key on an American layout. --- ----| '"audiomute"' +---| "audiomute" --- ---The media select key on an American layout. --- ----| '"mediaselect"' +---| "mediaselect" --- ---The 'WWW' key on an American layout. --- ----| '"www"' +---| "www" --- ---The Mail key on an American layout. --- ----| '"mail"' +---| "mail" --- ---The calculator key on an American layout. --- ----| '"calculator"' +---| "calculator" --- ---The 'computer' key on an American layout. --- ----| '"computer"' +---| "computer" --- ---The AC Search key on an American layout. --- ----| '"acsearch"' +---| "acsearch" --- ---The AC Home key on an American layout. --- ----| '"achome"' +---| "achome" --- ---The AC Back key on an American layout. --- ----| '"acback"' +---| "acback" --- ---The AC Forward key on an American layout. --- ----| '"acforward"' +---| "acforward" --- ---Th AC Stop key on an American layout. --- ----| '"acstop"' +---| "acstop" --- ---The AC Refresh key on an American layout. --- ----| '"acrefresh"' +---| "acrefresh" --- ---The AC Bookmarks key on an American layout. --- ----| '"acbookmarks"' +---| "acbookmarks" --- ---The system power scancode. --- ----| '"power"' +---| "power" --- ---The brightness-down scancode. --- ----| '"brightnessdown"' +---| "brightnessdown" --- ---The brightness-up scancode. --- ----| '"brightnessup"' +---| "brightnessup" --- ---The display switch scancode. --- ----| '"displayswitch"' +---| "displayswitch" --- ---The keyboard illumination toggle scancode. --- ----| '"kbdillumtoggle"' +---| "kbdillumtoggle" --- ---The keyboard illumination down scancode. --- ----| '"kbdillumdown"' +---| "kbdillumdown" --- ---The keyboard illumination up scancode. --- ----| '"kbdillumup"' +---| "kbdillumup" --- ---The eject scancode. --- ----| '"eject"' +---| "eject" --- ---The system sleep scancode. --- ----| '"sleep"' +---| "sleep" --- ---The alt-erase key on an American layout. --- ----| '"alterase"' +---| "alterase" --- ---The sysreq key on an American layout. --- ----| '"sysreq"' +---| "sysreq" --- ---The 'cancel' key on an American layout. --- ----| '"cancel"' +---| "cancel" --- ---The 'clear' key on an American layout. --- ----| '"clear"' +---| "clear" --- ---The 'prior' key on an American layout. --- ----| '"prior"' +---| "prior" --- ---The 'return2' key on an American layout. --- ----| '"return2"' +---| "return2" --- ---The 'separator' key on an American layout. --- ----| '"separator"' +---| "separator" --- ---The 'out' key on an American layout. --- ----| '"out"' +---| "out" --- ---The 'oper' key on an American layout. --- ----| '"oper"' +---| "oper" --- ---The 'clearagain' key on an American layout. --- ----| '"clearagain"' +---| "clearagain" --- ---The 'crsel' key on an American layout. --- ----| '"crsel"' +---| "crsel" --- ---The 'exsel' key on an American layout. --- ----| '"exsel"' +---| "exsel" --- ---The keypad 00 key on an American layout. --- ----| '"kp00"' +---| "kp00" --- ---The keypad 000 key on an American layout. --- ----| '"kp000"' +---| "kp000" --- ---The thousands-separator key on an American layout. --- ----| '"thsousandsseparator"' +---| "thsousandsseparator" --- ---The decimal separator key on an American layout. --- ----| '"decimalseparator"' +---| "decimalseparator" --- ---The currency unit key on an American layout. --- ----| '"currencyunit"' +---| "currencyunit" --- ---The currency sub-unit key on an American layout. --- ----| '"currencysubunit"' +---| "currencysubunit" --- ---The 'app1' scancode. --- ----| '"app1"' +---| "app1" --- ---The 'app2' scancode. --- ----| '"app2"' +---| "app2" --- ---An unknown key. --- ----| '"unknown"' +---| "unknown" diff --git a/meta/3rd/love2d/library/love.math.lua b/meta/3rd/love2d/library/love.math.lua index cd85b1bf..53e43e3a 100644 --- a/meta/3rd/love2d/library/love.math.lua +++ b/meta/3rd/love2d/library/love.math.lua @@ -35,7 +35,7 @@ function love.math.colorToBytes(r, g, b, a) end --- ---Compresses a string or data using a specific compression algorithm. --- ----@overload fun(data: love.Data, format: love.CompressedDataFormat, level: number):love.CompressedData +---@overload fun(data: love.Data, format?: love.CompressedDataFormat, level?: number):love.CompressedData ---@param rawstring string # The raw (un-compressed) string to compress. ---@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. @@ -135,7 +135,7 @@ function love.math.newRandomGenerator() end --- ---Creates a new Transform object. --- ----@overload fun(x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):love.Transform +---@overload fun(x: number, y: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):love.Transform ---@return love.Transform transform # The new Transform object. function love.math.newTransform() end @@ -508,8 +508,8 @@ function Transform:translate(dx, dy) end --- ---The matrix is row-major: --- ----| '"row"' +---| "row" --- ---The matrix is column-major: --- ----| '"column"' +---| "column" diff --git a/meta/3rd/love2d/library/love.mouse.lua b/meta/3rd/love2d/library/love.mouse.lua index e92a5859..e4e70f97 100644 --- a/meta/3rd/love2d/library/love.mouse.lua +++ b/meta/3rd/love2d/library/love.mouse.lua @@ -87,8 +87,8 @@ 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. --- ----@overload fun(filename: string, hotx: number, hoty: number):love.Cursor ----@overload fun(fileData: love.FileData, hotx: number, hoty: number):love.Cursor +---@overload fun(filename: string, hotx?: number, hoty?: number):love.Cursor +---@overload fun(fileData: love.FileData, hotx?: number, hoty?: number):love.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. @@ -166,52 +166,52 @@ function Cursor:getType() end --- ---The cursor is using a custom image. --- ----| '"image"' +---| "image" --- ---An arrow pointer. --- ----| '"arrow"' +---| "arrow" --- ---An I-beam, normally used when mousing over editable or selectable text. --- ----| '"ibeam"' +---| "ibeam" --- ---Wait graphic. --- ----| '"wait"' +---| "wait" --- ---Small wait cursor with an arrow pointer. --- ----| '"waitarrow"' +---| "waitarrow" --- ---Crosshair symbol. --- ----| '"crosshair"' +---| "crosshair" --- ---Double arrow pointing to the top-left and bottom-right. --- ----| '"sizenwse"' +---| "sizenwse" --- ---Double arrow pointing to the top-right and bottom-left. --- ----| '"sizenesw"' +---| "sizenesw" --- ---Double arrow pointing left and right. --- ----| '"sizewe"' +---| "sizewe" --- ---Double arrow pointing up and down. --- ----| '"sizens"' +---| "sizens" --- ---Four-pointed arrow pointing up, down, left, and right. --- ----| '"sizeall"' +---| "sizeall" --- ---Slashed circle or crossbones. --- ----| '"no"' +---| "no" --- ---Hand symbol. --- ----| '"hand"' +---| "hand" diff --git a/meta/3rd/love2d/library/love.physics.lua b/meta/3rd/love2d/library/love.physics.lua index fbc617a1..93cb67e4 100644 --- a/meta/3rd/love2d/library/love.physics.lua +++ b/meta/3rd/love2d/library/love.physics.lua @@ -108,7 +108,7 @@ function love.physics.newFixture(body, shape, density) end --- ---Create a friction joint between two bodies. A FrictionJoint applies friction to a body. --- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected: boolean):love.FrictionJoint +---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected?: boolean):love.FrictionJoint ---@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 x number # The x position of the anchor point. @@ -136,7 +136,7 @@ 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. --- ----@overload fun(body1: love.Body, body2: love.Body, correctionFactor: number, collideConnected: boolean):love.MotorJoint +---@overload fun(body1: love.Body, body2: love.Body, correctionFactor?: number, collideConnected?: boolean):love.MotorJoint ---@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. @@ -177,8 +177,8 @@ function love.physics.newPolygonShape(x1, y1, x2, y2, x3, y3, ...) end --- ---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. --- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected: boolean):love.PrismaticJoint ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected: boolean, referenceAngle: number):love.PrismaticJoint +---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected?: boolean):love.PrismaticJoint +---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected?: boolean, referenceAngle?: number):love.PrismaticJoint ---@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 x number # The x coordinate of the anchor point. @@ -216,7 +216,7 @@ function love.physics.newPulleyJoint(body1, body2, gx1, gy1, gx2, gy2, x1, y1, x --- ---By default, the local origin is located at the '''center''' of the rectangle as opposed to the top left for graphics. --- ----@overload fun(x: number, y: number, width: number, height: number, angle: number):love.PolygonShape +---@overload fun(x: number, y: number, width: number, height: number, angle?: number):love.PolygonShape ---@param width number # The width of the rectangle. ---@param height number # The height of the rectangle. ---@return love.PolygonShape shape # A new PolygonShape. @@ -227,7 +227,7 @@ function love.physics.newRectangleShape(width, height) end --- ---This joint connects two bodies to a point around which they can pivot. --- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected: boolean, referenceAngle: number):love.RevoluteJoint +---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected?: boolean, referenceAngle?: number):love.RevoluteJoint ---@param body1 love.Body # The first body. ---@param body2 love.Body # The second body. ---@param x number # The x position of the connecting point. @@ -253,8 +253,8 @@ function love.physics.newRopeJoint(body1, body2, x1, y1, x2, y2, maxLength, coll --- ---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. --- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected: boolean):love.WeldJoint ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected: boolean, referenceAngle: number):love.WeldJoint +---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected?: boolean):love.WeldJoint +---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected?: boolean, referenceAngle?: number):love.WeldJoint ---@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 x number # The x position of the anchor point (world space). @@ -266,7 +266,7 @@ function love.physics.newWeldJoint(body1, body2, x, y, collideConnected) end --- ---Creates a wheel joint. --- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected: boolean):love.WheelJoint +---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected?: boolean):love.WheelJoint ---@param body1 love.Body # The first body. ---@param body2 love.Body # The second body. ---@param x number # The x position of the anchor point. @@ -2325,15 +2325,15 @@ function World:update(dt, velocityiterations, positioniterations) end --- ---Static bodies do not move. --- ----| '"static"' +---| "static" --- ---Dynamic bodies collide with all bodies. --- ----| '"dynamic"' +---| "dynamic" --- ---Kinematic bodies only collide with dynamic bodies. --- ----| '"kinematic"' +---| "kinematic" --- ---Different types of joints. @@ -2342,39 +2342,39 @@ function World:update(dt, velocityiterations, positioniterations) end --- ---A DistanceJoint. --- ----| '"distance"' +---| "distance" --- ---A FrictionJoint. --- ----| '"friction"' +---| "friction" --- ---A GearJoint. --- ----| '"gear"' +---| "gear" --- ---A MouseJoint. --- ----| '"mouse"' +---| "mouse" --- ---A PrismaticJoint. --- ----| '"prismatic"' +---| "prismatic" --- ---A PulleyJoint. --- ----| '"pulley"' +---| "pulley" --- ---A RevoluteJoint. --- ----| '"revolute"' +---| "revolute" --- ---A RopeJoint. --- ----| '"rope"' +---| "rope" --- ---A WeldJoint. --- ----| '"weld"' +---| "weld" --- ---The different types of Shapes, as returned by Shape:getType. @@ -2383,16 +2383,16 @@ function World:update(dt, velocityiterations, positioniterations) end --- ---The Shape is a CircleShape. --- ----| '"circle"' +---| "circle" --- ---The Shape is a PolygonShape. --- ----| '"polygon"' +---| "polygon" --- ---The Shape is a EdgeShape. --- ----| '"edge"' +---| "edge" --- ---The Shape is a ChainShape. --- ----| '"chain"' +---| "chain" diff --git a/meta/3rd/love2d/library/love.sound.lua b/meta/3rd/love2d/library/love.sound.lua index 536336aa..c41d3380 100644 --- a/meta/3rd/love2d/library/love.sound.lua +++ b/meta/3rd/love2d/library/love.sound.lua @@ -9,7 +9,7 @@ love.sound = {} --- ---Attempts to find a decoder for the encoded sound data in the specified file. --- ----@overload fun(filename: string, buffer: number):love.Decoder +---@overload fun(filename: string, buffer?: number):love.Decoder ---@param file love.File # The file with encoded sound data. ---@param buffer? number # The size of each decoded chunk, in bytes. ---@return love.Decoder decoder # A new Decoder object. @@ -22,7 +22,7 @@ function love.sound.newDecoder(file, buffer) end --- ---@overload fun(file: love.File):love.SoundData ---@overload fun(decoder: love.Decoder):love.SoundData ----@overload fun(samples: number, rate: number, bits: number, channels: number):love.SoundData +---@overload fun(samples: number, rate?: number, bits?: number, channels?: number):love.SoundData ---@param filename string # The file name of the file to load. ---@return love.SoundData soundData # A new SoundData object. function love.sound.newSoundData(filename) end diff --git a/meta/3rd/love2d/library/love.system.lua b/meta/3rd/love2d/library/love.system.lua index 154e2f79..bfb76283 100644 --- a/meta/3rd/love2d/library/love.system.lua +++ b/meta/3rd/love2d/library/love.system.lua @@ -66,20 +66,20 @@ function love.system.vibrate(seconds) end --- ---Cannot determine power status. --- ----| '"unknown"' +---| "unknown" --- ---Not plugged in, running on a battery. --- ----| '"battery"' +---| "battery" --- ---Plugged in, no battery available. --- ----| '"nobattery"' +---| "nobattery" --- ---Plugged in, charging battery. --- ----| '"charging"' +---| "charging" --- ---Plugged in, battery is fully charged. --- ----| '"charged"' +---| "charged" diff --git a/meta/3rd/love2d/library/love.window.lua b/meta/3rd/love2d/library/love.window.lua index 0e9004d4..9722af3b 100644 --- a/meta/3rd/love2d/library/love.window.lua +++ b/meta/3rd/love2d/library/love.window.lua @@ -258,7 +258,7 @@ function love.window.setVSync(vsync) end --- ---Displays a message box dialog above the love window. The message box contains a title, optional text, and buttons. --- ----@overload fun(title: string, message: string, buttonlist: table, type: love.MessageBoxType, attachtowindow: boolean):number +---@overload fun(title: string, message: string, buttonlist: table, type?: love.MessageBoxType, attachtowindow?: boolean):number ---@param title string # The title of the message box. ---@param message string # The text inside the message box. ---@param type? love.MessageBoxType # The type of the message box. @@ -300,23 +300,23 @@ function love.window.updateMode(width, height, settings) end --- ---Orientation cannot be determined. --- ----| '"unknown"' +---| "unknown" --- ---Landscape orientation. --- ----| '"landscape"' +---| "landscape" --- ---Landscape orientation (flipped). --- ----| '"landscapeflipped"' +---| "landscapeflipped" --- ---Portrait orientation. --- ----| '"portrait"' +---| "portrait" --- ---Portrait orientation (flipped). --- ----| '"portraitflipped"' +---| "portraitflipped" --- ---Types of fullscreen modes. @@ -325,15 +325,15 @@ function love.window.updateMode(width, height, settings) end --- ---Sometimes known as borderless fullscreen windowed mode. A borderless screen-sized window is created which sits on top of all desktop UI elements. The window is automatically resized to match the dimensions of the desktop, and its size cannot be changed. --- ----| '"desktop"' +---| "desktop" --- ---Standard exclusive-fullscreen mode. Changes the display mode (actual resolution) of the monitor. --- ----| '"exclusive"' +---| "exclusive" --- ---Standard exclusive-fullscreen mode. Changes the display mode (actual resolution) of the monitor. --- ----| '"normal"' +---| "normal" --- ---Types of message box dialogs. Different types may have slightly different looks. @@ -342,12 +342,12 @@ function love.window.updateMode(width, height, settings) end --- ---Informational dialog. --- ----| '"info"' +---| "info" --- ---Warning dialog. --- ----| '"warning"' +---| "warning" --- ---Error dialog. --- ----| '"error"' +---| "error" diff --git a/meta/3rd/lovr/library/lovr.audio.lua b/meta/3rd/lovr/library/lovr.audio.lua index e948e0d4..22106b30 100644 --- a/meta/3rd/lovr/library/lovr.audio.lua +++ b/meta/3rd/lovr/library/lovr.audio.lua @@ -183,8 +183,8 @@ function lovr.audio.isStarted(type) end --- ---Creates a new Source from an ogg, wav, or mp3 file. --- ----@overload fun(blob: lovr.Blob, options: table):lovr.Source ----@overload fun(sound: lovr.Sound, options: table):lovr.Source +---@overload fun(blob: lovr.Blob, options?: table):lovr.Source +---@overload fun(sound: lovr.Sound, options?: table):lovr.Source ---@param filename string # The filename of the sound to load. ---@param options? {decode: boolean, effects: table} # Optional options. ---@return lovr.Source source # The new Source. @@ -263,7 +263,7 @@ function lovr.audio.setDevice(type, id, sink, mode) end --- ---The triangles must use counterclockwise winding. --- ----@overload fun(model: lovr.Model, material: lovr.AudioMaterial):boolean +---@overload fun(model: lovr.Model, material?: lovr.AudioMaterial):boolean ---@param vertices table # A flat table of vertices. Each vertex is 3 numbers representing its x, y, and z position. The units used for audio coordinates are up to you, but meters are recommended. ---@param indices table # A list of indices, indicating how the vertices are connected into triangles. Indices are 1-indexed and are 32 bits (they can be bigger than 65535). ---@param material? lovr.AudioMaterial # The acoustic material to use. @@ -672,35 +672,35 @@ function Source:tell(unit) end --- ---Generic default audio material. --- ----| '"generic"' +---| "generic" --- ---Brick. --- ----| '"brick"' +---| "brick" --- ---Carpet. --- ----| '"carpet"' +---| "carpet" --- ---Ceramic. --- ----| '"ceramic"' +---| "ceramic" --- ---Concrete. --- ----| '"concrete"' +---| "concrete" ----| '"glass"' +---| "glass" ----| '"gravel"' +---| "gravel" ----| '"metal"' +---| "metal" ----| '"plaster"' +---| "plaster" ----| '"rock"' +---| "rock" ----| '"wood"' +---| "wood" --- ---Audio devices can be created in shared mode or exclusive mode. @@ -711,11 +711,11 @@ function Source:tell(unit) end --- ---Shared mode. --- ----| '"shared"' +---| "shared" --- ---Exclusive mode. --- ----| '"exclusive"' +---| "exclusive" --- ---When referencing audio devices, this indicates whether it's the playback or capture device. @@ -724,11 +724,11 @@ function Source:tell(unit) end --- ---The playback device (speakers, headphones). --- ----| '"playback"' +---| "playback" --- ---The capture device (microphone). --- ----| '"capture"' +---| "capture" --- ---Different types of effects that can be applied with `Source:setEffectEnabled`. @@ -747,27 +747,27 @@ function Source:tell(unit) end --- ---Models absorption as sound travels through the air, water, etc. --- ----| '"absorption"' +---| "absorption" --- ---Decreases audio volume with distance (1 / max(distance, 1)). --- ----| '"falloff"' +---| "falloff" --- ---Causes audio to drop off when the Source is occluded by geometry. --- ----| '"occlusion"' +---| "occlusion" --- ---Models reverb caused by audio bouncing off of geometry. --- ----| '"reverb"' +---| "reverb" --- ---Spatializes the Source using either simple panning or an HRTF. --- ----| '"spatialization"' +---| "spatialization" --- ---Causes audio to be heard through walls when occluded, based on audio materials. --- ----| '"transmission"' +---| "transmission" --- ---When figuring out how long a Source is or seeking to a specific position in the sound file, units can be expressed in terms of seconds or in terms of frames. @@ -778,11 +778,11 @@ function Source:tell(unit) end --- ---Seconds. --- ----| '"seconds"' +---| "seconds" --- ---Frames. --- ----| '"frames"' +---| "frames" --- ---When accessing the volume of Sources or the audio listener, this can be done in linear units with a 0 to 1 range, or in decibels with a range of -∞ to 0. @@ -791,8 +791,8 @@ function Source:tell(unit) end --- ---Linear volume range. --- ----| '"linear"' +---| "linear" --- ---Decibels. --- ----| '"db"' +---| "db" diff --git a/meta/3rd/lovr/library/lovr.data.lua b/meta/3rd/lovr/library/lovr.data.lua index 04276439..9c53bab0 100644 --- a/meta/3rd/lovr/library/lovr.data.lua +++ b/meta/3rd/lovr/library/lovr.data.lua @@ -9,8 +9,8 @@ lovr.data = {} --- ---Creates a new Blob. --- ----@overload fun(contents: string, name: string):lovr.Blob ----@overload fun(source: lovr.Blob, name: string):lovr.Blob +---@overload fun(contents: string, name?: string):lovr.Blob +---@overload fun(source: lovr.Blob, name?: string):lovr.Blob ---@param size number # The amount of data to allocate for the Blob, in bytes. All of the bytes will be filled with zeroes. ---@param name? string # A name for the Blob (used in error messages) ---@return lovr.Blob blob # The new Blob. @@ -29,9 +29,9 @@ function lovr.data.newBlob(size, name) end --- ---Currently textures loaded as KTX need to be in DXT/ASTC formats. --- ----@overload fun(width: number, height: number, format: lovr.TextureFormat, data: lovr.Blob):lovr.Image +---@overload fun(width: number, height: number, format?: lovr.TextureFormat, data?: lovr.Blob):lovr.Image ---@overload fun(source: lovr.Image):lovr.Image ----@overload fun(blob: lovr.Blob, flip: boolean):lovr.Image +---@overload fun(blob: lovr.Blob, flip?: boolean):lovr.Image ---@param filename string # The filename of the image to load. ---@param flip? boolean # Whether to vertically flip the image on load. This should be true for normal textures, and false for textures that are going to be used in a cubemap. ---@return lovr.Image image # The new Image. @@ -50,8 +50,8 @@ function lovr.data.newModelData(filename) end --- ---Creates a new Rasterizer from a TTF file. --- ----@overload fun(filename: string, size: number):lovr.Rasterizer ----@overload fun(blob: lovr.Blob, size: number):lovr.Rasterizer +---@overload fun(filename: string, size?: number):lovr.Rasterizer +---@overload fun(blob: lovr.Blob, size?: number):lovr.Rasterizer ---@param size? number # The resolution to render the fonts at, in pixels. Higher resolutions use more memory and processing power but may provide better quality results for some fonts/situations. ---@return lovr.Rasterizer rasterizer # The new Rasterizer. function lovr.data.newRasterizer(size) end @@ -325,8 +325,9 @@ function Rasterizer:getLineHeight() end --- ---Check if the Rasterizer can rasterize a set of glyphs. --- +---@vararg any # Strings (sets of characters) or numbers (character codes) to check for. ---@return boolean hasGlyphs # true if the Rasterizer can rasterize all of the supplied characters, false otherwise. -function Rasterizer:hasGlyphs() end +function Rasterizer:hasGlyphs(...) end --- ---A Sound stores the data for a sound. @@ -469,9 +470,9 @@ function Sound:getFrameCount() end --- ---Reads frames from the Sound into a table, Blob, or another Sound. --- ----@overload fun(self: lovr.Sound, t: table, count: number, srcOffset: number, dstOffset: number):table, number ----@overload fun(self: lovr.Sound, blob: lovr.Blob, count: number, srcOffset: number, dstOffset: number):number ----@overload fun(self: lovr.Sound, sound: lovr.Sound, count: number, srcOffset: number, dstOffset: number):number +---@overload fun(self: lovr.Sound, t: table, count?: number, srcOffset?: number, dstOffset?: number):table, number +---@overload fun(self: lovr.Sound, blob: lovr.Blob, count?: number, srcOffset?: number, dstOffset?: number):number +---@overload fun(self: lovr.Sound, sound: lovr.Sound, count?: number, srcOffset?: number, dstOffset?: number):number ---@param count? number # The number of frames to read. If nil, reads as many frames as possible. Compressed sounds will automatically be decoded. @@ -523,8 +524,8 @@ function Sound:isStream() end --- ---Writes frames to the Sound. --- ----@overload fun(self: lovr.Sound, blob: lovr.Blob, count: number, dstOffset: number, srcOffset: number):number ----@overload fun(self: lovr.Sound, sound: lovr.Sound, count: number, dstOffset: number, srcOffset: number):number +---@overload fun(self: lovr.Sound, blob: lovr.Blob, count?: number, dstOffset?: number, srcOffset?: number):number +---@overload fun(self: lovr.Sound, sound: lovr.Sound, count?: number, dstOffset?: number, srcOffset?: number):number ---@param t table # A table containing frames to write. ---@param count? number # How many frames to write. If nil, writes as many as possible. ---@param dstOffset? number # A frame offset to apply when writing the frames. @@ -539,13 +540,13 @@ function Sound:setFrames(t, count, dstOffset, srcOffset) end --- ---1 channel. --- ----| '"mono"' +---| "mono" --- ---2 channels. --- ---The first channel is for the left speaker and the second is for the right. --- ----| '"stereo"' +---| "stereo" --- ---4 channels. --- @@ -553,7 +554,7 @@ function Sound:setFrames(t, count, dstOffset, srcOffset) end --- ---Currently, ambisonic sounds can only be loaded, not played. --- ----| '"ambisonic"' +---| "ambisonic" --- ---Sounds can store audio samples as 16 bit integers or 32 bit floats. @@ -562,8 +563,8 @@ function Sound:setFrames(t, count, dstOffset, srcOffset) end --- ---32 bit floating point samples (between -1.0 and 1.0). --- ----| '"f32"' +---| "f32" --- ---16 bit integer samples (between -32768 and 32767). --- ----| '"i16"' +---| "i16" diff --git a/meta/3rd/lovr/library/lovr.event.lua b/meta/3rd/lovr/library/lovr.event.lua index f2e9509d..a515c1ab 100644 --- a/meta/3rd/lovr/library/lovr.event.lua +++ b/meta/3rd/lovr/library/lovr.event.lua @@ -48,7 +48,8 @@ function lovr.event.pump() end ---Only nil, booleans, numbers, strings, and LÖVR objects are supported types for event data. --- ---@param name string # The name of the event. -function lovr.event.push(name) end +---@vararg any # The arguments for the event. Currently, up to 4 are supported. +function lovr.event.push(name, ...) end --- ---Pushes an event to quit. @@ -90,340 +91,340 @@ function lovr.event.restart() end --- ---The A key. --- ----| '"a"' +---| "a" --- ---The B key. --- ----| '"b"' +---| "b" --- ---The C key. --- ----| '"c"' +---| "c" --- ---The D key. --- ----| '"d"' +---| "d" --- ---The E key. --- ----| '"e"' +---| "e" --- ---The F key. --- ----| '"f"' +---| "f" --- ---The G key. --- ----| '"g"' +---| "g" --- ---The H key. --- ----| '"h"' +---| "h" --- ---The I key. --- ----| '"i"' +---| "i" --- ---The J key. --- ----| '"j"' +---| "j" --- ---The K key. --- ----| '"k"' +---| "k" --- ---The L key. --- ----| '"l"' +---| "l" --- ---The M key. --- ----| '"m"' +---| "m" --- ---The N key. --- ----| '"n"' +---| "n" --- ---The O key. --- ----| '"o"' +---| "o" --- ---The P key. --- ----| '"p"' +---| "p" --- ---The Q key. --- ----| '"q"' +---| "q" --- ---The R key. --- ----| '"r"' +---| "r" --- ---The S key. --- ----| '"s"' +---| "s" --- ---The T key. --- ----| '"t"' +---| "t" --- ---The U key. --- ----| '"u"' +---| "u" --- ---The V key. --- ----| '"v"' +---| "v" --- ---The W key. --- ----| '"w"' +---| "w" --- ---The X key. --- ----| '"x"' +---| "x" --- ---The Y key. --- ----| '"y"' +---| "y" --- ---The Z key. --- ----| '"z"' +---| "z" --- ---The 0 key. --- ----| '"0"' +---| "0" --- ---The 1 key. --- ----| '"1"' +---| "1" --- ---The 2 key. --- ----| '"2"' +---| "2" --- ---The 3 key. --- ----| '"3"' +---| "3" --- ---The 4 key. --- ----| '"4"' +---| "4" --- ---The 5 key. --- ----| '"5"' +---| "5" --- ---The 6 key. --- ----| '"6"' +---| "6" --- ---The 7 key. --- ----| '"7"' +---| "7" --- ---The 8 key. --- ----| '"8"' +---| "8" --- ---The 9 key. --- ----| '"9"' +---| "9" --- ---The space bar. --- ----| '"space"' +---| "space" --- ---The enter key. --- ----| '"return"' +---| "return" --- ---The tab key. --- ----| '"tab"' +---| "tab" --- ---The escape key. --- ----| '"escape"' +---| "escape" --- ---The backspace key. --- ----| '"backspace"' +---| "backspace" --- ---The up arrow key. --- ----| '"up"' +---| "up" --- ---The down arrow key. --- ----| '"down"' +---| "down" --- ---The left arrow key. --- ----| '"left"' +---| "left" --- ---The right arrow key. --- ----| '"right"' +---| "right" --- ---The home key. --- ----| '"home"' +---| "home" --- ---The end key. --- ----| '"end"' +---| "end" --- ---The page up key. --- ----| '"pageup"' +---| "pageup" --- ---The page down key. --- ----| '"pagedown"' +---| "pagedown" --- ---The insert key. --- ----| '"insert"' +---| "insert" --- ---The delete key. --- ----| '"delete"' +---| "delete" --- ---The F1 key. --- ----| '"f1"' +---| "f1" --- ---The F2 key. --- ----| '"f2"' +---| "f2" --- ---The F3 key. --- ----| '"f3"' +---| "f3" --- ---The F4 key. --- ----| '"f4"' +---| "f4" --- ---The F5 key. --- ----| '"f5"' +---| "f5" --- ---The F6 key. --- ----| '"f6"' +---| "f6" --- ---The F7 key. --- ----| '"f7"' +---| "f7" --- ---The F8 key. --- ----| '"f8"' +---| "f8" --- ---The F9 key. --- ----| '"f9"' +---| "f9" --- ---The F10 key. --- ----| '"f10"' +---| "f10" --- ---The F11 key. --- ----| '"f11"' +---| "f11" --- ---The F12 key. --- ----| '"f12"' +---| "f12" --- ---The backtick/backquote/grave accent key. --- ----| '"`"' +---| "`" --- ---The dash/hyphen/minus key. --- ----| '"-"' +---| "-" --- ---The equal sign key. --- ----| '"="' +---| "=" --- ---The left bracket key. --- ----| '"["' +---| "[" --- ---The right bracket key. --- ----| '"]"' +---| "]" --- ---The backslash key. --- ----| '"\\"' +---| "\\" --- ---The semicolon key. --- ----| '";"' +---| ";" --- ---The single quote key. --- ----| '"\'"' +---| "'" --- ---The comma key. --- ----| '","' +---| "," --- ---The period key. --- ----| '"."' +---| "." --- ---The slash key. --- ----| '"/"' +---| "/" --- ---The left control key. --- ----| '"lctrl"' +---| "lctrl" --- ---The left shift key. --- ----| '"lshift"' +---| "lshift" --- ---The left alt key. --- ----| '"lalt"' +---| "lalt" --- ---The left OS key (windows, command, super). --- ----| '"lgui"' +---| "lgui" --- ---The right control key. --- ----| '"rctrl"' +---| "rctrl" --- ---The right shift key. --- ----| '"rshift"' +---| "rshift" --- ---The right alt key. --- ----| '"ralt"' +---| "ralt" --- ---The right OS key (windows, command, super). --- ----| '"rgui"' +---| "rgui" --- ---The caps lock key. --- ----| '"capslock"' +---| "capslock" --- ---The scroll lock key. --- ----| '"scrolllock"' +---| "scrolllock" --- ---The numlock key. --- ----| '"numlock"' +---| "numlock" diff --git a/meta/3rd/lovr/library/lovr.graphics.lua b/meta/3rd/lovr/library/lovr.graphics.lua index 658bf2b3..88dd378b 100644 --- a/meta/3rd/lovr/library/lovr.graphics.lua +++ b/meta/3rd/lovr/library/lovr.graphics.lua @@ -15,13 +15,13 @@ lovr.graphics = {} ---### NOTE: ---The local normal vector of the circle is `(0, 0, 1)`. --- ----@overload fun(material: lovr.Material, x: number, y: number, z: number, radius: number, angle: number, ax: number, ay: number, az: number, start: number, end: number, segments: number) ----@overload fun(mode: lovr.DrawStyle, transform: lovr.mat4, start: number, end: number, segments: number) ----@overload fun(material: lovr.Material, transform: lovr.mat4, start: number, end: number, segments: number) ----@overload fun(mode: lovr.DrawStyle, arcmode: lovr.ArcMode, x: number, y: number, z: number, radius: number, angle: number, ax: number, ay: number, az: number, start: number, end: number, segments: number) ----@overload fun(material: lovr.Material, arcmode: lovr.ArcMode, x: number, y: number, z: number, radius: number, angle: number, ax: number, ay: number, az: number, start: number, end: number, segments: number) ----@overload fun(mode: lovr.DrawStyle, arcmode: lovr.ArcMode, transform: lovr.mat4, start: number, end: number, segments: number) ----@overload fun(material: lovr.Material, arcmode: lovr.ArcMode, transform: lovr.mat4, start: number, end: number, segments: number) +---@overload fun(material: lovr.Material, x?: number, y?: number, z?: number, radius?: number, angle?: number, ax?: number, ay?: number, az?: number, start?: number, end?: number, segments?: number) +---@overload fun(mode: lovr.DrawStyle, transform: lovr.mat4, start?: number, end?: number, segments?: number) +---@overload fun(material: lovr.Material, transform: lovr.mat4, start?: number, end?: number, segments?: number) +---@overload fun(mode: lovr.DrawStyle, arcmode?: lovr.ArcMode, x?: number, y?: number, z?: number, radius?: number, angle?: number, ax?: number, ay?: number, az?: number, start?: number, end?: number, segments?: number) +---@overload fun(material: lovr.Material, arcmode?: lovr.ArcMode, x?: number, y?: number, z?: number, radius?: number, angle?: number, ax?: number, ay?: number, az?: number, start?: number, end?: number, segments?: number) +---@overload fun(mode: lovr.DrawStyle, arcmode?: lovr.ArcMode, transform: lovr.mat4, start?: number, end?: number, segments?: number) +---@overload fun(material: lovr.Material, arcmode?: lovr.ArcMode, transform: lovr.mat4, start?: number, end?: number, segments?: number) ---@param mode lovr.DrawStyle # Whether the arc is filled or outlined. ---@param x? number # The x coordinate of the center of the arc. ---@param y? number # The y coordinate of the center of the arc. @@ -41,7 +41,7 @@ function lovr.graphics.arc(mode, x, y, z, radius, angle, ax, ay, az, start, end, --- ---This is similar to `lovr.graphics.cube` except you can have different values for the width, height, and depth of the box. --- ----@overload fun(material: lovr.Material, x: number, y: number, z: number, width: number, height: number, depth: number, angle: number, ax: number, ay: number, az: number) +---@overload fun(material: lovr.Material, x?: number, y?: number, z?: number, width?: number, height?: number, depth?: number, angle?: number, ax?: number, ay?: number, az?: number) ---@overload fun(mode: lovr.DrawStyle, transform: lovr.mat4) ---@overload fun(material: lovr.Material, transform: lovr.mat4) ---@param mode lovr.DrawStyle # How to draw the box. @@ -64,9 +64,9 @@ function lovr.graphics.box(mode, x, y, z, width, height, depth, angle, ax, ay, a ---### NOTE: ---The local normal vector of the circle is `(0, 0, 1)`. --- ----@overload fun(material: lovr.Material, x: number, y: number, z: number, radius: number, angle: number, ax: number, ay: number, az: number, segments: number) ----@overload fun(mode: lovr.DrawStyle, transform: lovr.mat4, segments: number) ----@overload fun(material: lovr.Material, transform: lovr.mat4, segments: number) +---@overload fun(material: lovr.Material, x?: number, y?: number, z?: number, radius?: number, angle?: number, ax?: number, ay?: number, az?: number, segments?: number) +---@overload fun(mode: lovr.DrawStyle, transform: lovr.mat4, segments?: number) +---@overload fun(material: lovr.Material, transform: lovr.mat4, segments?: number) ---@param mode lovr.DrawStyle # Whether the circle is filled or outlined. ---@param x? number # The x coordinate of the center of the circle. ---@param y? number # The y coordinate of the center of the circle. @@ -90,7 +90,7 @@ function lovr.graphics.circle(mode, x, y, z, radius, angle, ax, ay, az, segments --- ---If you are using `lovr.graphics.setStencilTest`, it will not affect how the screen gets cleared. Instead, you can use `lovr.graphics.fill` to draw a fullscreen quad, which will get masked by the active stencil. --- ----@overload fun(r: number, g: number, b: number, a: number, z: number, s: number) +---@overload fun(r: number, g: number, b: number, a: number, z?: number, s?: number) ---@overload fun(hex: number) ---@param color? boolean # Whether or not to clear color information on the screen. ---@param depth? boolean # Whether or not to clear the depth information on the screen. @@ -135,7 +135,7 @@ function lovr.graphics.createWindow(flags) end --- ---Draws a cube. --- ----@overload fun(material: lovr.Material, x: number, y: number, z: number, size: number, angle: number, ax: number, ay: number, az: number) +---@overload fun(material: lovr.Material, x?: number, y?: number, z?: number, size?: number, angle?: number, ax?: number, ay?: number, az?: number) ---@overload fun(mode: lovr.DrawStyle, transform: lovr.mat4) ---@overload fun(material: lovr.Material, transform: lovr.mat4) ---@param mode lovr.DrawStyle # How to draw the cube. @@ -156,7 +156,7 @@ function lovr.graphics.cube(mode, x, y, z, size, angle, ax, ay, az) end ---### NOTE: ---Currently, cylinders don't have UVs. --- ----@overload fun(material: lovr.Material, x: number, y: number, z: number, length: number, angle: number, ax: number, ay: number, az: number, r1: number, r2: number, capped: boolean, segments: number) +---@overload fun(material: lovr.Material, x?: number, y?: number, z?: number, length?: number, angle?: number, ax?: number, ay?: number, az?: number, r1?: number, r2?: number, capped?: boolean, segments?: number) ---@param x? number # The x coordinate of the center of the cylinder. ---@param y? number # The y coordinate of the center of the cylinder. ---@param z? number # The z coordinate of the center of the cylinder. @@ -533,7 +533,8 @@ function lovr.graphics.isWireframe() end ---@param x2 number # The x coordinate of the second point. ---@param y2 number # The y coordinate of the second point. ---@param z2 number # The z coordinate of the second point. -function lovr.graphics.line(x1, y1, z1, x2, y2, z2) end +---@vararg number # More points. +function lovr.graphics.line(x1, y1, z1, x2, y2, z2, ...) end --- ---Creates a new Canvas. @@ -548,8 +549,8 @@ function lovr.graphics.line(x1, y1, z1, x2, y2, z2) end --- ---Stereo Canvases will either have their width doubled or use array textures for their attachments, depending on their implementation. --- ----@overload fun(..., flags: table):lovr.Canvas ----@overload fun(attachments: table, flags: table):lovr.Canvas +---@overload fun(..., flags?: table):lovr.Canvas +---@overload fun(attachments: table, flags?: table):lovr.Canvas ---@param width number # The width of the canvas, in pixels. ---@param height number # The height of the canvas, in pixels. ---@param flags? {format: lovr.TextureFormat, depth: lovr.TextureFormat, stereo: boolean, msaa: number, mipmaps: boolean} # Optional settings for the Canvas. @@ -585,8 +586,8 @@ function lovr.graphics.newComputeShader(source, options) end ---### NOTE: ---Larger font sizes will lead to more detailed curves at the cost of performance. --- ----@overload fun(size: number, padding: number, spread: number):lovr.Font ----@overload fun(rasterizer: lovr.Rasterizer, padding: number, spread: number):lovr.Font +---@overload fun(size?: number, padding?: number, spread?: number):lovr.Font +---@overload fun(rasterizer: lovr.Rasterizer, padding?: number, spread?: number):lovr.Font ---@param filename string # The filename of the font file. ---@param size? number # The size of the font, in pixels. ---@param padding? number # The number of pixels of padding around each glyph. @@ -608,10 +609,10 @@ function lovr.graphics.newFont(filename, size, padding, spread) end --- default to `(0.0, 0.0, 0.0, 0.0)`. ---- Textures will default to `nil` (a single 1x1 white pixel will be used for them). --- ----@overload fun(texture: lovr.Texture, r: number, g: number, b: number, a: number):lovr.Material ----@overload fun(canvas: lovr.Canvas, r: number, g: number, b: number, a: number):lovr.Material ----@overload fun(r: number, g: number, b: number, a: number):lovr.Material ----@overload fun(hex: number, a: number):lovr.Material +---@overload fun(texture: lovr.Texture, r?: number, g?: number, b?: number, a?: number):lovr.Material +---@overload fun(canvas: lovr.Canvas, r?: number, g?: number, b?: number, a?: number):lovr.Material +---@overload fun(r?: number, g?: number, b?: number, a?: number):lovr.Material +---@overload fun(hex?: number, a?: number):lovr.Material ---@return lovr.Material material # The new Material. function lovr.graphics.newMaterial() end @@ -638,11 +639,11 @@ function lovr.graphics.newMaterial() end --- { 'lovrTexCoord', 'float', 2 } --- } --- ----@overload fun(vertices: table, mode: lovr.DrawMode, usage: lovr.MeshUsage, readable: boolean):lovr.Mesh ----@overload fun(blob: lovr.Blob, mode: lovr.DrawMode, usage: lovr.MeshUsage, readable: boolean):lovr.Mesh ----@overload fun(format: table, size: number, mode: lovr.DrawMode, usage: lovr.MeshUsage, readable: boolean):lovr.Mesh ----@overload fun(format: table, vertices: table, mode: lovr.DrawMode, usage: lovr.MeshUsage, readable: boolean):lovr.Mesh ----@overload fun(format: table, blob: lovr.Blob, mode: lovr.DrawMode, usage: lovr.MeshUsage, readable: boolean):lovr.Mesh +---@overload fun(vertices: table, mode?: lovr.DrawMode, usage?: lovr.MeshUsage, readable?: boolean):lovr.Mesh +---@overload fun(blob: lovr.Blob, mode?: lovr.DrawMode, usage?: lovr.MeshUsage, readable?: boolean):lovr.Mesh +---@overload fun(format: table, size: number, mode?: lovr.DrawMode, usage?: lovr.MeshUsage, readable?: boolean):lovr.Mesh +---@overload fun(format: table, vertices: table, mode?: lovr.DrawMode, usage?: lovr.MeshUsage, readable?: boolean):lovr.Mesh +---@overload fun(format: table, blob: lovr.Blob, mode?: lovr.DrawMode, usage?: lovr.MeshUsage, readable?: boolean):lovr.Mesh ---@param size number # The maximum number of vertices the Mesh can store. ---@param mode? lovr.DrawMode # How the Mesh will connect its vertices into triangles. ---@param usage? lovr.MeshUsage # An optimization hint indicating how often the data in the Mesh will be updated. @@ -758,7 +759,7 @@ function lovr.graphics.newModel(filename) end --- ---Currently on Android, only stereo shaders can be used with stereo Canvases, and mono Shaders can only be used with mono Canvases. --- ----@overload fun(default: lovr.DefaultShader, options: table):lovr.Shader +---@overload fun(default: lovr.DefaultShader, options?: table):lovr.Shader ---@param vertex string # The code or filename of the vertex shader. If nil, the default vertex shader is used. ---@param fragment string # The code or filename of the fragment shader. If nil, the default fragment shader is used. ---@param options? {flags: table, stereo: boolean} # Optional settings for the Shader. @@ -791,10 +792,10 @@ function lovr.graphics.newShaderBlock(type, uniforms, flags) end --- ---Right now the supported image file formats are png, jpg, hdr, dds (DXT1, DXT3, DXT5), ktx, and astc. --- ----@overload fun(images: table, flags: table):lovr.Texture ----@overload fun(width: number, height: number, depth: number, flags: table):lovr.Texture ----@overload fun(blob: lovr.Blob, flags: table):lovr.Texture ----@overload fun(image: lovr.Image, flags: table):lovr.Texture +---@overload fun(images: table, flags?: table):lovr.Texture +---@overload fun(width: number, height: number, depth: number, flags?: table):lovr.Texture +---@overload fun(blob: lovr.Blob, flags?: table):lovr.Texture +---@overload fun(image: lovr.Image, flags?: table):lovr.Texture ---@param filename string # The filename of the image to load. ---@param flags? {linear: boolean, mipmaps: boolean, type: lovr.TextureType, format: lovr.TextureFormat, msaa: number} # Optional settings for the texture. ---@return lovr.Texture texture # The new Texture. @@ -818,7 +819,7 @@ function lovr.graphics.origin() end --- ---One efficient technique for rendering many planes with different textures is to pack all of the textures into a single image, and then use the uv arguments to select a sub-rectangle to use for each plane. --- ----@overload fun(material: lovr.Material, x: number, y: number, z: number, width: number, height: number, angle: number, ax: number, ay: number, az: number, u: number, v: number, w: number, h: number) +---@overload fun(material: lovr.Material, x?: number, y?: number, z?: number, width?: number, height?: number, angle?: number, ax?: number, ay?: number, az?: number, u?: number, v?: number, w?: number, h?: number) ---@param mode lovr.DrawStyle # How to draw the plane. ---@param x? number # The x coordinate of the center of the plane. ---@param y? number # The y coordinate of the center of the plane. @@ -842,7 +843,8 @@ function lovr.graphics.plane(mode, x, y, z, width, height, angle, ax, ay, az, u, ---@param x number # The x coordinate of the point. ---@param y number # The y coordinate of the point. ---@param z number # The z coordinate of the point. -function lovr.graphics.points(x, y, z) end +---@vararg number # More points. +function lovr.graphics.points(x, y, z, ...) end --- ---Pops the current transform from the stack, returning to the transformation that was applied before `lovr.graphics.push` was called. @@ -970,7 +972,7 @@ function lovr.graphics.setAlphaSampling(enabled) end ---### NOTE: ---The default background color is `(0.0, 0.0, 0.0, 1.0)`. --- ----@overload fun(hex: number, a: number) +---@overload fun(hex: number, a?: number) ---@overload fun(color: table) ---@param r number # The red component of the background color. ---@param g number # The green component of the background color. @@ -1013,7 +1015,7 @@ function lovr.graphics.setCanvas(canvas) end ---### NOTE: ---The default color is `(1.0, 1.0, 1.0, 1.0)`. --- ----@overload fun(hex: number, a: number) +---@overload fun(hex: number, a?: number) ---@overload fun(color: table) ---@param r number # The red component of the color. ---@param g number # The green component of the color. @@ -1259,7 +1261,7 @@ function lovr.graphics.skybox(texture) end --- ---Draws a sphere. --- ----@overload fun(material: lovr.Material, x: number, y: number, z: number, radius: number, angle: number, ax: number, ay: number, az: number) +---@overload fun(material: lovr.Material, x?: number, y?: number, z?: number, radius?: number, angle?: number, ax?: number, ay?: number, az?: number) ---@param x? number # The x coordinate of the center of the sphere. ---@param y? number # The y coordinate of the center of the sphere. ---@param z? number # The z coordinate of the center of the sphere. @@ -1277,7 +1279,7 @@ function lovr.graphics.sphere(x, y, z, radius, angle, ax, ay, az) end ---### NOTE: ---Stencil values are between 0 and 255. --- ----@overload fun(callback: function, action: lovr.StencilAction, value: number, initial: number) +---@overload fun(callback: function, action?: lovr.StencilAction, value?: number, initial?: number) ---@param callback function # The function that will be called to render to the stencil buffer. ---@param action? lovr.StencilAction # How to modify the stencil value of pixels that are rendered to. ---@param value? number # If `action` is "replace", this is the value that pixels are replaced with. @@ -1474,7 +1476,8 @@ function Canvas:newImage(index) end ---If you plan on modifying the transform stack inside your callback it may be a good idea to use `lovr.graphics.push` and `lovr.graphics.pop` so you can revert to the previous transform afterwards. --- ---@param callback function # The function to use to render to the Canvas. -function Canvas:renderTo(callback) end +---@vararg any # Additional arguments to pass to the callback. +function Canvas:renderTo(callback, ...) end --- ---Attaches one or more Textures to the Canvas. @@ -1494,7 +1497,8 @@ function Canvas:renderTo(callback) end --- ---You can also optionally wrap them in a table. --- -function Canvas:setTexture() end +---@vararg any # One or more Textures to attach to the Canvas. +function Canvas:setTexture(...) end --- ---A Font is an object created from a TTF file. @@ -1592,8 +1596,9 @@ function Font:getWidth(text, wrap) end ---### NOTE: ---It is a good idea to use this function when you're rendering an unknown or user-supplied string to avoid utterly embarrassing crashes. --- +---@vararg any # Strings or numbers to test. ---@return boolean has # Whether the Font has the glyphs. -function Font:hasGlyphs() end +function Font:hasGlyphs(...) end --- ---Sets the line height of the Font, which controls how far lines apart lines are vertically separated. @@ -1677,9 +1682,9 @@ function Material:getTransform() end --- ---Colors default to `(1.0, 1.0, 1.0, 1.0)` and are gamma corrected. --- ----@overload fun(self: lovr.Material, r: number, g: number, b: number, a: number) ----@overload fun(self: lovr.Material, colorType: lovr.MaterialColor, hex: number, a: number) ----@overload fun(self: lovr.Material, hex: number, a: number) +---@overload fun(self: lovr.Material, r: number, g: number, b: number, a?: number) +---@overload fun(self: lovr.Material, colorType?: lovr.MaterialColor, hex: number, a?: number) +---@overload fun(self: lovr.Material, hex: number, a?: number) ---@param colorType? lovr.MaterialColor # The type of color to set. ---@param r number # The red component of the color. ---@param g number # The green component of the color. @@ -1811,8 +1816,8 @@ local Mesh = {} --- ---To prevent cycles, it is not possible to attach attributes onto a Mesh that already has attributes attached to a different Mesh. --- ----@overload fun(self: lovr.Mesh, mesh: lovr.Mesh, divisor: number, ...) ----@overload fun(self: lovr.Mesh, mesh: lovr.Mesh, divisor: number, attributes: table) +---@overload fun(self: lovr.Mesh, mesh: lovr.Mesh, divisor?: number, ...) +---@overload fun(self: lovr.Mesh, mesh: lovr.Mesh, divisor?: number, attributes: table) ---@param mesh lovr.Mesh # The Mesh to attach attributes from. ---@param divisor? number # The attribute divisor for all attached attributes. function Mesh:attachAttributes(mesh, divisor) end @@ -1828,7 +1833,7 @@ function Mesh:detachAttributes(mesh) end --- ---Draws the contents of the Mesh. --- ----@overload fun(self: lovr.Mesh, transform: lovr.mat4, instances: number) +---@overload fun(self: lovr.Mesh, transform: lovr.mat4, instances?: number) ---@param x? number # The x coordinate to draw the Mesh at. ---@param y? number # The y coordinate to draw the Mesh at. ---@param z? number # The z coordinate to draw the Mesh at. @@ -1962,7 +1967,8 @@ function Mesh:setMaterial(material) end ---Any unspecified components will be set to 0. --- ---@param index number # The index of the vertex to set. -function Mesh:setVertex(index) end +---@vararg number # The attributes of the vertex. +function Mesh:setVertex(index, ...) end --- ---Set the components of a specific attribute of a vertex in the Mesh. @@ -1973,7 +1979,8 @@ function Mesh:setVertex(index) end --- ---@param index number # The index of the vertex to update. ---@param attribute number # The index of the attribute to update. -function Mesh:setVertexAttribute(index, attribute) end +---@vararg number # The new components for the attribute. +function Mesh:setVertexAttribute(index, attribute, ...) end --- ---Sets the vertex map. @@ -1982,7 +1989,7 @@ function Mesh:setVertexAttribute(index, attribute) end --- ---Often, a vertex map is used to improve performance, since it usually requires less data to specify the index of a vertex than it does to specify all of the data for a vertex. --- ----@overload fun(self: lovr.Mesh, blob: lovr.Blob, size: number) +---@overload fun(self: lovr.Mesh, blob: lovr.Blob, size?: number) ---@param map table # The new vertex map. Each element of the table is an index of a vertex. function Mesh:setVertexMap(map) end @@ -1993,7 +2000,7 @@ function Mesh:setVertexMap(map) end ---### NOTE: ---The start index plus the number of vertices in the table should not exceed the maximum size of the Mesh. --- ----@overload fun(self: lovr.Mesh, blob: lovr.Blob, start: number, count: number) +---@overload fun(self: lovr.Mesh, blob: lovr.Blob, start?: number, count?: number) ---@param vertices table # The new set of vertices. ---@param start? number # The index of the vertex to start replacing at. ---@param count? number # The number of vertices to replace. If nil, all vertices will be used. @@ -2022,7 +2029,7 @@ local Model = {} --- ---To clear the pose of a Model to the default, use `Model:pose(nil)`. --- ----@overload fun(self: lovr.Model, index: number, time: number, alpha: number) +---@overload fun(self: lovr.Model, index: number, time: number, alpha?: number) ---@param name string # The name of an animation. ---@param time number # The timestamp to evaluate the keyframes at, in seconds. ---@param alpha? number # How much of the animation to mix in, from 0 to 1. @@ -2031,7 +2038,7 @@ function Model:animate(name, time, alpha) end --- ---Draw the Model. --- ----@overload fun(self: lovr.Model, transform: lovr.mat4, instances: number) +---@overload fun(self: lovr.Model, transform: lovr.mat4, instances?: number) ---@param x? number # The x coordinate to draw the Model at. ---@param y? number # The y coordinate to draw the Model at. ---@param z? number # The z coordinate to draw the Model at. @@ -2120,7 +2127,7 @@ function Model:getNodeName(index) end --- ---See `lovr.graphics.newShader` for more. --- ----@overload fun(self: lovr.Model, index: number, space: lovr.CoordinateSpace):number, number, number, number, number, number, number +---@overload fun(self: lovr.Model, index: number, space?: lovr.CoordinateSpace):number, number, number, number, number, number, number ---@param name string # The name of the node. ---@param space? lovr.CoordinateSpace # Whether the pose should be returned relative to the node's parent or relative to the root node of the Model. ---@return number x # The x position of the node. @@ -2174,7 +2181,7 @@ function Model:hasJoints() end --- ---See `lovr.graphics.newShader` for more. --- ----@overload fun(self: lovr.Model, index: number, x: number, y: number, z: number, angle: number, ax: number, ay: number, az: number, alpha: number) +---@overload fun(self: lovr.Model, index: number, x: number, y: number, z: number, angle: number, ax: number, ay: number, az: number, alpha?: number) ---@overload fun(self: lovr.Model) ---@param name string # The name of the node. ---@param x number # The x position. @@ -2436,7 +2443,7 @@ function Shader:sendBlock(name, block, access) end --- ---The normal `Shader:send` function accepts Textures and should be used most of the time. --- ----@overload fun(self: lovr.Shader, name: string, index: number, texture: lovr.Texture, slice: number, mipmap: number, access: lovr.UniformAccess) +---@overload fun(self: lovr.Shader, name: string, index: number, texture: lovr.Texture, slice?: number, mipmap?: number, access?: lovr.UniformAccess) ---@param name string # The name of the image uniform. ---@param texture lovr.Texture # The Texture to assign. ---@param slice? number # The slice of a cube, array, or volume texture to use, or `nil` for all slices. @@ -2533,7 +2540,7 @@ function ShaderBlock:read(name) end --- ---`Blob`s can also be used to pass arbitrary binary data to individual variables. --- ----@overload fun(self: lovr.ShaderBlock, blob: lovr.Blob, srcOffset: number, dstOffset: number, extent: number):number +---@overload fun(self: lovr.ShaderBlock, blob: lovr.Blob, srcOffset?: number, dstOffset?: number, extent?: number):number ---@param variable string # The name of the variable to update. ---@param value any # The new value of the uniform. function ShaderBlock:send(variable, value) end @@ -2673,15 +2680,15 @@ function Texture:setWrap(horizontal, vertical) end --- ---The arc is drawn with the center of its circle included in the list of points (default). --- ----| '"pie"' +---| "pie" --- ---The curve of the arc is drawn as a single line. --- ----| '"open"' +---| "open" --- ---The starting and ending points of the arc's curve are connected. --- ----| '"closed"' +---| "closed" --- ---Here are the different data types available for vertex attributes in a Mesh. @@ -2694,31 +2701,31 @@ function Texture:setWrap(horizontal, vertical) end --- ---A signed 8 bit number, from -128 to 127. --- ----| '"byte"' +---| "byte" --- ---An unsigned 8 bit number, from 0 to 255. --- ----| '"ubyte"' +---| "ubyte" --- ---A signed 16 bit number, from -32768 to 32767. --- ----| '"short"' +---| "short" --- ---An unsigned 16 bit number, from 0 to 65535. --- ----| '"ushort"' +---| "ushort" --- ---A signed 32 bit number, from -2147483648 to 2147483647. --- ----| '"int"' +---| "int" --- ---An unsigned 32 bit number, from 0 to 4294967295. --- ----| '"uint"' +---| "uint" --- ---A 32 bit floating-point number (large range, but can start to lose precision). --- ----| '"float"' +---| "float" --- ---Different ways the alpha channel of pixels affects blending. @@ -2733,13 +2740,13 @@ function Texture:setWrap(horizontal, vertical) end --- ---Color channel values are multiplied by the alpha channel during blending. --- ----| '"alphamultiply"' +---| "alphamultiply" --- ---Color channels are not multiplied by the alpha channel. --- ---This should be used if the pixels being drawn have already been blended, or "pre-multiplied", by the alpha channel. --- ----| '"premultiplied"' +---| "premultiplied" --- ---Blend modes control how overlapping pixels are blended together, similar to layers in Photoshop. @@ -2748,31 +2755,31 @@ function Texture:setWrap(horizontal, vertical) end --- ---Normal blending where the alpha value controls how the colors are blended. --- ----| '"alpha"' +---| "alpha" --- ---The incoming pixel color is added to the destination pixel color. --- ----| '"add"' +---| "add" --- ---The incoming pixel color is subtracted from the destination pixel color. --- ----| '"subtract"' +---| "subtract" --- ---The color channels from the two pixel values are multiplied together to produce a result. --- ----| '"multiply"' +---| "multiply" --- ---The maximum value from each color channel is used, resulting in a lightening effect. --- ----| '"lighten"' +---| "lighten" --- ---The minimum value from each color channel is used, resulting in a darkening effect. --- ----| '"darken"' +---| "darken" --- ---The opposite of multiply: The pixel values are inverted, multiplied, and inverted again, resulting in a lightening effect. --- ----| '"screen"' +---| "screen" --- ---There are two types of ShaderBlocks that can be used: `uniform` and `compute`. @@ -2785,11 +2792,11 @@ function Texture:setWrap(horizontal, vertical) end --- ---A uniform block. --- ----| '"uniform"' +---| "uniform" --- ---A compute block. --- ----| '"compute"' +---| "compute" --- ---This acts as a hint to the graphics driver about what kinds of data access should be optimized for. @@ -2798,15 +2805,15 @@ function Texture:setWrap(horizontal, vertical) end --- ---A buffer that you intend to create once and never modify. --- ----| '"static"' +---| "static" --- ---A buffer which is modified occasionally. --- ----| '"dynamic"' +---| "dynamic" --- ---A buffer which is entirely replaced on the order of every frame. --- ----| '"stream"' +---| "stream" --- ---The method used to compare z values when deciding how to overlap rendered objects. @@ -2821,27 +2828,27 @@ function Texture:setWrap(horizontal, vertical) end --- ---The depth test passes when the depth values are equal. --- ----| '"equal"' +---| "equal" --- ---The depth test passes when the depth values are not equal. --- ----| '"notequal"' +---| "notequal" --- ---The depth test passes when the new depth value is less than the existing one. --- ----| '"less"' +---| "less" --- ---The depth test passes when the new depth value is less than or equal to the existing one. --- ----| '"lequal"' +---| "lequal" --- ---The depth test passes when the new depth value is greater than or equal to the existing one. --- ----| '"gequal"' +---| "gequal" --- ---The depth test passes when the new depth value is greater than the existing one. --- ----| '"greater"' +---| "greater" --- ---Different coordinate spaces for nodes in a Model. @@ -2850,11 +2857,11 @@ function Texture:setWrap(horizontal, vertical) end --- ---The coordinate space relative to the node's parent. --- ----| '"local"' +---| "local" --- ---The coordinate space relative to the root node of the Model. --- ----| '"global"' +---| "global" --- ---The following shaders are built in to LÖVR, and can be used as an argument to `lovr.graphics.newShader` instead of providing raw GLSL shader code. @@ -2867,27 +2874,27 @@ function Texture:setWrap(horizontal, vertical) end --- ---A simple shader without lighting, using only colors and a diffuse texture. --- ----| '"unlit"' +---| "unlit" --- ---A physically-based rendering (PBR) shader, using advanced material properties. --- ----| '"standard"' +---| "standard" --- ---A shader that renders a cubemap texture. --- ----| '"cube"' +---| "cube" --- ---A shader that renders a 2D equirectangular texture with spherical coordinates. --- ----| '"pano"' +---| "pano" --- ---A shader that renders font glyphs. --- ----| '"font"' +---| "font" --- ---A shader that passes its vertex coordinates unmodified to the fragment shader, used to render view-independent fixed geometry like fullscreen quads. --- ----| '"fill"' +---| "fill" --- ---Meshes are lists of arbitrary vertices. @@ -2898,35 +2905,35 @@ function Texture:setWrap(horizontal, vertical) end --- ---Draw each vertex as a single point. --- ----| '"points"' +---| "points" --- ---The vertices represent a list of line segments. Each pair of vertices will have a line drawn between them. --- ----| '"lines"' +---| "lines" --- ---The first two vertices have a line drawn between them, and each vertex after that will be connected to the previous vertex with a line. --- ----| '"linestrip"' +---| "linestrip" --- ---Similar to linestrip, except the last vertex is connected back to the first. --- ----| '"lineloop"' +---| "lineloop" --- ---The first three vertices define a triangle. --- ---Each vertex after that creates a triangle using the new vertex and last two vertices. --- ----| '"strip"' +---| "strip" --- ---Each set of three vertices represents a discrete triangle. --- ----| '"triangles"' +---| "triangles" --- ---Draws a set of triangles. --- ---Each one shares the first vertex as a common point, leading to a fan-like shape. --- ----| '"fan"' +---| "fan" --- ---Most graphics primitives can be drawn in one of two modes: a filled mode and a wireframe mode. @@ -2935,11 +2942,11 @@ function Texture:setWrap(horizontal, vertical) end --- ---The shape is drawn as a filled object. --- ----| '"fill"' +---| "fill" --- ---The shape is drawn as a wireframe object. --- ----| '"line"' +---| "line" --- ---The method used to downsample (or upsample) a texture. @@ -2954,15 +2961,15 @@ function Texture:setWrap(horizontal, vertical) end --- ---Leads to a pixelated style. --- ----| '"nearest"' +---| "nearest" --- ---Smooth pixel sampling. --- ----| '"bilinear"' +---| "bilinear" --- ---Smooth pixel sampling, with smooth sampling across mipmap levels. --- ----| '"trilinear"' +---| "trilinear" --- ---Different ways to horizontally align text when using `lovr.graphics.print`. @@ -2971,15 +2978,15 @@ function Texture:setWrap(horizontal, vertical) end --- ---Left aligned lines of text. --- ----| '"left"' +---| "left" --- ---Centered aligned lines of text. --- ----| '"center"' +---| "center" --- ---Right aligned lines of text. --- ----| '"right"' +---| "right" --- ---The different types of color parameters `Material`s can hold. @@ -2988,11 +2995,11 @@ function Texture:setWrap(horizontal, vertical) end --- ---The diffuse color. --- ----| '"diffuse"' +---| "diffuse" --- ---The emissive color. --- ----| '"emissive"' +---| "emissive" --- ---The different types of float parameters `Material`s can hold. @@ -3001,11 +3008,11 @@ function Texture:setWrap(horizontal, vertical) end --- ---The constant metalness factor. --- ----| '"metalness"' +---| "metalness" --- ---The constant roughness factor. --- ----| '"roughness"' +---| "roughness" --- ---The different types of texture parameters `Material`s can hold. @@ -3014,31 +3021,31 @@ function Texture:setWrap(horizontal, vertical) end --- ---The diffuse texture. --- ----| '"diffuse"' +---| "diffuse" --- ---The emissive texture. --- ----| '"emissive"' +---| "emissive" --- ---The metalness texture. --- ----| '"metalness"' +---| "metalness" --- ---The roughness texture. --- ----| '"roughness"' +---| "roughness" --- ---The ambient occlusion texture. --- ----| '"occlusion"' +---| "occlusion" --- ---The normal map. --- ----| '"normal"' +---| "normal" --- ---The environment map, should be specified as a cubemap texture. --- ----| '"environment"' +---| "environment" --- ---Meshes can have a usage hint, describing how they are planning on being updated. @@ -3049,15 +3056,15 @@ function Texture:setWrap(horizontal, vertical) end --- ---The Mesh contents will rarely change. --- ----| '"static"' +---| "static" --- ---The Mesh contents will change often. --- ----| '"dynamic"' +---| "dynamic" --- ---The Mesh contents will change constantly, potentially multiple times each frame. --- ----| '"stream"' +---| "stream" --- ---Shaders can be used for either rendering operations or generic compute tasks. @@ -3070,11 +3077,11 @@ function Texture:setWrap(horizontal, vertical) end --- ---A graphics shader. --- ----| '"graphics"' +---| "graphics" --- ---A compute shader. --- ----| '"compute"' +---| "compute" --- ---How to modify pixels in the stencil buffer when using `lovr.graphics.stencil`. @@ -3083,27 +3090,27 @@ function Texture:setWrap(horizontal, vertical) end --- ---Stencil values will be replaced with a custom value. --- ----| '"replace"' +---| "replace" --- ---Stencil values will increment every time they are rendered to. --- ----| '"increment"' +---| "increment" --- ---Stencil values will decrement every time they are rendered to. --- ----| '"decrement"' +---| "decrement" --- ---Similar to `increment`, but the stencil value will be set to 0 if it exceeds 255. --- ----| '"incrementwrap"' +---| "incrementwrap" --- ---Similar to `decrement`, but the stencil value will be set to 255 if it drops below 0. --- ----| '"decrementwrap"' +---| "decrementwrap" --- ---Stencil values will be bitwise inverted every time they are rendered to. --- ----| '"invert"' +---| "invert" --- ---Textures can store their pixels in different formats. @@ -3114,63 +3121,63 @@ function Texture:setWrap(horizontal, vertical) end --- ---Each pixel is 24 bits, or 8 bits for each channel. --- ----| '"rgb"' +---| "rgb" --- ---Each pixel is 32 bits, or 8 bits for each channel (including alpha). --- ----| '"rgba"' +---| "rgba" --- ---An rgba format where the colors occupy 4 bits instead of the usual 8. --- ----| '"rgba4"' +---| "rgba4" --- ---Each pixel is 64 bits. Each channel is a 16 bit floating point number. --- ----| '"rgba16f"' +---| "rgba16f" --- ---Each pixel is 128 bits. Each channel is a 32 bit floating point number. --- ----| '"rgba32f"' +---| "rgba32f" --- ---A 16-bit floating point format with a single color channel. --- ----| '"r16f"' +---| "r16f" --- ---A 32-bit floating point format with a single color channel. --- ----| '"r32f"' +---| "r32f" --- ---A 16-bit floating point format with two color channels. --- ----| '"rg16f"' +---| "rg16f" --- ---A 32-bit floating point format with two color channels. --- ----| '"rg32f"' +---| "rg32f" --- ---A 16 bit format with 5-bit color channels and a single alpha bit. --- ----| '"rgb5a1"' +---| "rgb5a1" --- ---A 32 bit format with 10-bit color channels and two alpha bits. --- ----| '"rgb10a2"' +---| "rgb10a2" --- ---Each pixel is 32 bits, and packs three color channels into 10 or 11 bits each. --- ----| '"rg11b10f"' +---| "rg11b10f" --- ---A 16 bit depth buffer. --- ----| '"d16"' +---| "d16" --- ---A 32 bit floating point depth buffer. --- ----| '"d32f"' +---| "d32f" --- ---A depth buffer with 24 bits for depth and 8 bits for stencil. --- ----| '"d24s8"' +---| "d24s8" --- ---Different types of Textures. @@ -3179,19 +3186,19 @@ function Texture:setWrap(horizontal, vertical) end --- ---A 2D texture. --- ----| '"2d"' +---| "2d" --- ---A 2D array texture with multiple independent 2D layers. --- ----| '"array"' +---| "array" --- ---A cubemap texture with 6 2D faces. --- ----| '"cube"' +---| "cube" --- ---A 3D volumetric texture consisting of multiple 2D layers. --- ----| '"volume"' +---| "volume" --- ---When binding writable resources to shaders using `Shader:sendBlock` and `Shader:sendImage`, an access pattern can be specified as a hint that says whether you plan to read or write to the resource (or both). @@ -3202,15 +3209,15 @@ function Texture:setWrap(horizontal, vertical) end --- ---The Shader will use the resource in a read-only fashion. --- ----| '"read"' +---| "read" --- ---The Shader will use the resource in a write-only fashion. --- ----| '"write"' +---| "write" --- ---The resource will be available for reading and writing. --- ----| '"readwrite"' +---| "readwrite" --- ---Different ways to vertically align text when using `lovr.graphics.print`. @@ -3219,15 +3226,15 @@ function Texture:setWrap(horizontal, vertical) end --- ---Align the top of the text to the origin. --- ----| '"top"' +---| "top" --- ---Vertically center the text. --- ----| '"middle"' +---| "middle" --- ---Align the bottom of the text to the origin. --- ----| '"bottom"' +---| "bottom" --- ---Whether the points on triangles are specified in a clockwise or counterclockwise order. @@ -3236,11 +3243,11 @@ function Texture:setWrap(horizontal, vertical) end --- ---Triangle vertices are specified in a clockwise order. --- ----| '"clockwise"' +---| "clockwise" --- ---Triangle vertices are specified in a counterclockwise order. --- ----| '"counterclockwise"' +---| "counterclockwise" --- ---The method used to render textures when texture coordinates are outside of the 0-1 range. @@ -3249,12 +3256,12 @@ function Texture:setWrap(horizontal, vertical) end --- ---The texture will be clamped at its edges. --- ----| '"clamp"' +---| "clamp" --- ---The texture repeats. --- ----| '"repeat"' +---| "repeat" --- ---The texture will repeat, mirroring its appearance each time it repeats. --- ----| '"mirroredrepeat"' +---| "mirroredrepeat" diff --git a/meta/3rd/lovr/library/lovr.headset.lua b/meta/3rd/lovr/library/lovr.headset.lua index 0b70a3ba..419a8180 100644 --- a/meta/3rd/lovr/library/lovr.headset.lua +++ b/meta/3rd/lovr/library/lovr.headset.lua @@ -86,7 +86,7 @@ function lovr.headset.getBoundsDimensions() end --- ---Returns a list of points representing the boundaries of the play area, or `nil` if the current headset driver does not expose this information. --- ----@param t? table # A table to fill with the points. If `nil`, a new table will be created. +---@param t table # A table to fill with the points. If `nil`, a new table will be created. ---@return table points # A flat table of 3D points representing the play area boundaries. function lovr.headset.getBoundsGeometry(t) end @@ -627,95 +627,95 @@ function lovr.headset.wasReleased(device, button) end --- ---The headset. --- ----| '"head"' +---| "head" --- ---The left controller. --- ----| '"hand/left"' +---| "hand/left" --- ---The right controller. --- ----| '"hand/right"' +---| "hand/right" --- ---A shorthand for hand/left. --- ----| '"left"' +---| "left" --- ---A shorthand for hand/right. --- ----| '"right"' +---| "right" --- ---A device tracking the left elbow. --- ----| '"elbow/left"' +---| "elbow/left" --- ---A device tracking the right elbow. --- ----| '"elbow/right"' +---| "elbow/right" --- ---A device tracking the left shoulder. --- ----| '"shoulder/left"' +---| "shoulder/left" --- ---A device tracking the right shoulder. --- ----| '"shoulder/right"' +---| "shoulder/right" --- ---A device tracking the chest. --- ----| '"chest"' +---| "chest" --- ---A device tracking the waist. --- ----| '"waist"' +---| "waist" --- ---A device tracking the left knee. --- ----| '"knee/left"' +---| "knee/left" --- ---A device tracking the right knee. --- ----| '"knee/right"' +---| "knee/right" --- ---A device tracking the left foot or ankle. --- ----| '"foot/left"' +---| "foot/left" --- ---A device tracking the right foot or ankle. --- ----| '"foot/right"' +---| "foot/right" --- ---A camera device, often used for recording "mixed reality" footage. --- ----| '"camera"' +---| "camera" --- ---A tracked keyboard. --- ----| '"keyboard"' +---| "keyboard" --- ---The left eye. --- ----| '"eye/left"' +---| "eye/left" --- ---The right eye. --- ----| '"eye/right"' +---| "eye/right" --- ---The first tracking device (i.e. lighthouse). --- ----| '"beacon/1"' +---| "beacon/1" --- ---The second tracking device (i.e. lighthouse). --- ----| '"beacon/2"' +---| "beacon/2" --- ---The third tracking device (i.e. lighthouse). --- ----| '"beacon/3"' +---| "beacon/3" --- ---The fourth tracking device (i.e. lighthouse). --- ----| '"beacon/4"' +---| "beacon/4" --- ---Axes on an input device. @@ -724,19 +724,19 @@ function lovr.headset.wasReleased(device, button) end --- ---A trigger (1D). --- ----| '"trigger"' +---| "trigger" --- ---A thumbstick (2D). --- ----| '"thumbstick"' +---| "thumbstick" --- ---A touchpad (2D). --- ----| '"touchpad"' +---| "touchpad" --- ---A grip button or grab gesture (1D). --- ----| '"grip"' +---| "grip" --- ---Buttons on an input device. @@ -745,43 +745,43 @@ function lovr.headset.wasReleased(device, button) end --- ---The trigger button. --- ----| '"trigger"' +---| "trigger" --- ---The thumbstick. --- ----| '"thumbstick"' +---| "thumbstick" --- ---The touchpad. --- ----| '"touchpad"' +---| "touchpad" --- ---The grip button. --- ----| '"grip"' +---| "grip" --- ---The menu button. --- ----| '"menu"' +---| "menu" --- ---The A button. --- ----| '"a"' +---| "a" --- ---The B button. --- ----| '"b"' +---| "b" --- ---The X button. --- ----| '"x"' +---| "x" --- ---The Y button. --- ----| '"y"' +---| "y" --- ---The proximity sensor on a headset. --- ----| '"proximity"' +---| "proximity" --- ---These are all of the supported VR APIs that LÖVR can use to power the lovr.headset module. @@ -800,31 +800,31 @@ function lovr.headset.wasReleased(device, button) end --- ---A VR simulator using keyboard/mouse. --- ----| '"desktop"' +---| "desktop" --- ---Oculus Desktop SDK. --- ----| '"oculus"' +---| "oculus" --- ---OpenVR. --- ----| '"openvr"' +---| "openvr" --- ---OpenXR. --- ----| '"openxr"' +---| "openxr" --- ---Oculus Mobile SDK. --- ----| '"vrapi"' +---| "vrapi" --- ---Pico. --- ----| '"pico"' +---| "pico" --- ---WebXR. --- ----| '"webxr"' +---| "webxr" --- ---Represents the different types of origins for coordinate spaces. @@ -837,8 +837,8 @@ function lovr.headset.wasReleased(device, button) end --- ---The origin is at the head. --- ----| '"head"' +---| "head" --- ---The origin is on the floor. --- ----| '"floor"' +---| "floor" diff --git a/meta/3rd/lovr/library/lovr.math.lua b/meta/3rd/lovr/library/lovr.math.lua index 2b3d3059..c53ffac2 100644 --- a/meta/3rd/lovr/library/lovr.math.lua +++ b/meta/3rd/lovr/library/lovr.math.lua @@ -60,8 +60,9 @@ function lovr.math.mat4() end ---@param x number # The x coordinate of the first control point. ---@param y number # The y coordinate of the first control point. ---@param z number # The z coordinate of the first control point. +---@vararg any # Additional control points. ---@return lovr.Curve curve # The new Curve. -function lovr.math.newCurve(x, y, z) end +function lovr.math.newCurve(x, y, z, ...) end --- ---Creates a new 4D matrix. @@ -406,7 +407,7 @@ function Mat4:perspective(near, far, fov, aspect) end --- ---Rotates the matrix using a quaternion or an angle/axis rotation. --- ----@overload fun(self: lovr.Mat4, angle: number, ax: number, ay: number, az: number):lovr.Mat4 +---@overload fun(self: lovr.Mat4, angle: number, ax?: number, ay?: number, az?: number):lovr.Mat4 ---@param q lovr.Quat # The rotation to apply to the matrix. ---@return lovr.Mat4 m # The original matrix. function Mat4:rotate(q) end @@ -414,7 +415,7 @@ function Mat4:rotate(q) end --- ---Scales the matrix. --- ----@overload fun(self: lovr.Mat4, sx: number, sy: number, sz: number):lovr.Mat4 +---@overload fun(self: lovr.Mat4, sx: number, sy?: number, sz?: number):lovr.Mat4 ---@param scale lovr.Vec3 # The 3D scale to apply. ---@return lovr.Mat4 m # The original matrix. function Mat4:scale(scale) end @@ -423,8 +424,8 @@ function Mat4:scale(scale) end ---Sets the components of the matrix from separate position, rotation, and scale arguments or an existing matrix. --- ---@overload fun(self: lovr.Mat4, n: lovr.mat4):lovr.Mat4 ----@overload fun(self: lovr.Mat4, position: lovr.Vec3, scale: lovr.Vec3, rotation: lovr.Quat):lovr.Mat4 ----@overload fun(self: lovr.Mat4, position: lovr.Vec3, rotation: lovr.Quat):lovr.Mat4 +---@overload fun(self: lovr.Mat4, position?: lovr.Vec3, scale?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 +---@overload fun(self: lovr.Mat4, position?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 ---@overload fun(self: lovr.Mat4, ...):lovr.Mat4 ---@overload fun(self: lovr.Mat4, d: number):lovr.Mat4 ---@return lovr.Mat4 m # The input matrix. @@ -652,7 +653,7 @@ local Vec2 = {} --- ---Adds a vector or a number to the vector. --- ----@overload fun(self: lovr.Vec2, x: number, y: number):lovr.Vec2 +---@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector. ---@return lovr.Vec2 v # The original vector. function Vec2:add(u) end @@ -682,7 +683,7 @@ function Vec2:distance(u) end --- ---Divides the vector by a vector or a number. --- ----@overload fun(self: lovr.Vec2, x: number, y: number):lovr.Vec2 +---@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector to divide the components by. ---@return lovr.Vec2 v # The original vector. function Vec2:div(u) end @@ -739,7 +740,7 @@ function Vec2:lerp() end --- ---Multiplies the vector by a vector or a number. --- ----@overload fun(self: lovr.Vec2, x: number, y: number):lovr.Vec2 +---@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector to multiply the components by. ---@return lovr.Vec2 v # The original vector. function Vec2:mul(u) end @@ -762,7 +763,7 @@ function Vec2:set(x, y) end --- ---Subtracts a vector or a number from the vector. --- ----@overload fun(self: lovr.Vec2, x: number, y: number):lovr.Vec2 +---@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector. ---@return lovr.Vec2 v # The original vector. function Vec2:sub(u) end @@ -783,7 +784,7 @@ local Vec3 = {} --- ---Adds a vector or a number to the vector. --- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector. ---@return lovr.Vec3 v # The original vector. function Vec3:add(u) end @@ -827,7 +828,7 @@ function Vec3:distance(u) end --- ---Divides the vector by a vector or a number. --- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector to divide the components by. ---@return lovr.Vec3 v # The original vector. function Vec3:div(u) end @@ -886,7 +887,7 @@ function Vec3:lerp(u, t) end --- ---Multiplies the vector by a vector or a number. --- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector to multiply the components by. ---@return lovr.Vec3 v # The original vector. function Vec3:mul(u) end @@ -911,7 +912,7 @@ function Vec3:set(x, y, z) end --- ---Subtracts a vector or a number from the vector. --- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 +---@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector. ---@return lovr.Vec3 v # The original vector. function Vec3:sub(u) end @@ -933,7 +934,7 @@ local Vec4 = {} --- ---Adds a vector or a number to the vector. --- ----@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):lovr.Vec4 +---@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector. ---@return lovr.Vec4 v # The original vector. function Vec4:add(u) end @@ -963,7 +964,7 @@ function Vec4:distance(u) end --- ---Divides the vector by a vector or a number. --- ----@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):lovr.Vec4 +---@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector to divide the components by. ---@return lovr.Vec4 v # The original vector. function Vec4:div(u) end @@ -1022,7 +1023,7 @@ function Vec4:lerp(u, t) end --- ---Multiplies the vector by a vector or a number. --- ----@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):lovr.Vec4 +---@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector to multiply the components by. ---@return lovr.Vec4 v # The original vector. function Vec4:mul(u) end @@ -1047,7 +1048,7 @@ function Vec4:set(x, y, z, w) end --- ---Subtracts a vector or a number from the vector. --- ----@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):lovr.Vec4 +---@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector. ---@return lovr.Vec4 v # The original vector. function Vec4:sub(u) end diff --git a/meta/3rd/lovr/library/lovr.physics.lua b/meta/3rd/lovr/library/lovr.physics.lua index b2fb22f4..d081d2f4 100644 --- a/meta/3rd/lovr/library/lovr.physics.lua +++ b/meta/3rd/lovr/library/lovr.physics.lua @@ -139,7 +139,7 @@ function lovr.physics.newSphereShape(radius) end ---@param yg? number # The y component of the gravity force. ---@param zg? number # The z component of the gravity force. ---@param allowSleep? boolean # Whether or not colliders will automatically be put to sleep. ----@param tags? table # A list of collision tags colliders can be assigned to. +---@param tags table # A list of collision tags colliders can be assigned to. ---@return lovr.World world # A whole new World. function lovr.physics.newWorld(xg, yg, zg, allowSleep, tags) end @@ -1676,19 +1676,19 @@ function World:update(dt, resolver) end --- ---A BallJoint. --- ----| '"ball"' +---| "ball" --- ---A DistanceJoint. --- ----| '"distance"' +---| "distance" --- ---A HingeJoint. --- ----| '"hinge"' +---| "hinge" --- ---A SliderJoint. --- ----| '"slider"' +---| "slider" --- ---Represents the different types of physics Shapes available. @@ -1697,16 +1697,16 @@ function World:update(dt, resolver) end --- ---A BoxShape. --- ----| '"box"' +---| "box" --- ---A CapsuleShape. --- ----| '"capsule"' +---| "capsule" --- ---A CylinderShape. --- ----| '"cylinder"' +---| "cylinder" --- ---A SphereShape. --- ----| '"sphere"' +---| "sphere" diff --git a/meta/3rd/lovr/library/lovr.system.lua b/meta/3rd/lovr/library/lovr.system.lua index 35161332..b3be6d49 100644 --- a/meta/3rd/lovr/library/lovr.system.lua +++ b/meta/3rd/lovr/library/lovr.system.lua @@ -37,4 +37,4 @@ function lovr.system.requestPermission(permission) end --- ---Requests microphone access. --- ----| '"audiocapture"' +---| "audiocapture" |