Bitbybit Docs
    Preparing search index...

    Class BabylonDecal

    Index

    Constructors

    create

    • Creates a geometry decal that projects an image onto a mesh. The decal is a clipped child mesh that hugs the surface of the source mesh, which makes it work with any material and on any static mesh. It adds geometry, so for deforming meshes or many accumulating decals prefer the decal map approach instead.

      Parameters

      Returns Mesh

      Babylon mesh representing the decal, parented to the source mesh

      mesh decal

      true

      true

    • Enables a UV-space decal map on a mesh and turns on the decal map plugin of its material. Unlike geometry decals this projects images directly into the mesh texture space, so no geometry is added, decals follow deformation and multiple projections accumulate into a single map. The mesh must have proper, non-overlapping UV coordinates.

      Parameters

      Returns MeshUVSpaceRenderer

      Babylon decal map renderer used to project images

      enable decal map

      true

    update

    • Projects an image into a decal map. Each call adds the image at the given location, accumulating onto previously projected decals. Use it together with a decal map enabled on the mesh.

      Parameters

      • inputs: ProjectDecalDto

        decal map renderer, image texture and projection parameters

      Returns void

      project decal

    • Clears all projected decals from a decal map, resetting it to empty.

      Parameters

      Returns void

      clear decal map