mcneel / rhino-developer-samples

Rhino and Grasshopper developer sample code
http://developer.rhino3d.com
Other
622 stars 331 forks source link

why not must setPath librayPath? #49

Closed PachVerb closed 2 years ago

PachVerb commented 2 years ago

When I am using 3dmLoader, why do I have to set the librarypath? Can this step be omitted?

just,like-this:

loader = new Rhino3dmLoader();
// loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@7.11.1/' );
loader.load( 'http://127.0.0.1:5502/shoe/shoe.3dm', function ( object ) {
debugger
console.log(object);1
scene.add( object );
render()
}, (e) => {
        console.log(e)
}, (e) => {
        console.log(e)
})

not

// open 
loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@7.11.1/' );

help !

fraguada commented 2 years ago

The 3dmLoader depends on the rhino3dm library. This is the path to the library.