Put controller models back on nogame screen;

This commit is contained in:
bjorn 2019-05-08 17:11:25 -07:00
parent 2ecae65925
commit 9382afb94d
2 changed files with 636 additions and 600 deletions

View File

@ -8,6 +8,8 @@ local function nogame()
t.modules.thread = false
end
local models = {}
function lovr.load()
if not lovr.graphics then
print(string.format('LÖVR %d.%d.%d\nNo game', lovr.getVersion()))
@ -21,6 +23,15 @@ local function nogame()
function lovr.draw()
lovr.graphics.setColor(1.0, 1.0, 1.0)
for hand in lovr.headset.hands() do
models[hand] = models[hand] or lovr.headset.newModel(hand)
if models[hand] then
local x, y, z, angle ax, ay, az = lovr.headset.getPose(hand)
models[hand]:draw(x, y, z, 1.0, angle, ax, ay, az)
end
end
local padding = .1
local font = lovr.graphics.getFont()
local fade = .315 + .685 * math.abs(math.sin(lovr.timer.getTime() * 2))

File diff suppressed because it is too large Load Diff