createTorus

createTorus

Creates a torus primitive and adds it to the scene.

Signature

createTorus(options?: CreatePrimitiveOptions): Promise<SceneObject>

Parameters

Parameter
Type
Required
Description

options

No

Transform and primitive-specific settings

PrimitiveTorusSettings fields

Field
Type
Description

torusRingRadius

number

Radius of the ring (center to tube center)

torusTubeRadius

number

Radius of the tube

torusRingSegments

number

Segments along the ring

torusTubeSegments

number

Segments along the tube

computeNormals

boolean

Recompute normals

Returns

Promise<SceneObject> - the created object.

Examples

Last updated