1
0
Fork 0

Merge pull request #102684 from axewizardbgg/doc-bitmappolygons

[3.x] Docs: Add description for `BitMap.opaque_to_polygons` method
This commit is contained in:
lawnjelly 2025-02-11 11:11:50 +00:00 committed by GitHub
commit 9ce78ca5c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@
<argument index="0" name="rect" type="Rect2" />
<argument index="1" name="epsilon" type="float" default="2.0" />
<description>
Generates polygon outlines from the opaque (non-transparent) areas of the [BitMap] using a Marching Squares algorithm.
Returns an [Array] of [PoolVector2Array], where each [PoolVector2Array] represents a polygon outline. These outlines can be directly assigned to the [code]polygon[/code] property of nodes like [CollisionPolygon2D] or [OccluderPolygon2D].
The [code]epsilon[/code] parameter controls polygon simplification. A lower value produces more accurate polygons, but at the cost of increased polygon size and potential performance impact. A higher value simplifies the polygons, reducing their size and improving performance, but with less accuracy.
</description>
</method>
<method name="resize">