Skip to content

Instantly share code, notes, and snippets.

@pokatomnik
Last active April 12, 2016 10:43
Show Gist options
  • Save pokatomnik/a824ca13b57ac03a6371febc72d580cd to your computer and use it in GitHub Desktop.
Save pokatomnik/a824ca13b57ac03a6371febc72d580cd to your computer and use it in GitHub Desktop.
PhaserJS drawing circle example
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { create: create });
function create() {
var graphics = game.add.graphics(100, 100);
// draw a circle
graphics.lineStyle(2, 0x0000FF, 1);
graphics.beginFill(0xFFFF0B, 0.5);
graphics.drawCircle(470, 200, 200);
graphics.endFill();
window.graphics = graphics;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment