Simple LDraw viewer code in Processing
Posted by Andy at 7:16 PM
1 comments - Categories:
Lego | Programming | Processing
Well, here's the code that I wrote almost year and a half (!) ago, to display LDraw files using the Processing language.
It's very basic, without too many features, and it certainly isn't optimized, so don't try to display anything too big or complex.ᅠ It was written for Processing 1.0.1, I think, but it's been a while since I have had the time to look at it.ᅠ I think I included all of the library files for procesing that you'd need to build it, but you have to place them in the normal place in the Processing install folders.ᅠ I also included the LDR models that I was using for testing.
You'll need to download Processing, install it and the libraries, and you'll need to have the LDraw parts library installed on your machine.ᅠ I have the location of the LDraw parts library hard coded in the file for now.
Here's the zip: ProcessingLcad-Oct2008.zip
If I remember correctly, I needed to consult several message boardsᅠon some of the math/matrix type stuff while I was working on it...ᅠ It was pretty intense.
I'd love to hear if anyone does anything with it, so please drop me a line on here if you do.ᅠ
Jim wrote on 01/12/10 1:22 AM
I can't help myself - I spent the evening paring this down into a super-simplified viewer that can display a fully-inlined model online:http://anoved.net/files/alvlite-test/
With more thought and patience, I think more features can be retained and we'll have a decent online viewer for small models.