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:
parent
a283ac7c8f
commit
d8cc705b99
@ -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);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user