Core. Stat

Stat Is a performance statistics panel that updates relevant performance parameters in real time.

The performance parameters involved in the statistics are as follows (all parameters are updated every approximately 1 second): FPS (Canvas) /FPS (WebGL):Canvas or WebGL mode under the frame, or frames per second display, the higher the value, the more stable, more smooth feeling;
Sprite: count the number of all rendering nodes (including containers) that affect the efficiency of engine traversal, data organization, and rendering. The smaller the value, the higher the efficiency of the game;
DrawCall: this value is an important indicator of performance, and the smaller the value, the higher the efficiency of the game. Canvas mode image each about a second drawing number; WebGL mode per second said about the rendering of each batch, ready to process data and notify the GPU rendering called DrawCall 1 times, each time in the DrawCall in addition to time-consuming in the notice of the GPU render, switching the shader material and is also very time-consuming operation;
CurMem:Canvas mode, said memory size, the smaller the better, too high will cause the game to flash back; WebGL mode, said memory and memory value, the smaller the better;
Shader: the unique performance index of the WebGL model, which means the number of Shader submission every two seconds or so, the smaller the better;
*

Constructor

new Stat()

Member

(static) canvasBitmap :int

How many times does bitmap canvas render using canvas?.
Default Value:
  • 0

(static) canvasNormal :int

The number of standard renderings used by canvas canvas.
Default Value:
  • 0

(static) canvasReCache :int

The number of times the canvas canvas buffer is redrawn.
Default Value:
  • 0

(static) currentMemorySize :int

The cumulative amount of memory managed by a resource manager in bytes.

(static) drawCall :int

Description times.
Default Value:
  • 0

(static) FPS :int

The number of frames per second.
Default Value:
  • 0

(static) loopCount :int

Main stage Stage Render count.
Default Value:
  • 0

(static) onclick :function

(static) renderSlow :Boolean

Indicates whether the currently used is slow rendering mode.

(static) shaderCall :int

Shader request times.
Default Value:
  • 0

(static) spriteCount :int

Spirit Sprite Quantity.
Default Value:
  • 0

(static) treeNodeCollision :int

Octree node detection times.
Default Value:
  • 0

(static) treeSpriteCollision :int

Octree collision detection times.
Default Value:
  • 0

(static) trianglesFaces :int

Triangle face number.
Default Value:
  • 0

Methods

enable()

Activation performance statistics

hide()

Hide performance statistics.

show(xopt, yopt)

Display performance statistics.
Parameters:
Name Type Attributes Default Description
x Number <optional>
0 x X axis display position.
y Number <optional>
0 y Y axis display position.