Class: ABM.Animator

Defined in: src/

Instance Method Summary

Constructor Details

# (void) constructor(rate = 30, multiStep = @model)

Create initial animator for the model, specifying default rate (fps) and multiStep. If multiStep, run the draw() and step() methods separately by draw() using requestAnimationFrame and step() using setTimeout.

Instance Method Details

# (void) setRate(rate, multiStep = @model)

Adjust animator. Call before model.start() in setup() to change default settings.

# (void) start()

Starts model.

# (void) stop()

Stops the model, used for debugging and resetting model.

# (void) resetTimes()

Internal util: reset time instance variables.

# (void) reset()

Reset used by model.reset when resetting model.

# (void) step()

Two handlers used by animation loop.

# (void) draw()

# (void) once()

Step and draw the model once, mainly used for debugging.

# (void) now()

Get current time, with high resolution timer if available.

# (void) ms()

Time in ms since starting animator.

# (void) ticksPerSec()

Get ticks/draws per second. They will differ if multiStep. The "if" is to avoid from ms=0.

# (void) drawsPerSec()

# (void) toString()

Return a status string for debugging and logging performance.

# (void) animateSteps() Bound

Animation via setTimeout and requestAnimationFrame.

# (void) animateDraws() Bound

# (void) animate()

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: