Constructor
new Performance(Renderopt)
Creates a Performance object
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
Render | Render | <optional> | Render object to render performance stats to |
- Source
Members
(readonly) fps :number
The frames per second of the engine.
Type:
- number
- Source
(readonly) delta :number
The amount of time between frames in seconds.
Type:
- number
- Source
(readonly) frame :number
How many frames the engine has simulated. Note that this will increase faster than the number of rendered frames when Engine.substeps
is greater than 1.
Type:
- number
- Source
render :PerformanceRender
PerformanceRender object for rendering performance stats such as the fps. Only created if Render is specified in the constructor.
Type:
- Source
Methods
update()
Updates the performance stats. Should be called once per frame. Called automatically by a Ticker.
- Source