You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading X3D files using the node, the DOM does not reflect the loaded nodes. Make this the default behavior but allow turning it off by switch for performance reasons.
This can give you an idea about how to access nodes and attribute values inside an inline
scene. Explanation of this function:
$('inline[DEF=planX3domInline]').get() gives access to the inline dom.
._x3domNode gives access to the javascript object that is representing the scripted
behaviour of the node
._childNodes[n] ^m is traversing the hierarchy m times which is the same as if it were a
dom element
._vf[stringName] gives access to the attribute I want, so as to alter my shader
I think all this is not documented, but you can get the particular information for the
node you want to access by using Chrome :
press Ctrl + shift + J
choose "Elements"
find your inline node with the search text area "Search Element" searching for "inline"
look at "Properties" on the right side and click on the first "HTMLUnknownElement"
and here it is : the _x3domNode whose you can explore the childNodes
or using Firefox roughly the same way : (with developer tools !!)
press Ctrl + shift + K
if you have jQuery, type $('inline[DEF=planX3domInline]').get() that will directly give
you access to the inline dom node
and then explore it the same way
But Be Careful ! all what you implement this way is dependent on all that changes in the
implementation of x3dom that we should not manipulate this way.
When loading X3D files using the node, the DOM does not reflect the loaded nodes. Make this the default behavior but allow turning it off by switch for performance reasons.
Also see: http://sourceforge.net/projects/x3dom/forums/forum/957286/topic/4523067
The text was updated successfully, but these errors were encountered: