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

Implement Clipper external library wrapper to GDScript #22275

Closed
TotCac opened this issue Sep 20, 2018 · 2 comments · Fixed by #28987
Closed

Implement Clipper external library wrapper to GDScript #22275

TotCac opened this issue Sep 20, 2018 · 2 comments · Fixed by #28987

Comments

@TotCac
Copy link

TotCac commented Sep 20, 2018

I saw that clipper library was added to external libraries. It seems to be used in Sprite for example.
Is it possible to write a wrapper to allow usage directly in GDSript?

It will allow polygon union, intersection, etc.... in 2D

Issue related #6740

Godot version:
3.2

OS/device including version:
All

Issue description:
N/A

Steps to reproduce:
N/A

Minimal reproduction project:
N/A

@Xrayez
Copy link
Contributor

Xrayez commented Sep 20, 2018

I could work on that, having dealt with Clipper for about one year now for the game I'm making.

See my WIP Clipper module for Godot (well basically working but needs testing):

https://github.com/Xrayez/godot-clipper

Note that it's not 6.4.2 which is present in Godot's source currently. The code is taken from Angus Johnson's new Clipper2 (beta but looks stable), which adds additional features like polygon triangulation along with boolean operations.

I just wonder what are the requirements to make it more Godot-friendly, and possibly other implementation would be more suitable, currently I just combined the three modules into one: polygon clipping, offsetting and triangulating.

@TotCac
Copy link
Author

TotCac commented Sep 20, 2018

We need @akien-mga or @reduz advice for that i suppose. Perhaps you could join them on irc dev to discuss that.
Sorry I am not a big help ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants