Class TextureOptimization
Hierarchy (View Summary)
- SceneOptimization
- TextureOptimization
Index
Constructors
constructor
-
new TextureOptimization(
priority?: number,
maximumSize?: number,
step?: number,
): TextureOptimizationCreates the TextureOptimization object
Parameters
- priority: number = 0
defines the priority of this optimization (0 by default which means first in the list)
- maximumSize: number = 1024
defines the maximum sized allowed for textures (1024 is the default value). If a texture is bigger, it will be scaled down using a factor defined by the step parameter
- step: number = 0.5
defines the factor (0.5 by default) used to scale down textures bigger than maximum sized allowed.
Returns TextureOptimization
- priority: number = 0
Properties
maximum Size
[1024] Defines the maximum sized allowed for textures (1024 is the default value). If a texture is bigger, it will be scaled down using a factor defined by the step parameter
priority
[0] Defines the priority of this optimization (0 by default which means first in the list)
step
[0.5] Defines the factor (0.5 by default) used to scale down textures bigger than maximum sized allowed.
Methods
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
- scene: Scene
get Description
-
Gets a string describing the action executed by the current optimization
Returns string
description string
Defines an optimization used to reduce the size of render target textures
See
https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer