[x3d-public] Viewpoint (clipBoundary); missing from X3DUOM view on iPhone via google drive
John Carlson
yottzumm at gmail.com
Sun Jan 4 08:30:46 PST 2026
One of the gotchas in adding strict mode to Ajv JSON schema validation is
Viewport.clipBoundary:
Viewport : X3DViewportNode, X3DBoundedObject {
MFNode [in] addChildren [X3DChildNode]
MFNode [in] removeChildren [X3DChildNode]
MFNode [in,out] children [] [X3DChildNode]
MFFloat [in,out] clipBoundary 0 1 0 1 [0,1]
SFBool [in,out] bboxDisplay FALSE
SFNode [in,out] metadata NULL [X3DMetadataObject]
SFBool [in,out] visible TRUE
SFVec3f [] bboxCenter 0 0 0 (-∞,∞)
SFVec3f [] bboxSize -1 -1 -1 [0,∞) or -1 -1 -1
}
I don’t recall if this was discussed on the mailing list before.
The error reported was:
strict mode: "prefixItems" is 4-tuple, but minItems or maxItems/items
are not specified or different at path
"#/oneOf/1/properties/%40clipBoundary"
I don’t know if # prefixItems = 4 is appropriate here, since clipBoundary
is an MFFloat. I don’t know how to set a default for MFFloat without
prefixItems. I could set minItems = 0
The JSON schema says:
"@clipBoundary": {
"$comment": "MFFloat inputOutput",
"type": "array",
"prefixItems": [
{
"default": 0,
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"default": 1,
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"default": 0,
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"default": 1,
"maximum": 1,
"minimum": 0,
"type": "number"
}
],
"items": {
"maximum": 1,
"minimum": 0,
"type": "number"
}
},
X3DUOM 4.0 says:
ConcreteNode name="Viewport">
<InterfaceDefinition specificationUrl="
https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/layering.html#Viewport
"
appinfo="Viewport is a Grouping node that can contain most nodes.">
<componentInfo name="Layering" level="1"/>
<Inheritance baseType="X3DViewportNode"/>
[snip]
<field name="clipBoundary"
type="MFFloat"
accessType="inputOutput"
default="0 1 0 1"
minInclusive="0"
maxInclusive="1"
description="clipBoundary is specified in fractions of the normal render
surface in the sequence left/right/bottom/top."/>
[snip]
An addition, such as min/max length, if needed, would be a welcome addition
to X3DUOM.
Also X3DUOM 4.0 XML ConcreteNode Viewport wasn’t viewable on my iPhone in
Google drive as downloaded from web3d.org (there was no way to view the
full XML in safari, chrome or on sourceforge or drive). I probably could
have downloaded from sourceforge.
So I used my old copy on GitHub.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20260104/b236ce25/attachment-0001.html>
More information about the x3d-public
mailing list