From fe1eda0969b17bb7acd228c6998550e23ac78388 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, 16 Nov 2022 15:23:10 +0800 Subject: update lovr-api --- 3rd/lovr-api | 2 +- meta/3rd/lovr/library/lovr/graphics.lua | 2 +- meta/3rd/lovr/library/lovr/physics.lua | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/3rd/lovr-api b/3rd/lovr-api index b99eb0c6..37a2c2b9 160000 --- a/3rd/lovr-api +++ b/3rd/lovr-api @@ -1 +1 @@ -Subproject commit b99eb0c6d24e3994ff5c8fb7133fc7fa9a745f0c +Subproject commit 37a2c2b96880e6b45badb72d56398dbdcaa03fec 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 @@ -1535,6 +1535,21 @@ function World:newMeshCollider(vertices, indices) end ---@return lovr.Collider collider # The new Collider. 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. --- -- cgit v1.2.3