[x3d-public] add/deleteRoute in inlines

Joe D Williams joedwil at earthlink.net
Sun Oct 16 20:35:27 PDT 2016


> My question is more about the SAI standard and if it allows for 
> working with the execution context of an inline scene from outside 
> of the inline. I believe it does not.

OK, that is the core. what does the SAI term execution context mean?

The SAI uses the idea of execution context instead of other ways to do 
the same thing.

The name of the top level execution context is whatever name 
browserRef gives you.

Looking at the statement structure, when I get the initial context 
from browserRef, now I have access to all the root level contexts. The 
list of contexts I may now use is the list containing the DEF name of 
each root node. I get access to a root node using its DEF name as the 
contextname part of the statement and a node internal to the context 
using its DEF name.

That is how you navigate between contexts by DEF name of the child 
context. So since any node is actually a context, why is an Inline or 
protoinstance special? Like any other node it is an independent 
context that may include other contexts. Once you know the parent 
context you can navigate to any of its child contexts. Since we always 
using DEF names that only apply to the current context and any of its 
top level child contexts, nobody ever name collides.

So, I want it to work so that when I name a child context of the 
current context then I have access to the nodes of the child context. 
If one of the child nodes is an inline or a protoinstance then I talk 
to it as if its top level context is the DEF of its root node, then 
deal with its child nodes.

All Best,
Joe





----- Original Message ----- 
From: "Andreas Plesch" <andreasplesch at gmail.com>
To: "Joe D Williams" <joedwil at earthlink.net>
Cc: "X3D Graphics public mailing list" <x3d-public at web3d.org>
Sent: Sunday, October 16, 2016 7:24 AM
Subject: Re: [x3d-public] add/deleteRoute in inlines


