That error means you haven’t defined an error function for your loader reference. There is an error, but the 3dmloader doesn’t know what to do with it because you haven’t defined an error function.
From looking at your repo, you have something like this:
loader.load( 'path/to/model.3dm', function ( object ) {
//...
} );
it should be something like this:
loader.load( 'path/to/model.3dm', function ( object ) {
// onLoad: object has loaded, do something with it
}, function( progress ) {
// onProgress: do something with progress info if you want
}, function( error ) {
// onError: do something with error. Good idea to have this, cause there is an error and the loader doesn't know how to tell you.
} );
@rafadelmolino. That instanceDefinitions().count is not a function error inside decodeObjects is almost always a version mismatch between the three.js 3DMLoader.js and the rhino3dm library it loads, rather than a bug in rhino3dm itself (the current API exposes count as a property, which is what the loader expects).
Could you share:
Your rhino3dm version and your three.js / 3DMLoader.js version (the mismatch is my leading suspect).
How you load the library, e.g. your setLibraryPath(...) value or the CDN URL.
A sample .3dm file that triggers the error, if possible.
Make sure the rhino3dm version matches the one the 3DMLoader in your three.js release was built against. If a matched pair still fails on a specific file, then it is a bug.
I recently released 8.32.1 and updated the loader as well.