Rhino3dm.js demos

@fraguada, I’ve been working on a simple js app based on your rhino3dm.js samples. It is my first foray into JS and I noticed you recently did some changes to those files on GitHub. I’m curious about the reasons for two changes in particular:

Some of this is due to personal preferences, though there are technical differences. If you want to read further, I suggest this MDN article: JavaScript modules - JavaScript | MDN
I personally prefer this as it is easier for me to understand how I would split up code into individual components. Also, I don’t need to clutter the html with a ton of <script> tags.

I think we just haven’t published 0.15.0. @will were trying some things related to how we compile rhino3dm.js so that it could be imported as a module. I believe we’ve kicked the tires on it enough to eventually publish a non-beta version.

Thanks for the link! I have been trying to find ways to modularize my code and I wasn’t aware of this.

1 Like