UseTheForceFrodo Posted March 29, 2015 Share Posted March 29, 2015 Hey guys, just a simple question about one of the examples on the website, specifically the Sprite From BitmapData example. I love the interactivity on Phaser.io with its Sandbox and editable examples. I've found myself interested in attaching primitives as textures to sprites and found the Sprite From BitmapData example. What I want to do is simply change the red square to a red circle. I tried doing so by changing this line of code:bmd.ctx.rect(0,0,128,128);to this:bmd.ctx.circle(0,0,64);Every other line has remained the same. The result I expected is a red circle with a radius of 64px in the same location as the red square/rectangle (a simple shape replacement). The results observed however are a complete black and/or empty canvas. Nothing at all.Am I doing something wrong? Does anyone else have any issues changing the square in the Sprite From BitmapData example to a circle?Many thanks! Link to comment Share on other sites More sharing options...
UseTheForceFrodo Posted March 30, 2015 Author Share Posted March 30, 2015 Mods: This was me following a suggestion on IRC to retry my first post. It's identical to the one that has already been answered and this version can be removed. I apologise for the double post. Link to comment Share on other sites More sharing options...
Recommended Posts