instantreality 1.0

2D Primitives Component as plugin

December 22nd, 2011

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′);

Comments are closed.

Fork me on GitHub