Browse Source

Fix typo;

bjorn 6 years ago
parent
commit
062a75e644
3 changed files with 4 additions and 4 deletions
  1. 2 2
      api/init.lua
  2. 1 1
      api/lovr/graphics/tick.lua
  3. 1 1
      api/lovr/graphics/tock.lua

+ 2 - 2
api/init.lua

@@ -10782,7 +10782,7 @@ return {
           },
           },
           examples = {
           examples = {
             {
             {
-              code = "function lovr.graphics.draw()\n  lovr.graphics.tick('mytimer')\n\n  -- Draw a bunch of cubes\n  for x = -4, 4 do\n    for y = -4, 4 do\n      for z = -4, 4 do\n        lovr.graphics.cube('fill', x, y, z, .2)\n      end\n    end\n  end\n\n  lovr.graphics.tock('mytimer')\n\n  local stats = lovr.graphics.getStats()\n  if stats.timers.mytimer then\n    print('rendering took ' .. stats.timers.mytimer .. ' seconds')\n  end\nend"
+              code = "function lovr.draw()\n  lovr.graphics.tick('mytimer')\n\n  -- Draw a bunch of cubes\n  for x = -4, 4 do\n    for y = -4, 4 do\n      for z = -4, 4 do\n        lovr.graphics.cube('fill', x, y, z, .2)\n      end\n    end\n  end\n\n  lovr.graphics.tock('mytimer')\n\n  local stats = lovr.graphics.getStats()\n  if stats.timers.mytimer then\n    print('rendering took ' .. stats.timers.mytimer .. ' seconds')\n  end\nend"
             }
             }
           },
           },
           notes = "The timer can be stopped by calling `lovr.graphics.tock` using the same name.  All drawing commands between the tick and the tock will be timed.  It is not possible to nest calls to tick and tock.\n\nThe amount of time elapsed can be accessed from the `timers` field of `lovr.graphics.getStats`. Note that the results are delayed (because the GPU runs asynchronously), and may be `nil` if they are unavailable.",
           notes = "The timer can be stopped by calling `lovr.graphics.tock` using the same name.  All drawing commands between the tick and the tock will be timed.  It is not possible to nest calls to tick and tock.\n\nThe amount of time elapsed can be accessed from the `timers` field of `lovr.graphics.getStats`. Note that the results are delayed (because the GPU runs asynchronously), and may be `nil` if they are unavailable.",
@@ -10812,7 +10812,7 @@ return {
           },
           },
           examples = {
           examples = {
             {
             {
-              code = "function lovr.graphics.draw()\n  lovr.graphics.tick('mytimer')\n\n  -- Draw a bunch of cubes\n  for x = -4, 4 do\n    for y = -4, 4 do\n      for z = -4, 4 do\n        lovr.graphics.cube('fill', x, y, z, .2)\n      end\n    end\n  end\n\n  lovr.graphics.tock('mytimer')\n\n  local stats = lovr.graphics.getStats()\n  if stats.timers.mytimer then\n    print('rendering took ' .. stats.timers.mytimer .. ' seconds')\n  end\nend"
+              code = "function lovr.draw()\n  lovr.graphics.tick('mytimer')\n\n  -- Draw a bunch of cubes\n  for x = -4, 4 do\n    for y = -4, 4 do\n      for z = -4, 4 do\n        lovr.graphics.cube('fill', x, y, z, .2)\n      end\n    end\n  end\n\n  lovr.graphics.tock('mytimer')\n\n  local stats = lovr.graphics.getStats()\n  if stats.timers.mytimer then\n    print('rendering took ' .. stats.timers.mytimer .. ' seconds')\n  end\nend"
             }
             }
           },
           },
           notes = "All drawing commands between the tick and the tock will be timed.  It is not possible to nest calls to tick and tock.\n\nThe amount of time elapsed can be accessed from the `timers` field of `lovr.graphics.getStats`. Note that the results are delayed (because the GPU runs asynchronously), and may be `nil` if they are unavailable.",
           notes = "All drawing commands between the tick and the tock will be timed.  It is not possible to nest calls to tick and tock.\n\nThe amount of time elapsed can be accessed from the `timers` field of `lovr.graphics.getStats`. Note that the results are delayed (because the GPU runs asynchronously), and may be `nil` if they are unavailable.",

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

@@ -20,7 +20,7 @@ return {
     they are unavailable.
     they are unavailable.
   ]],
   ]],
   example = [[
   example = [[
-    function lovr.graphics.draw()
+    function lovr.draw()
       lovr.graphics.tick('mytimer')
       lovr.graphics.tick('mytimer')
 
 
       -- Draw a bunch of cubes
       -- Draw a bunch of cubes

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

@@ -19,7 +19,7 @@ return {
     they are unavailable.
     they are unavailable.
   ]],
   ]],
   example = [[
   example = [[
-    function lovr.graphics.draw()
+    function lovr.draw()
       lovr.graphics.tick('mytimer')
       lovr.graphics.tick('mytimer')
 
 
       -- Draw a bunch of cubes
       -- Draw a bunch of cubes