One major difference between the two implementations is that the WebGL implementation of O3D uses the GLSL shader required by WebGL. This release includes a Cg-to-GLSL converter script to aid in this conversion.
A number of the samples for the plug-in implementation of O3D require only minimal revision to work with the WebGL implementation of O3D. Here are some of the samples that have already been converted to use the WebGL implementation of O3D:
The samples for the WebGL implementation of O3D are in the `o3d-webgl-samples/` directory of the Samples.zip file.
The Sample Application page discusses a fully developed game that uses this new library. In particular, this code example illustrates attractive procedurally generated graphics, realistic 3D physics effects, and shading effects using the GLSL shader.
The steps for modifying an application originally written for the plug-in implementation of O3D are summarized below:
o3djs.base.o3d = o3d;
<div id="o3d" width="600" height="600"></div>
The following list groups O3D classes according to their typical use. Parentheses indicate classes that will not be included in the WebGL implementation of O3D.
The following class tree diagrams use regular black type for classes included in the WebGL implementation of O3D. Gray type indicates classes not included in this implementation.
The first section of the O3D class tree shows the top-level classes in the O3D class hierarchy:
This section shows the O3D classes derived from the ParamObjectclass:
This section shows the O3D classes derived from the Param class: