Home › Forums › Programming › Animations from .gltf file
Tagged: animation
- This topic has 7 replies, 3 voices, and was last updated 7 years, 9 months ago by
xfish3.
-
AuthorPosts
-
2018-02-07 at 9:08 am #1991
lexan1982ParticipantHi, i have scene with animations. By user click i replacing some mesh. For this i removing old mesh from the v3dApp.scene. Then i load new .gltf file with v3dApp.loader and add it to the scene. But this model’s animation do not work.
How could i add Animations from gltf.animation[] to the exists v3dApp.mixer?
Thank you.
first do it, then do it right, then do it better.
2018-02-07 at 12:50 pm #1997
Yuri KovelenovStaff2018-02-07 at 1:13 pm #1998
lexan1982Participant1. 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.
2018-02-12 at 12:19 pm #2136
Yuri KovelenovStaff2018-02-12 at 2:55 pm #2138
lexan1982ParticipantDo you see new Animations from new model at the v3dApp.mixer ?
first do it, then do it right, then do it better.
2018-02-13 at 3:12 pm #2144xfish3
ParticipantI, too, like a beginner, still have questions.
Yuri, could you make a lesson with an example of creating a simple application on Verge3D? At least for example with one cube, which begins to rotate immediately after loading and one monkey, starting to rotate after clicking on it.
It is very desirable that the lesson be a video. To make it clearer, where to begin the development process.2018-02-13 at 3:22 pm #2146
Yuri KovelenovStaffWe’ll definitely do some lessons. For now you can watch this very helpful tutorial: https://www.youtube.com/watch?v=K-YlwMlVV6A which covers some basics. Also check out the Beginner Guide
2018-02-13 at 4:20 pm #2147xfish3
ParticipantThank you! A great lesson!
-
AuthorPosts
- You must be logged in to reply to this topic.
