Posted June 01, 2022 by PhaserEditor2D
#phaser #html5 #editor #2d
Hi!
A new Phaser Editor 2D version is available. This is a minor release, with bug fixes and small changes for better supporting third-party plugins.
At the same time, I'm publishing new versions of the NinePatch and RoundedRectangle plugins.
Download Phaser Editor 2D v3.33.2
The phasereditor2d-ninepatch-plugin now has two new game objects: NinePatchImage and NinePatchContainer.
The NinePatchImage implements the NinePatch interface but extends the Phaser.GameObjects.Image
class. It means, your ninepatch object is a simple image. How does it work? Because the texture of the image is generated dynamically (or taken from the cache) each time you request to redraw the object. This implementation is really fast when you have many ninepatch objects sharing the same texture and properties. It also gets some of the features of images, like tint, and alpha.
The NinePatchContainer object implements the NinePatch interface but extends the Phaser.GameObjects.Container
class. It means, it is a container and the different patches are rendered as images. This implementation is fast and consumes small memory.
Learn more about the NinePatch plugin
I published a new phasereditor2d-roundedRectangleGraphics-plugin. It is an improvement of the older RoundedRectangle plugin, that is now deprecated.
If you are using the old RoundedRectangle plugin, I encourage you to migrate to this new plugin.
This new plugin provides two game objects: RoundedRectangleGraphics and RoundedRectangleImage.
The RoundedRectangleGraphics extends the Phaser.GameObjects.Graphics
class. It provides features like the radius of the four corners, and the offset of the shadow on the four sides. Graphics game objects may be slow on certain devices/browsers. If possible, use the RoundedRectangleImage instead.
The RoundedRectangleImage implements the same interface of the RoundedRectangleGraphics, but it extends the Phaser.GameObjects.Image
class. When you call the redraw method, the texture of the image is rendered on the fly or gets a previous texture from the cache. I recommend using this object if you have many rounded rectangles sharing the same properties.
Learn more about the RoundedRectangleGraphics plugin
Keep in contact!
Arian