Packages

final case class Reactor[A](initial: A, onMouseClickHandler: (Point, A) => A = (_: Point, a: A) => a, onMouseMoveHandler: (Point, A) => A = (_: Point, a: A) => a, onTickHandler: (A) => A = (a: A) => a, tickRate: FiniteDuration = FiniteDuration(100, MILLISECONDS), renderHandler: (A) => Image = (_: A) => Image.empty, stopHandler: (A) => Boolean = (_: A) => false) extends BaseReactor[A] with Product with Serializable

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

Linear Supertypes
Serializable, Product, Equals, BaseReactor[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Reactor
  2. Serializable
  3. Product
  4. Equals
  5. BaseReactor
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Reactor(initial: A, onMouseClickHandler: (Point, A) => A = (_: Point, a: A) => a, onMouseMoveHandler: (Point, A) => A = (_: Point, a: A) => a, onTickHandler: (A) => A = (a: A) => a, tickRate: FiniteDuration = FiniteDuration(100, MILLISECONDS), renderHandler: (A) => Image = (_: A) => Image.empty, stopHandler: (A) => Boolean = (_: A) => false)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def draw[Alg[x[_]] <: Basic[x[_]], F[_], Frame, Canvas]()(implicit renderer: DefaultRenderer[Alg, F, Frame, Canvas]): Unit
  7. def draw[Alg[x[_]] <: Basic[x[_]], F[_], Frame, Canvas](frame: Frame)(implicit renderer: Renderer[Alg, F, Frame, Canvas]): Unit
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def image: Image
  11. val initial: A
    Definition Classes
    ReactorBaseReactor
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def onMouseClick(f: (Point, A) => A): Reactor[A]
  17. def onMouseClick(location: Point, state: A): A
    Definition Classes
    ReactorBaseReactor
  18. val onMouseClickHandler: (Point, A) => A
  19. def onMouseMove(f: (Point, A) => A): Reactor[A]
  20. def onMouseMove(location: Point, state: A): A
    Definition Classes
    ReactorBaseReactor
  21. val onMouseMoveHandler: (Point, A) => A
  22. def onTick(f: (A) => A): Reactor[A]
  23. def onTick(state: A): A
    Definition Classes
    ReactorBaseReactor
  24. val onTickHandler: (A) => A
  25. def productElementNames: Iterator[String]
    Definition Classes
    Product
  26. def render(f: (A) => Image): Reactor[A]
  27. def render(value: A): Image
    Definition Classes
    ReactorBaseReactor
  28. val renderHandler: (A) => Image
  29. def run[Alg[x[_]] <: Basic[x[_]], F[_], Frame, Canvas](frame: Frame)(implicit a: AnimationRenderer[Canvas], e: Renderer[Alg, F, Frame, Canvas], m: MouseClick[Canvas] with MouseMove[Canvas], s: Scheduler): Unit

    Runs this reactor, drawing on the given frame, until stop indicates it should stop.

    Runs this reactor, drawing on the given frame, until stop indicates it should stop.

    Definition Classes
    BaseReactor
  30. def step: Reactor[A]
  31. def stop(f: (A) => Boolean): Reactor[A]
  32. def stop(value: A): Boolean
    Definition Classes
    ReactorBaseReactor
  33. val stopHandler: (A) => Boolean
  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. def tick[F[_], Frame, Canvas](frame: Frame)(implicit e: Renderer[Basic, F, Frame, Canvas]): Option[A]

    Run one tick of this reactor, drawing on the given frame.

    Run one tick of this reactor, drawing on the given frame. Returns the next state, or None if the Reactor has stopped.

    Definition Classes
    BaseReactor
  36. def tickRate(duration: FiniteDuration): Reactor[A]
  37. val tickRate: FiniteDuration
    Definition Classes
    ReactorBaseReactor
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from BaseReactor[A]

Inherited from AnyRef

Inherited from Any

Ungrouped