LDraw.org Discussion Forums

Full Version: tool for converting DAT files into WebGL / three.js
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I started to create java library for parsing LDraw model into Abstract Syntax Tree (AST). It should allows perform various task with produced AST. For example model validation, converting to other formats and so on. LDraw parsing is based on antlr4 library. Project is in Java.

To prove that parsing works fine there is tool that convert DAT files into three.js JSON format. Three.js JSON could easily displayed in WebGL page. Simple example is at http://cubiculus.sourceforge.net/threejs-viewer.html.

You can download package with linux convertor to three.js JSON from here. Or whole project is at http://sourceforge.net/projects/cubiculus/

Could be this library useful for you? Do you see any errors, problems? I personally thought about 3D building instructions. Please let me know.