Jump to content

Search the Community

Showing results for tags 'phaser canvas circle animation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. I've got this little cirlce fill animation and want to draw it on the bitmap context in phaser. var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var cx=150; var cy=150; var rectWidth=15; var rectHeight=2; var rotation=0; requestAnimationFrame(animate); function animate(){ requestAnimationFrame(animate); ctx.save(); ctx.translate(cx,cy); ctx.rotate(rotation); ctx.rect(-rectWidth/2+8,-rectHeight/2,rectWidth,rectHeight); ctx.fill(); ctx.restore(); rotation+=Math.PI/180 * 10; } So I set up these: this.ui.loader = game.add.bitmapData(100,100); this.ui.loader.dirty = true; this.ui.displayloader = game.add.image(game.width / 2 - 50, 100, this.ui.loader); And then using the context to draw: this.ui.loader.context.save(); this.ui.loader.context.translate(this.ui.loader.settings.cx,this.ui.loader.settings.cy); this.ui.loader.context.rotate(this.ui.loader.settings.rotation); this.ui.loader.context.rect(-this.ui.loader.settings.rectWidth/2+8,-this.ui.loader.settings.rectHeight/2,this.ui.loader.settings.rectWidth,this.ui.loader.settings.rectHeight); this.ui.loader.context.fill(); this.ui.loader.context.restore(); (Variables are stored in this.ui.loader.settings).. nothing happens, no error, no visible thing, any ideas? Regards
×
×
  • Create New...