diff --git a/src/animation.ts b/src/animation.ts index dbfa8f0..23ab30f 100644 --- a/src/animation.ts +++ b/src/animation.ts @@ -136,7 +136,7 @@ export function renderCommitManGif( throw new Error("At least one contribution day is required."); } - const cellSize = options.cellSize ?? 10; + const cellSize = options.cellSize ?? 12; const gap = options.gap ?? 3; const padding = options.padding ?? 16; const frameDelayMs = options.frameDelayMs ?? DEFAULT_FRAME_DELAY_MS; diff --git a/tests/animation.test.ts b/tests/animation.test.ts index 94ad61f..fbb0b16 100644 --- a/tests/animation.test.ts +++ b/tests/animation.test.ts @@ -115,12 +115,23 @@ test("renders a valid, looping GIF with the expected dimensions", () => { const width = gif[6]! | (gif[7]! << 8); const height = gif[8]! | (gif[9]! << 8); - assert.equal(width, 42); - assert.equal(height, 120); + assert.equal(width, 44); + assert.equal(height, 134); assert.ok(gif.byteLength > 100); assert.equal(gif[gif.length - 1], 0x3b); }); +test("defaults to the same 12px cell size and 3px gap as Snake", () => { + const defaultGif = renderCommitManGif(sampleDays); + const snakeSizedGif = renderCommitManGif(sampleDays, { + cellSize: 12, + gap: 3, + padding: 16, + }); + + assert.deepEqual(defaultGif, snakeSizedGif); +}); + test("uses a slower default frame delay of 70ms", () => { const defaultTiming = renderCommitManGif(sampleDays); const explicitTiming = renderCommitManGif(sampleDays, { frameDelayMs: 70 });