[x3d-public] [...] set_Value prefix and value_changed suffix, potential v4 issue
yottzumm at gmail.com
yottzumm at gmail.com
Mon Apr 24 04:24:41 PDT 2017
I will try taking out my code to remove set_ and _changed and see what happens. Perhaps I can patch my XML.
John
Sent from Mail for Windows 10
From: Michalis Kamburelis
Sent: Monday, April 24, 2017 5:03 AM
To: Don Brutzman
Cc: Andreas Plesch; X3D Graphics public mailing list
Subject: Re: [x3d-public] [...] set_Value prefix and value_changed suffix,potential v4 issue
2017-04-24 5:40 GMT+02:00 Don Brutzman <brutzman at nps.edu>:
> So for example, am not finding any specification prose that would permit
> routing from a TimeSensor.fraction (it is defined as
> TimeSensor.fraction_changed) or into a PositionInterpolator.fraction (it is
> defined as PositionInterpolator.set_fraction).
>
I always understood the X3D specification (the
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#FieldSemantics
section) to mean that "if you want to refer to the input event of the
xxx inputOutput, you MUST write it set_xxx". (And, analogously, you
MUST write "xxx_changed" to refer to the output event.)
I guess it comes from the VRML times, when the concept of "fields" and
"events" felt more separated in the specification. We had "exposed
field" that I understood as equivalent to a sum of 1 field + 2 events.
The specification says
"""
An inputOutput field named zzz can be referred to as 'set_zzz' and
treated as an inputOnly, and can be referred to as 'zzz_changed' and
treated as an outputOnly field.
"""
I understood the "referred to as 'set_zzz' and treated as an
inputOnly" as a requirement: you have to refer to it as 'set_zzz', in
order to treat it as an inputOnly.
Consequently, view3dscene does not allow
ROUTE MyTimeSensor.fraction TO MyPositionInterpolator.fraction
You must use
ROUTE MyTimeSensor.fraction_changed TO MyPositionInterpolator.set_fraction
Attaching the smallest testcase possible:) If any other X3D browser
allows the 1st ROUTE above (just "MyTimeSensor.fraction"), or if the
specification allows it, I would like to know about it, so that I can
fix view3dscene.
Out of curiosity, I looked at what VRML 97 specification says about it:
1. VRML 97 spec says basically the same thing as X3D spec (
http://www.web3d.org/documents/specifications/14772/V2.0/part1/concepts.html#4.7
):
"""An exposedField named zzz can be referred to as 'set_zzz' and
treated as an eventIn, and can be referred to as 'zzz_changed' and
treated as an eventOut."""
2. The "Annotated VRML 97 Reference Manual" (
http://www.x-3-x.net/vrml/archive/annotatedVRML2/BOOK.HTM ) adds a
"tip" (not present in the spec):
"""Note that the names of exposedFields do not include a prefix or
suffix. For example, the PointLight node's on exposedField is not
named isOn. However, the set_ and _changed conventions may be used
when referring to the eventIn and eventOut of the exposedField
respectively."""
Hm, the words "may be used" inside the above sentence indeed suggest
that the set_/_changed are optional. I'm curious what other VRML and
X3D browsers do!
P.S. I don't have an opinion about whether this requirement should be
relaxed for X3D 4.0 or not. As the DOM compatibility is not in my main
usecase for X3D, I don't have any argument in favor. But the necessary
change in the browser implementation, to make set_/_changed optional,
would be absolutely trivial, so I don't see any argument against. So,
as long as the specification is clear about whether it should be
allowed or not, I'm fine either way:)
Regards,
Michalis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170424/8fe82be1/attachment-0001.html>
More information about the x3d-public
mailing list