mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
wip
This commit is contained in:
parent
302afc2a6d
commit
66b192670b
@ -2,10 +2,11 @@ import { Group } from 'three';
|
||||
import Object3D from './Object3D.js';
|
||||
|
||||
export default {
|
||||
extends: Object3D,
|
||||
name: 'Group',
|
||||
extends: Object3D,
|
||||
created() {
|
||||
this.group = new Group();
|
||||
this.initObject3D(this.group);
|
||||
},
|
||||
__hmrId: 'Group',
|
||||
};
|
||||
|
@ -2,6 +2,7 @@ import { watch } from 'vue';
|
||||
import { bindProp } from '../tools.js';
|
||||
|
||||
export default {
|
||||
name: 'Object3D',
|
||||
inject: ['three', 'scene', 'rendererComponent'],
|
||||
props: {
|
||||
position: { type: Object, default: { x: 0, y: 0, z: 0 } },
|
||||
|
@ -28,7 +28,6 @@ export default {
|
||||
|
||||
this.three.camera = this.camera;
|
||||
},
|
||||
render() {
|
||||
return [];
|
||||
},
|
||||
render() { return []; },
|
||||
__hmrId: 'OrthographicCamera',
|
||||
};
|
||||
|
@ -30,4 +30,5 @@ export default {
|
||||
this.three.camera = this.camera;
|
||||
},
|
||||
render() { return []; },
|
||||
__hmrId: 'PerspectiveCamera',
|
||||
};
|
||||
|
@ -82,4 +82,5 @@ export default {
|
||||
render() {
|
||||
return h('canvas', {}, this.$slots.default());
|
||||
},
|
||||
__hmrId: 'Renderer',
|
||||
};
|
||||
|
@ -31,4 +31,5 @@ export default {
|
||||
render() {
|
||||
return this.$slots.default ? this.$slots.default() : [];
|
||||
},
|
||||
__hmrId: 'Scene',
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user