[x3d-public] Turning on and off simultaneous animations individually

Andreas Plesch andreasplesch at gmail.com
Sun Feb 2 20:39:40 PST 2025


Apologies in advance if the following comes across as a bit of
rigid thinking for a corner case but unfortunately there is now an example.
A larger standard question is how to correctly process a fieldValue
statement with a default value for the value attribute.
The XML schema for fieldValue says that the default value for the value
attribute is "", the empty string. Relying on that default is rarely,
perhaps never, a useful use of fieldValue but is allowed.

Scenario A)
In the case the field for which such a fieldValue is given is of type
SFTime, this would strictly mean that the value is invalid since the "" is
not an encoding of a floating point number and does not pass the regex
test. Therefore processing could become undefined and should be halted.

Scenario B)
Another, perhaps less strict but more useful interpretation is that the
empty string for SFTime signals the lack of a value and that therefore a
default value for the SFTime field should be adopted. This default could be
an initial -1 as the Tooltips suggest, and would likely be overwritten.

A) is stricter and follows the rules more literally. B) is perhaps
more often what authors intend but may need some clarification in the
specification.

This applies only to the XML encoding.

I think the XML encoding for fieldValue should require one of: an existing
value attribute, or at least one child node (as a XFNode value). Not sure
if the XML schema could handle that.

Would you prefer A) or B) ?

Personally A) with some error messages but some X3D browsers accept B).

Thanks, Andreas


On Sun, Feb 2, 2025 at 4:58 PM Andreas Plesch <andreasplesch at gmail.com>
wrote:

> I think x3dom, reasonably, expects a value for the fieldValue nodes:
>
> For example:
>
> <fieldValue name="startTime" />
>
> and others.
>
> On Sun, Feb 2, 2025 at 5:42 AM John Carlson <yottzumm at gmail.com> wrote:
>
>> Andreas, Joe,
>>
>> Reset Button, Reset_Clock added.
>>
>> See attached zip for details, or visit link;
>>
>>
>> https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d
>>
>> For some reason, this link doesn't show the live scene?
>>
>>
>> https://andreasplesch.github.io/Library/Viewer/index.html?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d
>>
>> Puzzled, haven't researched it yet.  Looks good in Sunrize and X_ITE,
>> will try FreeWRL next.
>>
>> John
>>
>>>
>
> --
> Andreas Plesch
> Waltham, MA 02453
>


-- 
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250202/32214d7b/attachment-0001.html>


More information about the x3d-public mailing list