Build games as easily as you play them — join the Phaser Beam waitlist for Early Access.
var config = { width: 800, height: 600, type: Phaser.AUTO, parent: 'phaser-example', scene: { create: create } }; var game = new Phaser.Game(config); function create () { var circle = new Phaser.Geom.Circle(400, 300, 100); var graphics = this.add.graphics({ fillStyle: { color: 0xff0000 } }); graphics.fillCircleShape(circle); circle.diameter = circle.radius; graphics.fillStyle(0x00ff00); graphics.fillCircleShape(circle); circle.radius = 10; graphics.fillStyle(0x0000ff); graphics.fillCircleShape(circle); }
var config = { width: 800, height: 600, type: Phaser.AUTO, parent: 'phaser-example', scene: { create: create } }; var game = new Phaser.Game(config); function create () { var circle = new Phaser.Geom.Circle(400, 300, 100); var graphics = this.add.graphics({ fillStyle: { color: 0xff0000 } }); graphics.fillCircleShape(circle); circle.diameter = circle.radius; graphics.fillStyle(0x00ff00); graphics.fillCircleShape(circle); circle.radius = 10; graphics.fillStyle(0x0000ff); graphics.fillCircleShape(circle); }