<div dir="ltr"><div>Here is a version with the expected dragging behaviour of the green sphere in x3dom:</div><div><br></div><div><a href="https://jade-aluminum.glitch.me/">https://jade-aluminum.glitch.me/</a><br></div><div><br></div><div>Completely separate from the scripting, the only change necessary was to add an offset field value to PlaneSensor:</div><div><br></div><a href="https://glitch.com/edit/#!/jade-aluminum?path=views/index.html:38:7">https://glitch.com/edit/#!/jade-aluminum?path=views/index.html:38:7</a><br><div class="gmail_extra"><br></div><div class="gmail_extra">Cobweb and perhaps other x3d browser do not require this offset value for expected behaviour. This now raises the question which interpretation of PlaneSensor is correct, eg. should the offset here be necessary ?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/pointingsensor.html#PlaneSensor">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/pointingsensor.html#PlaneSensor</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">says:</div><br>'..a translation_changed event is output which corresponds to the sum of the relative translation from the original intersection point to the intersection point of the new bearing in the plane plus the offset value.'<div class="gmail_extra"><br></div><div class="gmail_extra">As a relative translation I would interprete this language to mean that translation_changed starts out with '0 0 0' and then accumulates from there. In the example, translation_changed is routed to an transform with an initial translation value of '1 -1 .01' which means that a '0 0 0' translation would lead to the previously observed initial jump. Adding an offset therefore seems necessary. So x3dom behaviour seems correct ? Generally cobweb is more strict in following the spec, so I am little surprised.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Here is the example without the offset and initial jumping:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://warm-nape.glitch.me/">https://warm-nape.glitch.me/</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Andreas</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 31, 2017 at 10:22 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>John,</div><div><br></div><div>I could make pretty quick progress to port this to x3d script over to dom scripting style:</div><div><br></div><div><a href="https://warm-nape.glitch.me/" target="_blank">https://warm-nape.glitch.me/</a><br></div><div><br></div><div>You can 'remix' the code here:</div><div><br></div><a href="https://glitch.com/edit/#!/warm-nape" target="_blank">https://glitch.com/edit/#!/<wbr>warm-nape</a><br><div><br></div><div>[I like <a href="http://glitch.com" target="_blank">glitch.com</a>, and it has a built in server side]</div><div><br></div><div>The structure is pretty close to the original but probably will need to be more generalized for easy reuse. It is a starting point anyways.</div><div><br></div><div>There is an initial reset of the green ball translation when it is dragged first. Not sure where this is coming from but may only need minor fixing.</div><div><br></div><div>For routing, the main idea here is to use the x3dom onoutputchange event as trigger. Other ideas are certainly possible or perhaps necessary for generalization.</div><div><br></div><div>This uses get/setFieldValue rather than getAttribute because it is more convenient and closer to SAI as it deals with field objects rather than strings.</div><div><br></div><div>x3dom does not have methods for SFRotations since all rotations get immediately translated to quaternions. But this is a detail at this point.</div><div><br></div><div>I think I like the idea of returning an object populated by output fields from a main script function.</div><div><br></div><div>Take a look and feel free to mangle and reorganize,</div><div><br></div><div>Andreas</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 31, 2017 at 4:26 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi John,<div><br></div><div>I am going to take a look but do not wait for anything. I believe x3dom has PlaneSensor.</div><div><br></div><div><a href="https://gist.github.com/andreasplesch/83771ec5959935d309db417387397952" target="_blank">https://gist.github.com/andrea<wbr>splesch/83771ec5959935d309db41<wbr>7387397952</a> for easy access.</div><div><br></div><div>-Andreas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 31, 2017 at 3:44 PM, John Carlson <span dir="ltr"><<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-2309763172978027391m_-9220395532229420100m_-943787606009350455WordSection1"><p class="MsoNormal">Can someone port the attached example to X3DOM?  It would help with the X3DOM upgrade effort.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks!</p><span class="gmail-m_-2309763172978027391m_-9220395532229420100HOEnZb"><font color="#888888"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">John</p><p class="MsoNormal"><u></u> <u></u></p></font></span></div></div><br>------------------------------<wbr>------------------------------<wbr>------------------<br>
Check out the vibrant tech community on one of the world's most<br>
engaging tech sites, Slashdot.org! <a href="http://sdm.link/slashdot" rel="noreferrer" target="_blank">http://sdm.link/slashdot</a><br>______________________________<wbr>_________________<br>
X3dom-users mailing list<br>
<a href="mailto:X3dom-users@lists.sourceforge.net" target="_blank">X3dom-users@lists.sourceforge.<wbr>net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/x3dom-users" rel="noreferrer" target="_blank">https://lists.sourceforge.net/<wbr>lists/listinfo/x3dom-users</a><br>
<br></blockquote></div><span class="gmail-m_-2309763172978027391HOEnZb"><font color="#888888"><br><br clear="all"><span class="gmail-HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="gmail-m_-2309763172978027391m_-9220395532229420100gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</font></span></font></span></div><span class="gmail-HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="gmail-HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-2309763172978027391gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div>