BabylonJS - Polyhedron



This is one of the shapes used with the MeshBuilder.

Syntax

var octahedron = BABYLON.MeshBuilder.CreatePolyhedron("oct", {type: 1, size: 3, sizeX, sizeY, sizeZ, custom, faceColors, faceUV, flat, updatable}, scene);

Parameters

Consider the following parameters to create a polyhedron −

  • Type − Polyhedron type in the range [0,14].

  • Size − Polyhedron size.

  • SizeX − X polyhedron size, overwrites the size property.

  • SizeY − Y polyhedron size, overwrites the size property.

  • SizeZ − Z polyhedron size, overwrites the size property.

  • Custom − Apolyhedron object, overwrites the type property.

  • FaceColors − Array of colors. Color4(1, 1, 1, 1) for each side.

  • FaceUV − UVs(0, 0, 1, 1) for each side.

  • Flat − If false, a polyhedron has a single global face, faceUV and faceColors are ignored.

  • Updatable − By default, set to false. If required to be updated during morphing, you can set it to true.

babylonjs_mesh.htm
Advertisements