Setting up Andy’s LDraw Viewer
Andy has posted the Processing code for the nifty little LDraw viewer I mentioned in my previous post.
Processing gives you a decent among of guidance, but for your reference here’s what I did to get this up and running:
- Download and unzip
ProcessingLcad-Oct2008.zip. - Rename the
LcadTest-Oct2008folder toLcadTest01in order to match the project file it contains. - Move the contents of the
LcadTest01/libs/folder to your Processing sketchbooklibrariesfolder. In my case, it is/Users/anoved/Documents/Processing/libraries/. - Move the contents of the
LcadTest01/models/folder to themodelssubfolder of your LDraw library. Alternatively, you can editLcadTest01.pdeto load a model of your choice. - Open
LcadTest01.pdeand editBaseDirto identify your LDraw library folder. In my case, it is/Users/anoved/Documents/LDraw/.
Lastly, if the capitalization of the LDConfig.ldr file in your LDraw library does not match that specified later in LcadTest10.pde, edit one or the other so they are in agreement.
Now you can take it for a spin. And, yes, this viewer can load files with Unix line endings. ☺
Posted on Monday, January 11th, 2010. Tags: code, LEGO, processing.


2 Responses to “Setting up Andy’s LDraw Viewer”
Posted by Robin "GreenLead" Chang on Thursday, February 25th, 2010 at 4:29 PM.
Way too cool, Jim. I’m very very tempted to have a similar setup
for the Alpha Company Forums to display official models created for
the group.
Posted by Jim on Thursday, February 25th, 2010 at 6:15 PM.
I’m glad you’re intrigued! I’ve got an update for the online viewer partially planned out, but it’s in the back of the project rotation at the moment. I hope to make it a bit more efficient. Eventually, the goal is indeed to make it feasible to embed a cross-platform 3D version of an LDraw model in a web page with minimal format conversion.