bjorn 3 days ago
parent
commit
95cb24aaae
54 changed files with 264 additions and 871 deletions
  1. 97 470
      api/init.lua
  2. 6 1
      api/lovr/event/poll.lua
  3. 2 1
      api/lovr/event/push.lua
  4. 1 1
      api/lovr/event/quit.lua
  5. 5 13
      api/lovr/filesystem/append.lua
  6. 4 4
      api/lovr/filesystem/createDirectory.lua
  7. 1 1
      api/lovr/filesystem/getAppdataDirectory.lua
  8. 1 1
      api/lovr/filesystem/getDirectoryItems.lua
  9. 1 1
      api/lovr/filesystem/getExecutablePath.lua
  10. 1 1
      api/lovr/filesystem/getIdentity.lua
  11. 2 2
      api/lovr/filesystem/getLastModified.lua
  12. 5 2
      api/lovr/filesystem/getRealDirectory.lua
  13. 7 3
      api/lovr/filesystem/getSize.lua
  14. 1 1
      api/lovr/filesystem/getSource.lua
  15. 1 1
      api/lovr/filesystem/getUserDirectory.lua
  16. 1 1
      api/lovr/filesystem/getWorkingDirectory.lua
  17. 1 1
      api/lovr/filesystem/mount.lua
  18. 2 2
      api/lovr/filesystem/read.lua
  19. 1 1
      api/lovr/filesystem/remove.lua
  20. 2 10
      api/lovr/filesystem/write.lua
  21. 4 25
      api/lovr/graphics/Font/getKerning.lua
  22. 1 1
      api/lovr/graphics/Font/getLines.lua
  23. 5 2
      api/lovr/graphics/Font/getVertices.lua
  24. 1 1
      api/lovr/graphics/Mesh/getIndices.lua
  25. 1 1
      api/lovr/graphics/Mesh/getVertices.lua
  26. 1 1
      api/lovr/graphics/Mesh/setIndices.lua
  27. 3 6
      api/lovr/graphics/Mesh/setVertices.lua
  28. 3 11
      api/lovr/graphics/Model/animate.lua
  29. 4 12
      api/lovr/graphics/Model/getAnimationDuration.lua
  30. 4 12
      api/lovr/graphics/Model/getBlendShapeWeight.lua
  31. 4 12
      api/lovr/graphics/Model/getMaterial.lua
  32. 6 14
      api/lovr/graphics/Model/getNodeChildren.lua
  33. 4 12
      api/lovr/graphics/Model/getNodeOrientation.lua
  34. 3 11
      api/lovr/graphics/Model/getNodeParent.lua
  35. 4 12
      api/lovr/graphics/Model/getNodePose.lua
  36. 3 11
      api/lovr/graphics/Model/getNodePosition.lua
  37. 4 12
      api/lovr/graphics/Model/getNodeScale.lua
  38. 3 11
      api/lovr/graphics/Model/getNodeTransform.lua
  39. 2 2
      api/lovr/graphics/Model/getTriangles.lua
  40. 4 12
      api/lovr/graphics/Model/setBlendShapeWeight.lua
  41. 5 17
      api/lovr/graphics/Model/setNodeOrientation.lua
  42. 5 17
      api/lovr/graphics/Model/setNodePose.lua
  43. 5 13
      api/lovr/graphics/Model/setNodePosition.lua
  44. 5 17
      api/lovr/graphics/Model/setNodeScale.lua
  45. 6 22
      api/lovr/graphics/Model/setNodeTransform.lua
  46. 2 10
      api/lovr/graphics/compileShader.lua
  47. 1 1
      api/lovr/graphics/getWindowPass.lua
  48. 8 29
      api/lovr/graphics/newBuffer.lua
  49. 4 13
      api/lovr/graphics/newFont.lua
  50. 4 12
      api/lovr/graphics/newModel.lua
  51. 3 3
      api/lovr/graphics/newShader.lua
  52. 7 15
      api/lovr/graphics/newTexture.lua
  53. 1 1
      api/lovr/graphics/setBackgroundColor.lua
  54. 2 2
      api/lovr/graphics/submit.lua

File diff suppressed because it is too large
+ 97 - 470
api/init.lua


+ 6 - 1
api/lovr/event/poll.lua

@@ -20,5 +20,10 @@ return {
       arguments = {},
       arguments = {},
       returns = { 'iterator' }
       returns = { 'iterator' }
     }
     }
-  }
+  },
+  example = [[
+    for name, arg1, arg2, arg3 in lovr.event.poll() do
+      print(name, arg1, arg2, arg3)
+    end
+  ]]
 }
 }

+ 2 - 1
api/lovr/event/push.lua

