Browse Source

Also convert objects to use expanded variant format;

bjorn 2 years ago
parent
commit
c241f9cab7
100 changed files with 1275 additions and 1108 deletions
  1. 496 742
      api/init.lua
  2. 7 2
      api/lovr/audio/Source/clone.lua
  3. 8 4
      api/lovr/audio/Source/getDirectivity.lua
  4. 8 4
      api/lovr/audio/Source/getDuration.lua
  5. 10 8
      api/lovr/audio/Source/getOrientation.lua
  6. 13 14
      api/lovr/audio/Source/getPose.lua
  7. 9 6
      api/lovr/audio/Source/getPosition.lua
  8. 7 2
      api/lovr/audio/Source/getRadius.lua
  9. 7 2
      api/lovr/audio/Source/getSound.lua
  10. 8 4
      api/lovr/audio/Source/getVolume.lua
  11. 8 4
      api/lovr/audio/Source/isEffectEnabled.lua
  12. 7 2
      api/lovr/audio/Source/isLooping.lua
  13. 7 2
      api/lovr/audio/Source/isPlaying.lua
  14. 7 1
      api/lovr/audio/Source/pause.lua
  15. 7 2
      api/lovr/audio/Source/play.lua
  16. 8 4
      api/lovr/audio/Source/seek.lua
  17. 9 5
      api/lovr/audio/Source/setDirectivity.lua
  18. 8 4
      api/lovr/audio/Source/setEffectEnabled.lua
  19. 7 2
      api/lovr/audio/Source/setLooping.lua
  20. 10 8
      api/lovr/audio/Source/setOrientation.lua
  21. 13 14
      api/lovr/audio/Source/setPose.lua
  22. 10 7
      api/lovr/audio/Source/setPosition.lua
  23. 8 3
      api/lovr/audio/Source/setRadius.lua
  24. 8 4
      api/lovr/audio/Source/setVolume.lua
  25. 6 0
      api/lovr/audio/Source/stop.lua
  26. 8 4
      api/lovr/audio/Source/tell.lua
  27. 7 2
      api/lovr/data/Blob/getName.lua
  28. 7 2
      api/lovr/data/Blob/getPointer.lua
  29. 7 2
      api/lovr/data/Blob/getSize.lua
  30. 7 2
      api/lovr/data/Blob/getString.lua
  31. 7 2
      api/lovr/data/Image/encode.lua
  32. 7 2
      api/lovr/data/Image/getBlob.lua
  33. 8 4
      api/lovr/data/Image/getDimensions.lua
  34. 7 2
      api/lovr/data/Image/getFormat.lua
  35. 7 2
      api/lovr/data/Image/getHeight.lua
  36. 12 12
      api/lovr/data/Image/getPixel.lua
  37. 7 2
      api/lovr/data/Image/getWidth.lua
  38. 13 14
      api/lovr/data/Image/paste.lua
  39. 12 12
      api/lovr/data/Image/setPixel.lua
  40. 7 2
      api/lovr/data/ModelData/getAnimationCount.lua
  41. 8 4
      api/lovr/data/ModelData/getAnimationName.lua
  42. 8 4
      api/lovr/data/ModelData/getBlob.lua
  43. 7 2
      api/lovr/data/ModelData/getBlobCount.lua
  44. 12 12
      api/lovr/data/ModelData/getBoundingBox.lua
  45. 10 8
      api/lovr/data/ModelData/getBoundingSphere.lua
  46. 9 6
      api/lovr/data/ModelData/getCenter.lua
  47. 7 2
      api/lovr/data/ModelData/getDepth.lua
  48. 9 6
      api/lovr/data/ModelData/getDimensions.lua
  49. 7 2
      api/lovr/data/ModelData/getHeight.lua
  50. 8 4
      api/lovr/data/ModelData/getImage.lua
  51. 7 2
      api/lovr/data/ModelData/getImageCount.lua
  52. 7 2
      api/lovr/data/ModelData/getMaterialCount.lua
  53. 8 4
      api/lovr/data/ModelData/getMaterialName.lua
  54. 7 2
      api/lovr/data/ModelData/getMeshCount.lua
  55. 8 4
      api/lovr/data/ModelData/getMeshDrawMode.lua
  56. 9 6
      api/lovr/data/ModelData/getMeshIndex.lua
  57. 8 4
      api/lovr/data/ModelData/getMeshIndexCount.lua
  58. 11 10
      api/lovr/data/ModelData/getMeshIndexFormat.lua
  59. 8 4
      api/lovr/data/ModelData/getMeshMaterial.lua
  60. 9 6
      api/lovr/data/ModelData/getMeshVertex.lua
  61. 8 4
      api/lovr/data/ModelData/getMeshVertexCount.lua
  62. 8 4
      api/lovr/data/ModelData/getMeshVertexFormat.lua
  63. 7 2
      api/lovr/data/ModelData/getMetadata.lua
  64. 7 2
      api/lovr/data/ModelData/getNodeCount.lua
  65. 8 4
      api/lovr/data/ModelData/getNodeName.lua
  66. 7 2
      api/lovr/data/ModelData/getRootNode.lua
  67. 7 2
      api/lovr/data/ModelData/getSkinCount.lua
  68. 9 6
      api/lovr/data/ModelData/getSkinInverseBindMatrix.lua
  69. 8 4
      api/lovr/data/ModelData/getSkinJoints.lua
  70. 7 2
      api/lovr/data/ModelData/getTriangleCount.lua
  71. 8 4
      api/lovr/data/ModelData/getTriangles.lua
  72. 7 2
      api/lovr/data/ModelData/getVertexCount.lua
  73. 7 2
      api/lovr/data/ModelData/getWidth.lua
  74. 7 2
      api/lovr/data/Rasterizer/getAdvance.lua
  75. 7 2
      api/lovr/data/Rasterizer/getAscent.lua
  76. 7 2
      api/lovr/data/Rasterizer/getDescent.lua
  77. 7 2
      api/lovr/data/Rasterizer/getGlyphCount.lua
  78. 7 2
      api/lovr/data/Rasterizer/getHeight.lua
  79. 7 2
      api/lovr/data/Rasterizer/getLineHeight.lua
  80. 8 4
      api/lovr/data/Rasterizer/hasGlyphs.lua
  81. 7 2
      api/lovr/data/Sound/getBlob.lua
  82. 7 2
      api/lovr/data/Sound/getCapacity.lua
  83. 7 2
      api/lovr/data/Sound/getChannelCount.lua
  84. 7 2
      api/lovr/data/Sound/getChannelLayout.lua
  85. 7 2
      api/lovr/data/Sound/getDuration.lua
  86. 7 2
      api/lovr/data/Sound/getFormat.lua
  87. 7 2
      api/lovr/data/Sound/getFrameCount.lua
  88. 7 2
      api/lovr/data/Sound/getSampleCount.lua
  89. 7 2
      api/lovr/data/Sound/getSampleRate.lua
  90. 7 2
      api/lovr/data/Sound/isCompressed.lua
  91. 7 2
      api/lovr/data/Sound/isStream.lua
  92. 8 4
      api/lovr/graphics/Buffer/clear.lua
  93. 7 2
      api/lovr/graphics/Buffer/getFormat.lua
  94. 7 2
      api/lovr/graphics/Buffer/getLength.lua
  95. 7 2
      api/lovr/graphics/Buffer/getPointer.lua
  96. 7 2
      api/lovr/graphics/Buffer/getSize.lua
  97. 7 2
      api/lovr/graphics/Buffer/getStride.lua
  98. 7 2
      api/lovr/graphics/Buffer/isTemporary.lua
  99. 7 2
      api/lovr/graphics/Font/getDescent.lua
  100. 7 2
      api/lovr/graphics/Font/getHeight.lua

File diff suppressed because it is too large
+ 496 - 742
api/init.lua


+ 7 - 2
api/lovr/audio/Source/clone.lua

@@ -8,12 +8,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'source',
+    source = {
       type = 'Source',
       type = 'Source',
       description = 'A genetically identical copy of the Source.'
       description = 'A genetically identical copy of the Source.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'source' }
+    }
+  },
   notes = [[
   notes = [[
     This is a good way to create multiple Sources that play the same sound, since the audio data
     This is a good way to create multiple Sources that play the same sound, since the audio data
     won't be loaded multiple times and can just be reused.  You can also create multiple `Source`
     won't be loaded multiple times and can just be reused.  You can also create multiple `Source`

+ 8 - 4
api/lovr/audio/Source/getDirectivity.lua

@@ -18,15 +18,19 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'weight',
+    weight = {
       type = 'number',
       type = 'number',
       description = 'The dipole weight.  0.0 is omnidirectional, 1.0 is a dipole, 0.5 is cardioid.'
       description = 'The dipole weight.  0.0 is omnidirectional, 1.0 is a dipole, 0.5 is cardioid.'
     },
     },
-    {
-      name = 'power',
+    power = {
       type = 'number',
       type = 'number',
       description = 'The dipole power, controlling how focused the directivity shape is.'
       description = 'The dipole power, controlling how focused the directivity shape is.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'weight', 'power' }
+    }
   }
   }
 }
 }

+ 8 - 4
api/lovr/audio/Source/getDuration.lua

