Closed Thread Icon

Topic awaiting preservation: April JavaScript contest - Graphic creation - comments Pages that link to <a href="https://ozoneasylum.com/backlink?for=21317" title="Pages that link to Topic awaiting preservation: April JavaScript contest - Graphic creation - comments" rel="nofollow" >Topic awaiting preservation: April JavaScript contest - Graphic creation - comments\

 
Author Thread
wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 04-12-2004 21:27

Post any comments/thoughts/questions you have about the month's contest here!

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 04-12-2004 22:24

just a quick question about function declaration and line counts:

code:
function myCoolFunction(){

stuff=new CoolStuff();
stuff.color="blue";

}


Would this be two lines, because the declaration line and the closing bracket don't count? And does this hold true for all closing brackets?

/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 04-12-2004 22:47

yes sorry. Some of these rules are clarified slightly more in the other topic. Closing brackets do not count as lines

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 04-22-2004 19:17

Just a code snippet to relive that thread and clarify the rules ( though I think nobody will sue you if you make a 21 or 22 lines entry )

code:
<script type="text/javascript">

document.body.onclick = function()
{
/* 01 */ val = prompt( 'enter a number' );
/* 02 */ for( i=0; i<10; i++ )
{
/* 03 */ alert( stupidFunction( val, i ) )
}
}

function stupidFunction( a, b )
{
/* 04 */ return a>b?a:b; // I said it was a stupid function
}

</script>

The document.body.onclick = function() does not count as a line as it's not some effective code and the function call could be put in the BODY tag ( or anyother HTML tag ).
The declaration of the stupidFunction() does not count either for the same reasons.
The coma in the line /* 03 */ is ok, since it simply separates the parameters of a function.



(Edited by poi on 04-22-2004 10:27)

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 04-29-2004 15:38

NEBULA


In *BONUS TRACK* two other versions of the source are included : one in 12 lines and the other in 3 lines.
UPDATE: 1 line have been added to slightly update one image every 50ms to make the whole nebula evolve.



(Edited by poi on 04-29-2004 07:39)

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 04-29-2004 19:02

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 04-29-2004 19:17

Indeed it's possible to put a lot of instructions in a row with the ternary operator ( like I did in the first for statement of Nebula ), but it seems tricky ( at first sight ) to declare some functions and/or trap some events at the same time.

Another way to write an infinite number of instruction is to use some {} statements block.

code:
{ alert(1) }{ alert(2) }{ function n(){ alert('n') }}{ n() }{ n() }

But inserting a newline around the {} is a kinda implied rule. No ?

InI: As a side not, the project I showed you few days ago fits in 4 or 5 lines ... but takes ~220 lines once unpacked. So it doesn't match exactly the rules here.



(Edited by poi on 04-29-2004 10:33)

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 04-29-2004 19:31

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 04-29-2004 21:28

Ok, here's my pathetic little entry. It is actually a page for my little nephew to play with, so that's why it may seem a bit childish. (that's my excuse anyways....)

catch me


/* I wonder....Does Fuzzy Logic tickle? */

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 04-29-2004 23:13

Notice, for those who still don't have a browser supporting the 32bits PNG ( a standard introduced in october 1996 by the W3C ), Mozilla Firefox takes only 6.2mb
[edit] Ok, I've updated my entry to make it visible in IE6. I don't know why it refuse to work in IE5.5 [/edit]

norm: I can see the stars in the eye of your little nephew, and my little niece too For more clarity in the threads, it'd help if you posted your entry also in April JavaScript contest - Graphic creation in 20 lines - entries



(Edited by poi on 04-29-2004 14:43)

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 04-30-2004 09:51

Don't know if I've got the rules correctly, care to check this out to see if it qualifies?
http://www.dmsproject.com/test/5k/perspective.html
/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 04-30-2004 10:13

DmS: Re-arrange the code to insert a new line character after the ; and avoid the comas where they only serves to execute several instructions on the same line and voilà. Oh, and shrink the script to ~20 lines of course.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 04-30-2004 15:11

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 04-30-2004 15:52

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 04-30-2004 16:44

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 04-30-2004 17:32

InI: Wow, that looks amazing. Shame its not animated, that must be awesome, but hey.
Poi, Id love to see ur entry, but unfortunately Im at school. We use IE5. Which is really quite impresively stupid considering the number of holes that were found it it post-windows-source-leak .
DmS: If you could get it to 20 lines that would be awesome
norm: who cares if its childish? Its fun, and its a hell of a lot more useful than a page that will take 10 minutes to give you a (small) sphere

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 04-30-2004 18:02

wrayal: Why posting the source code while it's available online ?
The best I can do is to upload some full size screenshots ( click on the thumbnails ) :





InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 04-30-2004 19:06

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 05-01-2004 14:24

ok, unless there are any late entries (which are, of course, welcome), I propose we take a "vote" of sorts. I reckong InI should win cos its a very cool effect, and its only the limitations of the net preventing it being animated (I believe).

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-01-2004 16:22

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« BackwardsOnwards »

Show Forum Drop Down Menu