From ef7628f098b227031eac414056cb3bd2b8cb1e4f Mon Sep 17 00:00:00 2001 From: Aiosa <469130@mail.muni.cz> Date: Tue, 26 Nov 2024 14:08:32 +0100 Subject: [PATCH] Fix bug: webgl 'manual instanced rendering' return -> continue, do not count as drawn index. --- src/webgldrawer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/webgldrawer.js b/src/webgldrawer.js index a7e596da..624f3937 100644 --- a/src/webgldrawer.js +++ b/src/webgldrawer.js @@ -374,13 +374,13 @@ // iterate over tiles and add data for each one to the buffers for(let tileIndex = 0; tileIndex < tilesToDraw.length; tileIndex++){ let tile = tilesToDraw[tileIndex].tile; - let indexInDrawArray = tileIndex % maxTextures; - let numTilesToDraw = indexInDrawArray + 1; - const textureInfo = this.getDataToDraw(tile); if (!textureInfo) { - return; + continue; } + + let indexInDrawArray = tileIndex % maxTextures; + let numTilesToDraw = indexInDrawArray + 1; this._getTileData(tile, tiledImage, textureInfo, overallMatrix, indexInDrawArray, texturePositionArray, textureDataArray, matrixArray, opacityArray); if( (numTilesToDraw === maxTextures) || (tileIndex === tilesToDraw.length - 1)){