fix
This commit is contained in:
parent
7e3af3df85
commit
4d25edd118
@ -967,23 +967,3 @@ function drawRobot(ctx: CanvasRenderingContext2D, pen: MapPen): void {
|
|||||||
ctx.restore();
|
ctx.restore();
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region 辅助函数
|
|
||||||
function calcLinePoint(p1: Point, p2: Point, t: number): Point {
|
|
||||||
const x = p1.x + (p2.x - p1.x) * t;
|
|
||||||
const y = p1.y + (p2.y - p1.y) * t;
|
|
||||||
return { x, y };
|
|
||||||
}
|
|
||||||
|
|
||||||
// function calcBezierPoint(points: Point[], t: number): Point {
|
|
||||||
|
|
||||||
// while (pts.length > 1) {
|
|
||||||
// const nextPts = [];
|
|
||||||
// for (let i = 0, size = pts.length - 1; i < size; i++) {
|
|
||||||
// nextPts.push(lerp(pts[i], pts[i + 1], t));
|
|
||||||
// }
|
|
||||||
// pts = nextPts;
|
|
||||||
// }
|
|
||||||
// return pts[0];
|
|
||||||
// }
|
|
||||||
//#endregion
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user