Topic awaiting preservation: "tutorial" : Drawing lines in JavaScript (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: France |
posted 03-31-2005 01:55
Tada! I just open an Articles section on my site. The first one covers a method I use to draw some lines in JavaScript and wrote ~4 years ago. It's damn easy, but surprisingly I've never seen it used elsewhere. |
Bipolar (III) Inmate From: United States |
posted 03-31-2005 02:27
I have to say that I like your tutorial. While I'm already pretty familiar with JS, I thought your tutorial was fully informative |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 03-31-2005 07:59 |
Paranoid (IV) Inmate From: France |
posted 03-31-2005 13:15
Slime: Indeed that's an option I tried too. Alas though the image is partially visible, it's still resized to incredibly big dimensions which slows down the process and render the method unusable for realtime applications. |
Paranoid (IV) Inmate From: USA |
posted 04-01-2005 14:24
Well, PO1, you could avoid that crazed resizing by simply having lots of images, and selecting just the one that's slightly larger than what you want. |
Nervous Wreck (II) Inmate From: Sweden |
posted 04-01-2005 17:53
Nice job Poi! |
Paranoid (IV) Inmate From: France |
posted 04-01-2005 18:43
Iron Wallaby: Nice suggestion. AFAIR I tried that too in the early stages of this algo, that is few years ago now, and don't remember precisely the reason for which I gave up the clipping technique. |
Obsessive-Compulsive (I) Inmate From: |
posted 04-02-2005 21:06
I'm sure some of you are familiar with this Javascript vector graphics library already, but just thought I'd throw it out there for those who haven't seen it: http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm |
Nervous Wreck (II) Inmate From: Sweden |
posted 04-05-2005 10:07
That library is pretty cool, and fast! The polygon rendering speed is much thanks to the fast filling algorithm. I ran a couple of performance tests to compare that library with the vector engine I wrote. For small polygons, mine is just a few milliseconds slower, but the difference is more noticable on huge polygons, impressive! |
Maniac (V) Mad Scientist From: New California |
posted 04-13-2005 16:18
Very cool work, poi. Thanks for the inspiration |