@@ -23,7 +23,8 @@ return {
     }
     }
   },
   },
   notes = [[
   notes = [[
-    Only nil, booleans, numbers, strings, and LÖVR objects are supported types for event data.
+    Arguments can be nil, booleans, numbers, strings, lightuserdata, vectors, tables, and LÖVR
+    objects.
   ]],
   ]],
   related = {
   related = {
     'lovr.event.poll',
     'lovr.event.poll',

+ 1 - 1
api/lovr/event/quit.lua

@@ -20,7 +20,7 @@ return {
     }
     }
   },
   },
   notes = [[
   notes = [[
-    This function is equivalent to calling `lovr.event.push('quit', <args>)`.
+    This function is equivalent to calling `lovr.event.push('quit', code)`.
 
 
     The event won't be processed until the next time `lovr.event.poll` is called.
     The event won't be processed until the next time `lovr.event.poll` is called.
 
 

+ 5 - 13
api/lovr/filesystem/append.lua

@@ -8,32 +8,24 @@ return {
       description = 'The file to append to.'
       description = 'The file to append to.'
     },
     },
     content = {
     content = {
-      type = 'string',
-      description = 'A string to write to the end of the file.'
-    },
-    blob = {
-      type = 'Blob',
-      description = 'A Blob containing data to append to the file.'
+      type = 'string | Blob',
+      description = 'A string or Blob to append to the file.'
     }
     }
   },
   },
   returns = {
   returns = {
     success = {
     success = {
-      type = 'number',
+      type = 'boolean',
       description = 'Whether the operation was successful.'
       description = 'Whether the operation was successful.'
     },
     },
     error = {
     error = {
-      type = 'string',
-      description = 'The error message, if there was an error.'
+      type = 'string | nil',
+      description = 'The error message, or `nil` if there was no error.'
     }
     }
   },
   },
   variants = {
   variants = {
     {
     {
       arguments = { 'filename', 'content' },
       arguments = { 'filename', 'content' },
       returns = { 'success', 'error' }
       returns = { 'success', 'error' }
-    },
-    {
-      arguments = { 'filename', 'blob' },
-      returns = { 'success', 'error' }
     }
     }
   },
   },
   notes = 'If the file does not exist, it is created.'
   notes = 'If the file does not exist, it is created.'

+ 4 - 4
api/lovr/filesystem/createDirectory.lua

@@ -2,8 +2,8 @@ return {
   tag = 'filesystem-files',
   tag = 'filesystem-files',
   summary = 'Create a directory.',
   summary = 'Create a directory.',
   description = [[
   description = [[
-    Creates a directory in the save directory.  Any parent directories that don't exist will also be
-    created.
+    Creates a directory in the save directory.  Also creates any intermediate directories that don't
+    exist.
   ]],
   ]],
   arguments = {
   arguments = {
     path = {
     path = {
@@ -17,8 +17,8 @@ return {
       description = 'Whether the directory was created.'
       description = 'Whether the directory was created.'
     },
     },
     error = {
     error = {
-      type = 'string',
-      description = 'The error message, if there was a failure.'
+      type = 'string | nil',
+      description = 'The error message.'
     }
     }
   },
   },
   variants = {
   variants = {

+ 1 - 1
api/lovr/filesystem/getAppdataDirectory.lua

@@ -11,7 +11,7 @@ return {
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     path = {
     path = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The absolute path to the appdata directory.'
       description = 'The absolute path to the appdata directory.'
     }
     }
   },
   },

+ 1 - 1
api/lovr/filesystem/getDirectoryItems.lua

@@ -10,7 +10,7 @@ return {
   },
   },
   returns = {
   returns = {
     items = {
     items = {
-      type = 'table',
+      type = '{string}',
       description = 'A table with a string for each file and subfolder in the directory.'
       description = 'A table with a string for each file and subfolder in the directory.'
     }
     }
   },
   },

+ 1 - 1
api/lovr/filesystem/getExecutablePath.lua

@@ -5,7 +5,7 @@ return {
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     path = {
     path = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The absolute path of the LÖVR executable, or `nil` if it is unknown.'
       description = 'The absolute path of the LÖVR executable, or `nil` if it is unknown.'
     }
     }
   },
   },

+ 1 - 1
api/lovr/filesystem/getIdentity.lua

@@ -8,7 +8,7 @@ return {
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     identity = {
     identity = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The name of the save directory, or `nil` if it isn\'t set.'
       description = 'The name of the save directory, or `nil` if it isn\'t set.'
     }
     }
   },
   },

+ 2 - 2
api/lovr/filesystem/getLastModified.lua

@@ -10,11 +10,11 @@ return {
   },
   },
   returns = {
   returns = {
     time = {
     time = {
-      type = 'number',
+      type = 'number | nil',
       description = 'The modification time of the file, in seconds, or `nil` if there was an error.'
       description = 'The modification time of the file, in seconds, or `nil` if there was an error.'
     },
     },
     error = {
     error = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The error message, if there was an error.'
       description = 'The error message, if there was an error.'
     }
     }
   },
   },

+ 5 - 2
api/lovr/filesystem/getRealDirectory.lua

@@ -13,8 +13,11 @@ return {
   },
   },
   returns = {
   returns = {
     realpath = {
     realpath = {
-      type = 'string',
-      description = 'The absolute path of the mounted archive containing `path`.'
+      type = 'string | nil',
+      description = [[
+        The absolute path of the mounted archive containing `path`, or `nil` if the file is not in
+        the virtual filesystem.
+      ]]
     }
     }
   },
   },
   variants = {
   variants = {

+ 7 - 3
api/lovr/filesystem/getSize.lua

@@ -10,14 +10,18 @@ return {
   },
   },
   returns = {
   returns = {
     size = {
     size = {
-      type = 'number',
-      description = 'The size of the file, in bytes.'
+      type = 'number | nil',
+      description = 'The size of the file, in bytes, or `nil` if there was an error.'
+    },
+    error = {
+      type = 'string | nil',
+      description = 'The error message, if the operation was not successful.'
     }
     }
   },
   },
   variants = {
   variants = {
     {
     {
       arguments = { 'file' },
       arguments = { 'file' },
-      returns = { 'size' }
+      returns = { 'size', 'error' }
     }
     }
   },
   },
   notes = 'If the file does not exist, an error is thrown.',
   notes = 'If the file does not exist, an error is thrown.',

+ 1 - 1
api/lovr/filesystem/getSource.lua

@@ -5,7 +5,7 @@ return {
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     path = {
     path = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The absolute path of the project\'s source, or `nil` if it\'s unknown.'
       description = 'The absolute path of the project\'s source, or `nil` if it\'s unknown.'
     }
     }
   },
   },

