Files
dusk/assets/scene/initial.lua
Dominic Masters c862071126
Some checks failed
Build Dusk / run-tests (push) Failing after 1m47s
Build Dusk / build-linux (push) Failing after 1m47s
Build Dusk / build-psp (push) Failing after 1m53s
Text
2026-02-03 10:22:39 -06:00

35 lines
629 B
Lua

module('spritebatch')
module('camera')
module('color')
-- module('ui')
module('text')
module('screen')
module('time')
camera = cameraCreate(CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC)
function sceneDispose()
end
function sceneUpdate()
end
text = "Hello World"
function sceneRender()
cameraPushMatrix(camera)
camera.bottom = screenGetHeight()
camera.right = screenGetWidth()
width, height = textMeasure(text)
x = (screenGetWidth() - width)
x = math.sin(TIME.time * 2) * (x / 2) + (x / 2)
y = (screenGetHeight() - height) / 2
y = math.cos(TIME.time * 3) * (y) + (y)
textDraw(x, y, text)
cameraPopMatrix()
end