|
@@ -82,6 +82,21 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
private _renderScale = 1;
|
|
private _renderScale = 1;
|
|
private _rootElement: Nullable<HTMLElement>;
|
|
private _rootElement: Nullable<HTMLElement>;
|
|
private _cursorChanged = false;
|
|
private _cursorChanged = false;
|
|
|
|
+
|
|
|
|
+ /** @hidden */
|
|
|
|
+ public _numLayoutCalls = 0;
|
|
|
|
+ /** Gets the number of layout calls made the last time the ADT has been rendered */
|
|
|
|
+ public get numLayoutCalls(): number {
|
|
|
|
+ return this._numLayoutCalls;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /** @hidden */
|
|
|
|
+ public _numRenderCalls = 0;
|
|
|
|
+ /** Gets the number of render calls made the last time the ADT has been rendered */
|
|
|
|
+ public get numRenderCalls(): number {
|
|
|
|
+ return this._numRenderCalls;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Define type to string to ensure compatibility across browsers
|
|
* Define type to string to ensure compatibility across browsers
|
|
* Safari doesn't support DataTransfer constructor
|
|
* Safari doesn't support DataTransfer constructor
|
|
@@ -550,7 +565,7 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
// Layout
|
|
// Layout
|
|
this.onBeginLayoutObservable.notifyObservers(this);
|
|
this.onBeginLayoutObservable.notifyObservers(this);
|
|
var measure = new Measure(0, 0, renderWidth, renderHeight);
|
|
var measure = new Measure(0, 0, renderWidth, renderHeight);
|
|
- Control.NumLayoutCalls = 0;
|
|
|
|
|
|
+ this._numLayoutCalls = 0;
|
|
this._rootContainer._layout(measure, context);
|
|
this._rootContainer._layout(measure, context);
|
|
this.onEndLayoutObservable.notifyObservers(this);
|
|
this.onEndLayoutObservable.notifyObservers(this);
|
|
this._isDirty = false; // Restoring the dirty state that could have been set by controls during layout processing
|
|
this._isDirty = false; // Restoring the dirty state that could have been set by controls during layout processing
|
|
@@ -571,7 +586,7 @@ export class AdvancedDynamicTexture extends DynamicTexture {
|
|
|
|
|
|
// Render
|
|
// Render
|
|
this.onBeginRenderObservable.notifyObservers(this);
|
|
this.onBeginRenderObservable.notifyObservers(this);
|
|
- Control.NumRenderCalls = 0;
|
|
|
|
|
|
+ this._numRenderCalls = 0;
|
|
this._rootContainer._render(context, this._invalidatedRectangle);
|
|
this._rootContainer._render(context, this._invalidatedRectangle);
|
|
this.onEndRenderObservable.notifyObservers(this);
|
|
this.onEndRenderObservable.notifyObservers(this);
|
|
this._invalidatedRectangle = null;
|
|
this._invalidatedRectangle = null;
|