PerformanceDisplay

PerformanceDisplay

new

Draws a display in the top left corner of the scene displaying FPS (frames per second), averaged over 1 second intervals, as well as unaveraged frame time.

Parameters:
Name Type Argument Description
description.fpsColor Color <optional>
The color of the FPS graph.
description.frameTimeColor Color <optional>
The color of the frame time graph.
description.backgroundColor Color <optional>
The color of the background of the display.
description.font String <optional>
The CSS font of the text in the display.
description.rectangle BoundingRectangle <optional>
The position and size of the display, relative to the top left corner.
Example
scene.getPrimitives().add(new PerformanceDisplay());
Source:

Methods

<static>

Destroys the WebGL resources held by this object.

<static>

Update the display. This function should only be called once per frame, because each call records a frame in the internal buffer and redraws the display.