Game Development Reference
In-Depth Information
The latest versions of Chrome and IE contain a full debugger out of the box. It allows setting
breakpoints in the JavaScript code, debugging it step-by-step, and examines variables in a
watch window.
For Firefox, there is an add-on called Firebug ( http://getfirebug.com ) that is also a full
debugger. It contains similar features to the Chrome and IE built-in debuggers.
It is important to become familiar with these tools before setting off on any non-trivial debugging session.
A better editor
The Windows Notepad can save text files, but it is hardly ideal for programming. For my JavaScript coding,
I use ActiveState Komodo Edit ( www.activestate.com/komodo-edit ), a convenient and free editor that can
do syntax highlighting for JavaScript (and other languages). A nice feature of this editor is that it can open
and save files directly to FTP servers. This is useful when working in a development environment on a
remote server.
3D models and geometry
A minimal WebGL rendering engine allows for displaying a simple, 3D object centered on the 3D canvas.
An initial code base that does this is the foundation for any WebGL application. The specific details for
implementing it are described in Chapter 7 of this topic and in the learningwebgl.com tutorials. In this
section, I will discuss what is usually the next step in writing a 3D application: getting or creating the actual
3D models to be displayed. The most common representation of a 3D model is a triangle mesh, otherwise
known as a “triangle soup.” A triangle mesh is a collection of triangles in 3D space that are connected
along their edges.
Figure 8-2. Two 3D models of a sphere. The right is a triangle mesh, the left is quad mesh.
 
Search WWH ::




Custom Search