LoSboccacc 0 Posted October 25, 2017 Report Share Posted October 25, 2017 I've built an html5 game with an action are built with phaser. I'm generating sprites on the fly composing randomly various elements. For some of the icons in the html game interface I wanted to use those same sprites, but can't find how to export a sprite with children into a data url or something that I can put into an Img/background-url is there a way to get the raw pixels out of a sprite and it's children tree as laid out on the phaser canvas? Quote Link to post Share on other sites
LoSboccacc 0 Posted October 25, 2017 Author Report Share Posted October 25, 2017 nvm figured out that rendertexture works on canvas too and has a getImage method that gives back an html element Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.