WHS.Torus class makes a torus figure. Torus is a donut. Donut is a torus.

const torus = new WHS.Torus({
  geometry: {
    radius: 5,
    tube: 2
  },

  material: new THREE.MeshBasicMaterial({
    color: 0xffffff
  }),

  position: {
    y: 35
  }
});

torus.addTo(world);

Parameters

Geometry defaults

{
  // ...

  geometry: {
    radius: 100, // Number.
    tube: 40, // Number.
    radialSegments: 8, // Number.
    tubularSegments: 6, // Number.
    arc: Math.PI * 2 // Number.
  }
}

These defaults are additional, there are also defaults filled by MeshComponent, etc.

Instructions

{
  // ...

  geometry: [
    'radius',
    'tube',
    'radialSegments',
    'tubularSegments',
    'arc'
  ]
}