-- Draw Origin test 01 function love.load() img = love.graphics.newImage("box01_64x64.png") bgimg = love.graphics.newImage("gridbg.png") rotation = 0 scale = 1.0 scale_rot = 0 end function love.update(dt) rotation = (rotation + 180 * dt) % 360 scale_rot = (scale_rot + 180 * dt) % 360 scale = 1.0 + 0.5 * math.cos(math.rad(scale_rot)) end function love.draw() love.graphics.clear(0, 0, 0, 1.0) love.graphics.setColor(1.0, 1.0, 1.0, 1.0) love.graphics.draw(bgimg, 0, 0) local x = 64 local y = 64 * 2 local rot = math.rad(rotation) love.graphics.draw(img, x, y) x = x + 64 * 3 love.graphics.draw(img, x, y, rot) x = x + 64 * 3 local rot = math.rad(rotation) love.graphics.draw(img, x, y, 0, scale, scale) x = 64 y = y + 64 * 3 local ox, oy = img:getWidth() / 2, img:getHeight() / 2 love.graphics.draw(img, x, y, 0, 1, 1, ox, oy) x = x + 64 * 3 love.graphics.draw(img, x, y, rot, 1, 1, ox, oy) x = x + 64 * 3 love.graphics.draw(img, x, y, 0, scale, scale, ox, oy) love.graphics.print(tostring(love.timer.getFPS()).." FPS", 10, 10) end function love.keypressed(key, isrepeat) if key == "escape" then -- ESC to exit love.event.quit() end end