ScrollMagic v2.0.0 Release Notes
Release Date: 2015-02-26 // about 9 years ago-
🔄 changes (non-breaking)
- removal of all dependencies (jQuery & GSAP) – ScrollMagic is now stand-alone.
- new file structure:
- main module: 'ScrollMagic.js'
- all available plugins in folder '/plugins'
- new scene event: add fires when scene is added to a controller
- new scene event: remove fires when scene is removed from a controller
- option changes in
Scene.addIndicators()
:- indicators are now always on top (option
zindex
removed) - option
suffix
is renamed toname
- indicators are now always on top (option
- several performance tweaks
- lots more info and warning messages (in the uncompressed development version)
🔄 changes (potentially breaking):
- ScrollMagic Controllers are now instantiated using
var controller = new ScrollMagic.Controller();
- ScrollMagic Scenes are now instantiated using
var scene = new ScrollMagic.Scene();
- renamed method
Scene.parent()
toScene.controller()
- removed scene method
triggerOffset()
Method was marked deprecated since v1.1.0 and has now been replaced bytriggerPosition()
. - removed
Scene.setPin()
optionpinClass
Was used to add a class to the pinned element. The same can now be achieved usingsetClassToggle()
.
🔋 features:
- new plugin 'debug.addIndicators' (formerly 'jquery.scrollmagic.debug')
- indicators can now be added to the scene before it was added to a controller
- indicators also work when scenes are removed and readded
- indicator labels are autoindexed, when no explicit label is supplied
- new controller option 'addIndicators', when a controller is initialized using
new ScrollMagic.Controller({addIndicators: true})
all added scenes will automatically have indicators added to them - start indicator is now above the line for less overlays (i.e. one scene starts, where another ends)
- huge performance optimization, especially when using indicators for multiple scenes
- new method
removeIndicators()
- new plugin 'animation.gsap'
- Contains all GSAP tween functionality formerly integrated into ScrollMagic (
setTween()
andremoveTween()
) - new feature for shorthand TweenMax.to() animation using
setTween(target, duration, parameters)
orsetTween(target, parameters)
- Contains all GSAP tween functionality formerly integrated into ScrollMagic (
- new plugin 'animation.velocity'
The velocity animation framework can now be used to trigger animations usingScene.setVelocity(target, properties, options)
Note that for the time being velocity only works with 0 duration scenes, because timeline scrubbing isnt supported by velocity (yet). - new plugin 'jquery.ScrollMagic'
- adds support for jQuery selectors and makes all methods accept jQuery objects as element parameters.
- moves ScrollMagic global to
$.ScrollMagic
. To instantiate a controller respectively callnew $.ScrollMagic.Controller()
.
- new option for responsive duration
The Scene duration can now be a percentage string like
"100%"
.
It will be calculated in relation to the size of the scroll container. It use the container's height for vertically scrolling applications and its width for horizontally scrolling containers.
🛠 bugfixes:
- vertical Pins in DIV scroll containers did not work, when using a mousewheel while the cursor was over the pinned element
- using
removeTween(true)
to remove and reset a Tween didn't work when the scene's duration was 0 - when removing pins from cascaded pins using
removePin(true)
messed up the DOM structure (long term bug) - when pinning absolutely positioned elements using
bottom
orright
, the positioning was off (See issue 226)
project management:
- changed build system to gulp [see here](CONTRIBUTING.md#development-contribution)
- moved all Module dist files to '/scrollmagic' [see here](scrollmagic)
- published scrollmagic on npm as
scrollmagic
- renamed package on bower from
ScrollMagic
toscrollmagic
to adhere to naming conventions