The code snippet below seems to be causing some issues. It requires jquery and three.js to function properly. The problematic lines are as follows:
// change the view so looking at the top of the airplane
views[1].camera.position.set( 0,5,0 );
views[1].camera.lookAt(objectManager.airplane.position);
Interestingly, when these two lines are commented out, the two similar lines that come before them work as expected:
views[1].camera.lookAt(objectManager.airplane.position);
and
view.camera.position.set( 5,0,0 );
It appears that the call to camera.lookAt only functions correctly the first time. Subsequent calls do not make the camera follow the airplane object. I would greatly appreciate any help in identifying what might be going wrong here!
You can find the complete script below.
Thank you
$(function(){
// JavaScript code goes here
});