Function CreateSphere
-
CreateSphere(
name: string,
options?: {
arc?: number;
backUVs?: Vector4;
diameter?: number;
diameterX?: number;
diameterY?: number;
diameterZ?: number;
frontUVs?: Vector4;
segments?: number;
sideOrientation?: number;
slice?: number;
updatable?: boolean;
},
scene?: Nullable<Scene>,
): MeshParameters
- name: string
defines the name of the mesh
- options: {
arc?: number;
backUVs?: Vector4;
diameter?: number;
diameterX?: number;
diameterY?: number;
diameterZ?: number;
frontUVs?: Vector4;
segments?: number;
sideOrientation?: number;
slice?: number;
updatable?: boolean;
} = {}defines the options used to create the mesh
- scene: Nullable<Scene> = null
defines the hosting scene
Returns Mesh
the sphere mesh
- name: string
Creates a sphere mesh
diametersets the diameter size (float) of the sphere (default 1)diameterX,diameterYanddiameterZ(all by default have the same value ofdiameter)segmentssets the sphere number of horizontal stripes (positive integer, default 32)arc(positive float, default 1), valued between 0 and 1, what is the ratio of the circumference (latitude) : 2 x PI x ratioslice(positive float, default1), valued between 0 and 1, what is the height ratio (longitude)frontUVsandbackUVs(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientationupdatable(default false) if its internal geometry is supposed to change once created