+ 1 - 1
api/lovr/filesystem/getUserDirectory.lua

@@ -5,7 +5,7 @@ return {
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     path = {
     path = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The absolute path of the user\'s home directory.'
       description = 'The absolute path of the user\'s home directory.'
     }
     }
   },
   },

+ 1 - 1
api/lovr/filesystem/getWorkingDirectory.lua

@@ -8,7 +8,7 @@ return {
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     path = {
     path = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The current working directory, or `nil` if it\'s unknown.'
       description = 'The current working directory, or `nil` if it\'s unknown.'
     }
     }
   },
   },

+ 1 - 1
api/lovr/filesystem/mount.lua

@@ -37,7 +37,7 @@ return {
       description = 'Whether the archive was successfully mounted.'
       description = 'Whether the archive was successfully mounted.'
     },
     },
     error = {
     error = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The error message, if the archive failed to mount.'
       description = 'The error message, if the archive failed to mount.'
     }
     }
   },
   },

+ 2 - 2
api/lovr/filesystem/read.lua

@@ -10,11 +10,11 @@ return {
   },
   },
   returns = {
   returns = {
     contents = {
     contents = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The contents of the file, or nil if the file could not be read.'
       description = 'The contents of the file, or nil if the file could not be read.'
     },
     },
     error = {
     error = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The error message, if any.'
       description = 'The error message, if any.'
     }
     }
   },
   },

+ 1 - 1
api/lovr/filesystem/remove.lua

@@ -14,7 +14,7 @@ return {
       description = 'Whether the path was removed.'
       description = 'Whether the path was removed.'
     },
     },
     error = {
     error = {
-      type = 'string',
+      type = 'string | nil',
       description = 'The error message, if any.'
       description = 'The error message, if any.'
     }
     }
   },
   },

+ 2 - 10
api/lovr/filesystem/write.lua

