Move ScrollMagic under npm dependency

This commit is contained in:
Stephen Abello
2021-01-15 11:17:03 +01:00
parent 71d3713950
commit ad08376f6e
16 changed files with 4739 additions and 1 deletions

231
node_modules/scrollmagic/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,231 @@
CHANGELOG
=========
## 2.0.7 (2019-05-07)
#### bugfixes:
- error in Safari when using setPin [PR 382](https://github.com/janpaepke/ScrollMagic/pull/382)
- added missing semi-colon to isMobile regex [PR 617](https://github.com/janpaepke/ScrollMagic/pull/617)
- fixed SVG element detection as Dom Element and related Error on Safari [PR 447](https://github.com/janpaepke/ScrollMagic/pull/447)
- fixed code selection in examples
#### changes (non-breaking):
- pass Scene as `this` to duration callback [PR 419](https://github.com/janpaepke/ScrollMagic/pull/419)
- increase fps limit for mobile support(advance) example. [PR 753](https://github.com/janpaepke/ScrollMagic/pull/753)
- added documentation for responsive duration (e.g. "100%")
- updated [Section Wipes (natural)](http://scrollmagic.io/examples/basic/section_wipes_natural.html) to work for large number of sections.
- removed warning for pushFollowers in pins with duration 0, unless actively set to true
- fixed some spelling stuff
#### new examples:
- basic: [Reveal on Scroll](http://scrollmagic.io/examples/basic/reveal_on_scroll.html)
#### project management:
- updated: build routine for gulp 4
- updated: all Dependencies
- changed: folder structure for a tidier root
- fixed: unit test errors
- added: Buttons for [ScrollMagic Premium Support](http://support.scrollmagic.io).
## 2.0.6 (2018-10-08)
#### bugfixes:
- errors occurred, when removing a triggerElement [see here](https://github.com/janpaepke/ScrollMagic/issues/307)
- semantic error in removePin()
## 2.0.5 (2015-04-29)
#### bugfixes:
- a JS error occurred in IE9 [see here](https://github.com/janpaepke/ScrollMagic/issues/289)
- cascading pins of absolutely positioned elements didn't work [see here](https://github.com/janpaepke/ScrollMagic/issues/291)
- scene state wasn't correct at start position [see here](https://github.com/janpaepke/ScrollMagic/issues/299)
- updatePinState was called before scrollOffset update [see here](https://github.com/janpaepke/ScrollMagic/pull/303)
## 2.0.3 (2015-04-07)
#### changes (non-breaking)
- moved to new jQuery plugin definition via npm [see here](http://blog.npmjs.org/post/111475741445/publishing-your-jquery-plugin-to-npm-the-quick)
- updated and improved several examples
- optimized minification
- changed command line options for build (version bumping)
#### bugfixes:
- height calculation for pinned elements when using `pushFollowers: false` was faulty
- parallax jitter fix for chrome
- when using responsive duration and `pushFollowers = true`, an invalid console warning message was triggered
- the sourcecode viewer in the examples code was showing modified code
- fixed a problem when using the mousewheel to scroll over fixed elements after replacing the default scroll method of the controller
- using pinned elements as `Controller.scrollTo()` targets didn't work properly
- mousewheel over pinned elements inside of div scroll containers didn't work in IE
#### features
- it's now possible to supply additional parameters to custom scrollTo functions [see here](http://scrollmagic.io/docs/ScrollMagic.Controller.html#scrollTo)
#### new examples:
- basic: [Section Wipes (natural)](http://scrollmagic.io/examples/basic/section_wipes_natural.html)
- advanced: [Section Wipes (manual)](http://scrollmagic.io/examples/advanced/section_wipes_manual.html)
- advanced: [Section Slides (manual)](http://scrollmagic.io/examples/advanced/section_slides_manual.html)
## 2.0.2 (2015-03-23)
#### bugfixes:
- Size calculations for pinned elements were off in certain conditions [see here](https://github.com/janpaepke/ScrollMagic/issues/252)
- scrollDirection detection broke in 2.0.1 [see here](https://github.com/janpaepke/ScrollMagic/issues/271)
## 2.0.1 (2015-03-17)
#### features
- better npm/browserify support [see here](https://github.com/janpaepke/ScrollMagic/pull/254)
#### bugfixes:
- missing browser global when using jQuery plugin [see here](https://github.com/janpaepke/ScrollMagic/issues/268)
- resolving jitters due to out-of-sync scroll positions [see here](https://github.com/janpaepke/ScrollMagic/issues/255)
## 2.0.0 (2015-02-26)
#### 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](http://scrollmagic.io/docs/ScrollMagic.Scene.html#event:add) fires when scene is added to a controller
- new scene event: [remove](http://scrollmagic.io/docs/ScrollMagic.Scene.html#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](https://github.com/janpaepke/ScrollMagic/issues/226))
#### project management:
- changed build system to [gulp](http://gulpjs.com/) [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
## 1.3.0 (2014-11-13)
#### changes (potentially breaking):
- changed AMD loader behavior to export only one object -> `{Controller: ScrollMagic, Scene: ScrollScene}`
#### bugfixes:
- added Error message for missing dependencies
- fixed bubbling of pseudo-resize event of div containers
- reference bug with AMD loading
## 1.2.0 (2014-10-14)
#### features
- AMD loader support (See issue [160](https://github.com/janpaepke/ScrollMagic/issues/160))
- added warning for tweens being overwritten (See issue [145](https://github.com/janpaepke/ScrollMagic/issues/145))
#### changes (non-breaking):
- better code for mobile clicks (See issue [169](https://github.com/janpaepke/ScrollMagic/issues/169))
- updated [draw example](http://scrollmagic.io/examples/advanced/svg_drawing.html) to camel case to support Firefox
- updated [parralax sections example](http://scrollmagic.io/examples/advanced/parallax_sections.html) to moving divs instead of background position
- added new references
- added favicon
#### bugfixes:
- scroll momentum increased in Firefox over fixed elements (See issue [164](https://github.com/janpaepke/ScrollMagic/issues/164))
- parallax example was juggy in Firefox and Safari -> removed reliance of TweenMax ticker in favor of requestAnimationFrame (See issue [167](https://github.com/janpaepke/ScrollMagic/issues/167))
- bugfix for pinned elements jittering if inside a container, because of the delayed position update in refreshInterval
## 1.1.0 (2014-09-04)
#### changes (potentially breaking):
- **zero duration scene events & states**
The event logic for zero duration scenes has been changed: From now on a zero duration scene will trigger `enter`, `start`, `progress` (in this order) when scrolling forward past the trigger point and `progress`, `start`, `leave` when scrolling in reverse.
This means there will never be an `end` event triggered, which reflects the behaviour more accurately.
Furthemore this affects the scene's possible states, which can now only be `"BEFORE"` and `"DURING"` for zero duration scenes.
To learn more, read [this issue](https://github.com/janpaepke/ScrollMagic/issues/141#issuecomment-53549776) or [this documentation](http://scrollmagic.io/docs/ScrollMagic.Scene.html#progress).
- **removed method `startPosition()`**
Method was marked deprecated since v1.0.7 and has now been replaced by `triggerPosition()`.
The terms "_offset_" and "_position_" were used too randomly.
To avoid confision, from now on "_offset_" will be used in connection with the scroll offset of the container, while "_position_" refers to the top / left values within the DOM.
- **`change` event only fires when change actually happened**
If a setter is used with the current value or the internal validator fails and defaults to the same value an option is already set to, no `change` event will be fired anymore.
#### changes (non-breaking)
- **scenes are sorted in controller**
Scenes attached to the same controller are now updated in the order of their start position.
This way DOM modifcations (e.g. tweens) that influence each other are sure to be called in the right order.
To learn more, read [this issue](https://github.com/janpaepke/ScrollMagic/issues/141).
- **marked `triggerOffset` as deprecated, replaced by `triggerPosition`**
Renaming to avoid confusion. Read above for clarification.
- **new controller option `refreshInterval`**
To update values that otherwise wouldn't fire an event a `refreshInterval` option was added to poll for changes.
These changes involve resizing of a div scroll container or movement of a scene's trigger element position.
- **no more logging in minified version**
All debug logging functionality was removed when using the minified version to save on filesize.
#### features:
- new controller method: [scrollTo](http://scrollmagic.io/docs/ScrollMagic.Controller.html#scrollTo)
- new controller method: [scrollPos](http://scrollmagic.io/docs/ScrollMagic.Controller.html#scrollPos)
- new scene method: [refresh](http://scrollmagic.io/docs/ScrollMagic.Scene.html#refresh)
- new scene method: [setClassToggle](http://scrollmagic.io/docs/ScrollMagic.Scene.html#setClassToggle), [removeClassToggle](http://scrollmagic.io/docs/ScrollMagic.Scene.html#removeClassToggle) respectively
- new scene event: [shift](http://scrollmagic.io/docs/ScrollMagic.Scene.html#event:shift) fires when scene position changes
- new scene event: [destroy](http://scrollmagic.io/docs/ScrollMagic.Scene.html#event:destroy) fires when scene is destroyed
- extended scene option [duration](http://scrollmagic.io/docs/ScrollMagic.Scene.html#duration) to support dynamic updates in responsive layouts
- docs: grouped methods for more clear arrangement
- docs: various additions and clarifications
#### bugfixes:
- removing and resetting pins during pin phase didn't work properly
- using mousewheel to scroll over pinned elements in container (See issues [34](https://github.com/janpaepke/ScrollMagic/issues/34), [50](https://github.com/janpaepke/ScrollMagic/issues/50), [82](https://github.com/janpaepke/ScrollMagic/issues/82), [139](https://github.com/janpaepke/ScrollMagic/issues/139), [140](https://github.com/janpaepke/ScrollMagic/issues/140))
- pin width collapsed, if no width was defined (See issues [63](https://github.com/janpaepke/ScrollMagic/issues/63), [94](https://github.com/janpaepke/ScrollMagic/issues/94))
- positioned pins didn't work in IE 9
- padding of pinned elements was added to relative width
- event namespace issues
- docs: fixed highlight & deeplink issues
#### new examples:
- basic: [CSS Class Toggles](http://scrollmagic.io/examples/basic/class_toggles.html)
- advanced: [SVG Line Drawing](http://scrollmagic.io/examples/advanced/svg_drawing.html)
- advanced: [Parallax Sections](http://scrollmagic.io/examples/advanced/parallax_sections.html)
- expert: [Image Sequences](http://scrollmagic.io/examples/expert/image_sequence.html)
- expert: [Bezier Path Animations](http://scrollmagic.io/examples/expert/bezier_path_animation.html)

22
node_modules/scrollmagic/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,22 @@
# License
ScrollMagic is dual licensed under the terms of the MIT license (below) and the [GPL](http://www.gnu.org/licenses/gpl-3.0.html).
__Plugin License Information:__
* The Greensock Animation Platform (__GSAP__) is used per its ["No Charge" license](http://greensock.com/standard-license).
For some cases the extended ["Business Green" license](http://greensock.com/licensing/) will be necessary.
* __Velocity.js__ is published under the terms of the [MIT license](https://github.com/julianshapiro/velocity/blob/master/LICENSE.md).
* __jQuery__ is published under the terms of the [MIT license](https://jquery.org/license/).
---
## MIT License
Copyright (c) 2015 Jan Paepke
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

171
node_modules/scrollmagic/README.md generated vendored Normal file
View File

@@ -0,0 +1,171 @@
# ScrollMagic <a href='https://github.com/janpaepke/ScrollMagic/blob/master/CHANGELOG.md' class='version' title='Whats New?'>v2.0.8</a> [![Build Status](https://api.travis-ci.org/janpaepke/ScrollMagic.svg?branch=master)](https://travis-ci.org/janpaepke/ScrollMagic)
### The javascript library for magical scroll interactions.
[![Donate](https://scrollmagic.io/assets/img/btn_donate.svg 'Shut up and take my money!')](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8BJC8B58XHKLL 'Shut up and take my money!') <a href="https://nerdpool.io/support/scrollmagic?utm_source=github&utm_medium=btn" title="Get personal live support"><img src="https://cdn.nerdpool.io/np-btn-support-blue.png" style="height: 40px" height="40" alt="Request personal live support"></a>
**Quicklinks:** [About](#about-the-library) | [Download](#availability) | [Installation](#installation) | [Usage](#usage) | [Help](#help) | [Compatibility](#browser-support) | [Author](#about-the-author) | [License](#license) | [Thanks](#thanks)
---
ScrollMagic helps you to easily react to the user's current scroll position.
It's the perfect library for you, if you want to ...
- animate based on scroll position either trigger an animation or synchronize it to the scrollbar movement (like a playback scrub control).
- pin an element starting at a specific scroll position either indefinitely or for a limited amount of scroll progress (sticky elements).
- toggle CSS classes of elements on and off based on scroll position.
- effortlessly add parallax effects to your website.
- create an infinitely scrolling page (ajax load of additional content).
- add callbacks at specific scroll positions or while scrolling past a specific section, passing a progress parameter.
Check out [the demo page](http://scrollmagic.io), browse [the examples](http://scrollmagic.io/examples/index.html) or read [the documentation](http://scrollmagic.io/docs/index.html) to get started.
If you want to contribute please [get in touch](mailto:e-mail@janpaepke.de) and let me know about your specialty and experience.
## About the Library
ScrollMagic is a scroll interaction library.
It's a complete rewrite of its predecessor [Superscrollorama](https://github.com/johnpolacek/superscrollorama) by [John Polacek](http://johnpolacek.com).
A plugin-based architecture offers easy customizability and extendability.
To implement animations, ScrollMagic can work with multiple frameworks.
The recommended solution is the [Greensock Animation Platform (GSAP)](http://www.greensock.com/gsap-js/) due to its stability and feature richness. For a more lightweight approach the [VelocityJS](http://VelocityJS.org) framework is also supported. Alternatively custom extensions can be implemented or the necessity of a framework can be completely avoided by animating simply using CSS and class toggles.
ScrollMagic was developed with these principles in mind:
* optimized performance
* lightweight (6KB gzipped)
* flexibility and extendibility
* mobile compatibility
* event management
* support for responsive web design
* object oriented programming and object chaining
* readable, centralized code and intuitive development
* support for both x and y direction scrolling (even both on one page)
* support for scrolling inside div containers (even multiple on one page)
* extensive debugging and logging capabilities
* detailed documentation
* many application examples
**Is ScrollMagic the right library for you?**
ScrollMagic takes an object oriented approach using a controller for each scroll container and attaching multiple scenes defining what should happen at what part of the page. While this offers a great deal of control, it might be a little confusing, especially if you're just starting out with javascript.
If the above points are not crucial for you and you are just looking for a simple solution to implement css animations I would strongly recommend taking a look at the awesome [skrollr](http://prinzhorn.github.io/skrollr/) project. It almost solely relies on element attributes and thus requires minimal to no javascript knowledge.
## Availability
To get your copy of ScrollMagic you have the choice between four options:
**Option 1: GitHub**
Download a zip file containing the source code, demo page, all examples and documentation from the [GitHub releases page](https://github.com/janpaepke/ScrollMagic/releases) or clone the package to your machine using the git command line interface:
```bash
git clone https://github.com/janpaepke/ScrollMagic.git
```
**Option 2: Bower**
ScrollMagic is also [available on bower](http://bower.io/search/?q=scrollmagic) and will only install the necessary source code, ignoring all example and documentation files.
Please mind that since they are not core dependencies, you will have to add frameworks like GSAP, jQuery or Velocity manually, should you choose to use them.
```bash
bower install scrollmagic
```
**Option 3: npm**
If you prefer the [node package manager](https://www.npmjs.com/package/scrollmagic), feel free to use it.
Keep in mind that like with bower non-crucial files will be ignored (see above).
```bash
npm install scrollmagic
```
**Option 4: CDN**
If you don't want to host ScrollMagic yourself, you can include it from [cdnjs](https://cdnjs.com/libraries/ScrollMagic):
```
https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.8/ScrollMagic.min.js
```
All plugins and uncompressed files are also available on cdnjs.
For example:
```
https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.8/plugins/debug.addIndicators.js
https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.8/plugins/debug.addIndicators.min.js
```
## Installation
Include the **core** library in your HTML file:
```html
<script src="js/scrollmagic/uncompressed/ScrollMagic.js"></script>
```
And you're ready to go!
For deployment use the minified version **instead**:
```html
<script src="js/scrollmagic/minified/ScrollMagic.min.js"></script>
```
_**NOTE:** The logging feature is removed in the minified version due to file size considerations._
To use **plugins** like the indicators visualization, simply include them additionally to the main library:
```html
<script src="js/scrollmagic/uncompressed/plugins/debug.addIndicators.js"></script>
```
To learn how to configure **RequireJS**, when using AMD, please [read here](https://github.com/janpaepke/ScrollMagic/wiki/Getting-Started-:-Using-AMD).
## Usage
The basic ScrollMagic design pattern is one controller, which has one or more scenes attached to it.
Each scene is used to define what happens when the container is scrolled to a specific offset.
Here's a basic workflow example:
```javascript
// init controller
var controller = new ScrollMagic.Controller();
// create a scene
new ScrollMagic.Scene({
duration: 100, // the scene should last for a scroll distance of 100px
offset: 50 // start this scene after scrolling for 50px
})
.setPin('#my-sticky-element') // pins the element for the the scene's duration
.addTo(controller); // assign the scene to the controller
```
To learn more about the ScrollMagic code structure, please [read here](https://github.com/janpaepke/ScrollMagic/wiki/Getting-Started-:-How-to-use-ScrollMagic).
## Help
To get started, check out the available learning resources [in the wiki section](https://github.com/janpaepke/ScrollMagic/wiki).
Be sure to have a look at the [examples](http://janpaepke.github.com/ScrollMagic/examples/index.html) to get source code pointers and make use of the [documentation](http://janpaepke.github.com/ScrollMagic/docs/index.html) for a complete reference.
If you run into trouble using ScrollMagic please follow the [Troubleshooting guide](https://github.com/janpaepke/ScrollMagic/wiki/Troubleshooting-Guide).
**Please do not post support requests in the github issue section**, as it's reserverd for issue and bug reporting.
If all above options for self-help fail, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/scrollmagic) or the [ScrollMagic Premium Support](https://support.scrollmagic.io/?utm_source=github&utm_medium=link).
## Browser Support
ScrollMagic aims to support all major browsers even in older versions:
Firefox 26+, Chrome 30+, Safari 5.1+, Opera 10+, IE 9+
## About the Author
I am a creative coder based in Vienna, Austria.
[Learn more on my website](http://www.janpaepke.de) or [Follow me on Twitter](http://twitter.com/janpaepke)
## License
ScrollMagic is dual licensed under the MIT license and GPL.
For more information click [here](https://github.com/janpaepke/ScrollMagic/blob/master/LICENSE.md).
## Thanks
This library was made possible by many people who have supported it with passion, donations or advice. Special thanks go out to: [John Polacek](https://github.com/johnpolacek), [Jack Doyle](https://github.com/greensock), [Paul Irish](https://github.com/paulirish), [Nicholas Cerminara](https://github.com/ncerminara), [Kai Dorschner](https://github.com/krnlde), [Petr Tichy](https://github.com/petr-tichy) and [Dennis Gaebel](https://github.com/grayghostvisuals).

174
node_modules/scrollmagic/package.json generated vendored Normal file
View File

@@ -0,0 +1,174 @@
{
"_from": "scrollmagic",
"_id": "scrollmagic@2.0.8",
"_inBundle": false,
"_integrity": "sha512-UYXEGBPVLziovXl3FjHGkY9c4UXKUKopIdXwWR2JapWxCo0U345wYegi7rcsv5vHf/ktc1bSNWy4QRFiV+Yccw==",
"_location": "/scrollmagic",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "scrollmagic",
"name": "scrollmagic",
"escapedName": "scrollmagic",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/scrollmagic/-/scrollmagic-2.0.8.tgz",
"_shasum": "e0d7aff804c393c022fdc0c566f1edce3b4e9ed7",
"_spec": "scrollmagic",
"_where": "/srv/http/develop_28",
"author": {
"name": "Jan Paepke",
"url": "http://www.janpaepke.de"
},
"bugs": {
"url": "https://github.com/janpaepke/ScrollMagic/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "The javascript library for magical scroll interactions.",
"devDependencies": {
"ansi-colors": "^3.2.4",
"del": "^3.0.0",
"fancy-log": "^1.3.3",
"gulp": "^4.0.2",
"gulp-file-include": "^2.2.2",
"gulp-header": "^2.0.9",
"gulp-jsbeautifier": "^2.1.2",
"gulp-jshint": "^2.1.0",
"gulp-json-editor": "^2.5.4",
"gulp-rename": "^1.4.0",
"gulp-replace-task": "^0.11.0",
"gulp-uglify": "^3.0.2",
"gzip-size": "^5.1.1",
"jasmine-core": "^3.6.0",
"jsdoc": "^3.6.5",
"jshint": "^2.12.0",
"jshint-stylish": "^2.2.1",
"karma": "^3.1.4",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^1.1.2",
"karma-requirejs": "^1.1.0",
"open": "^6.4.0",
"pretty-bytes": "^5.3.0",
"requirejs": "^2.3.6",
"semver": "^5.7.1",
"through2": "^2.0.5",
"yargs": "^12.0.5"
},
"directories": {
"lib": "./scrollmagic",
"doc": "./doc",
"example": "./examples"
},
"engines": {
"node": ">=0.10.x"
},
"files": [
"scrollmagic",
"LICENSE.md",
"README.md"
],
"homepage": "http://ScrollMagic.io",
"keywords": [
"scroll",
"scrolling",
"animation",
"sticky",
"pin",
"fixed",
"scrollbar",
"scrub",
"sync",
"position",
"progress",
"parallax",
"events",
"classes",
"jquery-plugin",
"ecosystem:jquery",
"scroll",
"scrolling",
"animation",
"sticky",
"pin",
"fixed",
"scrollbar",
"scrub",
"sync",
"position",
"progress",
"parallax",
"events",
"classes",
"jquery-plugin",
"ecosystem:jquery",
"scroll",
"scrolling",
"animation",
"sticky",
"pin",
"fixed",
"scrollbar",
"scrub",
"sync",
"position",
"progress",
"parallax",
"events",
"classes",
"jquery-plugin",
"ecosystem:jquery",
"scroll",
"scrolling",
"animation",
"sticky",
"pin",
"fixed",
"scrollbar",
"scrub",
"sync",
"position",
"progress",
"parallax",
"events",
"classes",
"jquery-plugin",
"ecosystem:jquery",
"scroll",
"scrolling",
"animation",
"sticky",
"pin",
"fixed",
"scrollbar",
"scrub",
"sync",
"position",
"progress",
"parallax",
"events",
"classes",
"jquery-plugin",
"ecosystem:jquery"
],
"license": "(MIT OR GPL-3.0+)",
"main": "scrollmagic/uncompressed/ScrollMagic.js",
"name": "scrollmagic",
"repository": {
"type": "git",
"url": "git://github.com/janpaepke/ScrollMagic.git"
},
"scripts": {
"start": "node ./node_modules/gulp/bin/gulp open-demo",
"test": "./node_modules/karma/bin/karma start ./dev/tests/karma.conf.js"
},
"title": "ScrollMagic",
"version": "2.0.8"
}

View File

@@ -0,0 +1,2 @@
/*! ScrollMagic v2.0.8 | (c) 2020 Jan Paepke (@janpaepke) | license & info: http://scrollmagic.io */
!function(e,n){var r;"function"==typeof define&&define.amd?define(["ScrollMagic","gsap","TweenMax","TimelineMax"],n):"object"==typeof exports?(r=require("gsap/dist/gsap")||require("gsap"),n(require("scrollmagic"),r,TweenMax||r,TimelineMax||r)):n(e.ScrollMagic||e.jQuery&&e.jQuery.ScrollMagic,e.gsap,e.gsap||e.TweenMax||e.TweenLite,e.gsap||e.TimelineMax||e.TimelineLite)}(this,function(e,n,p,u){"use strict";var g=n&&3<=parseFloat(n.version);e.Scene.addOption("tweenChanges",!1,function(e){return!!e}),e.Scene.extend(function(){var o,i=this;i.on("progress.plugin_gsap",function(){s()}),i.on("destroy.plugin_gsap",function(e){i.removeTween(e.reset)});var s=function(){var e,n;o&&(e=i.progress(),n=i.state(),o.repeat&&-1===o.repeat()?"DURING"===n&&o.paused()?o.play():"DURING"===n||o.paused()||o.pause():e!=o.progress()&&(0===i.duration()?0<e?o.play():o.reverse():i.tweenChanges()&&o.tweenTo?o.tweenTo(e*o.duration()):o.progress(e).pause()))};i.setTween=function(e,n,r){var t,a;1<arguments.length&&(a="number"==typeof arguments[1],g?(a||(r=n),r.hasOwnProperty("duration")||(r.duration=a?n:1)):arguments.length<3&&(r=n,n=1),e=g?p.to(e,r):p.to(e,n,r));try{(t=u&&!g?new u({smoothChildTiming:!0}).add(e):e).pause()}catch(e){return i}return o&&i.removeTween(),o=t,e.repeat&&-1===e.repeat()&&(o.repeat(-1),o.yoyo(e.yoyo())),s(),i},i.removeTween=function(e){return o&&(e&&o.progress(0).pause(),o.kill(),o=void 0),i}})});

View File

@@ -0,0 +1,2 @@
/*! ScrollMagic v2.0.8 | (c) 2020 Jan Paepke (@janpaepke) | license & info: http://scrollmagic.io */
!function(e,i){"function"==typeof define&&define.amd?define(["ScrollMagic","velocity"],i):"object"==typeof exports?i(require("scrollmagic"),require("velocity")):i(e.ScrollMagic||e.jQuery&&e.jQuery.ScrollMagic,e.Velocity||e.jQuery&&e.jQuery.Velocity)}(this,function(e,y){"use strict";var v=0;e.Scene.extend(function(){var o,r,u,n,c=this,l=e._util,i=0;c.on("progress.plugin_velocity",function(){f()}),c.on("destroy.plugin_velocity",function(e){c.off("*.plugin_velocity"),c.removeVelocity(e.reset)});var s=function(e,i,t){l.type.Array(e)?e.forEach(function(e){s(e,i,t)}):(y.Utilities.data(e,n)||y.Utilities.data(e,n,{reverseProps:l.css(e,Object.keys(r))}),y(e,i,t),void 0!==t.queue&&y.Utilities.dequeue(e,t.queue))},a=function(e,i){var t;l.type.Array(e)?e.forEach(function(e){a(e,i)}):(t=y.Utilities.data(e,n))&&t.reverseProps&&(y(e,t.reverseProps,i),void 0!==i.queue&&y.Utilities.dequeue(e,i.queue))},f=function(){var e;!o||(e=c.progress())!=i&&(0===c.duration()&&(0<e?s(o,r,u):a(o,u)),i=e)};c.setVelocity=function(e,i,t){return o&&c.removeVelocity(),o=l.get.elements(e),r=i||{},n="ScrollMagic.animation.velocity["+v+++"]",void 0!==(u=t||{}).queue&&(u.queue=n+"_queue"),f(),c},c.removeVelocity=function(e){return o&&(void 0!==u.queue&&y(o,"stop",u.queue),e&&a(o,{duration:0}),o.forEach(function(e){y.Utilities.removeData(e,n)}),o=r=u=n=void 0),c}})});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
/*! ScrollMagic v2.0.8 | (c) 2020 Jan Paepke (@janpaepke) | license & info: http://scrollmagic.io */
!function(e,i){"function"==typeof define&&define.amd?define(["ScrollMagic","jquery"],i):"object"==typeof exports?i(require("scrollmagic"),require("jquery")):i(e.ScrollMagic,e.jQuery)}(this,function(e,t){"use strict";e._util.get.elements=function(e){return t(e).toArray()},e._util.addClass=function(e,i){t(e).addClass(i)},e._util.removeClass=function(e,i){t(e).removeClass(i)},t.ScrollMagic=e});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,333 @@
/*!
* ScrollMagic v2.0.8 (2020-08-14)
* The javascript library for magical scroll interactions.
* (c) 2020 Jan Paepke (@janpaepke)
* Project Website: http://scrollmagic.io
*
* @version 2.0.8
* @license Dual licensed under MIT license and GPL.
* @author Jan Paepke - e-mail@janpaepke.de
*
* @file ScrollMagic GSAP Animation Plugin.
*
* requires: GSAP ~1.14
* Powered by the Greensock Animation Platform (GSAP): http://www.greensock.com/js
* Greensock License info at http://www.greensock.com/licensing/
*/
/**
* This plugin is meant to be used in conjunction with the Greensock Animation Plattform.
* It offers an easy API to trigger Tweens or synchronize them to the scrollbar movement.
*
* Both the `lite` and the `max` versions of the GSAP library are supported.
* The most basic requirement is `TweenLite`.
*
* To have access to this extension, please include `plugins/animation.gsap.js`.
* @requires {@link http://greensock.com/gsap|GSAP ~1.14.x}
* @mixin animation.GSAP
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ScrollMagic', 'gsap', 'TweenMax', 'TimelineMax'], factory);
} else if (typeof exports === 'object') {
// CommonJS
// Loads whole gsap package onto global scope.
var gsap = require("gsap/dist/gsap") || require("gsap");
// TweenMax/TimelineMax will be global in v2. In v3, they will be on the gsap object
factory(require('scrollmagic'), gsap, TweenMax || gsap, TimelineMax || gsap);
} else {
// Browser globals
factory(root.ScrollMagic || (root.jQuery && root.jQuery.ScrollMagic), root.gsap, root.gsap || root.TweenMax || root.TweenLite, root.gsap || root.TimelineMax || root.TimelineLite);
}
}(this, function (ScrollMagic, Gsap, Tween, Timeline) {
"use strict";
var NAMESPACE = "animation.gsap";
var GSAP3_OR_GREATER = Gsap && parseFloat(Gsap.version) >= 3;
var
console = window.console || {},
err = Function.prototype.bind.call(console.error || console.log || function () {}, console);
if (!ScrollMagic) {
err("(" + NAMESPACE + ") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs.");
}
if (!Tween) {
err("(" + NAMESPACE + ") -> ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs.");
}
/*
* ----------------------------------------------------------------
* Extensions for Scene
* ----------------------------------------------------------------
*/
/**
* Every instance of ScrollMagic.Scene now accepts an additional option.
* See {@link ScrollMagic.Scene} for a complete list of the standard options.
* @memberof! animation.GSAP#
* @method new ScrollMagic.Scene(options)
* @example
* var scene = new ScrollMagic.Scene({tweenChanges: true});
*
* @param {object} [options] - Options for the Scene. The options can be updated at any time.
* @param {boolean} [options.tweenChanges=false] - Tweens Animation to the progress target instead of setting it.
Does not affect animations where duration is `0`.
*/
/**
* **Get** or **Set** the tweenChanges option value.
* This only affects scenes with a duration. If `tweenChanges` is `true`, the progress update when scrolling will not be immediate, but instead the animation will smoothly animate to the target state.
* For a better understanding, try enabling and disabling this option in the [Scene Manipulation Example](../examples/basic/scene_manipulation.html).
* @memberof! animation.GSAP#
* @method Scene.tweenChanges
*
* @example
* // get the current tweenChanges option
* var tweenChanges = scene.tweenChanges();
*
* // set new tweenChanges option
* scene.tweenChanges(true);
*
* @fires {@link Scene.change}, when used as setter
* @param {boolean} [newTweenChanges] - The new tweenChanges setting of the scene.
* @returns {boolean} `get` - Current tweenChanges option value.
* @returns {Scene} `set` - Parent object for chaining.
*/
// add option (TODO: DOC (private for dev))
ScrollMagic.Scene.addOption(
"tweenChanges", // name
false, // default
function (val) { // validation callback
return !!val;
}
);
// extend scene
ScrollMagic.Scene.extend(function () {
var Scene = this,
_tween;
var log = function () {
if (Scene._log) { // not available, when main source minified
Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->");
Scene._log.apply(this, arguments);
}
};
// set listeners
Scene.on("progress.plugin_gsap", function () {
updateTweenProgress();
});
Scene.on("destroy.plugin_gsap", function (e) {
Scene.removeTween(e.reset);
});
/**
* Update the tween progress to current position.
* @private
*/
var updateTweenProgress = function () {
if (_tween) {
var
progress = Scene.progress(),
state = Scene.state();
if (_tween.repeat && _tween.repeat() === -1) {
// infinite loop, so not in relation to progress
if (state === 'DURING' && _tween.paused()) {
_tween.play();
} else if (state !== 'DURING' && !_tween.paused()) {
_tween.pause();
}
} else if (progress != _tween.progress()) { // do we even need to update the progress?
// no infinite loop - so should we just play or go to a specific point in time?
if (Scene.duration() === 0) {
// play the animation
if (progress > 0) { // play from 0 to 1
_tween.play();
} else { // play from 1 to 0
_tween.reverse();
}
} else {
// go to a specific point in time
if (Scene.tweenChanges() && _tween.tweenTo) {
// go smooth
_tween.tweenTo(progress * _tween.duration());
} else {
// just hard set it
_tween.progress(progress).pause();
}
}
}
}
};
/**
* Add a tween to the scene.
* If you want to add multiple tweens, add them into a GSAP Timeline object and supply it instead (see example below).
*
* If the scene has a duration, the tween's duration will be projected to the scroll distance of the scene, meaning its progress will be synced to scrollbar movement.
* For a scene with a duration of `0`, the tween will be triggered when scrolling forward past the scene's trigger position and reversed, when scrolling back.
* To gain better understanding, check out the [Simple Tweening example](../examples/basic/simple_tweening.html).
*
* Instead of supplying a tween this method can also be used as a shorthand for `TweenMax.to()` (see example below).
* @memberof! animation.GSAP#
*
* @example
* // add a single tween directly
* scene.setTween(TweenMax.to("obj"), 1, {x: 100});
*
* // add a single tween via variable
* var tween = TweenMax.to("obj"), 1, {x: 100};
* scene.setTween(tween);
*
* // add multiple tweens, wrapped in a timeline.
* var timeline = new TimelineMax();
* var tween1 = TweenMax.from("obj1", 1, {x: 100});
* var tween2 = TweenMax.to("obj2", 1, {y: 100});
* timeline
* .add(tween1)
* .add(tween2);
* scene.addTween(timeline);
*
* // short hand to add a TweenMax.to() tween
* scene.setTween("obj3", 0.5, {y: 100});
*
* // short hand to add a TweenMax.to() tween for 1 second
* // this is useful, when the scene has a duration and the tween duration isn't important anyway
* scene.setTween("obj3", {y: 100});
*
* @param {(object|string)} TweenObject - A TweenMax, TweenLite, TimelineMax or TimelineLite object that should be animated in the scene. Can also be a Dom Element or Selector, when using direct tween definition (see examples).
* @param {(number|object)} duration - A duration for the tween, or tween parameters. If an object containing parameters are supplied, a default duration of 1 will be used.
* @param {object} params - The parameters for the tween
* @returns {Scene} Parent object for chaining.
*/
Scene.setTween = function (TweenObject, duration, params) {
var newTween;
if (arguments.length > 1) {
var durationIsSet = typeof arguments['1'] === 'number';
if (GSAP3_OR_GREATER) {
// If we're using gsap 3 with proper gsap 3 syntax of 2 arguments
if (!durationIsSet) {
params = duration;
}
// Add a duration is there isn't one
if (!params.hasOwnProperty('duration')) {
params.duration = durationIsSet ? duration : 1;
}
} else {
// If we're using gsap 2 or earlier syntax
if (arguments.length < 3) {
params = duration;
duration = 1;
}
}
// 2 arguments should be gsap 3 syntax, and 3 arguments for
TweenObject = GSAP3_OR_GREATER ? Tween.to(TweenObject, params) : Tween.to(TweenObject, duration, params);
}
try {
// wrap Tween into a Timeline Object if not gsap 3 or greater and available to include delay and repeats in the duration and standardize methods.
if (Timeline && !GSAP3_OR_GREATER) {
newTween = new Timeline({
smoothChildTiming: true
})
.add(TweenObject);
} else {
newTween = TweenObject;
}
newTween.pause();
} catch (e) {
log(1, "ERROR calling method 'setTween()': Supplied argument is not a valid TweenObject");
return Scene;
}
if (_tween) { // kill old tween?
Scene.removeTween();
}
_tween = newTween;
// some properties need to be transferred it to the wrapper, otherwise they would get lost.
if (TweenObject.repeat && TweenObject.repeat() === -1) { // TweenMax or TimelineMax Object?
_tween.repeat(-1);
_tween.yoyo(TweenObject.yoyo());
}
// Some tween validations and debugging helpers
if (Scene.tweenChanges() && !_tween.tweenTo) {
log(2, "WARNING: tweenChanges will only work if the TimelineMax object is available for ScrollMagic.");
}
// check if there are position tweens defined for the trigger and warn about it :)
if (_tween && Scene.controller() && Scene.triggerElement() && Scene.loglevel() >= 2) { // controller is needed to know scroll direction.
var
triggerTweens = Tween.getTweensOf(Scene.triggerElement()),
vertical = Scene.controller().info("vertical");
triggerTweens.forEach(function (value, index) {
var
tweenvars = value.vars.css || value.vars,
condition = vertical ? (tweenvars.top !== undefined || tweenvars.bottom !== undefined) : (tweenvars.left !== undefined || tweenvars.right !== undefined);
if (condition) {
log(2, "WARNING: Tweening the position of the trigger element affects the scene timing and should be avoided!");
return false;
}
});
}
// warn about tween overwrites, when an element is tweened multiple times
if (parseFloat(TweenLite.version) >= 1.14) { // onOverwrite only present since GSAP v1.14.0
var
// However, onInterrupt deprecated onOverwrite in GSAP v3
methodUsed = GSAP3_OR_GREATER ? 'onInterrupt' : 'onOverwrite',
list = _tween.getChildren ? _tween.getChildren(true, true, false) : [_tween], // get all nested tween objects
newCallback = function () {
log(2, "WARNING: tween was overwritten by another. To learn how to avoid this issue see here: https://github.com/janpaepke/ScrollMagic/wiki/WARNING:-tween-was-overwritten-by-another");
};
for (var i = 0, thisTween, oldCallback; i < list.length; i++) {
/*jshint loopfunc: true */
thisTween = list[i];
if (oldCallback !== newCallback) { // if tweens is added more than once
oldCallback = thisTween.vars[methodUsed];
thisTween.vars[methodUsed] = function () {
if (oldCallback) {
oldCallback.apply(this, arguments);
}
newCallback.apply(this, arguments);
};
}
}
}
log(3, "added tween");
updateTweenProgress();
return Scene;
};
/**
* Remove the tween from the scene.
* This will terminate the control of the Scene over the tween.
*
* Using the reset option you can decide if the tween should remain in the current state or be rewound to set the target elements back to the state they were in before the tween was added to the scene.
* @memberof! animation.GSAP#
*
* @example
* // remove the tween from the scene without resetting it
* scene.removeTween();
*
* // remove the tween from the scene and reset it to initial position
* scene.removeTween(true);
*
* @param {boolean} [reset=false] - If `true` the tween will be reset to its initial values.
* @returns {Scene} Parent object for chaining.
*/
Scene.removeTween = function (reset) {
if (_tween) {
if (reset) {
_tween.progress(0).pause();
}
_tween.kill();
_tween = undefined;
log(3, "removed tween (reset: " + (reset ? "true" : "false") + ")");
}
return Scene;
};
});
}));

View File

@@ -0,0 +1,228 @@
/*!
* ScrollMagic v2.0.8 (2020-08-14)
* The javascript library for magical scroll interactions.
* (c) 2020 Jan Paepke (@janpaepke)
* Project Website: http://scrollmagic.io
*
* @version 2.0.8
* @license Dual licensed under MIT license and GPL.
* @author Jan Paepke - e-mail@janpaepke.de
*
* @file ScrollMagic Velocity Animation Plugin.
*
* requires: velocity ~1.2
* Powered by VelocityJS: http://VelocityJS.org
* Velocity is published under MIT license.
*/
/**
* This plugin is meant to be used in conjunction with the Velocity animation framework.
* It offers an easy API to __trigger__ Velocity animations.
*
* With the current version of Velocity scrollbound animations (scenes with duration) are not supported.
* This feature will be added as soon as Velocity provides the appropriate API.
*
* To have access to this extension, please include `plugins/animation.velocity.js`.
* @requires {@link http://julian.com/research/velocity/|Velocity ~1.2.0}
* @mixin animation.Velocity
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ScrollMagic', 'velocity'], factory);
} else if (typeof exports === 'object') {
// CommonJS
factory(require('scrollmagic'), require('velocity'));
} else {
// Browser globals
factory(root.ScrollMagic || (root.jQuery && root.jQuery.ScrollMagic), root.Velocity || (root.jQuery && root.jQuery.Velocity));
}
}(this, function (ScrollMagic, velocity) {
"use strict";
var NAMESPACE = "animation.velocity";
var
console = window.console || {},
err = Function.prototype.bind.call(console.error || console.log || function () {}, console);
if (!ScrollMagic) {
err("(" + NAMESPACE + ") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs.");
}
if (!velocity) {
err("(" + NAMESPACE + ") -> ERROR: Velocity could not be found. Please make sure it's loaded before ScrollMagic or use an asynchronous loader like requirejs.");
}
var autoindex = 0;
ScrollMagic.Scene.extend(function () {
var
Scene = this,
_util = ScrollMagic._util,
_currentProgress = 0,
_elems,
_properties,
_options,
_dataID; // used to identify element data related to this scene, will be defined everytime a new velocity animation is added
var log = function () {
if (Scene._log) { // not available, when main source minified
Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->");
Scene._log.apply(this, arguments);
}
};
// set listeners
Scene.on("progress.plugin_velocity", function () {
updateAnimationProgress();
});
Scene.on("destroy.plugin_velocity", function (e) {
Scene.off("*.plugin_velocity");
Scene.removeVelocity(e.reset);
});
var animate = function (elem, properties, options) {
if (_util.type.Array(elem)) {
elem.forEach(function (elem) {
animate(elem, properties, options);
});
} else {
// set reverse values
if (!velocity.Utilities.data(elem, _dataID)) {
velocity.Utilities.data(elem, _dataID, {
reverseProps: _util.css(elem, Object.keys(_properties))
});
}
// animate
velocity(elem, properties, options);
if (options.queue !== undefined) {
velocity.Utilities.dequeue(elem, options.queue);
}
}
};
var reverse = function (elem, options) {
if (_util.type.Array(elem)) {
elem.forEach(function (elem) {
reverse(elem, options);
});
} else {
var data = velocity.Utilities.data(elem, _dataID);
if (data && data.reverseProps) {
velocity(elem, data.reverseProps, options);
if (options.queue !== undefined) {
velocity.Utilities.dequeue(elem, options.queue);
}
}
}
};
/**
* Update the tween progress to current position.
* @private
*/
var updateAnimationProgress = function () {
if (_elems) {
var progress = Scene.progress();
if (progress != _currentProgress) { // do we even need to update the progress?
if (Scene.duration() === 0) {
// play the animation
if (progress > 0) { // play forward
animate(_elems, _properties, _options);
} else { // play reverse
reverse(_elems, _options);
// velocity(_elems, _propertiesReverse, _options);
// velocity("reverse");
}
} else {
// TODO: Scrollbound animations not supported yet...
}
_currentProgress = progress;
}
}
};
/**
* Add a Velocity animation to the scene.
* The method accepts the same parameters as Velocity, with the first parameter being the target element.
*
* To gain better understanding, check out the [Velocity example](../examples/basic/simple_velocity.html).
* @memberof! animation.Velocity#
*
* @example
* // trigger a Velocity animation
* scene.setVelocity("#myElement", {opacity: 0.5}, {duration: 1000, easing: "linear"});
*
* @param {(object|string)} elems - One or more Dom Elements or a Selector that should be used as the target of the animation.
* @param {object} properties - The CSS properties that should be animated.
* @param {object} options - Options for the animation, like duration or easing.
* @returns {Scene} Parent object for chaining.
*/
Scene.setVelocity = function (elems, properties, options) {
if (_elems) { // kill old ani?
Scene.removeVelocity();
}
_elems = _util.get.elements(elems);
_properties = properties || {};
_options = options || {};
_dataID = "ScrollMagic." + NAMESPACE + "[" + (autoindex++) + "]";
if (_options.queue !== undefined) {
// we'll use the queue to identify the animation. When defined it will always stop the previously running one.
// if undefined the animation will always fully run, as is expected.
// defining anything other than 'false' as the que doesn't make much sense, because ScrollMagic takes control over the trigger.
// thus it is also overwritten.
_options.queue = _dataID + "_queue";
}
var checkDuration = function () {
if (Scene.duration() !== 0) {
log(1, "ERROR: The Velocity animation plugin does not support scrollbound animations (scenes with duration) yet.");
}
};
Scene.on("change.plugin_velocity", function (e) {
if (e.what == 'duration') {
checkDuration();
}
});
checkDuration();
log(3, "added animation");
updateAnimationProgress();
return Scene;
};
/**
* Remove the animation from the scene.
* This will stop the scene from triggering the animation.
*
* Using the reset option you can decide if the animation should remain in the current state or be rewound to set the target elements back to the state they were in before the animation was added to the scene.
* @memberof! animation.Velocity#
*
* @example
* // remove the animation from the scene without resetting it
* scene.removeVelocity();
*
* // remove the animation from the scene and reset the elements to initial state
* scene.removeVelocity(true);
*
* @param {boolean} [reset=false] - If `true` the animation will rewound.
* @returns {Scene} Parent object for chaining.
*/
Scene.removeVelocity = function (reset) {
if (_elems) {
// stop running animations
if (_options.queue !== undefined) {
velocity(_elems, "stop", _options.queue);
}
if (reset) {
reverse(_elems, {
duration: 0
});
}
_elems.forEach(function (elem) {
velocity.Utilities.removeData(elem, _dataID);
});
_elems = _properties = _options = _dataID = undefined;
}
return Scene;
};
});
}));

View File

@@ -0,0 +1,680 @@
/*!
* ScrollMagic v2.0.8 (2020-08-14)
* The javascript library for magical scroll interactions.
* (c) 2020 Jan Paepke (@janpaepke)
* Project Website: http://scrollmagic.io
*
* @version 2.0.8
* @license Dual licensed under MIT license and GPL.
* @author Jan Paepke - e-mail@janpaepke.de
*
* @file Debug Extension for ScrollMagic.
*/
/**
* This plugin was formerly known as the ScrollMagic debug extension.
*
* It enables you to add visual indicators to your page, to be able to see exactly when a scene is triggered.
*
* To have access to this extension, please include `plugins/debug.addIndicators.js`.
* @mixin debug.addIndicators
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ScrollMagic'], factory);
} else if (typeof exports === 'object') {
// CommonJS
factory(require('scrollmagic'));
} else {
// no browser global export needed, just execute
factory(root.ScrollMagic || (root.jQuery && root.jQuery.ScrollMagic));
}
}(this, function (ScrollMagic) {
"use strict";
var NAMESPACE = "debug.addIndicators";
var
console = window.console || {},
err = Function.prototype.bind.call(console.error || console.log || function () {}, console);
if (!ScrollMagic) {
err("(" + NAMESPACE + ") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs.");
}
// plugin settings
var
FONT_SIZE = "0.85em",
ZINDEX = "9999",
EDGE_OFFSET = 15; // minimum edge distance, added to indentation
// overall vars
var
_util = ScrollMagic._util,
_autoindex = 0;
ScrollMagic.Scene.extend(function () {
var
Scene = this,
_indicator;
var log = function () {
if (Scene._log) { // not available, when main source minified
Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->");
Scene._log.apply(this, arguments);
}
};
/**
* Add visual indicators for a ScrollMagic.Scene.
* @memberof! debug.addIndicators#
*
* @example
* // add basic indicators
* scene.addIndicators()
*
* // passing options
* scene.addIndicators({name: "pin scene", colorEnd: "#FFFFFF"});
*
* @param {object} [options] - An object containing one or more options for the indicators.
* @param {(string|object)} [options.parent] - A selector, DOM Object or a jQuery object that the indicators should be added to.
If undefined, the controller's container will be used.
* @param {number} [options.name=""] - This string will be displayed at the start and end indicators of the scene for identification purposes. If no name is supplied an automatic index will be used.
* @param {number} [options.indent=0] - Additional position offset for the indicators (useful, when having multiple scenes starting at the same position).
* @param {string} [options.colorStart=green] - CSS color definition for the start indicator.
* @param {string} [options.colorEnd=red] - CSS color definition for the end indicator.
* @param {string} [options.colorTrigger=blue] - CSS color definition for the trigger indicator.
*/
Scene.addIndicators = function (options) {
if (!_indicator) {
var
DEFAULT_OPTIONS = {
name: "",
indent: 0,
parent: undefined,
colorStart: "green",
colorEnd: "red",
colorTrigger: "blue",
};
options = _util.extend({}, DEFAULT_OPTIONS, options);
_autoindex++;
_indicator = new Indicator(Scene, options);
Scene.on("add.plugin_addIndicators", _indicator.add);
Scene.on("remove.plugin_addIndicators", _indicator.remove);
Scene.on("destroy.plugin_addIndicators", Scene.removeIndicators);
// it the scene already has a controller we can start right away.
if (Scene.controller()) {
_indicator.add();
}
}
return Scene;
};
/**
* Removes visual indicators from a ScrollMagic.Scene.
* @memberof! debug.addIndicators#
*
* @example
* // remove previously added indicators
* scene.removeIndicators()
*
*/
Scene.removeIndicators = function () {
if (_indicator) {
_indicator.remove();
this.off("*.plugin_addIndicators");
_indicator = undefined;
}
return Scene;
};
});
/*
* ----------------------------------------------------------------
* Extension for controller to store and update related indicators
* ----------------------------------------------------------------
*/
// add option to globally auto-add indicators to scenes
/**
* Every ScrollMagic.Controller instance now accepts an additional option.
* See {@link ScrollMagic.Controller} for a complete list of the standard options.
* @memberof! debug.addIndicators#
* @method new ScrollMagic.Controller(options)
* @example
* // make a controller and add indicators to all scenes attached
* var controller = new ScrollMagic.Controller({addIndicators: true});
* // this scene will automatically have indicators added to it
* new ScrollMagic.Scene()
* .addTo(controller);
*
* @param {object} [options] - Options for the Controller.
* @param {boolean} [options.addIndicators=false] - If set to `true` every scene that is added to the controller will automatically get indicators added to it.
*/
ScrollMagic.Controller.addOption("addIndicators", false);
// extend Controller
ScrollMagic.Controller.extend(function () {
var
Controller = this,
_info = Controller.info(),
_container = _info.container,
_isDocument = _info.isDocument,
_vertical = _info.vertical,
_indicators = { // container for all indicators and methods
groups: []
};
var log = function () {
if (Controller._log) { // not available, when main source minified
Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->");
Controller._log.apply(this, arguments);
}
};
if (Controller._indicators) {
log(2, "WARNING: Scene already has a property '_indicators', which will be overwritten by plugin.");
}
// add indicators container
this._indicators = _indicators;
/*
needed updates:
+++++++++++++++
start/end position on scene shift (handled in Indicator class)
trigger parameters on triggerHook value change (handled in Indicator class)
bounds position on container scroll or resize (to keep alignment to bottom/right)
trigger position on container resize, window resize (if container isn't document) and window scroll (if container isn't document)
*/
// event handler for when associated bounds markers need to be repositioned
var handleBoundsPositionChange = function () {
_indicators.updateBoundsPositions();
};
// event handler for when associated trigger groups need to be repositioned
var handleTriggerPositionChange = function () {
_indicators.updateTriggerGroupPositions();
};
_container.addEventListener("resize", handleTriggerPositionChange);
if (!_isDocument) {
window.addEventListener("resize", handleTriggerPositionChange);
window.addEventListener("scroll", handleTriggerPositionChange);
}
// update all related bounds containers
_container.addEventListener("resize", handleBoundsPositionChange);
_container.addEventListener("scroll", handleBoundsPositionChange);
// updates the position of the bounds container to aligned to the right for vertical containers and to the bottom for horizontal
this._indicators.updateBoundsPositions = function (specificIndicator) {
var // constant for all bounds
groups = specificIndicator ? [_util.extend({}, specificIndicator.triggerGroup, {
members: [specificIndicator]
})] : // create a group with only one element
_indicators.groups, // use all
g = groups.length,
css = {},
paramPos = _vertical ? "left" : "top",
paramDimension = _vertical ? "width" : "height",
edge = _vertical ?
_util.get.scrollLeft(_container) + _util.get.width(_container) - EDGE_OFFSET :
_util.get.scrollTop(_container) + _util.get.height(_container) - EDGE_OFFSET,
b, triggerSize, group;
while (g--) { // group loop
group = groups[g];
b = group.members.length;
triggerSize = _util.get[paramDimension](group.element.firstChild);
while (b--) { // indicators loop
css[paramPos] = edge - triggerSize;
_util.css(group.members[b].bounds, css);
}
}
};
// updates the positions of all trigger groups attached to a controller or a specific one, if provided
this._indicators.updateTriggerGroupPositions = function (specificGroup) {
var // constant vars
groups = specificGroup ? [specificGroup] : _indicators.groups,
i = groups.length,
container = _isDocument ? document.body : _container,
containerOffset = _isDocument ? {
top: 0,
left: 0
} : _util.get.offset(container, true),
edge = _vertical ?
_util.get.width(_container) - EDGE_OFFSET :
_util.get.height(_container) - EDGE_OFFSET,
paramDimension = _vertical ? "width" : "height",
paramTransform = _vertical ? "Y" : "X";
var // changing vars
group,
elem,
pos,
elemSize,
transform;
while (i--) {
group = groups[i];
elem = group.element;
pos = group.triggerHook * Controller.info("size");
elemSize = _util.get[paramDimension](elem.firstChild.firstChild);
transform = pos > elemSize ? "translate" + paramTransform + "(-100%)" : "";
_util.css(elem, {
top: containerOffset.top + (_vertical ? pos : edge - group.members[0].options.indent),
left: containerOffset.left + (_vertical ? edge - group.members[0].options.indent : pos)
});
_util.css(elem.firstChild.firstChild, {
"-ms-transform": transform,
"-webkit-transform": transform,
"transform": transform
});
}
};
// updates the label for the group to contain the name, if it only has one member
this._indicators.updateTriggerGroupLabel = function (group) {
var
text = "trigger" + (group.members.length > 1 ? "" : " " + group.members[0].options.name),
elem = group.element.firstChild.firstChild,
doUpdate = elem.textContent !== text;
if (doUpdate) {
elem.textContent = text;
if (_vertical) { // bounds position is dependent on text length, so update
_indicators.updateBoundsPositions();
}
}
};
// add indicators if global option is set
this.addScene = function (newScene) {
if (this._options.addIndicators && newScene instanceof ScrollMagic.Scene && newScene.controller() === Controller) {
newScene.addIndicators();
}
// call original destroy method
this.$super.addScene.apply(this, arguments);
};
// remove all previously set listeners on destroy
this.destroy = function () {
_container.removeEventListener("resize", handleTriggerPositionChange);
if (!_isDocument) {
window.removeEventListener("resize", handleTriggerPositionChange);
window.removeEventListener("scroll", handleTriggerPositionChange);
}
_container.removeEventListener("resize", handleBoundsPositionChange);
_container.removeEventListener("scroll", handleBoundsPositionChange);
// call original destroy method
this.$super.destroy.apply(this, arguments);
};
return Controller;
});
/*
* ----------------------------------------------------------------
* Internal class for the construction of Indicators
* ----------------------------------------------------------------
*/
var Indicator = function (Scene, options) {
var
Indicator = this,
_elemBounds = TPL.bounds(),
_elemStart = TPL.start(options.colorStart),
_elemEnd = TPL.end(options.colorEnd),
_boundsContainer = options.parent && _util.get.elements(options.parent)[0],
_vertical,
_ctrl;
var log = function () {
if (Scene._log) { // not available, when main source minified
Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->");
Scene._log.apply(this, arguments);
}
};
options.name = options.name || _autoindex;
// prepare bounds elements
_elemStart.firstChild.textContent += " " + options.name;
_elemEnd.textContent += " " + options.name;
_elemBounds.appendChild(_elemStart);
_elemBounds.appendChild(_elemEnd);
// set public variables
Indicator.options = options;
Indicator.bounds = _elemBounds;
// will be set later
Indicator.triggerGroup = undefined;
// add indicators to DOM
this.add = function () {
_ctrl = Scene.controller();
_vertical = _ctrl.info("vertical");
var isDocument = _ctrl.info("isDocument");
if (!_boundsContainer) {
// no parent supplied or doesnt exist
_boundsContainer = isDocument ? document.body : _ctrl.info("container"); // check if window/document (then use body)
}
if (!isDocument && _util.css(_boundsContainer, "position") === 'static') {
// position mode needed for correct positioning of indicators
_util.css(_boundsContainer, {
position: "relative"
});
}
// add listeners for updates
Scene.on("change.plugin_addIndicators", handleTriggerParamsChange);
Scene.on("shift.plugin_addIndicators", handleBoundsParamsChange);
// updates trigger & bounds (will add elements if needed)
updateTriggerGroup();
updateBounds();
setTimeout(function () { // do after all execution is finished otherwise sometimes size calculations are off
_ctrl._indicators.updateBoundsPositions(Indicator);
}, 0);
log(3, "added indicators");
};
// remove indicators from DOM
this.remove = function () {
if (Indicator.triggerGroup) { // if not set there's nothing to remove
Scene.off("change.plugin_addIndicators", handleTriggerParamsChange);
Scene.off("shift.plugin_addIndicators", handleBoundsParamsChange);
if (Indicator.triggerGroup.members.length > 1) {
// just remove from memberlist of old group
var group = Indicator.triggerGroup;
group.members.splice(group.members.indexOf(Indicator), 1);
_ctrl._indicators.updateTriggerGroupLabel(group);
_ctrl._indicators.updateTriggerGroupPositions(group);
Indicator.triggerGroup = undefined;
} else {
// remove complete group
removeTriggerGroup();
}
removeBounds();
log(3, "removed indicators");
}
};
/*
* ----------------------------------------------------------------
* internal Event Handlers
* ----------------------------------------------------------------
*/
// event handler for when bounds params change
var handleBoundsParamsChange = function () {
updateBounds();
};
// event handler for when trigger params change
var handleTriggerParamsChange = function (e) {
if (e.what === "triggerHook") {
updateTriggerGroup();
}
};
/*
* ----------------------------------------------------------------
* Bounds (start / stop) management
* ----------------------------------------------------------------
*/
// adds an new bounds elements to the array and to the DOM
var addBounds = function () {
var v = _ctrl.info("vertical");
// apply stuff we didn't know before...
_util.css(_elemStart.firstChild, {
"border-bottom-width": v ? 1 : 0,
"border-right-width": v ? 0 : 1,
"bottom": v ? -1 : options.indent,
"right": v ? options.indent : -1,
"padding": v ? "0 8px" : "2px 4px",
});
_util.css(_elemEnd, {
"border-top-width": v ? 1 : 0,
"border-left-width": v ? 0 : 1,
"top": v ? "100%" : "",
"right": v ? options.indent : "",
"bottom": v ? "" : options.indent,
"left": v ? "" : "100%",
"padding": v ? "0 8px" : "2px 4px"
});
// append
_boundsContainer.appendChild(_elemBounds);
};
// remove bounds from list and DOM
var removeBounds = function () {
_elemBounds.parentNode.removeChild(_elemBounds);
};
// update the start and end positions of the scene
var updateBounds = function () {
if (_elemBounds.parentNode !== _boundsContainer) {
addBounds(); // Add Bounds elements (start/end)
}
var css = {};
css[_vertical ? "top" : "left"] = Scene.triggerPosition();
css[_vertical ? "height" : "width"] = Scene.duration();
_util.css(_elemBounds, css);
_util.css(_elemEnd, {
display: Scene.duration() > 0 ? "" : "none"
});
};
/*
* ----------------------------------------------------------------
* trigger and trigger group management
* ----------------------------------------------------------------
*/
// adds an new trigger group to the array and to the DOM
var addTriggerGroup = function () {
var triggerElem = TPL.trigger(options.colorTrigger); // new trigger element
var css = {};
css[_vertical ? "right" : "bottom"] = 0;
css[_vertical ? "border-top-width" : "border-left-width"] = 1;
_util.css(triggerElem.firstChild, css);
_util.css(triggerElem.firstChild.firstChild, {
padding: _vertical ? "0 8px 3px 8px" : "3px 4px"
});
document.body.appendChild(triggerElem); // directly add to body
var newGroup = {
triggerHook: Scene.triggerHook(),
element: triggerElem,
members: [Indicator]
};
_ctrl._indicators.groups.push(newGroup);
Indicator.triggerGroup = newGroup;
// update right away
_ctrl._indicators.updateTriggerGroupLabel(newGroup);
_ctrl._indicators.updateTriggerGroupPositions(newGroup);
};
var removeTriggerGroup = function () {
_ctrl._indicators.groups.splice(_ctrl._indicators.groups.indexOf(Indicator.triggerGroup), 1);
Indicator.triggerGroup.element.parentNode.removeChild(Indicator.triggerGroup.element);
Indicator.triggerGroup = undefined;
};
// updates the trigger group -> either join existing or add new one
/*
* Logic:
* 1 if a trigger group exist, check if it's in sync with Scene settings if so, nothing else needs to happen
* 2 try to find an existing one that matches Scene parameters
* 2.1 If a match is found check if already assigned to an existing group
* If so:
* A: it was the last member of existing group -> kill whole group
* B: the existing group has other members -> just remove from member list
* 2.2 Assign to matching group
* 3 if no new match could be found, check if assigned to existing group
* A: yes, and it's the only member -> just update parameters and positions and keep using this group
* B: yes but there are other members -> remove from member list and create a new one
* C: no, so create a new one
*/
var updateTriggerGroup = function () {
var
triggerHook = Scene.triggerHook(),
closeEnough = 0.0001;
// Have a group, check if it still matches
if (Indicator.triggerGroup) {
if (Math.abs(Indicator.triggerGroup.triggerHook - triggerHook) < closeEnough) {
// _util.log(0, "trigger", options.name, "->", "no need to change, still in sync");
return; // all good
}
}
// Don't have a group, check if a matching one exists
// _util.log(0, "trigger", options.name, "->", "out of sync!");
var
groups = _ctrl._indicators.groups,
group,
i = groups.length;
while (i--) {
group = groups[i];
if (Math.abs(group.triggerHook - triggerHook) < closeEnough) {
// found a match!
// _util.log(0, "trigger", options.name, "->", "found match");
if (Indicator.triggerGroup) { // do I have an old group that is out of sync?
if (Indicator.triggerGroup.members.length === 1) { // is it the only remaining group?
// _util.log(0, "trigger", options.name, "->", "kill");
// was the last member, remove the whole group
removeTriggerGroup();
} else {
Indicator.triggerGroup.members.splice(Indicator.triggerGroup.members.indexOf(Indicator), 1); // just remove from memberlist of old group
_ctrl._indicators.updateTriggerGroupLabel(Indicator.triggerGroup);
_ctrl._indicators.updateTriggerGroupPositions(Indicator.triggerGroup);
// _util.log(0, "trigger", options.name, "->", "removing from previous member list");
}
}
// join new group
group.members.push(Indicator);
Indicator.triggerGroup = group;
_ctrl._indicators.updateTriggerGroupLabel(group);
return;
}
}
// at this point I am obviously out of sync and don't match any other group
if (Indicator.triggerGroup) {
if (Indicator.triggerGroup.members.length === 1) {
// _util.log(0, "trigger", options.name, "->", "updating existing");
// out of sync but i'm the only member => just change and update
Indicator.triggerGroup.triggerHook = triggerHook;
_ctrl._indicators.updateTriggerGroupPositions(Indicator.triggerGroup);
return;
} else {
// _util.log(0, "trigger", options.name, "->", "removing from previous member list");
Indicator.triggerGroup.members.splice(Indicator.triggerGroup.members.indexOf(Indicator), 1); // just remove from memberlist of old group
_ctrl._indicators.updateTriggerGroupLabel(Indicator.triggerGroup);
_ctrl._indicators.updateTriggerGroupPositions(Indicator.triggerGroup);
Indicator.triggerGroup = undefined; // need a brand new group...
}
}
// _util.log(0, "trigger", options.name, "->", "add a new one");
// did not find any match, make new trigger group
addTriggerGroup();
};
};
/*
* ----------------------------------------------------------------
* Templates for the indicators
* ----------------------------------------------------------------
*/
var TPL = {
start: function (color) {
// inner element (for bottom offset -1, while keeping top position 0)
var inner = document.createElement("div");
inner.textContent = "start";
_util.css(inner, {
position: "absolute",
overflow: "visible",
"border-width": 0,
"border-style": "solid",
color: color,
"border-color": color
});
var e = document.createElement('div');
// wrapper
_util.css(e, {
position: "absolute",
overflow: "visible",
width: 0,
height: 0
});
e.appendChild(inner);
return e;
},
end: function (color) {
var e = document.createElement('div');
e.textContent = "end";
_util.css(e, {
position: "absolute",
overflow: "visible",
"border-width": 0,
"border-style": "solid",
color: color,
"border-color": color
});
return e;
},
bounds: function () {
var e = document.createElement('div');
_util.css(e, {
position: "absolute",
overflow: "visible",
"white-space": "nowrap",
"pointer-events": "none",
"font-size": FONT_SIZE
});
e.style.zIndex = ZINDEX;
return e;
},
trigger: function (color) {
// inner to be above or below line but keep position
var inner = document.createElement('div');
inner.textContent = "trigger";
_util.css(inner, {
position: "relative",
});
// inner wrapper for right: 0 and main element has no size
var w = document.createElement('div');
_util.css(w, {
position: "absolute",
overflow: "visible",
"border-width": 0,
"border-style": "solid",
color: color,
"border-color": color
});
w.appendChild(inner);
// wrapper
var e = document.createElement('div');
_util.css(e, {
position: "fixed",
overflow: "visible",
"white-space": "nowrap",
"pointer-events": "none",
"font-size": FONT_SIZE
});
e.style.zIndex = ZINDEX;
e.appendChild(w);
return e;
},
};
}));

View File

@@ -0,0 +1,68 @@
/*!
* ScrollMagic v2.0.8 (2020-08-14)
* The javascript library for magical scroll interactions.
* (c) 2020 Jan Paepke (@janpaepke)
* Project Website: http://scrollmagic.io
*
* @version 2.0.8
* @license Dual licensed under MIT license and GPL.
* @author Jan Paepke - e-mail@janpaepke.de
*
* @file ScrollMagic jQuery plugin.
*
* requires: jQuery >=1.11
*/
/**
* This plugin is meant to be used in conjunction with jQuery.
* It enables ScrollMagic to make use of jQuery's advanced selector engine (sizzle) for all elements supplied to ScrollMagic objects, like scroll containers or trigger elements.
* ScrollMagic also accepts jQuery elements for all methods that expect references to DOM elements. Please note, that in most cases the first element of the matched set will be used.
*
* Additionally it provides the ScrollMagic object within the jQuery namespace, so it can be accessed using `$.ScrollMagic`.
*
* In contrast to most other plugins it does not offer new API additions for ScrollMagic.
*
* To have access to this extension, please include `plugins/jquery.ScrollMagic.js`.
* @example
* // create a new scene making use of jQuery's advanced selector engine
* var scene = new $.ScrollMagic.Scene({
* triggerElement: "#parent div.trigger[attr='thisone']:not(.notthisone)"
* });
* @requires {@link http://jquery.com/|jQuery >=1.11}
* @mixin framework.jQuery
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ScrollMagic', 'jquery'], factory);
} else if (typeof exports === 'object') {
// CommonJS
factory(require('scrollmagic'), require('jquery'));
} else {
// Browser global
factory(root.ScrollMagic, root.jQuery);
}
}(this, function (ScrollMagic, $) {
"use strict";
var NAMESPACE = "jquery.ScrollMagic";
var
console = window.console || {},
err = Function.prototype.bind.call(console.error || console.log || function () {}, console);
if (!ScrollMagic) {
err("(" + NAMESPACE + ") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs.");
}
if (!$) {
err("(" + NAMESPACE + ") -> ERROR: jQuery could not be found. Please make sure it's loaded before ScrollMagic or use an asynchronous loader like requirejs.");
}
ScrollMagic._util.get.elements = function (selector) {
return $(selector).toArray();
};
ScrollMagic._util.addClass = function (elem, classname) {
$(elem).addClass(classname);
};
ScrollMagic._util.removeClass = function (elem, classname) {
$(elem).removeClass(classname);
};
$.ScrollMagic = ScrollMagic;
}));

5
package-lock.json generated
View File

@@ -12,6 +12,11 @@
"resolved": "https://registry.npmjs.org/bulma-scss/-/bulma-scss-0.9.0-1.tgz",
"integrity": "sha512-cOZFITkQii6YT0ff+P9FDTORFd2UquRzqb38CHYXVLHQDbiqKJG8cmmYzRXjA7jvEVkQy7I4897CVVG7XYeAkw=="
},
"scrollmagic": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/scrollmagic/-/scrollmagic-2.0.8.tgz",
"integrity": "sha512-UYXEGBPVLziovXl3FjHGkY9c4UXKUKopIdXwWR2JapWxCo0U345wYegi7rcsv5vHf/ktc1bSNWy4QRFiV+Yccw=="
},
"tippy.js": {
"version": "6.2.5",
"resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.2.5.tgz",

View File

@@ -140,7 +140,7 @@ EOF
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_time.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/clipboard.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/clipboardwidget.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/ScrollMagic.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'node_modules/scrollmagic/scrollmagic/minified/ScrollMagic.min.js');
}
/**