PIXI.StateSystem
class StateSystem implements PIXI.ISystem
System plugin to the renderer to manage WebGL state machines.
Summary
Properties from StateSystem
PIXI.BLEND_MODES |
|
number |
|
number |
|
boolean |
Whether current blend equation is different |
Array<Function> |
|
PIXI.State |
|
WebGLRenderingContext |
|
Array<Function> |
|
Methods from StateSystem
void |
|
void |
Resets all the logic and disables the VAOs. |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
Checks to see which updates should be checked based on which settings have been activated. |
Public Properties
Protected Properties
Public Methods
forceState(state: unknown) → {void}
Sets the state, when previous state is unknown.
Name | Type | Description |
---|---|---|
state | unknown |
The state to set |
Type | Description |
---|---|
void |
reset() → {void}
Resets all the logic and disables the VAOs.
Type | Description |
---|---|
void |
set(state: unknown) → {void}
Sets the current state
Name | Type | Description |
---|---|---|
state | unknown |
The state to set. |
Type | Description |
---|---|
void |
setBlend(value: boolean) → {void}
Sets whether to enable or disable blending.
Name | Type | Description |
---|---|---|
value | boolean |
Turn on or off WebGl blending. |
Type | Description |
---|---|
void |
setBlendMode(value: number) → {void}
Sets the blend mode.
Name | Type | Description |
---|---|---|
value | number |
The blend mode to set to. |
Type | Description |
---|---|
void |
setCullFace(value: boolean) → {void}
Sets whether to enable or disable cull face.
Name | Type | Description |
---|---|---|
value | boolean |
Turn on or off webgl cull face. |
Type | Description |
---|---|
void |
setDepthMask(value: boolean) → {void}
Sets whether to enable or disable depth mask.
Name | Type | Description |
---|---|---|
value | boolean |
Turn on or off webgl depth mask. |
Type | Description |
---|---|
void |
setDepthTest(value: boolean) → {void}
Sets whether to enable or disable depth test.
Name | Type | Description |
---|---|---|
value | boolean |
Turn on or off webgl depth testing. |
Type | Description |
---|---|
void |
setFrontFace(value: boolean) → {void}
Sets the gl front face.
Name | Type | Description |
---|---|---|
value | boolean |
true is clockwise and false is counter-clockwise |
Type | Description |
---|---|
void |
setOffset(value: boolean) → {void}
Sets whether to enable or disable polygon offset fill.
Name | Type | Description |
---|---|---|
value | boolean |
Turn on or off webgl polygon offset testing. |
Type | Description |
---|---|
void |
setPolygonOffset(value: number, scale: number) → {void}
Sets the polygon offset.
Name | Type | Description |
---|---|---|
value | number |
the polygon offset |
scale | number |
the polygon offset scale |
Type | Description |
---|---|
void |
updateCheck(func: (system: this, state: PIXI.State) => void, value: boolean) → {void}
Checks to see which updates should be checked based on which settings have been activated.
For example, if blend is enabled then we should check the blend modes each time the state is changed or if polygon fill is activated then we need to check if the polygon offset changes. The idea is that we only check what we have too.
Name | Type | Description |
---|---|---|
func | (system: this, state: PIXI.State) => void |
the checking function to add or remove |
value | boolean |
should the check function be added or removed. |
Type | Description |
---|---|
void |