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
// generates a random integer between min & max bounds, inclusive | |
const randBetween = (min, max) => { | |
return Math.floor(Math.random() * (max - min + 1) + min) | |
} | |
export default randBetween |
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
// ease in out quad | |
const easing = (t, b, c, d) => { | |
t /= d / 2 | |
if (t < 1) return c / 2 * t * t + b | |
t-- | |
return -c / 2 * (t * (t - 2) - 1) + b | |
} | |
// modified jump.js | |
// stripped options, supports (only) scrolling a container horizontally |
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 React, { Component, PropTypes } from 'react' | |
import ReactDOM from 'react-dom' | |
import throttle from 'lodash/throttle' | |
import { INTERVAL } from './constants.js' | |
let bound // are the event handlers bound? | |
let current // current scroll position, from top of document | |
let queue // array of React Components to check |