Skip to content

Commit

Permalink
fix tsdoc and add an entry point to set improvementMode for SceneOpti…
Browse files Browse the repository at this point in the history
…mizer (#12456)
  • Loading branch information
deltakosh committed Apr 28, 2022
1 parent 4b9718d commit c32fdcb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/dev/core/src/Misc/sceneOptimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ export class SceneOptimizerOptions {
* @param priority defines the priority of this optimization (0 by default which means first in the list)
* @returns the current SceneOptimizerOptions
*/
public addCustomOptimization(onApply: (scene: Scene) => boolean, onGetDescription: () => string, priority: number = 0): SceneOptimizerOptions {
public addCustomOptimization(onApply: (scene: Scene, optimizer: SceneOptimizer) => boolean, onGetDescription: () => string, priority: number = 0): SceneOptimizerOptions {
const optimization = new CustomOptimization(priority);
optimization.onApply = onApply;
optimization.onGetDescription = onGetDescription;
Expand Down Expand Up @@ -631,12 +631,16 @@ export class SceneOptimizer implements IDisposable {
public onFailureObservable = new Observable<SceneOptimizer>();

/**
* Gets a boolean indicating if the optimizer is in improvement mode
* Gets or sets a boolean indicating if the optimizer is in improvement mode
*/
public get isInImprovementMode(): boolean {
return this._improvementMode;
}

public set isInImprovementMode(value: boolean) {
this._improvementMode = value;
}

/**
* Gets the current priority level (0 at start)
*/
Expand Down

0 comments on commit c32fdcb

Please sign in to comment.