From 8d0a46e7f51c99e02662c04a0fcfcd3331aa2b41 Mon Sep 17 00:00:00 2001 From: 3dtours Date: Fri, 2 Oct 2026 19:54:42 +0700 Subject: [PATCH] fix(frame): give OLD FILM PORTRAIT a real portrait output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sheet was stretched over the visitor's frame, so the portrait variant only turned the paper inside whatever shape the photo had: a landscape photo stayed landscape. The film now has its own opening like the walls do — the frame is scaled up to the photo, the photo is cover-cropped into the whole sheet, and `old-film-portrait` is the PNG turned 90° CW, so the pair is one frame standing and one lying. The torn edge has no straight sides, so the photo runs under all of it instead of being cut against a measured window. --- docker/frontend/src/engine/exportEngine.ts | 75 +++++++++++++++------- 1 file changed, 53 insertions(+), 22 deletions(-) diff --git a/docker/frontend/src/engine/exportEngine.ts b/docker/frontend/src/engine/exportEngine.ts index dfbab1b..9412181 100644 --- a/docker/frontend/src/engine/exportEngine.ts +++ b/docker/frontend/src/engine/exportEngine.ts @@ -765,11 +765,13 @@ function loadWallframe(assets: RenderAssets) { } // Both films are the same sheet of distressed paper: `old-film` lays it down as -// it is, `old-film-portrait` turns it 90° CW so the torn edge and the dust lie -// the other way round. Unlike the walls the sheet has no mat of its own — its -// middle is a transparent window and its opaque part is a border a couple of -// percent wide — so it is drawn OVER the photo and never crops it. +// it is, `old-film-portrait` turns it 90° CW, so the pair is one frame standing +// and one lying — the same two shapes the walls offer, in a sheet whose middle +// is a transparent window a couple of percent of paper wide around it. const isOldFilm = (id: FrameId) => id === 'old-film' || id === 'old-film-portrait'; +// A frame that carries its own opening: the aspect chip has nothing to say to +// it (both walls, both films). +const hasOwnAspect = (id: FrameId) => isWallframe(id) || isOldFilm(id); function loadOldFilm(assets: RenderAssets) { if (oldFilmImage) return oldFilmImage; @@ -812,10 +814,10 @@ export async function renderPhoto(input: RenderInput): Promise