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

Update WebGL background animation for theme changes #6

Merged
merged 1 commit into from
May 10, 2024

Conversation

igorcosta
Copy link
Owner

@igorcosta igorcosta commented May 10, 2024

Related to #5

Updates the WebGL background animation to display morphic lines that change color based on the user-selected theme and simplifies theme toggling logic.

  • WebGL Animation Changes:

    • Removes the initial box and sphere effects from webgl-animation.js.
    • Implements morphic lines drawing in webgl-animation.js that dynamically change color between black and white depending on the theme.
    • Adds an event listener in webgl-animation.js for theme changes, triggering a redraw of the animation with the updated theme colors.
  • Theme Toggling Enhancement:

    • Modifies theme-toggle.js to emit a custom event with the theme detail upon toggling between light and dark themes. This event is used by webgl-animation.js to adjust the animation colors accordingly.
  • Code Simplification:

    • Deletes script.js, consolidating JavaScript functionality into fewer files for easier management and maintenance.

For more details, open the Copilot Workspace session.

@igorcosta igorcosta merged commit 3879453 into main May 10, 2024
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