Reputation: 13
I just started working on Easel js. I am building a game where users can build their own character. When it comes to animating the avatar for the game, I am faced with the problem of trying to know the exact position of the leg when it rotates, say 20 degrees, as the character moves because I am trying to attach the shoe (that the user created) to that exact position. I can use Easel js to create the animation frames, but I would rather create them my self. So, If I used photoshop to change the rotation of the leg to a degree, can I get that degree in Easel js.
thanks
Upvotes: 0
Views: 1924
Reputation: 16892
So, If I used photoshop to change the rotation of the leg to a degree, can I get that degree in Easel js.
=> No.
a) This would be high-end image recognition technology.
b) If you have a prerendered frame with every degree of roration for every image, you would end up with a LOT of data.
If animating the character through EaselJS Tweening-code is too complex/difficult, there are some animation editors for other frameworks that will generate code, maybe you can use one of those and convert that code, it's probably just translations and rotations, right?
Spriter(http://www.brashmonkey.com/spriter.htm) for example supports quite a few frameworks and is built to be easily integrated with any framework, but there are more tools like this, if you shouldn't like it.
Upvotes: 1
Reputation: 6742
Why don't you add the shoe to the leg and rotate them together?
var leg = new createjs.Container();
//add some graphics
var shoe = new createjs.Container();
//add some graphics
leg.addChild(shoe);
leg.rotation = 15;
Upvotes: 3