Create a new CapsuleGeometry instance.
By default, the constructor creates a capsule standing vertically centered on the XZ-plane with a radius of 0.3, a height of 1.0, 1 height segment and 20 cap segments. The capsule is created with UVs in the range of 0 to 1.
Optional
opts: {Options object.
Optional
calculateTangents?: booleanGenerate tangent information. Defaults to false.
Optional
height?: numberThe length of the body of the capsule from tip to tip. Defaults to 1.
Optional
heightSegments?: numberThe number of divisions along the tubular length of the capsule. Defaults to 1.
Optional
radius?: numberThe radius of the tube forming the body of the capsule. Defaults to 0.3.
Optional
sides?: numberThe number of divisions around the tubular body of the capsule. Defaults to 20.
A procedural capsule-shaped geometry.
Typically, you would: