Git Product home page Git Product logo

Comments (8)

zhouccccc avatar zhouccccc commented on May 17, 2024 1

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. (>‿◠)

from pixi-cull.

davidfig avatar davidfig commented on May 17, 2024

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?

from pixi-cull.

zhouccccc avatar zhouccccc commented on May 17, 2024

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

from pixi-cull.

davidfig avatar davidfig commented on May 17, 2024

What version of pixi-cull? If it's an older version, you could try: new Simple({ dirtyTest: false }) and see if that helps.

from pixi-cull.

zhouccccc avatar zhouccccc commented on May 17, 2024

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

from pixi-cull.

davidfig avatar davidfig commented on May 17, 2024

Hmm...try to call addList after you added your elements to the children (it shouldn't need this but worth a try).

from pixi-cull.

zhouccccc avatar zhouccccc commented on May 17, 2024

I didn't add all children to the viewport or cull at one time. The following is the rendering logic:
image
So how ( or where )do I do this action addList ?

from pixi-cull.

davidfig avatar davidfig commented on May 17, 2024

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):

  1. create and add all sprites to the viewport
  2. create a new cull (or remove old elements from cull)
  3. call addList to cull
  4. cull
  5. render

from pixi-cull.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.