daleblackwood / goshapes

Intuitive path-based level editing for Godot 4
MIT License
151 stars 16 forks source link

Feature/add round edges option #42

Closed GGAlanSmithee closed 1 month ago

GGAlanSmithee commented 1 month ago

copied from #19, rebased

fixes #18 by adding the option to either round edges, or not.

see #18 for context, and the video below for results.

_IMO having set_edges=false as a default makes more sense (at least for *WallShapers) but that would be a breaking change, so I set the default to true._

https://github.com/user-attachments/assets/1b4e21ec-3cdf-4d47-8176-e5baeb5e4660

daleblackwood commented 1 month ago

Thanks for this, I really like the idea - I'm wondering if your previous option for turning turning rounding off and this could be rolled into one with a round_mode enum.

Something like:

enum RoundingMode { Auto, Ignore_Edges, Off }
var rounding_mode := RoundingMode.Auto
GGAlanSmithee commented 1 month ago

the enum solution is much better - I will update the PR.

GGAlanSmithee commented 1 month ago

I made the requested change. I used a "local enum" (not too familiar with GDScript enums) which makes them quite verbose (PathOptions.RoundingMode.Ignore_Edges), let me know if you prefer a global enum instead @daleblackwood