schiff_keith Posted January 14, 2015 Share Posted January 14, 2015 var bmd = game.add.bitmapData(400, 400);var imageData = bmd.imageData;var d = imageData.data;for (var i = 0; i < d.length; i += 4) { d[i] = 0; d[i+1] = 255; d[i+2] = 0; d[i+3] = 255;}bmd.ctx.putImageData(imageData, 0, 0);green screen does not show!WHY?? Link to comment Share on other sites More sharing options...
ultimatematchthree Posted January 15, 2015 Share Posted January 15, 2015 You just need to add this one line at the end of your snippet:game.add.image(0, 0, bmd.texture);Remember that Phaser.BitmapData isn't a DisplayObject, so you'll need to attach its corresponding texture to one that is. Link to comment Share on other sites More sharing options...
schiff_keith Posted January 15, 2015 Author Share Posted January 15, 2015 Thank you very much!It really helps. Link to comment Share on other sites More sharing options...
Recommended Posts