Jump to content

Phaser graphics size differ from graphics


Vishal Gupta
 Share

Recommended Posts

Hi  I am creating a graphics arc and adding it into sprite. the graphics size is different than sprite size

var graphics = game.add.graphics(cx,cy);
graphics.clear();
graphics.beginFill(0x00FF00);
graphics.arc(0,0, 15, 0,3.14*2, false);
graphics.endFill(); 

var ui = new Phaser.Image(game,0,0);
ui.addChild(graphics);

console.log(ui.width,ui.height);
console.log(graphics.width,graphics.height);

Both console must give same output??

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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