@@ -3,20 +3,24 @@ return {
   summary = 'Get the duration of the Source.',
   summary = 'Get the duration of the Source.',
   description = 'Returns the duration of the Source.',
   description = 'Returns the duration of the Source.',
   arguments = {
   arguments = {
-    {
-      name = 'unit',
+    unit = {
       type = 'TimeUnit',
       type = 'TimeUnit',
       default = [['seconds']],
       default = [['seconds']],
       description = 'The unit to return.'
       description = 'The unit to return.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'duration',
+    duration = {
       type = 'number',
       type = 'number',
       description = 'The duration of the Source.'
       description = 'The duration of the Source.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'unit' },
+      returns = { 'duration' }
+    }
+  },
   related = {
   related = {
     'Sound:getDuration'
     'Sound:getDuration'
   }
   }

+ 10 - 8
api/lovr/audio/Source/getOrientation.lua

@@ -4,27 +4,29 @@ return {
   description = 'Returns the orientation of the Source, in angle/axis representation.',
   description = 'Returns the orientation of the Source, in angle/axis representation.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'angle',
+    angle = {
       type = 'number',
       type = 'number',
       description = 'The number of radians the Source is rotated around its axis of rotation.'
       description = 'The number of radians the Source is rotated around its axis of rotation.'
     },
     },
-    {
-      name = 'ax',
+    ax = {
       type = 'number',
       type = 'number',
       description = 'The x component of the axis of rotation.'
       description = 'The x component of the axis of rotation.'
     },
     },
-    {
-      name = 'ay',
+    ay = {
       type = 'number',
       type = 'number',
       description = 'The y component of the axis of rotation.'
       description = 'The y component of the axis of rotation.'
     },
     },
-    {
-      name = 'az',
+    az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'angle', 'ax', 'ay', 'az' }
+    }
+  },
   related = {
   related = {
     'Source:getPosition',
     'Source:getPosition',
     'Source:getPose',
     'Source:getPose',

+ 13 - 14
api/lovr/audio/Source/getPose.lua

@@ -4,42 +4,41 @@ return {
   description = 'Returns the position and orientation of the Source.',
   description = 'Returns the position and orientation of the Source.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'x',
+    x = {
       type = 'number',
       type = 'number',
       description = 'The x position of the Source, in meters.'
       description = 'The x position of the Source, in meters.'
     },
     },
-    {
-      name = 'y',
+    y = {
       type = 'number',
       type = 'number',
       description = 'The y position of the Source, in meters.'
       description = 'The y position of the Source, in meters.'
     },
     },
-    {
-      name = 'z',
+    z = {
       type = 'number',
       type = 'number',
       description = 'The z position of the Source, in meters.'
       description = 'The z position of the Source, in meters.'
     },
     },
-    {
-      name = 'angle',
+    angle = {
       type = 'number',
       type = 'number',
       description = 'The number of radians the Source is rotated around its axis of rotation.'
       description = 'The number of radians the Source is rotated around its axis of rotation.'
     },
     },
-    {
-      name = 'ax',
+    ax = {
       type = 'number',
       type = 'number',
       description = 'The x component of the axis of rotation.'
       description = 'The x component of the axis of rotation.'
     },
     },
-    {
-      name = 'ay',
+    ay = {
       type = 'number',
       type = 'number',
       description = 'The y component of the axis of rotation.'
       description = 'The y component of the axis of rotation.'
     },
     },
-    {
-      name = 'az',
+    az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
+    }
+  },
   related = {
   related = {
     'Source:getPosition',
     'Source:getPosition',
     'Source:getOrientation',
     'Source:getOrientation',

+ 9 - 6
api/lovr/audio/Source/getPosition.lua

@@ -7,22 +7,25 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'x',
+    x = {
       type = 'number',
       type = 'number',
       description = 'The x coordinate.'
       description = 'The x coordinate.'
     },
     },
-    {
-      name = 'y',
+    y = {
       type = 'number',
       type = 'number',
       description = 'The y coordinate.'
       description = 'The y coordinate.'
     },
     },
-    {
-      name = 'z',
+    z = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate.'
       description = 'The z coordinate.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'x', 'y', 'z' }
+    }
+  },
   related = {
   related = {
     'Source:getOrientation',
     'Source:getOrientation',
     'Source:getPose',
     'Source:getPose',

+ 7 - 2
api/lovr/audio/Source/getRadius.lua

@@ -11,10 +11,15 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'radius',
+    radius = {
       type = 'number',
       type = 'number',
       description = 'The radius of the Source, in meters.'
       description = 'The radius of the Source, in meters.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'radius' }
+    }
   }
   }
 }
 }

+ 7 - 2
api/lovr/audio/Source/getSound.lua

@@ -7,12 +7,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'sound',
+    sound = {
       type = 'Sound',
       type = 'Sound',
       description = 'The Sound object.'
       description = 'The Sound object.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'sound' }
+    }
+  },
   related = {
   related = {
     'Source:clone',
     'Source:clone',
     'lovr.audio.newSource'
     'lovr.audio.newSource'

+ 8 - 4
api/lovr/audio/Source/getVolume.lua

@@ -3,18 +3,22 @@ return {
   summary = 'Get the volume of the Source.',
   summary = 'Get the volume of the Source.',
   description = 'Returns the current volume factor for the Source.',
   description = 'Returns the current volume factor for the Source.',
   arguments = {
   arguments = {
-    {
-      name = 'units',
+    units = {
       type = 'VolumeUnit',
       type = 'VolumeUnit',
       default = [['linear']],
       default = [['linear']],
       description = 'The units to return (linear or db).'
       description = 'The units to return (linear or db).'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'volume',
+    volume = {
       type = 'number',
       type = 'number',
       description = 'The volume of the Source.'
       description = 'The volume of the Source.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = { 'units' },
+      returns = { 'volume' }
+    }
   }
   }
 }
 }

+ 8 - 4
api/lovr/audio/Source/isEffectEnabled.lua

@@ -3,19 +3,23 @@ return {
   summary = 'Check if an effect is enabled.',
   summary = 'Check if an effect is enabled.',
   description = 'Returns whether a given `Effect` is enabled for the Source.',
   description = 'Returns whether a given `Effect` is enabled for the Source.',
   arguments = {
   arguments = {
-    {
-      name = 'effect',
+    effect = {
       type = 'Effect',
       type = 'Effect',
       description = 'The effect.'
       description = 'The effect.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'enabled',
+    enabled = {
       type = 'boolean',
       type = 'boolean',
       description = 'Whether the effect is enabled.'
       description = 'Whether the effect is enabled.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'effect' },
+      returns = { 'enabled' }
+    }
+  },
   notes = [[
   notes = [[
     The active spatializer will determine which effects are supported.  If an unsupported effect is
     The active spatializer will determine which effects are supported.  If an unsupported effect is
     enabled on a Source, no error will be reported.  Instead, it will be silently ignored.  See
     enabled on a Source, no error will be reported.  Instead, it will be silently ignored.  See

+ 7 - 2
api/lovr/audio/Source/isLooping.lua

@@ -4,10 +4,15 @@ return {
   description = 'Returns whether or not the Source will loop when it finishes.',
   description = 'Returns whether or not the Source will loop when it finishes.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'looping',
+    looping = {
       type = 'boolean',
       type = 'boolean',
       description = 'Whether or not the Source is looping.'
       description = 'Whether or not the Source is looping.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'looping' }
+    }
   }
   }
 }
 }

+ 7 - 2
api/lovr/audio/Source/isPlaying.lua

@@ -4,12 +4,17 @@ return {
   description = 'Returns whether or not the Source is playing.',
   description = 'Returns whether or not the Source is playing.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'playing',
+    playing = {
       type = 'boolean',
       type = 'boolean',
       description = 'Whether the Source is playing.'
       description = 'Whether the Source is playing.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'playing' }
+    }
+  },
   related = {
   related = {
     'Source:play',
     'Source:play',
     'Source:pause',
     'Source:pause',

+ 7 - 1
api/lovr/audio/Source/pause.lua

@@ -6,5 +6,11 @@ return {
     is rewound, it will remain paused.
     is rewound, it will remain paused.
   ]],
   ]],
   arguments = {},
   arguments = {},
-  returns = {}
+  returns = {},
+  variants = {
+    {
+      arguments = {},
+      returns = {}
+    }
+  }
 }
 }

+ 7 - 2
api/lovr/audio/Source/play.lua

@@ -4,12 +4,17 @@ return {
   description = 'Plays the Source.  This doesn\'t do anything if the Source is already playing.',
   description = 'Plays the Source.  This doesn\'t do anything if the Source is already playing.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'success',
+    success = {
       type = 'boolean',
       type = 'boolean',
       description = 'Whether the Source successfully started playing.'
       description = 'Whether the Source successfully started playing.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'success' }
+    }
+  },
   notes = [[
   notes = [[
     There is a maximum of 64 Sources that can be playing at once.  If 64 Sources are already
     There is a maximum of 64 Sources that can be playing at once.  If 64 Sources are already
     playing, this function will return `false`.
     playing, this function will return `false`.

+ 8 - 4
api/lovr/audio/Source/seek.lua

@@ -3,18 +3,22 @@ return {
   summary = 'Set the playback position of the Source.',
   summary = 'Set the playback position of the Source.',
   description = 'Seeks the Source to the specified position.',
   description = 'Seeks the Source to the specified position.',
   arguments = {
   arguments = {
-    {
-      name = 'position',
+    position = {
       type = 'number',
       type = 'number',
       description = 'The position to seek to.'
       description = 'The position to seek to.'
     },
     },
-    {
-      name = 'unit',
+    unit = {
       type = 'TimeUnit',
       type = 'TimeUnit',
       default = [['seconds']],
       default = [['seconds']],
       description = 'The units for the seek position.'
       description = 'The units for the seek position.'
     }
     }
   },
   },
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = { 'position', 'unit' },
+      returns = {}
+    }
+  },
   notes = 'Seeking a Source backed by a stream `Sound` has no meaningful effect.'
   notes = 'Seeking a Source backed by a stream `Sound` has no meaningful effect.'
 }
 }

+ 9 - 5
api/lovr/audio/Source/setDirectivity.lua

@@ -17,16 +17,20 @@ return {
     that a power of zero will still result in an omnidirectional source, regardless of the weight.
     that a power of zero will still result in an omnidirectional source, regardless of the weight.
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'weight',
+    weight = {
       type = 'number',
       type = 'number',
       description = 'The dipole weight.  0.0 is omnidirectional, 1.0 is a dipole, 0.5 is cardioid.'
       description = 'The dipole weight.  0.0 is omnidirectional, 1.0 is a dipole, 0.5 is cardioid.'
     },
     },
-    {
-      name = 'power',
+    power = {
       type = 'number',
       type = 'number',
       description = 'The dipole power, controlling how focused the directivity shape is.'
       description = 'The dipole power, controlling how focused the directivity shape is.'
     }
     }
   },
   },
-  returns = {}
+  returns = {},
+  variants = {
+    {
+      arguments = { 'weight', 'power' },
+      returns = {}
+    }
+  }
 }
 }

+ 8 - 4
api/lovr/audio/Source/setEffectEnabled.lua

@@ -3,18 +3,22 @@ return {
   summary = 'Enable or disable an effect.',
   summary = 'Enable or disable an effect.',
   description = 'Enables or disables an effect on the Source.',
   description = 'Enables or disables an effect on the Source.',
   arguments = {
   arguments = {
-    {
-      name = 'effect',
+    effect = {
       type = 'Effect',
       type = 'Effect',
       description = 'The effect.'
       description = 'The effect.'
     },
     },
-    {
-      name = 'enable',
+    enable = {
       type = 'boolean',
       type = 'boolean',
       description = 'Whether the effect should be enabled.'
       description = 'Whether the effect should be enabled.'
     }
     }
   },
   },
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = { 'effect', 'enable' },
+      returns = {}
+    }
+  },
   notes = [[
   notes = [[
     The active spatializer will determine which effects are supported.  If an unsupported effect is
     The active spatializer will determine which effects are supported.  If an unsupported effect is
     enabled on a Source, no error will be reported.  Instead, it will be silently ignored.  See
     enabled on a Source, no error will be reported.  Instead, it will be silently ignored.  See

+ 7 - 2
api/lovr/audio/Source/setLooping.lua

@@ -3,12 +3,17 @@ return {
   summary = 'Set whether or not the Source loops.',
   summary = 'Set whether or not the Source loops.',
   description = 'Sets whether or not the Source loops.',
   description = 'Sets whether or not the Source loops.',
   arguments = {
   arguments = {
-    {
-      name = 'loop',
+    loop = {
       type = 'boolean',
       type = 'boolean',
       description = 'Whether or not the Source will loop.'
       description = 'Whether or not the Source will loop.'
     }
     }
   },
   },
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = { 'loop' },
+      returns = {}
+    }
+  },
   notes = 'Attempting to loop a Source backed by a stream `Sound` will cause an error.'
   notes = 'Attempting to loop a Source backed by a stream `Sound` will cause an error.'
 }
 }

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

@@ -3,28 +3,30 @@ return {
   summary = 'Set the orientation of the Source.',
   summary = 'Set the orientation of the Source.',
   description = 'Sets the orientation of the Source in angle/axis representation.',
   description = 'Sets the orientation of the Source in angle/axis representation.',
   arguments = {
   arguments = {
-    {
-      name = 'angle',
+    angle = {
       type = 'number',
       type = 'number',
       description = 'The number of radians the Source should be rotated around its rotation axis.'
       description = 'The number of radians the Source should be rotated around its rotation axis.'
     },
     },
-    {
-      name = 'ax',
+    ax = {
       type = 'number',
       type = 'number',
       description = 'The x component of the axis of rotation.'
       description = 'The x component of the axis of rotation.'
     },
     },
-    {
-      name = 'ay',
+    ay = {
       type = 'number',
       type = 'number',
       description = 'The y component of the axis of rotation.'
       description = 'The y component of the axis of rotation.'
     },
     },
-    {
-      name = 'az',
+    az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
     }
     }
   },
   },
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = { 'angle', 'ax', 'ay', 'az' },
+      returns = {}
+    }
+  },
   related = {
   related = {
     'Source:setPosition',
     'Source:setPosition',
     'Source:setPose',
     'Source:setPose',

+ 13 - 14
api/lovr/audio/Source/setPose.lua

@@ -3,43 +3,42 @@ return {
   summary = 'Set the pose of the Source.',
   summary = 'Set the pose of the Source.',
   description = 'Sets the position and orientation of the Source.',
   description = 'Sets the position and orientation of the Source.',
   arguments = {
   arguments = {
-    {
-      name = 'x',
+    x = {
       type = 'number',
       type = 'number',
       description = 'The x position of the Source, in meters.'
       description = 'The x position of the Source, in meters.'
     },
     },
-    {
-      name = 'y',
+    y = {
       type = 'number',
       type = 'number',
       description = 'The y position of the Source, in meters.'
       description = 'The y position of the Source, in meters.'
     },
     },
-    {
-      name = 'z',
+    z = {
       type = 'number',
       type = 'number',
       description = 'The z position of the Source, in meters.'
       description = 'The z position of the Source, in meters.'
     },
     },
-    {
-      name = 'angle',
+    angle = {
       type = 'number',
       type = 'number',
       description = 'The number of radians the Source is rotated around its axis of rotation.'
       description = 'The number of radians the Source is rotated around its axis of rotation.'
     },
     },
-    {
-      name = 'ax',
+    ax = {
       type = 'number',
       type = 'number',
       description = 'The x component of the axis of rotation.'
       description = 'The x component of the axis of rotation.'
     },
     },
-    {
-      name = 'ay',
+    ay = {
       type = 'number',
       type = 'number',
       description = 'The y component of the axis of rotation.'
       description = 'The y component of the axis of rotation.'
     },
     },
-    {
-      name = 'az',
+    az = {
       type = 'number',
       type = 'number',
       description = 'The z component of the axis of rotation.'
       description = 'The z component of the axis of rotation.'
     }
     }
   },
   },
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
+      returns = {}
+    }
+  },
   related = {
   related = {
     'Source:setPosition',
     'Source:setPosition',
     'Source:setOrientation',
     'Source:setOrientation',

+ 10 - 7
api/lovr/audio/Source/setPosition.lua

@@ -9,21 +9,24 @@ return {
     error.
     error.
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'x',
+    x = {
       type = 'number',
       type = 'number',
       description = 'The x coordinate.'
       description = 'The x coordinate.'
     },
     },
-    {
-      name = 'y',
+    y = {
       type = 'number',
       type = 'number',
       description = 'The y coordinate.'
       description = 'The y coordinate.'
     },
     },
-    {
-      name = 'z',
+    z = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate.'
       description = 'The z coordinate.'
     }
     }
   },
   },
