1 | {"version":3,"file":"BatchGeometry.js","sources":["../../src/batch/BatchGeometry.ts"],"sourcesContent":["import { TYPES } from '@pixi/constants';\nimport { Buffer } from '../geometry/Buffer';\nimport { Geometry } from '../geometry/Geometry';\n\n/**\n * Geometry used to batch standard PIXI content (e.g. Mesh, Sprite, Graphics objects).\n * @memberof PIXI\n */\nexport class BatchGeometry extends Geometry\n{\n /**\n * Buffer used for position, color, texture IDs\n * @protected\n */\n _buffer: Buffer;\n\n /**\n * Index buffer data\n * @protected\n */\n _indexBuffer: Buffer;\n\n /**\n * @param {boolean} [_static=false] - Optimization flag, where `false`\n * is updated every frame, `true` doesn't change frame-to-frame.\n */\n constructor(_static = false)\n {\n super();\n\n this._buffer = new Buffer(null, _static, false);\n\n this._indexBuffer = new Buffer(null, _static, true);\n\n this.addAttribute('aVertexPosition', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aTextureCoord', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aColor', this._buffer, 4, true, TYPES.UNSIGNED_BYTE)\n .addAttribute('aTextureId', this._buffer, 1, true, TYPES.FLOAT)\n .addIndex(this._indexBuffer);\n }\n}\n"],"names":["Geometry","Buffer","TYPES"],"mappings":";;AAQO,MAAM,sBAAsBA,SAAAA,SACnC;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBI,YAAY,UAAU,IACtB;AACU,aAED,KAAA,UAAU,IAAIC,cAAO,MAAM,SAAS,EAAK,GAE9C,KAAK,eAAe,IAAIA,OAAO,OAAA,MAAM,SAAS,EAAI,GAElD,KAAK,aAAa,mBAAmB,KAAK,SAAS,GAAG,IAAOC,UAAA,MAAM,KAAK,EACnE,aAAa,iBAAiB,KAAK,SAAS,GAAG,IAAOA,UAAA,MAAM,KAAK,EACjE,aAAa,UAAU,KAAK,SAAS,GAAG,IAAMA,UAAA,MAAM,aAAa,EACjE,aAAa,cAAc,KAAK,SAAS,GAAG,IAAMA,UAAAA,MAAM,KAAK,EAC7D,SAAS,KAAK,YAAY;AAAA,EACnC;AACJ;;"} |