Phaser.Component. Angle

new Angle()

The Angle Component provides access to an angle property; the rotation of a Game Object in degrees.

Source - gameobjects/components/Angle.js, line 12

Members

angle :number

The angle property is the rotation of the Game Object in degrees from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property rotation instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

Source - gameobjects/components/Angle.js, line 29
Phaser Copyright © 2012-2015 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-alpha10 on Thu Mar 26 2015 02:53:50 GMT+0000 (GMT Standard Time) using the DocStrap template.