Adventure Game Studio

Community => General Discussion => Topic started by: SinSin on Mon 06/11/2006 17:15:56

Title: Trippy java stuff
Post by: SinSin on Mon 06/11/2006 17:15:56
Simply paste this link into your address bar
Lilemx found it so i wont take credit

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300;y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img");DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style;DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px";DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5);void(0);
Title: Re: Trippy java stuff
Post by: Mr Flibble on Mon 06/11/2006 21:20:27
I came across this on StumbleUpon a while back. It's utterly useless but rather pretty.
Title: Re: Trippy java stuff
Post by: Hinders on Mon 06/11/2006 21:35:29
Uhm.. nothing seems to happen  ???
Title: Re: Trippy java stuff
Post by: Tuomas on Mon 06/11/2006 21:36:33
yeah, I don't get it... ???
Title: Re: Trippy java stuff
Post by: Mr Flibble on Mon 06/11/2006 21:38:05
The code takes all the images on a page and makes them orbit around an arbitary point in a trippy 3D circle.. thing.

I'd warrant you need Firefox for it, somehow I can't picture IE coping too well with javascript. </prejudice>
Title: Re: Trippy java stuff
Post by: Domino on Mon 06/11/2006 21:40:19
That was kind of interesting. A neat little effect that most people might enjoy. Enough of a distraction to get a COOOOLLLLLL out of me.  :)
Title: Re: Trippy java stuff
Post by: Hinders on Mon 06/11/2006 21:41:41
Ah, i tried to do it in an empty FF tab, worked fine now  :=
Title: Re: Trippy java stuff
Post by: Tuomas on Mon 06/11/2006 21:52:16
I see. While I opened a new tab because I wanted to keep this one up. No wonder it didn't work on a blank page.
Title: Re: Trippy java stuff
Post by: skyfire2 on Mon 06/11/2006 21:57:10
Heh, that's pretty cool.
Title: Re: Trippy java stuff
Post by: monkey0506 on Mon 06/11/2006 21:57:48
It's interesting...but what's more interesting is how everyone tried doing it in an empty FF tab (i.e., I too tried the empty tab method :=).