@lightningjs/renderer
Version:
Lightning 3 Renderer
59 lines (58 loc) • 1.72 kB
TypeScript
import { ShaderEffect, type DefaultEffectProps, type ShaderEffectUniforms } from './ShaderEffect.js';
/**
* Properties of the {@link RadiusEffect} shader
*/
export interface HolePunchEffectProps extends DefaultEffectProps {
/**
* X position where the hole punch starts
*/
x?: number;
/**
* Y position where the hole punch starts
*/
y?: number;
/**
* Width of the hole punch
*/
width?: number;
/**
* height of the hole punch
*
* @remarks if not defined uses the width value
*/
height?: number;
/**
* Corner radius in pixels, to cut out of the corners of the hole punch
*
* @remarks
* You can input an array with a length of up to four or a number.
*
* array length 4:
* [topLeft, topRight, bottomRight, bottomLeft]
*
* array length 2:
* [20, 40] -> [20(topLeft), 40(topRight), 20(bottomRight), 40(bottomLeft)]
*
* array length 3:
* [20, 40, 60] -> [20(topLeft), 40(topRight), 60(bottomRight), 20(bottomLeft)]
*
* number:
* 30 -> [30, 30, 30, 30]
*
* @default 0
*/
radius?: number | number[];
}
/**
* Masks the current maskcolor a holepunch effect with rounded corners similar to {@link RoundedRectangle}
*/
export declare class HolePunchEffect extends ShaderEffect {
static z$__type__Props: HolePunchEffectProps;
readonly name = "holePunch";
static getEffectKey(): string;
static uniforms: ShaderEffectUniforms;
static resolveDefaults(props: HolePunchEffectProps): Required<HolePunchEffectProps>;
static methods: Record<string, string>;
static onShaderMask: string;
static onEffectMask: string;
}