mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-10-09 11:45:24 +00:00
[engine] [cocos2d-x] [jsb-adapter] 适配引擎 v2.4.10 版本
This commit is contained in:
@@ -68,14 +68,14 @@ function ConvexPartition(vertices) {
|
||||
var list = [];
|
||||
var d, lowerDist, upperDist;
|
||||
var p;
|
||||
var lowerInt = cc.v2();
|
||||
var upperInt = cc.v2(); // intersection points
|
||||
var lowerInt = null;
|
||||
var upperInt = null; // intersection points
|
||||
var lowerIndex = 0, upperIndex = 0;
|
||||
var lowerPoly, upperPoly;
|
||||
|
||||
for (var i = 0; i < vertices.length; ++i) {
|
||||
if (Reflex(i, vertices)) {
|
||||
lowerDist = upperDist = 10e7; // std::numeric_limits<qreal>::max();
|
||||
lowerDist = upperDist = Number.MAX_SAFE_INTEGER || 9999999999999; // std::numeric_limits<qreal>::max();
|
||||
for (var j = 0; j < vertices.length; ++j) {
|
||||
// if line intersects with an edge
|
||||
if (Left(At(i - 1, vertices), At(i, vertices), At(j, vertices)) &&
|
||||
|
Reference in New Issue
Block a user