Skip to content

Commit

Permalink
Merge pull request #1648 from LorenzoZoia/fix-VBOBatchingTrianglesBuf…
Browse files Browse the repository at this point in the history
…fer-config

Fix: update VBOBatchingTrianglesBuffer constructor
  • Loading branch information
xeolabs committed Sep 2, 2024
2 parents d2455c5 + 3ea5041 commit 61679fb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const configs = new Configs();
*/
export class VBOBatchingTrianglesBuffer {

constructor() {
this.maxVerts = configs.maxGeometryBatchSize;
this.maxIndices = configs.maxGeometryBatchSize * 3; // Rough rule-of-thumb
constructor(maxBatchSize = configs.maxGeometryBatchSize) {
this.maxVerts = maxBatchSize;
this.maxIndices = maxBatchSize * 3; // Rough rule-of-thumb
this.positions = [];
this.colors = [];
this.uv = [];
Expand Down

0 comments on commit 61679fb

Please sign in to comment.