Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Small ellipse is not smooth, When a large scale transform is applied to the container #10495

Closed
F-star opened this issue Apr 29, 2024 · 2 comments
Labels
👍 Not A Bug Verified issue and is working as intended.

Comments

@F-star
Copy link

F-star commented Apr 29, 2024

Current Behavior

Small ellipse is not smooth, When a large scale transform is applied to the container, but also rounded rectangle.

smooth

Expected Behavior

be smooth

Steps to Reproduce

const container = new PIXI.Container()
container.setFromMatrix(
    new PIXI.Matrix().scale(78, 78)
)

const ellipseGraphics = new PIXI.Graphics().ellipse(3, 3, 6, 6).stroke();

container.addChild(ellipseGraphics)

Environment

Possible Solution

Maybe we should generate more segments when scale is large.

Additional Information

No response

@bigtimebuddy
Copy link
Member

This is working as intended. All curves need to be triangulated like this. But Pixi also draws curves adaptively (based on how large the curve is). The suggestion here is either to 1) draw the curve at the largest size and scale down, or 2) adjust the adaptive curve settings to your desired needs. There is performance cost in rendering too many points which is why we don't do it by default.

@bigtimebuddy bigtimebuddy added the 👍 Not A Bug Verified issue and is working as intended. label Apr 29, 2024
@F-star
Copy link
Author

F-star commented May 14, 2024

OK, thank you!

@F-star F-star closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 Not A Bug Verified issue and is working as intended.
Projects
None yet
Development

No branches or pull requests

2 participants