feat: cursor-steered headlights light the hero name, plates and world
This commit is contained in:
@@ -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),
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user