gkjohnson / urdf-loaders

URDF Loaders for Unity and THREE.js with example ATHLETE URDF Files open sourced from NASA JPL
https://gkjohnson.github.io/urdf-loaders/javascript/example/bundle/index.html
Apache License 2.0
469 stars 121 forks source link

dragging in simple example #270

Closed Jayce-liang closed 1 year ago

Jayce-liang commented 1 year ago

Can the joints of the model only be dragged or moved when loaded using urdf-viewer component ?

If you can't achieve joint dragging like this, right?

 // Load robot
    const manager = new LoadingManager();
    const loader = new URDFLoader(manager);
    loader.load('../../../urdf/T12/urdf/T12_flipped.URDF', result => {
        robot = result;
    });
    // wait until all the geometry has loaded to add the model to the scene
    manager.onLoad = () => {
        scene.add(robot);
    };
gkjohnson commented 1 year ago

No - the URDFLoader is just a model loader so no automatic dragging. Any interactions will have to be added yourself. The dragging in the demo is only available in the web component. You can take a look at the source of the project to see how it's done - some of it may currently be reusable.

Jayce-liang commented 1 year ago

No - the URDFLoader is just a model loader so no automatic dragging. Any interactions will have to be added yourself. The dragging in the demo is only available in the web component. You can take a look at the source of the project to see how it's done - some of it may currently be reusable.

thank you reply. I used the webcomponent from the example in vue2 and it worked.