This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
users:shilo:extensions:shmotionblursprite [2011/11/10 01:02] – [Data entry] shilo | users:shilo:extensions:shmotionblursprite [2013/03/05 10:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== SHMotionBlurSprite ====== | ||
+ | ---- dataentry extension ---- | ||
+ | type : extension | ||
+ | author_mail | ||
+ | description | ||
+ | lastupdate_dt : 2011-03-27 | ||
+ | compatible | ||
+ | depends | ||
+ | tags : motion, blur, sprite | ||
+ | homepage_url | ||
+ | download_url | ||
+ | sample_url | ||
+ | ---- | ||
+ | ===== Description ===== | ||
+ | SHMotionBlurSprite class will function just like a normal sprite, but it will give the children a motion blur effect. You can change the blur duration in seconds with " | ||
+ | |||
+ | ===== Sample ===== | ||
+ | [[http:// | ||
+ | * Project: [[http:// | ||
+ | * Screenshot: [[http:// | ||
+ | * Recording: [[http:// | ||
+ | |||
+ | ===== Example ===== | ||
+ | <code objc> | ||
+ | // | ||
+ | SHMotionBlurSprite *motionBlurSprite = [SHMotionBlurSprite motionBlurSprite]; | ||
+ | |||
+ | //set the blur duration to 10 seconds | ||
+ | motionBlurSprite.blurDuration = 10.0f; | ||
+ | |||
+ | //set the starting blur opacity to 25% | ||
+ | motionBlurSprite.blurAlpha = 0.25; | ||
+ | |||
+ | //set the blur duration to a negative number to set motion blur to forever | ||
+ | motionBlurSprite.blurDuration = SH_MOTION_BLUR_INFINITE; | ||
+ | motionBlurSprite.blurDuration = -1.0f; | ||
+ | |||
+ | //set the blur duration to zero to turn the motion blur off | ||
+ | motionBlurSprite.blurDuration = SH_MOTION_BLUR_NONE; | ||
+ | motionBlurSprite.blurDuration = 0; | ||
+ | </ | ||
+ | |||
+ | ===== Instructions ===== | ||
+ | ==== To add into your Sparrow project ==== | ||
+ | - Download the source files here: [[https:// | ||
+ | - Open your desired Sparrow project | ||
+ | - Drag and drop the files into the " | ||
+ | - Open " | ||
+ | - Include the extension: <code objc># | ||
+ | - Save " | ||
+ | |||
+ | ==== To add directly into Sparrow source ==== | ||
+ | - Download the source files here: [[https:// | ||
+ | - Save the files into Sparrow' | ||
+ | * Example: "/ | ||
+ | - Navigate back one directory and open " | ||
+ | * Example: "/ | ||
+ | - Inside the " | ||
+ | * Example: " | ||
+ | - Right click the " | ||
+ | - Navigate into the "/ | ||
+ | - On the next window, leave all options as default and click " | ||
+ | - In the " | ||
+ | * Example " | ||
+ | - At the bottom of the file, add: <code objc># | ||
+ | - Save " | ||
+ | - Close " | ||
+ | |||
+ | ===== Source Code ===== | ||
+ | %gist(870334)% | ||
+ | |||
+ | ===== Changelog ===== | ||
+ | * // | ||
+ | * // | ||
+ | * // | ||
+ | |||
+ | ===== Todo ===== | ||
+ | * change default width/ | ||
+ | * Allow objects to render behind it | ||
+ | * Change the clear alpha value to 0 | ||
+ | * Get the motion blur to show correctly while alpha value equals 0 | ||
+ | |||
+ | ===== Special Thanks ===== | ||
+ | * [[http:// |