|
@@ -378,7 +378,7 @@ return {
|
|
examples = {
|
|
examples = {
|
|
{
|
|
{
|
|
description = "The default `lovr.run`:",
|
|
description = "The default `lovr.run`:",
|
|
- code = "function lovr.run()\n lovr.timer.step()\n if lovr.load then lovr.load() end\n return function()\n lovr.event.pump()\n for name, a, b, c, d in lovr.event.poll() do\n if name == 'quit' and (not lovr.quit or not lovr.quit()) then\n return a or 0\n end\n if lovr.handlers[name] then lovr.handlers[name](a, b, c, d) end\n end\n local dt = lovr.timer.step()\n if lovr.headset then\n lovr.headset.update(dt)\n end\n if lovr.audio then\n lovr.audio.update()\n if lovr.headset then\n lovr.audio.setOrientation(lovr.headset.getOrientation())\n lovr.audio.setPosition(lovr.headset.getPosition())\n lovr.audio.setVelocity(lovr.headset.getVelocity())\n end\n end\n if lovr.update then lovr.update(dt) end\n if lovr.graphics then\n lovr.graphics.origin()\n if lovr.draw then\n if lovr.headset then\n lovr.headset.renderTo(lovr.draw)\n end\n if lovr.graphics.hasWindow() then\n lovr.mirror()\n end\n end\n lovr.graphics.present()\n end\n lovr.math.drain()\n end\nend"
|
|
|
|
|
|
+ code = "function lovr.run()\n lovr.timer.step()\n if lovr.load then lovr.load() end\n return function()\n lovr.event.pump()\n for name, a, b, c, d in lovr.event.poll() do\n if name == 'quit' and (not lovr.quit or not lovr.quit()) then\n return a or 0\n end\n if lovr.handlers[name] then lovr.handlers[name](a, b, c, d) end\n end\n local dt = lovr.timer.step()\n if lovr.headset then\n lovr.headset.update(dt)\n end\n if lovr.audio then\n lovr.audio.update()\n if lovr.headset then\n lovr.audio.setOrientation(lovr.headset.getOrientation())\n lovr.audio.setPosition(lovr.headset.getPosition())\n lovr.audio.setVelocity(lovr.headset.getVelocity())\n end\n end\n if lovr.update then lovr.update(dt) end\n if lovr.graphics then\n lovr.graphics.origin()\n if lovr.draw then\n if lovr.headset then\n lovr.headset.renderTo(lovr.draw)\n end\n if lovr.graphics.hasWindow() then\n lovr.mirror()\n end\n end\n lovr.graphics.present()\n end\n end\nend"
|
|
}
|
|
}
|
|
},
|
|
},
|
|
related = {
|
|
related = {
|
|
@@ -8065,7 +8065,7 @@ return {
|
|
description = "Creates a new Mesh. Meshes contain the data for an arbitrary set of vertices, and can be drawn. You must specify either the capacity for the Mesh or an initial set of vertex data. Optionally, a custom format table can be used to specify the set of vertex attributes the mesh will provide to the active shader. The draw mode and usage hint can also optionally be specified.\n\nThe default data type for an attribute is `float`, and the default component count is 1.",
|
|
description = "Creates a new Mesh. Meshes contain the data for an arbitrary set of vertices, and can be drawn. You must specify either the capacity for the Mesh or an initial set of vertex data. Optionally, a custom format table can be used to specify the set of vertex attributes the mesh will provide to the active shader. The draw mode and usage hint can also optionally be specified.\n\nThe default data type for an attribute is `float`, and the default component count is 1.",
|
|
key = "lovr.graphics.newMesh",
|
|
key = "lovr.graphics.newMesh",
|
|
module = "lovr.graphics",
|
|
module = "lovr.graphics",
|
|
- notes = "Once created, the size and format of the Mesh cannot be changed.",
|
|
|
|
|
|
+ notes = "Once created, the size and format of the Mesh cannot be changed.'\n\nThe default mesh format is:\n\n {\n { 'lovrPosition', 'float', 3 },\n { 'lovrNormal', 'float', 3 },\n { 'lovrTexCoord', 'float', 2 }\n }",
|
|
variants = {
|
|
variants = {
|
|
{
|
|
{
|
|
arguments = {
|
|
arguments = {
|