Monthly Archives: February 2014

Posing and Animating a 3D Stick Figure in JavaScript

The program given below, when run, displays a real-time animation of a stick figure. The figure is made up of a tree of “bones”, each of which represents a rigid rod of fixed length that can change the orientation of … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Performing Rotation with Quaternions in JavaScript

The JavaScript code below performs some rotations on a set of coordinates around a pair of axes, using quaternions to do the calculations. To see the code in action, copy it into a .html file and open that file in … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Scrolling a Simple Top-Down Map in JavaScript

The JavaScript code listed below implements a simple, scrollable, top-down map made of colored tiles. To see the code in action, copy it into an .html file and open that file in a web browser that runs JavaScript.  Or, for … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

A Research Engine for a Game in JavaScript

The JavaScript code listed below implements a simple “technology tree” for a computer game (like the ones in, for example, _Civilization_ or _Master of Orion_ (I think)). To see the code in action, copy it into an .html file and … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

A Simple Side-Scrolling Platformer Game in JavaScript

The JavaScript code shown below implements a very simple side-scrolling platformer game in JavaScript. To see the code in action, copy it into an .html file and open that file in a web browser that runs JavaScript. Or, for an … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments