diff --git a/src/core/Group.js b/src/core/Group.js index 206e5eb..72a7129 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -2,10 +2,11 @@ import { Group } from 'three'; import Object3D from './Object3D.js'; export default { - extends: Object3D, name: 'Group', + extends: Object3D, created() { this.group = new Group(); this.initObject3D(this.group); }, + __hmrId: 'Group', }; diff --git a/src/core/Object3D.js b/src/core/Object3D.js index 02b7ec2..e3ec902 100644 --- a/src/core/Object3D.js +++ b/src/core/Object3D.js @@ -2,6 +2,7 @@ import { watch } from 'vue'; import { bindProp } from '../tools.js'; export default { + name: 'Object3D', inject: ['three', 'scene', 'rendererComponent'], props: { position: { type: Object, default: { x: 0, y: 0, z: 0 } }, diff --git a/src/core/OrthographicCamera.js b/src/core/OrthographicCamera.js index dbb8d11..14dc5e2 100644 --- a/src/core/OrthographicCamera.js +++ b/src/core/OrthographicCamera.js @@ -28,7 +28,6 @@ export default { this.three.camera = this.camera; }, - render() { - return []; - }, + render() { return []; }, + __hmrId: 'OrthographicCamera', }; diff --git a/src/core/PerspectiveCamera.js b/src/core/PerspectiveCamera.js index e6443a0..7ba8e6c 100644 --- a/src/core/PerspectiveCamera.js +++ b/src/core/PerspectiveCamera.js @@ -30,4 +30,5 @@ export default { this.three.camera = this.camera; }, render() { return []; }, + __hmrId: 'PerspectiveCamera', }; diff --git a/src/core/Renderer.js b/src/core/Renderer.js index d6640e7..0a39747 100644 --- a/src/core/Renderer.js +++ b/src/core/Renderer.js @@ -82,4 +82,5 @@ export default { render() { return h('canvas', {}, this.$slots.default()); }, + __hmrId: 'Renderer', }; diff --git a/src/core/Scene.js b/src/core/Scene.js index 24ee9d8..82ef243 100644 --- a/src/core/Scene.js +++ b/src/core/Scene.js @@ -31,4 +31,5 @@ export default { render() { return this.$slots.default ? this.$slots.default() : []; }, + __hmrId: 'Scene', };