Doc > Nodes > SOP > Torus

Doc > Nodes > SOP > Torus

Creates a torus.


no description


Name Type Description
radius float large radius
radiusTube float radius of the tube
segmentsRadial integer number of segments along the length of the torus
segmentsTube integer number of segments along the tube
open boolean open
arc float arc
cap boolean create caps
direction vector3 axis perpendicular to the torus
center vector3 center of the torus

Edit code in JsFiddle , Codepen , view in a new tab or Open in the Editor

	// create a scene
const scene = new PolyScene();
const root = scene.root();

// create a torus
const geo = root.createNode('geo');
const torus = geo.createNode('torus');

// add a light

// create a camera
const perspectiveCamera1 = root.createNode('perspectiveCamera');
perspectiveCamera1.p.t.set([5, 5, 5]);
// add orbitControls
const events1 = perspectiveCamera1.createNode('eventsNetwork');
const orbitsControls = events1.createNode('cameraOrbitControls');

// mount the viewer
const element = document.getElementById('app');
Is this doc helpful/not helpful? Is there any information you would like that is not available? Don't hesitate to get in touch with any question or feedback, either by email, on Discord or the forum.