Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
users:shilo:extensions:shfingertrail [2012/08/21 00:28]
67.181.243.216 [SHFingerTrail]
users:shilo:extensions:shfingertrail [2013/03/05 10:19] (current)
Line 1: Line 1:
 +====== SHFingerTrail ======
 +---- dataentry extension ----
 +type          : extension
 +author_mail ​  : shilo86@gmail.com Shilo White
 +description ​  : A simple finger trail. (testing phase)
 +lastupdate_dt : 2011-03-29
 +compatible ​   : v1.X
 +depends ​      : ​
 +tags          : finger, trail, particle
 +homepage_url ​ : https://​gist.github.com/​893746
 +download_url ​ : https://​gist.github.com/​gists/​893746/​download
 +sample_url ​   : http://​shilo.coarsemode.com/​sparrow/​extensions/​shfingertrail/​FingerTrailSample.zip
 +----
 +===== Description =====
 +{{http://​shilo.coarsemode.com/​sparrow/​wiki/​images/​warning.png}} <​sup>​**Warning:​ This class is currently in testing phase. Performance,​ along with other issues, needs to be ironed out.**</​sup>​
  
 +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.
 +===== Sample =====
 +[[http://​shilo.coarsemode.com/​sparrow/​extensions/​shfingertrail/​FingerTrailSample.zip|{{http://​shilo.coarsemode.com/​sparrow/​extensions/​shfingertrail/​FingerTrailScreenshot.png}}]]
 +  * Project: [[http://​shilo.coarsemode.com/​sparrow/​extensions/​shfingertrail/​FingerTrailSample.zip|Finger Trail Showcase]]
 +  * Screenshot: [[http://​shilo.coarsemode.com/​sparrow/​extensions/​shfingertrail/​FingerTrailScreenshot.png|FingerTrailScreenshot.png]]
 +  * Recording: [[http://​shilo.coarsemode.com/​sparrow/​extensions/​shfingertrail/​FingerTrailRecording.mov|FingerTrailRecording.mov]]
 +
 +===== Example =====
 +<code objc>
 +//​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];​
 +</​code>​
 +
 +===== Instructions =====
 +==== To add into your Sparrow project ====
 +  - Download the source files here: [[https://​gist.github.com/​gists/​893746/​download]]
 +  - Open your desired Sparrow project
 +  - Drag and drop the files into the "​Groups & Files" pane
 +  - Open "​Game.h"​
 +  - Include the extension: <code objc>#​include "​SHFingerTrail.h"</​code>​
 +  - Save "​Game.h"​
 +
 +==== To add directly into Sparrow source ====
 +  - Download the source files here: [[https://​gist.github.com/​gists/​893746/​download]]
 +  - Save the files into Sparrow'​s "/​Classes/"​ directory
 +    * Example: "/​sparrow/​src/​Classes/"​
 +  - Navigate back one directory and open "​Sparrow.xcodeproj"​
 +    * Example: "/​sparrow/​src/​Sparrow.xcodeproj"​
 +  - Inside the "​Groups & Files" pane, locate the "​Display"​ group folder
 +    * Example: "​Sparrow -> Classes -> Display"​
 +  - Right click the "​Display"​ group folder and click "Add -> Existing Files.."​
 +  - Navigate into the "/​Classes/"​ directory and select "​SHFingerTrail.h"​ and "​SHFingerTrail.m",​ then click "​add"​
 +  - On the next window, leave all options as default and click "​add"​
 +  - In the "​Groups & Files" pane, Open "​Sparrow.h"​
 +    * Example "​Sparrow -> Classes -> Sparrow.h"​
 +  - At the bottom of the file, add: <code objc>#​import "​SHFingerTrail.h"</​code>​
 +  - Save "​Sparrow.h"​
 +  - Close "​Sparrow.xcodeproj"​
 +
 +===== Source Code =====
 +%gist(893746)%
 +
 +===== Changelog =====
 +  * //​2011-03-28://​ First version
 +
 +===== Todo =====
 +  * Increase performance
 +  * Add smooth style
 +  * Add max finger limit
 +  * Add SHFingerTrailEvent
 +
 +===== Special Thanks =====
 +  * Whoever would like to help me!
 
 
Powered by DokuWiki