Skip to content

Comments

feat: add particle emitter system#1492

Merged
yuto-trd merged 3 commits intomainfrom
yuto-trd/particle-system
Feb 23, 2026
Merged

feat: add particle emitter system#1492
yuto-trd merged 3 commits intomainfrom
yuto-trd/particle-system

Conversation

@yuto-trd
Copy link
Member

Description

Adds a particle emitter system to Beutl, including a ParticleEmitter drawable with configurable emitter shape, emission rate, lifetime, velocity, physics (gravity, air resistance, turbulence), visual properties (size, color, opacity), and rotation. Also includes ParticleSimulator for CPU-based simulation, ParticleRenderNode for rendering, and ParticleEmitterOperator for integration as a source operator. All properties are localized in English and Japanese.

Breaking changes

None.

Fixed issues

- Add ParticleEmitter drawable with physics, emission, velocity, visual, and rotation properties
- Add ParticleEmitterOperator source operator
- Register ParticleEmitter in LibraryService
- Add localization strings for all particle emitter properties (en/ja)
Copilot AI review requested due to automatic review settings February 20, 2026 17:16
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 033e2441ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive particle emitter system to Beutl, including CPU-based particle simulation with checkpoint caching for efficient timeline scrubbing, configurable emitter shapes, physics simulation (gravity, air resistance, turbulence), and visual customization. The implementation follows established codebase patterns for Drawables and Operators, with full English and Japanese localization.

Changes:

  • Added particle system core classes (ParticleEmitter, ParticleSimulator, ParticleRenderNode, Particle struct, EmitterShape enum)
  • Integrated particle emitter as a source operator with property exposure
  • Added comprehensive localization for all particle emitter properties in English and Japanese

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ParticleEmitter.cs Drawable class with 30+ properties for particle configuration grouped into Emitter, Emission, Velocity, Physics, Visual, Rotation, and Over Life categories
ParticleSimulator.cs CPU-based simulator with fixed timestep (60 FPS), checkpoint caching every 0.5s, and support for multiple emitter shapes
ParticleRenderNode.cs Rendering node that caches particle drawable to render target and draws all particles with transforms, opacity, and color modulation
Particle.cs Struct containing particle state (position, velocity, rotation, size, color, opacity, lifetime)
EmitterShape.cs Enum defining Point, Line, Circle, and Box emitter shapes
ParticleEmitterOperator.cs Operator exposing all particle emitter properties with appropriate default values
LibraryRegistrar.cs Registration of particle emitter in library service
Strings.resx, Strings.ja.resx, Strings.Designer.cs Localization resources for all particle emitter properties
Files not reviewed (1)
  • src/Beutl.Language/Strings.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Fix RNG desynchronization: replace AdvanceRng with CountingRandom that
  stores RNG call count in checkpoints for exact state restoration
- Bound checkpoint cache growth with MaxCheckpoints=120 to prevent
  unbounded memory usage on long timelines
- Fix particle bounds calculation to use conservative square bounding
  box that accounts for rotation
@github-actions
Copy link
Contributor

No TODO comments were found.

@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
Beutl.Operators 2% 0% 210
Beutl.Editor 82% 76% 870
Beutl.Core 39% 36% 2966
Beutl.Engine 20% 19% 13925
Beutl.Threading 98% 86% 122
Beutl.Utilities 73% 67% 358
Beutl.Configuration 39% 19% 290
Beutl.Extensibility 14% 16% 100
Beutl.ProjectSystem 12% 6% 2968
Beutl.Language 0% 20% 982
Summary 24% (13218 / 54908) 23% (3655 / 15749) 22791

Minimum allowed line rate is 0%

@yuto-trd yuto-trd merged commit cdf45dc into main Feb 23, 2026
4 checks passed
@yuto-trd yuto-trd deleted the yuto-trd/particle-system branch February 23, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant