docs(eink): the two e-ink builds in the docs and the site's sim

Docs: the E-ink section describes the landscape and portrait builds, what
the tall screens add, and the settings, with three screenshots; the e-ink
build flags; the release file names. Sim: each orientation gets its own
factory, so a page can load both, and simEinkScale 0 leaves the canvas'
CSS size to the page. CI builds both into solo-sim-wasm.zip (wasm/eink/).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-02 21:38:38 +02:00
co-authored by Claude Opus 5.5
parent e16fe2c621
commit 13d099cf55
12 changed files with 60 additions and 22 deletions
+3 -3
View File
@@ -174,15 +174,15 @@ SimEinkDisplay::SimEinkDisplay()
}
// Sizes the page's canvas to the panel as it's turned, at Module.simEinkScale
// (default 3) CSS pixels a pixel.
// (default 3) CSS pixels a pixel; 0 leaves the CSS size to the page.
static void simEinkFitCanvas(int w, int h) {
EM_ASM({
var tag = (typeof Module !== 'undefined' && Module['simInstanceTag']) ? Module['simInstanceTag'] : '';
var c = document.getElementById(tag ? ('sim-canvas-' + tag) : 'sim-canvas');
if (!c) { console.error('[sim] e-ink canvas not found in the host page'); return; }
var k = Module.simEinkScale || 3;
var k = ('simEinkScale' in Module) ? Module.simEinkScale : 3;
c.width = $0; c.height = $1;
c.style.width = ($0 * k) + 'px'; c.style.height = ($1 * k) + 'px';
if (k) { c.style.width = ($0 * k) + 'px'; c.style.height = ($1 * k) + 'px'; }
Module.__simCtx = c.getContext('2d');
Module.__simCtx.imageSmoothingEnabled = false;
Module.__einkRefreshes = Module.__einkRefreshes || 0;