SceneOptimizerOptions

Defines a list of options used by SceneOptimizer

description

More details at http://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer

Hierarchy

  • SceneOptimizerOptions

Index

Constructors

constructor

  • Creates a new list of options used by SceneOptimizer

    Parameters

    • Optional targetFrameRate: number

      defines the target frame rate to reach (60 by default)

    • Optional trackerDuration: number

      defines the interval between two checkes (2000ms by default)

    Returns SceneOptimizerOptions

Properties

optimizations

optimizations: SceneOptimization[]

Gets the list of optimizations to apply

targetFrameRate

targetFrameRate: number

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

trackerDuration

trackerDuration: number

Defines the interval between two checkes (2000ms by default)

Methods

addCustomOptimization

  • addCustomOptimization(onApply: function, onGetDescription: function, priority?: number): SceneOptimizerOptions
  • Add a new custom optimization

    Parameters

    • onApply: function

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

        • (scene: Scene): boolean
        • Parameters

          Returns boolean

    • onGetDescription: function

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

        • (): string
        • Returns string

    • Optional priority: number

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

    Returns SceneOptimizerOptions

    the current SceneOptimizerOptions

addOptimization

  • Add a new optimization

    Parameters

    • optimization: SceneOptimization

      defines the SceneOptimization to add to the list of active optimizations

    Returns SceneOptimizerOptions

    the current SceneOptimizerOptions

Static HighDegradationAllowed

  • Creates a list of pre-defined optimizations aimed to have a big impact on the scene visual

    Parameters

    • Optional targetFrameRate: number

      defines the target frame rate (60 by default)

    Returns SceneOptimizerOptions

    a SceneOptimizerOptions object

Static LowDegradationAllowed

  • Creates a list of pre-defined optimizations aimed to reduce the visual impact on the scene

    Parameters

    • Optional targetFrameRate: number

      defines the target frame rate (60 by default)

    Returns SceneOptimizerOptions

    a SceneOptimizerOptions object

Static ModerateDegradationAllowed

  • Creates a list of pre-defined optimizations aimed to have a moderate impact on the scene visual

    Parameters

    • Optional targetFrameRate: number

      defines the target frame rate (60 by default)

    Returns SceneOptimizerOptions

    a SceneOptimizerOptions object

Generated using TypeDoc