We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

lexan1982

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Animations from .gltf file #2138
    lexan1982
    Participant

    Do you see new Animations from new model at the v3dApp.mixer ?

    first do it, then do it right, then do it better.

    in reply to: Animations from .gltf file #1998
    lexan1982
    Participant

    1. I load new .gltf model with loader:

           const loader = window.v3dApp.loader;
            const url = ${Config.RESOURCES_URL + item.pathToModel}/scene.gltf
    
            // Load a glTF resource
            loader.load( url, gltf => {
    
                console.log('animations', gltf.animations); // Array<v3d.AnimationClip>
                console.log('scene', gltf.scene);           // v3d.Scene
    
                this.props.setPart(item, gltf);
            } );

    2. Then i add new mesh to the Scene:

        const group = window.v3dApp.scene.getObjectByName(pivotName);
    
         group.add(gltf.scene);
    

    3. But i do not know what to do with:

    gltf.animations[]

    first do it, then do it right, then do it better.

Viewing 2 posts - 1 through 2 (of 2 total)