Bitmaps perform faster, at the added cost of file size and/or memory use.
In OpenFL, we render vectors out to bitmap before they are rendered. You can do the vector -> bitmap conversion at design time by using “Export as Bitmap” in your FLA, or you can leave it as a vector and use bitmapData.draw
to flatten complex objects at runtime. It does NOT require a fundamental rewrite if you choose to optimize in this way.
It is true, however, that canvas is not as fast as Flash in general for rendering and re-rendering shapes. Our existing canvas sprite.graphics
renderer could be optimized for faster performance, but in general you want to limit how much you redraw objects like this.
Instead of making changes in AS3, I would recommend going from AS3 to Haxe, and publishing to Flash or AIR. That should be a parallel step. Once in Haxe, you should be able to go to HTML5. If the performance and quality is fine, you’re done. If you need some optimization, maybe one or two things need to be changed. There are multiple HTML5 projects with MovieClips that ported cleanly without additional optimization work for performance