BlendFactor
Enumeration representing blend factors used in blending operations.
| Type | Name | Interface Description |
|---|---|---|
| Enum | DstAlpha | • Function: Blending factor that uses the destination alpha as the source value. |
| Enum | DstColor | • Function: Blending factor that uses the destination color as the source value. |
| Enum | One | • Function: Blending factor that uses one as the source and destination color values. |
| Enum | OneMinusDstAlpha | • Function: Blending factor that uses one minus the destination alpha as the source value. |
| Enum | OneMinusDstColor | • Function: Blending factor that uses one minus the destination color as the source value. |
| Enum | OneMinusSrcAlpha | • Function: Blending factor that uses one minus the source alpha as the source value. |
| Enum | OneMinusSrcColor | • Function: Blending factor that uses one minus the source color as the source value. |
| Enum | SrcAlpha | • Function: Blending factor that uses the source alpha as the source value. |
| Enum | SrcColor | • Function: Blending factor that uses the source color as the source value. |
| Enum | Zero | • Function: Blending factor that uses zero as the source and destination color values. |
Examples
DstAlpha
let value = APJS.BlendFactor.DstAlpha;
DstColor
let value = APJS.BlendFactor.DstColor;
One
let value = APJS.BlendFactor.One;
OneMinusDstAlpha
let value = APJS.BlendFactor.OneMinusDstAlpha;
OneMinusDstColor
let value = APJS.BlendFactor.OneMinusDstColor;
OneMinusSrcAlpha
let value = APJS.BlendFactor.OneMinusSrcAlpha;
OneMinusSrcColor
let value = APJS.BlendFactor.OneMinusSrcColor;
SrcAlpha
let value = APJS.BlendFactor.SrcAlpha;
SrcColor
let value = APJS.BlendFactor.SrcColor;
Zero
let value = APJS.BlendFactor.Zero;
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use BlendFactor here
}
onUpdate(deltaTime: number) {
}
}