TorusBuilder

Class containing static functions to help procedurally build meshes

Hierarchy

  • TorusBuilder

Index

Methods

Methods

Static CreateTorus

Find examples in Playground
  • CreateTorus(name: string, options: object, scene: any): Mesh
  • Creates a torus mesh

    • The parameter diameter sets the diameter size (float) of the torus (default 1)
    • The parameter thickness sets the diameter size of the tube of the torus (float, default 0.5)
    • The parameter tessellation sets the number of torus sides (postive integer, default 16)
    • You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
    • If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters frontUVs and backUVs (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
    • The mesh can be set to updatable with the boolean parameter updatable (default false) if its internal geometry is supposed to change once created.
    see

    https://doc.babylonjs.com/how_to/set_shapes#torus

    Parameters

    • name: string

      defines the name of the mesh

    • options: object

      defines the options used to create the mesh

      • Optional backUVs?: Vector4
      • Optional diameter?: number
      • Optional frontUVs?: Vector4
      • Optional sideOrientation?: number
      • Optional tessellation?: number
      • Optional thickness?: number
      • Optional updatable?: boolean
    • scene: any

      defines the hosting scene

    Returns Mesh

    the torus mesh

Generated using TypeDoc