GreyRook / POM

Pixi Object Model
http://greyrook.github.io/POM/
MIT License
14 stars 2 forks source link

Rotation in degrees #11

Open ivanpopelyshev opened 8 years ago

ivanpopelyshev commented 8 years ago

I think that its better to represent rotation in degrees in JSON form, that way trivial 180 wont appear as 3.1415(10 more digits)

FlorianLudwig commented 8 years ago

@ivanpopelyshev I do agree - and actually our internal POM version does have exactly that!

For the open source release we cleaned the code up, simplified it and tried to stick to the PIXI api.

We implemented it having a second property (rotation_degree) and it is a getter/setter for rotation.

ivanpopelyshev commented 8 years ago

@FlorianLudwig Spine runtime has constants that I want to move to pixi core:

module.exports = {
    radDeg: 180 / Math.PI,
    degRad: Math.PI / 180,
}

Variable names are taken from libgdx.