Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updated PixiRenderer to v8#110

Open
rafucuk wants to merge 15 commits into
drawcall:master from
rafucuk:pixi-updates
Open

Updated PixiRenderer to v8 #110
rafucuk wants to merge 15 commits into
drawcall:master from
rafucuk:pixi-updates

Conversation

@rafucuk

@rafucuk rafucuk commented Mar 7, 2025
edited
Loading

Copy link
Copy Markdown

This is an early prototype, please use with caution.

@rafucuk rafucuk marked this pull request as draft March 7, 2025 16:58

rafucuk commented Mar 8, 2025

Copy link
Copy Markdown
Author

I am planning to use ParticleContainer

rafucuk commented Mar 14, 2025

Copy link
Copy Markdown
Author

added "particlecontainer" to usage
added batching and texturecaching for optimizing

drawcall reacted with thumbs up emoji

Copy link
Copy Markdown
Owner

Oh, thank you very much. merge it later. a bit busy now.

rafucuk commented Mar 14, 2025

Copy link
Copy Markdown
Author

I readded batching and caching and particlecontainer, it lags at around 50k particles, needs optimizing.

drawcall reacted with eyes emoji

rafucuk commented Mar 14, 2025

Copy link
Copy Markdown
Author

I will reopen this PR from draft when I done with optimizations. I believe we can get more performance with more particles.

rafucuk commented Mar 14, 2025

Copy link
Copy Markdown
Author

critical issue;

colors (and probably other behaviours too) uses old pooled particles too when using default particles, will fix soon

rafucuk commented Mar 14, 2025

Copy link
Copy Markdown
Author

I fixed the issue with using EmitterAwarePool;

Store Emitter ID during the "onParticleCreated" method and store emitter ID directly on particle "particle.__emitterId"
Check null parents, particle.parent might be null
Fallback to "orphaned", if a particle somehow loses its parent reference and doesnt have a stored emitter ID, added "orphaned" so code doesn't crash

rafucuk commented Mar 14, 2025

Copy link
Copy Markdown
Author

Currently added features;

Added new renderer options

 this.options = {
 useParticleContainer: true,
 autoResize: true,
 scale: 1,
 maxParticles: 10000,
 properties: {
 position: true,
 rotation: true,
 scale: true,
 uvs: true,
 alpha: true
 },
 ...options
 };

Now uses particle containers as default,
Particles are now texture-based,
Automatically routes particles to the appropriate container based on their type,
Automatically converts circle graphics to texture-based sprites when ParticleContainer is enabled.

Maintains compatibility with v7 by defaulting original behavior (WIP, not intended to work well)
Rebuilds containers when needed

Added thorough cleanup for all resources (textures, containers)
More robust parent-child relationship handling during removal

Improved error checking throughout the code

rafucuk commented Mar 14, 2025

Copy link
Copy Markdown
Author

I rewrote the whole code to figure-out whats wrong with emitters using old/deleted particles, I fixed it (magic idk how), and I tried to add full backwards comp. Will try to add performance fixes later but currently this handles particles well, but as always can be better

@rafucuk rafucuk marked this pull request as ready for review March 14, 2025 21:12

Copy link
Copy Markdown
Owner

Oh, I've been quite busy lately, so I may not be able to respond to you immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /