Var sprite:Aseprite = omBytes(Assets.getBytes('path/to/asepriteAsset.aseprite'), false) // Won't add an `ENTER_FRAME` listener To advance the animation manually use advance or nextFrame methods or currentFrame property If you don't want it you can pass false as a second argument of the constructor or the fromBytes method. Spawn method can also be used to create new sprites from slices: var newSprite:Aseprite = sprite.spawn('Slice Name') īy default an Aseprite instance adds an ENTER_FRAME listener to advance the animation automatically. NewSprite will share the bitmap data from the original sprite thus saving memory and time used to parse the aseprite file data Var sprite:Aseprite = omBytes(Assets.getBytes('path/to/asepriteAsset.aseprite')) Ĭreate a new sprite reusing the resources: var sprite:Aseprite = omBytes(Assets.getBytes('path/to/asepriteAsset.aseprite')) ![]() The main class of the library ( aseprite.Aseprite) extends so you can use it just like any other OpenFL sprite. Load and render sprites and animations in Aseprite format.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |