Comments (8)
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.
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.
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.
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.
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.
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.
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
?
from pixi-cull.
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):
- create and add all sprites to the viewport
- create a new cull (or remove old elements from cull)
- call addList to cull
- cull
- render
from pixi-cull.
Related Issues (20)
- Performance degraded with higher number of culled elements HOT 2
- Adding Types to pixi-cull HOT 1
- Example using SpatialHash? HOT 3
- Import without Node.js HOT 4
- SpatialHash loses followed sprite and is always dirty HOT 8
- [Feature] cull() callback HOT 5
- Sprites & BItmapTexts that are rotated are made invisible too soon and visible not early enough HOT 3
- Cannot read property 'Cull' of undefined HOT 3
- How to handle local coordinates? HOT 2
- Not too sure how to add it HOT 1
- Source code for live example?
- Does it cull recursively? (Children of children?)
- Code for live example throws error when clicking inside canvas HOT 3
- Support Pixi v7 HOT 1
- True or false?
- Do I need to do something special when I resize the window? HOT 4
- Cannot find name 'viewport' with ES6 import HOT 4
- TypeError: Cannot read property 'x' of undefined HOT 9
- Culling seems not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixi-cull.