We’re excited to launch our new 2D engine features.
As of now the Sprite Component, Sprite Asset and Texture Atlas Asset are available for all users.
These features can be used to create classic style 2D games, try combining with our P2 physics plugin for 2D graphics and physics!
Also landing today is 9-slicing. 9-sliced sprites (also call 9-patch sprites) are a great way to build scalable user interfaces using textures. The idea is to divide an image into 9 areas which each scale in a different way as you resize them. Check out the image below to see how it let’s you resize buttons and other UI elements cleanly.
Drop your questions and feedback in this thread!
Congratulations on the addition… will vector/svg graphics be supported?
Unfortunately, we don’t currently have plans to support vector or SVG graphics.
I am new to the forums and Play Canvas.
I need to ask is there any thing else coming down the line for 2D support in play canvas?
I have a problem with Sprite’s Draw Order.
User Manual Say:
The order in which this sprite is rendered. Lower numbers are rendered first.
Now I have a two sprite call A & B.
I want B render first so i set A’s Draw Order to 1 and B’s Draw Order to 0.
I think the result maybe like that:
And this is my setting:
But when i launch project the result is:
I’m feel confusion…,is i missing something?
For sprites to render in draw order they must be in a layer that is set to Manual Sort Mode.
The default latlyer they are added to is World which is sort by depth order.
How do I get a working p2? It doesn’t work for me?
Thanks yaustar! How come Playcanvas’ devs not updating anything. No updated tutorial…
It’s a personal project of Will’s rather than a official supported library or tutorial.
Currently the developers are working on asset bundles and more version control like features from what I read on GitHub and the forums.
slicing’s a great feature! If it’s really released, can you tell us how to create a new Sprite Asset? I cannot see it under the “add asset” menu.
Right click on a texture to create a texture atlas. From there you can either use the sprite editor to create a sprite asset or right click on the texture atlas to create a sprite asset.