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';
|
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',
|
||||||
};
|
};
|
||||||
|
@ -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 } },
|
||||||
|
@ -28,7 +28,6 @@ export default {
|
|||||||
|
|
||||||
this.three.camera = this.camera;
|
this.three.camera = this.camera;
|
||||||
},
|
},
|
||||||
render() {
|
render() { return []; },
|
||||||
return [];
|
__hmrId: 'OrthographicCamera',
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
@ -30,4 +30,5 @@ export default {
|
|||||||
this.three.camera = this.camera;
|
this.three.camera = this.camera;
|
||||||
},
|
},
|
||||||
render() { return []; },
|
render() { return []; },
|
||||||
|
__hmrId: 'PerspectiveCamera',
|
||||||
};
|
};
|
||||||
|
@ -82,4 +82,5 @@ export default {
|
|||||||
render() {
|
render() {
|
||||||
return h('canvas', {}, this.$slots.default());
|
return h('canvas', {}, this.$slots.default());
|
||||||
},
|
},
|
||||||
|
__hmrId: 'Renderer',
|
||||||
};
|
};
|
||||||
|
@ -31,4 +31,5 @@ export default {
|
|||||||
render() {
|
render() {
|
||||||
return this.$slots.default ? this.$slots.default() : [];
|
return this.$slots.default ? this.$slots.default() : [];
|
||||||
},
|
},
|
||||||
|
__hmrId: 'Scene',
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user