Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Translating gameview / game canvas


Recommended Posts

I'm currently stuck trying to center my game in the browser window with phaser 1.0.5. It's probable that I am missing something very basic, as I have just started using phaser.


I thought that Phaser.Canvas.setTransform should do the trick, but obviously not like that:

<script type="text/javascript">(function () {	var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update });	function preload() {		game.load.image('logo', 'logo.png');	}	var logo;	function create() {		logo = game.add.sprite(0, 0, 'logo');		Phaser.Canvas.setTransform(game.context, 100, 100, 0, 0, 0, 0);	}	function update() {	}})();</script>

Help would be greatly appreciated :)

Link to comment
Share on other sites


  • Recently Browsing   0 members

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