1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

improve gltf model

This commit is contained in:
Kevin Levron 2021-03-13 16:59:53 +01:00
parent a283ac7c8f
commit d8cc705b99

View File

@ -3,13 +3,14 @@ import Object3D from '../core/Object3D.js';
export default {
extends: Object3D,
emits: ['loaded'],
props: {
src: String,
cameraPosition: Object,
},
created() {
const loader = new GLTFLoader();
loader.load(this.src, (gltf) => {
this.$emit('loaded', gltf);
this.initObject3D(gltf.scene);
});
},