Open the file
ch7_Textured_Cube.html in your favorite HTML editor. This contains the simple lit cube example from the previous chapter. If you open it in an HTML5 browser, you should see a scene that looks like the following screenshot:
In this example we will add a texture map to this cube as shown here:
var texture = null;
configurefunction, add the following code, which creates the texture object, loads an image, and sets the image as the texture data. In this case, we'll use ...