<div dir="ltr"><div><div>Since I had a need to fix proper text alignment in x3dom, I ported the Nist conformance text driver example scene:<br><br><a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/driver.html">http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/driver.html</a><br><br><a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/driver.js">http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/driver.js</a><br><br></div>to x3dom. It uses touchsensors and a x3d javascript script to modify the text font style alignment fields. Both nodes, touchsensor and script are not supported directly in x3dom. Instead one can use native web browser functionality for a x3dom style scene access interface. The ported scene is here:<br><br><a href="http://andreasplesch.github.io/x3dom/x3dom_text/driver_x3dom.xhtml">http://andreasplesch.github.io/x3dom/x3dom_text/driver_x3dom.xhtml</a><br><br></div>I added some commenting in the x3d scene to point out what was necessary both in the xml and in the javascript.<br><br><div><div><div>Here are source views:<br><br><a href="https://github.com/andreasplesch/x3dom/blob/gh-pages/x3dom_text/driver_x3dom.xhtml">https://github.com/andreasplesch/x3dom/blob/gh-pages/x3dom_text/driver_x3dom.xhtml</a><br><a href="https://github.com/andreasplesch/x3dom/blob/gh-pages/x3dom_text/driver_x3dom.js">https://github.com/andreasplesch/x3dom/blob/gh-pages/x3dom_text/driver_x3dom.js</a><br><br></div><div>One could probably find more elegant code but this tries to stick closely to the original.<br clear="all"></div><div><br></div><div>One can see that some work is involved in the porting to define the interface but the main functionality remains as is.<br><br></div><div>Hopefully this can help as a starting point if there is a need to convert existing, scripted x3d scenes to x3dom,  for example to integrate more tightly with a surrounding web page.<br><br></div><div>Andreas<br></div><div><br>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div></div></div>