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], runtime: IORuntime): Unit
  7. def draw[Alg[x[_]] <: Basic[x[_]], F[_], Frame, Canvas](frame: Frame)(implicit renderer: Renderer[Alg, F, Frame, Canvas], runtime: IORuntime): 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(location: Point, state: A): A
    Definition Classes
    ReactorBaseReactor
  17. val onMouseClickHandler: (Point, A) => A
  18. def onMouseMove(location: Point, state: A): A
    Definition Classes
    ReactorBaseReactor
  19. val onMouseMoveHandler: (Point, A) => A
  20. def onTick(state: A): A
    Definition Classes
    ReactorBaseReactor
  21. val onTickHandler: (A) => A
  22. def productElementNames: Iterator[String]
    Definition Classes
    Product
  23. def render(value: A): Image
    Definition Classes
    ReactorBaseReactor
  24. val renderHandler: (A) => Image
  25. 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], runtime: IORuntime): 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
  26. def step: Reactor[A]
  27. def stop(value: A): Boolean
    Definition Classes
    ReactorBaseReactor
  28. val stopHandler: (A) => Boolean
  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def tick[F[_], Frame, Canvas](frame: Frame)(implicit e: Renderer[Basic, F, Frame, Canvas], runtime: IORuntime): 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
  31. val tickRate: FiniteDuration
    Definition Classes
    ReactorBaseReactor
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. def withOnMouseClick(f: (Point, A) => A): Reactor[A]
  36. def withOnMouseMove(f: (Point, A) => A): Reactor[A]
  37. def withOnTick(f: (A) => A): Reactor[A]
  38. def withRender(f: (A) => Image): Reactor[A]
  39. def withStop(f: (A) => Boolean): Reactor[A]
  40. def withTickRate(duration: FiniteDuration): Reactor[A]

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