mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
commit
6f9251a5de
@ -18,10 +18,10 @@ export default defineComponent({
|
|||||||
components: { Box, Camera, LambertMaterial, PointLight, Renderer, Scene },
|
components: { Box, Camera, LambertMaterial, PointLight, Renderer, Scene },
|
||||||
mounted() {
|
mounted() {
|
||||||
const renderer = this.$refs.renderer as RendererPublicInterface
|
const renderer = this.$refs.renderer as RendererPublicInterface
|
||||||
const box = this.$refs.box as MeshPublicInterface
|
const mesh = (this.$refs.box as MeshPublicInterface).mesh
|
||||||
if (renderer && box) {
|
if (renderer && mesh) {
|
||||||
renderer.onBeforeRender(() => {
|
renderer.onBeforeRender(() => {
|
||||||
box.mesh.rotation.x += 0.01
|
mesh.rotation.x += 0.01
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user