Uzay Efekti

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Uzay Efekti as PDF for free.

More details

  • Words: 270
  • Pages: 3
<script type="text/javascript"> // 2.66) { strs[i].style.width="2px"; strs[i].style.height="2px"; } else { strs[i].style.width="1px"; strs[i].style.height="1px"; } b.appendchild(strs[i]); } setinterval("warp_drive()", speed); }} function warp_drive() {

for (i=0; i<stars; i++) { stry[i]+=stdy[i]; strx[i]+=stdx[i]; stdx[i]*=1+warp; stdy[i]*=1+warp; if (stry[i]>0 && stry[i]<shigh-3 && strx[i]>0 && strx[i]<swide-3) { strs[i].style.left=math.floor(strx[i])+"px"; strs[i].style.top=math.floor(stry[i])+"px" } else { strx[i]=swide/2; stry[i]=shigh/2; stry[i]+=stdy[i]=math.random()*4-2; strx[i]+=stdx[i]=math.random()*6-3; if (math.abs(stdx[i])+math.abs(stdy[i])>2.66) { strs[i].style.width="2px"; strs[i].style.height="2px"; } else { strs[i].style.width="1px"; strs[i].style.height="1px"; } } }

} window.onresize=set_width; function set_width() { if (typeof(self.innerwidth)=="number") { swide=self.innerwidth; shigh=self.innerheight; } else if (document.documentelement && document.documentelement.clientwidth) { swide=document.documentelement.clientwidth; shigh=document.documentelement.clientheight; } else if (document.body.clientwidth) { swide=document.body.clientwidth; shigh=document.body.clientheight; } swide-=2; shigh-=2; } window.onscroll=set_scroll; function set_scroll() { var sleft, sdown; if (typeof(self.pageyoffset)=="number") { sdown=self.pageyoffset; sleft=self.pagexoffset; } else if (document.body.scrolltop || document.body.scrollleft) { sdown=document.body.scrolltop; sleft=document.body.scrollleft; } else if (document.documentelement && (document.documentelement.scrolltop || document.documentelement.scrollleft)) { sleft=document.documentelement.scrollleft; sdown=document.documentelement.scrolltop; }

else { sdown=0; sleft=0; } var s=document.getelementbyid("bod").style; s.top=sdown+"px"; s.left=sleft+"px"; } // ]]>


Related Documents