Closed zhouccccc closed 3 years ago
It's difficult to figure out what's going on. The sample code seems straightforward and similar to the demo in pixi-cull. Do you know what's different from the demo project?
there are no lots of differences. I think the only difference between them is that the demo show all sprites in the beginning, but my case is not. that's weird! Also If I remove the cull function, it works well. now I'm debugging the cull source code in my project
What version of pixi-cull? If it's an older version, you could try: new Simple({ dirtyTest: false })
and see if that helps.
So sorry I forgot it because we download the source code and use it as the local static js module before. But the latest version can also reproduce
Hmm...try to call addList after you added your elements to the children (it shouldn't need this but worth a try).
I didn't add all children to the viewport or cull at one time. The following is the rendering logic:
So how ( or where )do I do this action addList
?
Maybe something like this (I'm guessing this is for a one-time render; you wouldn't want to recreate your scene on every frame like this for perf reasons):
Thanks for your tips, I have resolved this issue because I found my weird operation on creating some specific sprites . But my doubt is why I removed this module and then it can also works well. I will keep researching. (>‿◠)
As stated in the title, If I put some sprites out of the viewport screen in the beginning of rendering, these sprites could disappeared when wheel the viewport for view them. But not all sprites disappear, it seems to be random
Case 1
Case 2
The complete map looks like this
Even though update the cull to the latest version
version
The following is my code: