summaryrefslogtreecommitdiff
path: root/meta/3rd
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2022-02-08 11:55:55 +0800
committersumneko <sumneko@hotmail.com>2022-02-08 11:55:55 +0800
commit12245cffd05136e0fb5da059df72a015a1bdb949 (patch)
tree115daf7a7ab68bf529090d2e7d60e22ffd9086d6 /meta/3rd
parent2a037712774572eeb7898ea4e838f08a5c4da2b2 (diff)
downloadlua-language-server-12245cffd05136e0fb5da059df72a015a1bdb949.zip
update docs
Diffstat (limited to 'meta/3rd')
-rw-r--r--meta/3rd/love2d/library/love.filesystem.lua9
-rw-r--r--meta/3rd/love2d/library/love.graphics.lua12
-rw-r--r--meta/3rd/love2d/library/love.lua2
-rw-r--r--meta/3rd/love2d/library/love.physics.lua13
-rw-r--r--meta/3rd/lovr/library/lovr.math.lua1
5 files changed, 32 insertions, 5 deletions
diff --git a/meta/3rd/love2d/library/love.filesystem.lua b/meta/3rd/love2d/library/love.filesystem.lua
index 5865b6bc..5925539a 100644
--- a/meta/3rd/love2d/library/love.filesystem.lua
+++ b/meta/3rd/love2d/library/love.filesystem.lua
@@ -186,12 +186,13 @@ function love.filesystem.mount(archive, mountpoint, appendToPath) end
function love.filesystem.newFile(filename) end
---
----Creates a new FileData object.
+---Creates a new FileData object from a file on disk, or from a string in memory.
---
+---@overload fun(originaldata: love.Data, name: string):love.FileData
---@overload fun(filepath: string):love.FileData, string
----@param contents string # The contents of the file.
----@param name string # The name of the file.
----@return love.FileData data # Your new FileData.
+---@param contents string # The contents of the file in memory represented as a string.
+---@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.
+---@return love.FileData data # The new FileData.
function love.filesystem.newFileData(contents, name) end
---
diff --git a/meta/3rd/love2d/library/love.graphics.lua b/meta/3rd/love2d/library/love.graphics.lua
index 72ef027a..5498c480 100644
--- a/meta/3rd/love2d/library/love.graphics.lua
+++ b/meta/3rd/love2d/library/love.graphics.lua
@@ -1172,6 +1172,17 @@ function Font:getFilter() end
function Font:getHeight() end
---
+---Gets the kerning between two characters in the Font.
+---
+---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.
+---
+---@overload fun(leftglyph: number, rightglyph: number):number
+---@param leftchar string # The left character.
+---@param rightchar string # The right character.
+---@return number kerning # The kerning amount to add to the spacing between the two characters. May be negative.
+function Font:getKerning(leftchar, rightchar) end
+
+---
---Gets the line height.
---
---This will be the value previously set by Font:setLineHeight, or 1.0 by default.
@@ -1945,6 +1956,7 @@ function Shader:hasUniform(name) end
---@overload fun(name: string, matrixlayout: love.MatrixLayout, matrix: table, ...)
---@overload fun(name: string, data: love.Data, offset: number, size: number)
---@overload fun(name: string, data: love.Data, matrixlayout: love.MatrixLayout, offset: number, size: number)
+---@overload fun(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.
function Shader:send(name, number) end
diff --git a/meta/3rd/love2d/library/love.lua b/meta/3rd/love2d/library/love.lua
index c5897608..c1c55c69 100644
--- a/meta/3rd/love2d/library/love.lua
+++ b/meta/3rd/love2d/library/love.lua
@@ -1,6 +1,6 @@
---@meta
--- version: 11.3
+-- version: 11.4
---@class love
love = {}
diff --git a/meta/3rd/love2d/library/love.physics.lua b/meta/3rd/love2d/library/love.physics.lua
index 3b5b1c8a..dd1876f5 100644
--- a/meta/3rd/love2d/library/love.physics.lua
+++ b/meta/3rd/love2d/library/love.physics.lua
@@ -493,6 +493,19 @@ function Body:getLocalCenter() end
function Body:getLocalPoint(worldX, worldY) end
---
+---Transforms multiple points from world coordinates to local coordinates.
+---
+---@param x1 number # (Argument) The x position of the first point.
+---@param y1 number # (Argument) The y position of the first point.
+---@param x2 number # (Argument) The x position of the second point.
+---@param y2 number # (Argument) The y position of the second point.
+---@return number x1 # (Result) The transformed x position of the first point.
+---@return number y1 # (Result) The transformed y position of the first point.
+---@return number x2 # (Result) The transformed x position of the second point.
+---@return number y2 # (Result) The transformed y position of the second point.
+function Body:getLocalPoints(x1, y1, x2, y2) end
+
+---
---Transform a vector from world coordinates to local coordinates.
---
---@param worldX number # The vector x component in world coordinates.
diff --git a/meta/3rd/lovr/library/lovr.math.lua b/meta/3rd/lovr/library/lovr.math.lua
index 2a2139e8..a5660ec4 100644
--- a/meta/3rd/lovr/library/lovr.math.lua
+++ b/meta/3rd/lovr/library/lovr.math.lua
@@ -784,6 +784,7 @@ function Vec4:sub(u) end
---@return number x # The x value.
---@return number y # The y value.
---@return number z # The z value.
+---@return number w # The w value.
function Vec4:unpack() end
---