Skip to content

Commit

Permalink
Merge pull request #148 from MasatoMakino/bump-devDependencies
Browse files Browse the repository at this point in the history
bump : devDependencies
  • Loading branch information
MasatoMakino committed Jul 27, 2024
2 parents c723d60 + e0e967a commit 7444b4c
Show file tree
Hide file tree
Showing 3 changed files with 534 additions and 708 deletions.
15 changes: 12 additions & 3 deletions demoSrc/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@ export class Demo {

const circle = this.addCircle();

const yoyo = (f) => {
return (t) => {
if (t < 0.5) {
return f(2 * t);
} else {
return 1 - f(2 * (t - 0.5));
}
};
};

const tween = new Tween(circle.dataset)
.to({ rotation: 360, y: 300 }, 750)
.to({ rotation: 360, y: 300 }, 1500)
.repeat(Infinity)
.yoyo(true)
.easing(Easing.Cubic.InOut)
.easing(yoyo((t) => Easing.Cubic.InOut(t)))
.onUpdate((object) => {
this.updateBox(circle, object);
})
Expand Down
Loading

0 comments on commit 7444b4c

Please sign in to comment.