var camera, scene, renderer;
var windowHalfX = window.innerWidth / 2;
var windowHalfY = window.innerHeight / 2;
camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 100, 10000 );
camera.position.z = 1000;
四個屬性分別是,攝像機的視錐角度,視口的長寬比,攝像機的近切面(Front Clipping Plane)和遠切面(Back Clipping Plane),這樣就肯定了攝像機的視錐。spa
position.z是垂直於屏幕,也就是近切面遠切面的距離。code
固然還能夠經過camera.lookAt來調整camera的朝向,不過在這裏不必。blog