Topic: 20 Liners - January 08 - Dynamics (Page 2 of 4) |
|
---|---|
Paranoid (IV) Inmate From: cell 3736 |
posted 01-11-2008 14:31
quote:
|
Paranoid (IV) Inmate From: Switzerland |
posted 01-11-2008 14:38
Check my previous post that expresses clearly how much I value your work (end of page 1) Sincerely. |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-11-2008 15:24
argo navis: Ahh ... enough with the flattery I did read it. It's cool that you remember my Mandelbrot experiment. |
Paranoid (IV) Inmate From: Norway |
posted 01-11-2008 15:36
For anything related to transformations, blitting, etc... Canvas is king. |
Nervous Wreck (II) Inmate From: |
posted 01-14-2008 14:38
Kick ass, Arthurio. I like the effect, and I am duly impressed by the iterative improvement you have been displaying! |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-14-2008 21:12
Thank you very much kind sir |
Paranoid (IV) Inmate From: Norway |
posted 01-14-2008 23:43 |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-15-2008 00:14
poi: thanks ... btw ... looks like the calculation may easily take a lot more time than displaying the picture ... CPU load drops to 0 once the frames have been generated and stored in cache |
Paranoid (IV) Inmate From: Norway |
posted 01-15-2008 01:28
Normal, once you've cached the images, the browser only has to do one redraw per frame. Redraws are very fast. What's slow is when the browser needs to reflow the document. In your case it shouldn't happen since you forced the resolution of the image in CSS. Anyway one or two reflows per frame is fine too. It's a shame the number of reflows and redraws is little exposed in browsers. code: var[9][++var[3]%60]=getElementById('image').src=var[9][var[3]%60]||getmage(var[3]%60); |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-15-2008 02:11
thanks code: document.getElementById("image").src = vars[9][Math.floor((vars[3]=(vars[3]+Math.PI/60)%(Math.PI*2))*60)] = vars[9][Math.floor(vars[3]*60)]||getImage()
|
Paranoid (IV) Inmate From: Switzerland |
posted 01-15-2008 12:10
Mhhhyeah, good stuff. Colourful and well drawn, realistic. Thumbs up. |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-16-2008 19:28
I know there are 2 more weeks to go but where are your entries poi and argo navis? :P I want to be inspired |
Paranoid (IV) Inmate From: Norway |
posted 01-16-2008 19:35 |
Maniac (V) Mad Librarian From: Seoul, Korea |
posted 01-17-2008 03:02
Arthurio: nice flame, but it runs like molasses on my computer. I guess it's very processor intensive, and my processor ain't all that quick. |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-17-2008 09:31
Well yeah, the first 20-30 seconds or so it's basically loading but it gets a lot faster after that. |
Paranoid (IV) Inmate From: Switzerland |
posted 01-17-2008 12:29
Canvas doesn't seem too bad for pixels, lookie, Some good examples of Canvas in action. |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-17-2008 13:06
What browser/version are you using? |
Paranoid (IV) Inmate From: Norway |
posted 01-17-2008 14:24 |
Paranoid (IV) Inmate From: Switzerland |
posted 01-17-2008 14:44
Works a threat in Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.11) Gecko/20071127 |
Paranoid (IV) Inmate From: Norway |
posted 01-17-2008 15:42
Oh, glad to see it's in FF2! |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 01-22-2008 20:48
Hey guys, |
Paranoid (IV) Inmate From: Umeå, Sweden |
posted 01-22-2008 21:36
quote: I'd say you should count only the lines that actually contain executable code. Neither the "try{" nor the "}catch(e){" part does anything in and of themselves. I don't think a "try{}catch(e){}" should count as two lines, since it doesn't affect the program at any point. |
Paranoid (IV) Inmate From: Switzerland |
posted 01-22-2008 22:51
It completely does instead : it simply is a conditional operator like "for, if" and the likes - what's that to say? That if an else |
Paranoid (IV) Inmate From: Umeå, Sweden |
posted 01-22-2008 23:41
quote:
code: if(expr) stmt1; else stmt2;
code: try{ stmt1; stmt2; }catch(e){ stmt3; }finally{ stmt4; } I think stmt1, stmt2, stmt3, stmt4 are what counts, because they are what code is actually executable. code: /* A */ for( chainThat in {methodA:1,methodB:1} ) /* */ { /* B */ anObject.prototype[chainThat] = function( func ) /* */ { /* C */ return function() /* */ { /* D */ return func.apply( this, arguments )||this; /* */ } /* E */ }( anObject.prototype[chainThat] ); /* */ }
code: 1: for( chainThat in {methodA:1,methodB:1} ) 2: anObject.prototype[chainThat] = function( func ) {...} ( anObject.prototype[chainThat] ); 3: return function() {...} 4: return func.apply( this, arguments )||this; because B and E are a declaration-application pair, in one single expression, that is not a list expression. To illustrate what I mean better, consider the line count if it was split out to a separate declaration. The line count for that should be exactly equivalent to the line count for this: code: /* */ function fn( func ) /* */ { /* C */ return function() /* */ { /* D */ return func.apply( this, arguments )||this; /* */ } /* */ } /* A */ for( chainThat in {methodA:1,methodB:1} ) /* */ { /* B */ anObject.prototype[chainThat] = /* E */ fn( anObject.prototype[chainThat] ); /* */ }
|
Paranoid (IV) Inmate From: Switzerland |
posted 01-23-2008 02:07
I personally wouldn't even challenge it if it wasn't worth it. |
Paranoid (IV) Inmate From: Norway |
posted 01-23-2008 02:53
yup having more discussions in DHTML/Javascript would be a good idea. |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-26-2008 22:05
Made a little gadget. Not much visually. |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-27-2008 02:38 |
Paranoid (IV) Inmate From: Switzerland |
posted 01-27-2008 12:48
Good stuff all the way. The 3d effects reminds me of some "sunflower" OpenGL app I have made, which I may make public or not. |
Paranoid (IV) Inmate From: Norway |
posted 01-27-2008 21:44
It's time for some |
Paranoid (IV) Inmate From: Switzerland |
posted 01-27-2008 21:53
And probably not in Opera 9.2, it works strangely for me in that browser (it's not as smooth as in your screencap, gets a bit crippled). |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-27-2008 22:34
Wow code: ( (788-j*287)%1337 ) |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 01-27-2008 22:40
poi: It works in my Firefox 3.0 Alpha (assuming what it displays is correct - it looks close to your screencap ^_^) It doesn't however work in safari (expected :P). Just a couple of things: |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-27-2008 22:51
ahh yes ... works with my ff3 too ... almost the same as in opera 9.50b but there's some glow on the bottom of the canvas and the image looks much smoother (better) ... same thing that happens in ff and opera with embedded images only in reverse ... pixelated in opera, smooth in firefox |
Paranoid (IV) Inmate From: Norway |
posted 01-27-2008 23:09
Oh nice about Firefox 3. I tried a previous ( aka broken ) version of my script without success in it and only tried in Firefox 2 since then. |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 01-27-2008 23:22
I see...nice, I'd been looking at the chaining mechanism. Also prefer the new mechanism for the mouse - makes it give fewer super-erratic oscillations for me. |
Paranoid (IV) Inmate From: Norway |
posted 01-28-2008 02:29 |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-28-2008 10:19
poi: to get it working with ff2 you just need to edit line 09: |
Paranoid (IV) Inmate From: Norway |
posted 01-28-2008 14:34
Oh, thanks! quote: |
Paranoid (IV) Inmate From: cell 3736 |
posted 01-28-2008 14:56
quote:
code: ([1,2,1+2])[3] I think the 1+2 may get evaluated, no? |
« Previous Page — 1 [2] 3 4 — Next Page »