Fork me on GitHub

2D Primitives Component as plugin

22.12.2011 Uncategorized

The x3d specification describes eight 2D Nodes:

  • Arc2D
  • ArcClose2D (“PIE”/”CHORD”)
  • Circle2D
  • Disk2D
  • Polyline2D
  • Polypoint2D
  • Rectangle2D
  • TriangleSet2D.

Recently you can use it to build you scene in X3DOM.

This component and those nodes are not part of the X3DOM core but provides by a extra component plugin.

You can use it with include the Geometry2D.js component

The Attributes of all these components you could change with javascript. For example, you could change the length of the radius of Arc2D as follows:

 document.getElementById(‘ArcID’).setAttribute(‘radius’, ‘1’);