What is Three.js ?

We know there are a lot of graphics and games that run on a web browser. It cannot be run just using HTML or CSS. Web Graphics Library  is a JavaScript API we use to render three dimensional objects, 2-dimensional objects and Graphics. Even though it is very useful it has some drawbacks. It is a low level system so it can draw only basic objects. This is where Three.js comes in. It is an open source  library. Three.js is used to display graphics, 3D and 2D objects in your browser. Three.js does not need any third party plugins to run it. To use Three.js in your project you need to include it. Include any of the following files three.js, three.min.js, three.module.js. Another way to use it in your project is as follows. Open your command prompt and type the following command.

npm i three

Then import three.js

import * as THREE from "three";

Three.js is lightweight and it is easy to use. It has JavaScript language features and it can be used in TypeScript projects with lesser configuration. You can refer to some examples from threejs.org  here.