x3dom / x3dom

X3DOM. A framework for integrating and manipulating X3D scenes as HTML5/DOM elements.
http://x3dom.org
Other
813 stars 271 forks source link

.setFieldValue() and friends should work for USE DOM nodes #1223

Closed andreasplesch closed 1 year ago

andreasplesch commented 1 year ago

see #1221

USE nodes refer to the same x3dom node as the corresponding DEF node. Therefore the x3dom node's field values should be accessible also from the USE nodes, via .setFieldValue(), .getFieldValue(), .getFieldRef() and releaseFieldRef() .

With X3D scripting there is no difference between accessing DEF and USE nodes, via .children[], so this should be also possible with x3dom.

andreasplesch commented 1 year ago

https://jsitor.com/xb1ODCI-jj shows error in console.

andreasplesch commented 1 year ago

https://jsitor.com/jF0PEGb7aB uses the latest x3dom where this now works.