Skip to content

Commit beab08b

Browse files
authored
Update earcut to 3.0.2 (#1131)
1 parent 0f972ac commit beab08b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

starling/src/starling/utils/Earcut.as

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ package starling.utils
5858
{
5959
/**
6060
* An ActionScript 3.0 port of the Earcut ear-clipping tesselation library by Mapbox
61-
* Original Library: https://github.com/mapbox/earcut/releases/tag/v3.0.1
61+
* Original Library: https://github.com/mapbox/earcut/releases/tag/v3.0.2
6262
*/
6363
public final class Earcut
6464
{
@@ -88,10 +88,10 @@ package starling.utils
8888

8989
// if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox
9090
if (vertices.length > 80 * dimensions) {
91-
minX = Infinity;
92-
minY = Infinity;
93-
var maxX:Number = -Infinity;
94-
var maxY:Number = -Infinity;
91+
minX = vertices[0];
92+
minY = vertices[1];
93+
var maxX:Number = minX;
94+
var maxY:Number = minY;
9595

9696
for (var i:int = dimensions; i < outerLen; i += dimensions) {
9797
const x:Number = vertices[i];

0 commit comments

Comments
 (0)