LoSboccacc Posted October 25, 2017 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? Link to comment Share on other sites More sharing options...
LoSboccacc Posted October 25, 2017 Author 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 Link to comment Share on other sites More sharing options...
Recommended Posts