Skip to content

Instantly share code, notes, and snippets.

View pixel-shock's full-sized avatar

Tino W. pixel-shock

  • IBMiX
  • Berlin, Germany
View GitHub Profile
@pixel-shock
pixel-shock / CustomEasing.js
Last active August 17, 2020 15:21
After Effects Custom Easing
// Base
var CustomEase = function(currentTime, startTimeValue, endTimeValue, delayValue, startValue, endValue, easingFunction) {
currentTime = parseFloat(currentTime);
delayValue = parseFloat(delayValue);
startTimeValue = parseFloat(startTimeValue) + delayValue;
endTimeValue = parseFloat(endTimeValue) + delayValue;
// Linear
var LinearInOut = function(t) {
return t;
@pixel-shock
pixel-shock / easing.js
Last active December 16, 2019 14:55 — 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 x value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (x) { return x },
// accelerating from zero velocity
easeInQuad: function (x) { return x*x },
// decelerating to zero velocity