<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>JS1k, 1k demo submission [1022]</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="icon" type="image/vnd.microsoft.icon" href="http://js1k.com/favicon.png">
<link rel="icon" type="image/png" href="http://js1k.com/favicon.png">
<link rel="shortcut icon" href="http://js1k.com/favicon.png" />
<script>
setTimeout(function(){ var ga = document.createElement('script'); ga.async = true; ga.defer = true; ga.src = 'http://www.google-analytics.com/ga.js'; ga.onload = function(){try{_gat._getTracker('UA-19882353-1')._trackPageview();}catch(e){window.console&&console.log("ga fail :'( ");};}; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); }, 10);
</script>
</head>
<!-- what? frames? yes. frames. required to keep all demo's working after adding a top menu to them -->
<frameset οnlοad="document.getElementsByTagName('frame')[1].contentWindow.focus();" rows="30px,*">
<!-- the inline html src allows me to make this page a single resource :) sure js is required, but come on, dont forget why you're here! -->
<frame marginwidth="0" marginheight="0" frameborder="0" noresize="no" src="javascript:'<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset="utf-8" />\n\t\t<style>\n\t\t\thtml, body { width: 100%25; height: 100%25; margin: 0; padding: 0; border: 0; }\n\t\t\tdiv { margin: 0; padding: 0; border: 0; }\n\t\t\t.nav { \n\t\t\t\tposition: absolute; \n\t\t\t\ttop: 0; \n\t\t\t\tleft: 0; \n\t\t\t\twidth: 100%25; \n\t\t\t\theight: 27px; \n\t\t\t\tbackground-color: white; \n\t\t\t\tcolor: black; \n\t\t\t\ttext-align: center; \n\t\t\t\tline-height: 25px;\n\t\t\t}\n\n\t\t\ta { color: black; text-decoration: none; border-bottom: 1px dashed black; }\n\t\t\ta:hover { border-bottom: 1px solid red; }\n\n\t\t\t.previous { float: left; margin-left: 10px; }\n\t\t\t.next { float: right; margin-right: 10px; }\n\t\t\t\n\t\t\t.green { color: green; }\n\t\t\t.red { color: red; }\n\n\t\t\ttextarea { width: 100%25; height: 100%25; border: 0; padding: 0; margin: 0; padding-bottom: 20px; }\n\t\t\t.block-outer { float: left; width: 22%25; height: 100%25; padding: 5px; border-left: 1px solid black; margin: 30px 3px 3px 3px; }\n\t\t\t.block-inner { height: 68%25; }\n\t\t\t.one { border: 0; }\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class="nav">\n\t\t\t<span class="previous"><a href="../demo/1019" target="_top">Previous</a></span> \n\t\t\t<a href="/" target="_top">%23js1k</a> \n\t\t\tdemo submission\n\t\t\tby <a href="http://twitter.com/romancortes" target="_blank">@romancortes</a>, \n\t\t\t1018 bytes \n\t\t\t- <a href="javascript:toggle();">view source and description</a>\n\t\t\t- back to <a href="../demos" target="_top">list of demos</a>\n\t\t\t <span class="next"><a href="../demo/1023" target="_top">Next</a></span>\n\t\t</div>\n\t\t<div class="block-outer one">\n\t\t\t<b>Title:</b> A Rose is a Rose<br/>\n\t\t\t<b>By:</b> Roman Cortes<br />\n\t\t\t\t<b>Twitter:</b> @<a href="http://twitter.com/romancortes" target="_blank">romancortes</a><br />\n\t\t\t\t<b>Website:</b> <a href="http://www.romancortes.com" target="_blank">http://www.romancortes.com</a><br />\n\t\t\t<b>Bytes:</b> 1018<br />\n\t\t\t<b>Chars:</b> 1018<br />\n\t\t</div>\n\t\t<div class="block-outer">\n\t\t\t<b>Source:</b>\n\t\t\t<div class="block-inner">\n\t\t\t\t<textarea>with(m=Math)C=cos,S=sin,P=pow,R=random;c.width=c.height=f=500;h=-250;function p(a,b,c){if(c&gt;60)return[S(a*7)*(13+5/(.2+P(b*4,4)))-S(b)*50,b*f+50,625+C(a*7)*(13+5/(.2+P(b*4,4)))+b*400,a*1-b/2,a];A=a*2-1;B=b*2-1;if(A*A+B*B&lt;1){if(c&gt;37){n=(j=c&amp;1)%3F6:4;o=.5/(a+.01)+C(b*125)*3-a*300;w=b*h;return[o*C(n)+w*S(n)+j*610-390,o*S(n)-w*C(n)+550-j*350,1180+C(B+A)*99-j*300,.4-a*.1+P(1-B*B,-h*6)*.15-a*b*.4+C(a+b)/5+P(C((o*(a+1)+(B&gt;0%3Fw:-w))/25),30)*.1*(1-B*B),o/1e3+.7-o*w*3e-6]}if(c&gt;32){c=c*1.16-.15;o=a*45-20;w=b*b*h;z=o*S(c)+w*C(c)+620;return[o*C(c)-w*S(c),28+C(B*.5)*99-b*b*b*60-z/2-h,z,(b*b*.3+P((1-(A*A)),7)*.15+.3)*b,b*.7]}o=A*(2-b)*(80-c*2);w=99-C(A)*120-C(b)*(-h-c*4.9)+C(P(1-b,7))*50+c*2;z=o*S(c)+w*C(c)+700;return[o*C(c)-w*S(c),B*99-C(P(b, 7))*50-c/3-z/1.35+450,z,(1-b/1.2)*.9+a*.1, P((1-b),20)/4+.05]}}setInterval(\'for(i=0;i&lt;1e4;i++)if(s=p(R(),R(),i%2546/.74)){z=s[2];x=~~(s[0]*f/z-h);y=~~(s[1]*f/z-h);if(!m[q=y*f+x]|m[q]&gt;z)m[q]=z,a.fillStyle=&quot;rgb(&quot;+~(s[3]*h)+&quot;,&quot;+~(s[4]*h)+&quot;,&quot;+~(s[3]*s[3]*-80)+&quot;)&quot;,a.fillRect(x,y,1,1)}\',0)</textarea>\n\t\t\t</div>\n\t\t</div>\n\t<div class="block-outer">\n\t\t<b>Description:</b>\n\t\t<div class="block-inner">\n\t\t\t<textarea>Dedicated with all my love to my colleage and friend Antonio Afonso D.S.M.\r\n\r\nOn a technical side, it does Montecarlo sampling of explicit surfaces. It is not fully size optimized (not as much as other of my previous js1k entries), but I don\'t have much more time and I see it finished now.</textarea>\n\t\t</div>\n\t</div>\n\n\n\t\t<script>\n\t\t\tvar collapsed = true;\n\t\t\tfunction toggle() {\n\t\t\t\tvar fs = top.document.getElementsByTagName(\'frameset\')[0];\n\t\t\t\tvar f = fs.getElementsByTagName(\'frame\');\n\t\t\t\tif (collapsed) {\n\t\t\t\t\tfs.rows = \'250px,*\';\n\t\t\t\t\t// enable resizing of frames in firefox/opera\n\t\t\t\t\tfs.noResize = false;\n\t\t\t\t\tf[0].noResize = false;\n\t\t\t\t\tf[1].noResize = false;\n\t\t\t\t} else {\n\t\t\t\t\tfs.rows = \'30px,*\';\n\t\t\t\t\t// disable resizing of frames in firefox/opera\n\t\t\t\t\tfs.noResize = true;\n\t\t\t\t\tf[0].noResize = true;\n\t\t\t\t\tf[1].noResize = true;\n\t\t\t\t}\n\t\t\t\tcollapsed = !collapsed;\n\t\t\t}\n\t\t</script>\n\t</body>\n</html>\n'" />
<frame marginwidth="0" marginheight="0" frameborder="0" noresize="no" src="javascript:'<!doctype html>\n<html>\n\t<head>\n\t\t<title>JS1k, 1k demo submission [1022]</title>\n\t\t<meta charset="utf-8" />\n\t</head>\n\t<body>\n\t\t<canvas id="c"></canvas>\n\t\t<script>\n\t\t\tvar b = document.body;\n\t\t\tvar c = document.getElementsByTagName(\'canvas\')[0];\n\t\t\tvar a = c.getContext(\'2d\');\n\t\t\tdocument.body.clientWidth; // fix bug in webkit: http://qfox.nl/weblog/218\n\t\t</script>\n\t\t<script>\n// start of submission //\nwith(m=Math)C=cos,S=sin,P=pow,R=random;c.width=c.height=f=500;h=-250;function p(a,b,c){if(c>60)return[S(a*7)*(13+5/(.2+P(b*4,4)))-S(b)*50,b*f+50,625+C(a*7)*(13+5/(.2+P(b*4,4)))+b*400,a*1-b/2,a];A=a*2-1;B=b*2-1;if(A*A+B*B<1){if(c>37){n=(j=c&1)%3F6:4;o=.5/(a+.01)+C(b*125)*3-a*300;w=b*h;return[o*C(n)+w*S(n)+j*610-390,o*S(n)-w*C(n)+550-j*350,1180+C(B+A)*99-j*300,.4-a*.1+P(1-B*B,-h*6)*.15-a*b*.4+C(a+b)/5+P(C((o*(a+1)+(B>0%3Fw:-w))/25),30)*.1*(1-B*B),o/1e3+.7-o*w*3e-6]}if(c>32){c=c*1.16-.15;o=a*45-20;w=b*b*h;z=o*S(c)+w*C(c)+620;return[o*C(c)-w*S(c),28+C(B*.5)*99-b*b*b*60-z/2-h,z,(b*b*.3+P((1-(A*A)),7)*.15+.3)*b,b*.7]}o=A*(2-b)*(80-c*2);w=99-C(A)*120-C(b)*(-h-c*4.9)+C(P(1-b,7))*50+c*2;z=o*S(c)+w*C(c)+700;return[o*C(c)-w*S(c),B*99-C(P(b, 7))*50-c/3-z/1.35+450,z,(1-b/1.2)*.9+a*.1, P((1-b),20)/4+.05]}}setInterval(\'for(i=0;i<1e4;i++)if(s=p(R(),R(),i%2546/.74)){z=s[2];x=~~(s[0]*f/z-h);y=~~(s[1]*f/z-h);if(!m[q=y*f+x]|m[q]>z)m[q]=z,a.fillStyle="rgb("+~(s[3]*h)+","+~(s[4]*h)+","+~(s[3]*s[3]*-80)+")",a.fillRect(x,y,1,1)}\',0)\n// end of submission //\n\t\t</script>\n\t</body>\n</html>'" />
</frameset>
</html>
js 玫瑰
最新推荐文章于 2023-03-19 08:19:13 发布