[_HiTMaN_] Paylaşımcı Üye
Zodyak : Mesaj Sayısı : 3325 Yaş : 39 Nereden : Turkish İş : 1.Tütün Mühendisi - 2.Webmaster Kayıt tarihi : 15/08/08 Rep Puanı : 3 Rep Puanı : 67
| Konu: Animated küp Kodunu C.tesi Kas. 22, 2008 4:26 pm | |
| - Kod:
-
<script type="text/javascript"> var i=1 var image=new Array() var perspective=200 var rx=0 var ry=0 var xp=new Array() var yp=new Array() var zp=new Array() var ap=new Array() var bp=new Array() var cp=new Array() var imagemax=0; var mouse_x=0 var mouse_y=0
xp[0]= 50; yp[0]= 50; zp[0]= 50; ap[0]=-50; bp[0]= 50; cp[0]= 50;
xp[1]=-50; yp[1]= 50; zp[1]= 50; ap[1]=-50; bp[1]=-50; cp[1]= 50;
xp[2]=-50; yp[2]=-50; zp[2]= 50; ap[2]= 50; bp[2]=-50; cp[2]= 50;
xp[3]= 50; yp[3]=-50; zp[3]= 50; ap[3]= 50; bp[3]= 50; cp[3]= 50;
xp[4]= 50; yp[4]= 50; zp[4]= -50; ap[4]=-50; bp[4]= 50; cp[4]= -50;
xp[5]=-50; yp[5]= 50; zp[5]= -50; ap[5]=-50; bp[5]=-50; cp[5]= -50;
xp[6]=-50; yp[6]=-50; zp[6]= -50; ap[6]= 50; bp[6]=-50; cp[6]= -50;
xp[7]= 50; yp[7]=-50; zp[7]= -50; ap[7]= 50; bp[7]= 50; cp[7]= -50;
xp[8]= 50; yp[8]= 50; zp[8]= -50; ap[8]= 50; bp[8]= 50; cp[8]= 50;
xp[9]=-50; yp[9]= 50; zp[9]= -50; ap[9]=-50; bp[9]= 50; cp[9]= 50;
xp[10]=-50; yp[10]=-50; zp[10]= -50; ap[10]=-50; bp[10]=-50; cp[10]= 50;
xp[11]= 50; yp[11]=-50; zp[11]= -50; ap[11]= 50; bp[11]=-50; cp[11]= 50;
function cursorPos() { mouse_x=event.clientX mouse_y=event.clientY } function addimage() { image[imagemax]=event.srcElement temp=image[imagemax] image[imagemax].style.height=100 imagemax++ } function line(img,xx,yy,aa,bb) { img.style.position="absolute" if ( (xx>aa) ^ (yy>bb)) { img.style.filter="flipv()" } else { img.style.filter="" } if (xx<aa) { img.style.left=xx img.style.width=aa-xx } else { tempx=aa tempa=xx img.style.left=tempx if (tempa-tempx>0) { img.style.width=tempa-tempx } } if (yy<bb) { img.style.top=yy img.style.height=bb-yy } else { tempy=bb tempb=yy img.style.top=tempy if (tempb-tempy>0) { img.style.height=tempb-tempy } } } function starttimer() { d=new Date() for (count=0;count<imagemax;count++) { yyy = yp[count]*Math.cos(rx)-zp[count]*Math.sin(rx); bbb = bp[count]*Math.cos(rx)-cp[count]*Math.sin(rx); zzz = yp[count]*Math.sin(rx)+zp[count]*Math.cos(rx); ccc = bp[count]*Math.sin(rx)+cp[count]*Math.cos(rx); xxx = xp[count]*Math.cos(ry)+zzz*Math.sin(ry); aaa = ap[count]*Math.cos(ry)+ccc*Math.sin(ry); zzz = xp[count]*-Math.sin(ry)+zzz*Math.cos(ry); ccc = ap[count]*-Math.sin(ry)+ccc*Math.cos(ry); // PERSPECTIVE xxx=xxx*(perspective/(zzz+perspective)); yyy=yyy*(perspective/(zzz+perspective)); aaa=aaa*(perspective/(ccc+perspective)); bbb=bbb*(perspective/(ccc+perspective));
line(image[count],320+xxx,240+yyy,320+aaa,240+bbb) } ry-=(mouse_x-320)/5000 rx+=(mouse_y-240)/5000 timer=setTimeout("starttimer()",10) } function stoptimer() { clearTimeout(timer) } </script> <img id="myimg1" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg2" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg3" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg4" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg5" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg6" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg7" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg8" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg9" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg10" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg11" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif"> <img id="myimg12" onload="addimage()" src="http://i6.piczo.com/view/3/i/w/r/w/8/9/g/c/v/w/1/img/i313293249_49048_6.gif">
<span id="myText"><br></span> <br><br><br><br><br><br><br><br><br><br><br> <span id="message"> </span> <body onload="starttimer()" onunload="stoptimer()" onmousemove="cursorPos()"body> <font face="arial, helvetica" size="-2"><a href="http://superkodlar.blogcu.com">Super Kodlar</a></font>
| |
|