actionscript 3 - easeljs Movieclip vs Sprite -


i new easel js. when convert flash/as3 project html5canvas project using adobe flash cc, animations , movieclips become easeljs movieclip. in easeljs can use sprite show animation. using movieclip easy since flash generate it.

my question whether there benefit of using easeljs sprite instead of easeljs movieclip in terms of performance?

sprite , movieclip totally different in easeljs.

  • in flash, movieclips extend sprites, have similar functionality.
  • in easeljs, sprite displays frames of spritesheet, , movieclip content container, understands concepts of frames, including timelines , frame actions.

movieclips used flash cc output, although can make them manually. ideally, flash export sprites , spritesheets when makes sense - because of nature of flash timeline animations, incredibly difficult determine when , how export sprites/spritesheets vs movieclips.

strictly speaking on performance, sprites should better performing because use single (or few) bitmap(s) frames, gets gpu benefits. multiple, large images (which happens different sprites, or single sprites lots of large frames span across images) can cause performance issues when gpu switches textures.

there spritesheetbuilder class (and example) can refer to, takes flash cc output, , generates run-time spritesheet, giving performance benefits of sprites, complex vector/image output of flash cc.

hope clears things somewhat.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -