Tag Archives: 3D

Rendering to Texture with WebGL

The JavaScript program below, when run, will display a simple three-dimensional scene rendered with WebGL. It is nearly identical to a program from a previous post, except that this version demonstrates how to render a scene to a texture, rather … Continue reading

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

A Rudimentary Mesh Editor in JavaScript

The code below implements a rudimentary editor for three-dimensional forms called “meshes”. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript. Or, for an online version, visit … Continue reading

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

A Parallelization-Ready Ray Tracer in JavaScript

The JavaScript code below implements a ray tracer in JavaScript. It is based on an earlier version in a previous post, but has been cleaned up and refactored somewhat, with an eye towards eventually making splitting the view to be … Continue reading

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

An Aerial Combat Game in JavaScript

The JavaScript code below implements a simple 3D aerial combat (“dogfight”) game. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript. Use the W, A, S, D … Continue reading

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

Exploring the COLLADA File Format in JavaScript

The JavaScript code below, when run, presents the user with a file upload button. When a .dae file is uploaded, it parses that file into a 3D scene and displays that scene as wireframes. The program, as it stands, it … Continue reading

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

A 3D Maze Game in JavaScript

The code below implements a simple 3D maze game in JavaScript. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript. Or, to play an online version, visit … Continue reading

Posted in Uncategorized | Tagged , , , , | 1 Comment

Drawing a 3D Scene in JavaScript Using WebGL

The code included below uses HTML5’s experimental WebGL functionality to draw a 3D scene containing a few textured rectangular boxes with some simple lighting. To see the code in action, copy it into an .html file and open that file … Continue reading

Posted in Uncategorized | Tagged , , , , | 1 Comment

Rendering 3D Shapes as Wireframes in JavaScript

The code shown below will render several three-dimensional shapes, or “meshes”, in various positions and orientations for the viewpoint of a particular camera. To see the code in action, copy it into an .html file and open that file in … Continue reading

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

Rendering a Simple 3D Scene Using JavaScript

The code included below makes use of vector mathematics to render a simple three-dimensional scene from a particular viewpoint. To run the code, copy it into an .html file and open it in a web browser capable of running JavaScript. … Continue reading

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

Using the Java3D Framework

Java3D is actually pretty easy to use, at least compared to OpenGL. Then again, it looks like Java3D hasn’t been updated in a couple of years, since the splash screen still has the Sun logo on it. Then again again, … Continue reading

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