Jump to content

Phaser and Bootstrap


przemoo83
 Share

Recommended Posts

Hi
I'm trying to develop an interactive application that uses Bootstrap for styling and RWD and Phaser for displaying animations. I came accross an issue with a canvas element. If I create through Phaser like this:

var conf = new Phaser.Game(800, 600, Phaser.AUTO, 'canvas', { preload: preload, create: create, update: update });

I have problem with the responsiveness of the element. Normally I would style canvas like this and it stays in its container:

HTML

<div class="container"> <div class="row">  <div id="controlPanel" class="col-xs-4">  </div>  <div id="animation" class="col-xs-8">   <canvas></canvas>  </div> </div></div>

CSS

canvas {width: 100%;height: auto;}

However with Phaser it's not responsive anymore. Anyone knows how to fix that?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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