1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

add name (wip)

This commit is contained in:
Kevin Levron 2021-03-07 13:22:54 +01:00
parent 9319a76a33
commit 302afc2a6d
6 changed files with 8 additions and 8 deletions

View File

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

View File

@ -3,6 +3,7 @@ import { watch } from 'vue';
import { bindProp } from '../tools.js';
export default {
name: 'OrthographicCamera',
inject: ['three'],
props: {
left: { type: Number, default: -1 },
@ -30,5 +31,4 @@ export default {
render() {
return [];
},
__hmrId: 'OrthographicCamera',
};

View File

@ -1,8 +1,9 @@
import { PerspectiveCamera, Vector3 } from 'three';
import { PerspectiveCamera } from 'three';
import { watch } from 'vue';
import { bindProp } from '../tools.js';
export default {
name: 'PerspectiveCamera',
inject: ['three'],
props: {
aspect: { type: Number, default: 1 },
@ -28,8 +29,5 @@ export default {
this.three.camera = this.camera;
},
render() {
return [];
},
__hmrId: 'PerspectiveCamera',
render() { return []; },
};

View File

@ -2,6 +2,7 @@ import { h } from 'vue';
import useThree from './useThree';
export default {
name: 'Renderer',
props: {
antialias: Boolean,
alpha: Boolean,

View File

@ -2,6 +2,7 @@ import { Scene, Color } from 'three';
import { watch } from 'vue';
export default {
name: 'Scene',
inject: ['three'],
props: {
id: String,

View File

@ -4,6 +4,7 @@ import Object3D from '../core/Object3D.js';
export default {
extends: Object3D,
name: 'Mesh',
props: {
castShadow: Boolean,
receiveShadow: Boolean,
@ -64,5 +65,4 @@ export default {
if (this.geometry) this.geometry.dispose();
if (this.material) this.material.dispose();
},
__hmrId: 'Mesh',
};