runWhileDrawing

Draw the node in a loop until an event happens.

This is useful for testing. A chain of tree actions can be finished off with a call to this function to ensure it will finish after a frame or few.

@safe
int
runWhileDrawing
(,,
int frameLimit = int.max
)

Parameters

publisher Publisher!()

Publisher to subscribe to. If the publisher emits an event, drawing will stop and this function will return.

node Node

Node to draw in loop.

frameLimit int

Maximum number of frames that may be drawn. Errors if reached.

Return Value

Type: int

Number of frames that were drawn as a consequence.

Meta