summaryrefslogtreecommitdiff
path: root/meta/3rd/love2d/library
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-17 03:20:17 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-12-17 03:20:17 +0800
commitc3b468fd4a6d745c77340eb71c0950d221a6c4ba (patch)
tree90972b8738d6fbfede148f550f29f4b6c9b38b69 /meta/3rd/love2d/library
parent65413a2e6d8a00a28b64b0d1d8dc2e033e3e59b6 (diff)
downloadlua-language-server-c3b468fd4a6d745c77340eb71c0950d221a6c4ba.zip
update submodules
Diffstat (limited to 'meta/3rd/love2d/library')
-rw-r--r--meta/3rd/love2d/library/love.lua46
-rw-r--r--meta/3rd/love2d/library/love/graphics.lua36
-rw-r--r--meta/3rd/love2d/library/love/physics.lua4
3 files changed, 65 insertions, 21 deletions
diff --git a/meta/3rd/love2d/library/love.lua b/meta/3rd/love2d/library/love.lua
index 8c2e3f18..fcdcc98e 100644
--- a/meta/3rd/love2d/library/love.lua
+++ b/meta/3rd/love2d/library/love.lua
@@ -1,13 +1,18 @@
---@meta
-- version: 11.4
-
+---
+---[Open in Browser](https://love2d.org/wiki/love)
+---
---@class love
love = {}
---
---Gets the current running version of LÖVE.
---
+---
+---[Open in Browser](https://love2d.org/wiki/love.getVersion)
+---
---@return number major # The major version of LÖVE, i.e. 0 for version 0.9.1.
---@return number minor # The minor version of LÖVE, i.e. 9 for version 0.9.1.
---@return number revision # The revision version of LÖVE, i.e. 1 for version 0.9.1.
@@ -19,12 +24,18 @@ function love.getVersion() end
---
---When deprecation output is enabled, the first use of a formally deprecated LÖVE API will show a message at the bottom of the screen for a short time, and print the message to the console.
---
+---
+---[Open in Browser](https://love2d.org/wiki/love.hasDeprecationOutput)
+---
---@return boolean enabled # Whether deprecation output is enabled.
function love.hasDeprecationOutput() end
---
---Gets whether the given version is compatible with the current running version of LÖVE.
---
+---
+---[Open in Browser](https://love2d.org/wiki/love.isVersionCompatible)
+---
---@overload fun(major: number, minor: number, revision: number):boolean
---@param version string # The version to check (for example '11.3' or '0.10.2').
---@return boolean compatible # Whether the given version is compatible with the current running version of LÖVE.
@@ -35,18 +46,27 @@ function love.isVersionCompatible(version) end
---
---When deprecation output is enabled, the first use of a formally deprecated LÖVE API will show a message at the bottom of the screen for a short time, and print the message to the console.
---
+---
+---[Open in Browser](https://love2d.org/wiki/love.setDeprecationOutput)
+---
---@param enable boolean # Whether to enable or disable deprecation output.
function love.setDeprecationOutput(enable) end
---
---The superclass of all data.
---
+---
+---[Open in Browser](https://love2d.org/wiki/love)
+---
---@class love.Data: love.Object
local Data = {}
---
---Creates a new copy of the Data object.
---
+---
+---[Open in Browser](https://love2d.org/wiki/Data:clone)
+---
---@return love.Data clone # The new copy.
function Data:clone() end
@@ -55,30 +75,45 @@ function Data:clone() end
---
---This function should be preferred instead of Data:getPointer because the latter uses light userdata which can't store more all possible memory addresses on some new ARM64 architectures, when LuaJIT is used.
---
+---
+---[Open in Browser](https://love2d.org/wiki/Data:getFFIPointer)
+---
---@return ffi.cdata* pointer # A raw void* pointer to the Data, or nil if FFI is unavailable.
function Data:getFFIPointer() end
---
---Gets a pointer to the Data. Can be used with libraries such as LuaJIT's FFI.
---
+---
+---[Open in Browser](https://love2d.org/wiki/Data:getPointer)
+---
---@return lightuserdata pointer # A raw pointer to the Data.
function Data:getPointer() end
---
---Gets the Data's size in bytes.
---
+---
+---[Open in Browser](https://love2d.org/wiki/Data:getSize)
+---
---@return number size # The size of the Data in bytes.
function Data:getSize() end
---
---Gets the full Data as a string.
---
+---
+---[Open in Browser](https://love2d.org/wiki/Data:getString)
+---
---@return string data # The raw data.
function Data:getString() end
---
---The superclass of all LÖVE types.
---
+---
+---[Open in Browser](https://love2d.org/wiki/love)
+---
---@class love.Object
local Object = {}
@@ -87,18 +122,27 @@ local Object = {}
---
---This method can be used to immediately clean up resources without waiting for Lua's garbage collector.
---
+---
+---[Open in Browser](https://love2d.org/wiki/Object:release)
+---
---@return boolean success # True if the object was released by this call, false if it had been previously released.
function Object:release() end
---
---Gets the type of the object as a string.
---
+---
+---[Open in Browser](https://love2d.org/wiki/Object:type)
+---
---@return string type # The type as a string.
function Object:type() end
---
---Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true.
---
+---
+---[Open in Browser](https://love2d.org/wiki/Object:typeOf)
+---
---@param name string # The name of the type to check for.
---@return boolean b # True if the object is of the specified type, false otherwise.
function Object:typeOf(name) end
diff --git a/meta/3rd/love2d/library/love/graphics.lua b/meta/3rd/love2d/library/love/graphics.lua
index bb37237d..b0c991c9 100644
--- a/meta/3rd/love2d/library/love/graphics.lua
+++ b/meta/3rd/love2d/library/love/graphics.lua
@@ -731,13 +731,13 @@ function love.graphics.newFont(filename) end
---
---[Open in Browser](https://love2d.org/wiki/love.graphics.newImage)
---
----@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, settings?: table):love.Image
+---@overload fun(imageData: love.ImageData, settings?: table):love.Image
+---@overload fun(compressedImageData: love.CompressedImageData, settings?: 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:
+---@param settings? {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.
-function love.graphics.newImage(filename, flags) end
+function love.graphics.newImage(filename, settings) end
---
---Creates a new specifically formatted image.
@@ -1074,8 +1074,7 @@ function love.graphics.scale(sx, sy) end
---
---[Open in Browser](https://love2d.org/wiki/love.graphics.setBackgroundColor)
---
----@overload fun()
----@overload fun()
+---@overload fun(rgba: table)
---@param red number # The red component (0-1).
---@param green number # The green component (0-1).
---@param blue number # The blue component (0-1).
@@ -2243,18 +2242,19 @@ function ParticleSystem:setBufferSize(size) end
---
---[Open in Browser](https://love2d.org/wiki/ParticleSystem:setColors)
---
+---@overload fun(self: love.ParticleSystem, rgba1: table, rgba2: table, rgba8: table)
---@param r1 number # First color, red component (0-1).
---@param g1 number # First color, green component (0-1).
---@param b1 number # First color, blue component (0-1).
----@param a1 number # First color, alpha component (0-1).
----@param r2 number # Second color, red component (0-1).
----@param g2 number # Second color, green component (0-1).
----@param b2 number # Second color, blue component (0-1).
----@param a2 number # Second color, alpha component (0-1).
----@param r8 number # Eighth color, red component (0-1).
----@param g8 number # Eighth color, green component (0-1).
----@param b8 number # Eighth color, blue component (0-1).
----@param a8 number # Eighth color, alpha component (0-1).
+---@param a1? number # First color, alpha component (0-1).
+---@param r2? number # Second color, red component (0-1).
+---@param g2? number # Second color, green component (0-1).
+---@param b2? number # Second color, blue component (0-1).
+---@param a2? number # Second color, alpha component (0-1).
+---@param r8? number # Eighth color, red component (0-1).
+---@param g8? number # Eighth color, green component (0-1).
+---@param b8? number # Eighth color, blue component (0-1).
+---@param a8? number # Eighth color, alpha component (0-1).
function ParticleSystem:setColors(r1, g1, b1, a1, r2, g2, b2, a2, r8, g8, b8, a8) end
---
@@ -2420,8 +2420,8 @@ function ParticleSystem:setSizeVariation(variation) end
---[Open in Browser](https://love2d.org/wiki/ParticleSystem:setSizes)
---
---@param size1 number # The first size.
----@param size2 number # The second size.
----@param size8 number # The eighth size.
+---@param size2? number # The second size.
+---@param size8? number # The eighth size.
function ParticleSystem:setSizes(size1, size2, size8) end
---
diff --git a/meta/3rd/love2d/library/love/physics.lua b/meta/3rd/love2d/library/love/physics.lua
index 448d27f7..616e4791 100644
--- a/meta/3rd/love2d/library/love/physics.lua
+++ b/meta/3rd/love2d/library/love/physics.lua
@@ -3145,8 +3145,8 @@ function World:rayCast(fixture, x, y, xn, yn, fraction) end
---
---@param beginContact function # Gets called when two fixtures begin to overlap.
---@param endContact function # Gets called when two fixtures cease to overlap. This will also be called outside of a world update, when colliding objects are destroyed.
----@param preSolve function # Gets called before a collision gets resolved.
----@param postSolve function # Gets called after the collision has been resolved.
+---@param preSolve? function # Gets called before a collision gets resolved.
+---@param postSolve? function # Gets called after the collision has been resolved.
function World:setCallbacks(beginContact, endContact, preSolve, postSolve) end
---