ive currently got :
Code: Select all
startRange =1
endRange = 2
range = (endRange - startRange) / 2
offset = range + startRange
pulse = 0
global_time = 0
function love.update(dt)
global_time = global_time + dt
pulse = offset + math.sin(global_time) * range
end
Code: Select all
local sw, sh = love.window.getDimensions()
local dx, dy = 0, 0
dx = sw / 2 - currentFont:getWidth("Hello World") * pulse / 2
dy = sh / 2 - currentFont:getHeight("Hello World") * pulse / 2
love.graphics.push()
love.graphics.scale(pulse, pulse)
love.graphics.print("Hello World", dx, dy)
love.graphics.pop()
im also not 100% sure that my attempt to keep the text centered is correct ?