Class SceneOptimizerOptions
Hierarchy
- SceneOptimizerOptions
Index
Constructors
Properties
Methods
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
Gets the list of optimizations to apply
target Frame RateSearch playground for targetFrameRate
Defines the target frame rate to reach (60 by default)
tracker DurationSearch playground for trackerDuration
Defines the interval between two checkes (2000ms by default)
Methods
add Custom OptimizationSearch playground for addCustomOptimization
-
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)
-
-
Parameters
-
scene: Scene
Returns boolean
-
-
-
-
onGetDescription: () => string
defines the callback called to get the description attached with the optimization.
-
-
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
-
add OptimizationSearch 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 High Degradation AllowedSearch 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 Low Degradation AllowedSearch 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 Moderate Degradation AllowedSearch 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
-
Defines a list of options used by SceneOptimizer
More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer