WebGL Textures & Vertices
Object Oriented Design
The source files
encapsulate methods and properties to
initialize and display the book's
bundle methods, and properties together.
True object oriented encapsulation also hides
methods and properties.
This book uses the word,
together within a file.
The sections titled
Initialization, Controller Details,
cover most of the functionality
contained in a separate file.
For example to texture a square plane use
GLSquare.js. To tile a graphic
To generate procedural textures
section in the table of contents for full
methods and properties to prepare
WebGL textures and meshes, for the example projects.
Entity Details section,
and the full GLEntity source code.
initializes WebGL buffers and
shaders for the book's examples.
Controller Details section
and the full
GLControl source code.
The source code includes a few features for optimization and efficiency. For example, projects store vertex and texture coordinate data in one buffer. One element array buffer accesses both vertex and texture coordinates indirectly. In other words the source code combines or packs data to use fewer resources. If these terms seem unfamiliar, then read on for details.
The next few books in the series
Online 3D Media with WebGL,
take advantage of the framework
For example, some books use texture atlases to upload
a series of images as one texture.
The Book's Structure
First we provide an overview of vertices, meshes, and textures.
Next we cover the
Lighthouse Texture Map, Crop a Texture Map, Tile a Texture Map,
Display Repeating Graphic, and
Then we focus on initialization with the supporting
GLControl.js and entity file
Last we cover the
Animated Rotation project
which works closely with the controller.