ROADMAP.md
Ideas and future directions for ScrollMagic v3. Nothing here is committed, just a notepad for enhancements.
API docs and interactive demos for v3. (Highest priority)
--progress, --visible etc. as CSS custom properties on elements. Enables pure-CSS scroll effects with zero JS callbacks.element.animate() keyframes from ScrollMagic progress. Use native ScrollTimeline when available (compositor-thread performance for transform/opacity/filter) and fall back to SM-driven progress updates when not. Gives SM users native animation performance without leaving SM's event/callback model.An opt-in plugin that automatically calls refresh() when layout-affecting changes are detected on the tracked element. Two complementary approaches:
style and class attribute changes on the element. Catches inline style modifications (element.style.margin = '...') and class toggles. Limitation: high false-positive rate (fires on non-layout changes like color), can't detect stylesheet rule changes or media query transitions.Neither covers all cases, but together they could reduce the need for manual refresh() in common scenarios (framework re-renders, third-party widgets, CMS-injected content). Should be off by default due to overhead.
Visual debugging overlay similar to ScrollMagic v2's addIndicators plugin. Shows trigger positions, element start/end markers, and current progress. Helps developers see what ScrollMagic is calculating without console logging.
Element pinning during scroll progress — the v2 setPin equivalent. CSS position: sticky covers the basic "pin while in viewport" case well, but doesn't handle unpin-and-repin scenarios (pin an element, release it at a specific scroll position, then re-pin it later). A plugin could fill that gap while recommending sticky for simple cases.
React wrapper/hooks for ScrollMagic. Reference implementation: sm-test-react. Should handle lifecycle cleanup (destroy on unmount), re-render-safe refs, and ideally provide a useScrollMagic hook.