Amawuff Posted February 7, 2014 Share Posted February 7, 2014 Hi everyone, new to the forum and the framework, so I'm just getting started. But it seems for some reason when i use debug.renderPointer, or any other debug render for that matter, it doesn't show up in chrome or chrome for android. I'm using the latest version of phaser and chrome 32.0.1700.107 (up to date) for mac. all the debug stuff works just fine in safari. here is my code: <script type="text/javascript"> window.onload = function() { var game = new Phaser.Game(800, 480, Phaser.RENDERER_AUTO, 'sandbox', { preload: preload, create: create, update: update, render: render}); var logo ; function preload () { game.load.image('logo', 'graphics/phaser.png'); } function create () { game.stage.backgroundColor = '#454645'; logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo'); logo.anchor.setTo(0.5, 0.5); logo.alpha=0; //game.add.tween(object).to({properties},time,easing,autoplay,delay, repeat,yoyo) game.add.tween(logo).to( { alpha: 1 }, 2000, Phaser.Easing.Linear.None, true, 0, 0, false); logo.inputEnabled = true; logo.input.enableDrag(true); } function update() { } function render() { game.debug.renderPointer(game.input.mousePointer); game.debug.renderPointer(game.input.pointer1); game.debug.renderPointer(game.input.pointer2); } }; </script> Link to comment Share on other sites More sharing options...
rich Posted February 8, 2014 Share Posted February 8, 2014 The debug commands only work when the game is in canvas mode. Your renderer flag is wrong:Phaser.AUTOHowever for this change it to Phaser.CANVAS. Otherwise it will default to WebGL and the debug class doesn't work in webgl. Link to comment Share on other sites More sharing options...
Recommended Posts