pixijs / pixi-react

Write PIXI apps using React declarative style
https://pixijs.io/pixi-react/
MIT License
2.33k stars 177 forks source link

Use of SmoothGraphics #349

Closed Thel27 closed 2 years ago

Thel27 commented 2 years ago

Description

Hello ! First of all, a big thanks for this library. It's really cool ! For the context : I'm a young student currently working in internship in a startup and I'm making a DXF file editor with Pixi using your library. I use PixiViewport that I integrate in my app like in your codepen I would like to have very thin line like in this example of SmoothGraphics plugin.

Because as you can see : image My lines aren't really thin and precise.

Is it hard to add ? I think I can "bypass" my problem by adding SmoothGraphics lines directly in the app stage like in the example above but It doesn't sound really clean.

Maybe I missunderstood one thing and I can already have this type of lines with your lib ?

(Sorry for my bad english, I'm still learning)

Additional info

inlet commented 2 years ago

Hi @Thel27,

You can achieve this with custom components, just create a custom component that creates a PIXI.smooth.SmoothGraphics component and you're set 😁

Thel27 commented 2 years ago

Hi, thanks for the respond. I just can't use GraphicSmooth anyway because it's not available on pixi js v5. I just realized that, dumb me.

Sorry for this issue.