From a57c44d968e8fa3723e7cce8c93e5757ead9139d Mon Sep 17 00:00:00 2001 From: Sander Moolin Date: Wed, 26 May 2021 16:02:46 -0400 Subject: [PATCH] update build fix --- src/App.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index 45a4c8e..f5aeb96 100644 --- a/src/App.vue +++ b/src/App.vue @@ -18,12 +18,10 @@ export default defineComponent({ components: { Box, Camera, LambertMaterial, PointLight, Renderer, Scene }, mounted() { const renderer = this.$refs.renderer as RendererPublicInterface - const box = this.$refs.box as MeshPublicInterface - if (renderer && box) { + const mesh = (this.$refs.box as MeshPublicInterface).mesh + if (renderer && mesh) { renderer.onBeforeRender(() => { - if (box.mesh){ - box.mesh.rotation.x += 0.01 - } + mesh.rotation.x += 0.01 }) } },