- BabylonJS Tutorial
- BabylonJS - Home
- BabylonJS - Introduction
- BabylonJS - Environment Setup
- BabylonJS - Overview
- BabylonJS - Basic Elements
- BabylonJS - Materials
- BabylonJS - Animations
- BabylonJS - Cameras
- BabylonJS - Lights
- BabylonJS - Parametric Shapes
- BabylonJS - Mesh
- VectorPosition and Rotation
- BabylonJS - Decals
- BabylonJS - Curve3
- BabylonJS - Dynamic Texture
- BabylonJS - Parallax Mapping
- BabylonJS - Lens Flares
- BabylonJS - Create ScreenShot
- BabylonJS - Reflection Probes
- Standard Rendering Pipeline
- BabylonJS - ShaderMaterial
- BabylonJS - Bones and Skeletons
- BabylonJS - Physics Engine
- BabylonJS - Playing Sounds & Music
- BabylonJS Useful Resources
- BabylonJS - Quick Guide
- BabylonJS - Useful Resources
- BabylonJS - Discussion
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