y2kcarrds

aiura uwu ai fifth embed

Jun 20th, 2022
734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.88 KB | None | 0 0
  1. <---- make sure you make this embed is set to 'hidden, body end' ---->
  2.  
  3. <script type="text/javascript">
  4. // <![CDATA[
  5. var speed=50; // lower number for faster
  6. var warp=3; // from 1 to 10
  7. var stars=150; // number of stars
  8. var colours=new Array("#FF78BC", "#FFCFE9", "#FF87C5"); // colours of stars
  9. var position=-1; // set to '0' for foreground and '-1' for stars to appear in the background, behind text on the page
  10.  
  11. /****************************
  12. * Star Warp Effect *
  13. *(c)2005-14 mf2fm web-design *
  14. * http://www.mf2fm.com/rv *
  15. * DON'T EDIT BELOW THIS BOX *
  16. ****************************/
  17. var strs=new Array();
  18. var strx=new Array();
  19. var stry=new Array();
  20. var stdx=new Array();
  21. var stdy=new Array();
  22. var strz=new Array();
  23. var swide=800;
  24. var shigh=600;
  25. warp=1+warp/125;
  26.  
  27. if (typeof('addRVLoadEvent')!='function') function addRVLoadEvent(funky) {
  28. var oldonload=window.onload;
  29. if (typeof(oldonload)!='function') window.onload=funky;
  30. else window.onload=function() {
  31. if (oldonload) oldonload();
  32. funky();
  33. }
  34. }
  35.  
  36. addRVLoadEvent(initiate_hyperjump);
  37.  
  38. function initiate_hyperjump() { if (document.getElementById) {
  39. var i, temp;
  40. boddie=document.createElement("div");
  41. boddie.style.position="fixed";
  42. boddie.style.top="0px";
  43. boddie.style.left="0px";
  44. boddie.style.width="1px";
  45. boddie.style.height="1px";
  46. boddie.style.overflow="visible";
  47. boddie.style.backgroundColor="transparent";
  48. boddie.style.zIndex=position;
  49. i=document.body.style.backgroundColor;
  50. if (document.body.parentNode) {
  51. if (i) document.body.parentNode.style.backgroundColor=i;
  52. document.body.style.backgroundColor="transparent";
  53. }
  54. document.body.insertBefore(boddie, document.body.firstChild);
  55. set_width();
  56. for (i=0; i<stars; i++) {
  57. strs[i]=document.createElement("div");
  58. strs[i].style.color=colours[i%colours.length];
  59. strs[i].style.backgroundColor="transparent";
  60. strs[i].style.position="absolute";
  61. strs[i].appendChild(document.createTextNode("*"));
  62. strs[i].style.font="13px monospace";
  63. stdy[i]=Math.random()*6-3;
  64. stdx[i]=Math.random()*8-4;
  65. temp=Math.random()*100;
  66. strx[i]=swide/2+temp*stdx[i];
  67. stry[i]=shigh/2+temp*stdy[i];
  68. if (Math.abs(stdx[i])+Math.abs(stdy[i])>5) strz[i]=13;
  69. else if (Math.abs(stdx[i])+Math.abs(stdy[i])>3) strz[i]=7;
  70. else strz[i]=2;
  71. strs[i].style.fontSize=strz[i]+"px";
  72. boddie.appendChild(strs[i]);
  73. }
  74. setInterval("warp_drive()", speed);
  75. }}
  76.  
  77. function warp_drive() {
  78. var i;
  79. for (i=0; i<stars; i++) {
  80. stry[i]+=stdy[i];
  81. strx[i]+=stdx[i];
  82. stdx[i]*=warp;
  83. stdy[i]*=warp;
  84. if (stry[i]>0 && stry[i]<shigh && strx[i]>0 && strx[i]<swide) {
  85. if (Math.abs(stdx[i])+Math.abs(stdy[i])>strz[i]) strs[i].style.fontSize=++strz[i]+"px";
  86. strs[i].style.left=strx[i]+"px";
  87. strs[i].style.top=stry[i]+"px"
  88. }
  89. else {
  90. strx[i]=swide/2;
  91. stry[i]=shigh/2;
  92. strx[i]+=3*(stdx[i]=Math.random()*8-4);
  93. stry[i]+=3*(stdy[i]=Math.random()*6-3);
  94. if (Math.abs(stdx[i])+Math.abs(stdy[i])>5) strz[i]=13;
  95. else if (Math.abs(stdx[i])+Math.abs(stdy[i])>3) strz[i]=7;
  96. else strz[i]=2;
  97. strs[i].style.fontSize=strz[i]+"px";
  98. }
  99. }
  100. }
  101.  
  102. window.onresize=set_width;
  103. function set_width() {
  104. var sw_min=999999;
  105. var sh_min=999999;
  106. if (document.documentElement && document.documentElement.clientWidth) {
  107. if (document.documentElement.clientWidth>0) sw_min=document.documentElement.clientWidth;
  108. if (document.documentElement.clientHeight>0) sh_min=document.documentElement.clientHeight;
  109. }
  110. if (typeof(self.innerWidth)!="undefined" && self.innerWidth) {
  111. if (self.innerWidth>0 && self.innerWidth<sw_min) sw_min=self.innerWidth;
  112. if (self.innerHeight>0 && self.innerHeight<sh_min) sh_min=self.innerHeight;
  113. }
  114. if (document.body.clientWidth) {
  115. if (document.body.clientWidth>0 && document.body.clientWidth<sw_min) sw_min=document.body.clientWidth;
  116. if (document.body.clientHeight>0 && document.body.clientHeight<sh_min) sh_min=document.body.clientHeight;
  117. }
  118. if (sw_min==999999 || sh_min==999999) {
  119. sw_min=800;
  120. sh_min=600;
  121. }
  122. swide=sw_min;
  123. shigh=sh_min;
  124. }
  125. // ]]>
  126. </script>
Advertisement
Add Comment
Please, Sign In to add comment