diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-11-16 15:23:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-11-16 15:23:10 +0800 |
commit | fe1eda0969b17bb7acd228c6998550e23ac78388 (patch) | |
tree | 5077b753a212013a9050492b1748acc2d14b3eeb /meta | |
parent | 18b3aab90545bb2646cd7ffab896fb2baca24d92 (diff) | |
download | lua-language-server-fe1eda0969b17bb7acd228c6998550e23ac78388.zip |
update lovr-api
Diffstat (limited to 'meta')
-rw-r--r-- | meta/3rd/lovr/library/lovr/graphics.lua | 2 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr/physics.lua | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/meta/3rd/lovr/library/lovr/graphics.lua b/meta/3rd/lovr/library/lovr/graphics.lua index d96df6e9..f6ed83a8 100644 --- a/meta/3rd/lovr/library/lovr/graphics.lua +++ b/meta/3rd/lovr/library/lovr/graphics.lua @@ -1796,7 +1796,7 @@ function Pass:line(x1, y1, z1, x2, y2, z2, ...) end ---@param start? number # The 1-based index of the first vertex to render from the vertex buffer (or the first index, when using an index buffer). ---@param count? number # The number of vertices to render (or the number of indices, when using an index buffer). When `nil`, as many vertices or indices as possible will be drawn (based on the length of the Buffers and `start`). ---@param instances? number # The number of copies of the mesh to render. ----@param base? number # nil +---@param base? number # A base offset to apply to vertex indices. function Pass:mesh(vertices, transform, start, count, instances, base) end --- diff --git a/meta/3rd/lovr/library/lovr/physics.lua b/meta/3rd/lovr/library/lovr/physics.lua index 4977380d..661b49cd 100644 --- a/meta/3rd/lovr/library/lovr/physics.lua +++ b/meta/3rd/lovr/library/lovr/physics.lua @@ -1536,6 +1536,21 @@ function World:newMeshCollider(vertices, indices) end function World:newSphereCollider(x, y, z, radius) end --- +---Adds a new Collider to the World with a TerrainShape already attached. +--- +--- +---### NOTE: +---The collider will be positioned at 0, 0, 0. +--- +---Unlike other colliders, it will automatically be set as kinematic when created. +--- +---@overload fun(self: lovr.World, scale: number, heightmap: lovr.Image, stretch?: number):lovr.Collider +---@overload fun(self: lovr.World, scale: number, callback: function, samples?: number):lovr.Collider +---@param scale number # The width and depth of the terrain, in meters. +---@return lovr.Collider collider # The new Collider. +function World:newTerrainCollider(scale) end + +--- ---Returns an iterator that can be used to iterate over "overlaps", or potential collisions between pairs of shapes in the World. --- ---This should be called after using `World:computeOverlaps` to compute the list of overlaps. Usually this is called automatically by `World:update`. |