Ris Posted July 19, 2014 Share Posted July 19, 2014 A fairly simple question: is it possible to draw an arc (or even any sort of curved line) with Phaser? Link to comment Share on other sites More sharing options...
Zaidar Posted July 20, 2014 Share Posted July 20, 2014 create: function(){ this.circle = this.add.bitmapData(resolutionGame[0], resolutionGame[1]); this.circleSprite = this.add.sprite(0, 0, this.circle); }, update: function(){ this.circle.ctx.beginPath(); this.circle.ctx.arc(x, y, radius, angleStart, angle); this.circle.ctx.strokeStyle = '#000000'; this.circle.ctx.stroke(); this.circle.ctx.closePath(); },Something like this should work. I haven't done game dev for few of weeks, so can't remember Link to comment Share on other sites More sharing options...
lewster32 Posted July 20, 2014 Share Posted July 20, 2014 Graphics objects also support arcTo and arc if you want a resolution independent solution: https://github.com/GoodBoyDigital/pixi.js/blob/master/src/pixi/primitives/Graphics.js Link to comment Share on other sites More sharing options...
Recommended Posts