This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import imagesLoaded from 'imagesloaded' | |
| import TweenMax from 'gsap' | |
| export default class Smooth { | |
| constructor(options = {}) { | |
| this.bindAll() | |
| TweenMax.defaultEase = Linear.easeNone | |
| this.el = options.el || document.body |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import VirtualScroll from 'virtual-scroll' | |
| import throttle from 'lodash.throttle' | |
| import imagesLoaded from 'imagesloaded' | |
| import config from '../config' | |
| import math from '../utils/math' | |
| export class Smooth { | |
| constructor(options = {}) { | |
| this.bindAll() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import VirtualScroll from 'virtual-scroll' | |
| import throttle from 'lodash.throttle' | |
| import imagesLoaded from 'imagesloaded' | |
| import config from '../config' | |
| import TweenMax from 'gsap' | |
| import math from '../utils/math' | |
| export default class Smooth { | |
| constructor(options = {}) { | |
| this.bindAll() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import TweenMax from 'gsap' | |
| import config from '../config' | |
| import getClosest from 'get-closest' | |
| import throttle from 'lodash.throttle' | |
| import math from '../utils/math' | |
| export default class ScheduleSlider { | |
| constructor() { | |
| this.bindAll() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import VirtualScroll from 'virtual-scroll' | |
| import throttle from 'lodash.throttle' | |
| import imagesLoaded from 'imagesloaded' | |
| import config from '../config' | |
| import TweenMax from 'gsap' | |
| import math from '../utils/math' | |
| export default class SmoothSimple { | |
| constructor(options = {}) { | |
| this.bindAll() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import VirtualScroll from 'virtual-scroll' | |
| import throttle from 'lodash.throttle' | |
| import imagesLoaded from 'imagesloaded' | |
| import config from '../config' | |
| import TweenMax from 'gsap' | |
| import math from '../utils/math' | |
| export default class Smooth { | |
| constructor(options = {}) { | |
| this.bindMethods() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| animateElems() { | |
| if (!this.elems) return | |
| this.elems.forEach((data, index) => { | |
| const { isVisible, start, end } = this.isVisible(data, 0.01) | |
| if (isVisible || (!isVisible && data.progress.last != 0 && data.progress.last < .98)) { | |
| this.intersectRatio(data, start, data.threshold) | |
| data.progress.last = math.lerp(data.progress.last, data.progress.current, 0.125) | |
| data.progress.last < .01 && (data.progress.last = 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import VirtualScroll from 'virtual-scroll' | |
| import throttle from 'lodash.throttle' | |
| import imagesLoaded from 'imagesloaded' | |
| import config from '../config' | |
| import TweenMax from 'gsap' | |
| import math from '../utils/math' | |
| export default class Smooth { | |
| constructor(options = {}) { | |
| this.bindAll() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Highway from '@dogstudio/highway/build/es5/highway' | |
| import TweenMax from 'gsap' | |
| import SplitText from '../vendor/SplitText' | |
| import config from '../config' | |
| const mask = document.querySelector('.js-mask') | |
| const maskInner = mask.querySelector('.js-mask__inner') | |
| const maskLogo = mask.querySelector('.js-mask__logo') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Base { | |
| constructor() { | |
| this.mouseY = 0 | |
| this.mouseX = 0 | |
| this.raf = null | |
| } | |
| requestAnimationFrame() { | |
| this.raf = requestAnimationFrame(this.run.bind(this)) |