Question

How can I draw shapes other than cubes with x3dom? For instance, one shape I want to draw is a semi circle/cylinder. I can only find documentation to draw a cube which I already do. I have not found good documentation yet for x3dom.

Was it helpful?

Solution

X3DOM actually just wraps X3D. So you may better start with the X3D documentation. A quite good overview can be found here: X3D Slides.

There are some other primitives provided like:

<Shape>
  <Sphere radius='1'/>
  <Appearance>
    <Material/>
  </Appearance>
</Shape>

Also the examples provide a good starting point.

OTHER TIPS

to use a cylinder just use this in the shape node

<Cylinder />

as mistapink says check out the x3d docs, there are a few basic x3d primitives, such as sphere box cylinder cone.

anything more elaborate would require you to use pointsets etc. or you can model your own objects and export to x3d through lots of 3d apps, blender , 3d max , lightwave etc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top