UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

32 lines 857 B
/** * Metric container with a limited size and great performance characteristics. * Does not allocate memory during usage. */ export class RingBufferMetric extends AbstractMetric { /** * * @param {number} [size] how many records should the ring-buffer hold? */ constructor(size?: number); /** * * @type {RingBuffer} * @readonly * @private */ private readonly __data; /** * Resize underlying buffer to be able to keep a different number of records * @param {number} size */ resize(size: number): void; record(value: any): void; /** * * @param {MetricStatistics} result * @returns {boolean} */ computeStats(result: MetricStatistics): boolean; } import { AbstractMetric } from "./AbstractMetric.js"; //# sourceMappingURL=RingBufferMetric.d.ts.map