Sfoglia il codice sorgente

Merge pull request #102684 from axewizardbgg/doc-bitmappolygons

[3.x] Docs: Add description for `BitMap.opaque_to_polygons` method
lawnjelly 6 mesi fa
parent
commit
9ce78ca5c2
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      doc/classes/BitMap.xml

+ 3 - 0
doc/classes/BitMap.xml

@@ -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">