Add color support.
This commit is contained in:
@@ -2,15 +2,20 @@ 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()
|
||||
-- print('Updating initial scene')
|
||||
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()
|
||||
@@ -19,8 +24,8 @@ function sceneRender()
|
||||
spriteBatchPush(
|
||||
nil,
|
||||
0, 0,
|
||||
1, 1,
|
||||
nil
|
||||
1, 2,
|
||||
color
|
||||
)
|
||||
spriteBatchFlush()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user