Class CustomOptimization
Hierarchy
- SceneOptimization
- CustomOptimization
Index
Constructors
constructor
Creates the SceneOptimization object
Parameters
Optional priority: number
defines the priority of this optimization (0 by default which means first in the list)
Returns CustomOptimization
Properties
on ApplySearch playground for onApply
Type declaration
Callback called to apply the custom optimization.
Parameters
scene: Scene
optimizer: SceneOptimizer
Returns boolean
on Get DescriptionSearch playground for onGetDescription
Type declaration
Callback called to get custom description
Returns string
prioritySearch playground for priority
Defines the priority of this optimization (0 by default which means first in the list)
Methods
applySearch playground for apply
This function will be called by the SceneOptimizer when its priority is reached in order to apply the change required by the current optimization
Parameters
scene: Scene
defines the current scene where to apply this optimization
optimizer: SceneOptimizer
defines the current optimizer
Returns boolean
true if everything that can be done was applied
get DescriptionSearch playground for getDescription
Gets a string describing the action executed by the current optimization
Returns string
description string
Defines an optimization based on user defined callback.
More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer