Using PIXI JS with THREE #11138
Replies: 7 comments 1 reply
-
I figured it out: https://jsfiddle.net/kotp27x4/ |
Beta Was this translation helpful? Give feedback.
-
hey @nickyvanurk! This line:
will force Pixi to recreate the GPU reousrces each frame (without cleaning up the old ones). ideally we need to build a decent |
Beta Was this translation helpful? Give feedback.
-
here we go! #11142 |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! Even added a guide uh 🙏Will help a ton of people I'm sure. The current info online is severely outdated. |
Beta Was this translation helpful? Give feedback.
-
@GoodBoyDigital Is there a problem with the change you made? For me pixijs is unusable. It progressively gets more slow until it takes more than 2 seconds to render a frame. One thing that takes a lot of time is pixijs trying to get the width of the container for some reason (which I am not doing anywhere in my code). pixijs/src/scene/container/Container.ts Line 1033 in 9d177e2 And the render function itself takes even longer (2.5s or so with just 11 elements in the scene). I checked any problems in my own code but I have consistently just 11 elements in my pixijs scene so I really don't know what the problem could be, I suspect pixijs has a bug. Do you mind checking if something is wrong with pixi.js? As mentioned pixijs is unusable for me right now (you can try it out at http://everwilds.io/ press v to toggle nameplates. With nameplates turned on the game gets progressively slower). This is how I create my pixi scene and render it: |
Beta Was this translation helpful? Give feedback.
-
The scene is not growing it seems. You can try the devtools yourself at http://everwilds.io What seems to be odd is the size of the pixi.js scene seems to get changed whenever I change my three.js orbit controls camera angle. The size is also really huge which is strange. Could that be the source of the problem? Nothing else seems to indicate something growing. The only time I set the pixi.js renderer size is when I init it as seen in my previous screenshot |
Beta Was this translation helpful? Give feedback.
-
It seems the size of the scene gets changed depending on the location of the elements in the pixi scene. As my monsters are off-screen and still have a HUD the scene can get really big. When I move away to make sure the pixi scene is small that improved the render time by a lot. But that did not fix the slowdown issue. Doing a performance monitor really shows it's pixi that's the cause somehow. I even tried to remove the text HUD elements so it just shows the health bars. Note that this is all happening on a beefy laptop with a AMD Ryzen 9 7945HX and RTX 4070 |
Beta Was this translation helpful? Give feedback.
-
Hi! I am trying to use pixi to render the HUD in my game, but I use three.js for 3D graphics. How would I go about combining them? I found this (#7767) old discussion but the provided answer no longer works. I've gone through the pixi docs (v8) and experimented with different settings/function calls/classes but I can't figure it out by myself. Please help 😭
Beta Was this translation helpful? Give feedback.
All reactions