Skip to content

feat: v2#65

Open
aidanaden wants to merge 3 commits into
mainfrom
v2
Open

feat: v2#65
aidanaden wants to merge 3 commits into
mainfrom
v2

Conversation

@aidanaden

@aidanaden aidanaden commented Nov 16, 2024

Copy link
Copy Markdown
Owner

This PR greatly simplifies the loading bar. For now, the loading bar can only be started or stopped.

By default, starting the loading bar:

  1. Starts loading bar at 7% width
  2. Gradually increase the progress bar every 1 fps (via requestAnimationFrame)
  3. Progress bar stops at 64% (this requires 323 frames, or around 5-6s on a 60 fps screen)

Stopping the loading bar:

  1. Sets progress bar width to 100%
  2. Wait for 200ms
  3. Begin reducing opacity by 1% every 1 fps (via requestAnimationFrame) which requires roughly 100 frames, or ~1.5s at 60 fps

TODO:

  • add example page to display full load
  • add param to configure load speed
  • add param to manually configure loading bar progress

@aidanaden aidanaden self-assigned this Nov 16, 2024
@vercel

vercel Bot commented Nov 16, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
solid-top-loading-bar ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 17, 2024 1:01am

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 17, 2024

Copy link
Copy Markdown

Deploying solid-top-loading-bar with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8c56e99
Status:🚫  Build failed.

View logs

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.

feat: add smooth animation alternative using useAnimationFrame

1 participant