listpool根据type划分池

This commit is contained in:
yhh
2021-08-06 11:10:45 +08:00
parent 0beadf8e5a
commit f533186c8d
10 changed files with 71 additions and 51 deletions

View File

@@ -76,7 +76,7 @@ module es {
*/
public static getOptimizedDrawingPoints(start: Vector2, firstCtrlPoint: Vector2, secondCtrlPoint: Vector2,
end: Vector2, distanceTolerance: number = 1) {
let points = ListPool.obtain<Vector2>();
let points = ListPool.obtain<Vector2>(Vector2);
points.push(start);
this.recursiveGetOptimizedDrawingPoints(start, firstCtrlPoint, secondCtrlPoint, end, points, distanceTolerance);
points.push(end);