Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DecalBuilder

Class containing static functions to help procedurally build meshes

Hierarchy

  • DecalBuilder

Index

Methods

Methods

Static CreateDecalSearch playground for CreateDecal

  • 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
    • The parameter captureUVS defines if we need to capture the uvs or compute them
    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: { angle?: number; captureUVS?: boolean; normal?: Vector3; position?: Vector3; size?: Vector3 }

      defines the options used to create the mesh

      • Optional angle?: number
      • Optional captureUVS?: boolean
      • Optional normal?: Vector3
      • Optional position?: Vector3
      • Optional size?: Vector3

    Returns Mesh

    the decal mesh

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method