diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-05-11 17:45:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-05-11 17:45:18 +0800 |
commit | e069d28762467969596a66ace8b5cde34427c8a0 (patch) | |
tree | a882fdbe4a918e1ae075f148dadcf08addaa76f4 /meta/3rd | |
parent | 669073e384f22c9bae84fa38ffb75fe046a11491 (diff) | |
download | lua-language-server-e069d28762467969596a66ace8b5cde34427c8a0.zip |
update submodules
Diffstat (limited to 'meta/3rd')
-rw-r--r-- | meta/3rd/love2d/library/love.image.lua | 6 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.physics.lua | 32 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.sound.lua | 12 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.video.lua | 39 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.audio.lua | 10 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.data.lua | 10 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.graphics.lua | 7 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.headset.lua | 8 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.math.lua | 50 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.physics.lua | 24 |
10 files changed, 195 insertions, 3 deletions
diff --git a/meta/3rd/love2d/library/love.image.lua b/meta/3rd/love2d/library/love.image.lua index 5db859ae..19d6f825 100644 --- a/meta/3rd/love2d/library/love.image.lua +++ b/meta/3rd/love2d/library/love.image.lua @@ -186,6 +186,12 @@ function ImageData:paste(source, dx, dy, sx, sy, sw, sh) end function ImageData:setPixel(x, y, r, g, b, a) end --- +---Gets the pixel format of the ImageData. +--- +---@return love.PixelFormat format # The pixel format the ImageData was created with. +function ImageData:getFormat() end + +--- ---Compressed image data formats. Here and here are a couple overviews of many of the formats. --- ---Unlike traditional PNG or jpeg, these formats stay compressed in RAM and in the graphics card's VRAM. This is good for saving memory space as well as improving performance, since the graphics card will be able to keep more of the image's pixels in its fast-access cache when drawing it. diff --git a/meta/3rd/love2d/library/love.physics.lua b/meta/3rd/love2d/library/love.physics.lua index c0b80ff2..e0300c06 100644 --- a/meta/3rd/love2d/library/love.physics.lua +++ b/meta/3rd/love2d/library/love.physics.lua @@ -966,6 +966,14 @@ function CircleShape:setRadius(radius) end local Contact = {} --- +---Gets the child indices of the shapes of the two colliding fixtures. For ChainShapes, an index of 1 is the first edge in the chain. +---Used together with Fixture:rayCast or ChainShape:getChildEdge. +--- +---@return number indexA # The child index of the first fixture's shape. +---@return number indexB # The child index of the second fixture's shape. +function Contact:getChildren() end + +--- ---Gets the two Fixtures that hold the shapes that are in contact. --- ---@return love.Fixture fixtureA # The first Fixture. @@ -1657,6 +1665,12 @@ function PrismaticJoint:getMotorForce(invdt) end function PrismaticJoint:getMotorSpeed() end --- +---Gets the reference angle. +--- +---@return number angle # The reference angle in radians. +function PrismaticJoint:getReferenceAngle() end + +--- ---Gets the upper limit. --- ---@return number upper # The upper limit, usually in meters. @@ -1836,6 +1850,12 @@ function RevoluteJoint:getMotorSpeed() end function RevoluteJoint:getMotorTorque() end --- +---Gets the reference angle. +--- +---@return number angle # The reference angle in radians. +function RevoluteJoint:getReferenceAngle() end + +--- ---Gets the upper limit. --- ---@return number upper # The upper limit, in radians. @@ -2022,6 +2042,12 @@ function WeldJoint:getDampingRatio() end function WeldJoint:getFrequency() end --- +---Gets the reference angle. +--- +---@return number angle # The reference angle in radians. +function WeldJoint:getReferenceAngle() end + +--- ---Sets a new damping ratio. --- ---@param ratio number # The new damping ratio. @@ -2090,6 +2116,12 @@ function WheelJoint:getSpringDampingRatio() end function WheelJoint:getSpringFrequency() end --- +---Checks if the joint motor is running. +--- +---@return boolean on # The status of the joint motor. +function WheelJoint:isMotorEnabled() end + +--- ---Sets a new maximum motor torque. --- ---@param maxTorque number # The new maximum torque for the joint motor in newton meters. diff --git a/meta/3rd/love2d/library/love.sound.lua b/meta/3rd/love2d/library/love.sound.lua index 5c7a89e1..536336aa 100644 --- a/meta/3rd/love2d/library/love.sound.lua +++ b/meta/3rd/love2d/library/love.sound.lua @@ -42,6 +42,12 @@ local Decoder = {} function Decoder:clone() end --- +---Decodes the audio and returns a SoundData object containing the decoded audio data. +--- +---@return love.SoundData soundData # Decoded audio data. +function Decoder:decode() end + +--- ---Returns the number of bits per sample. --- ---@return number bitDepth # Either 8, or 16. @@ -66,6 +72,12 @@ function Decoder:getDuration() end function Decoder:getSampleRate() end --- +---Sets the currently playing position of the Decoder. +--- +---@param offset number # The position to seek to, in seconds. +function Decoder:seek(offset) end + +--- ---Contains raw audio samples. --- ---You can not play SoundData back directly. You must wrap a Source object around it. diff --git a/meta/3rd/love2d/library/love.video.lua b/meta/3rd/love2d/library/love.video.lua index 501101fa..2a93dd22 100644 --- a/meta/3rd/love2d/library/love.video.lua +++ b/meta/3rd/love2d/library/love.video.lua @@ -21,3 +21,42 @@ function love.video.newVideoStream(filename) end --- ---@class love.VideoStream: love.Object local VideoStream = {} + +--- +---Gets the filename of the VideoStream. +--- +---@return string filename # The filename of the VideoStream +function VideoStream:getFilename() end + +--- +---Gets whether the VideoStream is playing. +--- +---@return boolean playing # Whether the VideoStream is playing. +function VideoStream:isPlaying() end + +--- +---Pauses the VideoStream. +--- +function VideoStream:pause() end + +--- +---Plays the VideoStream. +--- +function VideoStream:play() end + +--- +---Rewinds the VideoStream. Synonym to VideoStream:seek(0). +--- +function VideoStream:rewind() end + +--- +---Sets the current playback position of the VideoStream. +--- +---@param offset number # The time in seconds since the beginning of the VideoStream. +function VideoStream:seek(offset) end + +--- +---Gets the current playback position of the VideoStream. +--- +---@return number seconds # The number of seconds sionce the beginning of the VideoStream. +function VideoStream:tell() end 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. |