import type * as BABYLON from "@babylonjs/core"; import type { Base } from "./base-inputs"; /** * Parameters for decals - images projected onto the surface of an existing mesh, following its * curvature. Carries the target mesh, the projection position, direction and size, and the material * used for the projected image. */ export declare namespace BabylonDecal { /** * Feeds `babylon.decal.createMeshDecal`: the mesh to stick an image onto, the image, where and * which way it is projected, its size and the rendering details. */ class CreateMeshDecalDto { constructor(sourceMesh?: BABYLON.AbstractMesh, texture?: BABYLON.BaseTexture, position?: Base.Point3, normal?: Base.Vector3, size?: Base.Vector3, angle?: number, cullBackFaces?: boolean, localMode?: boolean, zOffset?: number); /** * Mesh to project the decal onto. The decal is created as a clipped child mesh hugging the surface. * @default undefined */ sourceMesh: BABYLON.AbstractMesh; /** * Image texture to project. Create it via texture image, and keep an alpha channel for cutout decals. * @default undefined */ texture: BABYLON.BaseTexture; /** * Position of the decal projector in world coordinates. Often picked from a ray/pick hit on the mesh. * @default [0, 0, 0] */ position?: Base.Point3 | undefined; /** * Direction the decal is projected along, in world coordinates. Usually the surface normal at the hit point. * @default [0, 1, 0] */ normal?: Base.Vector3 | undefined; /** * Size of the decal box on each axis. The third value is the projection depth. * @default [1, 1, 1] */ size?: Base.Vector3 | undefined; /** * Angle to rotate the decal around the projection direction, in radians. * @default 0 * @step 0.1 */ angle?: number | undefined; /** * Remove back faces from the decal mesh so it only sticks to faces pointing towards the projector. * @default true */ cullBackFaces?: boolean | undefined; /** * Compute the decal using the local mesh coordinates instead of world space. Useful when the source mesh is transformed. * @default false */ localMode?: boolean | undefined; /** * Depth bias used to avoid z-fighting between the decal and the surface. Negative values push the decal towards the camera. * @default -2 * @step 0.5 */ zOffset?: number | undefined; } /** * Feeds `babylon.decal.enableDecalMap`: the mesh and material to give a decal map, and the * resolution of that map. */ class EnableDecalMapDto { constructor(mesh?: BABYLON.AbstractMesh, material?: BABYLON.Material, width?: number, height?: number); /** * Mesh on which a UV-space decal map should be enabled. The mesh must have proper, non-overlapping UV coordinates. * @default undefined */ mesh: BABYLON.AbstractMesh; /** * Material of the mesh on which the decal map plugin should be turned on so projected decals are blended in the shader. * @default undefined */ material: BABYLON.Material; /** * Width in pixels of the internal decal map render target. * @default 1024 */ width?: number | undefined; /** * Height in pixels of the internal decal map render target. * @default 1024 */ height?: number | undefined; } /** * Feeds `babylon.decal.projectDecal`: the decal map to paint into, the image and where, which * way and how big it is projected. */ class ProjectDecalDto { constructor(decalMap?: BABYLON.MeshUVSpaceRenderer, texture?: BABYLON.BaseTexture, position?: Base.Point3, normal?: Base.Vector3, size?: Base.Vector3, angle?: number); /** * Decal map renderer obtained from enabling a decal map on a mesh. Projected decals accumulate into it. * @default undefined */ decalMap: BABYLON.MeshUVSpaceRenderer; /** * Image texture to project into the mesh UV space. * @default undefined */ texture: BABYLON.BaseTexture; /** * Position of the projector in world coordinates. * @default [0, 0, 0] */ position?: Base.Point3 | undefined; /** * Projection direction in world coordinates, usually the surface normal at the projection point. * @default [0, 1, 0] */ normal?: Base.Vector3 | undefined; /** * Size of the projection box on each axis. * @default [1, 1, 1] */ size?: Base.Vector3 | undefined; /** * Angle to rotate the projection around the projection direction, in radians. * @default 0 * @step 0.1 */ angle?: number | undefined; } /** * Feeds `babylon.decal.clearDecalMap` with the decal map to empty. */ class DecalMapDto { constructor(decalMap?: BABYLON.MeshUVSpaceRenderer); /** * Decal map renderer to operate on. * @default undefined */ decalMap: BABYLON.MeshUVSpaceRenderer; } }