<div dir="ltr"><p dir="ltr"></p>
<p dir="ltr">On Oct 15, 2016 7:45 AM, "Joe D Williams" <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>> wrote:<br>
>><br>
>> However, the standard SAI does not seem to have a function to get the<br>
>> execution context of an Inline scene, even for external SAI use ? Is this<br>
>> the case ?<br>
><br>
><br>
> SAIExecutionContext.SAINode.<wbr>SAIField.SAIFieldValue;<br>
><br>
> This is the form I have seen where when you have a parent context then you can get into child context by the DEF name.</p>
<p dir="ltr">This may be a little too concise for me to get.</p>
<p dir="ltr">Here is the situation:<br><br></p><p><font face="monospace, monospace">Main.x3d:</font></p><p dir="ltr">
<font face="monospace, monospace">...<br>
<Inline DEF='animatedHat' url="'hat.x3d'" /><br>
...</font></p><p><font face="monospace, monospace">hat.x3d:</font></p><p><font face="monospace, monospace">...</font></p><p><font face="monospace, monospace"><ROUTE fromNode='ts' ... /></font></p><p><font face="monospace, monospace">...</font></p><p><font face="monospace, monospace">Pseudo code using SAI external to Main.x3d:</font></p><p><font face="monospace, monospace">mainScene = getBrowser().currentScene</font></p><p><font face="monospace, monospace">//mainScene.addRoute(someRoute) is available</font></p><p><font face="monospace, monospace">inlineNode = mainScene.getNamedNode('animatedHat')</font></p><p><font face="monospace, monospace">inlineScene = inlineNode.getInternalScene() // is something like this in the SAI ??</font></p><p><font face="monospace, monospace">tempRoute = inlineScene.addRoute(fromNode...)</font></p><p><font face="monospace, monospace">....</font></p><p><font face="monospace, monospace">inlineScene.removeRoute(tempRoute)</font></p><p><br></p><p>Is something like getInternalScene() in the SAI standard ? I think maybe not.</p><p dir="ltr"><br></p><p dir="ltr"><br>
><br>
> For external, then:<br>
><br>
> SAIBrowserRef.<wbr>SAIExecutionContext.SAINode.<wbr>SAIField.SAIFieldValue;<br>
> <a href="http://www.hypermultimedia.com/x3d/Quick/SAIABSDEFS.htm" target="_blank">http://www.hypermultimedia.<wbr>com/x3d/Quick/SAIABSDEFS.htm</a><br>
><br>
> Joe<br>
><br>
><br>
><br>
><br>
> ----- Original Message ----- From: "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>><br>
> To: "X3D Graphics public mailing list" <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
> Sent: Friday, October 14, 2016 1:58 PM<br>
> Subject: [x3d-public] add/deleteRoute in inlines<br>
><br>
><br>
><br>
>> Hello,<br>
>><br>
>> I am working on deleting and adding Routes via deleting and adding Route<br>
>> DOM elements, with cobweb:<br>
>><br>
>> <a href="https://andreasplesch.github.io/cobweb_dom/tests/fanOutRoute.xhtml" target="_blank">https://andreasplesch.github.<wbr>io/cobweb_dom/tests/<wbr>fanOutRoute.xhtml</a><br>
>><br>
>> It seems to work fine for Routes in the main scene/execution context.<br>
>><br>
>> Now, there may be an expectation to also be able to add/delete routes<br>
>> within inlines and their execution contexts, from outside the inline since<br>
>> DOM javascript code is by definition external.<br>
>><br>
>> For example, a common scenario may be to have a scene with a single Inline<br>
>> dom node as a way to include the x3d content while still keeping the html<br>
>> concise. A web page author then may still want to manipulate all aspects of<br>
>> the x3d.<br>
>><br>
>> There is probably a way in cobweb to get the correct execution context of<br>
>> the Route node that user code wants to remove, or add, by looking for the<br>
>> closest ancestor scene element (since inline scenes are appended to their<br>
>> inline element). Using this execution context it would then be possible to<br>
>> use the SAI addRoute and deleteRoute functions.<br>
>><br>
>> However, the standard SAI does not seem to have a function to get the<br>
>> execution context of an Inline scene, even for external SAI use ? Is this<br>
>> the case ?<br>
>><br>
>> If this is the case, is the main reason that the expectation is that any<br>
>> access to a scene contained in an Inline would have take to place from<br>
>> scripts (I believe these would be the containing node of<br>
>> <a href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/concepts.html#ContainingNode" target="_blank">http://www.web3d.org/<wbr>documents/specifications/<wbr>19775-2/V3.3/Part02/concepts.<wbr>html#ContainingNode</a>)<br>
>> within the inline ?<br>
>><br>
>> Just trying to understand all what is involved. Any hints or comments<br>
>> welcome,<br>
>><br>
>> Andreas<br>
>><br>
>><br>
>><br>
>><br>
>> -- <br>
>> Andreas Plesch<br>
>> 39 Barbara Rd.<br>
>> Waltham, MA 02453<br>
>><br>
><br>
><br>
> ------------------------------<wbr>------------------------------<wbr>--------------------<br>
><br>
><br>
>> ______________________________<wbr>_________________<br>
>> x3d-public mailing list<br>
>> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
>> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/<wbr>listinfo/x3d-public_web3d.org</a><br>
>><br>
></p>
</div>