Skip to content

Instantly share code, notes, and snippets.

View DouglasWilcox's full-sized avatar

Doug Wilcox DouglasWilcox

View GitHub Profile
@DouglasWilcox
DouglasWilcox / perlin.py
Created December 16, 2020 05:14 — forked from eevee/perlin.py
Perlin noise in Python
"""Perlin noise implementation."""
# Licensed under ISC
from itertools import product
import math
import random
def smoothstep(t):
"""Smooth curve with a zero derivative at 0 and 1, making it useful for
interpolating.
@DouglasWilcox
DouglasWilcox / easing.js
Created May 27, 2020 14:06 — 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: t => t,
// accelerating from zero velocity
easeInQuad: t => t*t,
// decelerating to zero velocity