Created
January 14, 2015 19:28
-
-
Save codepaladin/2ba72935cd2d26b4361b to your computer and use it in GitHub Desktop.
Image Transitioning and Masking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local group = display.newGroup() | |
group:translate(display.contentCenterX, display.contentCenterY) -- move the group to the center of the screen | |
local baseImage = display.newImage(group, "base-image.png") -- draw the yellow circle image & add to group | |
local mask = graphics.newMask('example-mask.png') -- draw a mask | |
group:setMask(mask) -- set the mask on the group | |
transition.to( baseImage, { time=1000, x=180 } ) -- move the image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment