Documentation / device / ColorState
Interface: ColorState
Defined in: libs/device/src/render_states.ts:8
The render states related to the fragment output
Properties
redMask
redMask:
boolean
Defined in: libs/device/src/render_states.ts:12
true if it is enabled to write to the red channel
greenMask
greenMask:
boolean
Defined in: libs/device/src/render_states.ts:14
true if it is enabled to write to the green channel
blueMask
blueMask:
boolean
Defined in: libs/device/src/render_states.ts:16
true if it is enabled to write to the blue channel
alphaMask
alphaMask:
boolean
Defined in: libs/device/src/render_states.ts:18
true if it is enabled to write to the alpha channel
Methods
clone()
clone():
ColorState
Defined in: libs/device/src/render_states.ts:10
Creates a new ColorState by copying this one
Returns
ColorState
setColorMask()
setColorMask(
r,g,b,a):this
Defined in: libs/device/src/render_states.ts:26
Set fragment write mask
Parameters
r
boolean
true if writing to the red channel is allowed
g
boolean
true if writing to the green channel is allowed
b
boolean
true if writing to the blue channel is allowed
a
boolean
true if writing to the alpha channel is allowed
Returns
this