1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
This commit is contained in:
Kevin Levron 2021-03-07 15:14:34 +01:00
parent 302afc2a6d
commit 66b192670b
6 changed files with 8 additions and 4 deletions

View File

@ -2,10 +2,11 @@ import { Group } from 'three';
import Object3D from './Object3D.js'; import Object3D from './Object3D.js';
export default { export default {
extends: Object3D,
name: 'Group', name: 'Group',
extends: Object3D,
created() { created() {
this.group = new Group(); this.group = new Group();
this.initObject3D(this.group); this.initObject3D(this.group);
}, },
__hmrId: 'Group',
}; };

View File

@ -2,6 +2,7 @@ import { watch } from 'vue';
import { bindProp } from '../tools.js'; import { bindProp } from '../tools.js';
export default { export default {
name: 'Object3D',
inject: ['three', 'scene', 'rendererComponent'], inject: ['three', 'scene', 'rendererComponent'],
props: { props: {
position: { type: Object, default: { x: 0, y: 0, z: 0 } }, position: { type: Object, default: { x: 0, y: 0, z: 0 } },

View File

@ -28,7 +28,6 @@ export default {
this.three.camera = this.camera; this.three.camera = this.camera;
}, },
render() { render() { return []; },
return []; __hmrId: 'OrthographicCamera',
},
}; };

View File

@ -30,4 +30,5 @@ export default {
this.three.camera = this.camera; this.three.camera = this.camera;
}, },
render() { return []; }, render() { return []; },
__hmrId: 'PerspectiveCamera',
}; };

View File

@ -82,4 +82,5 @@ export default {
render() { render() {
return h('canvas', {}, this.$slots.default()); return h('canvas', {}, this.$slots.default());
}, },
__hmrId: 'Renderer',
}; };

View File

@ -31,4 +31,5 @@ export default {
render() { render() {
return this.$slots.default ? this.$slots.default() : []; return this.$slots.default ? this.$slots.default() : [];
}, },
__hmrId: 'Scene',
}; };