Skip to content

Commit

Permalink
Tween easing, keyframes, style, transform, Color corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
foo123 committed Dec 5, 2022
1 parent 47fac90 commit ec664e5
Show file tree
Hide file tree
Showing 12 changed files with 440 additions and 307 deletions.
36 changes: 28 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,35 @@ const square = Polygon([
[cx+r,cy+r]
]);
const tween = Tween({
from: {
shape: circle,
stroke: 'cyan'
keyframes: {
"0%": {
shape: circle,
style: {
stroke: 'cyan'
},
easing: 'ease-out'
},
"30%": {
shape: square,
transform: {
rotate: [0, square.getCenter().x, square.getCenter().y]
},
style: {
stroke: 'orange'
},
easing: 'ease-out-elastic'
},
"100%": {
shape: square,
transform: {
rotate: [45, square.getCenter().x, square.getCenter().y]
},
style: {
stroke: 'blue'
}
}
},
to: {
shape: square,
stroke: 'orange'
},
duration: 1000
duration: 2000
});
plane.add(tween);
tween.start();
Expand Down
Loading

0 comments on commit ec664e5

Please sign in to comment.