1 | {"version":3,"file":"pixi-object-pool.js","sources":["../../../node_modules/tslib/tslib.es6.js","../src/AverageProvider.ts","../src/ObjectPool.ts","../src/ObjectPoolFactory.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/**\n * Provides the exponential moving average of a sequence.\n *\n * Ignored because not directly exposed.\n *\n * @internal\n * @ignore\n * @class\n */\nexport class AverageProvider\n{\n private _history: number[];\n private _decayRatio: number;\n\n private _currentIndex: number;\n private _average: number;\n\n /**\n * @ignore\n * @param {number} windowSize - no. of inputs used to calculate window\n * @param {number} decayRatio - quantifies the weight of previous values (b/w 0 and 1)\n */\n constructor(windowSize: number, decayRatio: number)\n {\n this._history = new Array(windowSize);\n this._decayRatio = decayRatio;\n\n this._currentIndex = 0;\n\n for (let i = 0; i < windowSize; i++)\n {\n this._history[i] = 0;\n }\n }\n\n /**\n * @ignore\n * @param {number} input - the next value in the sequence\n * @returns {number} - the moving average\n */\n next(input: number): number\n {\n const { _history: history, _decayRatio: decayRatio } = this;\n const historyLength = history.length;\n\n this._currentIndex = this._currentIndex < historyLength - 1 ? this._currentIndex + 1 : 0;\n history[this._currentIndex] = input;\n\n let weightedSum = 0;\n let weight = 0;\n\n for (let i = this._currentIndex + 1; i < historyLength; i++)\n {\n weightedSum = (weightedSum + history[i]) * decayRatio;\n weight = (weight + 1) * decayRatio;\n }\n for (let i = 0; i <= this._currentIndex; i++)\n {\n weightedSum = (weightedSum + history[i]) * decayRatio;\n weight = (weight + 1) * decayRatio;\n }\n\n this._average = weightedSum / weight;\n\n return this._average;\n }\n\n absDev(): number\n {\n let errSum = 0;\n\n for (let i = 0, j = this._history.length; i < j; i++)\n {\n errSum += Math.abs(this._history[i] - this._average);\n }\n\n return errSum / this._history.length;\n }\n}\n","import { Ticker, UPDATE_PRIORITY } from '@pixi/ticker';\nimport { AverageProvider } from './AverageProvider';\n\n/**\n * @interface\n * @public\n */\nexport interface IObjectPoolOptions\n{\n capacityRatio?: number;\n decayRatio?: number;\n reserve?: number;\n}\n\n/**\n * `ObjectPool` provides the framework necessary for pooling minus the object instantiation\n * method. You can use `ObjectPoolFactory` for objects that can be created using a default\n * constructor.\n *\n * @template T\n * @class\n * @public\n */\nexport abstract class ObjectPool<T extends typeof Object>\n{\n protected _freeList: Array<T>;\n protected _freeCount: number;\n protected _reserveCount: number;\n\n protected _borrowRate: number;\n protected _returnRate: number;\n protected _flowRate: number;\n protected _borrowRateAverage: number;\n protected _marginAverage: number;\n\n private _capacityRatio: number;\n private _decayRatio: number;\n private _borrowRateAverageProvider: AverageProvider;\n private _marginAverageProvider: AverageProvider;\n\n /**\n * @param {IObjectPoolOptions} options\n */\n constructor(options: IObjectPoolOptions = {})\n {\n /**\n * Supply pool of objects that can be used to immediately lend.\n *\n * @member {Array<T>}\n * @protected\n */\n this._freeList = [];\n\n /**\n * Number of objects in the pool. This is less than or equal to `_pool.length`.\n *\n * @member {number}\n * @protected\n */\n this._freeCount = 0;\n\n this._borrowRate = 0;\n this._returnRate = 0;\n this._flowRate = 0;\n this._borrowRateAverage = 0;\n\n this._reserveCount = options.reserve || 0;\n this._capacityRatio = options.capacityRatio || 1.2;\n this._decayRatio = options.decayRatio || 0.67;\n this._marginAverage = 0;\n this._borrowRateAverageProvider = new AverageProvider(128, this._decayRatio);\n this._marginAverageProvider = new AverageProvider(128, this._decayRatio);\n }\n\n /**\n * Instantiates a new object of type `T`.\n *\n * @abstract\n * @returns {T}\n */\n abstract create(): T;\n\n // TODO: Support object destruction. It might not be so good for perf tho.\n // /**\n // * Destroys the object before discarding it.\n // *\n // * @param {T} object\n // */\n // abstract destroyObject(object: T): void;\n\n /**\n * The number of objects that can be stored in the pool without allocating more space.\n *\n * @member {number}\n */\n protected get capacity(): number\n {\n return this._freeList.length;\n }\n protected set capacity(cp: number)\n {\n this._freeList.length = Math.ceil(cp);\n }\n\n /**\n * Obtains an instance from this pool.\n *\n * @returns {T}\n */\n allocate(): T\n {\n ++this._borrowRate;\n\n ++this._flowRate;\n\n if (this._freeCount > 0)\n {\n return this._freeList[--this._freeCount];\n }\n\n return this.create();\n }\n\n /**\n * Returns the object to the pool.\n *\n * @param {T} object\n */\n release(object: T): void\n {\n ++this._returnRate;\n --this._flowRate;\n\n if (this._freeCount === this.capacity)\n {\n this.capacity *= this._capacityRatio;\n }\n\n this._freeList[this._freeCount] = object;\n ++this._freeCount;\n }\n\n /**\n * Preallocates objects so that the pool size is at least `count`.\n *\n * @param {number} count\n */\n reserve(count: number): void\n {\n this._reserveCount = count;\n\n if (this._freeCount < count)\n {\n const diff = this._freeCount - count;\n\n for (let i = 0; i < diff; i++)\n {\n this._freeList[this._freeCount] = this.create();\n ++this._freeCount;\n }\n }\n }\n\n /**\n * Dereferences objects for the GC to collect and brings the pool size down to `count`.\n *\n * @param {number} count\n */\n limit(count: number): void\n {\n if (this._freeCount > count)\n {\n const oldCapacity = this.capacity;\n\n if (oldCapacity > count * this._capacityRatio)\n {\n this.capacity = count * this._capacityRatio;\n }\n\n const excessBound = Math.min(this._freeCount, this.capacity);\n\n for (let i = count; i < excessBound; i++)\n {\n this._freeList[i] = null;\n }\n }\n }\n\n /**\n * Install the GC on the shared ticker.\n *\n * @param {Ticker}[ticker=Ticker.shared]\n */\n startGC(ticker: Ticker = Ticker.shared): void\n {\n ticker.add(this._gcTick, null, UPDATE_PRIORITY.UTILITY);\n }\n\n /**\n * Stops running the GC on the pool.\n *\n * @param {Ticker}[ticker=Ticker.shared]\n */\n stopGC(ticker: Ticker = Ticker.shared): void\n {\n ticker.remove(this._gcTick);\n }\n\n private _gcTick = (): void =>\n {\n this._borrowRateAverage = this._borrowRateAverageProvider.next(this._borrowRate);\n this._marginAverage = this._marginAverageProvider.next(this._freeCount - this._borrowRate);\n\n const absDev = this._borrowRateAverageProvider.absDev();\n\n this._flowRate = 0;\n this._borrowRate = 0;\n this._returnRate = 0;\n\n const poolSize = this._freeCount;\n const poolCapacity = this._freeList.length;\n\n // If the pool is small enough, it shouldn't really matter\n if (poolSize < 128 && this._borrowRateAverage < 128 && poolCapacity < 128)\n {\n return;\n }\n\n // If pool is say, 2x, larger than borrowing rate on average (adjusted for variance/abs-dev), then downsize.\n const threshold = Math.max(this._borrowRateAverage * (this._capacityRatio - 1), this._reserveCount);\n\n if (this._freeCount > threshold + absDev)\n {\n const newCap = threshold + absDev;\n\n this.capacity = Math.min(this._freeList.length, Math.ceil(newCap));\n this._freeCount = this._freeList.length;\n }\n };\n}\n","import { ObjectPool } from './ObjectPool';\n\nconst poolMap: Map<typeof Object, ObjectPool<any>> = new Map();\n\n/**\n * Factory for creating pools of objects with default constructors. It will store the pool of\n * a given type and reuse it on further builds.\n *\n * @class\n * @public\n * @example\n * ```js\n * import { ObjectPool, ObjectPoolFactory } from 'pixi-object-pool';\n *\n * class AABB {}\n *\n * const opool: ObjectPool<AABB> = ObjectPoolFactory.build(AABB) as ObjectPool<AABB>;\n *\n * const temp = opool.borrowObject();\n * // do something\n * opool.returnObject(temp);\n * ```\n */\nexport class ObjectPoolFactory\n{\n /**\n * @param {Class} Type\n */\n static build(Type: typeof Object): ObjectPool<any>\n {\n let pool = poolMap.get(Type);\n\n if (pool)\n {\n return pool;\n }\n\n pool = new (class DefaultObjectPool extends ObjectPool<any>\n {\n create(): any\n {\n return new Type();\n }\n })();\n\n poolMap.set(Type, pool);\n\n return pool;\n }\n}\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","windowSize","decayRatio","this","_history","_decayRatio","_currentIndex","i","AverageProvider","input","history","historyLength","length","weightedSum","weight","_average","errSum","j","Math","abs","options","_this","_borrowRateAverage","_borrowRateAverageProvider","next","_borrowRate","_marginAverage","_marginAverageProvider","_freeCount","absDev","_flowRate","_returnRate","poolSize","poolCapacity","_freeList","threshold","max","_capacityRatio","_reserveCount","newCap","capacity","min","ceil","reserve","capacityRatio","ObjectPool","cp","create","object","count","diff","excessBound","ticker","Ticker","shared","add","_gcTick","UPDATE_PRIORITY","UTILITY","remove","poolMap","Map","ObjectPoolFactory","Type","pool","get","__","constructor","prototype","__extends","DefaultObjectPool","set"],"mappings":";;;;;;;;;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,ICX5B,iBAaI,WAAY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