1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 20:32:02 +08:00
trois/src/core/Scene.js
Kevin Levron 26ab54bd66 wip
2020-09-15 14:59:34 +02:00

27 lines
400 B
JavaScript

import { Scene } from 'three';
export default {
props: {
id: String,
},
setup () {
const scene = new Scene();
return { scene };
},
inject: ['three'],
provide() {
return {
scene: this.scene,
};
},
mounted() {
this.three.scene = this.scene;
},
render() {
if (this.$slots.default) {
return this.$slots.default();
}
return [];
},
};