mirror of
https://github.com/troisjs/trois.git
synced 2024-11-23 20:02:32 +08:00
update build fix
This commit is contained in:
parent
56f049a070
commit
a57c44d968
@ -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
|
||||
})
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user