Bonus #2: Make Fire!

All modern computers are extremely complex systems. Nearly all of them have a part that’s dedicated to processing graphics: a Graphics Processing Unit or GPU. Any time we programmers can get the GPU to do work is a win because that frees up the Central Processing Unit, or CPU, to perform more game logic.

One of the many things GPUs are good at are “shader particles”—special points that can blend into a scene. Regular points, like those we used in the star field, won’t work for shader particles. We need a new kind of point. But first, we have to load a new code collection.

​ <body></body>
​ <script src=​"/three.js"​></script>
​ <script src=​"/physi.js"​></script>
»<script src=​"/spe.js"​></script> ...

Get 3D Game Programming for Kids, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.