AnalogStick plugin with fix for scaled canvas

https://gist.github.com/den-kle/b380ae89d488598d6f39001e52a45854

Example:
// lib/game/main.js
init: function() {
	// ...

	this.stickLeft = new ig.AnalogStick( 40, ig.system.height-48);
	this.stickRight = new ig.AnalogStick( ig.system.width-40, ig.system.height-48);
}

draw: function() {
	// ...

	this.stickLeft.draw();
	this.stickRight.draw();
}


// lib/game/entities/player.js
update: function() {
	// ...

	// left stick
	this.vel.x = ig.game.stickLeft.input.x * this.speed;
	this.vel.y = ig.game.stickLeft.input.y * this.speed;
	
	// right stick
	if( ig.game.stickRight.amount > 0 ) {
		this.angle = ig.game.stickRight.angle - Math.PI/2;
		if( this.lastShootTimer.delta() > 0 ) {
			this.shoot();
			this.lastShootTimer.set(0.05);
		}
	}
}