skywalker Posted April 19, 2015 Share Posted April 19, 2015 hello everyone im making a game with phaser and i want to take a screenshot from one scene and draw it to another by using game.canvas.toDataURL(); this is what i have tried so farin the first scene GAME.cc = game.canvas.toDataURL();second onevar img = new Image();img.onload = function(){var base = new PIXI.BaseTexture(this),texture = new PIXI.Texture(base);var sp = game.add.sprite(0,0);sp.setTexture(texture);};img.src = GAME.cc;there is no error in console but the sprite is completely black !! so ... what is the problem . on stackoverflow http://stackoverflow.com/questions/29733356/draw-base64-png-data-with-phaser-js Link to comment Share on other sites More sharing options...
jdnichollsc Posted April 19, 2015 Share Posted April 19, 2015 See my example in codepen: http://codepen.io/jdnichollsc/pen/WbZgwM Regards, Nicholls Link to comment Share on other sites More sharing options...
skywalker Posted April 20, 2015 Author Share Posted April 20, 2015 stile black screen it work fine on firfox but not chrome Link to comment Share on other sites More sharing options...
Recommended Posts