Builder
Contains a set of helpful methods to implement basic render loops in a platform agonstic way.
- Type parameters:
- F1
effect type for stateless loops
- F2
effect type for stateful loops
Value members
Abstract methods
Renders a single frame.
Renders a single frame.
- Value parameters:
- renderFrame
operation to render the frame and update the state
def statefulRenderLoop[S](renderFrame: F2[Canvas, S, S], frameRate: LoopFrequency, terminateWhen: S => Boolean): RenderLoop[S]
Creates a render loop that keeps and updates a state on every iteration, terminating when a certain condition is reached.
Creates a render loop that keeps and updates a state on every iteration, terminating when a certain condition is reached.
- Value parameters:
- frameRate
frame rate limit
- renderFrame
operation to render the frame and update the state
- terminateWhen
loop termination check