Titania X3D Editor

Bring Colours to Your Life.

Titania v4.3.3

Bring Colours to Your Life.

X3D Reference

Cobweb XHTML DOM Integration

XHTML DOM Integration

Andreas Plesch wrote a nice plug-in for HTML DOM integration. This enables JavaScript authors to use X3D content as if it would be HTML. cobweb_dom links the X3D DOM nodes to the X3D scene graph and thereby allows for control of the X3D scene using regular DOM manipulation methods. The »cobweb_dom.js« script must be included after Cobweb, then HTML DOM integration is available.

Reference

The complete documentation can be found at https://github.com/andreasplesch/cobweb_dom.

Example

How use the Plug-In with Cobweb

Create an HTML or XHTML page and save it, additionally the »cobweb_dom.js« script must be included after the Cobweb script, then XHTML DOM integration is available. Now, X3D content can directly be written within the X3DCanvas element and regular DOM manipulation methods can be used to manipulate the scene graph. This gives X3D authors the ability to combine HTML with X3D. The »moveHouse« function in the example below demonstrates how to use regular DOM manipulation methods to control the behavior of the X3D content.

Cookies and other Technologies

By clicking »Accept« or continuing to use the site, you agree to the use of CREATE3000 and third-party cookies and other similar technologies to enhance your browsing experience, analyze and measure your engagement with our content, and provide more relevant ads on CREATE3000 websites and others. Learn more about cookies. You can withdraw your consent at any time.