initializeTimeline

fun initializeTimeline(scope: CoroutineScope = CoroutineScope(Dispatchers.Default), timeTravel: Boolean = false, debug: Boolean = false, lazy: Boolean = true, eventLogger: EventLogger = EventLogger.Disabled, initClock: (Signal<Boolean>) -> Event<Duration> = { externalEvent<Duration>("clock") }): Timeline(source)

Initialize a new yafrl Timeline with the specified configuration options.

Parameters

scope

The coroutine scope associated with the timeline, to be used to launch any coroutines needed for asnychronous actions.

timeTravel

Determines whether time travel debugging (see TimeTravelDebugger) is enabled for the timeline.

debug

Determines whether debug logging is enabled for internal timeline operations.

lazy

If true (default behavior), state updates are not immediately propagated through the graph on changes, but rather updates are computed lazily (on-demand / as needed).

eventLogger

Configures the EventLogger used by default in the timeline. Disabled by defautl.

initClock

Determines how the timeline's clock is initialized. By default uses a discrete clock usable by testing. For animation / graphical applications this should be hooked into the event loop of the graphics processing pipeline to emit on each frame.