Fork me on GitHub

X3D Inline data reflected to the DOM

22.12.2011 Uncategorized

The current version of X3DOM extend the X3D Inline functionality with the possibility of reflection. If you include an external scene with the use of inline  into another scene, you can set the attribute “nameSpaceName”. This attribute causes the attached scene to be represented in the DOM. This feature makes it possible to access the elements inside the inlined scene with JavaScript.

This is an extension of the official specification, which does not yet include reflection.

If you inline a scene <inline nameSpaceName=’foo’ url=’someScene.x3d’ /> with a named element <Box id=’bar’ /> you can address this element with getElementById(‘foo__bar’).