Skip to content

Instantly share code, notes, and snippets.

@AEnMe
Created July 2, 2020 15:43
Show Gist options
  • Save AEnMe/f7f396de8a28f82fcf0232321fd3bb50 to your computer and use it in GitHub Desktop.
Save AEnMe/f7f396de8a28f82fcf0232321fd3bb50 to your computer and use it in GitHub Desktop.
Perlin Noise looped
//based on https://workbench.tv/tutorials/2019-05-10_LoopingNoise
amplitude = 100;
freq = .5; // loop/second
ofst = 0 ; //offset from 0 to 1
sed = 0; // seed
s = .1 ; // complexity
a = (time + ofst/freq ) * 2 * Math.PI * freq ;
x = Math.cos(a) * s + sed;
y = Math.sin(a) * s + sed;
noise([x, y]) * amplitude;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment