Skip to content

v2.0

Latest

Choose a tag to compare

@mikhailmogilnikov mikhailmogilnikov released this 05 May 15:58
· 1 commit to main since this release

v2.0.0 — Release Notes

2.0 is a major, production-focused release with a rewritten WebGL engine, updated configuration model, and aligned framework integrations.

Highlights

  • Improved rendering and performance: correct HiDPI behavior, new resize pipeline (ResizeObserver + debounced resize), mesh density controls, and target FPS pacing.
  • Better accessibility and UX: reducedMotion support (auto / ignore / force-static) with proper prefers-reduced-motion handling.
  • Stronger WebGL resilience: context loss/restore handling, configurable webglContextAttributes, and capability checks via MeshGradient.isSupported().
  • Expanded public API in MeshGradientOptions: pixelRatio, frequency.delta, targetFps, lifecycle callbacks (onReady, onError, onResize), transitions, and more.
  • New hot-path runtime helpers: setColors, setActiveColors, setFrequency, setSeed, setAnimationSpeed, toggleAutoPause.
  • Internal quality upgrades: more modular MiniGl/gradient architecture and cleaner type exports for ESM/CJS consumers.
  • New documentation website! Visit

Framework Integrations (Vue / React)

  • @mesh-gradient/vue and @mesh-gradient/react are aligned with @mesh-gradient/core@2.0.0.
  • Vue keeps the same MeshGradient component contract (options / isPaused) and lifecycle ownership in useMeshGradient.

Breaking Changes (Migration from 1.x)

  • Upgrade all packages to 2.x together: @mesh-gradient/core, @mesh-gradient/react, @mesh-gradient/vue.
  • Revisit canvas sizing assumptions: sizing now follows your CSS/layout contract.
  • Verify defaults and safety knobs (pauseOnOutsideViewport, reducedMotion, transitions, allowDocumentCanvasFallback).
  • Prefer explicit callbacks (onReady, onError, onResize) over legacy implicit behavior.