five-on-it / apps/client/src/renderer/screen-fx / ScreenFxState
Class: ScreenFxState
Defined in: apps/client/src/renderer/screen-fx.ts:76
The screen's effects as numbers, frame by frame (no drawing: createScreenFx draws them): the white-out after the last flash, the gas's tint coming and going, the stun's sway easing in.
Constructors
Constructor
new ScreenFxState():
ScreenFxState
Returns
ScreenFxState
Properties
now
readonlynow:object
Defined in: apps/client/src/renderer/screen-fx.ts:78
What is on the screen now (see ScreenFx.now).
blurred
blurred:
boolean=false
flashes
flashes:
number=0
tint
tint:
number=0
whiteout
whiteout:
number=0
wobble
wobble:
number=0
Methods
flash()
flash(
strength):void
Defined in: apps/client/src/renderer/screen-fx.ts:84
A flashbang reached the player: strength 1 point blank.
Parameters
strength
number
Returns
void
update()
update(
dt,state):object
Defined in: apps/client/src/renderer/screen-fx.ts:93
Moves the numbers on by dt seconds; returns the camera's sway this frame (m).
Parameters
dt
number
state
Returns
object
x
x:
number
z
z:
number