DecalBuilder

Class containing static functions to help procedurally build meshes

Hierarchy

  • DecalBuilder

Index

Methods

Methods

Static CreateDecal

Find examples in Playground
  • Creates a decal mesh. A decal is a mesh usually applied as a model onto the surface of another mesh. So don't forget the parameter sourceMesh depicting the decal

    • The parameter position (Vector3, default (0, 0, 0)) sets the position of the decal in World coordinates
    • The parameter normal (Vector3, default Vector3.Up) sets the normal of the mesh where the decal is applied onto in World coordinates
    • The parameter size (Vector3, default (1, 1, 1)) sets the decal scaling
    • The parameter angle (float in radian, default 0) sets the angle to rotate the decal
    see

    https://doc.babylonjs.com/how_to/decals

    Parameters

    • name: string

      defines the name of the mesh

    • sourceMesh: AbstractMesh

      defines the mesh where the decal must be applied

    • options: object

      defines the options used to create the mesh

    Returns Mesh

    the decal mesh

Generated using TypeDoc