Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/troisjs/trois into master
Browse files Browse the repository at this point in the history
  • Loading branch information
klevron committed Jun 8, 2021
2 parents bea23d4 + 6f9251a commit 772d1b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +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(() => {
box.mesh.rotation.x += 0.01
mesh.rotation.x += 0.01
})
}
},
Expand Down

0 comments on commit 772d1b2

Please sign in to comment.