Are you creating a new bitmap on every frame? Because the trick to
effects like this is to *not* clear your effect bitmap on every frame,
so you're drawing each new frame onto an effect bitmap which you've
drawn all your previous frames onto, with some transform. It's kinda
tricky to explain, the code looks a bit like:
do this *once*:
private function initEffect():void{
private var $effectBitmap:BitmapData = new BitmapData( stage.width,
stage.height, true );
addChild( new Bitmap( $effectBitmap ) );
}
do this on every frame:
private function updateEffect():void{
// redraw effectBitmap, shifted up a bit and faded a bit (this will
accumlate over time)
var tempBmp:BitmapData = $effectBitmap.clone();
$effectBitmap.fillRect( $effectBitmap.rect, 0x00000000 );
$effectBitmap.draw( $effectBitmap, new Matrix( 1,0,0,1,0,-1 ), new
ColorTransform(1,1,1,0.9) );
tempBmp.dispose();
// draw contents of away3d view, with a colorTransform
$effectBitmap.draw( view.getBitmapData(), new Matrix(), new
ColorTransform( .6, 1, .6 );
}
(this is just the theory off the top of my head, haven't tested or
optimised it or anything, but it should give an idea of how it could
work ;) )
Cheers,
Henry
2008/7/23 Maikel Sibbald <in...@flexcoders.nl>:
$effectBitmap.draw( $effectBitmap, new Matrix( 1,0,0,1,0,-1 ), new
ColorTransform(1,1,1,0.9) );
should say:
$effectBitmap.draw( tempBmp, new Matrix( 1,0,0,1,0,-1 ), new
ColorTransform(1,1,1,0.9) );
Playing with that Matrix can give you some pretty fun effects ;)
h.
2008/7/24 Henry Cooke <aninfinitenu...@gmail.com>:
2008/7/24 Henry Cooke <aninfinitenu...@gmail.com>:
If you're into playing with pixels, researching the demoscene (just
put that word into google), looking at effects and trying to figure
out how they did them (or reading about them) is a *really* good
source of inspiration :)
2008/7/24 Maikel Sibbald <in...@flexcoders.nl>: