Threejs three component scenarios (scene), Camera, and renderer (renderer).
With these 3 components, objects can be rendered to a Web page.
1.scene-----containers for all items
In the Threejs scene is only one, with Three.scene to represent, to build a scene is also very simple, as long as the new object can be, the code is as follows:
var scene = new three. Scene ();
The scene is a container for all objects, and if you want to display an apple, you need to add the Apple object to the scene.
2.camera----Observing the object's perspective
The camera determines the view of that angle in the scene to be displayed. The camera is like a human eye, people stand in different positions, looking up or down to see different views.
There is only one scene, but there are many different cameras. As in reality, different cameras identify all aspects of the phase. For example, some cameras are suitable for portraits, some cameras are suitable for landscapes, and professional photographers choose different cameras depending on the actual use. For programmers, just setting different camera parameters can make the camera look differently.
There are a variety of cameras in Threejs, two of which are:
Perspective Camera (Three.perspectivecamera)
3.renderer----Draw where, how the way
The renderer determines what elements of the render should be drawn on the page, and in what way.
three.js-002