round 1 of animation + transition rewrite, while combing Xaric's Tween port

This commit is contained in:
Eric Rowell
2012-04-02 21:03:59 -07:00
parent 6ce9d5489c
commit 77aea95e7a
10 changed files with 1010 additions and 328 deletions

View File

@@ -10,7 +10,7 @@ function log(message) {
* Test constructor
*/
function Test() {
this.testOnly = '';
this.testOnly = 'TRANSITION - transition position and rotation';
this.counter = 0;
}
/**

View File

@@ -19,12 +19,26 @@ Test.prototype.tests = {
layer.add(rect);
stage.add(layer);
rect.transitionTo({
x: 400,
y: 30,
rotation: Math.PI * 2,
duration: 1
var tween = new Kinetic.Transition(rect, function(i) {
rect.setScale(i);
}, Kinetic.Transitions.bounceEaseOut, 10, 1, 2);
stage.onFrame(function(frame) {
tween.onEnterFrame();
layer.draw();
});
tween.start();
stage.start();
/*
rect.transitionTo({
x: 400,
y: 30,
rotation: Math.PI * 2,
duration: 1
});
*/
},
'TRANSITION - transition position and rotation with two transitions': function(containerId) {
var stage = new Kinetic.Stage({