Created
August 28, 2009 10:32
-
-
Save slaskis/176891 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source and tile size (can the tile size be adjusted if needed?) | |
var t = new TileMap( source , 64 , 64 ); | |
t.add( "rot" , Rotation( 180 ) , 60 ); // a rotation of 180 degrees over 60 frames | |
t.add( "scale" , Scale( 4 ) , 12 ); // a scale by 4x over 12 frames | |
// t now has 71 frames (one is always the same for every effect, the original, which is reused) | |
t.get( "rot" , 1 ); // Fetches the first frame of the rotation effect | |
t.add( "rotscale" , Combine( [ Rotation( 180 ) , Scale( 4 ) ] ) , 60 ); // a scale by 4 and rotation of 180 degrees over 60 frames | |
t.remove( "rot" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment