1 | {"version":3,"file":"BatchGeometry.mjs","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":[],"mappings":";;;AAQO,MAAM,sBAAsB,SACnC;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBI,YAAY,UAAU,IACtB;AACU,aAED,KAAA,UAAU,IAAI,OAAO,MAAM,SAAS,EAAK,GAE9C,KAAK,eAAe,IAAI,OAAO,MAAM,SAAS,EAAI,GAElD,KAAK,aAAa,mBAAmB,KAAK,SAAS,GAAG,IAAO,MAAM,KAAK,EACnE,aAAa,iBAAiB,KAAK,SAAS,GAAG,IAAO,MAAM,KAAK,EACjE,aAAa,UAAU,KAAK,SAAS,GAAG,IAAM,MAAM,aAAa,EACjE,aAAa,cAAc,KAAK,SAAS,GAAG,IAAM,MAAM,KAAK,EAC7D,SAAS,KAAK,YAAY;AAAA,EACnC;AACJ;"} |