pixijs-userland/tilemap

Cleaning or updating Tilemap is not working without running renderGroup.onChildUpdate `PIXI 8`

Opened this issue · 2 comments

ajur commented

Hi,

There are some issues with Tilemap.clean() and also with adding new tiles.
At least for me, on MacOs, Chrome or Safari (albeit there are some differences how this breaks).

At least for some time you can check my project with the issues.

  • clean seems to not work, until you place a new tile. At least on chrome.
    • check 'clear tilemap' buttons
  • effect of both clean, and adding new tiles are not visible until calling renderGroup.onChildUpdate (on tilemap or parent). Or e.g. changing position, witch triggers this call.
    • check 'update tilemap' buttons

Oh, also, thats for WebGPU.
When running WebGL version, calling clean without onChildUpdate ends with this nice error:

[.WebGL-0x10800c4af00] GL_INVALID_OPERATION: Vertex buffer is not big enough for the draw call
WebGL: too many errors, no more errors will be reported to the console for this context.

(run WebGL version here)

You can check the code for this game on gh

Oh, thank you!

I have the same problem. Clean() alone does clean the tiles but they're recreated the same no matter if the tiles have e.g. different x/y.

app.stage.renderGroup.onChildUpdate(tilemap)

helps.