[x3d-public] url MFString handling

Andreas Plesch andreasplesch at gmail.com
Fri Apr 22 10:41:08 PDT 2022


On Fri, Apr 22, 2022 at 12:44 PM Joseph D Williams
<joedwil at earthlink.net> wrote:
>
> Now I am back to the beginning. As usual, alll this serves to provide the author with the most control and the user with least concern. Concern by the user damages the suspension of disbelief in some interaction which might be important to the author’s intent.

I think that means that things in a scene should act consistently, eg.
exist or work when the scene starts, or not exist or work, and then
continue to do so either way until the scene is unloaded or replaced.
Things should not change unexpectedly.

As one data point, the current x-ite implementation of autorefresh
appears to follow option B (always retry all urls), probably because
it is the most logical one to implement.

>
> First, the result of loading an asset which is greater than its parent defines that the loading process is not complete until the tool has verified that browser is capable. So, where does the author get signals telling the physical file load is ok, and then that the result content is legal and part of the interaction?
>
> Then, to maximize versatility and maintaining the author’s contact with scene, enter LoadSensor, part of the solution.

I am not sure how LoadSensor
(https://www.web3d.org/x3d/content/X3dTooltips.html#LoadSensor) should
behave on refresh of children (watchList) nodes. Presumably, isLoaded,
loadTime and progress out events would be reissued after successful or
failed refreshes. This would mean a change from events that were
expected to occur once by scene authors, to events that can occur
frequently. Since autorefresh if off by default, backward
compatibility is still maintained.

Thanks,

Andreas

> Thanks,
>
> Joe
>
>
>
>
>
> From: Andreas Plesch
> Sent: Friday, April 22, 2022 8:32 AM
> To: Joseph D Williams
> Cc: X3D Graphics public mailing list
> Subject: Re: [x3d-public] url MFString handling
>
>
>
> For future reference:
>
>
>
> On Thu, Apr 21, 2022 at 4:43 PM Andreas Plesch <andreasplesch at gmail.com> wrote:
>
> >
>
> > On Thu, Apr 21, 2022 at 4:04 PM Joseph D Williams <joedwil at earthlink.net> wrote:
>
> > >
>
> > >> Let me propose that getting rid of "interpret" would suffice:
>
> > >
>
> > > Maybe ‘resolve”?
>
> >
>
> > Some tweaks:
>
> >
>
> > "All url fields can hold multiple string values. The strings in these
>
> >  fields indicate multiple locations to search for data in the order
>
> >  listed. If the browser cannot locate the data specified by the first
>
> > string, it shall try the second and subsequent locations in order
>
> > until a resolvable location containing data is encountered. X3D browsers only
>
> > have to load a single location. If no loadable locations are found,
>
> > the node type defines the resultant default behaviour."
>
> >
>
> > > Meaning the file name has been found and delivered to the browser and ready to be loaded into the calling context?
>
> > >
>
> > > Autorefresh sort of complicates things a bit, so now I am looking for something “file found and loaded” Autorefresh must not try to reload if the loaded file content fails.
>
> >
>
> > Good point. I am not familiar with the motivation behind introducing
>
> > autorefresh. I think the expectation would be that only the initially
>
> > selected url would autorefresh, eg. that browsers would not be
>
> > required to test all supplied locations to determine if a higher
>
> > priority one became available after each refresh.
>
>
>
> It appears that retrying all urls on refresh was deemed preferable:
>
>
>
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/networking.html#X3DUrlObject
>
>
>
> That means, on refresh:
>
>
>
> 1) Use currently selected url
>
> 2) If that fails, try all urls in order
>
> 3) If that fails, do nothing
>
>
>
> This is a bit more complicated than A)
>
>
>
> 1) Use currently selected url
>
> 2) If that fails, do nothing
>
>
>
> or, alternatively B)
>
>
>
> 1) do the same as when initially loaded: try all urls in order
>
>
>
> Since autorefresh probably targets regular updates of an existing
>
> resource (say an image of a weather forecast), option A) seemed
>
> sufficient and also more predictable. Let's see how it goes when there
>
> is time.
>
>
>
> Andreas
>
>
>
> > -Andreas
>
> >
>
> > > Thanks,
>
> > >
>
> > > Joe
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > > From: Andreas Plesch
>
> > > Sent: Thursday, April 21, 2022 12:46 PM
>
> > > To: Joseph D Williams
>
> > > Cc: X3D Graphics public mailing list
>
> > > Subject: Re: [x3d-public] url MFString handling
>
> > >
>
> > >
>
> > >
>
> > > Hi Joe,
>
> > >
>
> > >
>
> > >
>
> > > Thank you for your response which makes a lot of sense to me.
>
> > >
>
> > >
>
> > >
>
> > > >
>
> > >
>
> > > > This urls feature really only handles problems with finding the file and delivering contents, not dealing with the validity of actual contents of the file.
>
> > >
>
> > > >
>
> > >
>
> > >
>
> > >
>
> > > Yes, I agree. This role should be clearly pointed out. The first file
>
> > >
>
> > > which can be found and accessed should be considered selected for
>
> > >
>
> > > further processing which then may lead to failure.  Unfortunately, I
>
> > >
>
> > > think currently the spec. language is more vague.
>
> > >
>
> > >
>
> > >
>
> > > https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/networking.html#X3DUrlObject
>
> > >
>
> > >
>
> > >
>
> > > says:
>
> > >
>
> > >
>
> > >
>
> > > "All url fields can hold multiple string values. The strings in these
>
> > >
>
> > > fields indicate multiple locations to search for data in the order
>
> > >
>
> > > listed. If the browser cannot locate or interpret the data specified
>
> > >
>
> > > by the first location, it shall try the second and subsequent
>
> > >
>
> > > locations in order until a location containing interpretable data is
>
> > >
>
> > > encountered. X3D browsers only have to interpret a single string. If
>
> > >
>
> > > no interpretable locations are found, the node type defines the
>
> > >
>
> > > resultant default behaviour."
>
> > >
>
> > >
>
> > >
>
> > > Let me propose that getting rid of "interpret" would suffice:
>
> > >
>
> > >
>
> > >
>
> > > "All url fields can hold multiple string values. The strings in these
>
> > >
>
> > > fields indicate multiple locations to search for data in the order
>
> > >
>
> > > listed. If the browser cannot locate the data specified by the first
>
> > >
>
> > > string, it shall try the second and subsequent locations in order
>
> > >
>
> > > until a location containing data is encountered. X3D browsers only
>
> > >
>
> > > have to load a single location. If no accessible locations are found,
>
> > >
>
> > > the node type defines the resultant default behaviour."
>
> > >
>
> > >
>
> > >
>
> > > Happy to iterate if desired,
>
> > >
>
> > >
>
> > >
>
> > > Andreas
>
> > >
>
> > >
>
> > >
>
> > > >
>
> > >
>
> > > > As for json and gltf, same thing. Runtime expects the delivered data to  be legal contents as defined by the author. If the data is wrong, like some stuff not matching, then, something else fails, not the loading process.
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > Thanks for all on this, Andreas,
>
> > >
>
> > > >
>
> > >
>
> > > > Joe
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > From: Andreas Plesch
>
> > >
>
> > > > Sent: Thursday, April 21, 2022 10:06 AM
>
> > >
>
> > > > To: X3D Graphics public mailing list
>
> > >
>
> > > > Subject: Re: [x3d-public] url MFString handling
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > Are there suggestions on how to handle back-up "#viewpoint" style urls
>
> > >
>
> > > >
>
> > >
>
> > > > for Anchor in case Viewpoints with matching def names do not exist ?
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/networking.html#Anchor
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > paragraph nine explains that in this case:
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > "In this case, if the node derived from X3DViewpointNode is not found,
>
> > >
>
> > > >
>
> > >
>
> > > > no action occurs on activation."
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > This seems to mean that back-up #viewpoint urls should not be tried so
>
> > >
>
> > > >
>
> > >
>
> > > > that no action can occur. Would that make the most sense ?
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > I actually cannot think of a use case for back-up #viewpoint urls, so
>
> > >
>
> > > >
>
> > >
>
> > > > that case may be intentionally left ill defined and open to browser
>
> > >
>
> > > >
>
> > >
>
> > > > implementations.
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > Any feedback welcome,
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > Andreas
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > On Tue, Apr 19, 2022 at 9:34 PM Andreas Plesch <andreasplesch at gmail.com> wrote:
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > x3dom currently lacks support for back-up urls to use if the first
>
> > >
>
> > > >
>
> > >
>
> > > > > urls do not work. I am trying to add support and wonder how to deal
>
> > >
>
> > > >
>
> > >
>
> > > > > with corner cases.
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > The spirit of the spec. here is pretty clear:
>
> > >
>
> > > >
>
> > >
>
> > > > > https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/networking.html#X3DUrlObject
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > says that a url which cannot be located or if the retrieved data
>
> > >
>
> > > >
>
> > >
>
> > > > > cannot be All url fields can hold multiple string values. The strings in these fields indicate multiple locations to search for data in the order listed. If the browser cannot locate or interpret the data specified by the first location, it shall try the second and subsequent locations in order until a location containing interpretable data is encountered. X3D browsers only have to interpret a single string. If no interpretable locations are found, the node type defines the resultant default behaviour.interpreted should be skipped. Subsequent urls are then used
>
> > >
>
> > > >
>
> > >
>
> > > > > as back-ups.
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > Currently, x3dom checks if an inline x3d url can be parsed as xml and
>
> > >
>
> > > >
>
> > >
>
> > > > > if so if it has a Scene element.
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > The first corner case happens if there is a X3D element but it does
>
> > >
>
> > > >
>
> > >
>
> > > > > not contain a Scene element. This could be interpreted to mean an
>
> > >
>
> > > >
>
> > >
>
> > > > > empty X3D document with an empty Scene, or that it perhaps should be
>
> > >
>
> > > >
>
> > >
>
> > > > > skipped as not interpretable. I would probably favor skipping as this
>
> > >
>
> > > >
>
> > >
>
> > > > > would normally happen by mistake.
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > The second corner case is a Scene element without content. Should such
>
> > >
>
> > > >
>
> > >
>
> > > > > X3D be considered interpretable ?  I think x3dom is currently set up
>
> > >
>
> > > >
>
> > >
>
> > > > > to parse it without error resulting in an empty Scene, probably with
>
> > >
>
> > > >
>
> > >
>
> > > > > default NavigationInfo and Viewpoint. So this could be considered
>
> > >
>
> > > >
>
> > >
>
> > > > > interpretable and not be skipped.
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#urls
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > says a result needs to be "legal". But legal is by definition what is
>
> > >
>
> > > >
>
> > >
>
> > > > > provided in the spec., eg. comes down to being interpretable.
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > The tooltip at https://www.web3d.org/x3d/content/X3dTooltips.html#Inline.url
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > does not seem to further clarify.
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > Any feedback appreciated,
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > Andreas
>
> > >
>
> > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > > > --
>
> > >
>
> > > >
>
> > >
>
> > > > > Andreas Plesch
>
> > >
>
> > > >
>
> > >
>
> > > > > Waltham, MA 02453
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > --
>
> > >
>
> > > >
>
> > >
>
> > > > Andreas Plesch
>
> > >
>
> > > >
>
> > >
>
> > > > Waltham, MA 02453
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > > > _______________________________________________
>
> > >
>
> > > >
>
> > >
>
> > > > x3d-public mailing list
>
> > >
>
> > > >
>
> > >
>
> > > > x3d-public at web3d.org
>
> > >
>
> > > >
>
> > >
>
> > > > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > > --
>
> > >
>
> > > Andreas Plesch
>
> > >
>
> > > Waltham, MA 02453
>
> > >
>
> > >
>
> >
>
> >
>
> >
>
> > --
>
> > Andreas Plesch
>
> > Waltham, MA 02453
>
>
>
>
>
>
>
> --
>
> Andreas Plesch
>
> Waltham, MA 02453
>
>



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list