Skip to content

Commit

Permalink
Merge pull request #172 from erikhoj/main
Browse files Browse the repository at this point in the history
tilemap indexbuffer can no longer be destroyed
  • Loading branch information
ivanpopelyshev authored Feb 2, 2025
2 parents d00fb69 + 8df8284 commit cfa040f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/TilemapPipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export class TilemapPipe implements RenderPipe<Tilemap>, InstructionPipe<Tilemap
label: 'index-tilemap-buffer',
usage: BufferUsage.INDEX | BufferUsage.COPY_DST,
});
// Remove the destroy method from the index buffer to prevent it from being destroyed.

Check warning on line 74 in src/TilemapPipe.ts

View workflow job for this annotation

GitHub Actions / build

Expected indentation of 8 spaces but found 2 tabs
// This is because the index buffer is shared between all tilemaps, and .destroy will be called when destroying a tilemap.

Check warning on line 75 in src/TilemapPipe.ts

View workflow job for this annotation

GitHub Actions / build

This line has a length of 130. Maximum allowed is 125
this.indexBuffer.destroy = () => {};

this.checkIndexBuffer(2000);
}

Expand Down

0 comments on commit cfa040f

Please sign in to comment.