API

Class SceneOptimizerOptions

Defines a list of options used by SceneOptimizer

Index
optimizations: SceneOptimization[] = []

Gets the list of optimizations to apply

targetFrameRate: number = 60

[60] Defines the target frame rate to reach (60 by default)

trackerDuration: number = 2000

[2000] Defines the interval between two checks (2000ms by default)

  • Add a new custom optimization

    Parameters

    • onApply: (scene: Scene, optimizer: SceneOptimizer) => boolean

      defines the callback called to apply the custom optimization (true if everything that can be done was applied)

    • onGetDescription: () => string

      defines the callback called to get the description attached with the optimization.

    • priority: number = 0

      defines the priority of this optimization (0 by default which means first in the list)

    Returns SceneOptimizerOptions

    the current SceneOptimizerOptions