Skip to content

Instantly share code, notes, and snippets.

View nbwsc's full-sized avatar

Wangshichao nbwsc

  • China
View GitHub Profile
@nbwsc
nbwsc / easing.js
Created July 2, 2018 12:24 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
@nbwsc
nbwsc / nextTick.js
Created January 8, 2018 03:27 — forked from mmalecki/nextTick.js
process.nextTick vs setTimeout(fn, 0)
for (var i = 0; i < 1024 * 1024; i++) {
process.nextTick(function () { Math.sqrt(i) } )
}