Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3393315

Browse files
committed
fmt
1 parent 3c0cbd4 commit 3393315

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

‎demo/example.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {CanvasKeyframe, canvasPath, wigglePreset} from "../public/animate";
2-
import {drawDebugClosed, drawPoint} from "./internal/canvas";
2+
import {drawDebugClosed, drawPoint} from "./internal/canvas";
33
import {colors} from "./internal/layout";
44

55
// Fetch reference to example container.
@@ -40,7 +40,7 @@ const renderFrame = () => {
4040
if (p.length) drawPoint(ctx, p[0], 400);
4141

4242
const fps = 5;
43-
setTimeout(() => requestAnimationFrame(renderFrame), 1000/fps);
43+
setTimeout(() => requestAnimationFrame(renderFrame), 1000/fps);
4444
return;
4545
}
4646

‎demo/internal/canvas.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,27 +121,20 @@ export const drawDebugClosed = (ctx: CanvasRenderingContext2D, points: Point[],
121121
const next = nextFn();
122122
const currHandle = expandHandle(curr, curr.handleOut);
123123
const nextHandle = expandHandle(next, next.handleIn);
124-
124+
125125
drawLine(ctx, curr, currHandle, size);
126126
drawLine(ctx, next, nextHandle, size, 2);
127127
drawPoint(ctx, currHandle, size * 1.4);
128128
drawPoint(ctx, nextHandle, size * 1.4);
129129
const curve = new Path2D();
130130
curve.moveTo(curr.x, curr.y);
131-
curve.bezierCurveTo(
132-
currHandle.x,
133-
currHandle.y,
134-
nextHandle.x,
135-
nextHandle.y,
136-
next.x,
137-
next.y,
138-
);
139-
ctx.lineWidth = sizes().pt * size*2;
131+
curve.bezierCurveTo(currHandle.x, currHandle.y, nextHandle.x, nextHandle.y, next.x, next.y);
132+
ctx.lineWidth = sizes().pt * size * 2;
140133
ctx.stroke(curve);
141134
drawPoint(ctx, curr, size * 1.1);
142135
drawPoint(ctx, next, size * 1.1);
143136
});
144-
}
137+
};
145138

146139
export const drawOpen = (
147140
ctx: CanvasRenderingContext2D,

‎internal/animate/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const statefulAnimationGenerator = <K extends CallbackKeyframe, T>(
6060
}
6161

6262
return renderOutput.points;
63-
}
63+
};
6464

6565
const renderFrame = (): T => {
6666
return renderer(renderPoints());

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /