feat: cursor-steered headlights light the hero name, plates and world

This commit is contained in:
2026-10-11 05:07:05 +03:00
parent 52b4a1ad14
commit c9e6ac0f29
41 changed files with 1196 additions and 9 deletions

View File

@@ -167,6 +167,8 @@ export function createSceneController(options: SceneControllerOptions): SceneCon
try {
const frameStartedAt = scheduler.now();
const active = current;
const beam = options.sampleBeam?.(now);
if (beam) latestJourney.beam = { x: finite(beam.x), y: finite(beam.y), intensity: finite(beam.intensity) };
const complete = active.runtime.render(latestJourney, now) !== false;
const frameEndedAt = scheduler.now();
if (complete && current === active) {
@@ -589,6 +591,13 @@ function copyJourneySnapshot(snapshot: JourneySnapshot): JourneySnapshot {
? null
: finite(snapshot.sectionActivation.nextHeadingOffsetVh),
},
...(snapshot.beam === undefined ? {} : {
beam: {
x: finite(snapshot.beam.x),
y: finite(snapshot.beam.y),
intensity: finite(snapshot.beam.intensity),
},
}),
};
}