A Simple Discrete-Event Simulation: Part 66

A direct link to the standalone page is here.

I followed up today and set up the initialization of the 3D graphics so it happens only after all of the required resources were loaded.

The process is kicked off by the function called by the body element’s onload event. This is called when the entire page and its required sources have been successfully loaded.

The next key is to get everything that references the 3D graphics environment called for the first time in the initGraphics function. The function also starts off by getting handles to all user controls so it can re-enable them.

Here are most of the called functions. You’ve seen the verifyModel code before so I won’t repeat it here. It’s called because it initializes the 3D elements representing the simulation components and adds them to the scene. Note that the renderer.setClearColor("#000000",1); call explicitly sets the background color of the 3D scene, so it now renders properly on my 3rd gen iPad.

This entry was posted in Simulation and tagged , . Bookmark the permalink.

Leave a Reply