From e069d28762467969596a66ace8b5cde34427c8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 11 May 2022 17:45:18 +0800 Subject: update submodules --- 3rd/EmmyLuaCodeStyle | 2 +- 3rd/bee.lua | 2 +- 3rd/love-api | 2 +- 3rd/lovr-api | 2 +- 3rd/luamake | 2 +- meta/3rd/love2d/library/love.image.lua | 6 ++++ meta/3rd/love2d/library/love.physics.lua | 32 ++++++++++++++++++++ meta/3rd/love2d/library/love.sound.lua | 12 ++++++++ meta/3rd/love2d/library/love.video.lua | 39 +++++++++++++++++++++++++ meta/3rd/lovr/library/lovr.audio.lua | 10 ++++++- meta/3rd/lovr/library/lovr.data.lua | 10 +++++++ meta/3rd/lovr/library/lovr.graphics.lua | 7 ++++- meta/3rd/lovr/library/lovr.headset.lua | 8 ++++- meta/3rd/lovr/library/lovr.math.lua | 50 ++++++++++++++++++++++++++++++++ meta/3rd/lovr/library/lovr.physics.lua | 24 +++++++++++++++ 15 files changed, 200 insertions(+), 8 deletions(-) diff --git a/3rd/EmmyLuaCodeStyle b/3rd/EmmyLuaCodeStyle index 8a7079dc..a92e5ca8 160000 --- a/3rd/EmmyLuaCodeStyle +++ b/3rd/EmmyLuaCodeStyle @@ -1 +1 @@ -Subproject commit 8a7079dc9bfb50f62deda7c61a988767ea45d5b7 +Subproject commit a92e5ca884c7bb4c31eb1ee1577201676c9c732d diff --git a/3rd/bee.lua b/3rd/bee.lua index e5d2778e..16721a21 160000 --- a/3rd/bee.lua +++ b/3rd/bee.lua @@ -1 +1 @@ -Subproject commit e5d2778ecf9181058f1d107a06487850a6d59cec +Subproject commit 16721a21c2cddf46ffd99daac55d158e83078081 diff --git a/3rd/love-api b/3rd/love-api index 75e55c1f..69e7e015 160000 --- a/3rd/love-api +++ b/3rd/love-api @@ -1 +1 @@ -Subproject commit 75e55c1f6550344c48daaa6d1bb0d1bc133108b1 +Subproject commit 69e7e015698c0834798a0b9ffeb3a98786b60f1d diff --git a/3rd/lovr-api b/3rd/lovr-api index f2054691..910ede83 160000 --- a/3rd/lovr-api +++ b/3rd/lovr-api @@ -1 +1 @@ -Subproject commit f20546911d416d825294d39fce9446dd9522e0f5 +Subproject commit 910ede83e8834fcc2ee38f03d7eab6b7733a29c6 diff --git a/3rd/luamake b/3rd/luamake index 09624551..528c017c 160000 --- a/3rd/luamake +++ b/3rd/luamake @@ -1 +1 @@ -Subproject commit 096245513b530f57b0b5cfd3c9d21fd0f06ecd67 +Subproject commit 528c017c65c6b5c6c71c3c4bde9325defb8205e5 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 @@ -185,6 +185,12 @@ function ImageData:paste(source, dx, dy, sx, sy, sw, sh) end ---@param a number # The alpha component (0-1). 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. --- 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 @@ -965,6 +965,14 @@ function CircleShape:setRadius(radius) end ---@class love.Contact: love.Object 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. --- @@ -1656,6 +1664,12 @@ function PrismaticJoint:getMotorForce(invdt) end ---@return number s # The motor speed, usually in meters per second. function PrismaticJoint:getMotorSpeed() end +--- +---Gets the reference angle. +--- +---@return number angle # The reference angle in radians. +function PrismaticJoint:getReferenceAngle() end + --- ---Gets the upper limit. --- @@ -1835,6 +1849,12 @@ function RevoluteJoint:getMotorSpeed() end ---@return number f # The current motor force, in Nm. function RevoluteJoint:getMotorTorque() end +--- +---Gets the reference angle. +--- +---@return number angle # The reference angle in radians. +function RevoluteJoint:getReferenceAngle() end + --- ---Gets the upper limit. --- @@ -2021,6 +2041,12 @@ function WeldJoint:getDampingRatio() end ---@return number freq # The frequency in hertz. 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. --- @@ -2089,6 +2115,12 @@ function WheelJoint:getSpringDampingRatio() end ---@return number freq # The frequency in hertz. 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. --- 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 @@ -41,6 +41,12 @@ local Decoder = {} ---@return love.Decoder decoder # New copy of the 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. --- @@ -65,6 +71,12 @@ function Decoder:getDuration() end ---@return number rate # Number of samples per second. 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. --- 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 @@ -72,6 +72,14 @@ function lovr.audio.getPose() end ---@return number z # The z position of the listener. 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`). --- @@ -103,7 +111,7 @@ function lovr.audio.getPosition() end --- Effect: Attenuation --- x --- x ---- +--- x --- --- --- Effect: Absorption 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 @@ -414,6 +414,16 @@ local Sound = {} ---@return lovr.Blob blob # The Blob instance containing the bytes for the `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. --- 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 @@ -314,6 +314,13 @@ function Curve:slice(t1, t2) end ---@class lovr.Mat4 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. --- @@ -478,6 +485,13 @@ function Quat:conjugate() end ---@return lovr.Vec3 v # The direction vector. 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. --- @@ -689,6 +703,18 @@ function Vec2:div(u) end ---@return number dot # The dot product between `v` and `u`. 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. --- @@ -822,6 +848,18 @@ function Vec3:div(u) end ---@return number dot # The dot product between `v` and `u`. 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. --- @@ -946,6 +984,18 @@ function Vec4:div(u) end ---@return number dot # The dot product between `v` and `u`. 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 @@ -1396,6 +1396,18 @@ function World:getLinearDamping() end ---@return number responseTime # The response time setting for the World. 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. --- @@ -1603,6 +1615,18 @@ function World:setResponseTime(responseTime) end ---@param allowed boolean # Whether colliders can sleep. 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. --- -- cgit v1.2.3