Browse Source

Add 3D Model example;

(cherry picked from commit 4676bcdb9f7b45e82bbeeb3dc675c3528464b5ad)
bjorn 7 years ago
parent
commit
7caeaab5e3
4 changed files with 135 additions and 0 deletions
  1. 3 0
      examples/Model/conf.lua
  2. 122 0
      examples/Model/duck.dae
  3. BIN
      examples/Model/duck.png
  4. 10 0
      examples/Model/main.lua

+ 3 - 0
examples/Model/conf.lua

@@ -0,0 +1,3 @@
+function lovr.conf(t)
+  t.window.msaa = 8
+end

File diff suppressed because it is too large
+ 122 - 0
examples/Model/duck.dae


BIN
examples/Model/duck.png


+ 10 - 0
examples/Model/main.lua

@@ -0,0 +1,10 @@
+function lovr.load()
+  model = lovr.graphics.newModel('duck.dae')
+  texture = lovr.graphics.newTexture('duck.png')
+  model:setTexture(texture)
+  lovr.graphics.setBackgroundColor(.2, .2, .2)
+end
+
+function lovr.draw()
+  model:draw(0, 0, -3, 1, 4 + lovr.timer.getTime() * .1)
+end

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