From 302afc2a6db03f9874f4f85ade6a52d236e34343 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Sun, 7 Mar 2021 13:22:54 +0100 Subject: [PATCH] add name (wip) --- src/core/Group.js | 2 +- src/core/OrthographicCamera.js | 2 +- src/core/PerspectiveCamera.js | 8 +++----- src/core/Renderer.js | 1 + src/core/Scene.js | 1 + src/meshes/Mesh.js | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/Group.js b/src/core/Group.js index 9b2ca7f..206e5eb 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -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', }; diff --git a/src/core/OrthographicCamera.js b/src/core/OrthographicCamera.js index a22370c..dbb8d11 100644 --- a/src/core/OrthographicCamera.js +++ b/src/core/OrthographicCamera.js @@ -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', }; diff --git a/src/core/PerspectiveCamera.js b/src/core/PerspectiveCamera.js index 515612b..e6443a0 100644 --- a/src/core/PerspectiveCamera.js +++ b/src/core/PerspectiveCamera.js @@ -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 []; }, }; diff --git a/src/core/Renderer.js b/src/core/Renderer.js index e164da6..d6640e7 100644 --- a/src/core/Renderer.js +++ b/src/core/Renderer.js @@ -2,6 +2,7 @@ import { h } from 'vue'; import useThree from './useThree'; export default { + name: 'Renderer', props: { antialias: Boolean, alpha: Boolean, diff --git a/src/core/Scene.js b/src/core/Scene.js index 5562c28..24ee9d8 100644 --- a/src/core/Scene.js +++ b/src/core/Scene.js @@ -2,6 +2,7 @@ import { Scene, Color } from 'three'; import { watch } from 'vue'; export default { + name: 'Scene', inject: ['three'], props: { id: String, diff --git a/src/meshes/Mesh.js b/src/meshes/Mesh.js index e609387..4a2c15f 100644 --- a/src/meshes/Mesh.js +++ b/src/meshes/Mesh.js @@ -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', };