const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
const helper = new THREE.CameraHelper( camera );
scene.add( helper );
camera is like a window to our scene.When defining a camera we create
what is called a “frustum” — a mathematical term for a four-sided rectangular
pyramid with the top cut off.
const perspectiveCamera = new THREE.PerspectiveCamera(
50, // fov — Camera frustum vertical field of view.
width / height, // aspect — Camera frustum aspect ratio.
1, // near — Camera frustum near plane.
2000 // far — Camera frustum far plane.
);
two most useful camera are the perspective camera and the orthographic camera.
1)Perspective camera — depth perception is emulated in order to
reflect the way the human eye perceives the world.
2)Orthographic camera — there is no depth perception, so no matter where the
object is placed in the scene,it will look the same size. This is useful for
isometric games, for instance.
Code Example |
---|
Javascript :: bar chart height and with change in chart.js |
:: display none using jquery |
Javascript :: |
:: |
:: for of get index |
Javascript :: |
:: |
:: jquery post json example |
:: get the placeholder value jquery |
Javascript :: console log all events |
:: remove disabled attribute javascript |
:: mongodb find like |
:: battery percentage js |
Javascript :: javascript readfile |
Javascript :: |
:: |
Javascript :: |
Javascript :: javascript get base url |
Javascript :: angular viewchild input element value |
Javascript :: |
:: element is hidden jquery |
Javascript :: aabb javascript |
Javascript :: js generate random boolean |
Javascript :: |
Javascript :: validate aadhaar number in javascript |
Javascript :: scroll to javascript |
:: |
Javascript :: |
Javascript :: |
Javascript :: document.ready shorthand |