Skip to content

Commit 12245cf

Browse files
committed
update docs
1 parent 2a03771 commit 12245cf

File tree

5 files changed

+32
-5
lines changed

5 files changed

+32
-5
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,13 @@ function love.filesystem.mount(archive, mountpoint, appendToPath) end
186186
function love.filesystem.newFile(filename) end
187187

188188
---
189-
---Creates a new FileData object.
189+
---Creates a new FileData object from a file on disk, or from a string in memory.
190190
---
191+
---@overload fun(originaldata: love.Data, name: string):love.FileData
191192
---@overload fun(filepath: string):love.FileData, string
192-
---@param contents string # The contents of the file.
193-
---@param name string # The name of the file.
194-
---@return love.FileData data # Your new FileData.
193+
---@param contents string # The contents of the file in memory represented as a string.
194+
---@param name string # The name of the file. The extension may be parsed and used by LÖVE when passing the FileData object into love.audio.newSource.
195+
---@return love.FileData data # The new FileData.
195196
function love.filesystem.newFileData(contents, name) end
196197

197198
---

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,17 @@ function Font:getFilter() end
11711171
---@return number height # The height of the Font in pixels.
11721172
function Font:getHeight() end
11731173

1174+
---
1175+
---Gets the kerning between two characters in the Font.
1176+
---
1177+
---Kerning is normally handled automatically in love.graphics.print, Text objects, Font:getWidth, Font:getWrap, etc. This function is useful when stitching text together manually.
1178+
---
1179+
---@overload fun(leftglyph: number, rightglyph: number):number
1180+
---@param leftchar string # The left character.
1181+
---@param rightchar string # The right character.
1182+
---@return number kerning # The kerning amount to add to the spacing between the two characters. May be negative.
1183+
function Font:getKerning(leftchar, rightchar) end
1184+
11741185
---
11751186
---Gets the line height.
11761187
---
@@ -1945,6 +1956,7 @@ function Shader:hasUniform(name) end
19451956
---@overload fun(name: string, matrixlayout: love.MatrixLayout, matrix: table, ...)
19461957
---@overload fun(name: string, data: love.Data, offset: number, size: number)
19471958
---@overload fun(name: string, data: love.Data, matrixlayout: love.MatrixLayout, offset: number, size: number)
1959+
---@overload fun(name: string, matrixlayout: love.MatrixLayout, data: love.Data, offset: number, size: number)
19481960
---@param name string # Name of the number to send to the shader.
19491961
---@param number number # Number to send to store in the uniform variable.
19501962
function Shader:send(name, number) end

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---@meta
22

3-
-- version: 11.3
3+
-- version: 11.4
44
---@class love
55
love = {}
66

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,19 @@ function Body:getLocalCenter() end
492492
---@return number localY # The y position in local coordinates.
493493
function Body:getLocalPoint(worldX, worldY) end
494494

495+
---
496+
---Transforms multiple points from world coordinates to local coordinates.
497+
---
498+
---@param x1 number # (Argument) The x position of the first point.
499+
---@param y1 number # (Argument) The y position of the first point.
500+
---@param x2 number # (Argument) The x position of the second point.
501+
---@param y2 number # (Argument) The y position of the second point.
502+
---@return number x1 # (Result) The transformed x position of the first point.
503+
---@return number y1 # (Result) The transformed y position of the first point.
504+
---@return number x2 # (Result) The transformed x position of the second point.
505+
---@return number y2 # (Result) The transformed y position of the second point.
506+
function Body:getLocalPoints(x1, y1, x2, y2) end
507+
495508
---
496509
---Transform a vector from world coordinates to local coordinates.
497510
---

meta/3rd/lovr/library/lovr.math.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ function Vec4:sub(u) end
784784
---@return number x # The x value.
785785
---@return number y # The y value.
786786
---@return number z # The z value.
787+
---@return number w # The w value.
787788
function Vec4:unpack() end
788789

789790
---

0 commit comments

Comments
 (0)