Browse Source

Update Shape home page;

bjorn 9 months ago
parent
commit
da227c3765
2 changed files with 88 additions and 2 deletions
  1. 44 1
      api/init.lua
  2. 44 1
      api/lovr/physics/Shape/init.lua

+ 44 - 1
api/init.lua

@@ -38610,9 +38610,10 @@ return {
           module = "lovr.physics",
           constructors = {
             "lovr.physics.newBoxShape",
+            "lovr.physics.newSphereShape",
             "lovr.physics.newCapsuleShape",
             "lovr.physics.newCylinderShape",
-            "lovr.physics.newSphereShape",
+            "lovr.physics.newConvexShape",
             "lovr.physics.newMeshShape",
             "lovr.physics.newTerrainShape",
             "World:newBoxCollider",
@@ -39457,6 +39458,48 @@ return {
                 }
               }
             }
+          },
+          sections = {
+            {
+              name = "Basics",
+              links = {
+                "Shape:getType",
+                "Shape:destroy",
+                "Shape:isDestroyed",
+                "Shape:getCollider",
+                "Shape:getUserData",
+                "Shape:setUserData"
+              }
+            },
+            {
+              name = "Position",
+              links = {
+                "Shape:getOffset",
+                "Shape:setOffset",
+                "Shape:getPosition",
+                "Shape:getOrientation",
+                "Shape:getPose",
+                "Shape:getAABB"
+              }
+            },
+            {
+              name = "Mass",
+              links = {
+                "Shape:getVolume",
+                "Shape:getDensity",
+                "Shape:setDensity",
+                "Shape:getMass",
+                "Shape:getInertia",
+                "Shape:getCenterOfMass"
+              }
+            },
+            {
+              name = "Queries",
+              links = {
+                "Shape:containsPoint",
+                "Shape:raycast"
+              }
+            }
           }
         },
         {

+ 44 - 1
api/lovr/physics/Shape/init.lua

@@ -5,9 +5,10 @@ return {
   ]],
   constructors = {
     'lovr.physics.newBoxShape',
+    'lovr.physics.newSphereShape',
     'lovr.physics.newCapsuleShape',
     'lovr.physics.newCylinderShape',
-    'lovr.physics.newSphereShape',
+    'lovr.physics.newConvexShape',
     'lovr.physics.newMeshShape',
     'lovr.physics.newTerrainShape',
     'World:newBoxCollider',
@@ -17,5 +18,47 @@ return {
     'World:newConvexCollider',
     'World:newMeshCollider',
     'World:newTerrainCollider'
+  },
+  sections = {
+    {
+      name = 'Basics',
+      links = {
+        'Shape:getType',
+        'Shape:destroy',
+        'Shape:isDestroyed',
+        'Shape:getCollider',
+        'Shape:getUserData',
+        'Shape:setUserData'
+      }
+    },
+    {
+      name = 'Position',
+      links = {
+        'Shape:getOffset',
+        'Shape:setOffset',
+        'Shape:getPosition',
+        'Shape:getOrientation',
+        'Shape:getPose',
+        'Shape:getAABB'
+      }
+    },
+    {
+      name = 'Mass',
+      links = {
+        'Shape:getVolume',
+        'Shape:getDensity',
+        'Shape:setDensity',
+        'Shape:getMass',
+        'Shape:getInertia',
+        'Shape:getCenterOfMass'
+      }
+    },
+    {
+      name = 'Queries',
+      links = {
+        'Shape:containsPoint',
+        'Shape:raycast'
+      }
+    }
   }
 }