js/util.js
/**
 * Initialize a simple camera and point it at the center of a scene
 * 
 * @param {THREE.Vector3} [initialPosition]
 */
Initialize a simple camera and point it at the center of a scene


Initialize a simple camera and point it at the center of a scene
function initCamera(initialPosition) {
    var position = (initialPosition !== undefined) ? initialPosition : new THREE.Vector3(-30, 40, 30);
    var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000);
    camera.position.copy(position);
    camera.lookAt(new THREE.Vector3(0, 0, 0));
    return camera;
}
function initCamera ( initialPosition ) { var position = ( initialPosition !== undefined ) ? initialPosition : new THREE . Vector3 ( - 30 , 40 , 30 ) ; var camera = new THREE . PerspectiveCamera ( 45 , window . innerWidth / window . innerHeight , 0.1 , 1000 ) ; camera . position . copy ( position ) ; camera . lookAt ( new THREE . Vector3 ( 0 , 0 , 0 ) ) ; return camera ; }
Initialize a simple camera and point it at the center of a scene
Initialize a simple camera and point it at the center of a scene