Type alias DecalConfiguration

DecalConfiguration: { angle?: number; captureUVS?: boolean; cullBackFaces?: boolean; localMode?: boolean; name: string; normal?: Tuple<number, 3>; offset?: number; position: Tuple<number, 3>; scaling?: Tuple<number, 3>; sideOrientation?: number; size: Tuple<number, 3>; sourceMeshName: string }

Type declaration

  • Optional angle?: number

    Default 0

  • Optional captureUVS?: boolean

    true: Use UV mapping from source mesh
    false: Use default box mapping from the decal

    Default false

  • Optional cullBackFaces?: boolean

    Create decal only on front side if set to true

    Default true

  • Optional localMode?: boolean

    true: Sets created decal as child of source mesh

    Default true

  • name: string
  • Optional normal?: Tuple<number, 3>

    Default [0, 0, 1] (forward direction)

  • Optional offset?: number

    Shifts decals away from source mesh in direction of "normal" vector

    Default 0.001 (1mm)

  • position: Tuple<number, 3>
  • Optional scaling?: Tuple<number, 3>

    Can be used for shifting the decal away from the source mesh as alternative to offset.
    Use this setting when the offset should be applied in radial direction (e.g. cylinders)

    Default [1, 1, 1] (no offset through scaling)

  • Optional sideOrientation?: number

    The Babylon.js default for mesh side orientation value is Material.CounterClockWiseSideOrientation.
    However if the mesh (in this case the created decal mesh) is located under a glTF root node, it has to be flipped, using Material.ClockWiseSideOrientation.

    Default Material.ClockWiseSideOrientation

  • size: Tuple<number, 3>
  • sourceMeshName: string

Generated using TypeDoc