Skip to content

Animate gradient background spotlights via canvas - #67

Open
dauble with Copilot wants to merge 2 commits into
masterfrom
copilot/canvas-gradient-spotlight-effects
Open

Animate gradient background spotlights via canvas#67
dauble with Copilot wants to merge 2 commits into
masterfrom
copilot/canvas-gradient-spotlight-effects

Conversation

Copilot AI commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

The static CSS radial-gradient background had no movement. Replace it with a canvas-driven animation so the three spotlight orbs drift and pulse continuously.

Changes

  • _layouts/default.html — swap <div class="page-field"> for <canvas id="page-canvas" aria-hidden="true">
  • assets/css/styles.scss — replace .page-field background rule with positional styles for #page-canvas (fixed, full-bleed, z-index: -2)
  • assets/js/site.js — canvas animation loop:
    • Redraws the navy base + three orbs (blue upper-left, lime upper-right, deep-navy lower-right) every frame via createRadialGradient
    • Each orb drifts slowly around its origin (bounces at ±12% viewport offset) and pulses in size (±18% of base radius)
    • Orbs are drawn as ellipses via ctx.scale to preserve the original asymmetric radii
    • Pauses via Page Visibility API when tab is hidden; respects prefers-reduced-motion (renders static if set)

Copilot AI and others added 2 commits August 15, 2026 17:36
Co-authored-by: dauble <4305144+dauble@users.noreply.github.com>
…on tab hide

Co-authored-by: dauble <4305144+dauble@users.noreply.github.com>
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.

2 participants