JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.

Any URL's added here will be added as `<script>`

s in order, and run *before* the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

` ````
<canvas></canvas>
```

` ````
* {
margin: 0;
padding: 0;
border: 0;
}
canvas {
width: 100%;
height: 100%;
}
```

` ````
var canvas,ctx,mtime,costank,zoom,gim;
window.onload=function(){
var a,b;
canvas=document.getElementsByTagName("canvas")[0];
ctx=canvas.getContext("2d");
canvas.width=400;
canvas.height=250;
ctx.fillRect(0,0,canvas.width,canvas.height);
gim=ctx.getImageData(0,0,canvas.width,canvas.height);
costank=new Float32Array(10000);
for(a=0;a<10000;a++){
b=a/10000;
b=1-b;
b=0.5-Math.cos(b*Math.PI)/2;
costank[a]=b;
}
jur();
};
function jur(){
var a,b,c,x,y,xx,yy,x2,y2,xy2,z,tx,ty,tim,
max,col,hm,step,rx,ry,iti,kai,hige,imd;
tim=new Date().getTime()/150;
b=Math.sin(tim/11)+Math.sin(tim/19);
c=Math.cos(tim/7)+Math.sin(tim/23);
tx=Math.cos(tim/13)*b*0.4;
ty=Math.sin(tim/13)*c*0.4;
zoom=200+Math.sin(tim/17)*100;
hm=0.05+Math.sin(tim/47)*0.03;
max=9;
rx=tx;ry=ty;
imd=gim.data;
step=1/zoom;
tx=-step*(canvas.width/2);
ty=-step*(canvas.height/2);
iti=0;
xx=tx;
col=[];
c=0;
for(a=0;a<5;a++){
col[a]=[];
for(b=0;b<8;b++){
col[a][b]=400+Math.sin(tim/53*(a+1)*(b+1))*380;
}
}
for(a=0;a<canvas.height;a++){
tx=xx;
for(b=0;b<canvas.width;b++){
x=tx;y=ty;x2=x*x;y2=y*y;xy2=x*y*2;
for(kai=0;kai<max;kai++){
x=x2-y2+rx;
y=xy2+ry;
x=Math.abs(x);y=Math.abs(y);
z=1/(x*x+y*y+0.05);
x*=z;y*=z;
x2=x*x;y2=y*y;xy2=x*y*2;
if(kai>=4){
hige=Math.abs(x2-y2);
if(hige<hm)break;
}
}
if(kai!=max){
c=kai-4;
hige=costank[(hige/hm*costank.length)|0];
col1=(col[c][0]*hige)|0;
col2=(col[c][1]*hige)|0;
col3=(col[c][2]*hige)|0;
}else{
col1=col2=col3=0;
}
imd[iti]=col1>255?255:col1;
imd[iti+1]=col2>255?255:col2;
imd[iti+2]=col3>255?255:col3;
iti+=4;
tx+=step;
}
ty+=step;
}
ctx.putImageData(gim,0,0);
requestAnimationFrame(jur);
}
```

999px

Shift F
Opt F
Find & Replace

Also see: Tab Triggers