Skip to content

Instantly share code, notes, and snippets.

View Jeremboo's full-sized avatar

Jérémie Boulay Jeremboo

View GitHub Profile
@Jeremboo
Jeremboo / MDBoo
Created June 23, 2015 21:20
My own CSS style for writing MarckDown syntax
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote {
margin: 0;
padding: 0;
@Jeremboo
Jeremboo / LetterTransition.js
Last active March 3, 2016 21:40
es2015 class for create transitions of text with each letters.
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++) {
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);
@Jeremboo
Jeremboo / Loop.js
Last active March 3, 2016 22:35
Loop class for canvas control and WebGL directed by Florian Zumbrunn - http://floz.fr/
class Loop {
constructor() {
this._idRAF = -1;
this._count = 0;
this._listeners = [];
this._binds = {};
this._binds.update = this._update.bind(this);
@Jeremboo
Jeremboo / 0 _ utils.math.js
Last active January 14, 2024 02:53
Useful functions on javascript es2015 : Geometry2D/3D, Math, Canvas, DOM, Color, Node...
/*******
* 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);
@Jeremboo
Jeremboo / mixins.styl
Last active December 18, 2017 10:46
My mixins
remify(value) {
u = unit(value);
if (u is 'px') {
return unit(value/16, 'rem');
} else {
return unit(value, u);
}
}
@Jeremboo
Jeremboo / keymap.cson
Last active November 24, 2016 09:15
Atom config
'atom-text-editor[data-grammar~="js"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
@Jeremboo
Jeremboo / AnimComponent.js
Last active September 19, 2017 15:14
Class to manage animations with GreenSock
/**
* 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
@Jeremboo
Jeremboo / GPUSimulation.js
Last active June 6, 2020 15:18
GPUSimulation.js build a Simulation of RGBA float textures that hold 4 floats for each compute element (texel)
/**
* @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)
/**
* @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