Skip to content
Michael "Z" Goddard edited this page Feb 14, 2012 · 1 revision

aqua.base

Functions

aqua.extend(object, [objects ...])

Extend the first object argument by all following object arguments.

aqua.requestAnimFrame(function, element)

Wraps appropriate prefixed requestAnimationFrame.

aqua.task(options)

Parameters:

options is an object with the following attributes.

  • callback <Function> (required) function to be called.
  • priority <Number or String> Defaults to 0. If String, TaskList will use it's defined properties to provide a value.
  • before <Boolean> Defaults to false. If true, place task at front of same prioritized tasks.
  • once <Boolean> Defaults to false. If true, task is automatically removed from parent TaskList after taskList has completed execution.
Returns:

Task

aqua.taskList(options)

Parameters:

options is an object with the following attributes.

  • priorities <Object> Map of named priorities to Number values.

     {
       EARLY: -5,
       UPDATE: 5,
       LATE_UPDATE: 5
    }
    
Returns:

TaskList

Types

Task

TaskList

TaskList.add(task)

Add a task to the list.

TaskList.remove(task)

Remove a task from the list.

TaskList.callAll()

Call all tasks in the list.

Clone this wiki locally