Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SceneOptimizerOptions

Defines a list of options used by SceneOptimizer

description

More details at https://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

optimizationsSearch playground for optimizations

optimizations: SceneOptimization[]

Gets the list of optimizations to apply

targetFrameRateSearch playground for targetFrameRate

targetFrameRate: number

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

trackerDurationSearch playground for trackerDuration

trackerDuration: number

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

Methods

addCustomOptimizationSearch playground for addCustomOptimization

  • addCustomOptimization(onApply: (scene: Scene) => boolean, onGetDescription: () => string, priority?: number): SceneOptimizerOptions
  • Add a new custom optimization

    Parameters

    • onApply: (scene: Scene) => boolean

      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: () => string

      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

addOptimizationSearch playground for 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 HighDegradationAllowedSearch playground for 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 LowDegradationAllowedSearch playground for 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 ModerateDegradationAllowedSearch playground for 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

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Static method