@@ -8,12 +8,8 @@ return {
       description = 'The file to write to.'
       description = 'The file to write to.'
     },
     },
     content = {
     content = {
-      type = 'string',
-      description = 'A string to write to the file.'
-    },
-    blob = {
-      type = 'Blob',
-      description = 'A Blob containing data to write to the file.'
+      type = 'string | Blob',
+      description = 'A string or Blob to write to the file.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -30,10 +26,6 @@ return {
     {
     {
       arguments = { 'filename', 'content' },
       arguments = { 'filename', 'content' },
       returns = { 'success', 'error' }
       returns = { 'success', 'error' }
-    },
-    {
-      arguments = { 'filename', 'blob' },
-      returns = { 'success', 'error' }
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 4 - 25
api/lovr/graphics/Font/getKerning.lua

@@ -7,21 +7,12 @@ return {
   ]],
   ]],
   arguments = {
   arguments = {
     first = {
     first = {
-      type = 'string',
-      description = 'The first character.'
-    },
-    firstCodepoint = {
-      type = 'number',
-      description = 'The first codepoint.'
+      type = 'string | number',
+      description = 'The first character or codepoint.'
     },
     },
     second = {
     second = {
-      type = 'string',
-      description = 'The second character.'
-    },
-    secondCodepoint = {
-      name = 'secondCodepoint',
-      type = 'number',
-      description = 'The second codepoint.'
+      type = 'string | number',
+      description = 'The second character or codepoint.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -34,18 +25,6 @@ return {
     {
     {
       arguments = { 'first', 'second' },
       arguments = { 'first', 'second' },
       returns = { 'keming' }
       returns = { 'keming' }
-    },
-    {
-      arguments = { 'firstCodepoint', 'second' },
-      returns = { 'keming' }
-    },
-    {
-      arguments = { 'first', 'secondCodepoint' },
-      returns = { 'keming' }
-    },
-    {
-      arguments = { 'firstCodepoint', 'secondCodepoint' },
-      returns = { 'keming' }
     }
     }
   },
   },
   related = {
   related = {

+ 1 - 1
api/lovr/graphics/Font/getLines.lua

@@ -25,7 +25,7 @@ return {
   },
   },
   returns = {
   returns = {
     lines = {
     lines = {
-      type = 'table',
+      type = '{string}',
       description = 'A table of strings, one for each wrapped line.'
       description = 'A table of strings, one for each wrapped line.'
     }
     }
   },
   },

+ 5 - 2
api/lovr/graphics/Font/getVertices.lua

@@ -36,7 +36,7 @@ return {
   },
   },
   returns = {
   returns = {
     vertices = {
     vertices = {
-      type = 'table',
+      type = '{number}',
       description = 'The table of vertices.  See below for the format of each vertex.'
       description = 'The table of vertices.  See below for the format of each vertex.'
     },
     },
     material = {
     material = {
@@ -61,6 +61,9 @@ return {
 
 
     These could be placed in a vertex buffer using the following buffer format:
     These could be placed in a vertex buffer using the following buffer format:
 
 
-        { 'vec2:VertexPosition', 'vec2:VertexUV' }
+        {
+          { 'VertexPosition', 'vec2' },
+          { 'VertexUV', 'vec2' }
+        }
   ]]
   ]]
 }
 }

+ 1 - 1
api/lovr/graphics/Mesh/getIndices.lua

@@ -4,7 +4,7 @@ return {
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     t = {
     t = {
-      type = 'table',
+      type = '{number}',
       description = 'A table of numbers with the 1-based vertex indices.'
       description = 'A table of numbers with the 1-based vertex indices.'
     }
     }
   },
   },

+ 1 - 1
api/lovr/graphics/Mesh/getVertices.lua

@@ -18,7 +18,7 @@ return {
   },
   },
   returns = {
   returns = {
     vertices = {
     vertices = {
-      type = 'table',
+      type = '{{number}}',
       description = [[
       description = [[
         A table of vertices.  Each vertex is a table of numbers for each vertex attribute, given by
         A table of vertices.  Each vertex is a table of numbers for each vertex attribute, given by
         the vertex format of the Mesh.
         the vertex format of the Mesh.

+ 1 - 1
api/lovr/graphics/Mesh/setIndices.lua

@@ -9,7 +9,7 @@ return {
   ]],
   ]],
   arguments = {
   arguments = {
     t = {
     t = {
-      type = 'table',
+      type = '{number}',
       description = 'A list of numbers (1-based).'
       description = 'A list of numbers (1-based).'
     },
     },
     blob = {
     blob = {

+ 3 - 6
api/lovr/graphics/Mesh/setVertices.lua

@@ -3,7 +3,7 @@ return {
   description = 'Sets the data for vertices in the Mesh.',
   description = 'Sets the data for vertices in the Mesh.',
   arguments = {
   arguments = {
     vertices = {
     vertices = {
-      type = 'table',
+      type = '{{number}}',
       description = [[
       description = [[
         A table of vertices, where each vertex is a table of numbers matching the vertex format of
         A table of vertices, where each vertex is a table of numbers matching the vertex format of
         the Mesh.
         the Mesh.
@@ -16,15 +16,12 @@ return {
     index = {
     index = {
       type = 'number',
       type = 'number',
       default = '1',
       default = '1',
-      description = 'The index of the first vertex to return.'
+      description = 'The index of the first vertex to set.'
     },
     },
     count = {
     count = {
       type = 'number',
       type = 'number',
       default = 'nil',
       default = 'nil',
-      description = [[
-        The number of vertices to return.  If nil, returns the "rest" of the vertices, based on the
-        `index` argument.
-      ]]
+      description = 'The number of vertices to set.'
     }
     }
   },
   },
   returns = {},
   returns = {},

+ 3 - 11
api/lovr/graphics/Model/animate.lua

@@ -10,13 +10,9 @@ return {
     remain unchanged.
     remain unchanged.
   ]],
   ]],
   arguments = {
   arguments = {
-    name = {
+    animation = {
       type = 'string',
       type = 'string',
-      description = 'The name of an animation in the model file.'
-    },
-    index = {
-      type = 'number',
-      description = 'The index of an animation in the model file.'
+      description = 'The name or index of an animation in the model file.'
     },
     },
     time = {
     time = {
       type = 'number',
       type = 'number',
@@ -31,11 +27,7 @@ return {
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
-      arguments = { 'name', 'time', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'index', 'time', 'blend' },
+      arguments = { 'animation', 'time', 'blend' },
       returns = {}
       returns = {}
     }
     }
   },
   },

+ 4 - 12
api/lovr/graphics/Model/getAnimationDuration.lua

@@ -2,13 +2,9 @@ return {
   summary = 'Get the duration of an animation in the Model.',
   summary = 'Get the duration of an animation in the Model.',
   description = 'Returns the duration of an animation in the Model, in seconds.',
   description = 'Returns the duration of an animation in the Model, in seconds.',
   arguments = {
   arguments = {
-    name = {
-      type = 'string',
-      description = 'The name of the animation.'
-    },
-    index = {
-      type = 'number',
-      description = 'The animation index.'
+    animation = {
+      type = 'string | number',
+      description = 'The name or index of an animation.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -19,11 +15,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'index' },
-      returns = { 'duration' }
-    },
-    {
-      arguments = { 'name' },
+      arguments = { 'animation' },
       returns = { 'duration' }
       returns = { 'duration' }
     }
     }
   },
   },

+ 4 - 12
api/lovr/graphics/Model/getBlendShapeWeight.lua

@@ -7,13 +7,9 @@ return {
     zero won't apply any displacement and will skip processing of the blend shape.
     zero won't apply any displacement and will skip processing of the blend shape.
   ]],
   ]],
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of a blend shape.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of a blend shape.'
+    blendshape = {
+      type = 'string | number',
+      description = 'The name or index of a blend shape.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -24,11 +20,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'index' },
-      returns = { 'weight' }
-    },
-    {
-      arguments = { 'name' },
+      arguments = { 'blendshape' },
       returns = { 'weight' }
       returns = { 'weight' }
     }
     }
   },
   },

+ 4 - 12
api/lovr/graphics/Model/getMaterial.lua

@@ -2,13 +2,9 @@ return {
   summary = 'Get a Material from the Model.',
   summary = 'Get a Material from the Model.',
   description = 'Returns a `Material` loaded from the Model.',
   description = 'Returns a `Material` loaded from the Model.',
   arguments = {
   arguments = {
-    name = {
-      type = 'string',
-      description = 'The name of the Material to return.'
-    },
-    index = {
-      type = 'number',
-      description = 'The index of the Material to return.'
+    which = {
+      type = 'string | number',
+      description = 'The name or index of the Material to return.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -19,11 +15,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'name' },
-      returns = { 'material' }
-    },
-    {
-      arguments = { 'index' },
+      arguments = { 'which' },
       returns = { 'material' }
       returns = { 'material' }
     }
     }
   },
   },

+ 6 - 14
api/lovr/graphics/Model/getNodeChildren.lua

@@ -4,28 +4,20 @@ return {
     Given a parent node, this function returns a table with the indices of its children.
     Given a parent node, this function returns a table with the indices of its children.
   ]],
   ]],
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of the parent node.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of the parent node.'
+    node = {
+      type = 'string | number',
+      description = 'The name or index of the parent node.'
     }
     }
   },
   },
   returns = {
   returns = {
     children = {
     children = {
-      type = 'table',
-      description = 'A table containing a node index for each child of the node.'
+      type = '{number}',
+      description = 'A table containing the node index of each child of the parent node.'
     }
     }
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'index' },
-      returns = { 'children' }
-    },
-    {
-      arguments = { 'name' },
+      arguments = { 'node' },
       returns = { 'children' }
       returns = { 'children' }
     }
     }
   },
   },

+ 4 - 12
api/lovr/graphics/Model/getNodeOrientation.lua

@@ -2,13 +2,9 @@ return {
   summary = 'Get the orientation of a node.',
   summary = 'Get the orientation of a node.',
   description = 'Returns the orientation of a node.',
   description = 'Returns the orientation of a node.',
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of the node.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of the node.'
+    node = {
+      type = 'string | number',
+      description = 'The name or index of a node.'
     },
     },
     origin = {
     origin = {
       type = 'OriginType',
       type = 'OriginType',
@@ -38,11 +34,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'origin' },
-      returns = { 'angle', 'ax', 'ay', 'az' }
-    },
-    {
-      arguments = { 'name', 'origin' },
+      arguments = { 'node', 'origin' },
       returns = { 'angle', 'ax', 'ay', 'az' }
       returns = { 'angle', 'ax', 'ay', 'az' }
     }
     }
   },
   },

