Files
dusk/assets/scene/initial.lua
Dominic Masters 78e1ae885a
Some checks failed
Build Dusk / run-tests (push) Failing after 1m35s
Build Dusk / build-linux (push) Failing after 1m34s
Build Dusk / build-psp (push) Failing after 1m53s
Add color support.
2026-02-01 11:16:52 -06:00

33 lines
576 B
Lua

module('spritebatch')
module('time')
module('camera')
module('glm')
module('color')
camera = cameraCreate(CAMERA_PROJECTION_TYPE_PERSPECTIVE)
color = colorBlue()
function sceneDispose()
-- print('Disposing initial scene')
end
function sceneUpdate()
color.r = 255 * (math.sin(TIME.time) + 1) * 0.5
color.g = 255 * (math.sin(TIME.time + 2) + 1) * 0.5
color.b = 255 * (math.sin(TIME.time + 4) + 1) * 0.5
end
function sceneRender()
cameraPushMatrix(camera)
spriteBatchPush(
nil,
0, 0,
1, 2,
color
)
spriteBatchFlush()
cameraPopMatrix()
end