Class lime.scheduleManager
Defined in: schedulemanager.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Unified timer provider class
Don't create instances of this class.
|
| Field Attributes | Field Name and Description |
|---|---|
| <static> |
lime.scheduleManager.USE_ANIMATION_FRAME
Whether to use requestAnimationFrame instead of timer events
Exposed here so it could be disabled if needed.
|
| Method Attributes | Method Name and Description |
|---|---|
| <private> <static> |
lime.scheduleManager.activate_()
Start the internal timer functions
|
| <private> <static> |
lime.scheduleManager.animationFrameHandler_(time)
Webkit implemtation of requestAnimationFrame handler.
|
| <private> <static> |
lime.scheduleManager.beforePaintHandler_(event)
Mozilla implemtation of requestAnimationFrame handler.
|
| <static> |
lime.scheduleManager.callAfter(f, context, delay)
Set up function to be called once after a delay
|
| <static> |
lime.scheduleManager.changeDirectorActivity(director, value)
Change director's activity.
|
| <private> <static> |
lime.scheduleManager.disable_()
Stop interval timer functions
|
| <private> <static> |
lime.scheduleManager.dispatch_(delta)
Call all scheduled tasks
|
| <static> |
lime.scheduleManager.getDisplayRate()
Returns maximum fire rate in ms.
|
| <static> |
lime.scheduleManager.schedule(f, context, opt_task)
Schedule a function.
|
| <static> |
lime.scheduleManager.scheduleWithDelay(f, context, delay, opt_limit)
Set up function to be called repeatedly after a delay
|
| <static> |
lime.scheduleManager.setDisplayRate(value)
Sets maximum fire rate for the scheduler in ms.
|
| <private> <static> |
lime.scheduleManager.stepTimer_()
Timer events step function that delegates to other objects waiting
|
| <static> |
lime.scheduleManager.unschedule(f, context)
Unschedule a function.
|
Class Detail
lime.scheduleManager()
Unified timer provider class
Don't create instances of this class. Used the shared instance.
Field Detail
<static>
lime.scheduleManager.USE_ANIMATION_FRAME
Whether to use requestAnimationFrame instead of timer events
Exposed here so it could be disabled if needed.
Method Detail
<private> <static>
lime.scheduleManager.activate_()
Start the internal timer functions
<private> <static>
lime.scheduleManager.animationFrameHandler_(time)
Webkit implemtation of requestAnimationFrame handler.
- Parameters:
- time
<private> <static>
lime.scheduleManager.beforePaintHandler_(event)
Mozilla implemtation of requestAnimationFrame handler.
- Parameters:
- event
<static>
lime.scheduleManager.callAfter(f, context, delay)
Set up function to be called once after a delay
- Parameters:
- {function(number)} f
- Function to be called.
- {Object} context
- Context used when calling object.
- {number} delay
- Delay before calling.
<static>
lime.scheduleManager.changeDirectorActivity(director, value)
Change director's activity. Used for pausing updates when director is paused
- Parameters:
- {lime.Director} director
- Director.
- {boolean} value
- Active or inactive?
<private> <static>
lime.scheduleManager.disable_()
Stop interval timer functions
<private> <static>
lime.scheduleManager.dispatch_(delta)
Call all scheduled tasks
- Parameters:
- {number} delta
- Milliseconds since last run.
<static>
{number}
lime.scheduleManager.getDisplayRate()
Returns maximum fire rate in ms. If you need FPS then use 1000/x
- Returns:
- {number} Display rate.
<static>
lime.scheduleManager.schedule(f, context, opt_task)
Schedule a function. Passed function will be called on every frame
with delta time from last run time
- Parameters:
- {function(number)} f
- Function to be called.
- {Object} context
- The context used when calling function.
- {lime.scheduleManager.Task} opt_task
- Task object.
<static>
lime.scheduleManager.scheduleWithDelay(f, context, delay, opt_limit)
Set up function to be called repeatedly after a delay
- Parameters:
- {function(number)} f
- Function to be called.
- {Object} context
- Context used when calling object.
- {number} delay
- Delay before calling.
- {number} opt_limit
- Number of times to call.
<static>
lime.scheduleManager.setDisplayRate(value)
Sets maximum fire rate for the scheduler in ms.
If you have FPS then send 1000/x
Note that if animation frame methods are used browser chooses
max display rate and this value has no effect.
- Parameters:
- {number} value
- New display rate.
<private> <static>
lime.scheduleManager.stepTimer_()
Timer events step function that delegates to other objects waiting
<static>
lime.scheduleManager.unschedule(f, context)
Unschedule a function. For functions that have be previously scheduled
- Parameters:
- {function(number)} f
- Function to be unscheduled.
- {Object} context
- Context used when scheduling.