+ 3 - 11
api/lovr/graphics/Model/getNodeParent.lua

@@ -2,13 +2,9 @@ return {
   summary = 'Get the parent of a node.',
   summary = 'Get the parent of a node.',
   description = 'Given a child node, this function returns the index of its parent.',
   description = 'Given a child node, this function returns the index of its parent.',
   arguments = {
   arguments = {
-    index = {
+    node = {
       type = 'number',
       type = 'number',
-      description = 'The index of the child node.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of the child node.'
+      description = 'The name or index of the child node.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -19,11 +15,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'index' },
-      returns = { 'parent' }
-    },
-    {
-      arguments = { 'name' },
+      arguments = { 'node' },
       returns = { 'parent' }
       returns = { 'parent' }
     }
     }
   },
   },

+ 4 - 12
api/lovr/graphics/Model/getNodePose.lua

@@ -2,13 +2,9 @@ return {
   summary = 'Get the pose of a node.',
   summary = 'Get the pose of a node.',
   description = 'Returns the pose (position and orientation) of a node.',
   description = 'Returns the pose (position and orientation) of a node.',
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of a node.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of a node.'
+    node = {
+      type = 'string | number',
+      description = 'The name or index of a node.'
     },
     },
     origin = {
     origin = {
       type = 'OriginType',
       type = 'OriginType',
@@ -50,11 +46,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'origin' },
-      returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
-    },
-    {
-      arguments = { 'name', 'origin' },
+      arguments = { 'node', 'origin' },
       returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
       returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
     }
     }
   },
   },

+ 3 - 11
api/lovr/graphics/Model/getNodePosition.lua

@@ -2,14 +2,10 @@ return {
   summary = 'Get the position of a node.',
   summary = 'Get the position of a node.',
   description = 'Returns the position of a node.',
   description = 'Returns the position of a node.',
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
+    node = {
+      type = 'string | number',
       description = 'The index of the node.'
       description = 'The index of the node.'
     },
     },
-    name = {
-      type = 'string',
-      description = 'The name of the node.'
-    },
     space = {
     space = {
       type = 'OriginType',
       type = 'OriginType',
       default = [['root']],
       default = [['root']],
@@ -34,11 +30,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'space' },
-      returns = { 'x', 'y', 'z' }
-    },
-    {
-      arguments = { 'name', 'space' },
+      arguments = { 'node', 'space' },
       returns = { 'x', 'y', 'z' }
       returns = { 'x', 'y', 'z' }
     }
     }
   },
   },

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

@@ -2,13 +2,9 @@ return {
   summary = 'Get the scale of a node.',
   summary = 'Get the scale of a node.',
   description = 'Returns the scale of a node.',
   description = 'Returns the scale of a node.',
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of the node.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of the node.'
+    node = {
+      type = 'string | number',
+      description = 'The name or index of the node.'
     },
     },
     origin = {
     origin = {
       type = 'OriginType',
       type = 'OriginType',
@@ -34,11 +30,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'origin' },
-      returns = { 'x', 'y', 'z' }
-    },
-    {
-      arguments = { 'name', 'origin' },
+      arguments = { 'node', 'origin' },
       returns = { 'x', 'y', 'z' }
       returns = { 'x', 'y', 'z' }
     }
     }
   },
   },

+ 3 - 11
api/lovr/graphics/Model/getNodeTransform.lua

@@ -2,14 +2,10 @@ return {
   summary = 'Get the transform of a node.',
   summary = 'Get the transform of a node.',
   description = 'Returns the transform (position, scale, and rotation) of a node.',
   description = 'Returns the transform (position, scale, and rotation) of a node.',
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
+    node = {
+      type = 'string | number',
       description = 'The index of a node.'
       description = 'The index of a node.'
     },
     },
-    name = {
-      type = 'string',
-      description = 'The name of a node.'
-    },
     origin = {
     origin = {
       type = 'OriginType',
       type = 'OriginType',
       default = [['root']],
       default = [['root']],
@@ -62,11 +58,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'origin' },
-      returns = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' }
-    },
-    {
-      arguments = { 'name', 'origin' },
+      arguments = { 'node', 'origin' },
       returns = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' }
       returns = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' }
     }
     }
   },
   },

+ 2 - 2
api/lovr/graphics/Model/getTriangles.lua

