Rectangles For Your 2D Needs
Node
Rectangle2D • Attributes
Description
A group of 2D rectangles textured with magenta, yellow and cyan.
VRIGNETTE Notes
You can also make flat rectangles by sizing a Box with one axis set to 0.
Example
Rotate the vrignette to view the geometry.
Code
<x3d> <scene> <worldInfo title="X3D Rectangle2D Example"> </worldInfo> <navigationInfo headlight="true"> </navigationInfo> <viewpoint position="0.0 1.5 12.0" centerOfRotation="0.0 0.0 0.0"> </viewpoint> <shape> <appearance> <material diffuseColor="0.90 0.30 0.90" specularColor="0.25 0.25 0.25" shininess="0.15"> </material> </appearance> <rectangle2d size="5.0 2.5" solid="false"> </rectangle2d> </shape> <transform translation="-2.0 2.0 -2.0"> <shape> <appearance> <material diffuseColor="0.90 0.90 0.30" specularColor="0.25 0.25 0.25" shininess="0.15"> </material> </appearance> <rectangle2d size="5.0 2.5" solid="false"> </rectangle2d> </shape> </transform> <transform translation="2.0 4.0 -4.0"> <shape> <appearance> <material diffuseColor="0.30 0.90 0.90" specularColor="0.25 0.25 0.25" shininess="0.15"> </material> </appearance> <rectangle2d size="5.0 2.5" solid="false"> </rectangle2d> </shape> </transform> <background skyColor="0.30 0.30 0.90" groundColor="0.30 0.90 0.30"> </background> </scene> </x3d>