Understanding points and sprites
As we do with most new concepts, we’ll start with an example. In the sources for this chapter, you’ll find an example called sprite.html
. Upon opening this example, you’ll see a minimalistic scene, containing a simple colored square:
Figure 7.1 – A single rendered sprite
You can use your mouse to rotate around this scene. One thing you’ll notice is that no matter how you look at the square, it will always look the same. For instance, the following screenshot shows a view of the same scene from a different position:
Figure 7.2 – A single rendered sprite will always be facing the camera
As you can see, the sprite is still angled toward the camera, and you can’t look behind it. You can think of a sprite as a 2D plane that always faces the camera. If you create a sprite without any properties, they are rendered as small, white, two-dimensional squares...