diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-11-01 13:32:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-11-01 13:32:02 +0800 |
commit | 640fb9c3ec3164042d15fffecd88667a22d99f6f (patch) | |
tree | b755885b3d001bd82eea0779d3bd50e5ae6df57b | |
parent | e63ccd8fec249fdcade372f1c664733dacdc131e (diff) | |
download | lua-language-server-640fb9c3ec3164042d15fffecd88667a22d99f6f.zip |
update love-api
m--------- | 3rd/love-api | 0 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love/graphics.lua | 36 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love/physics.lua | 4 |
3 files changed, 20 insertions, 20 deletions
diff --git a/3rd/love-api b/3rd/love-api -Subproject 69e7e015698c0834798a0b9ffeb3a98786b60f1 +Subproject f43dfa4ccf5e4918b26602dc421fe7e100aab3a diff --git a/meta/3rd/love2d/library/love/graphics.lua b/meta/3rd/love2d/library/love/graphics.lua index d6adf2e4..335f94f8 100644 --- a/meta/3rd/love2d/library/love/graphics.lua +++ b/meta/3rd/love2d/library/love/graphics.lua @@ -566,13 +566,13 @@ 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, 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. @@ -840,8 +840,7 @@ function love.graphics.scale(sx, sy) end --- ---Sets the background color. --- ----@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). @@ -1694,18 +1693,19 @@ function ParticleSystem:setBufferSize(size) end --- ---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. --- +---@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 --- @@ -1823,8 +1823,8 @@ function ParticleSystem:setSizeVariation(variation) end ---At least one size must be specified. A maximum of eight may be used. --- ---@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 93cb67e4..9ee6a44f 100644 --- a/meta/3rd/love2d/library/love/physics.lua +++ b/meta/3rd/love2d/library/love/physics.lua @@ -2278,8 +2278,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 --- |