|
@@ -378,7 +378,7 @@ return {
|
|
|
examples = {
|
|
|
{
|
|
|
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 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 lovr.math.drain()\n end\nend"
|
|
|
}
|
|
|
},
|
|
|
related = {
|
|
@@ -8296,7 +8296,7 @@ return {
|
|
|
description = "Creates a new Model from a file. The supported 3D file formats are OBJ and glTF.",
|
|
|
key = "lovr.graphics.newModel",
|
|
|
module = "lovr.graphics",
|
|
|
- notes = "Diffuse and emissive textures will be loaded in the sRGB encoding, all other textures will be loaded as linear.\n\nCurrently, the following features are not supported by the model importer:\n\n- OBJ: Quads are not supported (only triangles).\n- glTF: Sparse accessors are not supported.\n- glTF: Morph targets are not supported.\n- glTF: base64 images are not supported (base64 buffer data works though).\n- glTF: Only the default scene is loaded.",
|
|
|
+ notes = "Diffuse and emissive textures will be loaded in the sRGB encoding, all other textures will be loaded as linear.\n\nCurrently, the following features are not supported by the model importer:\n\n- OBJ: Quads are not supported (only triangles).\n- glTF: Sparse accessors are not supported.\n- glTF: Morph targets are not supported.\n- glTF: base64 images are not supported (base64 buffer data works though).\n- glTF: Only the default scene is loaded.\n- glTF: Currently, there is a limit of 48 joints in a skin.",
|
|
|
variants = {
|
|
|
{
|
|
|
arguments = {
|