Module technology.sola.engine
Interface LightFlicker.FlickerSmoothing
- Enclosing class:
- LightFlicker
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Defines the API for the function called to smooth the transition between the current and next light intensity values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LightFlicker.FlickerSmoothing
Returns the average of the current value and the next value. -
Method Summary
Modifier and TypeMethodDescriptionint
apply
(int current, int next, float deltaTime) Function called to smooth the transition between the current and next light intensity values
-
Field Details
-
RUNNING_AVERAGE
Returns the average of the current value and the next value.
-
-
Method Details
-
apply
int apply(int current, int next, float deltaTime) Function called to smooth the transition between the current and next light intensity values- Parameters:
current
- the current intensity value between 0 and 255next
- the next intensity value between 0 and 255deltaTime
- the delta time for the frame- Returns:
- the next, smoothed intensity value
-