[x3d-public] LoadSensor completion of loading

Andreas Plesch andreasplesch at gmail.com
Wed Dec 21 12:26:36 PST 2022


Hi Christoph,

I think the idea could be sketched as:

<Scene>
 <Inline Outer/>
 <IMPORT LSForInner />
 Do something after LSForInner fires
..

Inline Outer:
<Scene>
 <LoadSensor DEF="LSForInner">
  <Inline Inner/>
 </>
 <EXPORT LSForInner/>
..

That flexibility would favor the option to generate the event before
downloading of inner content. The potential downside is that it
assumes that the outer Inline has such an exported LoadSensor which
may not be the case or even be under the author's control. Also, for
more complex scenes it can become a lot of logic for the author to
deal with.

In any case, to avoid surprises with that option it would be even more
important to point out in the spec. when the isLoaded event is
generated, eg. that nested LoadSensors may be needed.

-Andreas

On Wed, Dec 21, 2022 at 2:42 PM Christoph Valentin
<christoph.valentin at gmx.at> wrote:
>
> Hi Andreas,
>
> Just one neuron firing now: what about leaving the decision to the author?
>
> Somehow "nesting" the LoadSensor. One LoadSensor in the scene, reporting about the inline. Another LoadSensor in the inline, reporting about the second level inline. And so on.
>
> --
> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.
> Am 21.12.22, 17:51 schrieb Andreas Plesch <andreasplesch at gmail.com>:
>>
>> 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
>>
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list