Function CreateBox
-
CreateBox(
name: string,
options?: {
backUVs?: Vector4;
bottomBaseAt?: number;
depth?: number;
faceColors?: Color4[];
faceUV?: Vector4[];
frontUVs?: Vector4;
height?: number;
sideOrientation?: number;
size?: number;
topBaseAt?: number;
updatable?: boolean;
width?: number;
wrap?: boolean;
},
scene?: Nullable<Scene>,
): MeshParameters
- name: string
defines the name of the mesh
- options: {
backUVs?: Vector4;
bottomBaseAt?: number;
depth?: number;
faceColors?: Color4[];
faceUV?: Vector4[];
frontUVs?: Vector4;
height?: number;
sideOrientation?: number;
size?: number;
topBaseAt?: number;
updatable?: boolean;
width?: number;
wrap?: boolean;
} = {}defines the options used to create the mesh
- scene: Nullable<Scene> = null
defines the hosting scene
Returns Mesh
the box mesh
- name: string
Creates a box mesh
sizesets the size (float) of each box side (default 1)width,heightanddepth(all by default have the same value ofsize)faceColors(an array of 6 Color3 elements) andfaceUV(an array of 6 Vector4 elements)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