Breaking Changes
destroy()callsonDestroyinstead ofonRemoveon plugins —onRemovenow only fires viaremovePlugin(). Plugins that usedonRemovefor destroy cleanup should addonDestroy(or assign the same function to both).computedOptionsremoved — replaced byresolvedBounds, which returns{ element: ElementBounds, scrollParent: ContainerBounds }(cached layout bounds only, no longer leaks the full internal options structure).- Getter return types narrowed —
element,scrollParent, andverticalgetters now return resolved types (Element,Window | Element,boolean) instead of the raw public input union. Setters still accept the full public types.
New Features
- Plugin lifecycle hooks:
onEnable,onDisable,onDestroy— plugins can react to enable/disable transitions and distinguish manual removal from instance teardown.destroy()on an enabled instance firesonDisable→onDestroyin sequence. scrollmagic/utilsubpath export — exposesagnosticValuesandagnosticPropsviaimport { ... } from 'scrollmagic/util'for plugin authors working with direction-agnostic bounds.ElementBounds,ContainerBounds,ResolvedBoundstypes exported — available from the main entry point for plugin and integration authors.
Plugin Authoring Guide
See the new PLUGINS.md for the full plugin authoring guide, including lifecycle hook sequencing and utility usage.
Install
npm install scrollmagic@nextSee the README for full documentation.