-  returns = {}
+  returns = {},
+  variants = {
+    {
+      arguments = { 'x', 'y', 'z' },
+      returns = {}
+    }
+  }
 }
 }

+ 8 - 3
api/lovr/audio/Source/setRadius.lua

@@ -10,11 +10,16 @@ return {
     a smooth transition between audible and occluded, improving realism.
     a smooth transition between audible and occluded, improving realism.
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'radius',
+    radius = {
       type = 'number',
       type = 'number',
       description = 'The new radius of the Source, in meters.'
       description = 'The new radius of the Source, in meters.'
     }
     }
   },
   },
-  returns = {}
+  returns = {},
+  variants = {
+    {
+      arguments = { 'radius' },
+      returns = {}
+    }
+  }
 }
 }

+ 8 - 4
api/lovr/audio/Source/setVolume.lua

@@ -3,18 +3,22 @@ return {
   summary = 'Set the volume of the Source.',
   summary = 'Set the volume of the Source.',
   description = 'Sets the current volume factor for the Source.',
   description = 'Sets the current volume factor for the Source.',
   arguments = {
   arguments = {
-    {
-      name = 'volume',
+    volume = {
       type = 'number',
       type = 'number',
       description = 'The new volume.'
       description = 'The new volume.'
     },
     },
-    {
-      name = 'units',
+    units = {
       type = 'VolumeUnit',
       type = 'VolumeUnit',
       default = [['linear']],
       default = [['linear']],
       description = 'The units of the value.'
       description = 'The units of the value.'
     }
     }
   },
   },
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = { 'volume', 'units' },
+      returns = {}
+    }
+  },
   notes = 'The volume will be clamped to a 0-1 range (0 dB).'
   notes = 'The volume will be clamped to a 0-1 range (0 dB).'
 }
 }

+ 6 - 0
api/lovr/audio/Source/stop.lua

@@ -4,6 +4,12 @@ return {
   description = 'Stops the source, also rewinding it to the beginning.',
   description = 'Stops the source, also rewinding it to the beginning.',
   arguments = {},
   arguments = {},
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = {},
+      returns = {}
+    }
+  },
   related = {
   related = {
     'Source:play',
     'Source:play',
     'Source:pause',
     'Source:pause',

+ 8 - 4
api/lovr/audio/Source/tell.lua

@@ -3,19 +3,23 @@ return {
   summary = 'Get the playback position of the Source.',
   summary = 'Get the playback position of the Source.',
   description = 'Returns the current playback position of the Source.',
   description = 'Returns the current playback position of the Source.',
   arguments = {
   arguments = {
-    {
-      name = 'unit',
+    unit = {
       type = 'TimeUnit',
       type = 'TimeUnit',
       default = [['seconds']],
       default = [['seconds']],
       description = 'The unit to return.'
       description = 'The unit to return.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'position',
+    position = {
       type = 'number',
       type = 'number',
       description = 'The current playback position.'
       description = 'The current playback position.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'unit' },
+      returns = { 'position' }
+    }
+  },
   notes = 'The return value for Sources backed by a stream `Sound` has no meaning.'
   notes = 'The return value for Sources backed by a stream `Sound` has no meaning.'
 }
 }

+ 7 - 2
api/lovr/data/Blob/getName.lua

@@ -6,10 +6,15 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'name',
+    name = {
       type = 'string',
       type = 'string',
       description = 'The name of the Blob.'
       description = 'The name of the Blob.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'name' }
+    }
   }
   }
 }
 }

+ 7 - 2
api/lovr/data/Blob/getPointer.lua

@@ -6,10 +6,15 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'pointer',
+    pointer = {
       type = 'userdata',
       type = 'userdata',
       description = 'A pointer to the data.'
       description = 'A pointer to the data.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'pointer' }
+    }
   }
   }
 }
 }

+ 7 - 2
api/lovr/data/Blob/getSize.lua

@@ -5,10 +5,15 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'bytes',
+    bytes = {
       type = 'number',
       type = 'number',
       description = 'The size of the Blob, in bytes.'
       description = 'The size of the Blob, in bytes.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'bytes' }
+    }
   }
   }
 }
 }

+ 7 - 2
api/lovr/data/Blob/getString.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns a binary string containing the Blob\'s data.',
   description = 'Returns a binary string containing the Blob\'s data.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'data',
