[x3d-public] LoadSensor completion of loading

Andreas Plesch andreasplesch at gmail.com
Wed Dec 21 08:50:02 PST 2022


It is useful to be notified after an Inline has completed loading.
This is especially true for external access to the scene if the Inline
has exports (or dom style access is used).
A LoadSensor generates such an event:

https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/networking.html#LoadSensor

"The isLoaded field generates events when loading of the LoadSensor's
children has completed."

However, in the case that the Inline contains another Inline itself a
question came up. Is loading considered complete when the outer Inline
xml/json/.. is completely downloaded but still has only a url
reference to the inner Inline ? That typically would happen before
also the inner Inline is completely downloaded. Or should the event be
generated only after the inner Inline (and all of its content) is also
completely downloaded ?

The second option is more useful, especially for web use where loading
generally occurs asynchronously and such events are often used to
initiate processing of downloaded content.

For generic X3D use, one could imagine a situation where a LoadSensor
triggers something which assumes that the scene is fully rendered
before an Inline is actually rendered.

It is also related to how EXPORT/IMPORT works. One could probably
construct a situation where a LoadSensor triggers access to an
EXPORTed node from an inner Inline before it is available.

Is a tightening of the language necessary ? Perhaps there is already a
more precise definition of 'loading' in the spec. somewhere else ?

-Andreas
-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list