This file contains 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
h1, | |
h2, | |
h3, | |
h4, | |
h5, | |
h6, | |
p, | |
blockquote { | |
margin: 0; | |
padding: 0; |
This file contains 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 LetterTransition { | |
constructor(element, style) { | |
this.element = element; | |
this.text = this.element.innerText; | |
this.element.innerText = ''; | |
this.letters = []; | |
let i; | |
let key; | |
for (i = 0; i < this.text.length; i++) { |
This file contains 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 SizeControl { | |
constructor() { | |
this._width = null; | |
this._height = null; | |
this._action = null; | |
this._onMobile = this._mobileCheck(); | |
window.addEventListener('resize', this._onResize.bind(this), false); | |
window.addEventListener('orientationchange', this._onResize.bind(this), false); |
This file contains 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 Loop { | |
constructor() { | |
this._idRAF = -1; | |
this._count = 0; | |
this._listeners = []; | |
this._binds = {}; | |
this._binds.update = this._update.bind(this); |
This file contains 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
/******* | |
* MATH | |
*******/ | |
// http://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range | |
export const randInt(min, max) { | |
min = Math.ceil(min); | |
return Math.floor(Math.random() * (Math.floor(max) - min + 1)) + min; | |
} | |
export const randFloat = (min, max) => (Math.random() * (max - min) + min); |
This file contains 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
remify(value) { | |
u = unit(value); | |
if (u is 'px') { | |
return unit(value/16, 'rem'); | |
} else { | |
return unit(value, u); | |
} | |
} |
This file contains 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
'atom-text-editor[data-grammar~="js"]:not([mini])': | |
'tab': 'emmet:expand-abbreviation-with-tab' |
This file contains 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
/** | |
* V1.0.0 | |
* @author jeremboo https://jeremieboulay.fr | |
* | |
* REACT ANIMATED COMPONENT : | |
* Class to manage react components animated by GreenSock timelines. | |
* You can show/hide child components and their children. | |
* | |
* PARENT: Start to animate components |
This file contains 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
/** | |
* @author jeremboo https://jeremieboulay.fr | |
* @version 1.0.0 | |
* | |
* GPUSimulation, based on : | |
* - GPUComputationRenderer by yomboprime : https://threejs.org/examples/js/GPUComputationRenderer.js | |
* - Demo for THREE.FBOHelper by thespite : https://www.clicktorelease.com/code/THREE.FBOHelper/#512 | |
* - FBO particles article by nicoptere : http://barradeau.com/blog/?p=621 | |
* | |
* The GPUSimulation build a Simulation of RGBA float textures that hold 4 floats for each compute element (texel) |
This file contains 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
/** | |
* @author jeremboo https://jeremieboulay.fr | |
* | |
* ScrollEngine.js to create parallax effect on your html page | |
* with the transform CSS property and an animationFrameRate. | |
* | |
* Usage: | |
* ------- | |
* | |
* // HTML |
OlderNewer