PerceptionManager

PerceptionManager

A helper class which manages the refresh workflow for perception layers on the canvas. This controls the logic which batches multiple requested updates to minimize the amount of work required. A singleton instance is available as canvas#perception.

Constructor

new PerceptionManager()

See:

Members

DEFAULTS :object

The default values of update parameters. When a refresh occurs, the staged parameters are reset to these initial values.

Type:
  • object

params :object

The configured parameters for the next refresh.

Type:
  • object

Methods

_reset()

Reset the values of a pending refresh back to their default states.

cancel()

Cancel any pending perception refresh.

initialize()

A helper function to perform an immediate initialization plus incremental refresh.

refresh()

A helper function to perform an incremental refresh only.

schedule(options)

Schedule a perception update with requested parameters.

Parameters:
Name Type Description
options Object

update()

Perform an immediate perception update.