Open
Conversation
this shows the difference in having the x and y set to be different things, both should be circles, but before the particle scale bug fix, one is an oval as they are not expanding in the correct scale. works without any other changes to fxgl
showing the corrected variable in both, allowing particle scale in intermediate samples to work and demonstrate the need of the change, and the effects of the bug fix
Added comments to clarify the behavior of particle scaling and its effect on positioning.
Removed the 'corrected' boolean field and its setter method. Simplified the scaling calculations by removing unnecessary comments and logic related to 'corrected'.
…eSample.java deleted first sample, as corrected functionality gone from both particle and particle emitter.
Removed the corrected field and its setter method from ParticleEmitter.
Removed the conditional setting of corrected flag for emitted particles.
AlmasB
reviewed
Apr 13, 2026
Owner
AlmasB
left a comment
There was a problem hiding this comment.
Thanks for this. Your IDE may have added extra changes, which should not be part of this PR. Please can you check below.
fxgl-entity/src/main/java/com/almasb/fxgl/particle/Particle.java
Outdated
Show resolved
Hide resolved
fxgl-entity/src/main/java/com/almasb/fxgl/particle/Particle.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixing issues #1412 - Particle Bug
the initial error line:
var sx = (scaleOrigin.x + x - entityScale.x * (scaleOrigin.x + x)) + entityScale.y * x;
has been changed to:
var sx = (scaleOrigin.x + x - entityScale.x * (scaleOrigin.x + x)) + entityScale.x * x;
Sample code is also included to show this works.