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 to name
    • 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() to Scene.controller()
    • removed scene method triggerOffset()
      Method was marked deprecated since v1.1.0 and has now been replaced by triggerPosition().
    • removed Scene.setPin() option pinClass
      Was used to add a class to the pinned element. The same can now be achieved using setClassToggle().

    🔋 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() and removeTween())
      • new feature for shorthand TweenMax.to() animation using setTween(target, duration, parameters) or setTween(target, parameters)
    • new plugin 'animation.velocity'
      The velocity animation framework can now be used to trigger animations using Scene.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 call new $.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 or right, 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 to scrollmagic to adhere to naming conventions