Skip to content

Action and ActionQueue

Christian Silver edited this page May 9, 2016 · 1 revision

At its heart, Debut is a method of scheduling actions.

  • Actions are "run" and that involves executing arbitrary code (functions) - they are not strictly animations
  • Actions are run by proxy, through an ActionQueue
  • Actions have a concept of direction - they can run forwards or backwards
  • Actions run linearly - ie they can run under the assumption that all the events prior to it in the queue have also run
  • Actions are assumed to run synchronously, and instantly. Events can opt-in to an asynchronous approach (e.g. for animations)
  • Actions can emit events that other actions, or other pieces of code, can listen to
    • For example, they can emit a progress event that other actions can depend on to dictate their progress
  • A contract between the Action and the ActionScheduler indicates some parameters that the Action is expected to adhere to
    • The direction of the action
    • Whether the Action should be run instantly (for fast-tracking)
declare class Action {

}

declare class ActionScheduler {

}
Clone this wiki locally