Created
July 2, 2020 15:43
-
-
Save AEnMe/f7f396de8a28f82fcf0232321fd3bb50 to your computer and use it in GitHub Desktop.
Perlin Noise looped
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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