Skip to content

Instantly share code, notes, and snippets.

@nowri
Created May 24, 2012 11:17
Show Gist options
  • Save nowri/2780872 to your computer and use it in GitHub Desktop.
Save nowri/2780872 to your computer and use it in GitHub Desktop.
HandwrittenAnimation usage
time:Number //ループの秒数
fps:int=20 //fps
radius:int=5 //スプライン曲線の大きさ
line_weight:Number=0.5 //線の太さ
line_densitydensity:Number=0.3 //密度 0-1
color:int=-1 //色(-1だと読み込んだBitmapdataの色が使われる)
is_sync:Boolean=false //同期か非同期か
var bmd:BitmapData = new BitmapData(100,100);
var vo:HandwrittenAnimationVO = new HandwrittenAnimationVO(1, 10, 4, 1, 0.4, -1, false);
var anime:HandwrittenAnimation = new HandwrittenAnimation(bmd, vo);
anime.addEventListener(HandwrittenAnimationEvent.CREATE_COMPLETE, created);
function created(e:HandwrittenAnimationEvent):void
{
addChild(anime);
anime.play();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment