Warning: This class is currently in testing phase. Performance, along with other issues, needs to be ironed out.
SHFingerTrail class will allow you to create finger trail effect with only a few lines of code. You can change the style, set the effect time, set the particle size. You can also set the inner and outer gradient color, or you can also set a solid color. You can also toggle “alwaysOnTop”, which will automatically keep the finger trail on top of other display objects; toggle “showOnTouchBegin” which will start the effect on touch begin; or toggle “fade” which will gradually fade the trail.
//initialize an autoreleased object of finger trail, with time of half a second, and size of 20 pixels SHFingerTrail *fingerTrail = [SHFingerTrail fingerTrailWithTime:0.5f size:20.0f]; //change the finger trail effect to bubbly fingerTrail.style = SHFingerTrailStyleBubbly; //add the finger trail to the stage [self addChild:fingerTrail];
#include "SHFingerTrail.h"
#import "SHFingerTrail.h"