import Texture from "../textures/Texture"; import Painter from "../rendering/Painter"; import IFilterHelper from "./IFilterHelper"; import FragmentFilter from "./FragmentFilter"; declare namespace starling.filters { /** * The GlowFilter class lets you apply a glow effect to display objects. * * It is similar to the drop shadow filter with the distance and angle properties set to 0. * * * *

This filter can also be used to create outlines around objects. The trick is to * * assign an alpha value that's (much) greater than 1.0, and full resolution. * * For example, the following code will yield a nice black outline:

* * * * object.filter = new GlowFilter(0x0, 30, 1, 1.0); * */ export class GlowFilter extends FragmentFilter { /** * Initializes a new GlowFilter instance with the specified parameters. * * * * @param color the color of the glow * * @param alpha the alpha value of the glow. Values between 0 and 1 modify the * * opacity; values > 1 will make it stronger, i.e. produce a harder edge. * * @param blur the amount of blur used to create the glow. Note that high * * values will cause the number of render passes to grow. * * @param quality the quality of the glow's blur, '1' being the best (range 0.1 - 1.0) * * @param inner if enabled, the glow will be drawn inside the object. * * @param knockout if enabled, only the glow will be drawn. * */ constructor(color?: number, alpha?: number, blur?: number, quality?: number, inner?: boolean, knockout?: boolean); /** * @inheritDoc */ override dispose(): void; /** * @private */ override process(painter: Painter, helper: IFilterHelper, input0?: Texture, input1?: Texture, input2?: Texture, input3?: Texture): Texture; /** * The color of the glow. @default 0xffff00 */ get color(): number; set color(value: number) /** * The alpha value of the glow. Values between 0 and 1 modify the opacity; * * values > 1 will make it stronger, i.e. produce a harder edge. @default 1.0 */ get alpha(): number; set alpha(value: number) /** * The amount of blur with which the glow is created. * * The number of required passes will be Math.ceil(value) × 2. * * @default 1.0 */ get blur(): number; set blur(value: number) /** * The quality used for blurring the glow. * * Forwarded to the internally used BlurFilter. */ get quality(): number; set quality(value: number) /** * Indicates whether or not the glow is an inner glow. The default is * * false, an outer glow (a glow around the outer edges of the object). */ get inner(): boolean; set inner(value: boolean) get_inner(): boolean; set_inner(value: boolean): boolean; /** * If enabled, applies a knockout effect, which effectively makes the object's fill * * transparent. @default false */ get knockout(): boolean; set knockout(value: boolean) get_knockout(): boolean; set_knockout(value: boolean): boolean; } } export default starling.filters.GlowFilter;