@@ -13,14 +13,14 @@ return {
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     vertices = {
     vertices = {
-      type = 'table',
+      type = '{number}',
       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.
       ]]
       ]]
     },
     },
     indices = {
     indices = {
-      type = 'table',
+      type = '{number}',
       description = [[
       description = [[
         A list of numbers representing how to connect the vertices into triangles.  Each number is
         A list of numbers representing how to connect the vertices into triangles.  Each number is
         a 1-based index into the `vertices` table, and every 3 indices form a triangle.
         a 1-based index into the `vertices` table, and every 3 indices form a triangle.

+ 4 - 12
api/lovr/graphics/Model/setBlendShapeWeight.lua

@@ -7,13 +7,9 @@ return {
     won't apply any displacement and will skip processing of the blend shape.
     won't apply any displacement and will skip processing of the blend shape.
   ]],
   ]],
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of a blend shape.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of a blend shape.'
+    blendshape = {
+      type = 'string | number',
+      description = 'The name or index of a blend shape.'
     },
     },
     weight = {
     weight = {
       type = 'number',
       type = 'number',
@@ -23,11 +19,7 @@ return {
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'weight' },
-      returns = {}
-    },
-    {
-      arguments = { 'name', 'weight' },
+      arguments = { 'blendshape', 'weight' },
       returns = {}
       returns = {}
     }
     }
   },
   },

+ 5 - 17
api/lovr/graphics/Model/setNodeOrientation.lua

@@ -5,13 +5,9 @@ return {
     of the node, relative to its parent.
     of the node, relative to its parent.
   ]],
   ]],
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of the node.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of the node.'
+    node = {
+      type = 'string | number',
+      description = 'The name or index of a node.'
     },
     },
     angle = {
     angle = {
       type = 'number',
       type = 'number',
@@ -46,19 +42,11 @@ return {
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'angle', 'ax', 'ay', 'az', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'name', 'angle', 'ax', 'ay', 'az', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'index', 'orientation', 'blend' },
+      arguments = { 'node', 'angle', 'ax', 'ay', 'az', 'blend' },
       returns = {}
       returns = {}
     },
     },
     {
     {
-      arguments = { 'name', 'orientation', 'blend' },
+      arguments = { 'node', 'orientation', 'blend' },
       returns = {}
       returns = {}
     }
     }
   },
   },

+ 5 - 17
api/lovr/graphics/Model/setNodePose.lua

@@ -5,13 +5,9 @@ return {
     pose of the node, relative to its parent.  The scale will remain unchanged.
     pose of the node, relative to its parent.  The scale will remain unchanged.
   ]],
   ]],
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of the node.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of the node.'
+    node = {
+      type = 'string | number',
+      description = 'The name or index of a node.'
     },
     },
     x = {
     x = {
       type = 'number',
       type = 'number',
@@ -61,19 +57,11 @@ return {
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'name', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'index', 'position', 'orientation', 'blend' },
+      arguments = { 'node', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'blend' },
       returns = {}
       returns = {}
     },
     },
     {
     {
-      arguments = { 'name', 'position', 'orientation', 'blend' },
+      arguments = { 'node', 'position', 'orientation', 'blend' },
       returns = {}
       returns = {}
     }
     }
   },
   },

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

@@ -5,9 +5,9 @@ return {
     its parent.
     its parent.
   ]],
   ]],
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of the node.'
+    node = {
+      type = 'string | number',
+      description = 'The name or index of a node.'
     },
     },
     name = {
     name = {
       type = 'string',
       type = 'string',
@@ -41,19 +41,11 @@ return {
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'x', 'y', 'z', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'name', 'x', 'y', 'z', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'index', 'position', 'blend' },
+      arguments = { 'node', 'x', 'y', 'z', 'blend' },
       returns = {}
       returns = {}
     },
     },
     {
     {
-      arguments = { 'name', 'position', 'blend' },
+      arguments = { 'node', 'position', 'blend' },
       returns = {}
       returns = {}
     }
     }
   },
   },

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

@@ -5,13 +5,9 @@ return {
     relative to its parent.
     relative to its parent.
   ]],
   ]],
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of the node.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of the node.'
+    node = {
+      type = 'string | number',
+      description = 'The name or index of a node.'
     },
     },
     sx = {
     sx = {
       type = 'number',
       type = 'number',
@@ -41,19 +37,11 @@ return {
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'sx', 'sy', 'sz', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'name', 'sx', 'sy', 'sz', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'index', 'scale', 'blend' },
+      arguments = { 'node', 'sx', 'sy', 'sz', 'blend' },
       returns = {}
       returns = {}
     },
     },
     {
     {
-      arguments = { 'name', 'scale', 'blend' },
+      arguments = { 'node', 'scale', 'blend' },
       returns = {}
       returns = {}
     }
     }
   },
   },

+ 6 - 22
api/lovr/graphics/Model/setNodeTransform.lua

