UNPKG

starling-framework

Version:

A fast, productive library for 2D cross-platform development.

41 lines 1.39 kB
declare namespace starling.filters { /** * An enumeration class with the available modes that are offered by the CompositeFilter * * to draw layers on top of each other. * * * * @see starling.filters.CompositeFilter * */ export class CompositeMode { /** * Draw layer on top of destination. Corresponds to BlendMode.NORMAL. * * <code>src + dst × (1 - src.alpha)</code> */ static readonly NORMAL = "normal"; /** * Draw layer on top of the destination using the destination's alpha value. * * <code>src × dst.alpha + dst × (1 - src.alpha)</code> */ static readonly INSIDE = "inside"; /** * Draw layer on top of the destination, using the destination's inverted alpha value. * * <code>src × (1 - dst.alpha) + dst</code> */ static readonly OUTSIDE = "outside"; /** * Draw only the new layer (erasing the old), using the destination's alpha value. * * <code>src × dst.alpha</code> */ static readonly INSIDE_KNOCKOUT = "insideKnockout"; /** * Draw only the new layer (erasing the old), using the destination's inverted alpha value. * * <code>src × (1 - dst.alpha)</code> */ static readonly OUTSIDE_KNOCKOUT = "outsideKnockout"; /** * Returns a different integer for each mode. */ static getIndex(mode: string): number; } } export default starling.filters.CompositeMode;