Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FpsQualityAutoscaler

Set the quality of rendering based on FPS values.

When using this the size of the canvas must be fixed with CSS.

The addDeltaTime method should be called once every frame.

Usage:

 const renderer = await compile(...);
 const autoscaler = new FpsQualityAutoscaler(renderer);

Hierarchy

  • FpsQualityAutoscaler

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

fpsHysteresis

fpsHysteresis: number = 5

Static fpsTarget

fpsTarget: number = 30

Accessors

FPS

  • get FPS(): number

Methods

addDeltaTime

  • addDeltaTime(deltaTimeInMilliseconds: DOMHighResTimeStamp): void