SDF-2D - v0.7.6
    Preparing search index...

    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);
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    fpsHysteresis: number = 5
    scalingEnabled: boolean = true

    When false, FPS is still measured but the render scales are left alone.

    fpsTarget: number = 30

    Accessors

    • get FPS(): number

      Returns number

    Methods

    • Record the time taken by the latest frame. Autoscaling is also performed as part of this call.

      Parameters

      • deltaTimeInMilliseconds: number

      Returns void