diff --git a/src/App.vue b/src/App.vue index 89e5f94..45a4c8e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -21,7 +21,9 @@ export default defineComponent({ const box = this.$refs.box as MeshPublicInterface if (renderer && box) { renderer.onBeforeRender(() => { - box.mesh.rotation.x += 0.01 + if (box.mesh){ + box.mesh.rotation.x += 0.01 + } }) } },