Jump to content

nyanify.js


  • Please log in to reply
6 replies to this topic

#1 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

Posted 28 August 2012 - 07:47 PM

Are you tired of your webpages being too boring?
Do you want to bring back the 90s web feel?
Wipe away those tears, nyanify.js is here.

jQuery(function($){
  $('body').css({overflow:'hidden'});
	for(var i=0;i<($(window).height()/30);i++)
	{
	  var timer = 1000;
	  timer = timer * Math.random()*6;
	  $('body').append('<img class="cat" id="cat' + i + '" src="http://i.imgur.com/n82ZG.gif" style="left:-70px;position: absolute;top:' + i*30 + 'px;"/>');
	  setTimeout(function(i){
         run($('#cat' + i));
	  },timer,i);
	}
  function run($elem)
  {
	var size = Math.floor(Math.random()*(10+1+1))-1;
	var width = (size*0.05)+0.5;
	$elem.css({left:-70, zIndex: size, width: width*52})
	  .animate({left: ($(window).width())}, Math.floor((Math.random()*9999)+1000), function(){
	   run($(this));
	  });
  }
});
Live demo
Disclaimer: This will bog down slower machines.
Disclaimer: jQuery is required for this to work.

I plan on making this use canvas later and removing the jQuery depency. One day...

#2 SpleenBeGone

SpleenBeGone

    Deer Leader of the Goriest Revolution

  • Administrators
  • 14,951 posts
  • LocationHouston

Posted 29 August 2012 - 06:17 AM

:lol:
Awesome.
nmjUGDL.jpg

#3 Wolf

Wolf

    Zettabyte

  • Members
  • 6,487 posts

Posted 29 August 2012 - 08:17 AM

You mean I can go back to backgrounds made of one solid, vibrant color, with comic sans and no text boxes?

I miss it already

#4 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

Posted 29 August 2012 - 08:51 AM

Don't forget the flaming gif text

#5 K_N

K_N

    Megabyte

  • Members
  • 576 posts
  • LocationPhoenix

Posted 30 August 2012 - 02:50 AM

I love it.

Make a .me domain and a draggable bookmarklet, enjoy pageviews.

Rumors of my demise have been greatly exaggerated.


#6 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

Posted 30 August 2012 - 07:25 AM

nyanify.me... I like it.

#7 stackcollision

stackcollision

    Byte

  • Members
  • 34 posts

Posted 22 September 2012 - 08:57 PM

This is glorious