Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ======================================================================== */
- /* 67. SliderTextTransitions */
- /* ======================================================================== */
- class SliderTextTransitions {
- constructor({
- slider,
- direction,
- offset = 40,
- staggerHeadings = 0.3,
- staggerTexts = 0.2,
- heading,
- subheading,
- description,
- link
- }) {
- // slider
- this.slider = slider;
- this.$slides = $(this.slider.slides);
- // params
- this.offset = offset;
- this.direction = direction || this.slider.params.direction;
- this.speed = parseFloat(this.slider.params.speed / 1000);
- // elements
- this.$heading = heading;
- this.$subheading = subheading;
- this.$description = description;
- this.$link = link;
- this.elementsLength = this._countExistentElements();
- // animation
- this.timeline = new gsap.timeline();
- this.hideTimeline = new gsap.timeline();
- this.ease = 'power4.out';
- this.staggerHeadings = staggerHeadings;
- this.staggerTexts = staggerTexts;
- this.animationDirections = this._getAnimationDirections();
- this._initialSet();
- this._bindEvents();
- }
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement