godotengine / godotengine/godot-docs
draw_primitive () information incomplete.
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
v4.0.2.stable.official [7a0977ce2]
The "uvs" parameter of draw_primitive () isn't even mentioned in the documentation and furthermore should only apply when the "texture" argument is valid. It makes no sense that the "texture" argument has a default of null but the "uvs" argument doesn't have a default of an empty array, but that's a code issue.
It should be documented that the "colors" and "uvs" arguments can be empty arrays or have fewer elements than the "points" array. The function will copy across as much as is specified. If the "colors" array is empty, the function will output white and for every point without a corresponding color entry (when the "colors" array isn't empty), the first color specified in the "colors" array is used instead.
https://docs.godotengine.org/en/stable/classes/class_canvasitem.html#class-canvasitem-method-draw-primitive
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.