// 加载两个模型的场景数据 Promise.all([ new THREE.GLTFLoader().loadAsync('novid.gltf'), new THREE.GLTFLoader().loadAsync('withani.gltf') ]).then((results) => { const [animData, staticData] = results;
// 添加动画到静态模型 animData.animations.forEach(clip => { staticData.animations.push(clip); });
// 在场景中添加模型 const gltfScene = staticData.scene; document.querySelector('a-scene').object3D.add(gltfScene); });
参考资料: