Rhino3dm.js and vectors


trying to use rhino3dm from javascript (or, precisely, TypeScript). First thing I wanted to do was cross some vectors, but failed to find any vector operations in the API. Are these simply not there yet, or is there a reason? Or did I somehow miss how it works? Using compute for this kind of things seems a bit overkill.



Hello - are you asking about RhinoCommon?


You’re not missing anything. I still haven’t figured out a good way to implement very basic data types in rhino3dm like vectors beyond making them into an object or array of three numbers. I know it sounds crazy, but this has been a complicated part of working with web assemblies that I don’t have a good answer for yet.

1 Like

Thanks for the quick (and honest :slight_smile: reply, Steve. No worries - it’s clearly wip, and I can imagine the hardest problems when porting are in the basics where you are closest to the platform/language.

I got a bigger geometry-related Typescript project here and, knowing RhinoCommon inside-out, thought rhino3dm would be a perfect match. Still convinced that it will be at some point, but not yet…

Really appreciate the work you guys are doing towards other platforms and general web context with Rhino!