May 2014
Intermediate to advanced
306 pages
8h 8m
English
After parsing and displaying the data from a single stock, we will now display the data from multiple stocks in a single scene. The level of programming jumps significantly when we grow from showing just a single stock value to showing two or more. We shall do this now by showing data from five stocks.
Not surprisingly, growing from displaying one stock to five stocks means that we have to deploy an array constructed with the global variable var stockBoxObject = [];. We will build the boxes that will represent our stock data inside webGLStart():
stockBoxObject[0] = AddMeshObject("texturedBox0", "texturedBox.obj",[-5.5, -3.0, -16.0], [1, 1, 1], [0, 0, 0], false ); …… stockBoxObject[4] = AddMeshObject("texturedBox4", ...Read now
Unlock full access