From 1cc948a85c9f881dee43511e4da3f266b4e04c85 Mon Sep 17 00:00:00 2001 From: flop Date: Wed, 13 May 2026 13:40:50 +0200 Subject: [PATCH] feat: updated config --- ts/index.html | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/ts/index.html b/ts/index.html index b106b67..d5ba974 100644 --- a/ts/index.html +++ b/ts/index.html @@ -135,13 +135,14 @@ label: "Blink (animation)", make() { return new MonoDisplayFile({ - width: W, height: H, elements_always: [{ type: ElementType.Animation, width: W, height: H, + // updateInterval: 0 = advance every tick (25fps → ~400ms/frame at fps=25 with 2 frames) + updateInterval: 12, // every 13 ticks ≈ 500ms per frame at 25fps frames: [ - { pixels: new Uint8Array(W * H).fill(1), durationMs: 200 }, - { pixels: new Uint8Array(W * H).fill(0), durationMs: 200 }, + { pixels: new Uint8Array(W * H).fill(1) }, + { pixels: new Uint8Array(W * H).fill(0) }, ], }], }).toBuffer(); @@ -151,7 +152,12 @@ label: "Text (centered)", make() { return new MonoDisplayFile({ - elements_always: [{ type: ElementType.Text, text: "Hello, World!", align: 1 }], + elements_always: [{ + type: ElementType.ClippedText, + text: "Hello, World!", + xOffset: 0, yOffset: 32, + width: W, height: 16, + }], }).toBuffer(); }, }, @@ -160,10 +166,12 @@ make() { return new MonoDisplayFile({ elements_always: [{ - type: ElementType.ScrollText, + type: ElementType.HScrollText, text: "MONO DISPLAY — scrolling ticker — 🚀 ", - speedPps: 80, - direction: 0, + xOffset: 0, yOffset: 32, + width: W, height: 16, + scrollSpeed: 50, // (50+1)/16 ≈ 3.2 px/tick at 25fps ≈ 80px/s + flags: { endless: true, invertDirection: false }, }], }).toBuffer(); },