|
@@ -30219,20 +30219,19 @@ declare module "babylonjs/Misc/customAnimationFrameRequester" {
|
|
|
requestID?: number;
|
|
|
}
|
|
|
}
|
|
|
-declare module "babylonjs/Misc/IPerformanceMonitor" {
|
|
|
+declare module "babylonjs/Misc/performanceMonitor" {
|
|
|
/**
|
|
|
- * Interface for performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
|
|
|
+ * Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
|
|
|
*/
|
|
|
- export interface IPerformanceMonitor {
|
|
|
- /**
|
|
|
- * Enables contributions to the sliding window sample set
|
|
|
- */
|
|
|
- enable(): void;
|
|
|
+ export class PerformanceMonitor {
|
|
|
+ private _enabled;
|
|
|
+ private _rollingFrameTime;
|
|
|
+ private _lastFrameTimeMs;
|
|
|
/**
|
|
|
- * Disables contributions to the sliding window sample set
|
|
|
- * Samples will not be interpolated over the disabled period
|
|
|
+ * constructor
|
|
|
+ * @param frameSampleSize The number of samples required to saturate the sliding window
|
|
|
*/
|
|
|
- disable(): void;
|
|
|
+ constructor(frameSampleSize?: number);
|
|
|
/**
|
|
|
* Samples current frame
|
|
|
* @param timeMs A timestamp in milliseconds of the current frame to compare with other frames
|
|
@@ -30241,23 +30240,94 @@ declare module "babylonjs/Misc/IPerformanceMonitor" {
|
|
|
/**
|
|
|
* Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
|
*/
|
|
|
- averageFrameTime: number;
|
|
|
+ readonly averageFrameTime: number;
|
|
|
/**
|
|
|
* Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
|
*/
|
|
|
- averageFrameTimeVariance: number;
|
|
|
+ readonly averageFrameTimeVariance: number;
|
|
|
/**
|
|
|
* Returns the frame time of the most recent frame
|
|
|
*/
|
|
|
- instantaneousFrameTime: number;
|
|
|
+ readonly instantaneousFrameTime: number;
|
|
|
/**
|
|
|
* Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)
|
|
|
*/
|
|
|
- averageFPS: number;
|
|
|
+ readonly averageFPS: number;
|
|
|
/**
|
|
|
* Returns the average framerate in frames per second using the most recent frame time
|
|
|
*/
|
|
|
- instantaneousFPS: number;
|
|
|
+ readonly instantaneousFPS: number;
|
|
|
+ /**
|
|
|
+ * Returns true if enough samples have been taken to completely fill the sliding window
|
|
|
+ */
|
|
|
+ readonly isSaturated: boolean;
|
|
|
+ /**
|
|
|
+ * Enables contributions to the sliding window sample set
|
|
|
+ */
|
|
|
+ enable(): void;
|
|
|
+ /**
|
|
|
+ * Disables contributions to the sliding window sample set
|
|
|
+ * Samples will not be interpolated over the disabled period
|
|
|
+ */
|
|
|
+ disable(): void;
|
|
|
+ /**
|
|
|
+ * Returns true if sampling is enabled
|
|
|
+ */
|
|
|
+ readonly isEnabled: boolean;
|
|
|
+ /**
|
|
|
+ * Resets performance monitor
|
|
|
+ */
|
|
|
+ reset(): void;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * RollingAverage
|
|
|
+ *
|
|
|
+ * Utility to efficiently compute the rolling average and variance over a sliding window of samples
|
|
|
+ */
|
|
|
+ export class RollingAverage {
|
|
|
+ /**
|
|
|
+ * Current average
|
|
|
+ */
|
|
|
+ average: number;
|
|
|
+ /**
|
|
|
+ * Current variance
|
|
|
+ */
|
|
|
+ variance: number;
|
|
|
+ protected _samples: Array<number>;
|
|
|
+ protected _sampleCount: number;
|
|
|
+ protected _pos: number;
|
|
|
+ protected _m2: number;
|
|
|
+ /**
|
|
|
+ * constructor
|
|
|
+ * @param length The number of samples required to saturate the sliding window
|
|
|
+ */
|
|
|
+ constructor(length: number);
|
|
|
+ /**
|
|
|
+ * Adds a sample to the sample set
|
|
|
+ * @param v The sample value
|
|
|
+ */
|
|
|
+ add(v: number): void;
|
|
|
+ /**
|
|
|
+ * Returns previously added values or null if outside of history or outside the sliding window domain
|
|
|
+ * @param i Index in history. For example, pass 0 for the most recent value and 1 for the value before that
|
|
|
+ * @return Value previously recorded with add() or null if outside of range
|
|
|
+ */
|
|
|
+ history(i: number): number;
|
|
|
+ /**
|
|
|
+ * Returns true if enough samples have been taken to completely fill the sliding window
|
|
|
+ * @return true if sample-set saturated
|
|
|
+ */
|
|
|
+ isSaturated(): boolean;
|
|
|
+ /**
|
|
|
+ * Resets the rolling average (equivalent to 0 samples taken so far)
|
|
|
+ */
|
|
|
+ reset(): void;
|
|
|
+ /**
|
|
|
+ * Wraps a value around the sample range boundaries
|
|
|
+ * @param i Position in sample range, for example if the sample length is 5, and i is -3, then 2 will be returned.
|
|
|
+ * @return Wrapped position in sample range
|
|
|
+ */
|
|
|
+ protected _wrapPosition(i: number): number;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Materials/Textures/videoTexture" {
|
|
@@ -30414,7 +30484,7 @@ declare module "babylonjs/Engines/engine" {
|
|
|
import { IFileRequest } from "babylonjs/Misc/fileRequest";
|
|
|
import { ICustomAnimationFrameRequester } from "babylonjs/Misc/customAnimationFrameRequester";
|
|
|
import { IViewportLike, IColor4Like } from "babylonjs/Maths/math.like";
|
|
|
- import { IPerformanceMonitor } from "babylonjs/Misc/IPerformanceMonitor";
|
|
|
+ import { PerformanceMonitor } from "babylonjs/Misc/performanceMonitor";
|
|
|
import { Material } from "babylonjs/Materials/material";
|
|
|
import { PostProcess } from "babylonjs/PostProcesses/postProcess";
|
|
|
import { RenderTargetTexture } from "babylonjs/Materials/Textures/renderTargetTexture";
|
|
@@ -30640,11 +30710,194 @@ declare module "babylonjs/Engines/engine" {
|
|
|
* @param predicate defines a predicate used to filter which materials should be affected
|
|
|
*/
|
|
|
static MarkAllMaterialsAsDirty(flag: number, predicate?: (mat: Material) => boolean): void;
|
|
|
+ /** Defines that alpha blending is disabled */
|
|
|
+ static readonly ALPHA_DISABLE: number;
|
|
|
+ /** Defines that alpha blending to SRC ALPHA * SRC + DEST */
|
|
|
+ static readonly ALPHA_ADD: number;
|
|
|
+ /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */
|
|
|
+ static readonly ALPHA_COMBINE: number;
|
|
|
+ /** Defines that alpha blending to DEST - SRC * DEST */
|
|
|
+ static readonly ALPHA_SUBTRACT: number;
|
|
|
+ /** Defines that alpha blending to SRC * DEST */
|
|
|
+ static readonly ALPHA_MULTIPLY: number;
|
|
|
+ /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */
|
|
|
+ static readonly ALPHA_MAXIMIZED: number;
|
|
|
+ /** Defines that alpha blending to SRC + DEST */
|
|
|
+ static readonly ALPHA_ONEONE: number;
|
|
|
+ /** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */
|
|
|
+ static readonly ALPHA_PREMULTIPLIED: number;
|
|
|
/**
|
|
|
- * Factory used to create the performance monitor
|
|
|
- * @returns a new PerformanceMonitor
|
|
|
+ * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST
|
|
|
+ * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
|
|
|
*/
|
|
|
- static DefaultPerformanceMonitorFactory(): IPerformanceMonitor;
|
|
|
+ static readonly ALPHA_PREMULTIPLIED_PORTERDUFF: number;
|
|
|
+ /** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */
|
|
|
+ static readonly ALPHA_INTERPOLATE: number;
|
|
|
+ /**
|
|
|
+ * Defines that alpha blending to SRC + (1 - SRC) * DEST
|
|
|
+ * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
|
|
|
+ */
|
|
|
+ static readonly ALPHA_SCREENMODE: number;
|
|
|
+ /** Defines that the ressource is not delayed*/
|
|
|
+ static readonly DELAYLOADSTATE_NONE: number;
|
|
|
+ /** Defines that the ressource was successfully delay loaded */
|
|
|
+ static readonly DELAYLOADSTATE_LOADED: number;
|
|
|
+ /** Defines that the ressource is currently delay loading */
|
|
|
+ static readonly DELAYLOADSTATE_LOADING: number;
|
|
|
+ /** Defines that the ressource is delayed and has not started loading */
|
|
|
+ static readonly DELAYLOADSTATE_NOTLOADED: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */
|
|
|
+ static readonly NEVER: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */
|
|
|
+ static readonly ALWAYS: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */
|
|
|
+ static readonly LESS: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */
|
|
|
+ static readonly EQUAL: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */
|
|
|
+ static readonly LEQUAL: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */
|
|
|
+ static readonly GREATER: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */
|
|
|
+ static readonly GEQUAL: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */
|
|
|
+ static readonly NOTEQUAL: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be kept */
|
|
|
+ static readonly KEEP: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be replaced */
|
|
|
+ static readonly REPLACE: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be incremented */
|
|
|
+ static readonly INCR: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be decremented */
|
|
|
+ static readonly DECR: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be inverted */
|
|
|
+ static readonly INVERT: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */
|
|
|
+ static readonly INCR_WRAP: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */
|
|
|
+ static readonly DECR_WRAP: number;
|
|
|
+ /** Texture is not repeating outside of 0..1 UVs */
|
|
|
+ static readonly TEXTURE_CLAMP_ADDRESSMODE: number;
|
|
|
+ /** Texture is repeating outside of 0..1 UVs */
|
|
|
+ static readonly TEXTURE_WRAP_ADDRESSMODE: number;
|
|
|
+ /** Texture is repeating and mirrored */
|
|
|
+ static readonly TEXTURE_MIRROR_ADDRESSMODE: number;
|
|
|
+ /** ALPHA */
|
|
|
+ static readonly TEXTUREFORMAT_ALPHA: number;
|
|
|
+ /** LUMINANCE */
|
|
|
+ static readonly TEXTUREFORMAT_LUMINANCE: number;
|
|
|
+ /** LUMINANCE_ALPHA */
|
|
|
+ static readonly TEXTUREFORMAT_LUMINANCE_ALPHA: number;
|
|
|
+ /** RGB */
|
|
|
+ static readonly TEXTUREFORMAT_RGB: number;
|
|
|
+ /** RGBA */
|
|
|
+ static readonly TEXTUREFORMAT_RGBA: number;
|
|
|
+ /** RED */
|
|
|
+ static readonly TEXTUREFORMAT_RED: number;
|
|
|
+ /** RED (2nd reference) */
|
|
|
+ static readonly TEXTUREFORMAT_R: number;
|
|
|
+ /** RG */
|
|
|
+ static readonly TEXTUREFORMAT_RG: number;
|
|
|
+ /** RED_INTEGER */
|
|
|
+ static readonly TEXTUREFORMAT_RED_INTEGER: number;
|
|
|
+ /** RED_INTEGER (2nd reference) */
|
|
|
+ static readonly TEXTUREFORMAT_R_INTEGER: number;
|
|
|
+ /** RG_INTEGER */
|
|
|
+ static readonly TEXTUREFORMAT_RG_INTEGER: number;
|
|
|
+ /** RGB_INTEGER */
|
|
|
+ static readonly TEXTUREFORMAT_RGB_INTEGER: number;
|
|
|
+ /** RGBA_INTEGER */
|
|
|
+ static readonly TEXTUREFORMAT_RGBA_INTEGER: number;
|
|
|
+ /** UNSIGNED_BYTE */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_BYTE: number;
|
|
|
+ /** UNSIGNED_BYTE (2nd reference) */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT: number;
|
|
|
+ /** FLOAT */
|
|
|
+ static readonly TEXTURETYPE_FLOAT: number;
|
|
|
+ /** HALF_FLOAT */
|
|
|
+ static readonly TEXTURETYPE_HALF_FLOAT: number;
|
|
|
+ /** BYTE */
|
|
|
+ static readonly TEXTURETYPE_BYTE: number;
|
|
|
+ /** SHORT */
|
|
|
+ static readonly TEXTURETYPE_SHORT: number;
|
|
|
+ /** UNSIGNED_SHORT */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_SHORT: number;
|
|
|
+ /** INT */
|
|
|
+ static readonly TEXTURETYPE_INT: number;
|
|
|
+ /** UNSIGNED_INT */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INTEGER: number;
|
|
|
+ /** UNSIGNED_SHORT_4_4_4_4 */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4: number;
|
|
|
+ /** UNSIGNED_SHORT_5_5_5_1 */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1: number;
|
|
|
+ /** UNSIGNED_SHORT_5_6_5 */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_SHORT_5_6_5: number;
|
|
|
+ /** UNSIGNED_INT_2_10_10_10_REV */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV: number;
|
|
|
+ /** UNSIGNED_INT_24_8 */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT_24_8: number;
|
|
|
+ /** UNSIGNED_INT_10F_11F_11F_REV */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV: number;
|
|
|
+ /** UNSIGNED_INT_5_9_9_9_REV */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV: number;
|
|
|
+ /** FLOAT_32_UNSIGNED_INT_24_8_REV */
|
|
|
+ static readonly TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV: number;
|
|
|
+ /** nearest is mag = nearest and min = nearest and mip = linear */
|
|
|
+ static readonly TEXTURE_NEAREST_SAMPLINGMODE: number;
|
|
|
+ /** Bilinear is mag = linear and min = linear and mip = nearest */
|
|
|
+ static readonly TEXTURE_BILINEAR_SAMPLINGMODE: number;
|
|
|
+ /** Trilinear is mag = linear and min = linear and mip = linear */
|
|
|
+ static readonly TEXTURE_TRILINEAR_SAMPLINGMODE: number;
|
|
|
+ /** nearest is mag = nearest and min = nearest and mip = linear */
|
|
|
+ static readonly TEXTURE_NEAREST_NEAREST_MIPLINEAR: number;
|
|
|
+ /** Bilinear is mag = linear and min = linear and mip = nearest */
|
|
|
+ static readonly TEXTURE_LINEAR_LINEAR_MIPNEAREST: number;
|
|
|
+ /** Trilinear is mag = linear and min = linear and mip = linear */
|
|
|
+ static readonly TEXTURE_LINEAR_LINEAR_MIPLINEAR: number;
|
|
|
+ /** mag = nearest and min = nearest and mip = nearest */
|
|
|
+ static readonly TEXTURE_NEAREST_NEAREST_MIPNEAREST: number;
|
|
|
+ /** mag = nearest and min = linear and mip = nearest */
|
|
|
+ static readonly TEXTURE_NEAREST_LINEAR_MIPNEAREST: number;
|
|
|
+ /** mag = nearest and min = linear and mip = linear */
|
|
|
+ static readonly TEXTURE_NEAREST_LINEAR_MIPLINEAR: number;
|
|
|
+ /** mag = nearest and min = linear and mip = none */
|
|
|
+ static readonly TEXTURE_NEAREST_LINEAR: number;
|
|
|
+ /** mag = nearest and min = nearest and mip = none */
|
|
|
+ static readonly TEXTURE_NEAREST_NEAREST: number;
|
|
|
+ /** mag = linear and min = nearest and mip = nearest */
|
|
|
+ static readonly TEXTURE_LINEAR_NEAREST_MIPNEAREST: number;
|
|
|
+ /** mag = linear and min = nearest and mip = linear */
|
|
|
+ static readonly TEXTURE_LINEAR_NEAREST_MIPLINEAR: number;
|
|
|
+ /** mag = linear and min = linear and mip = none */
|
|
|
+ static readonly TEXTURE_LINEAR_LINEAR: number;
|
|
|
+ /** mag = linear and min = nearest and mip = none */
|
|
|
+ static readonly TEXTURE_LINEAR_NEAREST: number;
|
|
|
+ /** Explicit coordinates mode */
|
|
|
+ static readonly TEXTURE_EXPLICIT_MODE: number;
|
|
|
+ /** Spherical coordinates mode */
|
|
|
+ static readonly TEXTURE_SPHERICAL_MODE: number;
|
|
|
+ /** Planar coordinates mode */
|
|
|
+ static readonly TEXTURE_PLANAR_MODE: number;
|
|
|
+ /** Cubic coordinates mode */
|
|
|
+ static readonly TEXTURE_CUBIC_MODE: number;
|
|
|
+ /** Projection coordinates mode */
|
|
|
+ static readonly TEXTURE_PROJECTION_MODE: number;
|
|
|
+ /** Skybox coordinates mode */
|
|
|
+ static readonly TEXTURE_SKYBOX_MODE: number;
|
|
|
+ /** Inverse Cubic coordinates mode */
|
|
|
+ static readonly TEXTURE_INVCUBIC_MODE: number;
|
|
|
+ /** Equirectangular coordinates mode */
|
|
|
+ static readonly TEXTURE_EQUIRECTANGULAR_MODE: number;
|
|
|
+ /** Equirectangular Fixed coordinates mode */
|
|
|
+ static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MODE: number;
|
|
|
+ /** Equirectangular Fixed Mirrored coordinates mode */
|
|
|
+ static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE: number;
|
|
|
+ /** Defines that texture rescaling will use a floor to find the closer power of 2 size */
|
|
|
+ static readonly SCALEMODE_FLOOR: number;
|
|
|
+ /** Defines that texture rescaling will look for the nearest power of 2 size */
|
|
|
+ static readonly SCALEMODE_NEAREST: number;
|
|
|
+ /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */
|
|
|
+ static readonly SCALEMODE_CEILING: number;
|
|
|
/** @hidden */
|
|
|
static _TextureLoaders: IInternalTextureLoader[];
|
|
|
/**
|
|
@@ -30863,7 +31116,7 @@ declare module "babylonjs/Engines/engine" {
|
|
|
* Gets the performance monitor attached to this engine
|
|
|
* @see http://doc.babylonjs.com/how_to/optimizing_your_scene#engineinstrumentation
|
|
|
*/
|
|
|
- readonly performanceMonitor: IPerformanceMonitor;
|
|
|
+ readonly performanceMonitor: PerformanceMonitor;
|
|
|
/**
|
|
|
* Gets or sets a boolean indicating that vertex array object must be disabled even if they are supported
|
|
|
*/
|
|
@@ -44851,7 +45104,6 @@ declare module "babylonjs/Debug/index" {
|
|
|
export * from "babylonjs/Debug/rayHelper";
|
|
|
export * from "babylonjs/Debug/skeletonViewer";
|
|
|
}
|
|
|
-declare module "babylonjs/Engines/engine.backwardCompatibility" { }
|
|
|
declare module "babylonjs/Engines/nullEngine" {
|
|
|
import { Nullable, FloatArray, IndicesArray } from "babylonjs/types";
|
|
|
import { Scene } from "babylonjs/scene";
|
|
@@ -45792,7 +46044,6 @@ declare module "babylonjs/Engines/nativeEngine" {
|
|
|
declare module "babylonjs/Engines/index" {
|
|
|
export * from "babylonjs/Engines/constants";
|
|
|
export * from "babylonjs/Engines/engine";
|
|
|
- export * from "babylonjs/Engines/engine.backwardCompatibility";
|
|
|
export * from "babylonjs/Engines/engineStore";
|
|
|
export * from "babylonjs/Engines/nullEngine";
|
|
|
export * from "babylonjs/Engines/Extensions/index";
|
|
@@ -64781,118 +65032,6 @@ declare module "babylonjs/Misc/HighDynamicRange/index" {
|
|
|
export * from "babylonjs/Misc/HighDynamicRange/hdr";
|
|
|
export * from "babylonjs/Misc/HighDynamicRange/panoramaToCubemap";
|
|
|
}
|
|
|
-declare module "babylonjs/Misc/performanceMonitor" {
|
|
|
- import { IPerformanceMonitor } from "babylonjs/Misc/IPerformanceMonitor";
|
|
|
- /**
|
|
|
- * Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
|
|
|
- */
|
|
|
- export class PerformanceMonitor implements IPerformanceMonitor {
|
|
|
- private _enabled;
|
|
|
- private _rollingFrameTime;
|
|
|
- private _lastFrameTimeMs;
|
|
|
- /**
|
|
|
- * constructor
|
|
|
- * @param frameSampleSize The number of samples required to saturate the sliding window
|
|
|
- */
|
|
|
- constructor(frameSampleSize?: number);
|
|
|
- /**
|
|
|
- * Samples current frame
|
|
|
- * @param timeMs A timestamp in milliseconds of the current frame to compare with other frames
|
|
|
- */
|
|
|
- sampleFrame(timeMs?: number): void;
|
|
|
- /**
|
|
|
- * Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
|
- */
|
|
|
- readonly averageFrameTime: number;
|
|
|
- /**
|
|
|
- * Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
|
- */
|
|
|
- readonly averageFrameTimeVariance: number;
|
|
|
- /**
|
|
|
- * Returns the frame time of the most recent frame
|
|
|
- */
|
|
|
- readonly instantaneousFrameTime: number;
|
|
|
- /**
|
|
|
- * Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)
|
|
|
- */
|
|
|
- readonly averageFPS: number;
|
|
|
- /**
|
|
|
- * Returns the average framerate in frames per second using the most recent frame time
|
|
|
- */
|
|
|
- readonly instantaneousFPS: number;
|
|
|
- /**
|
|
|
- * Returns true if enough samples have been taken to completely fill the sliding window
|
|
|
- */
|
|
|
- readonly isSaturated: boolean;
|
|
|
- /**
|
|
|
- * Enables contributions to the sliding window sample set
|
|
|
- */
|
|
|
- enable(): void;
|
|
|
- /**
|
|
|
- * Disables contributions to the sliding window sample set
|
|
|
- * Samples will not be interpolated over the disabled period
|
|
|
- */
|
|
|
- disable(): void;
|
|
|
- /**
|
|
|
- * Returns true if sampling is enabled
|
|
|
- */
|
|
|
- readonly isEnabled: boolean;
|
|
|
- /**
|
|
|
- * Resets performance monitor
|
|
|
- */
|
|
|
- reset(): void;
|
|
|
- }
|
|
|
- /**
|
|
|
- * RollingAverage
|
|
|
- *
|
|
|
- * Utility to efficiently compute the rolling average and variance over a sliding window of samples
|
|
|
- */
|
|
|
- export class RollingAverage {
|
|
|
- /**
|
|
|
- * Current average
|
|
|
- */
|
|
|
- average: number;
|
|
|
- /**
|
|
|
- * Current variance
|
|
|
- */
|
|
|
- variance: number;
|
|
|
- protected _samples: Array<number>;
|
|
|
- protected _sampleCount: number;
|
|
|
- protected _pos: number;
|
|
|
- protected _m2: number;
|
|
|
- /**
|
|
|
- * constructor
|
|
|
- * @param length The number of samples required to saturate the sliding window
|
|
|
- */
|
|
|
- constructor(length: number);
|
|
|
- /**
|
|
|
- * Adds a sample to the sample set
|
|
|
- * @param v The sample value
|
|
|
- */
|
|
|
- add(v: number): void;
|
|
|
- /**
|
|
|
- * Returns previously added values or null if outside of history or outside the sliding window domain
|
|
|
- * @param i Index in history. For example, pass 0 for the most recent value and 1 for the value before that
|
|
|
- * @return Value previously recorded with add() or null if outside of range
|
|
|
- */
|
|
|
- history(i: number): number;
|
|
|
- /**
|
|
|
- * Returns true if enough samples have been taken to completely fill the sliding window
|
|
|
- * @return true if sample-set saturated
|
|
|
- */
|
|
|
- isSaturated(): boolean;
|
|
|
- /**
|
|
|
- * Resets the rolling average (equivalent to 0 samples taken so far)
|
|
|
- */
|
|
|
- reset(): void;
|
|
|
- /**
|
|
|
- * Wraps a value around the sample range boundaries
|
|
|
- * @param i Position in sample range, for example if the sample length is 5, and i is -3, then 2 will be returned.
|
|
|
- * @return Wrapped position in sample range
|
|
|
- */
|
|
|
- protected _wrapPosition(i: number): number;
|
|
|
- }
|
|
|
-}
|
|
|
declare module "babylonjs/Misc/sceneOptimizer" {
|
|
|
import { Scene, IDisposable } from "babylonjs/scene";
|
|
|
import { Observable } from "babylonjs/Misc/observable";
|
|
@@ -95111,18 +95250,17 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
- * Interface for performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
|
|
|
+ * Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
|
|
|
*/
|
|
|
- export interface IPerformanceMonitor {
|
|
|
- /**
|
|
|
- * Enables contributions to the sliding window sample set
|
|
|
- */
|
|
|
- enable(): void;
|
|
|
+ export class PerformanceMonitor {
|
|
|
+ private _enabled;
|
|
|
+ private _rollingFrameTime;
|
|
|
+ private _lastFrameTimeMs;
|
|
|
/**
|
|
|
- * Disables contributions to the sliding window sample set
|
|
|
- * Samples will not be interpolated over the disabled period
|
|
|
+ * constructor
|
|
|
+ * @param frameSampleSize The number of samples required to saturate the sliding window
|
|
|
*/
|
|
|
- disable(): void;
|
|
|
+ constructor(frameSampleSize?: number);
|
|
|
/**
|
|
|
* Samples current frame
|
|
|
* @param timeMs A timestamp in milliseconds of the current frame to compare with other frames
|
|
@@ -95131,23 +95269,94 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
|
*/
|
|
|
- averageFrameTime: number;
|
|
|
+ readonly averageFrameTime: number;
|
|
|
/**
|
|
|
* Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
|
*/
|
|
|
- averageFrameTimeVariance: number;
|
|
|
+ readonly averageFrameTimeVariance: number;
|
|
|
/**
|
|
|
* Returns the frame time of the most recent frame
|
|
|
*/
|
|
|
- instantaneousFrameTime: number;
|
|
|
+ readonly instantaneousFrameTime: number;
|
|
|
/**
|
|
|
* Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)
|
|
|
*/
|
|
|
- averageFPS: number;
|
|
|
+ readonly averageFPS: number;
|
|
|
/**
|
|
|
* Returns the average framerate in frames per second using the most recent frame time
|
|
|
*/
|
|
|
- instantaneousFPS: number;
|
|
|
+ readonly instantaneousFPS: number;
|
|
|
+ /**
|
|
|
+ * Returns true if enough samples have been taken to completely fill the sliding window
|
|
|
+ */
|
|
|
+ readonly isSaturated: boolean;
|
|
|
+ /**
|
|
|
+ * Enables contributions to the sliding window sample set
|
|
|
+ */
|
|
|
+ enable(): void;
|
|
|
+ /**
|
|
|
+ * Disables contributions to the sliding window sample set
|
|
|
+ * Samples will not be interpolated over the disabled period
|
|
|
+ */
|
|
|
+ disable(): void;
|
|
|
+ /**
|
|
|
+ * Returns true if sampling is enabled
|
|
|
+ */
|
|
|
+ readonly isEnabled: boolean;
|
|
|
+ /**
|
|
|
+ * Resets performance monitor
|
|
|
+ */
|
|
|
+ reset(): void;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * RollingAverage
|
|
|
+ *
|
|
|
+ * Utility to efficiently compute the rolling average and variance over a sliding window of samples
|
|
|
+ */
|
|
|
+ export class RollingAverage {
|
|
|
+ /**
|
|
|
+ * Current average
|
|
|
+ */
|
|
|
+ average: number;
|
|
|
+ /**
|
|
|
+ * Current variance
|
|
|
+ */
|
|
|
+ variance: number;
|
|
|
+ protected _samples: Array<number>;
|
|
|
+ protected _sampleCount: number;
|
|
|
+ protected _pos: number;
|
|
|
+ protected _m2: number;
|
|
|
+ /**
|
|
|
+ * constructor
|
|
|
+ * @param length The number of samples required to saturate the sliding window
|
|
|
+ */
|
|
|
+ constructor(length: number);
|
|
|
+ /**
|
|
|
+ * Adds a sample to the sample set
|
|
|
+ * @param v The sample value
|
|
|
+ */
|
|
|
+ add(v: number): void;
|
|
|
+ /**
|
|
|
+ * Returns previously added values or null if outside of history or outside the sliding window domain
|
|
|
+ * @param i Index in history. For example, pass 0 for the most recent value and 1 for the value before that
|
|
|
+ * @return Value previously recorded with add() or null if outside of range
|
|
|
+ */
|
|
|
+ history(i: number): number;
|
|
|
+ /**
|
|
|
+ * Returns true if enough samples have been taken to completely fill the sliding window
|
|
|
+ * @return true if sample-set saturated
|
|
|
+ */
|
|
|
+ isSaturated(): boolean;
|
|
|
+ /**
|
|
|
+ * Resets the rolling average (equivalent to 0 samples taken so far)
|
|
|
+ */
|
|
|
+ reset(): void;
|
|
|
+ /**
|
|
|
+ * Wraps a value around the sample range boundaries
|
|
|
+ * @param i Position in sample range, for example if the sample length is 5, and i is -3, then 2 will be returned.
|
|
|
+ * @return Wrapped position in sample range
|
|
|
+ */
|
|
|
+ protected _wrapPosition(i: number): number;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -95500,11 +95709,194 @@ declare module BABYLON {
|
|
|
* @param predicate defines a predicate used to filter which materials should be affected
|
|
|
*/
|
|
|
static MarkAllMaterialsAsDirty(flag: number, predicate?: (mat: Material) => boolean): void;
|
|
|
+ /** Defines that alpha blending is disabled */
|
|
|
+ static readonly ALPHA_DISABLE: number;
|
|
|
+ /** Defines that alpha blending to SRC ALPHA * SRC + DEST */
|
|
|
+ static readonly ALPHA_ADD: number;
|
|
|
+ /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */
|
|
|
+ static readonly ALPHA_COMBINE: number;
|
|
|
+ /** Defines that alpha blending to DEST - SRC * DEST */
|
|
|
+ static readonly ALPHA_SUBTRACT: number;
|
|
|
+ /** Defines that alpha blending to SRC * DEST */
|
|
|
+ static readonly ALPHA_MULTIPLY: number;
|
|
|
+ /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */
|
|
|
+ static readonly ALPHA_MAXIMIZED: number;
|
|
|
+ /** Defines that alpha blending to SRC + DEST */
|
|
|
+ static readonly ALPHA_ONEONE: number;
|
|
|
+ /** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */
|
|
|
+ static readonly ALPHA_PREMULTIPLIED: number;
|
|
|
+ /**
|
|
|
+ * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST
|
|
|
+ * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
|
|
|
+ */
|
|
|
+ static readonly ALPHA_PREMULTIPLIED_PORTERDUFF: number;
|
|
|
+ /** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */
|
|
|
+ static readonly ALPHA_INTERPOLATE: number;
|
|
|
/**
|
|
|
- * Factory used to create the performance monitor
|
|
|
- * @returns a new PerformanceMonitor
|
|
|
+ * Defines that alpha blending to SRC + (1 - SRC) * DEST
|
|
|
+ * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
|
|
|
*/
|
|
|
- static DefaultPerformanceMonitorFactory(): IPerformanceMonitor;
|
|
|
+ static readonly ALPHA_SCREENMODE: number;
|
|
|
+ /** Defines that the ressource is not delayed*/
|
|
|
+ static readonly DELAYLOADSTATE_NONE: number;
|
|
|
+ /** Defines that the ressource was successfully delay loaded */
|
|
|
+ static readonly DELAYLOADSTATE_LOADED: number;
|
|
|
+ /** Defines that the ressource is currently delay loading */
|
|
|
+ static readonly DELAYLOADSTATE_LOADING: number;
|
|
|
+ /** Defines that the ressource is delayed and has not started loading */
|
|
|
+ static readonly DELAYLOADSTATE_NOTLOADED: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */
|
|
|
+ static readonly NEVER: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */
|
|
|
+ static readonly ALWAYS: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */
|
|
|
+ static readonly LESS: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */
|
|
|
+ static readonly EQUAL: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */
|
|
|
+ static readonly LEQUAL: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */
|
|
|
+ static readonly GREATER: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */
|
|
|
+ static readonly GEQUAL: number;
|
|
|
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */
|
|
|
+ static readonly NOTEQUAL: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be kept */
|
|
|
+ static readonly KEEP: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be replaced */
|
|
|
+ static readonly REPLACE: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be incremented */
|
|
|
+ static readonly INCR: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be decremented */
|
|
|
+ static readonly DECR: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be inverted */
|
|
|
+ static readonly INVERT: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */
|
|
|
+ static readonly INCR_WRAP: number;
|
|
|
+ /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */
|
|
|
+ static readonly DECR_WRAP: number;
|
|
|
+ /** Texture is not repeating outside of 0..1 UVs */
|
|
|
+ static readonly TEXTURE_CLAMP_ADDRESSMODE: number;
|
|
|
+ /** Texture is repeating outside of 0..1 UVs */
|
|
|
+ static readonly TEXTURE_WRAP_ADDRESSMODE: number;
|
|
|
+ /** Texture is repeating and mirrored */
|
|
|
+ static readonly TEXTURE_MIRROR_ADDRESSMODE: number;
|
|
|
+ /** ALPHA */
|
|
|
+ static readonly TEXTUREFORMAT_ALPHA: number;
|
|
|
+ /** LUMINANCE */
|
|
|
+ static readonly TEXTUREFORMAT_LUMINANCE: number;
|
|
|
+ /** LUMINANCE_ALPHA */
|
|
|
+ static readonly TEXTUREFORMAT_LUMINANCE_ALPHA: number;
|
|
|
+ /** RGB */
|
|
|
+ static readonly TEXTUREFORMAT_RGB: number;
|
|
|
+ /** RGBA */
|
|
|
+ static readonly TEXTUREFORMAT_RGBA: number;
|
|
|
+ /** RED */
|
|
|
+ static readonly TEXTUREFORMAT_RED: number;
|
|
|
+ /** RED (2nd reference) */
|
|
|
+ static readonly TEXTUREFORMAT_R: number;
|
|
|
+ /** RG */
|
|
|
+ static readonly TEXTUREFORMAT_RG: number;
|
|
|
+ /** RED_INTEGER */
|
|
|
+ static readonly TEXTUREFORMAT_RED_INTEGER: number;
|
|
|
+ /** RED_INTEGER (2nd reference) */
|
|
|
+ static readonly TEXTUREFORMAT_R_INTEGER: number;
|
|
|
+ /** RG_INTEGER */
|
|
|
+ static readonly TEXTUREFORMAT_RG_INTEGER: number;
|
|
|
+ /** RGB_INTEGER */
|
|
|
+ static readonly TEXTUREFORMAT_RGB_INTEGER: number;
|
|
|
+ /** RGBA_INTEGER */
|
|
|
+ static readonly TEXTUREFORMAT_RGBA_INTEGER: number;
|
|
|
+ /** UNSIGNED_BYTE */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_BYTE: number;
|
|
|
+ /** UNSIGNED_BYTE (2nd reference) */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT: number;
|
|
|
+ /** FLOAT */
|
|
|
+ static readonly TEXTURETYPE_FLOAT: number;
|
|
|
+ /** HALF_FLOAT */
|
|
|
+ static readonly TEXTURETYPE_HALF_FLOAT: number;
|
|
|
+ /** BYTE */
|
|
|
+ static readonly TEXTURETYPE_BYTE: number;
|
|
|
+ /** SHORT */
|
|
|
+ static readonly TEXTURETYPE_SHORT: number;
|
|
|
+ /** UNSIGNED_SHORT */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_SHORT: number;
|
|
|
+ /** INT */
|
|
|
+ static readonly TEXTURETYPE_INT: number;
|
|
|
+ /** UNSIGNED_INT */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INTEGER: number;
|
|
|
+ /** UNSIGNED_SHORT_4_4_4_4 */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4: number;
|
|
|
+ /** UNSIGNED_SHORT_5_5_5_1 */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1: number;
|
|
|
+ /** UNSIGNED_SHORT_5_6_5 */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_SHORT_5_6_5: number;
|
|
|
+ /** UNSIGNED_INT_2_10_10_10_REV */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV: number;
|
|
|
+ /** UNSIGNED_INT_24_8 */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT_24_8: number;
|
|
|
+ /** UNSIGNED_INT_10F_11F_11F_REV */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV: number;
|
|
|
+ /** UNSIGNED_INT_5_9_9_9_REV */
|
|
|
+ static readonly TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV: number;
|
|
|
+ /** FLOAT_32_UNSIGNED_INT_24_8_REV */
|
|
|
+ static readonly TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV: number;
|
|
|
+ /** nearest is mag = nearest and min = nearest and mip = linear */
|
|
|
+ static readonly TEXTURE_NEAREST_SAMPLINGMODE: number;
|
|
|
+ /** Bilinear is mag = linear and min = linear and mip = nearest */
|
|
|
+ static readonly TEXTURE_BILINEAR_SAMPLINGMODE: number;
|
|
|
+ /** Trilinear is mag = linear and min = linear and mip = linear */
|
|
|
+ static readonly TEXTURE_TRILINEAR_SAMPLINGMODE: number;
|
|
|
+ /** nearest is mag = nearest and min = nearest and mip = linear */
|
|
|
+ static readonly TEXTURE_NEAREST_NEAREST_MIPLINEAR: number;
|
|
|
+ /** Bilinear is mag = linear and min = linear and mip = nearest */
|
|
|
+ static readonly TEXTURE_LINEAR_LINEAR_MIPNEAREST: number;
|
|
|
+ /** Trilinear is mag = linear and min = linear and mip = linear */
|
|
|
+ static readonly TEXTURE_LINEAR_LINEAR_MIPLINEAR: number;
|
|
|
+ /** mag = nearest and min = nearest and mip = nearest */
|
|
|
+ static readonly TEXTURE_NEAREST_NEAREST_MIPNEAREST: number;
|
|
|
+ /** mag = nearest and min = linear and mip = nearest */
|
|
|
+ static readonly TEXTURE_NEAREST_LINEAR_MIPNEAREST: number;
|
|
|
+ /** mag = nearest and min = linear and mip = linear */
|
|
|
+ static readonly TEXTURE_NEAREST_LINEAR_MIPLINEAR: number;
|
|
|
+ /** mag = nearest and min = linear and mip = none */
|
|
|
+ static readonly TEXTURE_NEAREST_LINEAR: number;
|
|
|
+ /** mag = nearest and min = nearest and mip = none */
|
|
|
+ static readonly TEXTURE_NEAREST_NEAREST: number;
|
|
|
+ /** mag = linear and min = nearest and mip = nearest */
|
|
|
+ static readonly TEXTURE_LINEAR_NEAREST_MIPNEAREST: number;
|
|
|
+ /** mag = linear and min = nearest and mip = linear */
|
|
|
+ static readonly TEXTURE_LINEAR_NEAREST_MIPLINEAR: number;
|
|
|
+ /** mag = linear and min = linear and mip = none */
|
|
|
+ static readonly TEXTURE_LINEAR_LINEAR: number;
|
|
|
+ /** mag = linear and min = nearest and mip = none */
|
|
|
+ static readonly TEXTURE_LINEAR_NEAREST: number;
|
|
|
+ /** Explicit coordinates mode */
|
|
|
+ static readonly TEXTURE_EXPLICIT_MODE: number;
|
|
|
+ /** Spherical coordinates mode */
|
|
|
+ static readonly TEXTURE_SPHERICAL_MODE: number;
|
|
|
+ /** Planar coordinates mode */
|
|
|
+ static readonly TEXTURE_PLANAR_MODE: number;
|
|
|
+ /** Cubic coordinates mode */
|
|
|
+ static readonly TEXTURE_CUBIC_MODE: number;
|
|
|
+ /** Projection coordinates mode */
|
|
|
+ static readonly TEXTURE_PROJECTION_MODE: number;
|
|
|
+ /** Skybox coordinates mode */
|
|
|
+ static readonly TEXTURE_SKYBOX_MODE: number;
|
|
|
+ /** Inverse Cubic coordinates mode */
|
|
|
+ static readonly TEXTURE_INVCUBIC_MODE: number;
|
|
|
+ /** Equirectangular coordinates mode */
|
|
|
+ static readonly TEXTURE_EQUIRECTANGULAR_MODE: number;
|
|
|
+ /** Equirectangular Fixed coordinates mode */
|
|
|
+ static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MODE: number;
|
|
|
+ /** Equirectangular Fixed Mirrored coordinates mode */
|
|
|
+ static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE: number;
|
|
|
+ /** Defines that texture rescaling will use a floor to find the closer power of 2 size */
|
|
|
+ static readonly SCALEMODE_FLOOR: number;
|
|
|
+ /** Defines that texture rescaling will look for the nearest power of 2 size */
|
|
|
+ static readonly SCALEMODE_NEAREST: number;
|
|
|
+ /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */
|
|
|
+ static readonly SCALEMODE_CEILING: number;
|
|
|
/** @hidden */
|
|
|
static _TextureLoaders: IInternalTextureLoader[];
|
|
|
/**
|
|
@@ -95723,7 +96115,7 @@ declare module BABYLON {
|
|
|
* Gets the performance monitor attached to this engine
|
|
|
* @see http://doc.babylonjs.com/how_to/optimizing_your_scene#engineinstrumentation
|
|
|
*/
|
|
|
- readonly performanceMonitor: IPerformanceMonitor;
|
|
|
+ readonly performanceMonitor: PerformanceMonitor;
|
|
|
/**
|
|
|
* Gets or sets a boolean indicating that vertex array object must be disabled even if they are supported
|
|
|
*/
|
|
@@ -127151,117 +127543,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
- * Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
|
|
|
- */
|
|
|
- export class PerformanceMonitor implements IPerformanceMonitor {
|
|
|
- private _enabled;
|
|
|
- private _rollingFrameTime;
|
|
|
- private _lastFrameTimeMs;
|
|
|
- /**
|
|
|
- * constructor
|
|
|
- * @param frameSampleSize The number of samples required to saturate the sliding window
|
|
|
- */
|
|
|
- constructor(frameSampleSize?: number);
|
|
|
- /**
|
|
|
- * Samples current frame
|
|
|
- * @param timeMs A timestamp in milliseconds of the current frame to compare with other frames
|
|
|
- */
|
|
|
- sampleFrame(timeMs?: number): void;
|
|
|
- /**
|
|
|
- * Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
|
- */
|
|
|
- readonly averageFrameTime: number;
|
|
|
- /**
|
|
|
- * Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
|
- */
|
|
|
- readonly averageFrameTimeVariance: number;
|
|
|
- /**
|
|
|
- * Returns the frame time of the most recent frame
|
|
|
- */
|
|
|
- readonly instantaneousFrameTime: number;
|
|
|
- /**
|
|
|
- * Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)
|
|
|
- */
|
|
|
- readonly averageFPS: number;
|
|
|
- /**
|
|
|
- * Returns the average framerate in frames per second using the most recent frame time
|
|
|
- */
|
|
|
- readonly instantaneousFPS: number;
|
|
|
- /**
|
|
|
- * Returns true if enough samples have been taken to completely fill the sliding window
|
|
|
- */
|
|
|
- readonly isSaturated: boolean;
|
|
|
- /**
|
|
|
- * Enables contributions to the sliding window sample set
|
|
|
- */
|
|
|
- enable(): void;
|
|
|
- /**
|
|
|
- * Disables contributions to the sliding window sample set
|
|
|
- * Samples will not be interpolated over the disabled period
|
|
|
- */
|
|
|
- disable(): void;
|
|
|
- /**
|
|
|
- * Returns true if sampling is enabled
|
|
|
- */
|
|
|
- readonly isEnabled: boolean;
|
|
|
- /**
|
|
|
- * Resets performance monitor
|
|
|
- */
|
|
|
- reset(): void;
|
|
|
- }
|
|
|
- /**
|
|
|
- * RollingAverage
|
|
|
- *
|
|
|
- * Utility to efficiently compute the rolling average and variance over a sliding window of samples
|
|
|
- */
|
|
|
- export class RollingAverage {
|
|
|
- /**
|
|
|
- * Current average
|
|
|
- */
|
|
|
- average: number;
|
|
|
- /**
|
|
|
- * Current variance
|
|
|
- */
|
|
|
- variance: number;
|
|
|
- protected _samples: Array<number>;
|
|
|
- protected _sampleCount: number;
|
|
|
- protected _pos: number;
|
|
|
- protected _m2: number;
|
|
|
- /**
|
|
|
- * constructor
|
|
|
- * @param length The number of samples required to saturate the sliding window
|
|
|
- */
|
|
|
- constructor(length: number);
|
|
|
- /**
|
|
|
- * Adds a sample to the sample set
|
|
|
- * @param v The sample value
|
|
|
- */
|
|
|
- add(v: number): void;
|
|
|
- /**
|
|
|
- * Returns previously added values or null if outside of history or outside the sliding window domain
|
|
|
- * @param i Index in history. For example, pass 0 for the most recent value and 1 for the value before that
|
|
|
- * @return Value previously recorded with add() or null if outside of range
|
|
|
- */
|
|
|
- history(i: number): number;
|
|
|
- /**
|
|
|
- * Returns true if enough samples have been taken to completely fill the sliding window
|
|
|
- * @return true if sample-set saturated
|
|
|
- */
|
|
|
- isSaturated(): boolean;
|
|
|
- /**
|
|
|
- * Resets the rolling average (equivalent to 0 samples taken so far)
|
|
|
- */
|
|
|
- reset(): void;
|
|
|
- /**
|
|
|
- * Wraps a value around the sample range boundaries
|
|
|
- * @param i Position in sample range, for example if the sample length is 5, and i is -3, then 2 will be returned.
|
|
|
- * @return Wrapped position in sample range
|
|
|
- */
|
|
|
- protected _wrapPosition(i: number): number;
|
|
|
- }
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
- /**
|
|
|
* Defines the root class used to create scene optimization to use with SceneOptimizer
|
|
|
* @description More details at http://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
|
|
|
*/
|