Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move cube animations to web worker to offload main thread #33

Conversation

timsexperiments
Copy link
Owner

@timsexperiments timsexperiments commented Jul 16, 2024

TL;DR

This PR introduces a significant update to the timsexperiments application by implementing interactive animations for the Rubik's Cube featured in the hero section.

What changed?

  • Updated the @timsexperiments/three-rubiks-cube dependency from ^0.0.5 to ^0.1.2 in package.json.
  • Modified Hero.astro to refer to main.ts instead of cube.ts for cube-related scripts.
  • Removed the old cube.ts file completely.
  • Introduced new scripts: actions.ts, main.ts, and worker.ts for managing cube interactions and animations in a more modular way.
  • Updated pnpm-lock.yaml to reflect the new dependency versions.

How to test?

  1. Pull the branch and run pnpm install to update dependencies.
  2. Start the application and navigate to the homepage.
  3. Observe the cube in the hero section for the new interactive animations.
  4. Verify that the cube responds correctly to various interactions and window resizing.

Why make this change?

The motivation behind this change is to enhance the visual appeal and interactivity of the hero section on the homepage. By modularizing the cube-related scripts, it also improves code maintainability and scalability.


Copy link

cloudflare-workers-and-pages bot commented Jul 16, 2024

Deploying timsexperiments-foo with  Cloudflare Pages  Cloudflare Pages

Latest commit: c1ad9be
Status: ✅  Deploy successful!
Preview URL: https://6cd88376.timsexperiments-foo.pages.dev
Branch Preview URL: https://07-15-move-cube-animations-t.timsexperiments-foo.pages.dev

View logs

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @timsexperiments and the rest of your teammates on Graphite Graphite

Copy link

Your database schema is up-to-date.

@timsexperiments timsexperiments marked this pull request as ready for review July 16, 2024 04:20
@timsexperiments timsexperiments merged commit 46ba437 into main Jul 16, 2024
2 checks passed
Copy link
Owner Author

Merge activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant