The Stat class is a performance statistics panel that provides real-time updates on various performance metrics.

Stat是一个性能统计面板,可以实时更新相关的性能参数。

构造函数

属性

_statUI: StatUI
_statUIClass: typeof StatUI
elements: StatElement[] = []

Defines display elements.

定义显示元素。

enableAnimatorUpdate: boolean = true

Enables or disables animation updates.

开启或关闭动画更新。

enableCameraCMD: boolean = true

Enables or disables CMD.

开启或关闭CMD。

enableLight: boolean = true

Enables or disables light sources.

开启或关闭光源效果。

enablemsaa: boolean = true

Enables or disables MSAA.

开启或关闭 MSAA。

enableMulLight: boolean = true

Enables or disables multiple light sources.

开启或关闭多光源效果。

enableOpaque: boolean = true

Enables or disables rendering of opaque objects.

开启或关闭不透明物体渲染。

enableParticle: boolean = true

Enables or disables particle rendering.

开启或关闭粒子渲染。

enablePhysicsUpdate: boolean = true

Enables or disables physics updates.

开启或关闭物理更新。

enablePostprocess: boolean = true

Enables or disables post-processing effects.

开启或关闭后期处理效果。

enableShadow: boolean = true

Enables or disables shadows.

开启或关闭阴影效果。

enableSkin: boolean = true

Enables or disables skin rendering.

开启或关闭skin渲染。

enableTransparent: boolean = true

Enables or disables transparent rendering.

开启或关闭透明渲染。

loopCount: number = 0

Count of rendering loops of the main stage Stage.

主舞台 Stage 的渲染次数计数。

render2DCount: number = 0

Count of rendering loops of the main stage Stage.

主舞台 Stage 的渲染次数计数。

访问器

方法

  • 返回 void

    Hides the performance statistics information from the screen.

    从屏幕上隐藏性能统计信息。

  • 参数

    • 可选x: number

      The X-coordinate position where the statistics should be displayed.

    • 可选y: number

      The Y-coordinate position where the statistics should be displayed.

    • 可选views: readonly StatElement[]

      An optional array of StatUIParams that defines which statistics to display.

    返回 void

    Displays performance statistics information on the screen. To be effective, it should be called at the very beginning of the application.

    在屏幕上显示性能统计信息。 为了有效,它应该在应用程序最开始时调用。