spin
This commit is contained in:
@ -23,8 +23,8 @@ function game_tick()
|
||||
local state = ctx.udata
|
||||
|
||||
draw_camera {
|
||||
position = { x=10, y=10, z=10 },
|
||||
direction = { x=-1, y=-1, z=-1 },
|
||||
position = { x=0, y=0, z=0 },
|
||||
direction = { x=math.sin(ctx.frame_number / 100), y=-1, z=math.cos(ctx.frame_number / 100) },
|
||||
up = { x=0, y=1, z=0 },
|
||||
fov = 0,
|
||||
zoom = 0.25 + math.sin(ctx.frame_number / 100) / 10,
|
||||
@ -51,10 +51,10 @@ function game_tick()
|
||||
draw_quad {
|
||||
texture = "art/creatures/meathead/" .. string.format("dance-%s.png", pingpong(state.beat, 3)),
|
||||
texture_region = { w = 32, h = 32 },
|
||||
v0 = { x = 0 + i/2, y = (64 + wobble) / 64, z = 0 },
|
||||
v1 = { x = 0 + i/2, y = 0, z = 0 },
|
||||
v2 = { x = 0 + i/2 + 1, y = 0, z = 0 },
|
||||
v3 = { x = 0 + i/2 + 1, y = (64 + wobble) / 64, z = 0 },
|
||||
v0 = { x = 0, y = (64 + wobble) / 64, z = 0 + i/2 },
|
||||
v1 = { x = 0, y = 0, z = 0 + i/2 },
|
||||
v2 = { x = 0, y = 0, z = 0 + i/2 + 1 },
|
||||
v3 = { x = 0, y = (64 + wobble) / 64, z = 0 + i/2 + 1 },
|
||||
}
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user