Hey, everyone!
Grab the latest feature release of Starling from Haxelib.
haxelib install starling 2.8.0
This update includes all of the fixes and enhancements from the ActionScript 3.0 version of Starling 2.8. A big thanks to Daniel Sperl for his continued maintenance and community engagement! And another big thank you to @Matse for spearheading the port of the AS3 code to Haxe. Let’s take a moment to highlight a couple of the most exciting improvements in Starling 2.8, but you can also read through the full changelog at the end.
- New vector drawing APIs for
Canvas. You can draw paths using newmoveTo(),lineTo(), andcurveTo()methods. Additionally, thedrawGraphicsData()method supports consuming data fromopenfl.display.Graphics. Finally, a newdrawRoundRect()adds support for drawing rectangles with rounded corners. MultiTextureStylemakes it easier for developers to reduce draw calls for improved performance. By default, changing between textures requires an additional draw call, butMultiTextureStyleprovides an option for batching more than one texture into the same draw call. This isn’t a silver bullet, though, because it trades off CPU load for GPU load, but it adds another tool into every Starling developer’s toolbelt!- We recently created a new version of the Starling Manual specifically for Haxe and OpenFL! All sample code has been ported from AS3 to Haxe, and it includes new introductory chapters to help new developers get started setting up their Haxe development environment.
Starling 2.8.0 Changelog
- added `MultiTextureStyle` for batching multiple textures in a single draw call (thanks to johnridges and Fancy2209!)
- added vector drawing APIs to `Canvas`, including `drawGraphicsData`, curves, and path support (thanks to Fancy2209!)
- added Earcut-based triangulation for `Polygon`, including offset support (thanks to Fancy2209!)
- added `Starling.defaultTextureSmoothing` to configure default texture smoothing globally (thanks to Adolio!)
- added new tween hooks: `onRepeatStart`, `onRepeatFinish`, and `repeatReverseDelay` (thanks to Mintonist!)
- added `Event.RENDER_COMPLETE` and adjusted `Event.RENDER` dispatch timing (thanks to Adolio!)
- added `Event.REMOVED_FROM_JUGGLER` and `Juggler.isEmpty`; pooled tweens are released when purging (thanks to Adolio!)
- added support for root JSON arrays in `JsonFactory` (thanks to Adolio!)
- added detection of extension and MIME type for embedded assets in `AssetManager` (thanks to Adolio!)
- added `Polygon` factory method that accepts vectors
- added `Canvas.drawRoundRectangle()` method (thanks to Josh!)
- optimized mipmap generation for `ConcretePotTexture` and fixed mip sizes (thanks to zach-xhx!)|
- optimized mask handling: faster reuse of identical masks, plus fixes for hit-test and `maskInverted` redraw issues (thanks to MatseFR!)
- optimized `removeChild` performance (thanks to HaimZik!)
- fixed some state exceptions in `Canvas` (thanks to Josh!)
- fixed bounds computation for `DisplayObjectContainer` with zero-size children (thanks to Adolio!)
- fixed rare `RangeError` in `BatchProcessor`
- fixed `currentTime` in `MovieClip` after reversing frames
- fixed `BitmapFont` glyphs exceeding the top of `TextField` when the line height is larger
- fixed `BlendMode.isRegistered` error when called early (thanks to MatseFR!)
- fixed `numConnections` setter in `AssetManager` and certificate error handling in `DataLoader`
- restored queuing `File` objects with `AssetManager`

