From a62d1d0faff6e65dee9000a0b1c165b17cd1707a Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Sun, 11 Oct 2026 13:40:43 +0200 Subject: [PATCH] Give e2e 66 its own lane so the video sprite is not covered (#406) In the full suite e2e 66f saw the same purple #cc00f4 fourteen times instead of the clip's green and blue. Alone the module was green. The video sprite stood at (0, 0), and there earlier modules keep objects on purpose that later modules still need. Every other module has its own lane for that reason, only 66 had none. - scaffold.mjs: new lane `video` at y -7000. - 66-video.mjs: the sprite and lookAt use that lane, and the cleanup looks back at (0, 0) like the other lane modules do. Found with a diagnosis in a full run on melektaus-atx: under the sprite's centre lay o3, otex (z 900) and filler40 to filler1 (z 5) from e2e 10 to 12, only then vd66-object. Beside them the sprite showed green as it should. The purple is otex's texture in the state later modules leave it in. It has nothing to do with video seeking: task 645 saw the same colour while seeking was still broken. Tests: - e2e 10-12 + 66, old state (melektaus-atx): 66f FAIL, otex in front - e2e 10-12 + 66, with the fix: ALL PASSED, 81 checks, 66f sees #00ff01 and #0000ff - Prettier, eslint: clean Co-Authored-By: Claude Opus 5.5 --- tools/e2e/66-video.mjs | 10 ++++++---- tools/e2e/lib/scaffold.mjs | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/e2e/66-video.mjs b/tools/e2e/66-video.mjs index a185d378..779f3c8a 100644 --- a/tools/e2e/66-video.mjs +++ b/tools/e2e/66-video.mjs @@ -1,6 +1,6 @@ import { readFileSync } from 'node:fs'; import { uploadVideo } from '../lib/projects.mjs'; -import { MAKE_OBJECT, pickAssetType } from './lib/scaffold.mjs'; +import { LANES, MAKE_OBJECT, pickAssetType } from './lib/scaffold.mjs'; /** * Videos (#402). A WebM goes up and the worker turns it into an MP4 (in CI beside the PHP server, @@ -16,6 +16,7 @@ import { MAKE_OBJECT, pickAssetType } from './lib/scaffold.mjs'; */ const SPRITE = 'vd66-sprite'; const OBJECT = 'vd66-object'; +const LANE = LANES.video; const COLORS = { red: '#fe0000', green: '#00ff01', blue: '#0000ff', white: '#ffffff' }; export async function video(t) { @@ -201,9 +202,9 @@ export async function video(t) { const scene = __gm.state.activeScene; ${MAKE_OBJECT} p.assets.unshift({ id: '${SPRITE}', type: 'sprite', name: '${SPRITE}', props: { width: 320, height: 180, color: 0xffffff, texture: ${JSON.stringify(clip.id)}, shader: '' } }); - scene.objects.push(make('${OBJECT}', '${SPRITE}', '', 0, 'video')); + scene.objects.push(make('${OBJECT}', '${SPRITE}', '', ${LANE}, 'video')); __gm.state.select(null); - __gm.lookAt(0, 0);`); + __gm.lookAt(0, ${LANE});`); await waitFor( () => json('__gm.videos()'), (players) => players.some((p) => p.ready), @@ -268,5 +269,6 @@ export async function video(t) { const p = __gm.state.project; for (const holder of p.assets) if (holder.objects) holder.objects = holder.objects.filter((o) => o.id !== '${OBJECT}'); p.assets = p.assets.filter((a) => a.id !== '${SPRITE}' && a.id !== ${JSON.stringify(assetId)}); - __gm.state.select(null);`); + __gm.state.select(null); + __gm.lookAt(0, 0);`); } diff --git a/tools/e2e/lib/scaffold.mjs b/tools/e2e/lib/scaffold.mjs index 55bc1b38..1ea1bb54 100644 --- a/tools/e2e/lib/scaffold.mjs +++ b/tools/e2e/lib/scaffold.mjs @@ -30,6 +30,7 @@ export const LANES = { eyedropper: -5800, containerReference: -6200, nestedReference: -6600, + video: -7000, }; /**