doodle.reactor

Type members

Classlikes

trait BaseReactor[A]

A reactor is a simple way to express an interactive program. It allows us to write programs in terms of some initial state and transformations of that state in response to inputs and clock ticks.

A reactor is a simple way to express an interactive program. It allows us to write programs in terms of some initial state and transformations of that state in response to inputs and clock ticks.

This is the basic interface. See Reactor for a more user friendly implementation.

It is based on * the same abstraction in Pyret.

Companion
object
Companion
class
final case
class Reactor[A](initial: A, onMouseClickHandler: (Point, A) => A, onMouseMoveHandler: (Point, A) => A, onTickHandler: A => A, tickRate: FiniteDuration, renderHandler: A => Image, stopHandler: A => Boolean) extends BaseReactor[A]

A Reactor that has reasonable defaults and a simple builder style for creating more complicated behaviour.

A Reactor that has reasonable defaults and a simple builder style for creating more complicated behaviour.

Companion
object
object Reactor
Companion
class