[x3d-public] TimeSensor > specs vs nist example

GPU Group gpugroup at gmail.com
Wed Aug 10 14:30:38 PDT 2022


Thanks very much Andreas, this works (I'll use round brackets here but
angle brackets in x3d)
      (TimeSensor DEF='TIME0' loop='true' cycleInterval='1' /)
      (ROUTE fromNode='TIME0' fromField='cycleTime' toNode='TIME0'
toField='stopTime'/)
      (TimeSensor DEF='TIME' cycleInterval='2' loop='false' /)
      (ROUTE fromNode='TIME0' fromField='cycleTime' toNode='TIME'
toField='startTime' /)
TIME0 does a 1 second delay, then starts TIME which does a 2 second
animation.

I need it for semi-automated regression testing: the human tester watches a
screen with old browser running on the left, new running on the right, and
hits a key if the scenes look different, otherwise the testing software
loads the next test scene in a few seconds.
Some scenes need a trigger to get some one-time animation going on load.

-Doug
more..
regression testing Key can be any CAPS key so can use B for blackscreen, D
for different, A for abort etc. saved to a report file at end.

Freewrl is a spaghetti monster, change one little thing and something else
breaks. So the inner guts never get refactored, too fragile, and bandaid on
top of bandaid.
x tried fully automating years ago but screen shots a bit different so need
fuzzy compare on screen shots, messy
* trying semi-automated, can give a component number or 0 for all, working
a bit



On Wed, Aug 10, 2022 at 2:51 PM Andreas Plesch <andreasplesch at gmail.com>
wrote:

> Yes, the time origin is 1970. This works with the web which has the
> same time origin.
>
> There are ways to set startTime, for example with TimeTrigger from any
> boolean event source. A Loadsensor of a texture url (perhaps just a
> tracking pixel) could also be a source for startTime. For the addition
> of a delay scripting becomes necessary.
>
> I think I have seen delayed autostart built from a first Timsensor
> with loop=true to autostart, disabling itself after the first cycle,
> and activating then a second Timesensor by setting the startTime from
> stopTime.
>
> Often it is a better user experience anyways to wait for some
> interaction which then can be sensed to start a Timesensor, at least
> on the web.
>
> Hope this helps, Andreas
>
> >
> > Message: 1
> > Date: Wed, 10 Aug 2022 11:47:40 -0600
> > From: GPU Group <gpugroup at gmail.com>
> > To: X3D Graphics public mailing list <x3d-public at web3d.org>
> > Subject: [x3d-public] TimeSensor > specs vs nist example
> > Message-ID:
> >         <
> CAM2ogRfy6C15GiB+uL5_26oBKW3pA2Zw8Q5eadVN5NYCfoKVmA at mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > When trying to do a startup delay timer, I didn't find a match in the
> nist
> > examples
> >
> https://www.web3d.org/x3d/content/examples/ConformanceNist/Sensors/TimeSensor/index.html
> >
> > in the specs,
> >
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/time.html#Timeactivation
> >
> > the first diagram shows loop false, stoptime less than or equal startime
> > - it should ignore stoptime and use cycleInterval
> > The closest match I could find in nist examples:
> >
> https://www.web3d.org/x3d/content/examples/ConformanceNist/Sensors/TimeSensor/stopltstartloopfalseIndex.html
> > - nist comment for this scene:
> > "The result is: Because loop is false, a red Sphere geometry should NOT
> > move from right to center to left and back to center one time when the
> > world is loaded."
> > - and all browsers conform to nist comment that it doesn't animate on
> > startup.
> > ?? To me it looks like all web3d browsers are failing the first specs
> > diagram (and passing the NIST test). If we honored the first diagram,
> then
> > I could do a startup delay loop=false, stopTime=- 0, startTime=0,
> > cycleInterval=2 to get a 2 second isActive on startup
> > Q1. does the nist example stopeqstartloopfalse or stopltstartloopfalse
> > comment 'there should be no startup animation' match Component Time >
> > Activation Figure 8.1 top diagram of loop false, starttime .gt. stoptime?
> > Q. how to do a delay: one-time event x seconds after scene load?
> > Thanks, Doug Sanden
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <
> http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220810/aeb60063/attachment-0001.html
> >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Wed, 10 Aug 2022 12:54:44 -0600
> > From: GPU Group <gpugroup at gmail.com>
> > To: X3D Graphics public mailing list <x3d-public at web3d.org>
> > Subject: Re: [x3d-public] TimeSensor > specs vs nist example
> > Message-ID:
> >         <
> CAM2ogRecv4G+z8LbW2OkFv4tYDxbN1hTUyDmn2VW6dG3by0FOw at mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Could relate to confusion between a) time since 1970 and b) time relative
> > to loadtime==0
> > For example
> > startTime = stopTime= 0, cycleTime = 5, loop=false, all browsers show the
> > isActive session is over when the scene loads.
> > startTime = stopTime = 0, cycleTime = 1660156846 (seconds since 1970 plus
> > some), loop=false will show isActive true on load in most browsers
> > Suggestion - a timesensor field saying if times are relative to load-time
> > == 0 or from 1970, allowing scene to be designed in loadtime relative
> > seconds.
> > -Doug
> >
> > On Wed, Aug 10, 2022 at 11:47 AM GPU Group <gpugroup at gmail.com> wrote:
> >
> > > When trying to do a startup delay timer, I didn't find a match in the
> nist
> > > examples
> > >
> > >
> https://www.web3d.org/x3d/content/examples/ConformanceNist/Sensors/TimeSensor/index.html
> > >
> > > in the specs,
> > >
> > >
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/time.html#Timeactivation
> > >
> > > the first diagram shows loop false, stoptime less than or equal
> startime
> > > - it should ignore stoptime and use cycleInterval
> > > The closest match I could find in nist examples:
> > >
> > >
> https://www.web3d.org/x3d/content/examples/ConformanceNist/Sensors/TimeSensor/stopltstartloopfalseIndex.html
> > > - nist comment for this scene:
> > > "The result is: Because loop is false, a red Sphere geometry should NOT
> > > move from right to center to left and back to center one time when the
> > > world is loaded."
> > > - and all browsers conform to nist comment that it doesn't animate on
> > > startup.
> > > ?? To me it looks like all web3d browsers are failing the first specs
> > > diagram (and passing the NIST test). If we honored the first diagram,
> then
> > > I could do a startup delay loop=false, stopTime=- 0, startTime=0,
> > > cycleInterval=2 to get a 2 second isActive on startup
> > > Q1. does the nist example stopeqstartloopfalse or stopltstartloopfalse
> > > comment 'there should be no startup animation' match Component Time >
> > > Activation Figure 8.1 top diagram of loop false, starttime .gt.
> stoptime?
> > > Q. how to do a delay: one-time event x seconds after scene load?
> > > Thanks, Doug Sanden
> > >
> > >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <
> http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220810/e1da7e26/attachment-0001.html
> >
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> >
> >
> > ------------------------------
> >
> > End of x3d-public Digest, Vol 161, Issue 11
> > *******************************************
>
>
>
> --
> Andreas Plesch
> Waltham, MA 02453
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220810/b8eb0429/attachment-0001.html>


More information about the x3d-public mailing list