StencilOperation
Defines the operations that can be performed on the stencil buffer.
| Type | Name | Interface Description |
|---|---|---|
| Enum | DecrementAndClamp | • Function: Decrements the current stencil buffer value and clamps it to zero. |
| Enum | DecrementAndWrap | • Function: Decrements the current stencil buffer value and wraps it around if necessary. |
| Enum | IncrementAndClamp | • Function: the current stencil buffer value and clamps it to the maximum representable unsigned integer. |
| Enum | IncrementAndWrap | • Function: Increments the current stencil buffer value and wraps it around if necessary. |
| Enum | Invert | • Function: Bitwise inverts the current stencil buffer value. |
| Enum | Keep | • Function: Keeps the current value of the stencil buffer. |
| Enum | Replace | • Function: Replaces the current stencil buffer value with a reference value. |
| Enum | Zero | • Function: Sets the stencil buffer to zero. |
Examples
DecrementAndClamp
let value = APJS.StencilOperation.DecrementAndClamp;
DecrementAndWrap
let value = APJS.StencilOperation.DecrementAndWrap;
IncrementAndClamp
let value = APJS.StencilOperation.IncrementAndClamp;
IncrementAndWrap
let value = APJS.StencilOperation.IncrementAndWrap;
Invert
let value = APJS.StencilOperation.Invert;
Keep
let value = APJS.StencilOperation.Keep;
Replace
let value = APJS.StencilOperation.Replace;
Zero
let value = APJS.StencilOperation.Zero;
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use StencilOperation here
}
onUpdate(deltaTime: number) {
}
}