OK I was digging around through old stuff that I saved that I found confusing and wanted to understand at a later date. I found P01's script and I wanted to pick it apart to better understand it.
http://www.p01.org/releases/256b_mars_canvas/
p01's code
Here's my pick apart.
I had to set the vars all wrong to get some output.
What is that script doing ? LOL I can't follow it. Can you?
http://www.p01.org/releases/256b_mars_canvas/
p01's code
Code:
<body onload=setInterval("S=Math.sin;with(R.getContext('2d'))for(fillRect(0,0,300,150,drawImage(R,9,2,282,148,0,3,300,150),fillStyle='rgba(99,0,42,.01)'),a+=x=88;x--;fillRect(x*4,75+S(a+x/27+S(x/9)*S(a*2-x/15))*20,4,3))fillStyle='#c60'",a=9)><canvas id=R>
Code:
<script> S=Math.sin; var a=9; var x=36; var xx=x function run(){ xx-=1 a+=x; R=document.getElementById("R"); ctx=R.getContext('2d') ctx.fillStyle='rgba(99,0,42,.01)' ctx.fillRect(0,0,300,150) ctx.fillStyle='#cc6600' ctx.fillRect(x*4,75+S(a+xx/27+S(xx/9)*S(a*2-xx/15))*20,4,3) ctx.drawImage(R,9,2,282,148,0,3,300,150) // } ;setInterval("run()",9) </script> <canvas id="R"></canvas>
What is that script doing ? LOL I can't follow it. Can you?
Comment