function render() {
requestAnimationFrame(render);
renderer.render(scene, camera);
// cube animation
cube.rotation.x += 0.01;
cube.rotation.y += 0.05;
}
// call render function to render cube
render().cube.rotation.x += 0.9;
I want to access cube.rotation outside of the function. Is this possible?