@@ -5,13 +5,9 @@ return {
     node, relative to its parent.
     node, relative to its parent.
   ]],
   ]],
   arguments = {
   arguments = {
-    index = {
-      type = 'number',
-      description = 'The index of the node.'
-    },
-    name = {
-      type = 'string',
-      description = 'The name of the node.'
+    node = {
+      type = 'string | number',
+      description = 'The name or index of a node.'
     },
     },
     x = {
     x = {
       type = 'number',
       type = 'number',
@@ -82,27 +78,15 @@ return {
   returns = {},
   returns = {},
   variants = {
   variants = {
     {
     {
-      arguments = { 'index', 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'name', 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'index', 'position', 'scale', 'orientation', 'blend' },
-      returns = {}
-    },
-    {
-      arguments = { 'name', 'position', 'scale', 'orientation', 'blend' },
+      arguments = { 'node', 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az', 'blend' },
       returns = {}
       returns = {}
     },
     },
     {
     {
-      arguments = { 'index', 'transform', 'blend' },
+      arguments = { 'node', 'position', 'scale', 'orientation', 'blend' },
       returns = {}
       returns = {}
     },
     },
     {
     {
-      arguments = { 'name', 'transform', 'blend' },
+      arguments = { 'node', 'transform', 'blend' },
       returns = {}
       returns = {}
     }
     }
   },
   },

+ 2 - 10
api/lovr/graphics/compileShader.lua

@@ -13,12 +13,8 @@ return {
       description = 'The type of shader to compile.'
       description = 'The type of shader to compile.'
     },
     },
     source = {
     source = {
-      type = 'string',
-      description = 'A string or filename with shader code.'
-    },
-    blob = {
-      type = 'Blob',
-      description = 'A Blob containing shader code.'
+      type = 'string | Blob',
+      description = 'A string, filename, or Blob with shader code.'
     }
     }
   },
   },
   returns = {
   returns = {
@@ -31,10 +27,6 @@ return {
     {
     {
       arguments = { 'stage', 'source' },
       arguments = { 'stage', 'source' },
       returns = { 'bytecode' }
       returns = { 'bytecode' }
-    },
-    {
-      arguments = { 'stage', 'blob' },
-      returns = { 'bytecode' }
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 1 - 1
api/lovr/graphics/getWindowPass.lua

@@ -9,7 +9,7 @@ return {
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     pass = {
     pass = {
-      type = 'Pass',
+      type = 'Pass | nil',
       description = 'The window pass, or `nil` if there is no window.'
       description = 'The window pass, or `nil` if there is no window.'
     }
     }
   },
   },

+ 8 - 29
api/lovr/graphics/newBuffer.lua

@@ -13,27 +13,22 @@ return {
       description = 'The length of the Buffer.'
       description = 'The length of the Buffer.'
     },
     },
     data = {
     data = {
-      type = 'table',
+      type = 'table | Blob',
       description = [[
       description = [[
         The initial data to put into the Buffer.  The length of the Buffer will be determined by the
         The initial data to put into the Buffer.  The length of the Buffer will be determined by the
-        contents of the table.  The contents can be a mix of tables, numbers, and vectors, but the
-        length calculation requires each field to consistently use one type of data.
+        length of the table or the size of the Blob, combined with the format information.
       ]]
       ]]
     },
     },
     blob = {
     blob = {
       type = 'Blob',
       type = 'Blob',
-      description = [[
-        A Blob with the initial contents of the Buffer.  The size of the Blob will be used to
-        determine the length of the Buffer.
-      ]]
-    },
-    type = {
-      type = 'DataType',
-      description = 'The type of each item in the Buffer.'
+      description = 'A Blob with the initial contents of the Buffer.'
     },
     },
     format = {
     format = {
-      type = 'table',
-      description = 'A list of fields in the Buffer.',
+      type = 'table | DataType',
+      description = [[
+        A list of fields in the Buffer.  A `DataType` can also be used for buffers that are simple
+        arrays.
+      ]],
       table = {
       table = {
         {
         {
           name = 'layout',
           name = 'layout',
@@ -75,22 +70,6 @@ return {
     {
     {
       arguments = { 'format', 'data' },
       arguments = { 'format', 'data' },
       returns = { 'buffer' }
       returns = { 'buffer' }
-    },
-    {
-      arguments = { 'format', 'blob' },
-      returns = { 'buffer' }
-    },
-    {
-      arguments = { 'type', 'length' },
-      returns = { 'buffer' }
-    },
-    {
-      arguments = { 'type', 'data' },
-      returns = { 'buffer' }
-    },
-    {
-      arguments = { 'type', 'blob' },
-      returns = { 'buffer' }
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 4 - 13
api/lovr/graphics/newFont.lua

@@ -3,13 +3,9 @@ return {
   summary = 'Create a new Font.',
   summary = 'Create a new Font.',
   description = 'Creates a new Font.',
   description = 'Creates a new Font.',
   arguments = {
   arguments = {
-    filename = {
-      type = 'string',
-      description = 'A path to a TTF or BMFont file.'
-    },
-    blob = {
-      type = 'Blob',
-      description = 'A Blob containing TTF or BMFont file data.'
+    file = {
+      type = 'string | Blob',
+      description = 'A filename or Blob containing a TTF or BMFont file.'
     },
     },
     rasterizer = {
     rasterizer = {
       type = 'Rasterizer',
       type = 'Rasterizer',
@@ -43,12 +39,7 @@ return {
   variants = {
   variants = {
     {
     {
       description = 'Creates a new Font from a font file.',
       description = 'Creates a new Font from a font file.',
-      arguments = { 'filename', 'size', 'spread' },
-      returns = { 'font' }
-    },
-    {
-      description = 'Creates a new Font from font data.',
-      arguments = { 'blob', 'size', 'spread' },
+      arguments = { 'file', 'size', 'spread' },
       returns = { 'font' }
       returns = { 'font' }
     },
     },
     {
     {

+ 4 - 12
api/lovr/graphics/newModel.lua

@@ -5,13 +5,9 @@ return {
     Loads a 3D model from a file.  Currently, OBJ, glTF, and binary STL files are supported.
     Loads a 3D model from a file.  Currently, OBJ, glTF, and binary STL files are supported.
   ]],
   ]],
   arguments = {
   arguments = {
-    filename = {
-      type = 'string',
-      description = 'The path to model file.'
-    },
-    blob = {
-      type = 'Blob',
-      description = 'A Blob containing 3D model data.'
+    file = {
+      type = 'string | Blob',
+      description = 'A filename or Blob containing 3D model data to import.'
     },
     },
     modelData = {
     modelData = {
       type = 'ModelData',
       type = 'ModelData',
@@ -49,11 +45,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'filename', 'options' },
-      returns = { 'model' }
-    },
-    {
-      arguments = { 'blob', 'options' },
+      arguments = { 'file', 'options' },
       returns = { 'model' }
       returns = { 'model' }
     },
     },
     {
     {

+ 3 - 3
api/lovr/graphics/newShader.lua

@@ -14,21 +14,21 @@ return {
   ]],
   ]],
   arguments = {
   arguments = {
     vertex = {
     vertex = {
-      type = 'string',
+      type = 'string | DefaultShader | Blob',
       description = [[
       description = [[
         A string, path to a file, or Blob containing GLSL or SPIR-V code for the vertex stage.  Can
         A string, path to a file, or Blob containing GLSL or SPIR-V code for the vertex stage.  Can
         also be a `DefaultShader` to use that shader's vertex code.
         also be a `DefaultShader` to use that shader's vertex code.
       ]]
       ]]
     },
     },
     fragment = {
     fragment = {
-      type = 'string',
+      type = 'string | DefaultShader | Blob',
       description = [[
       description = [[
         A string, path to a file, or Blob containing GLSL or SPIR-V code for the fragment stage.
         A string, path to a file, or Blob containing GLSL or SPIR-V code for the fragment stage.
         Can also be a `DefaultShader` to use that shader's fragment code.
         Can also be a `DefaultShader` to use that shader's fragment code.
       ]]
       ]]
     },
     },
     compute = {
     compute = {
-      type = 'string',
+      type = 'string | Blob',
       description = [[
       description = [[
         A string, path to a file, or Blob containing GLSL or SPIR-V code for the compute stage.
         A string, path to a file, or Blob containing GLSL or SPIR-V code for the compute stage.
       ]]
       ]]

+ 7 - 15
api/lovr/graphics/newTexture.lua

@@ -7,18 +7,14 @@ return {
     which will create an empty texture.
     which will create an empty texture.
   ]],
   ]],
   arguments = {
   arguments = {
-    filename = {
-      type = 'string',
-      description = 'The filename of an image to load.'
+    file = {
+      type = 'string | Blob',
+      description = 'A filename or Blob containing an image file to load.'
     },
     },
     image = {
     image = {
       type = 'string',
       type = 'string',
       description = 'An Image object holding pixel data to load into the Texture.'
       description = 'An Image object holding pixel data to load into the Texture.'
     },
     },
-    blob = {
-      type = 'Blob',
-      description = 'A Blob object holding pixel data to load into the Texture.'
-    },
     width = {
     width = {
       type = 'number',
       type = 'number',
       description = 'The width of the Texture, in pixels.'
       description = 'The width of the Texture, in pixels.'
@@ -32,7 +28,7 @@ return {
       description = 'The number of layers in the Texture.'
       description = 'The number of layers in the Texture.'
     },
     },
     images = {
     images = {
-      type = 'table',
+      type = '{string | Blob | Image}',
       description = 'A table of filenames or Images to load into the Texture.'
       description = 'A table of filenames or Images to load into the Texture.'
     },
     },
     options = {
     options = {
@@ -70,7 +66,7 @@ return {
         },
         },
         {
         {
           name = 'mipmaps',
           name = 'mipmaps',
-          type = '*',
+          type = 'boolean | number',
           default = 'true',
           default = 'true',
           description = [[
           description = [[
             The number of mipmap levels in the texture, or a boolean.  If true, a full mipmap chain
             The number of mipmap levels in the texture, or a boolean.  If true, a full mipmap chain
@@ -79,7 +75,7 @@ return {
         },
         },
         {
         {
           name = 'usage',
           name = 'usage',
-          type = 'table',
+          type = '{TextureUsage}',
           description = 'A list of `TextureUsage` indicating how the texture will be used.'
           description = 'A list of `TextureUsage` indicating how the texture will be used.'
         },
         },
         {
         {
@@ -98,7 +94,7 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'filename', 'options' },
+      arguments = { 'file', 'options' },
       returns = { 'texture' }
       returns = { 'texture' }
     },
     },
     {
     {
@@ -116,10 +112,6 @@ return {
     {
     {
       arguments = { 'images', 'options' },
       arguments = { 'images', 'options' },
       returns = { 'texture' }
       returns = { 'texture' }
-    },
-    {
-      arguments = { 'blob', 'options' },
-      returns = { 'texture' }
     }
     }
   },
   },
   notes = [[
   notes = [[

+ 1 - 1
api/lovr/graphics/setBackgroundColor.lua

@@ -31,7 +31,7 @@ return {
       ]]
       ]]
     },
     },
     table = {
     table = {
-      type = 'table',
+      type = '{number}',
       description = 'A table containing 3 or 4 color components.'
       description = 'A table containing 3 or 4 color components.'
     }
     }
   },
   },

+ 2 - 2
api/lovr/graphics/submit.lua

@@ -4,11 +4,11 @@ return {
   description = 'Submits work to the GPU.',
   description = 'Submits work to the GPU.',
   arguments = {
   arguments = {
     ['...'] = {
     ['...'] = {
-      type = 'Pass',
+      type = 'Pass | false | nil',
       description = 'The pass objects to submit.  Falsy values will be skipped.'
       description = 'The pass objects to submit.  Falsy values will be skipped.'
     },
     },
     t = {
     t = {
-      type = 'table',
+      type = '{Pass | false}',
       description = 'A table of passes to submit.  Falsy values will be skipped.'
       description = 'A table of passes to submit.  Falsy values will be skipped.'
     }
     }
   },
   },

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