> On Oct 16, 2016 12:15 AM, "Joe D Williams" <joedwil at earthlink.net> 
> wrote:
> ...
>> valueofnodefield = DefofInline.nameofnodeinInline.nameofNodefield;
>
> Flux may have had such a system to use the DEF name of an inline as 
> a proxy
> for its scene's context.
>
> Cobweb has
>
> Inlinenode.getInternalScene()
>
> to navigate to the execution context of the inlines scene.
>
> So I know how to do remove/add Routes in inlines with cobweb (in 
> theory).
>
> My question is more about the SAI standard and if it allows for 
> working
> with the execution context of an inline scene from outside of the 
> inline. I
> believe it does not.
>
>> Look at the end of the example where after things change, the root 
>> nodes
> get reloaded. Not sure if that was just that Flux needed reload or 
> if all
> browsers would.
>
> All browsers would need to do that transfer of root nodes from the 
> new
> scene to the existing scene.
>
> Andreas
>
>> Joe
>>
>>>
>>> Andreas
>>>
>>>> Thanks and Best,
>>>> Joe
>>>> http://www.hypermultimedia.com/ajax3d/AJAX3Dlogo2.x3d
>>>>
>>>>
>>>>
>>>>
>>>> ----- Original Message ----- From: "Andreas Plesch" <
>>>
>>> andreasplesch at gmail.com>
>>>>
>>>> To: "Joe D Williams" <joedwil at earthlink.net>
>>>> Cc: "X3D Graphics public mailing list" <x3d-public at web3d.org>
>>>> Sent: Saturday, October 15, 2016 5:36 AM
>>>> Subject: Re: [x3d-public] add/deleteRoute in inlines
>>>>
>>>>
>>>>
>>>>> On Oct 15, 2016 7:45 AM, "Joe D Williams" 
>>>>> <joedwil at earthlink.net>
>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> However, the standard SAI does not seem to have a function to
>>>>>>> get the
>>>>>>> execution context of an Inline scene, even for external SAI 
>>>>>>> use
>>>>>>> ? Is
>>>
>>> this
>>>>>>>
>>>>>>> the case ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> SAIExecutionContext.SAINode.SAIField.SAIFieldValue;
>>>>>>
>>>>>> 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.
>>>>>
>>>>> This may be a little too concise for me to get.
>>>>>
>>>>> Here is the situation:
>>>>>
>>>>> Main.x3d:
>>>>>
>>>>> ...
>>>>> <Inline DEF='animatedHat' url="'hat.x3d'" />
>>>>> ...
>>>>>
>>>>> hat.x3d:
>>>>>
>>>>> ...
>>>>>
>>>>> <ROUTE fromNode='ts' ... />
>>>>>
>>>>> ...
>>>>>
>>>>> Pseudo code using SAI external to Main.x3d:
>>>>>
>>>>> mainScene = getBrowser().currentScene
>>>>>
>>>>> //mainScene.addRoute(someRoute) is available
>>>>>
>>>>> inlineNode = mainScene.getNamedNode('animatedHat')
>>>>>
>>>>> inlineScene = inlineNode.getInternalScene() // is something like
>>>>> this in
>>>>> the SAI ??
>>>>>
>>>>> tempRoute = inlineScene.addRoute(fromNode...)
>>>>>
>>>>> ....
>>>>>
>>>>> inlineScene.removeRoute(tempRoute)
>>>>>
>>>>>
>>>>> Is something like getInternalScene() in the SAI standard ? I 
>>>>> think
>>>>> maybe
>>>>> not.
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> For external, then:
>>>>>>
>>>>>> SAIBrowserRef.SAIExecutionContext.SAINode.SAIField.SAIFieldValue;
>>>>>> http://www.hypermultimedia.com/x3d/Quick/SAIABSDEFS.htm
>>>>>>
>>>>>> Joe
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ----- Original Message ----- From: "Andreas Plesch" <
>>>>>
>>>>>
>>>>> andreasplesch at gmail.com>
>>>>>>
>>>>>>
>>>>>> To: "X3D Graphics public mailing list" <x3d-public at web3d.org>
>>>>>> Sent: Friday, October 14, 2016 1:58 PM
>>>>>> Subject: [x3d-public] add/deleteRoute in inlines
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am working on deleting and adding Routes via deleting and
>>>>>>> adding
>>>
>>> Route
>>>>>>>
>>>>>>> DOM elements, with cobweb:
>>>>>>>
>>>>>>> https://andreasplesch.github.io/cobweb_dom/tests/fanOutRoute.xhtml
>>>>>>>
>>>>>>> It seems to work fine for Routes in the main scene/execution
>>>>>>> context.
>>>>>>>
>>>>>>> Now, there may be an expectation to also be able to add/delete
>>>>>>> routes
>>>>>>> within inlines and their execution contexts, from outside the
>>>>>>> inline
>>>>>
>>>>>
>>>>> since
>>>>>>>
>>>>>>>
>>>>>>> DOM javascript code is by definition external.
>>>>>>>
>>>>>>> For example, a common scenario may be to have a scene with a
>>>>>>> single
>>>>>
>>>>>
>>>>> Inline
>>>>>>>
>>>>>>>
>>>>>>> dom node as a way to include the x3d content while still 
>>>>>>> keeping
>>>>>>> the
>>>
>>> html
>>>>>>>
>>>>>>> concise. A web page author then may still want to manipulate 
>>>>>>> all
>>>
>>> aspects
>>>>>
>>>>>
>>>>> of
>>>>>>>
>>>>>>>
>>>>>>> the x3d.
>>>>>>>
>>>>>>> There is probably a way in cobweb to get the correct execution
>>>>>>> context
>>>
>>> of
>>>>>>>
>>>>>>> the Route node that user code wants to remove, or add, by
>>>>>>> looking for
>>>
>>> the
>>>>>>>
>>>>>>> closest ancestor scene element (since inline scenes are 
>>>>>>> appended
>>>>>>> to
>>>
>>> their
>>>>>>>
>>>>>>> inline element). Using this execution context it would then be
>>>>>>> possible
>>>>>
>>>>>
>>>>> to
>>>>>>>
>>>>>>>
>>>>>>> use the SAI addRoute and deleteRoute functions.
>>>>>>>
>>>>>>> However, the standard SAI does not seem to have a function to
>>>>>>> get the
>>>>>>> execution context of an Inline scene, even for external SAI 
>>>>>>> use
>>>>>>> ? Is
>>>
>>> this
>>>>>>>
>>>>>>> the case ?
>>>>>>>
>>>>>>> If this is the case, is the main reason that the expectation 
>>>>>>> is
>>>>>>> that
>>>
>>> any
>>>>>>>
>>>>>>> access to a scene contained in an Inline would have take to
>>>>>>> place from
>>>>>>> scripts (I believe these would be the containing node of
>>>>>>> http://www.web3d.org/documents/specifications/
>>>>>
>>>>>
>>>>> 19775-2/V3.3/Part02/concepts.html#ContainingNode)
>>>>>>>
>>>>>>>
>>>>>>> within the inline ?
>>>>>>>
>>>>>>> Just trying to understand all what is involved. Any hints or
>>>>>>> comments
>>>>>>> welcome,
>>>>>>>
>>>>>>> Andreas
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Andreas Plesch
>>>>>>> 39 Barbara Rd.
>>>>>>> Waltham, MA 02453
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------
>>>>>
>>>>>
>>>>> --------------------
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> _______________________________________________
>>>>>>> x3d-public mailing list
>>>>>>> x3d-public at web3d.org
>>>>>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> 




More information about the x3d-public mailing list