Cone
The cone() function creates a 3D cone mesh. Adjust radius, height, and segment counts to
change its geometry.
cone(32, 48) .color("salmon") .shaded();
Returns the Cone object:
Cone
Example usage:
cone.height(2).radius(1);
field
mesh: THREE.Mesh<THREE.ConeGeometry>
The THREE.Mesh instance representing this object.
Example
cone.mesh.rotation.x = Math.PI / 6;
method
pos(position: Vec3): Cone
Set the position of the object.
param position
A vector-like object representing the position.Example
cone.pos([0, 1, 0]);
method
color(color: THREE.ColorRepresentation): Cone
Set the color of the object.
param color
A color input for this object.Example
cone.color("red");
method
material(material: THREE.Material): Cone
Set the material of the object.
param material
A THREE.Material instance.Example
cone.material(new THREE.MeshStandardMaterial());
method
shaded(): Cone
Configures the object to use a shaded material.
Example
cone.shaded();
method
radius(radius: number): Cone
Sets the radius of the cone.
param radius
The new radius of the cone.Example
cone.radius(1.5);
method
height(height: number): Cone
Sets the height of the cone.
param height
The new height of the cone.Example
cone.height(3);
method
segments(radialSegments: number): Cone
Sets the amount of radial segments.
param radialSegments
Radial segmentsExample
cone.segments(24);