Skip to content

Commit

Permalink
fix: using u as in the description (#1106)
Browse files Browse the repository at this point in the history
* Fixing missing parentheses and using u as in doc above

* added to inital app
  • Loading branch information
Shchvova authored Jan 13, 2025
1 parent 1118ced commit 8a182ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
function spin(node, { duration }) {
return {
duration,
css: (t) => ``
css: (t, u) => ``
};
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
function spin(node, { duration }) {
return {
duration,
css: (t) => {
css: (t, u) => {
const eased = elasticOut(t);
return `
transform: scale(${eased}) rotate(${eased * 1080}deg);
color: hsl(
${Math.trunc(t * 360)},
${Math.min(100, 1000 * (1 - t))}%,
${Math.min(50, 500 * (1 - t))}%
${Math.min(100, 1000 * u)}%,
${Math.min(50, 500 * u)}%
);`;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ We can get a lot more creative though. Let's make something truly gratuitous:
function spin(node, { duration }) {
return {
duration,
css: t => +++{
css: (t, u) => +++{
const eased = elasticOut(t);
return `
transform: scale(${eased}) rotate(${eased * 1080}deg);
color: hsl(
${Math.trunc(t * 360)},
${Math.min(100, 1000 * (1 - t))}%,
${Math.min(50, 500 * (1 - t))}%
${Math.min(100, 1000 * u)}%,
${Math.min(50, 500 * u)}%
);`
}+++
};
Expand Down

0 comments on commit 8a182ce

Please sign in to comment.