Viewport
Viewport is a Grouping node that can contain most nodes. Viewport specifies a set of rectangular clip boundaries against which the children nodes are clipped as they are rendered.
The Viewport node belongs to the Layering component and its container field is viewport. It is available since X3D version 3.2 or later.
Fields
SFNode [in, out] metadata NULL [X3DMetadataObject]
Metadata are not part of the X3D world and not interpreted by the X3D browser, but they can be accessed via the ECMAScript interface.
MFFloat [in, out] clipBoundary [ 0, 1, 0, 1 ] [0,1]
ClipBoundary is specified in fractions of the normal render surface in the sequence left/right/bottom/top. When children are rendered, the output will only appear in the specified subset of the render surface.
Hint
Default value 0 1 0 1 indicates 0-1 left-to-right and 0-1 bottom-to-top, meaning full view.
SFVec3f [ ] bboxSize -1 -1 -1 (0,∞) or -1 -1 -1
Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.
Hint
Can be useful for collision computations or inverse-kinematics (IK) engines.
SFVec3f [ ] bboxCenter 0 0 0 (-∞,∞)
Bounding box center: optional hint for position offset from origin of local coordinate system.
MFNode [in] addChildren
Input field addChildren.
MFNode [in] removeChildren
Input field removeChildren.
MFNode [in, out] children [ ] [X3DChildNode]
Grouping nodes contain a list of children nodes.
Hint
Each grouping node defines a coordinate space for its children, relative to the coordinate space of its parent node. Thus transformations accumulate down the scene graph hierarchy.