Programming 3D software that runs in the browser

Square

If  you started programming on a desktop computer, and for a desktop computer, you might sometimes be bewildered by the proliferation of software designed to run in the cloud, in the browser, as a service, etc.

CAD and Simulation software has not been immune to this “sassy”-fication. (SAAS=Software as a Service)

Onshape® is a popular browser based CAD program competing with SolidWorks® (the company has former SolidWorks developers on board). Even SolidWorks can now run in the cloud, and Autodesk® has several cloud based offerings as well.

To keep up with the trend of subscription models, a developer needs to understand how to leverage open-source libraries that give a modern web browser 3D powers. One such popular library is three.js (https://threejs.org/)

Javascript is a great language for web programming, though its asynchronous nature might take a bit of getting used to for a desktop developer. But once you learn the basics of Javascript, you can find a plethora of libraries and frameworks that are free and open and allow you to code pretty much anything you can dream of to run in the browser or on a server (node.js).

Three.js is very simple to set get started with. You download the archive, copy the three files with .js extension in the build folder to a location that is easier to reference, then create an html file with the code in the documentation example.

Make sure it references the correct path for the .js libraries, then open the html file up and see a nice spinning cube in the browser.

From there, the (3D) sky is the limit!

 

Leave a Reply