First, let's create and explain the necessary tools to draw things on the screen, such as an engine that will handle a scene to draw a 3D object and use a camera and light.
The engine is the core of Babylon.js and a scene allows you to create and manage entities that you'll draw on the screen (objects, lights, cameras, and so on), thanks to an engine. You can see the engine like a gateway to communicate with the video card (GPU) while a scene is a high-level interface that handles the following multiple entities:
- 3D objects (more on this in Chapter 3, Create, Load, and Draw 3D Objects on the Screen)
- Cameras
- Lights
- Particle systems (smoke, rain, and others)
- Textures
- Skeletons (animated 3D objects)
- Post-processes (effects)
- Materials (more on this in Chapter 4, Using Materials to Customize 3D Objects Appearance)
- Sprites
In other words, a scene handles multiple entities and will call the engine to draw these entities on the screen.
To draw on the...