summaryrefslogtreecommitdiff
path: root/meta/3rd/lovr
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-05-11 17:45:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-05-11 17:45:18 +0800
commite069d28762467969596a66ace8b5cde34427c8a0 (patch)
treea882fdbe4a918e1ae075f148dadcf08addaa76f4 /meta/3rd/lovr
parent669073e384f22c9bae84fa38ffb75fe046a11491 (diff)
downloadlua-language-server-e069d28762467969596a66ace8b5cde34427c8a0.zip
update submodules
Diffstat (limited to 'meta/3rd/lovr')
-rw-r--r--meta/3rd/lovr/library/lovr.audio.lua10
-rw-r--r--meta/3rd/lovr/library/lovr.data.lua10
-rw-r--r--meta/3rd/lovr/library/lovr.graphics.lua7
-rw-r--r--meta/3rd/lovr/library/lovr.headset.lua8
-rw-r--r--meta/3rd/lovr/library/lovr.math.lua50
-rw-r--r--meta/3rd/lovr/library/lovr.physics.lua24
6 files changed, 106 insertions, 3 deletions
diff --git a/meta/3rd/lovr/library/lovr.audio.lua b/meta/3rd/lovr/library/lovr.audio.lua
index 71717874..baac445b 100644
--- a/meta/3rd/lovr/library/lovr.audio.lua
+++ b/meta/3rd/lovr/library/lovr.audio.lua
@@ -73,6 +73,14 @@ function lovr.audio.getPose() end
function lovr.audio.getPosition() end
---
+---Returns the sample rate used by the playback device.
+---
+---This can be changed using `lovr.conf`.
+---
+---@return number rate # The sample rate of the playback device, in Hz.
+function lovr.audio.getSampleRate() end
+
+---
---Returns the name of the active spatializer (`simple`, `oculus`, or `phonon`).
---
---The `t.audio.spatializer` setting in `lovr.conf` can be used to express a preference for a particular spatializer.
@@ -103,7 +111,7 @@ function lovr.audio.getPosition() end
--- <td>Effect: Attenuation</td>
--- <td>x</td>
--- <td>x</td>
---- <td></td>
+--- <td>x</td>
--- </tr>
--- <tr>
--- <td>Effect: Absorption</td>
diff --git a/meta/3rd/lovr/library/lovr.data.lua b/meta/3rd/lovr/library/lovr.data.lua
index a699a2f3..04276439 100644
--- a/meta/3rd/lovr/library/lovr.data.lua
+++ b/meta/3rd/lovr/library/lovr.data.lua
@@ -415,6 +415,16 @@ local Sound = {}
function Sound:getBlob() end
---
+---Returns the number of frames that can be written to the Sound.
+---
+---For stream sounds, this is the number of frames that can be written without overwriting existing data.
+---
+---For normal sounds, this returns the same value as `Sound:getFrameCount`.
+---
+---@return number capacity # The number of frames that can be written to the Sound.
+function Sound:getCapacity() end
+
+---
---Returns the number of channels in the Sound.
---
---Mono sounds have 1 channel, stereo sounds have 2 channels, and ambisonic sounds have 4 channels.
diff --git a/meta/3rd/lovr/library/lovr.graphics.lua b/meta/3rd/lovr/library/lovr.graphics.lua
index fe0b6c33..42a859a5 100644
--- a/meta/3rd/lovr/library/lovr.graphics.lua
+++ b/meta/3rd/lovr/library/lovr.graphics.lua
@@ -1578,6 +1578,7 @@ function Font:getRasterizer() end
---@param wrap? number # The width at which to wrap lines, or 0 for no wrap.
---@return number width # The maximum width of any line in the text.
---@return number lines # The number of lines in the wrapped text.
+---@return number lastwidth # The width of the last line of text (to assist in text layout).
function Font:getWidth(text, wrap) end
---
@@ -1702,6 +1703,10 @@ function Material:setScalar(scalarType, x) end
---
---Any texture that is `nil` will use a single white pixel as a fallback.
---
+---
+---### NOTE:
+---Textures must have a `TextureType` of `2d` to be used with Materials.
+---
---@overload fun(self: lovr.Material, texture: lovr.Texture)
---@param textureType? lovr.MaterialTexture # The type of texture to set.
---@param texture lovr.Texture # The texture to apply, or `nil` to use the default.
@@ -2528,7 +2533,7 @@ function ShaderBlock:read(name) end
---
---`Blob`s can also be used to pass arbitrary binary data to individual variables.
---
----@overload fun(self: lovr.ShaderBlock, blob: lovr.Blob, offset: number, extent: number):number
+---@overload fun(self: lovr.ShaderBlock, blob: lovr.Blob, srcOffset: number, dstOffset: number, extent: number):number
---@param variable string # The name of the variable to update.
---@param value any # The new value of the uniform.
function ShaderBlock:send(variable, value) end
diff --git a/meta/3rd/lovr/library/lovr.headset.lua b/meta/3rd/lovr/library/lovr.headset.lua
index 218b70b9..0b70a3ba 100644
--- a/meta/3rd/lovr/library/lovr.headset.lua
+++ b/meta/3rd/lovr/library/lovr.headset.lua
@@ -56,6 +56,8 @@ function lovr.headset.getAngularVelocity(device) end
---### NOTE:
---The axis values will be between 0 and 1 for 1D axes, and between -1 and 1 for each component of a multidimensional axis.
---
+---When hand tracking is active, pinch strength will be mapped to the `trigger` axis.
+---
---@param device lovr.Device # The device.
---@param axis lovr.DeviceAxis # The axis.
function lovr.headset.getAxis(device, axis) end
@@ -491,6 +493,10 @@ function lovr.headset.getViewPose(view) end
---
---Returns whether a button on a device is pressed.
---
+---
+---### NOTE:
+---When hand tracking is active, pinching will be mapped to the `trigger` button.
+---
---@param device lovr.Device # The device.
---@param button lovr.DeviceButton # The button.
---@return boolean down # Whether the button on the device is currently pressed, or `nil` if the device does not have the specified button.
@@ -679,7 +685,7 @@ function lovr.headset.wasReleased(device, button) end
---
---| '"foot/right"'
---
----A device used as a camera in the scene.
+---A camera device, often used for recording "mixed reality" footage.
---
---| '"camera"'
---
diff --git a/meta/3rd/lovr/library/lovr.math.lua b/meta/3rd/lovr/library/lovr.math.lua
index 3ce62dd9..2b3d3059 100644
--- a/meta/3rd/lovr/library/lovr.math.lua
+++ b/meta/3rd/lovr/library/lovr.math.lua
@@ -315,6 +315,13 @@ function Curve:slice(t1, t2) end
local Mat4 = {}
---
+---Returns whether a matrix is approximately equal to another matrix.
+---
+---@param n lovr.Mat4 # The other matrix.
+---@return boolean equal # Whether the 2 matrices approximately equal each other.
+function Mat4:equals(n) end
+
+---
---Sets a projection matrix using raw projection angles and clipping planes.
---
---This can be used for asymmetric or oblique projections.
@@ -479,6 +486,13 @@ function Quat:conjugate() end
function Quat:direction() end
---
+---Returns whether a quaternion is approximately equal to another quaternion.
+---
+---@param r lovr.Quat # The other quaternion.
+---@return boolean equal # Whether the 2 quaternions approximately equal each other.
+function Quat:equals(r) end
+
+---
---Returns the length of the quaternion.
---
---@return number length # The length of the quaternion.
@@ -690,6 +704,18 @@ function Vec2:div(u) end
function Vec2:dot(u) end
---
+---Returns whether a vector is approximately equal to another vector.
+---
+---
+---### NOTE:
+---To handle floating point precision issues, this function returns true as long as the squared distance between the vectors is below `1e-10`.
+---
+---@overload fun(self: lovr.Vec2, x: number, y: number):boolean
+---@param u lovr.Vec2 # The other vector.
+---@return boolean equal # Whether the 2 vectors approximately equal each other.
+function Vec2:equals(u) end
+
+---
---Returns the length of the vector.
---
---
@@ -823,6 +849,18 @@ function Vec3:div(u) end
function Vec3:dot(u) end
---
+---Returns whether a vector is approximately equal to another vector.
+---
+---
+---### NOTE:
+---To handle floating point precision issues, this function returns true as long as the squared distance between the vectors is below `1e-10`.
+---
+---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):boolean
+---@param u lovr.Vec3 # The other vector.
+---@return boolean equal # Whether the 2 vectors approximately equal each other.
+function Vec3:equals(u) end
+
+---
---Returns the length of the vector.
---
---
@@ -947,6 +985,18 @@ function Vec4:div(u) end
function Vec4:dot(u) end
---
+---Returns whether a vector is approximately equal to another vector.
+---
+---
+---### NOTE:
+---To handle floating point precision issues, this function returns true as long as the squared distance between the vectors is below `1e-10`.
+---
+---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):boolean
+---@param u lovr.Vec4 # The other vector.
+---@return boolean equal # Whether the 2 vectors approximately equal each other.
+function Vec4:equals(u) end
+
+---
---Returns the length of the vector.
---
---
diff --git a/meta/3rd/lovr/library/lovr.physics.lua b/meta/3rd/lovr/library/lovr.physics.lua
index fa65009b..b2fb22f4 100644
--- a/meta/3rd/lovr/library/lovr.physics.lua
+++ b/meta/3rd/lovr/library/lovr.physics.lua
@@ -1397,6 +1397,18 @@ function World:getLinearDamping() end
function World:getResponseTime() end
---
+---Returns the step count of the World.
+---
+---The step count influences how many steps are taken during a call to `World:update`.
+---
+---A higher number of steps will be slower, but more accurate.
+---
+---The default step count is 20.
+---
+---@param steps number # The step count.
+function World:getStepCount(steps) end
+
+---
---Returns the tightness of the joint.
---
---See `World:setTightness` for how this affects the joint.
@@ -1604,6 +1616,18 @@ function World:setResponseTime(responseTime) end
function World:setSleepingAllowed(allowed) end
---
+---Sets the step count of the World.
+---
+---The step count influences how many steps are taken during a call to `World:update`.
+---
+---A higher number of steps will be slower, but more accurate.
+---
+---The default step count is 20.
+---
+---@param steps number # The new step count.
+function World:setStepCount(steps) end
+
+---
---Sets the tightness of joints in the World.
---
---The tightness controls how much force is applied to colliders connected by joints.