I have a problem reported by the console of Google Chrome. I am on Ubuntu 12.04. The problem in the console is :
Uncaught TypeError: Cannot read property 'rotation' of undefined(reported five times).
And I can modify the position without problem in the function init() with these lines :
object.position.y = 0;
Also, I declare my variable object as a global variable.
I create a scene by importing an object (obj +mtl) with THREE.OBJMTLLoader(). And then for animate my object I do :
object.rotation.y += 0.01;
The problem comes from the previous declaration. It's weird because it's working but I have this problem in the console. Do you know what could I do to fix it?
Thank you for your answers.