JSFiddle - React, Tailwind, and code Playground
HTML
<script src="C:/Phaser/build/phaser.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/phaser/2.0.4/phaser.min.js"></script>
<div id="test"></div>
JavaScript
function create (game) {
//ad a world'scaling
game.world.scale.set(1.35);
//apply the scaling on the input
game.input.scale.set(1 / 1.35);
// add a player sprite to give context to the movement
player = game.add.graphics(250, 200);
player.beginFill(0x00ff00);
player.lineStyle(2, 0xFFFFFF, 1);
player.drawRect(0, 0, 50, 2);
}
function update (game) {
player.rotation = game.physics.arcade.angleToPointer(player);
}
game = new Phaser.Game(800, 600, Phaser.AUTO, 'test', { create: create, update: update});