Phaser.Component.Delta = function (){ } ; Phaser.Component.Delta.prototype = { deltaX: { get: function (){ return this.world.x - this.previousPosition.x; } } , deltaY: { get: function (){ return this.world.y - this.previousPosition.y; } } , deltaZ: { get: function (){ return this.rotation - this.previousRotation; } } } ;