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 { export default {
extends: Object3D, extends: Object3D,
name: 'Group',
created() { created() {
this.group = new Group(); this.group = new Group();
this.initObject3D(this.group); this.initObject3D(this.group);
}, },
__hmrId: 'Group',
}; };

View File

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

View File

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

View File

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

View File

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

View File

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