Let's take a step back to take a look at the big picture. We mentioned before that in our architecture we have defined three main functions that define the lifecycle of our WebGL application. These functions are:
configure, load, and
Up to this point, we have set up the scene writing the code for the
configure function. After that, we have created our JSON cars and loaded them by writing the code for the
load function. Now, we will implement the code for the third function: the
The code is pretty standard and almost identical to the
draw/render functions that we have written in previous chapters. As we can see in the following diagram, we set and clear the area that we are going to draw on, then we check on the ...