Skip to content

Commit

Permalink
only repaint canvas if there were changes
Browse files Browse the repository at this point in the history
  • Loading branch information
meodai committed Jul 5, 2024
1 parent 605cd31 commit 0741f0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/LandingPage/Hero/Cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const CardsSection = () => {
<div className="tw-paragraph md:tw-lead-sm mt-6 mb-0">
Unique compared to other blockchains. Enabling developers to write smart contracts spanning different chains. This is CHAIN FUSION.
</div>
<Link className="button-outline-white-30 mt-4" href="/ai">
<Link className="button-outline-white-30 mt-4" href="/chainfusion">
Jump right in
</Link>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/LandingPage/Hero/HomeAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ const HomeAnimation = () => {
window.addEventListener("resize", onWindowResize, false);

function onScroll() {
dirty = true;
//dirty = true;
const relScroll = document.documentElement.scrollTop / $body.scrollHeight;
relScrollTop = relScroll + 0.1 * relScroll;

options.noisePos += Math.abs(relScrollTop * .01);
//options.noisePos += Math.abs(relScrollTop * .01);
}

window.addEventListener("scroll", onScroll);
Expand Down

0 comments on commit 0741f0d

Please sign in to comment.