Circle

The circle() function creates a flat circle in 3D space. You can control its radius, segments, and material options.

circle(32);

Returns the Circle object:


Circle

Example usage:
circle.radius(1.5).segments(32);
field
mesh: THREE.Mesh<THREE.CircleGeometry>
The THREE.Mesh instance representing this object.
Example
circle.mesh.rotation.z = Math.PI / 4;
method
pos(position: Vec3): Circle
Set the position of the object.
param position
A vector-like object representing the position.
Example
circle.pos([0, 1, 0]);
method
color(color: THREE.ColorRepresentation): Circle
Set the color of the object.
param color
A color input for this object.
Example
circle.color("salmon");
method
material(material: THREE.Material): Circle
Set the material of the object.
param material
A THREE.Material instance.
Example
circle.material(new THREE.MeshStandardMaterial());
method
shaded(): Circle
Configures the object to use a shaded material.
Example
circle.shaded();
method
radius(radius: number): Circle
Sets the radius of the circle.
param radius
The new radius of the circle.
Example
circle.radius(2);
method
segments(segments: number): Circle
Sets the number of segments of the circle.
param segments
The new number of segments.
returns
The updated Circle object.
Example
circle.segments(64);