Open ODtian opened 1 year ago
Thank you for the heads up! I haven't had time to try Godot 4.0.
FYI: I just updated my "ClickableMap" demo including the Delaunator script to work with Godot 4.0: https://github.com/t-karcher/ClickableMap
Feel free to copy the script from this project back here. (I don't want to open a pull request because you'll also have to update you the rest of the project to make it work, and the 4.0 version is not backward compatible with 3.x)
Godot4 array api has changed a lot, and the meaning of
end
param inslice
method has changed, which is the inclusive index previously and now is the exclusive index, same as the original javascript lib.In this case, line 295-296 should be
otherwise you will got a non-3-multiply length array
.triangles
, which is invild.