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

Changing Fill Color after element rendered #38

Open
khanzzirfan opened this issue Feb 24, 2023 · 1 comment
Open

Changing Fill Color after element rendered #38

khanzzirfan opened this issue Feb 24, 2023 · 1 comment

Comments

@khanzzirfan
Copy link

Hi, How to change the SVG fill and stroke after object rendered? tried this way but didn't update any fill color.

svgObject.beginFill(0xf1c40f)
svgObject.endFill();

https://codesandbox.io/s/pixijs-examples-events-hit-test-forked-f9ttqe

@bigtimebuddy
Copy link
Owner

This is a limitation of Graphics in Pixi. There's no way to modify the fill color after drawing. You have to redraw the shape. Optionally, you can use tint, but that may not render what you want.

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

No branches or pull requests

2 participants