---
agentTools:
  projectIndex: https://whsjs.readme.io/llms.txt
---

# Ring

[components / meshes / Ring.js](https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/framework/components/meshes/Ring.js)

`WHS.Ring` class makes a circle or just 2D <a href="#torus">`WHS.Torus`</a> that doesn't support physics.

[block:code]
{
  "codes": [
    {
      "code": "const ring = new WHS.Ring({\n  geometry: {\n    innerRadius: 5,\n    outerRadius: 2\n  },\n\n  material: new THREE.MeshLambertMaterial({\n    color: 0xffffff,\n    side THREE.DoubleSide\n  }),\n\n  position: [0, 8, 0],\n\n  rotation: {\n    x: Math.PI/4\n  }\n});\n\nring.addTo(world);\n",
      "language": "javascript"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Parameters"
}
[/block]

### Geometry defaults

[block:code]
{
  "codes": [
    {
      "code": "{\n  // ...\n\n  geometry: {\n    innerRadius: 0, // Number.\n    outerRadius: 50, // Number.\n    thetaSegments: 8, // Number.\n    phiSegments: 8, // Number.\n    thetaStart: 0, // Number.\n    thetaLength: Math.PI * 2 // Number.\n  }\n}\n",
      "language": "javascript"
    }
  ]
}
[/block]

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

[block:api-header]
{
  "type": "basic",
  "title": "Instructions"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "{\n  // ...\n\n  geometry: [\n    'innerRadius', \n    'outerRadius', \n    'thetaSegments', \n    'phiSegments', \n    'thetaStart', \n    'thetaLength'\n  ]\n}\n",
      "language": "javascript"
    }
  ]
}
[/block]