diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-01-12 14:52:30 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-01-12 14:52:30 +0800 |
commit | 62025440534df25cdfb3766f8b59536cedc707e6 (patch) | |
tree | 45849ac97269e11a8609711e34074513e5580af4 /meta/3rd/lovr/library | |
parent | 6b3a0d0bb780b4eab4dbec77f3bb4d394aa5527f (diff) | |
download | lua-language-server-62025440534df25cdfb3766f8b59536cedc707e6.zip |
fix #902
Diffstat (limited to 'meta/3rd/lovr/library')
-rw-r--r-- | meta/3rd/lovr/library/lovr.audio.lua | 62 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.data.lua | 14 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.event.lua | 172 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.graphics.lua | 260 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.headset.lua | 102 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.physics.lua | 20 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.system.lua | 4 |
7 files changed, 317 insertions, 317 deletions
diff --git a/meta/3rd/lovr/library/lovr.audio.lua b/meta/3rd/lovr/library/lovr.audio.lua index d8b1bd9d..a768b708 100644 --- a/meta/3rd/lovr/library/lovr.audio.lua +++ b/meta/3rd/lovr/library/lovr.audio.lua @@ -385,111 +385,111 @@ function Source:tell(unit) end --- ---Different types of audio material presets, for use with `lovr.audio.setGeometry`. --- ----@class lovr.AudioMaterial +---@alias lovr.AudioMaterial --- ---Generic default audio material. --- ----@field generic integer +---| '"generic"' --- ---Brick. --- ----@field brick integer +---| '"brick"' --- ---Carpet. --- ----@field carpet integer +---| '"carpet"' --- ---Ceramic. --- ----@field ceramic integer +---| '"ceramic"' --- ---Concrete. --- ----@field concrete integer ----@field glass integer ----@field gravel integer ----@field metal integer ----@field plaster integer ----@field rock integer ----@field wood integer +---| '"concrete"' +---| '"glass"' +---| '"gravel"' +---| '"metal"' +---| '"plaster"' +---| '"rock"' +---| '"wood"' --- ---Audio devices can be created in shared mode or exclusive mode. In exclusive mode, the audio device is the only one active on the system, which gives better performance and lower latency. However, exclusive devices aren't always supported and might not be allowed, so there is a higher chance that creating one will fail. --- ----@class lovr.AudioShareMode +---@alias lovr.AudioShareMode --- ---Shared mode. --- ----@field shared integer +---| '"shared"' --- ---Exclusive mode. --- ----@field exclusive integer +---| '"exclusive"' --- ---When referencing audio devices, this indicates whether it's the playback or capture device. --- ----@class lovr.AudioType +---@alias lovr.AudioType --- ---The playback device (speakers, headphones). --- ----@field playback integer +---| '"playback"' --- ---The capture device (microphone). --- ----@field capture integer +---| '"capture"' --- ---Different types of effects that can be applied with `Source:setEffectEnabled`. --- ----@class lovr.Effect +---@alias lovr.Effect --- ---Models absorption as sound travels through the air, water, etc. --- ----@field absorption integer +---| '"absorption"' --- ---Decreases audio volume with distance (1 / max(distance, 1)). --- ----@field falloff integer +---| '"falloff"' --- ---Causes audio to drop off when the Source is occluded by geometry. --- ----@field occlusion integer +---| '"occlusion"' --- ---Models reverb caused by audio bouncing off of geometry. --- ----@field reverb integer +---| '"reverb"' --- ---Spatializes the Source using either simple panning or an HRTF. --- ----@field spatialization integer +---| '"spatialization"' --- ---Causes audio to be heard through walls when occluded, based on audio materials. --- ----@field transmission integer +---| '"transmission"' --- ---When figuring out how long a Source is or seeking to a specific position in the sound file, units can be expressed in terms of seconds or in terms of frames. A frame is one set of samples for each channel (one sample for mono, two samples for stereo). --- ----@class lovr.TimeUnit +---@alias lovr.TimeUnit --- ---Seconds. --- ----@field seconds integer +---| '"seconds"' --- ---Frames. --- ----@field frames integer +---| '"frames"' --- ---When accessing the volume of Sources or the audio listener, this can be done in linear units with a 0 to 1 range, or in decibels with a range of -∞ to 0. --- ----@class lovr.VolumeUnit +---@alias lovr.VolumeUnit --- ---Linear volume range. --- ----@field linear integer +---| '"linear"' --- ---Decibels. --- ----@field db integer +---| '"db"' diff --git a/meta/3rd/lovr/library/lovr.data.lua b/meta/3rd/lovr/library/lovr.data.lua index f43cbf94..aca66f8f 100644 --- a/meta/3rd/lovr/library/lovr.data.lua +++ b/meta/3rd/lovr/library/lovr.data.lua @@ -359,29 +359,29 @@ function Sound:setFrames(t, count, dstOffset, srcOffset) end --- ---Sounds can have different numbers of channels, and those channels can map to various speaker layouts. --- ----@class lovr.ChannelLayout +---@alias lovr.ChannelLayout --- ---1 channel. --- ----@field mono integer +---| '"mono"' --- ---2 channels. The first channel is for the left speaker and the second is for the right. --- ----@field stereo integer +---| '"stereo"' --- ---4 channels. Ambisonic channels don't map directly to speakers but instead represent directions in 3D space, sort of like the images of a skybox. Currently, ambisonic sounds can only be loaded, not played. --- ----@field ambisonic integer +---| '"ambisonic"' --- ---Sounds can store audio samples as 16 bit integers or 32 bit floats. --- ----@class lovr.SampleFormat +---@alias lovr.SampleFormat --- ---32 bit floating point samples (between -1.0 and 1.0). --- ----@field f32 integer +---| '"f32"' --- ---16 bit integer samples (between -32768 and 32767). --- ----@field i16 integer +---| '"i16"' diff --git a/meta/3rd/lovr/library/lovr.event.lua b/meta/3rd/lovr/library/lovr.event.lua index 416d955f..5beeb5a1 100644 --- a/meta/3rd/lovr/library/lovr.event.lua +++ b/meta/3rd/lovr/library/lovr.event.lua @@ -44,344 +44,344 @@ function lovr.event.restart() end --- ---Keys that can be pressed on a keyboard. Notably, numpad keys are missing right now. --- ----@class lovr.KeyCode +---@alias lovr.KeyCode --- ---The A key. --- ----@field a integer +---| '"a"' --- ---The B key. --- ----@field b integer +---| '"b"' --- ---The C key. --- ----@field c integer +---| '"c"' --- ---The D key. --- ----@field d integer +---| '"d"' --- ---The E key. --- ----@field e integer +---| '"e"' --- ---The F key. --- ----@field f integer +---| '"f"' --- ---The G key. --- ----@field g integer +---| '"g"' --- ---The H key. --- ----@field h integer +---| '"h"' --- ---The I key. --- ----@field i integer +---| '"i"' --- ---The J key. --- ----@field j integer +---| '"j"' --- ---The K key. --- ----@field k integer +---| '"k"' --- ---The L key. --- ----@field l integer +---| '"l"' --- ---The M key. --- ----@field m integer +---| '"m"' --- ---The N key. --- ----@field n integer +---| '"n"' --- ---The O key. --- ----@field o integer +---| '"o"' --- ---The P key. --- ----@field p integer +---| '"p"' --- ---The Q key. --- ----@field q integer +---| '"q"' --- ---The R key. --- ----@field r integer +---| '"r"' --- ---The S key. --- ----@field s integer +---| '"s"' --- ---The T key. --- ----@field t integer +---| '"t"' --- ---The U key. --- ----@field u integer +---| '"u"' --- ---The V key. --- ----@field v integer +---| '"v"' --- ---The W key. --- ----@field w integer +---| '"w"' --- ---The X key. --- ----@field x integer +---| '"x"' --- ---The Y key. --- ----@field y integer +---| '"y"' --- ---The Z key. --- ----@field z integer +---| '"z"' --- ---The 0 key. --- ----@field ["0"] integer +---| '"0"' --- ---The 1 key. --- ----@field ["1"] integer +---| '"1"' --- ---The 2 key. --- ----@field ["2"] integer +---| '"2"' --- ---The 3 key. --- ----@field ["3"] integer +---| '"3"' --- ---The 4 key. --- ----@field ["4"] integer +---| '"4"' --- ---The 5 key. --- ----@field ["5"] integer +---| '"5"' --- ---The 6 key. --- ----@field ["6"] integer +---| '"6"' --- ---The 7 key. --- ----@field ["7"] integer +---| '"7"' --- ---The 8 key. --- ----@field ["8"] integer +---| '"8"' --- ---The 9 key. --- ----@field ["9"] integer +---| '"9"' --- ---The space bar. --- ----@field space integer +---| '"space"' --- ---The enter key. --- ----@field return integer +---| '"return"' --- ---The tab key. --- ----@field tab integer +---| '"tab"' --- ---The escape key. --- ----@field escape integer +---| '"escape"' --- ---The backspace key. --- ----@field backspace integer +---| '"backspace"' --- ---The up arrow key. --- ----@field up integer +---| '"up"' --- ---The down arrow key. --- ----@field down integer +---| '"down"' --- ---The left arrow key. --- ----@field left integer +---| '"left"' --- ---The right arrow key. --- ----@field right integer +---| '"right"' --- ---The home key. --- ----@field home integer +---| '"home"' --- ---The end key. --- ----@field end integer +---| '"end"' --- ---The page up key. --- ----@field pageup integer +---| '"pageup"' --- ---The page down key. --- ----@field pagedown integer +---| '"pagedown"' --- ---The insert key. --- ----@field insert integer +---| '"insert"' --- ---The delete key. --- ----@field delete integer +---| '"delete"' --- ---The F1 key. --- ----@field f1 integer +---| '"f1"' --- ---The F2 key. --- ----@field f2 integer +---| '"f2"' --- ---The F3 key. --- ----@field f3 integer +---| '"f3"' --- ---The F4 key. --- ----@field f4 integer +---| '"f4"' --- ---The F5 key. --- ----@field f5 integer +---| '"f5"' --- ---The F6 key. --- ----@field f6 integer +---| '"f6"' --- ---The F7 key. --- ----@field f7 integer +---| '"f7"' --- ---The F8 key. --- ----@field f8 integer +---| '"f8"' --- ---The F9 key. --- ----@field f9 integer +---| '"f9"' --- ---The F10 key. --- ----@field f10 integer +---| '"f10"' --- ---The F11 key. --- ----@field f11 integer +---| '"f11"' --- ---The F12 key. --- ----@field f12 integer +---| '"f12"' --- ---The backtick/backquote/grave accent key. --- ----@field ["`"] integer +---| '"`"' --- ---The dash/hyphen/minus key. --- ----@field ["-"] integer +---| '"-"' --- ---The equal sign key. --- ----@field ["="] integer +---| '"="' --- ---The left bracket key. --- ----@field ["["] integer +---| '"["' --- ---The right bracket key. --- ----@field ["]"] integer +---| '"]"' --- ---The backslash key. --- ----@field ["\\"] integer +---| '"\\"' --- ---The semicolon key. --- ----@field [";"] integer +---| '";"' --- ---The single quote key. --- ----@field ["'"] integer +---| '"\'"' --- ---The comma key. --- ----@field [","] integer +---| '","' --- ---The period key. --- ----@field ["."] integer +---| '"."' --- ---The slash key. --- ----@field ["/"] integer +---| '"/"' --- ---The left control key. --- ----@field lctrl integer +---| '"lctrl"' --- ---The left shift key. --- ----@field lshift integer +---| '"lshift"' --- ---The left alt key. --- ----@field lalt integer +---| '"lalt"' --- ---The left OS key (windows, command, super). --- ----@field lgui integer +---| '"lgui"' --- ---The right control key. --- ----@field rctrl integer +---| '"rctrl"' --- ---The right shift key. --- ----@field rshift integer +---| '"rshift"' --- ---The right alt key. --- ----@field ralt integer +---| '"ralt"' --- ---The right OS key (windows, command, super). --- ----@field rgui integer +---| '"rgui"' --- ---The caps lock key. --- ----@field capslock integer +---| '"capslock"' --- ---The scroll lock key. --- ----@field scrolllock integer +---| '"scrolllock"' --- ---The numlock key. --- ----@field numlock integer +---| '"numlock"' diff --git a/meta/3rd/lovr/library/lovr.graphics.lua b/meta/3rd/lovr/library/lovr.graphics.lua index ef6ffc46..61cf4d5f 100644 --- a/meta/3rd/lovr/library/lovr.graphics.lua +++ b/meta/3rd/lovr/library/lovr.graphics.lua @@ -1511,98 +1511,98 @@ function Texture:setWrap(horizontal, vertical) end --- ---Different ways arcs can be drawn with `lovr.graphics.arc`. --- ----@class lovr.ArcMode +---@alias lovr.ArcMode --- ---The arc is drawn with the center of its circle included in the list of points (default). --- ----@field pie integer +---| '"pie"' --- ---The curve of the arc is drawn as a single line. --- ----@field open integer +---| '"open"' --- ---The starting and ending points of the arc's curve are connected. --- ----@field closed integer +---| '"closed"' --- ---Here are the different data types available for vertex attributes in a Mesh. The ones that have a smaller range take up less memory, which improves performance a bit. The "u" stands for "unsigned", which means it can't hold negative values but instead has a larger positive range. --- ----@class lovr.AttributeType +---@alias lovr.AttributeType --- ---A signed 8 bit number, from -128 to 127. --- ----@field byte integer +---| '"byte"' --- ---An unsigned 8 bit number, from 0 to 255. --- ----@field ubyte integer +---| '"ubyte"' --- ---A signed 16 bit number, from -32768 to 32767. --- ----@field short integer +---| '"short"' --- ---An unsigned 16 bit number, from 0 to 65535. --- ----@field ushort integer +---| '"ushort"' --- ---A signed 32 bit number, from -2147483648 to 2147483647. --- ----@field int integer +---| '"int"' --- ---An unsigned 32 bit number, from 0 to 4294967295. --- ----@field uint integer +---| '"uint"' --- ---A 32 bit floating-point number (large range, but can start to lose precision). --- ----@field float integer +---| '"float"' --- ---Different ways the alpha channel of pixels affects blending. --- ----@class lovr.BlendAlphaMode +---@alias lovr.BlendAlphaMode --- ---Color channel values are multiplied by the alpha channel during blending. --- ----@field alphamultiply integer +---| '"alphamultiply"' --- ---Color channels are not multiplied by the alpha channel. This should be used if the pixels being drawn have already been blended, or "pre-multiplied", by the alpha channel. --- ----@field premultiplied integer +---| '"premultiplied"' --- ---Blend modes control how overlapping pixels are blended together, similar to layers in Photoshop. --- ----@class lovr.BlendMode +---@alias lovr.BlendMode --- ---Normal blending where the alpha value controls how the colors are blended. --- ----@field alpha integer +---| '"alpha"' --- ---The incoming pixel color is added to the destination pixel color. --- ----@field add integer +---| '"add"' --- ---The incoming pixel color is subtracted from the destination pixel color. --- ----@field subtract integer +---| '"subtract"' --- ---The color channels from the two pixel values are multiplied together to produce a result. --- ----@field multiply integer +---| '"multiply"' --- ---The maximum value from each color channel is used, resulting in a lightening effect. --- ----@field lighten integer +---| '"lighten"' --- ---The minimum value from each color channel is used, resulting in a darkening effect. --- ----@field darken integer +---| '"darken"' --- ---The opposite of multiply: The pixel values are inverted, multiplied, and inverted again, resulting in a lightening effect. --- ----@field screen integer +---| '"screen"' --- ---There are two types of ShaderBlocks that can be used: `uniform` and `compute`. @@ -1611,448 +1611,448 @@ function Texture:setWrap(horizontal, vertical) end --- ---Compute blocks can be written to by compute shaders, might be slightly slower than uniform blocks, and have a much, much larger maximum size. --- ----@class lovr.BlockType +---@alias lovr.BlockType --- ---A uniform block. --- ----@field uniform integer +---| '"uniform"' --- ---A compute block. --- ----@field compute integer +---| '"compute"' --- ---This acts as a hint to the graphics driver about what kinds of data access should be optimized for. --- ----@class lovr.BufferUsage +---@alias lovr.BufferUsage --- ---A buffer that you intend to create once and never modify. --- ----@field static integer +---| '"static"' --- ---A buffer which is modified occasionally. --- ----@field dynamic integer +---| '"dynamic"' --- ---A buffer which is entirely replaced on the order of every frame. --- ----@field stream integer +---| '"stream"' --- ---The method used to compare z values when deciding how to overlap rendered objects. This is called the "depth test", and it happens on a pixel-by-pixel basis every time new objects are drawn. If the depth test "passes" for a pixel, then the pixel color will be replaced by the new color and the depth value in the depth buffer will be updated. Otherwise, the pixel will not be changed and the depth value will not be updated. --- ----@class lovr.CompareMode +---@alias lovr.CompareMode --- ---The depth test passes when the depth values are equal. --- ----@field equal integer +---| '"equal"' --- ---The depth test passes when the depth values are not equal. --- ----@field notequal integer +---| '"notequal"' --- ---The depth test passes when the new depth value is less than the existing one. --- ----@field less integer +---| '"less"' --- ---The depth test passes when the new depth value is less than or equal to the existing one. --- ----@field lequal integer +---| '"lequal"' --- ---The depth test passes when the new depth value is greater than or equal to the existing one. --- ----@field gequal integer +---| '"gequal"' --- ---The depth test passes when the new depth value is greater than the existing one. --- ----@field greater integer +---| '"greater"' --- ---Different coordinate spaces for nodes in a Model. --- ----@class lovr.CoordinateSpace +---@alias lovr.CoordinateSpace --- ---The coordinate space relative to the node's parent. --- ----@field local integer +---| '"local"' --- ---The coordinate space relative to the root node of the Model. --- ----@field global integer +---| '"global"' --- ---The following shaders are built in to LÖVR, and can be used as an argument to `lovr.graphics.newShader` instead of providing raw GLSL shader code. The shaders can be further customized by using the `flags` argument. If you pass in `nil` to `lovr.graphics.setShader`, LÖVR will automatically pick a DefaultShader to use based on whatever is being drawn. --- ----@class lovr.DefaultShader +---@alias lovr.DefaultShader --- ---A simple shader without lighting, using only colors and a diffuse texture. --- ----@field unlit integer +---| '"unlit"' --- ---A physically-based rendering (PBR) shader, using advanced material properties. --- ----@field standard integer +---| '"standard"' --- ---A shader that renders a cubemap texture. --- ----@field cube integer +---| '"cube"' --- ---A shader that renders a 2D equirectangular texture with spherical coordinates. --- ----@field pano integer +---| '"pano"' --- ---A shader that renders font glyphs. --- ----@field font integer +---| '"font"' --- ---A shader that passes its vertex coordinates unmodified to the fragment shader, used to render view-independent fixed geometry like fullscreen quads. --- ----@field fill integer +---| '"fill"' --- ---Meshes are lists of arbitrary vertices. These vertices can be connected in different ways, leading to different shapes like lines and triangles. --- ----@class lovr.DrawMode +---@alias lovr.DrawMode --- ---Draw each vertex as a single point. --- ----@field points integer +---| '"points"' --- ---The vertices represent a list of line segments. Each pair of vertices will have a line drawn between them. --- ----@field lines integer +---| '"lines"' --- ---The first two vertices have a line drawn between them, and each vertex after that will be connected to the previous vertex with a line. --- ----@field linestrip integer +---| '"linestrip"' --- ---Similar to linestrip, except the last vertex is connected back to the first. --- ----@field lineloop integer +---| '"lineloop"' --- ---The first three vertices define a triangle. Each vertex after that creates a triangle using the new vertex and last two vertices. --- ----@field strip integer +---| '"strip"' --- ---Each set of three vertices represents a discrete triangle. --- ----@field triangles integer +---| '"triangles"' --- ---Draws a set of triangles. Each one shares the first vertex as a common point, leading to a fan-like shape. --- ----@field fan integer +---| '"fan"' --- ---Most graphics primitives can be drawn in one of two modes: a filled mode and a wireframe mode. --- ----@class lovr.DrawStyle +---@alias lovr.DrawStyle --- ---The shape is drawn as a filled object. --- ----@field fill integer +---| '"fill"' --- ---The shape is drawn as a wireframe object. --- ----@field line integer +---| '"line"' --- ---The method used to downsample (or upsample) a texture. "nearest" can be used for a pixelated effect, whereas "linear" leads to more smooth results. Nearest is slightly faster than linear. --- ----@class lovr.FilterMode +---@alias lovr.FilterMode --- ---Fast nearest-neighbor sampling. Leads to a pixelated style. --- ----@field nearest integer +---| '"nearest"' --- ---Smooth pixel sampling. --- ----@field bilinear integer +---| '"bilinear"' --- ---Smooth pixel sampling, with smooth sampling across mipmap levels. --- ----@field trilinear integer +---| '"trilinear"' --- ---Different ways to horizontally align text when using `lovr.graphics.print`. --- ----@class lovr.HorizontalAlign +---@alias lovr.HorizontalAlign --- ---Left aligned lines of text. --- ----@field left integer +---| '"left"' --- ---Centered aligned lines of text. --- ----@field center integer +---| '"center"' --- ---Right aligned lines of text. --- ----@field right integer +---| '"right"' --- ---The different types of color parameters `Material`s can hold. --- ----@class lovr.MaterialColor +---@alias lovr.MaterialColor --- ---The diffuse color. --- ----@field diffuse integer +---| '"diffuse"' --- ---The emissive color. --- ----@field emissive integer +---| '"emissive"' --- ---The different types of float parameters `Material`s can hold. --- ----@class lovr.MaterialScalar +---@alias lovr.MaterialScalar --- ---The constant metalness factor. --- ----@field metalness integer +---| '"metalness"' --- ---The constant roughness factor. --- ----@field roughness integer +---| '"roughness"' --- ---The different types of texture parameters `Material`s can hold. --- ----@class lovr.MaterialTexture +---@alias lovr.MaterialTexture --- ---The diffuse texture. --- ----@field diffuse integer +---| '"diffuse"' --- ---The emissive texture. --- ----@field emissive integer +---| '"emissive"' --- ---The metalness texture. --- ----@field metalness integer +---| '"metalness"' --- ---The roughness texture. --- ----@field roughness integer +---| '"roughness"' --- ---The ambient occlusion texture. --- ----@field occlusion integer +---| '"occlusion"' --- ---The normal map. --- ----@field normal integer +---| '"normal"' --- ---The environment map, should be specified as a cubemap texture. --- ----@field environment integer +---| '"environment"' --- ---Meshes can have a usage hint, describing how they are planning on being updated. Setting the usage hint allows the graphics driver optimize how it handles the data in the Mesh. --- ----@class lovr.MeshUsage +---@alias lovr.MeshUsage --- ---The Mesh contents will rarely change. --- ----@field static integer +---| '"static"' --- ---The Mesh contents will change often. --- ----@field dynamic integer +---| '"dynamic"' --- ---The Mesh contents will change constantly, potentially multiple times each frame. --- ----@field stream integer +---| '"stream"' --- ---Shaders can be used for either rendering operations or generic compute tasks. Graphics shaders are created with `lovr.graphics.newShader` and compute shaders are created with `lovr.graphics.newComputeShader`. `Shader:getType` can be used on an existing Shader to figure out what type it is. --- ----@class lovr.ShaderType +---@alias lovr.ShaderType --- ---A graphics shader. --- ----@field graphics integer +---| '"graphics"' --- ---A compute shader. --- ----@field compute integer +---| '"compute"' --- ---How to modify pixels in the stencil buffer when using `lovr.graphics.stencil`. --- ----@class lovr.StencilAction +---@alias lovr.StencilAction --- ---Stencil values will be replaced with a custom value. --- ----@field replace integer +---| '"replace"' --- ---Stencil values will increment every time they are rendered to. --- ----@field increment integer +---| '"increment"' --- ---Stencil values will decrement every time they are rendered to. --- ----@field decrement integer +---| '"decrement"' --- ---Similar to `increment`, but the stencil value will be set to 0 if it exceeds 255. --- ----@field incrementwrap integer +---| '"incrementwrap"' --- ---Similar to `decrement`, but the stencil value will be set to 255 if it drops below 0. --- ----@field decrementwrap integer +---| '"decrementwrap"' --- ---Stencil values will be bitwise inverted every time they are rendered to. --- ----@field invert integer +---| '"invert"' --- ---Textures can store their pixels in different formats. The set of color channels and the number of bits stored for each channel can differ, allowing Textures to optimize their storage for certain kinds of image formats or rendering techniques. --- ----@class lovr.TextureFormat +---@alias lovr.TextureFormat --- ---Each pixel is 24 bits, or 8 bits for each channel. --- ----@field rgb integer +---| '"rgb"' --- ---Each pixel is 32 bits, or 8 bits for each channel (including alpha). --- ----@field rgba integer +---| '"rgba"' --- ---An rgba format where the colors occupy 4 bits instead of the usual 8. --- ----@field rgba4 integer +---| '"rgba4"' --- ---Each pixel is 64 bits. Each channel is a 16 bit floating point number. --- ----@field rgba16f integer +---| '"rgba16f"' --- ---Each pixel is 128 bits. Each channel is a 32 bit floating point number. --- ----@field rgba32f integer +---| '"rgba32f"' --- ---A 16-bit floating point format with a single color channel. --- ----@field r16f integer +---| '"r16f"' --- ---A 32-bit floating point format with a single color channel. --- ----@field r32f integer +---| '"r32f"' --- ---A 16-bit floating point format with two color channels. --- ----@field rg16f integer +---| '"rg16f"' --- ---A 32-bit floating point format with two color channels. --- ----@field rg32f integer +---| '"rg32f"' --- ---A 16 bit format with 5-bit color channels and a single alpha bit. --- ----@field rgb5a1 integer +---| '"rgb5a1"' --- ---A 32 bit format with 10-bit color channels and two alpha bits. --- ----@field rgb10a2 integer +---| '"rgb10a2"' --- ---Each pixel is 32 bits, and packs three color channels into 10 or 11 bits each. --- ----@field rg11b10f integer +---| '"rg11b10f"' --- ---A 16 bit depth buffer. --- ----@field d16 integer +---| '"d16"' --- ---A 32 bit floating point depth buffer. --- ----@field d32f integer +---| '"d32f"' --- ---A depth buffer with 24 bits for depth and 8 bits for stencil. --- ----@field d24s8 integer +---| '"d24s8"' --- ---Different types of Textures. --- ----@class lovr.TextureType +---@alias lovr.TextureType --- ---A 2D texture. --- ----@field ["2d"] integer +---| '"2d"' --- ---A 2D array texture with multiple independent 2D layers. --- ----@field array integer +---| '"array"' --- ---A cubemap texture with 6 2D faces. --- ----@field cube integer +---| '"cube"' --- ---A 3D volumetric texture consisting of multiple 2D layers. --- ----@field volume integer +---| '"volume"' --- ---When binding writable resources to shaders using `Shader:sendBlock` and `Shader:sendImage`, an access pattern can be specified as a hint that says whether you plan to read or write to the resource (or both). Sometimes, LÖVR or the GPU driver can use this hint to get better performance or avoid stalling. --- ----@class lovr.UniformAccess +---@alias lovr.UniformAccess --- ---The Shader will use the resource in a read-only fashion. --- ----@field read integer +---| '"read"' --- ---The Shader will use the resource in a write-only fashion. --- ----@field write integer +---| '"write"' --- ---The resource will be available for reading and writing. --- ----@field readwrite integer +---| '"readwrite"' --- ---Different ways to vertically align text when using `lovr.graphics.print`. --- ----@class lovr.VerticalAlign +---@alias lovr.VerticalAlign --- ---Align the top of the text to the origin. --- ----@field top integer +---| '"top"' --- ---Vertically center the text. --- ----@field middle integer +---| '"middle"' --- ---Align the bottom of the text to the origin. --- ----@field bottom integer +---| '"bottom"' --- ---Whether the points on triangles are specified in a clockwise or counterclockwise order. --- ----@class lovr.Winding +---@alias lovr.Winding --- ---Triangle vertices are specified in a clockwise order. --- ----@field clockwise integer +---| '"clockwise"' --- ---Triangle vertices are specified in a counterclockwise order. --- ----@field counterclockwise integer +---| '"counterclockwise"' --- ---The method used to render textures when texture coordinates are outside of the 0-1 range. --- ----@class lovr.WrapMode +---@alias lovr.WrapMode --- ---The texture will be clamped at its edges. --- ----@field clamp integer +---| '"clamp"' --- ---The texture repeats. --- ----@field repeat integer +---| '"repeat"' --- ---The texture will repeat, mirroring its appearance each time it repeats. --- ----@field mirroredrepeat integer +---| '"mirroredrepeat"' diff --git a/meta/3rd/lovr/library/lovr.headset.lua b/meta/3rd/lovr/library/lovr.headset.lua index c33226fc..e45d3009 100644 --- a/meta/3rd/lovr/library/lovr.headset.lua +++ b/meta/3rd/lovr/library/lovr.headset.lua @@ -302,210 +302,210 @@ function lovr.headset.wasReleased(device, button) end --- ---Different types of input devices supported by the `lovr.headset` module. --- ----@class lovr.Device +---@alias lovr.Device --- ---The headset. --- ----@field head integer +---| '"head"' --- ---The left controller. --- ----@field ["hand/left"] integer +---| '"hand/left"' --- ---The right controller. --- ----@field ["hand/right"] integer +---| '"hand/right"' --- ---A shorthand for hand/left. --- ----@field left integer +---| '"left"' --- ---A shorthand for hand/right. --- ----@field right integer +---| '"right"' --- ---A device tracking the left elbow. --- ----@field ["elbow/left"] integer +---| '"elbow/left"' --- ---A device tracking the right elbow. --- ----@field ["elbow/right"] integer +---| '"elbow/right"' --- ---A device tracking the left shoulder. --- ----@field ["shoulder/left"] integer +---| '"shoulder/left"' --- ---A device tracking the right shoulder. --- ----@field ["shoulder/right"] integer +---| '"shoulder/right"' --- ---A device tracking the chest. --- ----@field chest integer +---| '"chest"' --- ---A device tracking the waist. --- ----@field waist integer +---| '"waist"' --- ---A device tracking the left knee. --- ----@field ["knee/left"] integer +---| '"knee/left"' --- ---A device tracking the right knee. --- ----@field ["knee/right"] integer +---| '"knee/right"' --- ---A device tracking the left foot or ankle. --- ----@field ["foot/left"] integer +---| '"foot/left"' --- ---A device tracking the right foot or ankle. --- ----@field ["foot/right"] integer +---| '"foot/right"' --- ---A device used as a camera in the scene. --- ----@field camera integer +---| '"camera"' --- ---A tracked keyboard. --- ----@field keyboard integer +---| '"keyboard"' --- ---The left eye. --- ----@field ["eye/left"] integer +---| '"eye/left"' --- ---The right eye. --- ----@field ["eye/right"] integer +---| '"eye/right"' --- ---The first tracking device (i.e. lighthouse). --- ----@field ["beacon/1"] integer +---| '"beacon/1"' --- ---The second tracking device (i.e. lighthouse). --- ----@field ["beacon/2"] integer +---| '"beacon/2"' --- ---The third tracking device (i.e. lighthouse). --- ----@field ["beacon/3"] integer +---| '"beacon/3"' --- ---The fourth tracking device (i.e. lighthouse). --- ----@field ["beacon/4"] integer +---| '"beacon/4"' --- ---Axes on an input device. --- ----@class lovr.DeviceAxis +---@alias lovr.DeviceAxis --- ---A trigger (1D). --- ----@field trigger integer +---| '"trigger"' --- ---A thumbstick (2D). --- ----@field thumbstick integer +---| '"thumbstick"' --- ---A touchpad (2D). --- ----@field touchpad integer +---| '"touchpad"' --- ---A grip button or grab gesture (1D). --- ----@field grip integer +---| '"grip"' --- ---Buttons on an input device. --- ----@class lovr.DeviceButton +---@alias lovr.DeviceButton --- ---The trigger button. --- ----@field trigger integer +---| '"trigger"' --- ---The thumbstick. --- ----@field thumbstick integer +---| '"thumbstick"' --- ---The touchpad. --- ----@field touchpad integer +---| '"touchpad"' --- ---The grip button. --- ----@field grip integer +---| '"grip"' --- ---The menu button. --- ----@field menu integer +---| '"menu"' --- ---The A button. --- ----@field a integer +---| '"a"' --- ---The B button. --- ----@field b integer +---| '"b"' --- ---The X button. --- ----@field x integer +---| '"x"' --- ---The Y button. --- ----@field y integer +---| '"y"' --- ---The proximity sensor on a headset. --- ----@field proximity integer +---| '"proximity"' --- ---These are all of the supported VR APIs that LÖVR can use to power the lovr.headset module. You can change the order of headset drivers using `lovr.conf` to prefer or exclude specific VR APIs. --- ---At startup, LÖVR searches through the list of drivers in order. One headset driver will be used for rendering to the VR display, and all supported headset drivers will be used for device input. The way this works is that when poses or button input is requested, the input drivers are queried (in the order they appear in `conf.lua`) to see if any of them currently have data for the specified device. The first one that returns data will be used to provide the result. This allows projects to support multiple types of hardware devices. --- ----@class lovr.HeadsetDriver +---@alias lovr.HeadsetDriver --- ---A VR simulator using keyboard/mouse. --- ----@field desktop integer +---| '"desktop"' --- ---Oculus Desktop SDK. --- ----@field oculus integer +---| '"oculus"' --- ---OpenVR. --- ----@field openvr integer +---| '"openvr"' --- ---OpenXR. --- ----@field openxr integer +---| '"openxr"' --- ---Oculus Mobile SDK. --- ----@field vrapi integer +---| '"vrapi"' --- ---Pico. --- ----@field pico integer +---| '"pico"' --- ---WebXR. --- ----@field webxr integer +---| '"webxr"' --- ---Represents the different types of origins for coordinate spaces. An origin of "floor" means that the origin is on the floor in the middle of a room-scale play area. An origin of "head" means that no positional tracking is available, and consequently the origin is always at the position of the headset. --- ----@class lovr.HeadsetOrigin +---@alias lovr.HeadsetOrigin --- ---The origin is at the head. --- ----@field head integer +---| '"head"' --- ---The origin is on the floor. --- ----@field floor integer +---| '"floor"' diff --git a/meta/3rd/lovr/library/lovr.physics.lua b/meta/3rd/lovr/library/lovr.physics.lua index 60e4904d..e4b44aba 100644 --- a/meta/3rd/lovr/library/lovr.physics.lua +++ b/meta/3rd/lovr/library/lovr.physics.lua @@ -1244,41 +1244,41 @@ function World:update(dt, resolver) end --- ---Represents the different types of physics Joints available. --- ----@class lovr.JointType +---@alias lovr.JointType --- ---A BallJoint. --- ----@field ball integer +---| '"ball"' --- ---A DistanceJoint. --- ----@field distance integer +---| '"distance"' --- ---A HingeJoint. --- ----@field hinge integer +---| '"hinge"' --- ---A SliderJoint. --- ----@field slider integer +---| '"slider"' --- ---Represents the different types of physics Shapes available. --- ----@class lovr.ShapeType +---@alias lovr.ShapeType --- ---A BoxShape. --- ----@field box integer +---| '"box"' --- ---A CapsuleShape. --- ----@field capsule integer +---| '"capsule"' --- ---A CylinderShape. --- ----@field cylinder integer +---| '"cylinder"' --- ---A SphereShape. --- ----@field sphere integer +---| '"sphere"' diff --git a/meta/3rd/lovr/library/lovr.system.lua b/meta/3rd/lovr/library/lovr.system.lua index cd493f18..d3255f75 100644 --- a/meta/3rd/lovr/library/lovr.system.lua +++ b/meta/3rd/lovr/library/lovr.system.lua @@ -27,8 +27,8 @@ function lovr.system.requestPermission(permission) end --- ---These are the different permissions that need to be requested using `lovr.system.requestPermission` on some platforms. --- ----@class lovr.Permission +---@alias lovr.Permission --- ---Requests microphone access. --- ----@field audiocapture integer +---| '"audiocapture"' |