<div dir="ltr"><div>That's why I like schema, it caught the issue! But yeah, I (or AI, in this case) should follow the specification. I notice another thing that JSON schema wouldn't catch in its pure essence and that's non-decreasing values in groundAngle. It might be worth seeing if Schematron catches it?</div><div><br></div><div>Thanks for the great lesson, Vince, something to think about. But since X3DUOM says 1.5708, I'll go with that, instead of presumptuously moving it up to 2. I don't really want to conflict with X3DUOM, which is only confusing! AFAIK, schema is merely informational in this app, it doesn't stop rendering (yet). Currently the angle I'm most worried about is the SpotLight's.</div><div><br></div><div>John</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Mar 1, 2026 at 6:46 AM Vincent Marchetti via x3d-public <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I think this serves as an example of overeager validation, not overeager rounding.<br>
<br>
If validation is going to be a useful tool it should serve to warn of practical errors. The issue raised here could happen regardless of any additional rounding applied beyond that due to floating point representation. <br>
<br>
I suggest that a practical validation for this case would be to compare the groundAngle to 2.0 This will allow users to achieve the intentian of a groundAngle of pi/2 without giving false validation errors, and it would raise a red flag if the author mistakenly entered 180 for the groundAngle.<br>
<br>
It's always the code developer responsibility to catch mathematically invalid input values at run time.<br>
<br>
Vince Marchetti<br>
<br>
<br>
> On Mar 1, 2026, at 3:39 AM, John Carlson via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>> wrote:<br>
> <br>
> Any comments on overeager rounding, which causes validation failures? Maximum angle is 1.5708, which rounds off to 1.571, which is too big. Problem is with Background.groundAngle. An argument for always validating?<br>
> <br>
> I didn’t notice an issue visually until trying to interpret schema validation issues.<br>
> <br>
> Any JavaScript filters for fixing overflows is welcome!<br>
> <br>
> As Joe says, sometimes you just want to go into user code and fix it.<br>
> <br>
> What if this had happened with .glb?<br>
> <br>
> John<br>
> <br>
> <br>
> Error below:<br>
> keyword: maximum<br>
> schema location: $defs > Background > oneOf > 1 > properties > @groundAngle > items > maximum<br>
> schema value: 1.5708<br>
> instance location: X3D > Scene > -children > 0 > Background > @groundAngle > 1<br>
> instance value: 1.571<br>
> instance shorthand value: 1.571<br>
> _______________________________________________<br>
> x3d-public mailing list<br>
> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>