Skip to content

Commit 640fb9c

Browse files
committed
update love-api
1 parent e63ccd8 commit 640fb9c

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

meta/3rd/love2d/library/love/graphics.lua

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -566,13 +566,13 @@ function love.graphics.newFont(filename) end
566566
---
567567
---Creates a new Image from a filepath, FileData, an ImageData, or a CompressedImageData, and optionally generates or specifies mipmaps for the image.
568568
---
569-
---@overload fun(fileData: love.FileData, flags?: table):love.Image
570-
---@overload fun(imageData: love.ImageData, flags?: table):love.Image
571-
---@overload fun(compressedImageData: love.CompressedImageData, flags?: table):love.Image
569+
---@overload fun(fileData: love.FileData, settings?: table):love.Image
570+
---@overload fun(imageData: love.ImageData, settings?: table):love.Image
571+
---@overload fun(compressedImageData: love.CompressedImageData, settings?: table):love.Image
572572
---@param filename string # The filepath to the image file.
573-
---@param flags? {dpiscale: number, linear: boolean, mipmaps: boolean} # A table containing the following fields:
573+
---@param settings? {dpiscale: number, linear: boolean, mipmaps: boolean} # A table containing the following fields:
574574
---@return love.Image image # A new Image object which can be drawn on screen.
575-
function love.graphics.newImage(filename, flags) end
575+
function love.graphics.newImage(filename, settings) end
576576

577577
---
578578
---Creates a new specifically formatted image.
@@ -840,8 +840,7 @@ function love.graphics.scale(sx, sy) end
840840
---
841841
---Sets the background color.
842842
---
843-
---@overload fun()
844-
---@overload fun()
843+
---@overload fun(rgba: table)
845844
---@param red number # The red component (0-1).
846845
---@param green number # The green component (0-1).
847846
---@param blue number # The blue component (0-1).
@@ -1694,18 +1693,19 @@ function ParticleSystem:setBufferSize(size) end
16941693
---
16951694
---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
16961695
---
1696+
---@overload fun(self: love.ParticleSystem, rgba1: table, rgba2: table, rgba8: table)
16971697
---@param r1 number # First color, red component (0-1).
16981698
---@param g1 number # First color, green component (0-1).
16991699
---@param b1 number # First color, blue component (0-1).
1700-
---@param a1 number # First color, alpha component (0-1).
1701-
---@param r2 number # Second color, red component (0-1).
1702-
---@param g2 number # Second color, green component (0-1).
1703-
---@param b2 number # Second color, blue component (0-1).
1704-
---@param a2 number # Second color, alpha component (0-1).
1705-
---@param r8 number # Eighth color, red component (0-1).
1706-
---@param g8 number # Eighth color, green component (0-1).
1707-
---@param b8 number # Eighth color, blue component (0-1).
1708-
---@param a8 number # Eighth color, alpha component (0-1).
1700+
---@param a1? number # First color, alpha component (0-1).
1701+
---@param r2? number # Second color, red component (0-1).
1702+
---@param g2? number # Second color, green component (0-1).
1703+
---@param b2? number # Second color, blue component (0-1).
1704+
---@param a2? number # Second color, alpha component (0-1).
1705+
---@param r8? number # Eighth color, red component (0-1).
1706+
---@param g8? number # Eighth color, green component (0-1).
1707+
---@param b8? number # Eighth color, blue component (0-1).
1708+
---@param a8? number # Eighth color, alpha component (0-1).
17091709
function ParticleSystem:setColors(r1, g1, b1, a1, r2, g2, b2, a2, r8, g8, b8, a8) end
17101710

17111711
---
@@ -1823,8 +1823,8 @@ function ParticleSystem:setSizeVariation(variation) end
18231823
---At least one size must be specified. A maximum of eight may be used.
18241824
---
18251825
---@param size1 number # The first size.
1826-
---@param size2 number # The second size.
1827-
---@param size8 number # The eighth size.
1826+
---@param size2? number # The second size.
1827+
---@param size8? number # The eighth size.
18281828
function ParticleSystem:setSizes(size1, size2, size8) end
18291829

18301830
---

meta/3rd/love2d/library/love/physics.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,8 +2278,8 @@ function World:rayCast(fixture, x, y, xn, yn, fraction) end
22782278
---
22792279
---@param beginContact function # Gets called when two fixtures begin to overlap.
22802280
---@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.
2281-
---@param preSolve function # Gets called before a collision gets resolved.
2282-
---@param postSolve function # Gets called after the collision has been resolved.
2281+
---@param preSolve? function # Gets called before a collision gets resolved.
2282+
---@param postSolve? function # Gets called after the collision has been resolved.
22832283
function World:setCallbacks(beginContact, endContact, preSolve, postSolve) end
22842284

22852285
---

0 commit comments

Comments
 (0)