import { DcController } from "../DcController.js"; /** * The name of the stage, as defined in stage definition supplied to the * setGeometry(...) method. */ export type StageName = string; /** * Defines how a texture is mapped on the geometry stage. */ export interface StageMapping { /** * The layer texture mapping * * If not provided only the surface material is visible by defaulting to `{x: -1, y: -1, width: 1, height: 1}`. */ uvMapping?: { /** * The x position where the mapping begins. * * This is not a pixel value but a percentage (i.e., a value between `0` * and `1`). */ x: number; /** * The y position where the mapping begins. * * This is not a pixel value but a percentage (i.e., a value between `0` * and `1`). */ y: number; /** * The with of the mapping. * * This is not a pixel value but a percentage (i.e., a value between `0` * and `1`). */ width: number; /** * The height of the mapping. * * This is not a pixel value but a percentage (i.e., a value between `0` * and `1`). */ height: number; }; /** * The rotation of the mapping in degrees. * * Defaults to `0`. */ rotation?: 0 | 90 | 180 | 270; /** * Defines if the stage should be visible at all * * Defaults to `true`. */ visible?: boolean; /** * Defines a sub area of the target geometry, where the stage will be displayed * * If no subMeshUVArea is defined, the whole area is used. */ subMeshUVArea?: { /** * The x position where the target uv box begins. * * This is not a pixel value but a percentage (i.e., a value between `0` * and `1`). */ x: number; /** * The y position where the target uv box begins. * * This is not a pixel value but a percentage (i.e., a value between `0` * and `1`). */ y: number; /** * The width of target uv box * * This is not a pixel value but a percentage (i.e., a value between `0` * and `1`). */ width: number; /** * The height of target uv box * * This is not a pixel value but a percentage (i.e., a value between `0` * and `1`). */ height: number; }; } /** * Sets the stage mappings (i.e., how a texture is mapped to the geometry). * * @param dcController The DcController object obtained from the init function. * @param mappings The stage mappings with the stage name as the key. * @returns A promise that resolves when the stage mappings have been set. */ export declare function setStageMappings(dcController: DcController, mappings: Record): Promise;