UNPKG

848 BJavaScriptView Raw
1import { TYPES } from "@pixi/constants";
2import { Buffer } from "../geometry/Buffer.mjs";
3import { Geometry } from "../geometry/Geometry.mjs";
4class BatchGeometry extends Geometry {
5 /**
6 * @param {boolean} [_static=false] - Optimization flag, where `false`
7 * is updated every frame, `true` doesn't change frame-to-frame.
8 */
9 constructor(_static = !1) {
10 super(), this._buffer = new Buffer(null, _static, !1), this._indexBuffer = new Buffer(null, _static, !0), this.addAttribute("aVertexPosition", this._buffer, 2, !1, TYPES.FLOAT).addAttribute("aTextureCoord", this._buffer, 2, !1, TYPES.FLOAT).addAttribute("aColor", this._buffer, 4, !0, TYPES.UNSIGNED_BYTE).addAttribute("aTextureId", this._buffer, 1, !0, TYPES.FLOAT).addIndex(this._indexBuffer);
11 }
12}
13export {
14 BatchGeometry
15};
16//# sourceMappingURL=BatchGeometry.mjs.map