Class

io.scalajs.dom.html.pixijs

Ticker

Related Doc: package pixijs

Permalink

class Ticker extends Object

A Ticker class that runs an update loop that other objects listen to. This class is composed around an EventEmitter object to add listeners meant for execution on the next requested animation frame. Animation frames are requested only when necessary, e.g. When the ticker is started and the emitter has listeners.

Annotations
@RawJSType() @native() @JSName( "PIXI.Tickers.Ticker" )
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Ticker
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Ticker()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def FPS: Double

    Permalink

    The frames per second at which this ticker is running.

    The frames per second at which this ticker is running. The default is approximately 60 in most modern browsers. Note: This does not factor in the value of PIXI.ticker.Ticker#speed, which is specific to scaling PIXI.ticker.Ticker#deltaTime.

  5. def add(fn: Function, context: Function = js.native): Ticker.this.type

    Permalink

    Calls module:eventemitter3.EventEmitter#on internally for the internal 'tick' event.

    Calls module:eventemitter3.EventEmitter#on internally for the internal 'tick' event. It checks if the emitter has listeners, and if so it requests a new animation frame at this point.

    fn

    The listener function to be added for updates

    context

    The listener context

    returns

    this

  6. def addOnce(fn: Function, context: Function = js.native): Ticker.this.type

    Permalink

    Calls module:eventemitter3.EventEmitter#once internally for the internal 'tick' event.

    Calls module:eventemitter3.EventEmitter#once internally for the internal 'tick' event. It checks if the emitter has listeners, and if so it requests a new animation frame at this point.

    fn

    The listener function to be added for one update

    context

    The listener context

    returns

    this

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. var autoStart: Boolean

    Permalink

    Whether or not this ticker should invoke the method PIXI.ticker.Ticker#start automatically when a listener is added.

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. var deltaTime: Int

    Permalink

    Scalar time value from last frame to this frame.

    Scalar time value from last frame to this frame. This value is capped by setting PIXI.ticker.Ticker#minFPS and is scaled with PIXI.ticker.Ticker#speed. Note: The cap may be exceeded by scaling.

  11. var elapsedMS: Double

    Permalink

    Time elapsed in milliseconds from last frame to this frame.

    Time elapsed in milliseconds from last frame to this frame. Opposed to what the scalar PIXI.ticker.Ticker#deltaTime is based, this value is neither capped nor scaled. If the platform supports DOMHighResTimeStamp, this value will have a precision of 1 µs.

  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  20. var lastTime: Double

    Permalink

    The last time PIXI.ticker.Ticker#update was invoked.

    The last time PIXI.ticker.Ticker#update was invoked. This value is also reset internally outside of invoking update, but only when a new animation frame is requested. If the platform supports DOMHighResTimeStamp, this value will have a precision of 1 µs.

  21. var minFPS: Double

    Permalink

    Manages the maximum amount of milliseconds allowed to elapse between invoking PIXI.ticker.Ticker#update.

    Manages the maximum amount of milliseconds allowed to elapse between invoking PIXI.ticker.Ticker#update. This value is used to cap PIXI.ticker.Ticker#deltaTime, but does not effect the measured value of PIXI.ticker.Ticker#FPS. When setting this property it is clamped to a value between 0 and PIXI.TARGET_FPMS * 1000.

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  26. def remove(fn: Function, context: Function = js.native): Ticker.this.type

    Permalink

    Calls module:eventemitter3.EventEmitter#off internally for 'tick' event.

    Calls module:eventemitter3.EventEmitter#off internally for 'tick' event. It checks if the emitter has listeners for 'tick' event. If it does, then it cancels the animation frame.

    fn

    The listener function to be added for one update

    context

    The listener context

    returns

    this

  27. var speed: Int

    Permalink

    Factor of current PIXI.ticker.Ticker#deltaTime.

  28. def start(): Unit

    Permalink

    Starts the ticker.

    Starts the ticker. If the ticker has listeners a new animation frame is requested at this point.

  29. var started: Boolean

    Permalink

    Whether or not this ticker has been started.

    Whether or not this ticker has been started. true if PIXI.ticker.Ticker#start has been called. false if PIXI.ticker.Ticker#stop has been called. While false, this value may change to true in the event of PIXI.ticker.Ticker#autoStart being true and a listener is added.

  30. def stop(): Unit

    Permalink

    Stops the ticker.

    Stops the ticker. If the ticker has requested an animation frame it is canceled at this point.

  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. def update(currentTime: |[Int, DOMHighResTimeStamp] = js.native): Unit

    Permalink

    Triggers an update.

    Triggers an update. An update entails setting the current PIXI.ticker.Ticker#elapsedMS, the current PIXI.ticker.Ticker#deltaTime, invoking all listeners with current deltaTime, and then finally setting PIXI.ticker.Ticker#lastTime with the value of currentTime that was provided. This method will be called automatically by animation frame callbacks if the ticker instance has been started and listeners are added.

    currentTime

    the current time of execution (Type: Number/DOMHighResTimeStamp, Default: performance.now())

  35. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped