A blend mode.

Hierarchy

  • EventDispatcher<Event>
    • BlendMode

Constructors

  • Constructs a new blend mode.

    Parameters

    • blendFunction: BlendFunction

      The blend function.

    • Optionalopacity: number

      The opacity of the color that will be blended with the base color.

    Returns BlendMode

Properties

opacity: Uniform<any>

A uniform that controls the opacity of this blend mode.

TODO Add opacity accessors for uniform value.

Accessors

Methods

  • Adds a listener to an event type.

    Type Parameters

    • T extends keyof Event<string, unknown>

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<Event<string, unknown>[T], T, BlendMode>

      The function that gets called when the event is fired.

    Returns void

  • Fire an event type.

    Type Parameters

    • T extends keyof Event<string, unknown>

    Parameters

    • event: BaseEvent<T> & Event<string, unknown>[T]

      The event that gets fired.

    Returns void

  • Returns the blend function.

    Returns BlendFunction

    The blend function.

    Use blendFunction instead.

  • Returns the opacity.

    Returns number

    The opacity.

  • Returns the blend function shader code.

    Returns string

    The blend function shader code.

  • Checks if listener is added to an event type.

    Type Parameters

    • T extends keyof Event<string, unknown>

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<Event<string, unknown>[T], T, BlendMode>

      The function that gets called when the event is fired.

    Returns boolean

  • Removes a listener from an event type.

    Type Parameters

    • T extends keyof Event<string, unknown>

    Parameters

    • type: T

      The type of the listener that gets removed.

    • listener: EventListener<Event<string, unknown>[T], T, BlendMode>

      The listener function that gets removed.

    Returns void

  • Sets the blend function.

    Parameters

    Returns void

    Use blendFunction instead.

  • Sets the opacity.

    Parameters

    • value: number

      The opacity.

    Returns void

""