Implementation of 3D Simplex Noise used to generate plasma. I hope it's fast enough to run at a decent frame rate on slower PCs - try shrinking the window and refreshing to decrease the quality and sp…
// Code by SkyLined - 3D Simplex Noise concept by Ken Perlin - implementation based on code by Stefan Gustavson.
A="boverflow='hidden';bmargin='0wW+'hH+'EW/4),7H/4);f!u=[v=[i=]];i8v[i9v9v+9(u[i9u9u+9@random()*))%12*3;setInterval(return n=xo=yp=zx-=n y-=o z-=p n=no=op=pl=[----d=e=f=g=h=i=j=C-x<y?h=y$f=ie=x$igg=y$i=x$fdd=h=--1],b=y,w=zm=k>0?]]:0-d5e5f5f]+e]+d)-g+2h+2i+2i]+h]+g)-3331]5]5),4*m}#eef',BCCcE,7),t=new Date/;f!x=cE5;x8f!y=75;y8Bx,y,rgba('+(r60Cy/263,tF16+(z111+r,yF3+r,t/2A4+(z4-z,y/16-z,tArF+')')},12)Fk>0&&(m+=+@flo!]]*sbw)44C(k*=k)*k*(l[k=v[n+u[o+u[p+(x+y+z)/3),))*111)+','+ -(n+o+p)eight.style.function q(x,y,z){,k=.6-s*s-b*b-w*w,a.fillidth1,=1+q(x/=window.innerF,,s=x=b.client[i+%+,w=z-=1:px';c-b=y-+l[++k]*Style='!or($<z?4325+17c.h8--;)9]=@Math.A,r+=zBRect(C0,E.wF/6";for(B=43;B--;A=(C=A.split(' !$45789@ABCEF'[B])).join(C.pop()));eval(A)
Ly8gQ29kZSBieSBTa3lMaW5lZCAtIDNEIFNpbXBsZXggTm9pc2UgY29uY2VwdCBieSBLZW4gUGVybGluIC0gaW1wbGVtZW50YXRpb24gYmFzZWQgb24gY29kZSBieSBTdGVmYW4gR3VzdGF2c29uLg0KQT0iYgxvdmVyZmxvdz0naGlkZGVuJztiDG1hcmdpbj0nMBwMdxEUVxErJxwMaAsUSAsrJxxFF1cRLzQpLDcXSAsvNCk7ZiF1PVt2PVtpPQRdXTtpOHZbaTl2GDl2GCsEOSh1W2k5dRg5dRgrBDlAcmFuZG9tKCkqBCkpJTEyKjM7c2V0SW50ZXJ2YWwoDg5yZXR1cm4gbj0CeAdvPQJ5B3A9AnoHeC09bgl5LT1vCXotPXAJbj1uGW89bxlwPXAZbD1bEgUtEgUdLR0FHRIFLR0tBRISZD1lPWY9Zz1oPWk9aj1DLRJ4PHk/aD15JGY9aRtlPXgkaRtnG2c9eSRpPXgkZhtkG2Q9aD0FHS0SLTFdFixiPXksdz16D209az4wPwZdXQM6MBYtZDUeZTUaZjUBZl0rZV0rZAMpFi1nKzIeaCsyGmkrMgFpXStoXStnAykWLTMeMxozATFdNV01AyksNCptfX8jZWVmJyxCQ0NjRSw3KSx0PW5ldyBEYXRlLwQ7ZiF4PWNFNTt4OGYheT03NTt5OEJ4LHksEhJ/cmdiYSgnKwIochM2MEN5LzI2Myx0RggCMTYrKHoTMTExK3IseUYzK3IsdC8yQQI0Kyh6EzQteix5LzE2LXosdEFyRisnKScpfSwxMikBRg9rPjAmJihtKz0GK0BmbG8hA11dKnMfYh93KQQ0NAUSQwYoayo9aykqayoobFtrPXZbbit1W28rdVtwBysoeCt5K3opLzMpLAgpKSoxMTEpKycsJysJLShuK28rcCkVC2VpZ2h0DC5zdHlsZS4OZnVuY3Rpb24gcSh4LHkseil7DyxrPS42LXMqcy1iKmItdyp3LBBhLmZpbGwRaWR0aBIxLBM9MStxKHgvFD13aW5kb3cuaW5uZXIVRiwWLHM9eBc9AmIuY2xpZW50GFtpKwQZJQQrBCwaFXc9ei0bPTE6HHB4JztjHRItBR4VYj15LR8rbFsrK2tdKn8QU3R5bGU9JyFvcigkPHo/NDMyNSsxN2MuaAs4LS07KTldPUACTWF0aC5BLHIrPXoIQhBSZWN0KEMwLEUudxFGLzYiO2ZvcihCPTQzO0ItLTtBPShDPUEuc3BsaXQoJwECAwQFBgcICQsMDg8QERITFBUWFxgZGhscHR4ffyEkNDU3ODlAQUJDRUYnW0JdKSkuam9pbihDLnBvcCgpKSk7ZXZhbChBKQ==
// JavaScript implementation of simplex noise.
// http://en.wikipedia.org/wiki/Simplex_noise
// Original simplex noise concept by Ken Perlin:
// http://www.noisemachine.com/talk1/32.html
// This implementation is based on an article by Stefan Gustavson:
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
b.style.overflow = 'hidden'; b.style.margin = '0px';
c.style.width = window.innerWidth + 'px'; c.style.height = window.innerHeight + 'px';
c.width = Math.floor(b.clientWidth / 32),
c.height = Math.floor(b.clientHeight / 32);
for (u=[v=[i = 3232]];i--;)
v[i] = v[i + 3232] = v[i + 3232 + 3232] = (
u[i] = u[i + 3232] = u[i + 3232 + 3232] = Math.floor(Math.random() * 3232)
) % 12 * 3;
setInterval(function q(x, y, z) {
function q(x, y, z) {
return n = Math.floor(x+(x+y+z)/3),
o = Math.floor(y+(x+y+z)/3),
p = Math.floor(z+(x+y+z)/3),
x -= n-(n+o+p)/6,
y -= o-(n+o+p)/6,
z -= p-(n+o+p)/6,
n = n % 3232 + 3232,
o = o % 3232 + 3232,
p = p % 3232 + 3232,
l = [ 1, 1, 0, -1, 1, 0, 1,-1, 0,
-1,-1, 0, 1, 0, 1, -1, 0, 1,
1, 0,-1, -1, 0,-1, 0, 1, 1,
d=e=f=g=h=i=j=0,-1, x<y?h=y<z?f=i=1:e=x<z?i=1:g=1:g=y<z?i=x<z?f=1:d=1:d=h=1, 0, 1,-1, 0,-1,-1 ],
s = x , b = y , w = z , k = .6 - s*s - b*b - w*w, m = k>0 ? (k *= k) * k * (l[k = v[n+u[o+u[p ] ] ]]*s + l[++k]*b + l[++k]*w):0,
s = x - d + 1/6, b = y - e + 1/6, w = z - f + 1/6, k = .6 - s*s - b*b - w*w, k>0 && (m += (k *= k) * k * (l[k = v[n+u[o+u[p+f]+e]+d]]*s + l[++k]*b + l[++k]*w)),
s = x - g + 2/6, b = y - h + 2/6, w = z - i + 2/6, k = .6 - s*s - b*b - w*w, k>0 && (m += (k *= k) * k * (l[k = v[n+u[o+u[p+i]+h]+g]]*s + l[++k]*b + l[++k]*w)),
s = x - 3/6, b = y - 3/6, w = z - 3/6, k = .6 - s*s - b*b - w*w, k>0 && (m += (k *= k) * k * (l[k = v[n+u[o+u[p+1]+1]+1]]*s + l[++k]*b + l[++k]*w)),
32 * m
}
a.fillStyle = '#eef',
a.fillRect(0, 0, c.width, c.height),
t = new Date / 3232;
for (
x = c.width + 1;
x--;
)
for (
y = c.height + 1;
y--;
)
a.fillRect(x, y, 1, 1, a.fillStyle = 'rgba(' +
Math.floor( ( r = 1+q(x / 600, y / 263, t / 6 )) * 111) + ',' +
Math.floor(16+ ( z = 1+q(x / 111+r, y / 63+r, t / 2, r+=z )) * 111) + ',' +
Math.floor(32+ ( z = 1+q(x / 32-z, y / 16-z, t, r+=z )) * 111) + ',' +
r/6 + ')');
}, 12);