+    data = {
       type = 'string',
       type = 'string',
       description = 'The Blob\'s data.'
       description = 'The Blob\'s data.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'data' }
+    }
+  },
   example = {
   example = {
     description = 'Manually copy a file using Blobs:',
     description = 'Manually copy a file using Blobs:',
     code = [[
     code = [[

+ 7 - 2
api/lovr/data/Image/encode.lua

@@ -3,12 +3,17 @@ return {
   description = 'Encodes the Image to an uncompressed png.  This intended mainly for debugging.',
   description = 'Encodes the Image to an uncompressed png.  This intended mainly for debugging.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'blob',
+    blob = {
       type = 'Blob',
       type = 'Blob',
       description = 'A new Blob containing the PNG image data.'
       description = 'A new Blob containing the PNG image data.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'blob' }
+    }
+  },
   related = {
   related = {
     'lovr.filesystem.write'
     'lovr.filesystem.write'
   }
   }

+ 7 - 2
api/lovr/data/Image/getBlob.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns a Blob containing the raw bytes of the Image.',
   description = 'Returns a Blob containing the raw bytes of the Image.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'blob',
+    blob = {
       type = 'Blob',
       type = 'Blob',
       description = 'The Blob instance containing the bytes for the `Image`.'
       description = 'The Blob instance containing the bytes for the `Image`.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'blob' }
+    }
+  },
   related = {
   related = {
     'Blob:getPointer',
     'Blob:getPointer',
     'Sound:getBlob'
     'Sound:getBlob'

+ 8 - 4
api/lovr/data/Image/getDimensions.lua

@@ -3,17 +3,21 @@ return {
   description = 'Returns the dimensions of the Image, in pixels.',
   description = 'Returns the dimensions of the Image, in pixels.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'width',
+    width = {
       type = 'number',
       type = 'number',
       description = 'The width of the Image, in pixels.'
       description = 'The width of the Image, in pixels.'
     },
     },
-    {
-      name = 'height',
+    height = {
       type = 'number',
       type = 'number',
       description = 'The height of the Image, in pixels.'
       description = 'The height of the Image, in pixels.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'width', 'height' }
+    }
+  },
   related = {
   related = {
     'Image:getWidth',
     'Image:getWidth',
     'Image:getHeight',
     'Image:getHeight',

+ 7 - 2
api/lovr/data/Image/getFormat.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the format of the Image.',
   description = 'Returns the format of the Image.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'format',
+    format = {
       type = 'TextureFormat',
       type = 'TextureFormat',
       description = 'The format of the pixels in the Image.'
       description = 'The format of the pixels in the Image.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'format' }
+    }
+  },
   related = {
   related = {
     'TextureFormat',
     'TextureFormat',
     'Texture:getFormat'
     'Texture:getFormat'

+ 7 - 2
api/lovr/data/Image/getHeight.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the height of the Image, in pixels.',
   description = 'Returns the height of the Image, in pixels.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'height',
+    height = {
       type = 'number',
       type = 'number',
       description = 'The height of the Image, in pixels.'
       description = 'The height of the Image, in pixels.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'height' }
+    }
+  },
   related = {
   related = {
     'Image:getWidth',
     'Image:getWidth',
     'Image:getDimensions',
     'Image:getDimensions',

+ 12 - 12
api/lovr/data/Image/getPixel.lua

@@ -2,39 +2,39 @@ return {
   summary = 'Get the value of a pixel of the Image.',
   summary = 'Get the value of a pixel of the Image.',
   description = 'Returns the value of a pixel of the Image.',
   description = 'Returns the value of a pixel of the Image.',
   arguments = {
   arguments = {
-    {
-      name = 'x',
+    x = {
       type = 'number',
       type = 'number',
       description = 'The x coordinate of the pixel to get (0-indexed).'
       description = 'The x coordinate of the pixel to get (0-indexed).'
     },
     },
-    {
-      name = 'y',
+    y = {
       type = 'number',
       type = 'number',
       description = 'The y coordinate of the pixel to get (0-indexed).'
       description = 'The y coordinate of the pixel to get (0-indexed).'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'r',
+    r = {
       type = 'number',
       type = 'number',
       description = 'The red component of the pixel, from 0.0 to 1.0.'
       description = 'The red component of the pixel, from 0.0 to 1.0.'
     },
     },
-    {
-      name = 'g',
+    g = {
       type = 'number',
       type = 'number',
       description = 'The green component of the pixel, from 0.0 to 1.0.'
       description = 'The green component of the pixel, from 0.0 to 1.0.'
     },
     },
-    {
-      name = 'b',
+    b = {
       type = 'number',
       type = 'number',
       description = 'The blue component of the pixel, from 0.0 to 1.0.'
       description = 'The blue component of the pixel, from 0.0 to 1.0.'
     },
     },
-    {
-      name = 'a',
+    a = {
       type = 'number',
       type = 'number',
       description = 'The alpha component of the pixel, from 0.0 to 1.0.'
       description = 'The alpha component of the pixel, from 0.0 to 1.0.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'x', 'y' },
+      returns = { 'r', 'g', 'b', 'a' }
+    }
+  },
   notes = [[
   notes = [[
     The following texture formats are supported: `rgba`, `rgb`, `r32f`, `rg32f`, and `rgba32f`.
     The following texture formats are supported: `rgba`, `rgb`, `r32f`, `rg32f`, and `rgba32f`.
   ]],
   ]],

+ 7 - 2
api/lovr/data/Image/getWidth.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the width of the Image, in pixels.',
   description = 'Returns the width of the Image, in pixels.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'width',
+    width = {
       type = 'number',
       type = 'number',
       description = 'The width of the Image, in pixels.'
       description = 'The width of the Image, in pixels.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'width' }
+    }
+  },
   related = {
   related = {
     'Image:getHeight',
     'Image:getHeight',
     'Image:getDimensions',
     'Image:getDimensions',

+ 13 - 14
api/lovr/data/Image/paste.lua

@@ -2,49 +2,48 @@ return {
   summary = 'Copy pixels from another Image to this one.',
   summary = 'Copy pixels from another Image to this one.',
   description = 'Copies a rectangle of pixels from one Image to this one.',
   description = 'Copies a rectangle of pixels from one Image to this one.',
   arguments = {
   arguments = {
-    {
-      name = 'source',
+    source = {
       type = 'Image',
       type = 'Image',
       description = 'The Image to copy pixels from.'
       description = 'The Image to copy pixels from.'
     },
     },
-    {
-      name = 'x',
+    x = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
       description = 'The x coordinate to paste to (0-indexed).',
       description = 'The x coordinate to paste to (0-indexed).',
     },
     },
-    {
-      name = 'y',
+    y = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
       description = 'The y coordinate to paste to (0-indexed).',
       description = 'The y coordinate to paste to (0-indexed).',
     },
     },
-    {
-      name = 'fromX',
+    fromX = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
       description = 'The x coordinate in the source to paste from (0-indexed).',
       description = 'The x coordinate in the source to paste from (0-indexed).',
     },
     },
-    {
-      name = 'fromY',
+    fromY = {
       type = 'number',
       type = 'number',
       default = '0',
       default = '0',
       description = 'The y coordinate in the source to paste from (0-indexed).',
       description = 'The y coordinate in the source to paste from (0-indexed).',
     },
     },
-    {
-      name = 'width',
+    width = {
       type = 'number',
       type = 'number',
       default = 'source:getWidth()',
       default = 'source:getWidth()',
       description = 'The width of the region to copy.'
       description = 'The width of the region to copy.'
     },
     },
-    {
-      name = 'height',
+    height = {
       type = 'number',
       type = 'number',
       default = 'source:getHeight()',
       default = 'source:getHeight()',
       description = 'The height of the region to copy.'
       description = 'The height of the region to copy.'
     }
     }
   },
   },
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = { 'source', 'x', 'y', 'fromX', 'fromY', 'width', 'height' },
+      returns = {}
+    }
+  },
   notes = [[
   notes = [[
     The two Images must have the same pixel format.
     The two Images must have the same pixel format.
 
 

+ 12 - 12
api/lovr/data/Image/setPixel.lua

@@ -2,39 +2,39 @@ return {
   summary = 'Set the value of a pixel of the Image.',
   summary = 'Set the value of a pixel of the Image.',
   description = 'Sets the value of a pixel of the Image.',
   description = 'Sets the value of a pixel of the Image.',
   arguments = {
   arguments = {
-    {
-      name = 'x',
+    x = {
       type = 'number',
       type = 'number',
       description = 'The x coordinate of the pixel to set (0-indexed).'
       description = 'The x coordinate of the pixel to set (0-indexed).'
     },
     },
-    {
-      name = 'y',
+    y = {
       type = 'number',
       type = 'number',
       description = 'The y coordinate of the pixel to set (0-indexed).'
       description = 'The y coordinate of the pixel to set (0-indexed).'
     },
     },
-    {
-      name = 'r',
+    r = {
       type = 'number',
       type = 'number',
       description = 'The red component of the pixel, from 0.0 to 1.0.'
       description = 'The red component of the pixel, from 0.0 to 1.0.'
     },
     },
-    {
-      name = 'g',
+    g = {
       type = 'number',
       type = 'number',
       description = 'The green component of the pixel, from 0.0 to 1.0.'
       description = 'The green component of the pixel, from 0.0 to 1.0.'
     },
     },
-    {
-      name = 'b',
+    b = {
       type = 'number',
       type = 'number',
       description = 'The blue component of the pixel, from 0.0 to 1.0.'
       description = 'The blue component of the pixel, from 0.0 to 1.0.'
     },
     },
-    {
-      name = 'a',
+    a = {
       type = 'number',
       type = 'number',
       default = '1.0',
       default = '1.0',
       description = 'The alpha component of the pixel, from 0.0 to 1.0.'
       description = 'The alpha component of the pixel, from 0.0 to 1.0.'
     }
     }
   },
   },
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = { 'x', 'y', 'r', 'g', 'b', 'a' },
+      returns = {}
+    }
+  },
   notes = [[
   notes = [[
     The following texture formats are supported: `rgba`, `rgb`, `r32f`, `rg32f`, and `rgba32f`.
     The following texture formats are supported: `rgba`, `rgb`, `r32f`, `rg32f`, and `rgba32f`.
   ]],
   ]],

+ 7 - 2
api/lovr/data/ModelData/getAnimationCount.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the number of animations in the model.',
   description = 'Returns the number of animations in the model.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of animations in the model.'
       description = 'The number of animations in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'Model:getAnimationCount'
     'Model:getAnimationCount'
   }
   }

+ 8 - 4
api/lovr/data/ModelData/getAnimationName.lua

@@ -2,19 +2,23 @@ return {
   summary = 'Get the name of an animation.',
   summary = 'Get the name of an animation.',
   description = 'Returns the name of an animation.',
   description = 'Returns the name of an animation.',
   arguments = {
   arguments = {
-    {
-      name = 'index',
+    index = {
       type = 'number',
       type = 'number',
       description = 'The index of the animation.'
       description = 'The index of the animation.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'name',
+    name = {
       type = 'string',
       type = 'string',
       description = 'The name of the animation.'
       description = 'The name of the animation.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'index' },
+      returns = { 'name' }
+    }
+  },
   notes = 'If the animation does not have a name, this function returns `nil`.',
   notes = 'If the animation does not have a name, this function returns `nil`.',
   related = {
   related = {
     'Model:getAnimationName'
     'Model:getAnimationName'

+ 8 - 4
api/lovr/data/ModelData/getBlob.lua

@@ -2,19 +2,23 @@ return {
   summary = 'Get a Blob in the model.',
   summary = 'Get a Blob in the model.',
   description = 'Returns one of the Blobs in the model, by index.',
   description = 'Returns one of the Blobs in the model, by index.',
   arguments = {
   arguments = {
-    {
-      name = 'index',
+    index = {
       type = 'number',
       type = 'number',
       description = 'The index of the Blob to get.'
       description = 'The index of the Blob to get.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'blob',
+    blob = {
       type = 'Blob',
       type = 'Blob',
       description = 'The Blob object.'
       description = 'The Blob object.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'index' },
+      returns = { 'blob' }
+    }
+  },
   related = {
   related = {
     'ModelData:getBlobCount',
     'ModelData:getBlobCount',
     'ModelData:getImage'
     'ModelData:getImage'

+ 7 - 2
api/lovr/data/ModelData/getBlobCount.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the number of Blobs in the model.',
   description = 'Returns the number of Blobs in the model.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of Blobs in the model.'
       description = 'The number of Blobs in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'ModelData:getBlob',
     'ModelData:getBlob',
     'ModelData:getImageCount'
     'ModelData:getImageCount'

+ 12 - 12
api/lovr/data/ModelData/getBoundingBox.lua

@@ -3,37 +3,37 @@ return {
   description = 'Returns the 6 values of the model\'s axis-aligned bounding box.',
   description = 'Returns the 6 values of the model\'s axis-aligned bounding box.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'minx',
+    minx = {
       type = 'number',
       type = 'number',
       description = 'The minimum x coordinate of the vertices in the model.'
       description = 'The minimum x coordinate of the vertices in the model.'
     },
     },
-    {
-      name = 'maxx',
+    maxx = {
       type = 'number',
       type = 'number',
       description = 'The maximum x coordinate of the vertices in the model.'
       description = 'The maximum x coordinate of the vertices in the model.'
     },
     },
-    {
-      name = 'miny',
+    miny = {
       type = 'number',
       type = 'number',
       description = 'The minimum y coordinate of the vertices in the model.'
       description = 'The minimum y coordinate of the vertices in the model.'
     },
     },
-    {
-      name = 'maxy',
+    maxy = {
       type = 'number',
       type = 'number',
       description = 'The maximum y coordinate of the vertices in the model.'
       description = 'The maximum y coordinate of the vertices in the model.'
     },
     },
-    {
-      name = 'minz',
+    minz = {
       type = 'number',
       type = 'number',
       description = 'The minimum z coordinate of the vertices in the model.'
       description = 'The minimum z coordinate of the vertices in the model.'
     },
     },
-    {
-      name = 'maxz',
+    maxz = {
       type = 'number',
       type = 'number',
       description = 'The maximum z coordinate of the vertices in the model.'
       description = 'The maximum z coordinate of the vertices in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'minx', 'maxx', 'miny', 'maxy', 'minz', 'maxz' }
+    }
+  },
   related = {
   related = {
     'ModelData:getWidth',
     'ModelData:getWidth',
     'ModelData:getHeight',
     'ModelData:getHeight',

+ 10 - 8
api/lovr/data/ModelData/getBoundingSphere.lua

@@ -3,27 +3,29 @@ return {
   description = 'Returns a sphere approximately enclosing the vertices in the model.',
   description = 'Returns a sphere approximately enclosing the vertices in the model.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'x',
+    x = {
       type = 'number',
       type = 'number',
       description = 'The x coordinate of the position of the sphere.'
       description = 'The x coordinate of the position of the sphere.'
     },
     },
-    {
-      name = 'y',
+    y = {
       type = 'number',
       type = 'number',
       description = 'The y coordinate of the position of the sphere.'
       description = 'The y coordinate of the position of the sphere.'
     },
     },
-    {
-      name = 'z',
+    z = {
       type = 'number',
       type = 'number',
       description = 'The z coordinate of the position of the sphere.'
       description = 'The z coordinate of the position of the sphere.'
     },
     },
-    {
-      name = 'radius',
+    radius = {
       type = 'number',
       type = 'number',
       description = 'The radius of the bounding sphere.'
       description = 'The radius of the bounding sphere.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'x', 'y', 'z', 'radius' }
+    }
+  },
   related = {
   related = {
     'ModelData:getWidth',
     'ModelData:getWidth',
     'ModelData:getHeight',
     'ModelData:getHeight',

+ 9 - 6
api/lovr/data/ModelData/getCenter.lua

@@ -5,22 +5,25 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'x',
+    x = {
       type = 'number',
       type = 'number',
       description = 'The x offset of the center of the bounding box.'
       description = 'The x offset of the center of the bounding box.'
     },
     },
-    {
-      name = 'y',
+    y = {
       type = 'number',
       type = 'number',
       description = 'The y offset of the center of the bounding box.'
       description = 'The y offset of the center of the bounding box.'
     },
     },
-    {
-      name = 'z',
+    z = {
       type = 'number',
       type = 'number',
       description = 'The z offset of the center of the bounding box.'
       description = 'The z offset of the center of the bounding box.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'x', 'y', 'z' }
+    }
+  },
   related = {
   related = {
     'ModelData:getWidth',
     'ModelData:getWidth',
     'ModelData:getHeight',
     'ModelData:getHeight',

+ 7 - 2
api/lovr/data/ModelData/getDepth.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the depth of the model, computed from its axis-aligned bounding box.',
   description = 'Returns the depth of the model, computed from its axis-aligned bounding box.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'depth',
+    depth = {
       type = 'number',
       type = 'number',
       description = 'The depth of the model.'
       description = 'The depth of the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'depth' }
+    }
+  },
   related = {
   related = {
     'ModelData:getWidth',
     'ModelData:getWidth',
     'ModelData:getHeight',
     'ModelData:getHeight',

+ 9 - 6
api/lovr/data/ModelData/getDimensions.lua

@@ -5,22 +5,25 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'width',
+    width = {
       type = 'number',
       type = 'number',
       description = 'The width of the model.'
       description = 'The width of the model.'
     },
     },
-    {
-      name = 'height',
+    height = {
       type = 'number',
       type = 'number',
       description = 'The height of the model.'
       description = 'The height of the model.'
     },
     },
-    {
-      name = 'depth',
+    depth = {
       type = 'number',
       type = 'number',
       description = 'The depth of the model.'
       description = 'The depth of the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'width', 'height', 'depth' }
+    }
+  },
   related = {
   related = {
     'ModelData:getWidth',
     'ModelData:getWidth',
     'ModelData:getHeight',
     'ModelData:getHeight',

+ 7 - 2
api/lovr/data/ModelData/getHeight.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the height of the model, computed from its axis-aligned bounding box.',
   description = 'Returns the height of the model, computed from its axis-aligned bounding box.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'height',
+    height = {
       type = 'number',
       type = 'number',
       description = 'The height of the model.'
       description = 'The height of the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'height' }
+    }
+  },
   related = {
   related = {
     'ModelData:getWidth',
     'ModelData:getWidth',
     'ModelData:getDepth',
     'ModelData:getDepth',

+ 8 - 4
api/lovr/data/ModelData/getImage.lua

@@ -2,19 +2,23 @@ return {
   summary = 'Get an Image in the model.',
   summary = 'Get an Image in the model.',
   description = 'Returns one of the Images in the model, by index.',
   description = 'Returns one of the Images in the model, by index.',
   arguments = {
   arguments = {
-    {
-      name = 'index',
+    index = {
       type = 'number',
       type = 'number',
       description = 'The index of the Image to get.'
       description = 'The index of the Image to get.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'image',
+    image = {
       type = 'Image',
       type = 'Image',
       description = 'The Image object.'
       description = 'The Image object.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'index' },
+      returns = { 'image' }
+    }
+  },
   related = {
   related = {
     'ModelData:getImageCount',
     'ModelData:getImageCount',
     'ModelData:getBlob'
     'ModelData:getBlob'

+ 7 - 2
api/lovr/data/ModelData/getImageCount.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the number of Images in the model.',
   description = 'Returns the number of Images in the model.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of Images in the model.'
       description = 'The number of Images in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'ModelData:getImage',
     'ModelData:getImage',
     'ModelData:getBlobCount'
     'ModelData:getBlobCount'

+ 7 - 2
api/lovr/data/ModelData/getMaterialCount.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the number of materials in the model.',
   description = 'Returns the number of materials in the model.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of materials in the model.'
       description = 'The number of materials in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'ModelData:getMaterialName',
     'ModelData:getMaterialName',
     'ModelData:getMeshMaterial',
     'ModelData:getMeshMaterial',

+ 8 - 4
api/lovr/data/ModelData/getMaterialName.lua

@@ -2,19 +2,23 @@ return {
   summary = 'Get the name of a material in the model.',
   summary = 'Get the name of a material in the model.',
   description = 'Returns the name of a material in the model.',
   description = 'Returns the name of a material in the model.',
   arguments = {
   arguments = {
-    {
-      name = 'index',
+    index = {
       type = 'number',
       type = 'number',
       description = 'The index of a material.'
       description = 'The index of a material.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'name',
+    name = {
       type = 'string',
       type = 'string',
       description = 'The name of the material, or nil if the material does not have a name.'
       description = 'The name of the material, or nil if the material does not have a name.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'index' },
+      returns = { 'name' }
+    }
+  },
   related = {
   related = {
     'ModelData:getMaterialCount',
     'ModelData:getMaterialCount',
     'ModelData:getMeshMaterial',
     'ModelData:getMeshMaterial',

+ 7 - 2
api/lovr/data/ModelData/getMeshCount.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the number of meshes in the model.',
   description = 'Returns the number of meshes in the model.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of meshes in the model.'
       description = 'The number of meshes in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'ModelData:getNodeMeshes'
     'ModelData:getNodeMeshes'
   }
   }

+ 8 - 4
api/lovr/data/ModelData/getMeshDrawMode.lua

@@ -5,17 +5,21 @@ return {
     lines, or triangles).
     lines, or triangles).
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'mesh',
+    mesh = {
       type = 'number',
       type = 'number',
       description = 'The index of a mesh.'
       description = 'The index of a mesh.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'mode',
+    mode = {
       type = 'DrawMode',
       type = 'DrawMode',
       description = 'The draw mode of the mesh.'
       description = 'The draw mode of the mesh.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = { 'mesh' },
+      returns = { 'mode' }
+    }
   }
   }
 }
 }

+ 9 - 6
api/lovr/data/ModelData/getMeshIndex.lua

@@ -6,24 +6,27 @@ return {
     times without duplicating its data.
     times without duplicating its data.
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'mesh',
+    mesh = {
       type = 'number',
       type = 'number',
       description = 'The index of a mesh to get the vertex from.'
       description = 'The index of a mesh to get the vertex from.'
     },
     },
-    {
-      name = 'index',
+    index = {
       type = 'number',
       type = 'number',
       description = 'The index of a vertex index in the mesh to retrieve.'
       description = 'The index of a vertex index in the mesh to retrieve.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'vertexindex',
+    vertexindex = {
       type = 'number',
       type = 'number',
       description = 'The vertex index.  Like all indices in Lua, this is 1-indexed.'
       description = 'The vertex index.  Like all indices in Lua, this is 1-indexed.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'mesh', 'index' },
+      returns = { 'vertexindex' }
+    }
+  },
   related = {
   related = {
     'ModelData:getMeshIndexFormat',
     'ModelData:getMeshIndexFormat',
     'ModelData:getMeshIndexCount',
     'ModelData:getMeshIndexCount',

+ 8 - 4
api/lovr/data/ModelData/getMeshIndexCount.lua

@@ -5,18 +5,22 @@ return {
     when defining triangles.
     when defining triangles.
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'mesh',
+    mesh = {
       type = 'number',
       type = 'number',
       description = 'The index of a mesh.'
       description = 'The index of a mesh.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of vertex indices in the mesh.'
       description = 'The number of vertex indices in the mesh.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'mesh' },
+      returns = { 'count' }
+    }
+  },
   notes = 'This may return zero if the mesh does not use indices.'
   notes = 'This may return zero if the mesh does not use indices.'
 }
 }

+ 11 - 10
api/lovr/data/ModelData/getMeshIndexFormat.lua

@@ -5,30 +5,25 @@ return {
     function returns nil.
     function returns nil.
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'mesh',
+    mesh = {
       type = 'number',
       type = 'number',
       description = 'The index of a mesh.'
       description = 'The index of a mesh.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'type',
+    type = {
       type = 'AttributeType',
       type = 'AttributeType',
       description = 'The data type of each vertex index (always u16 or u32).'
       description = 'The data type of each vertex index (always u16 or u32).'
     },
     },
-    {
-      name = 'blob',
+    blob = {
       type = 'number',
       type = 'number',
       description = 'The index of a Blob in the mesh where the binary data is stored.'
       description = 'The index of a Blob in the mesh where the binary data is stored.'
     },
     },
-    {
-      name = 'offset',
+    offset = {
       type = 'number',
       type = 'number',
       description = 'A byte offset into the Blob\'s data where the index data starts.'
       description = 'A byte offset into the Blob\'s data where the index data starts.'
     },
     },
-    {
-      name = 'stride',
+    stride = {
       type = 'number',
       type = 'number',
       description = [[
       description = [[
         The number of bytes between subsequent vertex indices.  Indices are always tightly packed,
         The number of bytes between subsequent vertex indices.  Indices are always tightly packed,
@@ -36,6 +31,12 @@ return {
       ]]
       ]]
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'mesh' },
+      returns = { 'type', 'blob', 'offset', 'stride' }
+    }
+  },
   related = {
   related = {
     'ModelData:getMeshVertexFormat'
     'ModelData:getMeshVertexFormat'
   }
   }

+ 8 - 4
api/lovr/data/ModelData/getMeshMaterial.lua

@@ -2,19 +2,23 @@ return {
   summary = 'Get the index of the material applied to a mesh.',
   summary = 'Get the index of the material applied to a mesh.',
   description = 'Returns the index of the material applied to a mesh.',
   description = 'Returns the index of the material applied to a mesh.',
   arguments = {
   arguments = {
-    {
-      name = 'mesh',
+    mesh = {
       type = 'number',
       type = 'number',
       description = 'The index of a mesh.'
       description = 'The index of a mesh.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'material',
+    material = {
       type = 'number',
       type = 'number',
       description = [[
       description = [[
         The index of the material applied to the mesh, or nil if the mesh does not have a material.
         The index of the material applied to the mesh, or nil if the mesh does not have a material.
       ]]
       ]]
     }
     }
+  },
+  variants = {
+    {
+      arguments = { 'mesh' },
+      returns = { 'material' }
+    }
   }
   }
 }
 }

+ 9 - 6
api/lovr/data/ModelData/getMeshVertex.lua

@@ -5,24 +5,27 @@ return {
     of a mesh, which is given by `ModelData:getMeshVertexFormat`.
     of a mesh, which is given by `ModelData:getMeshVertexFormat`.
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'mesh',
+    mesh = {
       type = 'number',
       type = 'number',
       description = 'The index of a mesh to get the vertex from.'
       description = 'The index of a mesh to get the vertex from.'
     },
     },
-    {
-      name = 'vertex',
+    vertex = {
       type = 'number',
       type = 'number',
       description = 'The index of a vertex in the mesh to retrieve.'
       description = 'The index of a vertex in the mesh to retrieve.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = '...',
+    ['...'] = {
       type = 'number',
       type = 'number',
       description = 'The data for all of the attributes of the vertex.'
       description = 'The data for all of the attributes of the vertex.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'mesh', 'vertex' },
+      returns = { '...' }
+    }
+  },
   related = {
   related = {
     'ModelData:getMeshVertexFormat',
     'ModelData:getMeshVertexFormat',
     'ModelData:getMeshVertexCount',
     'ModelData:getMeshVertexCount',

+ 8 - 4
api/lovr/data/ModelData/getMeshVertexCount.lua

@@ -2,19 +2,23 @@ return {
   summary = 'Get the number of vertices in a mesh.',
   summary = 'Get the number of vertices in a mesh.',
   description = 'Returns the number of vertices in a mesh.',
   description = 'Returns the number of vertices in a mesh.',
   arguments = {
   arguments = {
-    {
-      name = 'mesh',
+    mesh = {
       type = 'number',
       type = 'number',
       description = 'The index of a mesh.'
       description = 'The index of a mesh.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of vertices in the mesh.'
       description = 'The number of vertices in the mesh.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'mesh' },
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'ModelData:getMeshIndexCount'
     'ModelData:getMeshIndexCount'
   }
   }

+ 8 - 4
api/lovr/data/ModelData/getMeshVertexFormat.lua

@@ -5,19 +5,23 @@ return {
     each vertex (position, color, etc.), including their types and binary data layout.
     each vertex (position, color, etc.), including their types and binary data layout.
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'mesh',
+    mesh = {
       type = 'number',
       type = 'number',
       description = 'The index of a mesh.'
       description = 'The index of a mesh.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'format',
+    format = {
       type = 'table',
       type = 'table',
       description = 'The vertex format of the mesh.'
       description = 'The vertex format of the mesh.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'mesh' },
+      returns = { 'format' }
+    }
+  },
   notes = [[
   notes = [[
     The format is given as a table of vertex attributes.  Each attribute is a table containing the
     The format is given as a table of vertex attributes.  Each attribute is a table containing the
     following:
     following:

+ 7 - 2
api/lovr/data/ModelData/getMetadata.lua

@@ -7,12 +7,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'metadata',
+    metadata = {
       type = 'string',
       type = 'string',
       description = 'The metadata from the model file.'
       description = 'The metadata from the model file.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'metadata' }
+    }
+  },
   related = {
   related = {
     'Model:getMetadata'
     'Model:getMetadata'
   }
   }

+ 7 - 2
api/lovr/data/ModelData/getNodeCount.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the number of nodes in the model.',
   description = 'Returns the number of nodes in the model.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of nodes in the model.'
       description = 'The number of nodes in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'Model:getNodeCount'
     'Model:getNodeCount'
   }
   }

+ 8 - 4
api/lovr/data/ModelData/getNodeName.lua

@@ -2,19 +2,23 @@ return {
   summary = 'Get the name of a node.',
   summary = 'Get the name of a node.',
   description = 'Returns the name of a node.',
   description = 'Returns the name of a node.',
   arguments = {
   arguments = {
-    {
-      name = 'index',
+    index = {
       type = 'number',
       type = 'number',
       description = 'The index of the node.'
       description = 'The index of the node.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'name',
+    name = {
       type = 'string',
       type = 'string',
       description = 'The name of the node.'
       description = 'The name of the node.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { 'index' },
+      returns = { 'name' }
+    }
+  },
   notes = 'If the node does not have a name, this function returns `nil`.',
   notes = 'If the node does not have a name, this function returns `nil`.',
   related = {
   related = {
     'Model:getNodeName'
     'Model:getNodeName'

+ 7 - 2
api/lovr/data/ModelData/getRootNode.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the index of the model\'s root node.',
   description = 'Returns the index of the model\'s root node.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'root',
+    root = {
       type = 'number',
       type = 'number',
       description = 'The index of the root node.'
       description = 'The index of the root node.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'root' }
+    }
+  },
   related = {
   related = {
     'ModelData:getNodeCount',
     'ModelData:getNodeCount',
     'ModelData:getNodeParent',
     'ModelData:getNodeParent',

+ 7 - 2
api/lovr/data/ModelData/getSkinCount.lua

@@ -6,12 +6,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of skins in the model.'
       description = 'The number of skins in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   notes = 'There is currently a maximum of 256 skins.',
   notes = 'There is currently a maximum of 256 skins.',
   related = {
   related = {
     'Model:hasJoints'
     'Model:hasJoints'

+ 9 - 6
api/lovr/data/ModelData/getSkinInverseBindMatrix.lua

@@ -2,22 +2,25 @@ return {
   summary = 'Get the inverse bind matrix for a joint in the skin.',
   summary = 'Get the inverse bind matrix for a joint in the skin.',
   description = 'Returns the inverse bind matrix for a joint in the skin.',
   description = 'Returns the inverse bind matrix for a joint in the skin.',
   arguments = {
   arguments = {
-    {
-      name = 'skin',
+    skin = {
       type = 'number',
       type = 'number',
       description = 'The index of a skin.'
       description = 'The index of a skin.'
     },
     },
-    {
-      name = 'joint',
+    joint = {
       type = 'number',
       type = 'number',
       description = 'The index of a joint in the skin.'
       description = 'The index of a joint in the skin.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = '...',
+    ['...'] = {
       type = 'number',
       type = 'number',
       description = 'The 16 components of the 4x4 inverse bind matrix, in column-major order.'
       description = 'The 16 components of the 4x4 inverse bind matrix, in column-major order.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = { 'skin', 'joint' },
+      returns = { '...' }
+    }
   }
   }
 }
 }

+ 8 - 4
api/lovr/data/ModelData/getSkinJoints.lua

@@ -2,17 +2,21 @@ return {
   summary = 'Get the joints in a skin.',
   summary = 'Get the joints in a skin.',
   description = 'Returns a table with the node indices of the joints in a skin.',
   description = 'Returns a table with the node indices of the joints in a skin.',
   arguments = {
   arguments = {
-    {
-      name = 'skin',
+    skin = {
       type = 'number',
       type = 'number',
       description = 'The index of a skin.'
       description = 'The index of a skin.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'joints',
+    joints = {
       type = 'table',
       type = 'table',
       description = 'The joints in the skin.'
       description = 'The joints in the skin.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = { 'skin' },
+      returns = { 'joints' }
+    }
   }
   }
 }
 }

+ 7 - 2
api/lovr/data/ModelData/getTriangleCount.lua

@@ -7,12 +7,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The total number of triangles in the model.'
       description = 'The total number of triangles in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'ModelData:getTriangles',
     'ModelData:getTriangles',
     'ModelData:getVertexCount',
     'ModelData:getVertexCount',

+ 8 - 4
api/lovr/data/ModelData/getTriangles.lua

@@ -11,20 +11,24 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'vertices',
+    vertices = {
       type = 'table',
       type = 'table',
       description = [[
       description = [[
         The triangle vertex positions, returned as a flat (non-nested) table of numbers.  The
         The triangle vertex positions, returned as a flat (non-nested) table of numbers.  The
         position of each vertex is given as an x, y, and z coordinate.
         position of each vertex is given as an x, y, and z coordinate.
       ]]
       ]]
     },
     },
-    {
-      name = 'indices',
+    indices = {
       type = 'table',
       type = 'table',
       description = 'The vertex indices.  Every 3 indices describes a triangle.'
       description = 'The vertex indices.  Every 3 indices describes a triangle.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'vertices', 'indices' }
+    }
+  },
   notes = 'After this function is called on a ModelData once, the result is cached.',
   notes = 'After this function is called on a ModelData once, the result is cached.',
   related = {
   related = {
     'ModelData:getTriangleCount',
     'ModelData:getTriangleCount',

+ 7 - 2
api/lovr/data/ModelData/getVertexCount.lua

@@ -6,12 +6,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The total number of vertices in the model.'
       description = 'The total number of vertices in the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'ModelData:getTriangles',
     'ModelData:getTriangles',
     'ModelData:getTriangleCount',
     'ModelData:getTriangleCount',

+ 7 - 2
api/lovr/data/ModelData/getWidth.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the width of the model, computed from its axis-aligned bounding box.',
   description = 'Returns the width of the model, computed from its axis-aligned bounding box.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'width',
+    width = {
       type = 'number',
       type = 'number',
       description = 'The width of the model.'
       description = 'The width of the model.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'width' }
+    }
+  },
   related = {
   related = {
     'ModelData:getHeight',
     'ModelData:getHeight',
     'ModelData:getDepth',
     'ModelData:getDepth',

+ 7 - 2
api/lovr/data/Rasterizer/getAdvance.lua

@@ -6,10 +6,15 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'advance',
+    advance = {
       type = 'number',
       type = 'number',
       description = 'The advance of the font, in pixels.'
       description = 'The advance of the font, in pixels.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'advance' }
+    }
   }
   }
 }
 }

+ 7 - 2
api/lovr/data/Rasterizer/getAscent.lua

@@ -6,12 +6,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'ascent',
+    ascent = {
       type = 'number',
       type = 'number',
       description = 'The ascent of the font, in pixels.'
       description = 'The ascent of the font, in pixels.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'ascent' }
+    }
+  },
   related = {
   related = {
     'Rasterizer:getDescent',
     'Rasterizer:getDescent',
     'Font:getAscent'
     'Font:getAscent'

+ 7 - 2
api/lovr/data/Rasterizer/getDescent.lua

@@ -6,12 +6,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'descent',
+    descent = {
       type = 'number',
       type = 'number',
       description = 'The descent of the font, in pixels.'
       description = 'The descent of the font, in pixels.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'descent' }
+    }
+  },
   related = {
   related = {
     'Rasterzer:getAscent',
     'Rasterzer:getAscent',
     'Font:getDescent'
     'Font:getDescent'

+ 7 - 2
api/lovr/data/Rasterizer/getGlyphCount.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the number of glyphs stored in the font file.',
   description = 'Returns the number of glyphs stored in the font file.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       description = 'The number of glyphs stored in the font file.'
       description = 'The number of glyphs stored in the font file.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'count' }
+    }
+  },
   related = {
   related = {
     'Rasterizer:hasGlyphs'
     'Rasterizer:hasGlyphs'
   }
   }

+ 7 - 2
api/lovr/data/Rasterizer/getHeight.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the height metric of the font, in pixels.',
   description = 'Returns the height metric of the font, in pixels.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'height',
+    height = {
       type = 'number',
       type = 'number',
       description = 'The height of the font, in pixels.'
       description = 'The height of the font, in pixels.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'height' }
+    }
+  },
   related = {
   related = {
     'Font:getHeight'
     'Font:getHeight'
   }
   }

+ 7 - 2
api/lovr/data/Rasterizer/getLineHeight.lua

@@ -5,12 +5,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'height',
+    height = {
       type = 'number',
       type = 'number',
       description = 'The line height of the font, in pixels.'
       description = 'The line height of the font, in pixels.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'height' }
+    }
+  },
   related = {
   related = {
     'Rasterizer:getHeight',
     'Rasterizer:getHeight',
     'Font:getLineHeight',
     'Font:getLineHeight',

+ 8 - 4
api/lovr/data/Rasterizer/hasGlyphs.lua

@@ -2,21 +2,25 @@ return {
   summary = 'Get whether the Rasterizer can rasterize a set of glyphs.',
   summary = 'Get whether the Rasterizer can rasterize a set of glyphs.',
   description = 'Check if the Rasterizer can rasterize a set of glyphs.',
   description = 'Check if the Rasterizer can rasterize a set of glyphs.',
   arguments = {
   arguments = {
-    {
-      name = '...',
+    ['...'] = {
       type = '*',
       type = '*',
       description = 'Strings (sets of characters) or numbers (character codes) to check for.'
       description = 'Strings (sets of characters) or numbers (character codes) to check for.'
     }
     }
   },
   },
   returns = {
   returns = {
-    {
-      name = 'hasGlyphs',
+    hasGlyphs = {
       type = 'boolean',
       type = 'boolean',
       description = [[
       description = [[
         true if the Rasterizer can rasterize all of the supplied characters, false otherwise.
         true if the Rasterizer can rasterize all of the supplied characters, false otherwise.
       ]]
       ]]
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = { '...' },
+      returns = { 'hasGlyphs' }
+    }
+  },
   related = {
   related = {
     'Rasterizer:getGlyphCount'
     'Rasterizer:getGlyphCount'
   }
   }

+ 7 - 2
api/lovr/data/Sound/getBlob.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns a Blob containing the raw bytes of the Sound.',
   description = 'Returns a Blob containing the raw bytes of the Sound.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'blob',
+    blob = {
       type = 'Blob',
       type = 'Blob',
       description = 'The Blob instance containing the bytes for the `Sound`.'
       description = 'The Blob instance containing the bytes for the `Sound`.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'blob' }
+    }
+  },
   notes = [[
   notes = [[
     Samples for each channel are stored interleaved.  The data type of each sample is given by
     Samples for each channel are stored interleaved.  The data type of each sample is given by
     `Sound:getFormat`.
     `Sound:getFormat`.

+ 7 - 2
api/lovr/data/Sound/getCapacity.lua

@@ -7,12 +7,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'capacity',
+    capacity = {
       type = 'number',
       type = 'number',
       description = 'The number of frames that can be written to the Sound.'
       description = 'The number of frames that can be written to the Sound.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'capacity' }
+    }
+  },
   related = {
   related = {
     'Sound:getFrameCount',
     'Sound:getFrameCount',
     'Sound:getSampleCount',
     'Sound:getSampleCount',

+ 7 - 2
api/lovr/data/Sound/getChannelCount.lua

@@ -6,12 +6,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'channels',
+    channels = {
       type = 'number',
       type = 'number',
       description = 'The number of channels in the sound.'
       description = 'The number of channels in the sound.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'channels' }
+    }
+  },
   related = {
   related = {
     'Sound:getChannelLayout'
     'Sound:getChannelLayout'
   }
   }

+ 7 - 2
api/lovr/data/Sound/getChannelLayout.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the channel layout of the Sound.',
   description = 'Returns the channel layout of the Sound.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'channels',
+    channels = {
       type = 'ChannelLayout',
       type = 'ChannelLayout',
       description = 'The channel layout.'
       description = 'The channel layout.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'channels' }
+    }
+  },
   related = {
   related = {
     'Sound:getChannelCount'
     'Sound:getChannelCount'
   }
   }

+ 7 - 2
api/lovr/data/Sound/getDuration.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the duration of the Sound, in seconds.',
   description = 'Returns the duration of the Sound, in seconds.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'duration',
+    duration = {
       type = 'number',
       type = 'number',
       description = 'The duration of the Sound, in seconds.'
       description = 'The duration of the Sound, in seconds.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'duration' }
+    }
+  },
   notes = 'This can be computed as `(frameCount / sampleRate)`.',
   notes = 'This can be computed as `(frameCount / sampleRate)`.',
   related = {
   related = {
     'Sound:getFrameCount',
     'Sound:getFrameCount',

+ 7 - 2
api/lovr/data/Sound/getFormat.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the sample format of the Sound.',
   description = 'Returns the sample format of the Sound.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'format',
+    format = {
       type = 'SampleFormat',
       type = 'SampleFormat',
       description = 'The data type of each sample.'
       description = 'The data type of each sample.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'format' }
+    }
+  },
   related = {
   related = {
     'Sound:getChannelLayout',
     'Sound:getChannelLayout',
     'Sound:getSampleRate'
     'Sound:getSampleRate'

+ 7 - 2
api/lovr/data/Sound/getFrameCount.lua

@@ -5,12 +5,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'frames',
+    frames = {
       type = 'number',
       type = 'number',
       description = 'The number of frames in the Sound.'
       description = 'The number of frames in the Sound.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'frames' }
+    }
+  },
   notes = 'For streams, this returns the number of frames in the stream\'s buffer.',
   notes = 'For streams, this returns the number of frames in the stream\'s buffer.',
   related = {
   related = {
     'Sound:getDuration',
     'Sound:getDuration',

+ 7 - 2
api/lovr/data/Sound/getSampleCount.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the total number of samples in the Sound.',
   description = 'Returns the total number of samples in the Sound.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'samples',
+    samples = {
       type = 'number',
       type = 'number',
       description = 'The total number of samples in the Sound.'
       description = 'The total number of samples in the Sound.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'samples' }
+    }
+  },
   notes = 'For streams, this returns the number of samples in the stream\'s buffer.',
   notes = 'For streams, this returns the number of samples in the stream\'s buffer.',
   related = {
   related = {
     'Sound:getDuration',
     'Sound:getDuration',

+ 7 - 2
api/lovr/data/Sound/getSampleRate.lua

@@ -6,10 +6,15 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'frequency',
+    frequency = {
       type = 'number',
       type = 'number',
       description = 'The number of frames per second in the Sound.'
       description = 'The number of frames per second in the Sound.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'frequency' }
+    }
   }
   }
 }
 }

+ 7 - 2
api/lovr/data/Sound/isCompressed.lua

@@ -7,12 +7,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'compressed',
+    compressed = {
       type = 'boolean',
       type = 'boolean',
       description = 'Whether the Sound is compressed.'
       description = 'Whether the Sound is compressed.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'compressed' }
+    }
+  },
   related = {
   related = {
     'Sound:isStream',
     'Sound:isStream',
     'lovr.data.newSound'
     'lovr.data.newSound'

+ 7 - 2
api/lovr/data/Sound/isStream.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns whether the Sound is a stream.',
   description = 'Returns whether the Sound is a stream.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'stream',
+    stream = {
       type = 'boolean',
       type = 'boolean',
       description = 'Whether the Sound is a stream.'
       description = 'Whether the Sound is a stream.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'stream' }
+    }
+  },
   related = {
   related = {
     'Sound:isCompressed',
     'Sound:isCompressed',
     'lovr.data.newSound'
     'lovr.data.newSound'

+ 8 - 4
api/lovr/graphics/Buffer/clear.lua

@@ -5,20 +5,24 @@ return {
     cleared in a transfer pass using `Pass:clear`.
     cleared in a transfer pass using `Pass:clear`.
   ]],
   ]],
   arguments = {
   arguments = {
-    {
-      name = 'index',
+    index = {
       type = 'number',
       type = 'number',
       default = '1',
       default = '1',
       description = 'The index of the first item to clear.'
       description = 'The index of the first item to clear.'
     },
     },
-    {
-      name = 'count',
+    count = {
       type = 'number',
       type = 'number',
       default = 'nil',
       default = 'nil',
       description = 'The number of items to clear.  If `nil`, clears to the end of the Buffer.'
       description = 'The number of items to clear.  If `nil`, clears to the end of the Buffer.'
     }
     }
   },
   },
   returns = {},
   returns = {},
+  variants = {
+    {
+      arguments = { 'index', 'count' },
+      returns = {}
+    }
+  },
   notes = [[
   notes = [[
     Clearing a permanent buffer requires the byte offset and byte count of the cleared range to be a
     Clearing a permanent buffer requires the byte offset and byte count of the cleared range to be a
     multiple of 4.  This will usually be true for most data types.
     multiple of 4.  This will usually be true for most data types.

+ 7 - 2
api/lovr/graphics/Buffer/getFormat.lua

@@ -6,12 +6,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'format',
+    format = {
       type = 'table',
       type = 'table',
       description = 'The format of the Buffer.'
       description = 'The format of the Buffer.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'format' }
+    }
+  },
   example = [=[
   example = [=[
     function lovr.load()
     function lovr.load()
       buffer = lovr.graphics.newBuffer(1, { 'vec3', 'vec3', 'vec2' })
       buffer = lovr.graphics.newBuffer(1, { 'vec3', 'vec3', 'vec2' })

+ 7 - 2
api/lovr/graphics/Buffer/getLength.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the length of the Buffer.',
   description = 'Returns the length of the Buffer.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'length',
+    length = {
       type = 'number',
       type = 'number',
       description = 'The length of the Buffer.'
       description = 'The length of the Buffer.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'length' }
+    }
+  },
   related = {
   related = {
     'Buffer:getSize',
     'Buffer:getSize',
     'Buffer:getStride'
     'Buffer:getStride'

+ 7 - 2
api/lovr/graphics/Buffer/getPointer.lua

@@ -7,12 +7,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'pointer',
+    pointer = {
       type = 'lightuserdata',
       type = 'lightuserdata',
       description = 'A pointer to the Buffer\'s memory.'
       description = 'A pointer to the Buffer\'s memory.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'pointer' }
+    }
+  },
   related = {
   related = {
     'Blob:getPointer'
     'Blob:getPointer'
   }
   }

+ 7 - 2
api/lovr/graphics/Buffer/getSize.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the size of the Buffer, in bytes.  This is the same as `length * stride`.',
   description = 'Returns the size of the Buffer, in bytes.  This is the same as `length * stride`.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'size',
+    size = {
       type = 'number',
       type = 'number',
       description = 'The size of the Buffer, in bytes.'
       description = 'The size of the Buffer, in bytes.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'size' }
+    }
+  },
   related = {
   related = {
     'Buffer:getLength',
     'Buffer:getLength',
     'Buffer:getStride'
     'Buffer:getStride'

+ 7 - 2
api/lovr/graphics/Buffer/getStride.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns the distance between each item in the Buffer, in bytes.',
   description = 'Returns the distance between each item in the Buffer, in bytes.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'stride',
+    stride = {
       type = 'number',
       type = 'number',
       description = 'The stride of the Buffer, in bytes.'
       description = 'The stride of the Buffer, in bytes.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'stride' }
+    }
+  },
   notes = [[
   notes = [[
     When a Buffer is created, the stride can be set explicitly, otherwise it will be automatically
     When a Buffer is created, the stride can be set explicitly, otherwise it will be automatically
     computed based on the fields in the Buffer.
     computed based on the fields in the Buffer.

+ 7 - 2
api/lovr/graphics/Buffer/isTemporary.lua

@@ -3,12 +3,17 @@ return {
   description = 'Returns whether the Buffer is temporary.',
   description = 'Returns whether the Buffer is temporary.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'temporary',
+    temporary = {
       type = 'boolean',
       type = 'boolean',
       description = 'Whether the Buffer is temporary.'
       description = 'Whether the Buffer is temporary.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'temporary' }
+    }
+  },
   related = {
   related = {
     'lovr.graphics.getBuffer'
     'lovr.graphics.getBuffer'
   }
   }

+ 7 - 2
api/lovr/graphics/Font/getDescent.lua

@@ -7,12 +7,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'descent',
+    descent = {
       type = 'number',
       type = 'number',
       description = 'The descent of the font.'
       description = 'The descent of the font.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'descent' }
+    }
+  },
   related = {
   related = {
     'Rasterizer:getDescent',
     'Rasterizer:getDescent',
     'Font:getAscent',
     'Font:getAscent',

+ 7 - 2
api/lovr/graphics/Font/getHeight.lua

@@ -8,12 +8,17 @@ return {
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
-    {
-      name = 'height',
+    height = {
       type = 'number',
       type = 'number',
       description = 'The height of the font.'
       description = 'The height of the font.'
     }
     }
   },
   },
+  variants = {
+    {
+      arguments = {},
+      returns = { 'height' }
+    }
+  },
   related = {
   related = {
     'Rasterizer:getLeading',
     'Rasterizer:getLeading',
     'Font:getLineSpacing',
     'Font:getLineSpacing',

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