Module Sphere
Sphere shape factory function.
Functions
Sphere (radius, v_segments, h_segments) | Creates a menori.Mesh with a sphere geometry. |
Functions
- Sphere (radius, v_segments, h_segments)
-
Creates a
menori.Mesh
with a sphere geometry.Parameters:
- radius number Sphere radius (default: 1)
- v_segments number Number of vertical segments (default: 16)
- h_segments number Number of horizontal segments (default: 32)
Returns:
-
menori.Mesh
A new
menori.Mesh
object containing the sphere geometryUsage:
-- Create a sphere with default parameters local sphere = menori.Sphere() -- Create a sphere with radius 2 local sphere = menori.Sphere(2) -- Create a low-poly sphere with custom segment counts local sphere = menori.Sphere(1, 4, 8) -- Create a ModelNode with sphere local model_node = menori.ModelNode(sphere)