BabylonJS - Ground



This is one of the shapes used with the MeshBuilder.

Syntax

var ground = BABYLON.MeshBuilder.CreateGround("ground", {width: 150, height:15}, scene);

The width and height is passed as {width:150,height:15} to the class.

Sphere

This is one of the shapes used with the MeshBuilder.

Syntax

var sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {diameter: 2, diameterX: 3, diameterY:3 , diameterZ:3, arc:1, slice:1, updatable:false}, scene); 

Parameters

Consider the following parameters for the creation of a ground −

  • Diameter − Diameter of the sphere.

  • DiameterX − Diameter on x axis.Overwrites the diameter property.

  • DiameterY − Diameter on y axis. Overwrites the diameter property.

  • DiameterZ − Diameter on z axis. Overwrites the diameter property.

  • Arc − Ratio of circumference between 0 and 1.

  • Slice − Ratio of height between 0 and 1.

  • Updateble − By default, this is set to false. If it needs to be updated during morphing, you can set it to true.

babylonjs_mesh.htm
Advertisements