[Vuejs]-How to use ThreeJS with VueJS

6👍

✅

Your problem is not related to VueJS /ThreeJs, you should simply fix this line :

requestAnimationFrame( this.animate() );

It should be :

requestAnimationFrame(this.animate)

Please read more about callback : https://developer.mozilla.org/en-US/docs/Glossary/Callback_function

EDIT: You can try TroisJS, easy ThreeJS integration with VueJS : https://github.com/troisjs/trois

Leave a comment