Giter Club home page Giter Club logo

buildinginstructions.js's Introduction

buildinginstructions.js

Render LEGO building instructions in the browser using three.js and the LDraw parts library.

See this project visualized on BrickHub.org

Sample image of a model generated using buildinginstructions.js

How To Install Locally

After copying the files in this repository, you can view sample_view.htm for how to set up a render. This sample is less than 100 lines and provides a good starting point that is easy to grasp.

See sample_instructions.htm for how to set up building instructions, including options for personalization. This is a very involved sample file reflecting the instructions on BrickHub.org.

If you want to view additional models, then add the necessary LDraw files directly to the 'ldraw_parts' directory. Downloaded files from the LDraw parts library should thus result in a file structure as follows:

  • /ldraw_parts - Contains all parts from '/p' and '/parts', such as '1.dat' and '1-4cylc3.dat'.

  • /ldraw_parts/8 - Place the content of '/p/8' here.

  • /ldraw_parts/48 - Place the content of '/p/48' here.

  • /ldraw_parts/s - Place the content of '/parts/s', such as '10s01.dat' here.

These files fetch data asynchroneously, so opening them in your browser might not work out of the box due to default security settings. To get around this you can either host the files on a local server or disable the browser checks. As an example, Chrome can be started with the following parameters in order to disable these security settings:

 --disable-web-security --user-data-dir=some_directory_where_it_is_ok_that_chrome_saves_a_lot_of_files

Feel free to raise issues or make pull requests. The project is in active development.

Vision

  • Generate LEGO building instructions quickly in any web browser.

  • Automatically modify LEGO building instructions to make the LEGO models easier to build.

  • Contribute to a fun user experience for LEGO builders of all ages.

  • Reduce paper waste by replacing the need of traditional building instructions.

  • Become a valuable addition to the LDraw suite of applications.

License

buildinginstructions.js is in the Public Domain.

The LDraw library is redistributable under CCAL version 2.0 : see CAreadme.txt.

Three.js and OrbitControls.js use the MIT license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.