The complexity of the Web is changing daily, and its scope is growing just as fast, especially with 3D rendering.
WebGL is a JavaScript library for rendering 2D graphics and interactive 3D graphics within browsers. It is based on the architecture of the OpenGL. WebGL uses the GLSL shader language with C- syntax. WebGL uses HTML5 <canvas> element to get 3D graphics into the browser page.

Working with WebGL, and with shaders in particular, is rather time-consuming. In the development process, you need to describe each point, line, face, and so on. To render all this, we need to write a rather bulky piece of code. To increase the speed of development, Three.js library was developed.
Three.js is a JavaScript library containing a set of predefined classes for creating and displaying interactive 3D graphics in WebGL.
Three.js for WebGL is the same as jQuery for JavaScript. The library offers declarative syntax, and relieves the headache associated with 3D in the browser.
Let's look have a general overview of Three.js and see how to get started if you are new to the 3D world.

More about Three.js

Three.js library, as already mentioned, makes work with WebGL easier. When using Three.js, there is no need to write shaders (but the possibility remains), and it becomes possible to work with familiar concepts.

A large number of developers work on the library. The mastermind and developer is Ricardo Cobello, known under the creative pseudonym Mr.Doob.
Graphics modeling using Three.js can be compared with a film set, as we have the opportunity to manage concepts such as scene, light, camera, objects and their materials.
Three so-called pillars of the library include:
Three.js offers several types of cameras:
The most common ones are the Perspective and Orthographic Camera.

Perspective Camera

This is the most common projection mode used to render a 3D scene.
The perspective camera is designed to simulate what the human eye sees. The camera perceives all objects in a perspective projection: the further the object is, the smaller it seems.
The perspective camera takes 4 parameters: