X3DOM Example - Box, Cone, Cylinder and Sphere Primitives

 

Please remember: currently you need a very recent browser with WebGL support.

About X3DOM

X3DOM (pronounced X-Freedom) is an experimental open source framework and runtime to support the ongoing discussion in the Web3D and W3C communities how an integration of HTML5 and declarative 3D content could look like. It tries to fulfill the current HTML5 specification for declarative 3D content and allows including X3D elements as part of any HTML5 DOM tree.

SVG, canvas, WebGL and X3DOM relation

The goal here is to have a live X3D scene in your HTML DOM, which allows you to manipulate the 3D content by only adding/ removing or changing DOM elements. No specific plugin or plugin interface are needed. It also supports some of the HTML events (like “onclick”) on 3D objects. The whole integration model is still evolving and open for discussions.

Interaction

Camera navigation

The current WebGL/JS implementation of X3DOM provides, as every X3D-runtime, some generic interaction and navigation methods. Interactive objects will be handled by HTML-Like events. Navigation can be user-defined or controlled by specific predefined modes.

Examine Mode (activate with key ‘e’):

Button Function
Left Button / Left Button + Shift Rotate
Mid Button / Left Button + Ctl Pan
Right Button / Wheel / Left Button + Alt Zoom
Left double click Set center of rotation

Walk Mode (activate with key ‘w’):

Button Function
Left Button Move forward
Right Button Move backward

Fly Mode (activate with key ‘f’):

Button Function
Left Button Move forward
Right Button Move backward

Look at (activate with key ‘l’):

Button Function
Left Button Move closer
Right Button Move back

Non-interactive camera movement

Key Function
r reset view
a show all
u upright

Mid-Button troubleshooting

If the web page has scroll bars and autoscrolling is enabled, Mid-Button currently does not work yet. As a workaround, you can disable autoscrolling by unchecking the Use autoscrolling checkbox in the firefox browser options (for the Firefox case).