diff --git a/README.md b/README.md index 32962c7..91c7e2b 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,79 @@ npm run build ## Credits - [Vite Bundler](https://vitejs.dev/) -Made with 💜 by [SahilK-027](https://github.com/SahilK-027) \ No newline at end of file +## 🤨 What is WebGL? +WebGL is a JavaScript API that renders triangles in a canvas at a remarkable speed. It's compatible with most modern browsers, and it's fast because it uses the Graphic Processing Unit (GPU) of the visitor. + +WebGL can draw more than triangles and can also be used to create 2D experiences, but we will focus on 3D experiences using triangles for the course's sake. + +The GPU can do thousands of parallel calculations. Imagine that you want to render a 3D model and this model is constituted of 1000 triangles—which, come to think about it, is not that many. Each triangle includes 3 points. When we want to render our model, the GPU will have to calculate the position of these 3000 points. Because the GPU can do parallel calculations, it will handle all the triangles points in one raw. + +Once the model's points are well placed, the GPU needs to draw each visible pixel of those triangles. Yet again, the GPU will handle the thousands and thousands of pixels calculations in one go. + +The instructions to place the points and draw the pixels are written in what we call shaders. And let me tell you, shaders are hard to master. We also need to provide data to these shaders. For example: how to place the points according to the model transformations and the camera's properties. These are called matrices. We also need to provide data to help colorize the pixels. If there is a light and the triangle is facing that light, it should be brighter than if the triangle isn't. + +And this is why native WebGL is so hard. Drawing a single triangle on the canvas would take at least 100 lines of code. Good luck if you want to add perspective, lights, models, and animate everything in that case. + +But native WebGL benefits from existing at a low level, very close to the GPU. This enables excellent optimizations and more control. + +## 🤨 What is three.js ? +Three.js is a cross-browser JavaScript library and application programming interface used to create and display animated 3D computer graphics in a web browser using WebGL. The source code is hosted in a [repository](https://github.com/mrdoob/three.js/) on GitHub. +### See also +- [Three.js](https://en.wikipedia.org/wiki/Three.js) on Wikipedia +- [Three.js official website](https://threejs.org/) + +Three.js is the most popular JavaScript framework for displaying three-dimensional content on the web. +Three.js eliminates the need for a high-end gaming PC or console to display photorealistic 3D graphics. You don't even need to instal any software. With only a smartphone and a web browser, anyone can now experience stunning 3D applications in the palm of their hand. + +This incredible library, as well as the vibrant community that surrounds it, are all you need to create games, music videos, scientific and data visualisations, and pretty much anything else you can think of, right in your browser on your laptop, tablet, or smartphone! + +three.js + +## 💖 List of my favourite Three.js projects: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
(1)bruno-simonsBruno Simon's Portfolio Website
(2)imgCoastal World
(3)lusionlusion.co
(4)altMedal of honor
(5)imgHeraclos Game
(6)MIDWAMMIDWAM Company
(7)imgKnguru
(8)MIDWAMEnough
+ +### Made with 💜 by [SahilK-027](https://github.com/SahilK-027)