Browse Source

Convert vec3 overloads to separate variants;

bjorn 2 years ago
parent
commit
1f402b0a15
51 changed files with 1552 additions and 210 deletions
  1. 719 129
      api/init.lua
  2. 10 0
      api/lovr/audio/Source/setOrientation.lua
  3. 18 3
      api/lovr/audio/Source/setPose.lua
  4. 20 5
      api/lovr/audio/Source/setPosition.lua
  5. 15 0
      api/lovr/audio/setOrientation.lua
  6. 21 3
      api/lovr/audio/setPose.lua
  7. 19 1
      api/lovr/audio/setPosition.lua
  8. 0 4
      api/lovr/graphics/Model/getNodeScale.lua
  9. 30 3
      api/lovr/graphics/Model/setNodeOrientation.lua
  10. 40 1
      api/lovr/graphics/Model/setNodePose.lua
  11. 27 5
      api/lovr/graphics/Model/setNodePosition.lua
  12. 27 5
      api/lovr/graphics/Model/setNodeScale.lua
  13. 76 5
      api/lovr/graphics/Model/setNodeTransform.lua
  14. 23 4
      api/lovr/graphics/Pass/rotate.lua
  15. 19 3
      api/lovr/graphics/Pass/scale.lua
  16. 15 0
      api/lovr/graphics/Pass/setViewPose.lua
  17. 64 5
      api/lovr/graphics/Pass/transform.lua
  18. 19 3
      api/lovr/graphics/Pass/translate.lua
  19. 58 5
      api/lovr/math/Mat4/set.lua
  20. 14 2
      api/lovr/math/newCurve.lua
  21. 10 0
      api/lovr/physics/BallJoint/setAnchor.lua
  22. 16 0
      api/lovr/physics/Collider/applyForce.lua
  23. 8 0
      api/lovr/physics/Collider/applyTorque.lua
  24. 9 3
      api/lovr/physics/Collider/getLinearVelocityFromLocalPoint.lua
  25. 8 0
      api/lovr/physics/Collider/getLinearVelocityFromWorldPoint.lua
  26. 8 0
      api/lovr/physics/Collider/getLocalPoint.lua
  27. 9 3
      api/lovr/physics/Collider/getLocalVector.lua
  28. 8 0
      api/lovr/physics/Collider/getWorldPoint.lua
  29. 8 0
      api/lovr/physics/Collider/getWorldVector.lua
  30. 10 0
      api/lovr/physics/Collider/setAngularVelocity.lua
  31. 10 0
      api/lovr/physics/Collider/setLinearVelocity.lua
  32. 10 0
      api/lovr/physics/Collider/setOrientation.lua
  33. 14 0
      api/lovr/physics/Collider/setPose.lua
  34. 10 0
      api/lovr/physics/Collider/setPosition.lua
  35. 14 0
      api/lovr/physics/DistanceJoint/setAnchors.lua
  36. 10 0
      api/lovr/physics/HingeJoint/setAnchor.lua
  37. 10 0
      api/lovr/physics/HingeJoint/setAxis.lua
  38. 10 0
      api/lovr/physics/Shape/setOrientation.lua
  39. 10 0
      api/lovr/physics/Shape/setPosition.lua
  40. 10 0
      api/lovr/physics/SliderJoint/setAxis.lua
  41. 12 0
      api/lovr/physics/World/newBoxCollider.lua
  42. 11 3
      api/lovr/physics/World/newCapsuleCollider.lua
  43. 8 0
      api/lovr/physics/World/newCollider.lua
  44. 11 3
      api/lovr/physics/World/newCylinderCollider.lua
  45. 11 3
      api/lovr/physics/World/newSphereCollider.lua
  46. 12 6
      api/lovr/physics/World/raycast.lua
  47. 8 0
      api/lovr/physics/World/setGravity.lua
  48. 8 0
      api/lovr/physics/newBallJoint.lua
  49. 12 0
      api/lovr/physics/newDistanceJoint.lua
  50. 15 3
      api/lovr/physics/newHingeJoint.lua
  51. 8 0
      api/lovr/physics/newSliderJoint.lua

File diff suppressed because it is too large
+ 719 - 129
api/init.lua


+ 10 - 0
api/lovr/audio/Source/setOrientation.lua

