-
Notifications
You must be signed in to change notification settings - Fork 4
Releases: metaory/gradient-gl
v1.5.0 - perf(bundle): per-shader code-splitting via static import map
Static-analyser friendly map; no dynamic import paths; tree-shake + per-shader split
- Change: explicit static shader import map (no dynamic paths)
- Effect: static analysers (Vite/Rollup/Webpack) tree‐shake; per‐shader code‐split
- Result: smaller bundles, faster loads; only used shader is included
- API: unchanged
- Action: none
Full Changelog: v1.4.2...v1.5.0
Assets 2
v1.4.2 - Fix: Smooth animation during scroll events
What's Fixed
Fixed animation resets/jumps when scrolling stops. Gradient animation now remains smooth throughout scroll events.
Root Cause
Browser throttles requestAnimationFrame during scroll for performance. Large time gaps (100ms+) cause animation to jump ahead, creating visual "resets."
Solution
Smooth time interpolation with delta capping:
- Frame Delta Tracking: Accumulate frame deltas instead of raw timestamps
- Delta Capping: Cap large gaps at 50ms to prevent jumps
- Continuous Animation: Use
elapsedTimefor smooth progression
Technical Details
// Before: Raw time causing jumps const time = performance.now() this.#gl.uniform1f(iTime, time / 1000) // After: Smooth delta accumulation const delta = Math.min(currentTime - this.#lastTime, MAX_DELTA) this.#elapsedTime += delta this.#gl.uniform1f(iTime, this.#elapsedTime / 1000)
Impact
- ✅ Smooth animation during scroll
- ✅ No visual resets/jumps
- ✅ Maintains performance
- ✅ Minimal code changes
Full Changelog: v1.4.1...v1.4.2
Assets 2
v1.4.1 seed script cdn fix
Full Changelog: v1.4.0...v1.4.1
Assets 2
v1.4.0 - SeedScript One-Liner usage
SeedScript One-Liner:
Added support for the simplest possible usage:
<script type="module" src="https://esm.sh/gradient-gl?seed=a2.eba9"></script>
Just drop a single script tag with your seed as a query param. No build step, no config, no dependencies.
read more for setting optional selector or pinning to a version
CDN Example:
New examples/cdn-vanilla/index.html shows how to use the new one-liner in a real page.
Upgrade note:
You can now use GradientGL with a single script tag and a seed param, anywhere, instantly.
Full Changelog: v1.3.3...v1.4.0
Assets 2
v1.3.3
What's Changed
- Remove console.log by @chrisvariety in #4
- Fixed TypeError in context recovery handler (Fixes #6)
New Contributors
- @chrisvariety made their first contribution in #4
Full Changelog: v1.3.2...v1.3.3