1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-23 20:02:32 +08:00

gltf no animations

This commit is contained in:
RoYan 2021-12-24 14:05:53 +08:00
parent aee1719ed1
commit 447e4d9735
3 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ export default defineComponent({
this.$emit('before-load', loader)
loader.load(this.src, (fbx) => {
this.onLoad(fbx)
this.initObject3D(fbx)
}, this.onProgress, this.onError)
},
})

View File

@ -8,7 +8,8 @@ export default defineComponent({
const loader = new GLTFLoader()
this.$emit('before-load', loader)
loader.load(this.src, (gltf) => {
this.onLoad(gltf.scene)
this.onLoad(gltf)
this.initObject3D(gltf.scene)
}, this.onProgress, this.onError)
},
})

View File

@ -16,7 +16,6 @@ export default defineComponent({
methods: {
onLoad(model: TObject3D) {
this.$emit('load', model)
this.initObject3D(model)
},
onProgress(progress: ProgressEvent) {
this.progress = progress.loaded / progress.total