@@ -18,13 +18,23 @@ return {
     az = {
     az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
+    },
+    orientation = {
+      type = 'Quat',
+      description = 'The orientation.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the orientation using angle/axis numbers.',
       arguments = { 'angle', 'ax', 'ay', 'az' },
       arguments = { 'angle', 'ax', 'ay', 'az' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the orientation using a quaternion.',
+      arguments = { 'orientation' },
+      returns = {}
     }
     }
   },
   },
   related = {
   related = {

+ 18 - 3
api/lovr/audio/Source/setPose.lua

@@ -5,15 +5,15 @@ return {
   arguments = {
   arguments = {
     x = {
     x = {
       type = 'number',
       type = 'number',
-      description = 'The x position of the Source, in meters.'
+      description = 'The x position of the Source.'
     },
     },
     y = {
     y = {
       type = 'number',
       type = 'number',
-      description = 'The y position of the Source, in meters.'
+      description = 'The y position of the Source.'
     },
     },
     z = {
     z = {
       type = 'number',
       type = 'number',
-      description = 'The z position of the Source, in meters.'
+      description = 'The z position of the Source.'
     },
     },
     angle = {
     angle = {
       type = 'number',
       type = 'number',
@@ -30,15 +30,30 @@ return {
     az = {
     az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position.'
+    },
+    orientation = {
+      type = 'Quat',
+      description = 'The orientation.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the pose using numbers.',
       arguments = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
       arguments = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the pose using vector types.',
+      arguments = { 'position', 'orientation' },
+      returns = {}
     }
     }
   },
   },
+  notes = 'The position doesn\'t have any defined units, but meters are used by convention.',
   related = {
   related = {
     'Source:setPosition',
     'Source:setPosition',
     'Source:setOrientation',
     'Source:setOrientation',

+ 20 - 5
api/lovr/audio/Source/setPosition.lua

@@ -2,8 +2,8 @@ return {
   tag = 'sourceEffects',
   tag = 'sourceEffects',
   summary = 'Set the position of the Source.',
   summary = 'Set the position of the Source.',
   description = [[
   description = [[
-    Sets the position of the Source, in meters.  Setting the position will cause the Source to be
-    distorted and attenuated based on its position relative to the listener.
+    Sets the position of the Source.  Setting the position will cause the Source to be distorted and
+    attenuated based on its position relative to the listener.
 
 
     Only mono sources can be positioned.  Setting the position of a stereo Source will cause an
     Only mono sources can be positioned.  Setting the position of a stereo Source will cause an
     error.
     error.
@@ -11,22 +11,37 @@ return {
   arguments = {
   arguments = {
     x = {
     x = {
       type = 'number',
       type = 'number',
-      description = 'The x coordinate.'
+      description = 'The x coordinate of the position.'
     },
     },
     y = {
     y = {
       type = 'number',
       type = 'number',
-      description = 'The y coordinate.'
+      description = 'The y coordinate of the position.'
     },
     },
     z = {
     z = {
       type = 'number',
       type = 'number',
-      description = 'The z coordinate.'
+      description = 'The z coordinate of the position.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the position using numbers.',
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the position using a vector.',
+      arguments = { 'position' },
+      returns = {}
     }
     }
+  },
+  notes = 'The position doesn\'t have any defined units, but meters are used by convention.',
+  related = {
+    'Source:setOrientation',
+    'Source:setPose'
   }
   }
 }
 }

+ 15 - 0
api/lovr/audio/setOrientation.lua

@@ -18,13 +18,28 @@ return {
     az = {
     az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
+    },
+    orientation = {
+      type = 'Quat',
+      description = 'The orientation of the listener.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the listener position using numbers.',
       arguments = { 'angle', 'ax', 'ay', 'az' },
       arguments = { 'angle', 'ax', 'ay', 'az' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the listener position using a vector.',
+      arguments = { 'orientation' },
+      returns = {}
     }
     }
+  },
+  related = {
+    'lovr.audio.setPosition',
+    'lovr.audio.setPose',
+    'Source:setOrientation'
   }
   }
 }
 }

+ 21 - 3
api/lovr/audio/setPose.lua

@@ -5,15 +5,15 @@ return {
   arguments = {
   arguments = {
     x = {
     x = {
       type = 'number',
       type = 'number',
-      description = 'The x position of the listener, in meters.'
+      description = 'The x position of the listener.'
     },
     },
     y = {
     y = {
       type = 'number',
       type = 'number',
-      description = 'The y position of the listener, in meters.'
+      description = 'The y position of the listener.'
     },
     },
     z = {
     z = {
       type = 'number',
       type = 'number',
-      description = 'The z position of the listener, in meters.'
+      description = 'The z position of the listener.'
     },
     },
     angle = {
     angle = {
       type = 'number',
       type = 'number',
@@ -30,15 +30,33 @@ return {
     az = {
     az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position of the listener.'
+    },
+    orientation = {
+      type = 'Quat',
+      description = 'The orientation of the listener.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the pose of the listener using numbers.',
       arguments = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
       arguments = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the pose of the listener using vector types.',
+      arguments = { 'position', 'orientation' },
+      returns = {}
     }
     }
   },
   },
+  notes = [[
+    The position of the listener doesn't use any specific units, but usually they can be thought of
+    as meters to match the headset module.
+  ]],
   related = {
   related = {
     'lovr.audio.setPosition',
     'lovr.audio.setPosition',
     'lovr.audio.setOrientation',
     'lovr.audio.setOrientation',

+ 19 - 1
api/lovr/audio/setPosition.lua

@@ -1,7 +1,10 @@
 return {
 return {
   tag = 'listener',
   tag = 'listener',
   summary = 'Set the position of the listener.',
   summary = 'Set the position of the listener.',
-  description = 'Sets the position of the virtual audio listener, in meters.',
+  description = [[
+    Sets the position of the virtual audio listener.  The position doesn't have any specific units,
+    but usually they can be thought of as meters, to match the headset module.
+  ]],
   arguments = {
   arguments = {
     x = {
     x = {
       type = 'number',
       type = 'number',
@@ -14,13 +17,28 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z position of the listener.'
       description = 'The z position of the listener.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The listener position.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the listener position using numbers.',
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the listener position using a vector.',
+      arguments = { 'position' },
+      returns = {}
     }
     }
+  },
+  related = {
+    'lovr.audio.setOrientation',
+    'lovr.audio.setPose',
+    'Source:setPosition'
   }
   }
 }
 }

+ 0 - 4
api/lovr/graphics/Model/getNodeScale.lua

@@ -42,10 +42,6 @@ return {
       returns = { 'x', 'y', 'z' }
       returns = { 'x', 'y', 'z' }
     }
     }
   },
   },
-  notes = [[
-    For best results when animating, it's recommended to keep the 3 components of the scale the
-    same.
-  ]],
   related = {
   related = {
     'Model:getNodePosition',
     'Model:getNodePosition',
     'Model:setNodePosition',
     'Model:setNodePosition',

+ 30 - 3
api/lovr/graphics/Model/setNodeOrientation.lua

@@ -1,6 +1,9 @@
 return {
 return {
   summary = 'Set or blend the orientation of a node.',
   summary = 'Set or blend the orientation of a node.',
-  description = 'Sets or blends the orientation of a node to a new orientation.',
+  description = [[
+    Sets or blends the orientation of a node to a new orientation.  This sets the local orientation
+    of the node, relative to its parent.
+  ]],
   arguments = {
   arguments = {
     index = {
     index = {
       type = 'number',
       type = 'number',
@@ -10,9 +13,25 @@ return {
       type = 'string',
       type = 'string',
       description = 'The name of the node.'
       description = 'The name of the node.'
     },
     },
+    angle = {
+      type = 'number',
+      description = 'The number of radians the node should be rotated around its rotation axis.'
+    },
+    ax = {
+      type = 'number',
+      description = 'The x component of the axis of rotation.'
+    },
+    ay = {
+      type = 'number',
+      description = 'The y component of the axis of rotation.'
+    },
+    az = {
+      type = 'number',
+      description = 'The z component of the axis of rotation.'
+    },
     orientation = {
     orientation = {
-      type = 'rotation',
-      description = 'The target orientation.'
+      type = 'Quat',
+      description = 'The orientation.'
     },
     },
     blend = {
     blend = {
       type = 'number',
       type = 'number',
@@ -26,6 +45,14 @@ return {
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
+    {
+      arguments = { 'index', 'angle', 'ax', 'ay', 'az', 'blend' },
+      returns = {}
+    },
+    {
+      arguments = { 'name', 'angle', 'ax', 'ay', 'az', 'blend' },
+      returns = {}
+    },
     {
     {
       arguments = { 'index', 'orientation', 'blend' },
       arguments = { 'index', 'orientation', 'blend' },
       returns = {}
       returns = {}

+ 40 - 1
api/lovr/graphics/Model/setNodePose.lua

@@ -1,6 +1,9 @@
 return {
 return {
   summary = 'Set or blend the pose of a node.',
   summary = 'Set or blend the pose of a node.',
-  description = 'Sets or blends the pose (position and orientation) of a node to a new pose.',
+  description = [[
+    Sets or blends the pose (position and orientation) of a node to a new pose.  This sets the local
+    pose of the node, relative to its parent.  The scale will remain unchanged.
+  ]],
   arguments = {
   arguments = {
     index = {
     index = {
       type = 'number',
       type = 'number',
@@ -10,6 +13,34 @@ return {
       type = 'string',
       type = 'string',
       description = 'The name of the node.'
       description = 'The name of the node.'
     },
     },
+    x = {
+      type = 'number',
+      description = 'The x component of the position.'
+    },
+    y = {
+      type = 'number',
+      description = 'The y component of the position.'
+    },
+    z = {
+      type = 'number',
+      description = 'The z component of the position.'
+    },
+    angle = {
+      type = 'number',
+      description = 'The number of radians the node should be rotated around its rotation axis.'
+    },
+    ax = {
+      type = 'number',
+      description = 'The x component of the axis of rotation.'
+    },
+    ay = {
+      type = 'number',
+      description = 'The y component of the axis of rotation.'
+    },
+    az = {
+      type = 'number',
+      description = 'The z component of the axis of rotation.'
+    },
     position = {
     position = {
       type = 'Vec3',
       type = 'Vec3',
       description = 'The target position.  Can also be provided as 3 numbers.'
       description = 'The target position.  Can also be provided as 3 numbers.'
@@ -29,6 +60,14 @@ return {
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
+    {
+      arguments = { 'index', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'blend' },
+      returns = {}
+    },
+    {
+      arguments = { 'name', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'blend' },
+      returns = {}
+    },
     {
     {
       arguments = { 'index', 'position', 'orientation', 'blend' },
       arguments = { 'index', 'position', 'orientation', 'blend' },
       returns = {}
       returns = {}

+ 27 - 5
api/lovr/graphics/Model/setNodePosition.lua

@@ -1,6 +1,9 @@
 return {
 return {
   summary = 'Set or blend the position of a node.',
   summary = 'Set or blend the position of a node.',
-  description = 'Sets or blends the position of a node to a new position.',
+  description = [[
+    Sets or blends the position of a node.  This sets the local position of the node, relative to
+    its parent.
+  ]],
   arguments = {
   arguments = {
     index = {
     index = {
       type = 'number',
       type = 'number',
@@ -10,22 +13,41 @@ return {
       type = 'string',
       type = 'string',
       description = 'The name of the node.'
       description = 'The name of the node.'
     },
     },
+    x = {
+      type = 'number',
+      description = 'The x coordinate of the new position.'
+    },
+    y = {
+      type = 'number',
+      description = 'The y coordinate of the new position.'
+    },
+    z = {
+      type = 'number',
+      description = 'The z coordinate of the new position.'
+    },
     position = {
     position = {
       type = 'Vec3',
       type = 'Vec3',
-      description = 'The target position.  Can also be provided as 3 numbers.'
+      description = 'The new position.'
     },
     },
     blend = {
     blend = {
       type = 'number',
       type = 'number',
       default = '1.0',
       default = '1.0',
       description = [[
       description = [[
-        A number from 0 to 1 indicating how much of the target position to blend in.  A value of 0
-        will not change the node's position at all, whereas 1 will fully blend to the target
-        position.
+        A number from 0 to 1 indicating how much of the new position to blend in.  A value of 0 will
+        not change the node's position at all, whereas 1 will fully blend to the target position.
       ]]
       ]]
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
+    {
+      arguments = { 'index', 'x', 'y', 'z', 'blend' },
+      returns = {}
+    },
+    {
+      arguments = { 'name', 'x', 'y', 'z', 'blend' },
+      returns = {}
+    },
     {
     {
       arguments = { 'index', 'position', 'blend' },
       arguments = { 'index', 'position', 'blend' },
       returns = {}
       returns = {}

+ 27 - 5
api/lovr/graphics/Model/setNodeScale.lua

@@ -1,6 +1,9 @@
 return {
 return {
   summary = 'Set or blend the scale of a node.',
   summary = 'Set or blend the scale of a node.',
-  description = 'Sets or blends the scale of a node to a new scale.',
+  description = [[
+    Sets or blends the scale of a node to a new scale.  This sets the local scale of the node,
+    relative to its parent.
+  ]],
   arguments = {
   arguments = {
     index = {
     index = {
       type = 'number',
       type = 'number',
@@ -10,21 +13,41 @@ return {
       type = 'string',
       type = 'string',
       description = 'The name of the node.'
       description = 'The name of the node.'
     },
     },
+    sx = {
+      type = 'number',
+      description = 'The x scale.'
+    },
+    sy = {
+      type = 'number',
+      description = 'The y scale.'
+    },
+    sz = {
+      type = 'number',
+      description = 'The z scale.'
+    },
     scale = {
     scale = {
       type = 'Vec3',
       type = 'Vec3',
-      description = 'The target scale.  Can also be provided as 3 numbers.'
+      description = 'The new scale.'
     },
     },
     blend = {
     blend = {
       type = 'number',
       type = 'number',
       default = '1.0',
       default = '1.0',
       description = [[
       description = [[
-        A number from 0 to 1 indicating how much of the target scale to blend in.  A value of 0 will
+        A number from 0 to 1 indicating how much of the new scale to blend in.  A value of 0 will
         not change the node's scale at all, whereas 1 will fully blend to the target scale.
         not change the node's scale at all, whereas 1 will fully blend to the target scale.
       ]]
       ]]
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
+    {
+      arguments = { 'index', 'sx', 'sy', 'sz', 'blend' },
+      returns = {}
+    },
+    {
+      arguments = { 'name', 'sx', 'sy', 'sz', 'blend' },
+      returns = {}
+    },
     {
     {
       arguments = { 'index', 'scale', 'blend' },
       arguments = { 'index', 'scale', 'blend' },
       returns = {}
       returns = {}
@@ -35,8 +58,7 @@ return {
     }
     }
   },
   },
   notes = [[
   notes = [[
-    For best results when animating, it's recommended to keep the 3 components of the scale the
-    same.
+    For best results when animating, it's recommended to keep the 3 scale components the same.
   ]],
   ]],
   related = {
   related = {
     'Model:getNodePosition',
     'Model:getNodePosition',

+ 76 - 5
api/lovr/graphics/Model/setNodeTransform.lua

@@ -1,6 +1,9 @@
 return {
 return {
   summary = 'Set or blend the transform of a node.',
   summary = 'Set or blend the transform of a node.',
-  description = 'Sets or blends the transform of a node to a new transform.',
+  description = [[
+    Sets or blends the transform of a node to a new transform.  This sets the local transform of the
+    node, relative to its parent.
+  ]],
   arguments = {
   arguments = {
     index = {
     index = {
       type = 'number',
       type = 'number',
@@ -10,12 +13,61 @@ return {
       type = 'string',
       type = 'string',
       description = 'The name of the node.'
       description = 'The name of the node.'
     },
     },
+    x = {
+      type = 'number',
+      description = 'The x component of the position.'
+    },
+    y = {
+      type = 'number',
+      description = 'The y component of the position.'
+    },
+    z = {
+      type = 'number',
+      description = 'The z component of the position.'
+    },
+    sx = {
+      type = 'number',
+      description = 'The x component of the scale.'
+    },
+    sy = {
+      type = 'number',
+      description = 'The y component of the scale.'
+    },
+    sz = {
+      type = 'number',
+      description = 'The z component of the scale.'
+    },
+    angle = {
+      type = 'number',
+      description = 'The number of radians the node should be rotated around its rotation axis.'
+    },
+    ax = {
+      type = 'number',
+      description = 'The x component of the axis of rotation.'
+    },
+    ay = {
+      type = 'number',
+      description = 'The y component of the axis of rotation.'
+    },
+    az = {
+      type = 'number',
+      description = 'The z component of the axis of rotation.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position.'
+    },
+    scale = {
+      type = 'Vec3',
+      description = 'The scale.'
+    },
+    orientation = {
+      type = 'Quat',
+      description = 'The orientation.'
+    },
     transform = {
     transform = {
       type = 'Mat4',
       type = 'Mat4',
-      description = [[
-        The target transform.  Can also be provided as position, scale, and rotation using a mix of
-        `Vectors` or numbers, with 3 scale components.
-      ]]
+      description = 'The transform.'
     },
     },
     blend = {
     blend = {
       type = 'number',
       type = 'number',
@@ -29,6 +81,22 @@ return {
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
+    {
+      arguments = { 'index', 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az', 'blend' },
+      returns = {}
+    },
+    {
+      arguments = { 'name', 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az', 'blend' },
+      returns = {}
+    },
+    {
+      arguments = { 'index', 'position', 'scale', 'orientation', 'blend' },
+      returns = {}
+    },
+    {
+      arguments = { 'name', 'position', 'scale', 'orientation', 'blend' },
+      returns = {}
+    },
     {
     {
       arguments = { 'index', 'transform', 'blend' },
       arguments = { 'index', 'transform', 'blend' },
       returns = {}
       returns = {}
@@ -41,6 +109,9 @@ return {
   notes = [[
   notes = [[
     For best results when animating, it's recommended to keep the 3 components of the scale the
     For best results when animating, it's recommended to keep the 3 components of the scale the
     same.
     same.
+
+    Even though the translation, scale, and rotation parameters are given in TSR order, they are
+    applied in the normal TRS order.
   ]],
   ]],
   related = {
   related = {
     'Model:getNodePosition',
     'Model:getNodePosition',

+ 23 - 4
api/lovr/graphics/Pass/rotate.lua

@@ -3,17 +3,36 @@ return {
   summary = 'Rotate the coordinate system.',
   summary = 'Rotate the coordinate system.',
   description = 'Rotates the coordinate system.',
   description = 'Rotates the coordinate system.',
   arguments = {
   arguments = {
+    angle = {
+      type = 'number',
+      description = 'The amount to rotate the coordinate system by, in radians.'
+    },
+    ax = {
+      type = 'number',
+      description = 'The x component of the axis of rotation.'
+    },
+    ay = {
+      type = 'number',
+      description = 'The y component of the axis of rotation.'
+    },
+    az = {
+      type = 'number',
+      description = 'The z component of the axis of rotation.'
+    },
     rotation = {
     rotation = {
       type = 'Quat',
       type = 'Quat',
-      description = [[
-        A quaternion containing the rotation to apply.  Can also be provided as 4 numbers in
-        angle-axis representation.
-      ]]
+      description = 'A quaternion containing the rotation to apply.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Rotate the coordinate system using numbers.',
+      arguments = { 'angle', 'ax', 'ay', 'az' },
+      returns = {}
+    },
+    {
+      description = 'Rotate the coordinate system using a quaternion.',
       arguments = { 'rotation' },
       arguments = { 'rotation' },
       returns = {}
       returns = {}
     }
     }

+ 19 - 3
api/lovr/graphics/Pass/scale.lua

@@ -3,16 +3,32 @@ return {
   summary = 'Scale the coordinate system.',
   summary = 'Scale the coordinate system.',
   description = 'Scales the coordinate system.',
   description = 'Scales the coordinate system.',
   arguments = {
   arguments = {
+    sx = {
+      type = 'number',
+      description = 'The x component of the scale.'
+    },
+    sy = {
+      type = 'number',
+      description = 'The y component of the scale.'
+    },
+    sz = {
+      type = 'number',
+      description = 'The z component of the scale.'
+    },
     scale = {
     scale = {
       type = 'Vec3',
       type = 'Vec3',
-      description = [[
-        The scale to apply to the coordinate system.  Can also be provided as 1 or 3 numbers.
-      ]]
+      description = 'The scale to apply.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Scale the coordinate system using numbers.',
+      arguments = { 'sx', 'sy', 'sz' },
+      returns = {}
+    },
+    {
+      description = 'Scale the coordinate system using a vector.',
       arguments = { 'scale' },
       arguments = { 'scale' },
       returns = {}
       returns = {}
     }
     }

+ 15 - 0
api/lovr/graphics/Pass/setViewPose.lua

@@ -41,6 +41,14 @@ return {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
     },
     },
+    position = {
+      type = 'Vec3',
+      description = 'The position of the viewer, in meters.'
+    },
+    orientation = {
+      type = 'Quat',
+      description = 'The orientation of the viewer.'
+    },
     matrix = {
     matrix = {
       type = 'Mat4',
       type = 'Mat4',
       description = 'A matrix containing the viewer pose.'
       description = 'A matrix containing the viewer pose.'
@@ -53,10 +61,17 @@ return {
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the pose of the view using numbers.',
       arguments = { 'view', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
       arguments = { 'view', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
       returns = {}
       returns = {}
     },
     },
     {
     {
+      description = 'Set the pose of the view using vectors.',
+      arguments = { 'view', 'position', 'orientation' },
+      returns = {}
+    },
+    {
+      description = 'Set the pose of the view using a matrix.',
       arguments = { 'view', 'matrix', 'inverted' },
       arguments = { 'view', 'matrix', 'inverted' },
       returns = {}
       returns = {}
     }
     }

+ 64 - 5
api/lovr/graphics/Pass/transform.lua

@@ -3,18 +3,77 @@ return {
   summary = 'Apply a general transform to the coordinate system.',
   summary = 'Apply a general transform to the coordinate system.',
   description = 'Transforms the coordinate system.',
   description = 'Transforms the coordinate system.',
   arguments = {
   arguments = {
+    x = {
+      type = 'number',
+      description = 'The x component of the translation.'
+    },
+    y = {
+      type = 'number',
+      description = 'The y component of the translation.'
+    },
+    z = {
+      type = 'number',
+      description = 'The z component of the translation.'
+    },
+    sx = {
+      type = 'number',
+      description = 'The x component of the scale.'
+    },
+    sy = {
+      type = 'number',
+      description = 'The y component of the scale.'
+    },
+    sz = {
+      type = 'number',
+      description = 'The z component of the scale.'
+    },
+    angle = {
+      type = 'number',
+      description = 'The amount to rotate the coordinate system by, in radians.'
+    },
+    ax = {
+      type = 'number',
+      description = 'The x component of the axis of rotation.'
+    },
+    ay = {
+      type = 'number',
+      description = 'The y component of the axis of rotation.'
+    },
+    az = {
+      type = 'number',
+      description = 'The z component of the axis of rotation.'
+    },
+    translation = {
+      type = 'Vec3',
+      description = 'The translation.'
+    },
+    scale = {
+      type = 'Vec3',
+      description = 'The scale to apply.'
+    },
+    rotation = {
+      type = 'Quat',
+      description = 'A quaternion containing the rotation to apply.'
+    },
     transform = {
     transform = {
       type = 'Mat4',
       type = 'Mat4',
-      description = [[
-        A matrix containing the transformation to apply to the coordinate system.  Can also be
-        provided as a position, 3-component scale, and rotation, using a mix of `Vectors` or
-        numbers.
-      ]]
+      description = 'A matrix containing the transformation to apply.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Transform the coordinate system using numbers.',
+      arguments = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' },
+      returns = {}
+    },
+    {
+      description = 'Transform the coordinate system using vector types.',
+      arguments = { 'translation', 'scale', 'rotation' },
+      returns = {}
+    },
+    {
+      description = 'Transform the coordinate system using a matrix.',
       arguments = { 'transform' },
       arguments = { 'transform' },
       returns = {}
       returns = {}
     }
     }

+ 19 - 3
api/lovr/graphics/Pass/translate.lua

@@ -3,16 +3,32 @@ return {
   summary = 'Translate the coordinate system.',
   summary = 'Translate the coordinate system.',
   description = 'Translates the coordinate system.',
   description = 'Translates the coordinate system.',
   arguments = {
   arguments = {
+    x = {
+      type = 'number',
+      description = 'The x component of the translation.'
+    },
+    y = {
+      type = 'number',
+      description = 'The y component of the translation.'
+    },
+    z = {
+      type = 'number',
+      description = 'The z component of the translation.'
+    },
     translation = {
     translation = {
       type = 'Vec3',
       type = 'Vec3',
-      description = [[
-        The translation to apply to the coordinate system.  Can also be provided as 3 numbers.
-      ]]
+      description = 'The translation.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Translate the coordinate system using numbers.',
+      arguments = { 'x', 'y', 'z' },
+      returns = {}
+    },
+    {
+      description = 'Translate the coordinate system using a vector.',
       arguments = { 'translation' },
       arguments = { 'translation' },
       returns = {}
       returns = {}
     }
     }

+ 58 - 5
api/lovr/math/Mat4/set.lua

@@ -13,24 +13,61 @@ return {
       type = 'mat4',
       type = 'mat4',
       description = 'An existing matrix to copy the values from.'
       description = 'An existing matrix to copy the values from.'
     },
     },
+    x = {
+      type = 'number',
+      description = 'The x component of the translation.'
+    },
+    y = {
+      type = 'number',
+      description = 'The y component of the translation.'
+    },
+    z = {
+      type = 'number',
+      description = 'The z component of the translation.'
+    },
+    sx = {
+      type = 'number',
+      description = 'The x component of the scale.'
+    },
+    sy = {
+      type = 'number',
+      description = 'The y component of the scale.'
+    },
+    sz = {
+      type = 'number',
+      description = 'The z component of the scale.'
+    },
+    angle = {
+      type = 'number',
+      description = 'The angle of the rotation, in radians.'
+    },
+    ax = {
+      type = 'number',
+      description = 'The x component of the axis of rotation.'
+    },
+    ay = {
+      type = 'number',
+      description = 'The y component of the axis of rotation.'
+    },
+    az = {
+      type = 'number',
+      description = 'The z component of the axis of rotation.'
+    },
     position = {
     position = {
       type = 'Vec3',
       type = 'Vec3',
-      default = '0, 0, 0',
       description = 'The translation of the matrix.'
       description = 'The translation of the matrix.'
     },
     },
     scale = {
     scale = {
       type = 'Vec3',
       type = 'Vec3',
-      default = '1, 1, 1',
       description = 'The scale of the matrix.'
       description = 'The scale of the matrix.'
     },
     },
     rotation = {
     rotation = {
       type = 'Quat',
       type = 'Quat',
-      default = '0, 0, 0, 1',
       description = 'The rotation of the matrix.'
       description = 'The rotation of the matrix.'
     },
     },
     ['...'] = {
     ['...'] = {
       type = 'number',
       type = 'number',
-      description = '16 numbers to use as the raw values of the matrix (column-major).'
+      description = 'The raw values of the matrix, in column-major order.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -41,7 +78,9 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      description = 'Resets the matrix to the identity matrix.',
+      description = [[
+        Resets the matrix to the identity matrix, without any translation, rotation, or scale.
+      ]],
       arguments = {},
       arguments = {},
       returns = { 'm' }
       returns = { 'm' }
     },
     },
@@ -50,6 +89,19 @@ return {
       arguments = { 'n' },
       arguments = { 'n' },
       returns = { 'm' }
       returns = { 'm' }
     },
     },
+    {
+      description = 'Sets the position, scale, and rotation of the matrix using numbers.',
+      arguments = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' },
+      returns = { 'm' }
+    },
+    {
+      description = [[
+        Sets the pose (position and orientation) of the matrix using numbers.  The scale is set to 1
+        on all axes.
+      ]],
+      arguments = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
+      returns = { 'm' }
+    },
     {
     {
       arguments = { 'position', 'scale', 'rotation' },
       arguments = { 'position', 'scale', 'rotation' },
       returns = { 'm' }
       returns = { 'm' }
@@ -59,6 +111,7 @@ return {
       returns = { 'm' }
       returns = { 'm' }
     },
     },
     {
     {
+      description = 'Sets the raw components of the matrix using 16 numbers in column-major order.',
       arguments = { '...' },
       arguments = { '...' },
       returns = { 'm' }
       returns = { 'm' }
     },
     },

+ 14 - 2
api/lovr/math/newCurve.lua

@@ -19,13 +19,17 @@ return {
       type = 'number',
       type = 'number',
       description = 'The z coordinate of the first control point.'
       description = 'The z coordinate of the first control point.'
     },
     },
+    v = {
+      type = 'Vec3',
+      description = 'The first control point.'
+    },
     ['...'] = {
     ['...'] = {
       type = '*',
       type = '*',
       description = 'Additional control points.'
       description = 'Additional control points.'
     },
     },
     points = {
     points = {
       type = 'table',
       type = 'table',
-      description = 'A table of points, as above.'
+      description = 'A table of control points, formatted as numbers or `Vec3` objects.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -41,7 +45,15 @@ return {
       returns = { 'curve' }
       returns = { 'curve' }
     },
     },
     {
     {
-      description = 'Create a Curve from a (flat) table of points.',
+      description = 'Create a Curve from a set of initial control points, using vectors.',
+      arguments = { 'v', '...' },
+      returns = { 'curve' }
+    },
+    {
+      description = [[
+        Create a Curve from control points in a table.  The table values can be numbers or `Vec3`
+        objects.
+      ]],
       arguments = { 'points' },
       arguments = { 'points' },
       returns = { 'curve' }
       returns = { 'curve' }
     },
     },

+ 10 - 0
api/lovr/physics/BallJoint/setAnchor.lua

@@ -13,13 +13,23 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate of the anchor point, in world coordinates.'
       description = 'The z coordinate of the anchor point, in world coordinates.'
+    },
+    anchor = {
+      type = 'Vec3',
+      description = 'The anchor point, in world coordinates.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Sets the anchor point using numbers.',
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Sets the anchor point using a vector.',
+      arguments = { 'anchor' },
+      returns = {}
     }
     }
   }
   }
 }
 }

+ 16 - 0
api/lovr/physics/Collider/applyForce.lua

@@ -25,6 +25,14 @@ return {
     pz = {
     pz = {
       type = 'number',
       type = 'number',
       description = 'The z position to apply the force at, in world coordinates.'
       description = 'The z position to apply the force at, in world coordinates.'
+    },
+    force = {
+      type = 'Vec3',
+      description = 'The force vector to apply.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position to apply the force at, in world coordinates.'
     }
     }
   },
   },
   returns = {},
   returns = {},
@@ -36,6 +44,14 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z', 'px', 'py', 'pz' },
       arguments = { 'x', 'y', 'z', 'px', 'py', 'pz' },
       returns = {}
       returns = {}
+    },
+    {
+      arguments = { 'force' },
+      returns = {}
+    },
+    {
+      arguments = { 'force', 'position' },
+      returns = {}
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 8 - 0
api/lovr/physics/Collider/applyTorque.lua

@@ -13,6 +13,10 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z component of the torque.'
       description = 'The z component of the torque.'
+    },
+    torque = {
+      type = 'Vec3',
+      description = 'The torque to apply.'
     }
     }
   },
   },
   returns = {},
   returns = {},
@@ -20,6 +24,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = {}
       returns = {}
+    },
+    {
+      arguments = { 'torque' },
+      returns = {}
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 9 - 3
api/lovr/physics/Collider/getLinearVelocityFromLocalPoint.lua

@@ -1,8 +1,6 @@
 return {
 return {
   summary = 'Get the linear velocity of the Collider at a point.',
   summary = 'Get the linear velocity of the Collider at a point.',
-  description = [[
-    Returns the linear velocity of a point relative to the Collider.
-  ]],
+  description = 'Returns the linear velocity of a point relative to the Collider.',
   arguments = {
   arguments = {
     x = {
     x = {
       type = 'number',
       type = 'number',
@@ -15,6 +13,10 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate.'
       description = 'The z coordinate.'
+    },
+    point = {
+      type = 'number',
+      description = 'The point.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -35,6 +37,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = { 'vx', 'vy', 'vz' }
       returns = { 'vx', 'vy', 'vz' }
+    },
+    {
+      arguments = { 'point' },
+      returns = { 'vx', 'vy', 'vz' }
     }
     }
   },
   },
   related = {
   related = {

+ 8 - 0
api/lovr/physics/Collider/getLinearVelocityFromWorldPoint.lua

@@ -15,6 +15,10 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate in world space.'
       description = 'The z coordinate in world space.'
+    },
+    point = {
+      type = 'Vec3',
+      descriptio = 'The point.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -35,6 +39,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = { 'vx', 'vy', 'vz' }
       returns = { 'vx', 'vy', 'vz' }
+    },
+    {
+      arguments = { 'point' },
+      returns = { 'vx', 'vy', 'vz' }
     }
     }
   },
   },
   related = {
   related = {

+ 8 - 0
api/lovr/physics/Collider/getLocalPoint.lua

@@ -15,6 +15,10 @@ return {
     wz = {
     wz = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate of the world point.'
       description = 'The z coordinate of the world point.'
+    },
+    point = {
+      type = 'Vec3',
+      description = 'The world point.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -35,6 +39,10 @@ return {
     {
     {
       arguments = { 'wx', 'wy', 'wz' },
       arguments = { 'wx', 'wy', 'wz' },
       returns = { 'x', 'y', 'z' }
       returns = { 'x', 'y', 'z' }
+    },
+    {
+      arguments = { 'point' },
+      returns = { 'x', 'y', 'z' }
     }
     }
   },
   },
   related = {
   related = {

+ 9 - 3
api/lovr/physics/Collider/getLocalVector.lua

@@ -1,8 +1,6 @@
 return {
 return {
   summary = 'Convert a vector from world space to local space.',
   summary = 'Convert a vector from world space to local space.',
-  description = [[
-    Converts a direction vector from world space to local space.
-  ]],
+  description = ' Converts a direction vector from world space to local space.',
   arguments = {
   arguments = {
     wx = {
     wx = {
       type = 'number',
       type = 'number',
@@ -15,6 +13,10 @@ return {
     wz = {
     wz = {
       type = 'number',
       type = 'number',
       description = 'The z component of the world vector.'
       description = 'The z component of the world vector.'
+    },
+    vector = {
+      type = 'Vec3',
+      description = 'The world vector.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -35,6 +37,10 @@ return {
     {
     {
       arguments = { 'wx', 'wy', 'wz' },
       arguments = { 'wx', 'wy', 'wz' },
       returns = { 'x', 'y', 'z' }
       returns = { 'x', 'y', 'z' }
+    },
+    {
+      arguments = { 'vector' },
+      returns = { 'x', 'y', 'z' }
     }
     }
   },
   },
   related = {
   related = {

+ 8 - 0
api/lovr/physics/Collider/getWorldPoint.lua

@@ -13,6 +13,10 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z position of the point.'
       description = 'The z position of the point.'
+    },
+    point = {
+      type = 'Vec3',
+      description = 'The local point.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -33,6 +37,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = { 'wx', 'wy', 'wz' }
       returns = { 'wx', 'wy', 'wz' }
+    },
+    {
+      arguments = { 'point' },
+      returns = { 'wx', 'wy', 'wz' }
     }
     }
   },
   },
   related = {
   related = {

+ 8 - 0
api/lovr/physics/Collider/getWorldVector.lua

@@ -15,6 +15,10 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate of the local vector.'
       description = 'The z coordinate of the local vector.'
+    },
+    vector = {
+      type = 'Vec3',
+      description = 'The local vector.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -35,6 +39,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = { 'wx', 'wy', 'wz' }
       returns = { 'wx', 'wy', 'wz' }
+    },
+    {
+      arguments = { 'vector' },
+      returns = { 'wx', 'wy', 'wz' }
     }
     }
   },
   },
   related = {
   related = {

+ 10 - 0
api/lovr/physics/Collider/setAngularVelocity.lua

@@ -13,13 +13,23 @@ return {
     vz = {
     vz = {
       type = 'number',
       type = 'number',
       description = 'The z component of the angular velocity.'
       description = 'The z component of the angular velocity.'
+    },
+    velocity = {
+      type = 'Vec3',
+      description = 'The angular velocity of the Collider.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Sets the angular velocity of the Collider using numbers.',
       arguments = { 'vx', 'vy', 'vz' },
       arguments = { 'vx', 'vy', 'vz' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Sets the angular velocity of the Collider using a vector.',
+      arguments = { 'velocity' },
+      returns = {}
     }
     }
   },
   },
   related = {
   related = {

+ 10 - 0
api/lovr/physics/Collider/setLinearVelocity.lua

@@ -17,13 +17,23 @@ return {
     vz = {
     vz = {
       type = 'number',
       type = 'number',
       description = 'The z velocity of the Collider, in meters per second.'
       description = 'The z velocity of the Collider, in meters per second.'
+    },
+    velocity = {
+      type = 'Vec3',
+      description = 'The velocity of the Collider, in meters per second.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the linear velocity of the collider using numbers.',
       arguments = { 'vx', 'vy', 'vz' },
       arguments = { 'vx', 'vy', 'vz' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the linear velocity of the collider using a vector.',
+      arguments = { 'velocity' },
+      returns = {}
     }
     }
   },
   },
   related = {
   related = {

+ 10 - 0
api/lovr/physics/Collider/setOrientation.lua

@@ -17,13 +17,23 @@ return {
     az = {
     az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
+    },
+    orientation = {
+      type = 'Quat',
+      description = 'The orientation of the Collider.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the orientation of the Collider using numbers.',
       arguments = { 'angle', 'ax', 'ay', 'az' },
       arguments = { 'angle', 'ax', 'ay', 'az' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the orientation of the Collider using a quaternion.',
+      arguments = { 'orientation' },
+      returns = {}
     }
     }
   },
   },
   related = {
   related = {

+ 14 - 0
api/lovr/physics/Collider/setPose.lua

@@ -29,13 +29,27 @@ return {
     az = {
     az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position of the Collider, in meters.'
+    },
+    orientation = {
+      type = 'Quat',
+      description = 'The orientation of the Collider.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the pose of the Collider using numbers.',
       arguments = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
       arguments = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the pose of the Collider using vector types.',
+      arguments = { 'position', 'orientation' },
+      returns = {}
     }
     }
   },
   },
   related = {
   related = {

+ 10 - 0
api/lovr/physics/Collider/setPosition.lua

@@ -13,13 +13,23 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z position of the Collider, in meters.'
       description = 'The z position of the Collider, in meters.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position of the Collider, in meters.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the position of the Collider using numbers.',
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the position of the Collider using a vector.',
+      arguments = { 'position' },
+      returns = {}
     }
     }
   },
   },
   related = {
   related = {

+ 14 - 0
api/lovr/physics/DistanceJoint/setAnchors.lua

@@ -25,13 +25,27 @@ return {
     z2 = {
     z2 = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate of the second anchor point, in world coordinates.'
       description = 'The z coordinate of the second anchor point, in world coordinates.'
+    },
+    first = {
+      type = 'Vec3',
+      description = 'The first anchor point, in world coordinates.'
+    },
+    second = {
+      type = 'Vec3',
+      description = 'The second anchor point, in world coordinates.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Sets the anchor points using numbers.',
       arguments = { 'x1', 'y1', 'z1', 'x2', 'y2', 'z2' },
       arguments = { 'x1', 'y1', 'z1', 'x2', 'y2', 'z2' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Sets the anchor points using vectors.',
+      arguments = { 'first', 'second' },
+      returns = {}
     }
     }
   }
   }
 }
 }

+ 10 - 0
api/lovr/physics/HingeJoint/setAnchor.lua

@@ -13,13 +13,23 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate of the anchor point, in world coordinates.'
       description = 'The z coordinate of the anchor point, in world coordinates.'
+    },
+    anchor = {
+      type = 'Vec3',
+      description = 'The anchor point, in world coordinates.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Sets the anchor point using numbers.',
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Sets the anchor point using a vector.',
+      arguments = { 'anchor' },
+      returns = {}
     }
     }
   }
   }
 }
 }

+ 10 - 0
api/lovr/physics/HingeJoint/setAxis.lua

@@ -13,13 +13,23 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis.'
       description = 'The z component of the axis.'
+    },
+    axis = {
+      type = 'Vec3',
+      description = 'The axis.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the axis using numbers.',
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the axis using a vector.',
+      arguments = { 'axis' },
+      returns = {}
     }
     }
   }
   }
 }
 }

+ 10 - 0
api/lovr/physics/Shape/setOrientation.lua

@@ -17,13 +17,23 @@ return {
     az = {
     az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the rotation axis.'
       description = 'The z component of the rotation axis.'
+    },
+    orientation = {
+      type = 'Quat',
+      description = 'The orientation of the Shape.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the orientation of the Shape using numbers.',
       arguments = { 'angle', 'ax', 'ay', 'az' },
       arguments = { 'angle', 'ax', 'ay', 'az' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the orientation of the Shape using a quaternion.',
+      arguments = { 'orientation' },
+      returns = {}
     }
     }
   },
   },
   notes = 'If the Shape isn\'t attached to a Collider, this will error.',
   notes = 'If the Shape isn\'t attached to a Collider, this will error.',

+ 10 - 0
api/lovr/physics/Shape/setPosition.lua

@@ -13,14 +13,24 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z offset.'
       description = 'The z offset.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position.'
     }
     }
   },
   },
   notes = 'If the Shape isn\'t attached to a Collider, this will error.',
   notes = 'If the Shape isn\'t attached to a Collider, this will error.',
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the position of the Shape using numbers.',
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the position of the Shape using a vector.',
+      arguments = { 'position' },
+      returns = {}
     }
     }
   },
   },
   related = {
   related = {

+ 10 - 0
api/lovr/physics/SliderJoint/setAxis.lua

@@ -13,13 +13,23 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis.'
       description = 'The z component of the axis.'
+    },
+    axis = {
+      type = 'Vec3',
+      description = 'The axis.'
     }
     }
   },
   },
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
+      description = 'Set the axis using numbers.',
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = {}
       returns = {}
+    },
+    {
+      description = 'Set the axis using a vector.',
+      arguments = { 'axis' },
+      returns = {}
     }
     }
   }
   }
 }
 }

+ 12 - 0
api/lovr/physics/World/newBoxCollider.lua

@@ -32,6 +32,14 @@ return {
       type = 'number',
       type = 'number',
       default = 'width',
       default = 'width',
       description = 'The total depth of the box, in meters.'
       description = 'The total depth of the box, in meters.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position of the center of the box, in meters.'
+    },
+    size = {
+      type = 'Vec3',
+      description = 'The size of the box, in meters.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -44,6 +52,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z', 'width', 'height', 'depth' },
       arguments = { 'x', 'y', 'z', 'width', 'height', 'depth' },
       returns = { 'collider' }
       returns = { 'collider' }
+    },
+    {
+      arguments = { 'position', 'size' },
+      returns = { 'collider' }
     }
     }
   },
   },
   related = {
   related = {

+ 11 - 3
api/lovr/physics/World/newCapsuleCollider.lua

@@ -6,17 +6,17 @@ return {
     x = {
     x = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
-      description = 'The x coordinate of the center of the capsule.'
+      description = 'The x coordinate of the center of the capsule, in meters.'
     },
     },
     y = {
     y = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
-      description = 'The y coordinate of the center of the capsule.'
+      description = 'The y coordinate of the center of the capsule, in meters.'
     },
     },
     z = {
     z = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
-      description = 'The z coordinate of the center of the capsule.'
+      description = 'The z coordinate of the center of the capsule, in meters.'
     },
     },
     radius = {
     radius = {
       type = 'number',
       type = 'number',
@@ -27,6 +27,10 @@ return {
       type = 'number',
       type = 'number',
       default = '1',
       default = '1',
       description = 'The length of the capsule, not including the caps, in meters.'
       description = 'The length of the capsule, not including the caps, in meters.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position of the center of the capsule, in meters.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -39,6 +43,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z', 'radius', 'length' },
       arguments = { 'x', 'y', 'z', 'radius', 'length' },
       returns = { 'collider' }
       returns = { 'collider' }
+    },
+    {
+      arguments = { 'position', 'radius', 'length' },
+      returns = { 'collider' }
     }
     }
   },
   },
   related = {
   related = {

+ 8 - 0
api/lovr/physics/World/newCollider.lua

@@ -17,6 +17,10 @@ return {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
       description = 'The z position of the Collider.'
       description = 'The z position of the Collider.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position of the Collider.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -29,6 +33,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z' },
       arguments = { 'x', 'y', 'z' },
       returns = { 'collider' }
       returns = { 'collider' }
+    },
+    {
+      arguments = { 'position' },
+      returns = { 'collider' }
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 11 - 3
api/lovr/physics/World/newCylinderCollider.lua

@@ -6,17 +6,17 @@ return {
     x = {
     x = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
-      description = 'The x coordinate of the center of the cylinder.'
+      description = 'The x coordinate of the center of the cylinder, in meters.'
     },
     },
     y = {
     y = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
-      description = 'The y coordinate of the center of the cylinder.'
+      description = 'The y coordinate of the center of the cylinder, in meters.'
     },
     },
     z = {
     z = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
-      description = 'The z coordinate of the center of the cylinder.'
+      description = 'The z coordinate of the center of the cylinder, in meters.'
     },
     },
     radius = {
     radius = {
       type = 'number',
       type = 'number',
@@ -27,6 +27,10 @@ return {
       type = 'number',
       type = 'number',
       default = '1',
       default = '1',
       description = 'The length of the cylinder, in meters.'
       description = 'The length of the cylinder, in meters.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position of the center of the cylinder, in meters.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -39,6 +43,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z', 'radius', 'length' },
       arguments = { 'x', 'y', 'z', 'radius', 'length' },
       returns = { 'collider' }
       returns = { 'collider' }
+    },
+    {
+      arguments = { 'position', 'radius', 'length' },
+      returns = { 'collider' }
     }
     }
   },
   },
   related = {
   related = {

+ 11 - 3
api/lovr/physics/World/newSphereCollider.lua

@@ -6,22 +6,26 @@ return {
     x = {
     x = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
-      description = 'The x coordinate of the center of the sphere.'
+      description = 'The x coordinate of the center of the sphere, in meters.'
     },
     },
     y = {
     y = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
-      description = 'The y coordinate of the center of the sphere.'
+      description = 'The y coordinate of the center of the sphere, in meters.'
     },
     },
     z = {
     z = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
-      description = 'The z coordinate of the center of the sphere.'
+      description = 'The z coordinate of the center of the sphere, in meters.'
     },
     },
     radius = {
     radius = {
       type = 'number',
       type = 'number',
       default = '1',
       default = '1',
       description = 'The radius of the sphere, in meters.'
       description = 'The radius of the sphere, in meters.'
+    },
+    position = {
+      type = 'Vec3',
+      description = 'The position of the center of the sphere, in meters.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -34,6 +38,10 @@ return {
     {
     {
       arguments = { 'x', 'y', 'z', 'radius' },
       arguments = { 'x', 'y', 'z', 'radius' },
       returns = { 'collider' }
       returns = { 'collider' }
+    },
+    {
+      arguments = { 'position', 'radius' },
+      returns = { 'collider' }
     }
     }
   },
   },
   related = {
   related = {

+ 12 - 6
api/lovr/physics/World/raycast.lua

@@ -29,6 +29,14 @@ return {
       type = 'number',
       type = 'number',
       description = 'The z coordinate of the ending position of the ray.',
       description = 'The z coordinate of the ending position of the ray.',
     },
     },
+    start = {
+      type = 'Vec3',
+      description = 'The starting position of the ray.'
+    },
+    ['end'] = {
+      type = 'Vec3',
+      description = 'The end position of the ray.'
+    },
     callback = {
     callback = {
       type = 'function',
       type = 'function',
       arguments = {
       arguments = {
@@ -62,12 +70,6 @@ return {
         }
         }
       },
       },
       returns = {},
       returns = {},
-  variants = {
-    {
-      arguments = { 'x1', 'y1', 'z1', 'x2', 'y2', 'z2', 'callback' },
-      returns = {}
-    }
-  },
       description = 'The function to call when an intersection is detected.'
       description = 'The function to call when an intersection is detected.'
     }
     }
   },
   },
@@ -76,6 +78,10 @@ return {
     {
     {
       arguments = { 'x1', 'y1', 'z1', 'x2', 'y2', 'z2', 'callback' },
       arguments = { 'x1', 'y1', 'z1', 'x2', 'y2', 'z2', 'callback' },
       returns = {}
       returns = {}
+    },
+    {
+      arguments = { 'start', 'end', 'callback' },
+      returns = {}
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 8 - 0
api/lovr/physics/World/setGravity.lua

@@ -14,6 +14,10 @@ return {
     zg = {
     zg = {
       type = 'number',
       type = 'number',
       description = 'The z component of the gravity force.'
       description = 'The z component of the gravity force.'
+    },
+    gravity = {
+      type = 'Vec3',
+      description = 'The gravity force.'
     }
     }
   },
   },
   returns = {},
   returns = {},
@@ -21,6 +25,10 @@ return {
     {
     {
       arguments = { 'xg', 'yg', 'zg' },
       arguments = { 'xg', 'yg', 'zg' },
       returns = {}
       returns = {}
+    },
+    {
+      arguments = { 'gravity' },
+      returns = {}
     }
     }
   }
   }
 }
 }

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

@@ -22,6 +22,10 @@ return {
     z = {
     z = {
       type = 'number',
       type = 'number',
       description = 'The z position of the joint anchor point, in world coordinates.'
       description = 'The z position of the joint anchor point, in world coordinates.'
+    },
+    anchor = {
+      type = 'Vec3',
+      description = 'The joint anchor point, in world coordinates.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -34,6 +38,10 @@ return {
     {
     {
       arguments = { 'colliderA', 'colliderB', 'x', 'y', 'z' },
       arguments = { 'colliderA', 'colliderB', 'x', 'y', 'z' },
       returns = { 'ball' }
       returns = { 'ball' }
+    },
+    {
+      arguments = { 'colliderA', 'colliderB', 'anchor' },
+      returns = { 'ball' }
     }
     }
   },
   },
   notes = [[
   notes = [[

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

@@ -34,6 +34,14 @@ return {
     z2 = {
     z2 = {
       type = 'number',
       type = 'number',
       description = 'The z position of the second anchor point, in world coordinates.'
       description = 'The z position of the second anchor point, in world coordinates.'
+    },
+    first = {
+      type = 'Vec3',
+      description = 'The first anchor point, in world coordinates.'
+    },
+    second = {
+      type = 'Vec3',
+      description = 'The second anchor point, in world coordinates.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -46,6 +54,10 @@ return {
     {
     {
       arguments = { 'colliderA', 'colliderB', 'x1', 'y1', 'z1', 'x2', 'y2', 'z2' },
       arguments = { 'colliderA', 'colliderB', 'x1', 'y1', 'z1', 'x2', 'y2', 'z2' },
       returns = { 'joint' }
       returns = { 'joint' }
+    },
+    {
+      arguments = { 'colliderA', 'colliderB', 'first', 'second' },
+      returns = { 'joint' }
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 15 - 3
api/lovr/physics/newHingeJoint.lua

@@ -25,15 +25,23 @@ return {
     },
     },
     ax = {
     ax = {
       type = 'number',
       type = 'number',
-      description = 'The x component of the hinge axis.'
+      description = 'The x component of the hinge axis direction.'
     },
     },
     ay = {
     ay = {
       type = 'number',
       type = 'number',
-      description = 'The y component of the hinge axis.'
+      description = 'The y component of the hinge axis direction.'
     },
     },
     az = {
     az = {
       type = 'number',
       type = 'number',
-      description = 'The z component of the hinge axis.'
+      description = 'The z component of the hinge axis direction.'
+    },
+    anchor = {
+      type = 'Vec3',
+      description = 'The anchor point, in world coordinates.'
+    },
+    axis = {
+      type = 'Vec3',
+      description = 'The hinge axis direction.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -46,6 +54,10 @@ return {
     {
     {
       arguments = { 'colliderA', 'colliderB', 'x', 'y', 'z', 'ax', 'ay', 'az' },
       arguments = { 'colliderA', 'colliderB', 'x', 'y', 'z', 'ax', 'ay', 'az' },
       returns = { 'hinge' }
       returns = { 'hinge' }
+    },
+    {
+      arguments = { 'colliderA', 'colliderB', 'anchor', 'axis' },
+      returns = { 'hinge' }
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 8 - 0
api/lovr/physics/newSliderJoint.lua

@@ -22,6 +22,10 @@ return {
     az = {
     az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the slider axis.'
       description = 'The z component of the slider axis.'
+    },
+    axis = {
+      type = 'Vec3',
+      description = 'The slider axis direction.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -34,6 +38,10 @@ return {
     {
     {
       arguments = { 'colliderA', 'colliderB', 'ax', 'ay', 'az' },
       arguments = { 'colliderA', 'colliderB', 'ax', 'ay', 'az' },
       returns = { 'slider' }
       returns = { 'slider' }
+    },
+    {
+      arguments = { 'colliderA', 'colliderB', 'axis' },
+      returns = { 'slider' }
     }
     }
   },
   },
   notes = [[
   notes = [[

Some files were not shown because too many files changed in this diff