Browse Source

Joint updates; rm shaderConstantSize;

bjorn 1 year ago
parent
commit
4fe80118f8

+ 4 - 9
api/init.lua

@@ -11134,11 +11134,6 @@ return {
                       type = "number",
                       type = "number",
                       description = "The maximum number of bytes used by `shared` variables in compute shaders."
                       description = "The maximum number of bytes used by `shared` variables in compute shaders."
                     },
                     },
-                    {
-                      name = "shaderConstantSize",
-                      type = "number",
-                      description = "The maximum number of bytes of push constants that can be in a Shader.  Push constants are shared between stages, so the stage with the largest amount of push constant data will count towards this limit."
-                    },
                     {
                     {
                       name = "indirectDrawCount",
                       name = "indirectDrawCount",
                       type = "number",
                       type = "number",
@@ -32629,7 +32624,7 @@ return {
           description = "Creates a new BallJoint.",
           description = "Creates a new BallJoint.",
           key = "lovr.physics.newBallJoint",
           key = "lovr.physics.newBallJoint",
           module = "lovr.physics",
           module = "lovr.physics",
-          notes = "A ball joint is like a ball and socket between the two colliders.  It tries to keep the distance between the colliders and the anchor position the same, but does not constrain the angle between them.",
+          notes = "A ball joint is like a ball and socket between the two colliders.  It tries to keep the distance between the colliders and the anchor position the same, but does not constrain the angle between them.\n\nIf the anchor is nil, the position of the first Collider is the anchor.  If the first collider is nil, then the position of the second Collider is the anchor.",
           related = {
           related = {
             "lovr.physics.newDistanceJoint",
             "lovr.physics.newDistanceJoint",
             "lovr.physics.newHingeJoint",
             "lovr.physics.newHingeJoint",
@@ -32797,7 +32792,7 @@ return {
           description = "Creates a new ConeJoint.",
           description = "Creates a new ConeJoint.",
           key = "lovr.physics.newConeJoint",
           key = "lovr.physics.newConeJoint",
           module = "lovr.physics",
           module = "lovr.physics",
-          notes = "A ConeJoint is similar to a BallJoint, where the relative position between the colliders will be constrained to a single point.  However, the ConeJoint also limits the rotation away from the cone axis.  This can be useful for limb joints, ropes, etc.",
+          notes = "A ConeJoint is similar to a BallJoint, where the relative position between the colliders will be constrained to a single point.  However, the ConeJoint also limits the rotation away from the cone axis.  This can be useful for limb joints, ropes, etc.\n\nIf the anchor is nil, the position of the first Collider is the anchor.  If the first Collider is nil, the position of the second collider is the anchor.\n\nIf the axis is nil, it defaults to the direction between the anchor and the second Collider.",
           related = {
           related = {
             "lovr.physics.newWeldJoint",
             "lovr.physics.newWeldJoint",
             "lovr.physics.newBallJoint",
             "lovr.physics.newBallJoint",
@@ -32939,7 +32934,7 @@ return {
           description = "Creates a new DistanceJoint.",
           description = "Creates a new DistanceJoint.",
           key = "lovr.physics.newDistanceJoint",
           key = "lovr.physics.newDistanceJoint",
           module = "lovr.physics",
           module = "lovr.physics",
-          notes = "A distance joint tries to keep the two colliders a fixed distance apart.  The distance is determined by the initial distance between the anchor points.  The joint allows for rotation on the anchor points.",
+          notes = "A distance joint tries to keep the two colliders a fixed distance apart.  The distance is determined by the initial distance between the anchor points.  The joint allows for rotation on the anchor points.\n\nIf no anchors are given, they default to the positions of the Colliders.",
           related = {
           related = {
             "lovr.physics.newBallJoint",
             "lovr.physics.newBallJoint",
             "lovr.physics.newHingeJoint",
             "lovr.physics.newHingeJoint",
@@ -33037,7 +33032,7 @@ return {
           description = "Creates a new HingeJoint.",
           description = "Creates a new HingeJoint.",
           key = "lovr.physics.newHingeJoint",
           key = "lovr.physics.newHingeJoint",
           module = "lovr.physics",
           module = "lovr.physics",
-          notes = "A hinge joint constrains two colliders to allow rotation only around the hinge's axis.",
+          notes = "A hinge joint constrains two colliders to allow rotation only around the hinge's axis.\n\nIf the anchor is nil, the position of the first Collider is the anchor.  If the first Collider is nil, the position of the second collider is the anchor.\n\nIf the axis is nil, it defaults to the direction between the anchor and the second Collider.",
           related = {
           related = {
             "lovr.physics.newBallJoint",
             "lovr.physics.newBallJoint",
             "lovr.physics.newDistanceJoint",
             "lovr.physics.newDistanceJoint",

+ 0 - 9
api/lovr/graphics/getLimits.lua

@@ -156,15 +156,6 @@ return {
           type = 'number',
           type = 'number',
           description = 'The maximum number of bytes used by `shared` variables in compute shaders.'
           description = 'The maximum number of bytes used by `shared` variables in compute shaders.'
         },
         },
-        {
-          name = 'shaderConstantSize',
-          type = 'number',
-          description = [[
-            The maximum number of bytes of push constants that can be in a Shader.  Push constants
-            are shared between stages, so the stage with the largest amount of push constant data
-            will count towards this limit.
-          ]]
-        },
         {
         {
           name = 'indirectDrawCount',
           name = 'indirectDrawCount',
           type = 'number',
           type = 'number',

+ 3 - 0
api/lovr/physics/newBallJoint.lua

@@ -51,6 +51,9 @@ return {
     A ball joint is like a ball and socket between the two colliders.  It tries to keep the distance
     A ball joint is like a ball and socket between the two colliders.  It tries to keep the distance
     between the colliders and the anchor position the same, but does not constrain the angle between
     between the colliders and the anchor position the same, but does not constrain the angle between
     them.
     them.
+
+    If the anchor is nil, the position of the first Collider is the anchor.  If the first collider
+    is nil, then the position of the second Collider is the anchor.
   ]],
   ]],
   related = {
   related = {
     'lovr.physics.newDistanceJoint',
     'lovr.physics.newDistanceJoint',

+ 5 - 0
api/lovr/physics/newConeJoint.lua

@@ -67,6 +67,11 @@ return {
     A ConeJoint is similar to a BallJoint, where the relative position between the colliders will be
     A ConeJoint is similar to a BallJoint, where the relative position between the colliders will be
     constrained to a single point.  However, the ConeJoint also limits the rotation away from the
     constrained to a single point.  However, the ConeJoint also limits the rotation away from the
     cone axis.  This can be useful for limb joints, ropes, etc.
     cone axis.  This can be useful for limb joints, ropes, etc.
+
+    If the anchor is nil, the position of the first Collider is the anchor.  If the first Collider
+    is nil, the position of the second collider is the anchor.
+
+    If the axis is nil, it defaults to the direction between the anchor and the second Collider.
   ]],
   ]],
   related = {
   related = {
     'lovr.physics.newWeldJoint',
     'lovr.physics.newWeldJoint',

+ 2 - 0
api/lovr/physics/newDistanceJoint.lua

@@ -67,6 +67,8 @@ return {
     A distance joint tries to keep the two colliders a fixed distance apart.  The distance is
     A distance joint tries to keep the two colliders a fixed distance apart.  The distance is
     determined by the initial distance between the anchor points.  The joint allows for rotation on
     determined by the initial distance between the anchor points.  The joint allows for rotation on
     the anchor points.
     the anchor points.
+
+    If no anchors are given, they default to the positions of the Colliders.
   ]],
   ]],
   related = {
   related = {
     'lovr.physics.newBallJoint',
     'lovr.physics.newBallJoint',

+ 5 - 0
api/lovr/physics/newHingeJoint.lua

@@ -65,6 +65,11 @@ return {
   },
   },
   notes = [[
   notes = [[
     A hinge joint constrains two colliders to allow rotation only around the hinge's axis.
     A hinge joint constrains two colliders to allow rotation only around the hinge's axis.
+
+    If the anchor is nil, the position of the first Collider is the anchor.  If the first Collider
+    is nil, the position of the second collider is the anchor.
+
+    If the axis is nil, it defaults to the direction between the anchor and the second Collider.
   ]],
   ]],
   related = {
   related = {
     'lovr.physics.newBallJoint',
     'lovr.physics.newBallJoint',