Rhino3dm.js requires two files
rhino3dm.js. It is easiest to simply reference the latest build directly from our servers:
<!-- stuff --><!-- you get the idea -->
Download the files
If it would be better to download a static build locally, download the latest build of the two files:
Place these in the same folder. The
rhino3dm.js references the
Note: A list of builds is available on our Circleci project. You can replace latest with dujour/BUILD_NUMBER if you know what you're looking for!
rhino3dm.js is available on npm; try
npm install rhino3dm.
$ node> rhino3dm = // note the trailing "()"> sphere = 123 12
It takes a moment to load the ~5 MB wasm file – this happens asycnhronously. Unlike interactive usage, when scripting with
rhino3dm you can use the fact that the
rhino3dm() function returns a
# scriptjsrhino3dm =
The latest rhino3dm.js API Documentation
There a few samples are available in the Github Repo Samples folder
rhino3dm.js is used to read a 3dm file and create an instance of a File3dm class in the browser’s memory. It then walks through the objects in the model and calls compute.rhino3d.com to create meshes and isocurves for the polysurface. These meshes and isocurves are then added to a three.js scene for display.
Build from source
If the pre-compiled libraries above do not work in your situation, you can compile the libraries from their source. For detailed instructions go to rhino3dm.js and rhino3dm.wasm