Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taberrr/CCMaskTo
animated rect mask for cocos2d-iphone (originally by georgejcook, ported to 0.99.3-rc)
https://github.com/taberrr/CCMaskTo
Last synced: 2 months ago
JSON representation
animated rect mask for cocos2d-iphone (originally by georgejcook, ported to 0.99.3-rc)
- Host: GitHub
- URL: https://github.com/taberrr/CCMaskTo
- Owner: taberrr
- Created: 2010-05-22T04:17:22.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2010-05-22T05:43:57.000Z (over 14 years ago)
- Last Synced: 2023-08-01T01:12:37.596Z (over 1 year ago)
- Homepage:
- Size: 146 KB
- Stars: 10
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- awesome - CCMaskTo - animated rect mask for cocos2d-iphone (originally by georgejcook, ported to 0.99.3-rc) (etc)
- awesome - CCMaskTo - animated rect mask for cocos2d-iphone (originally by georgejcook, ported to 0.99.3-rc) (etc)
README
CCMaskTo
============CCMaskTo is a CCIntervalAction for cocos2d-iphone written by georgejcook and slightly modified by taberrr to work with cocos2d v0.99.3-rc.
http://www.cocos2d-iphone.org/forum/topic/1306#post-7891
Usage:
//
// Reveal the sprite in a "swipe from left" style mask transition
//
CCSprite *mySprite = [CCSprite spriteWithTexture: spriteSheet.texture rect: CGRectMake(0,0, 1,10)];
[spriteSheet addChild: mySprite];
mySprite.position = ccp(screenSize.width / 2 - 45, screenSize.height / 2);[mySprite runAction: [CCMoveBy actionWithDuration: 1 position: ccp(45, 0)]];
[mySprite runAction: [CCMaskTo actionWithDuration: 1 rect: CGRectMake(0,0, 90,10)];