WHS.Torusknot class makes a torusknot figure. It's like crooked donut, very crooked.

const torusknot = new WHS.Torusknot({
  geometry: {
    radius:5,
    tube: 2
  },

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

  pos: {
    y: 100
  }
});

torusknot.addTo(world);

Parameters

Geometry defaults

{
  // ...

  geometry: {
    radius: 100, // Number.
    tube: 40, // Number.
    radialSegments: 64, // Number.
    tubularSegments: 8, // Number.
    p: 2, // Number.
    q: 3 // Number.
  }
}

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

Instructions

{
  // ...

  geometry: [
    'radius',
    'tube',
    'radialSegments',
    'tubularSegments',
    'p',
    'q'
  ]
}