Home Reference Source
import {BlendMode} from 'postprocessing'
public class | source

BlendMode

Extends:

three~EventDispatcher → BlendMode

A blend mode.

Constructor Summary

Public Constructor
public

constructor(blendFunction: BlendFunction, opacity: Number)

Constructs a new blend mode.

Member Summary

Public Members
public get

The blend function.

public set
public

opacity: Uniform

A uniform that controls the opacity of this blend mode.

Method Summary

Public Methods
public
this method was deprecated. Use blendFunction instead.

Returns the blend function.

public

Returns the opacity.

public

Returns the blend function shader code.

public
this method was deprecated. Use blendFunction instead.

Sets the blend function.

public

setOpacity(value: Number)

Sets the opacity.

Public Constructors

public constructor(blendFunction: BlendFunction, opacity: Number) source

Constructs a new blend mode.

Params:

NameTypeAttributeDescription
blendFunction BlendFunction

The blend function.

opacity Number

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

Public Members

public get blendFunction: BlendFunction source

The blend function.

public set blendFunction source

public opacity: Uniform source

A uniform that controls the opacity of this blend mode.

TODO Add opacity accessors for uniform value.

Public Methods

public getBlendFunction(): BlendFunction source

this method was deprecated. Use blendFunction instead.

Returns the blend function.

Return:

BlendFunction

The blend function.

public getOpacity(): Number source

Returns the opacity.

Return:

Number

The opacity.

public getShaderCode(): String source

Returns the blend function shader code.

Return:

String

The blend function shader code.

public setBlendFunction(value: BlendFunction) source

this method was deprecated. Use blendFunction instead.

Sets the blend function.

Params:

NameTypeAttributeDescription
value BlendFunction

The blend function.

public setOpacity(value: Number) source

Sets the opacity.

Params:

NameTypeAttributeDescription
value Number

The opacity.