Jump to content

BitmapData Circle Help (sandbox)


UseTheForceFrodo
 Share

Recommended Posts

Hey everyone,

 

I'm new to Phaser and love the sandbox functionality and editable examples, letting me test and try right there on the website. 

I've been looking at the Sprite From BitmapData example, but cannot seem to get it to display a circle instead of a rectangle. I've tried changing the line in the linked example page from:

bmd.ctx.rect(0,0,128,128);

to:

bmd.ctx.circle(0,0,50);

Every other line stays the same. The results I expect are a red circle with a radius of 50px in the same position as the rectangle/square. The results I get are a completely empty (black) canvas, regardless of the numbers I use for bmd.ctx.circle( ).

Am I doing something wrong? Do other people get an empty/black screen when they try change from a rectangle to a circle in the Sprite From Bitmapdata example?

Many thanks!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...