feat: overhead gantry top bar with a docking sign window
The top bar becomes a steel gantry. Its centre window is a mask cut-out the 3D exit sign docks into; between signs the window shows the dash read-out. The drive controls move into the right bay, and the reading viewport is clipped at the beam, so the empty band under the bar is gone.
This commit is contained in:
@@ -8,7 +8,6 @@ import { createHorizonAir } from '@/scene/world/horizon-air';
|
||||
import { createExpressway } from '@/scene/world/expressway';
|
||||
import { createDistricts } from '@/scene/world/districts';
|
||||
import { createSignStage } from '@/scene/world/sign-stage';
|
||||
import { usesRoadsideSign } from '@/scene/world/sign-layout';
|
||||
import { createSpeedWake } from '@/scene/world/speed-wake';
|
||||
import { createRoad } from '@/scene/world/road';
|
||||
import { createTerrain } from '@/scene/world/terrain';
|
||||
@@ -175,7 +174,6 @@ export async function createProceduralSceneGeneration(
|
||||
let disposed = false;
|
||||
let renderedFrames = 0;
|
||||
let atmosphericTime = 0;
|
||||
let signCameraWeight = 0;
|
||||
let overdrive = 0;
|
||||
let terrainSurge = 0;
|
||||
let musicPulse = 0;
|
||||
@@ -186,6 +184,7 @@ export async function createProceduralSceneGeneration(
|
||||
let introProgress: number | null = null;
|
||||
let introFrames = 0;
|
||||
let introSlowFrames = 0;
|
||||
let gantryState = '';
|
||||
|
||||
const resize = (): void => {
|
||||
const nextWidth = Math.max(1, canvas.clientWidth || canvas.width || 1);
|
||||
@@ -427,23 +426,11 @@ export async function createProceduralSceneGeneration(
|
||||
// The document stays native. Only the rendered lens eases to the chapter's safe zone.
|
||||
const cameraX = wideComposition ? composition.x : 0;
|
||||
const targetX = 0;
|
||||
const signTarget =
|
||||
usesRoadsideSign(width, height) && snapshot.sign !== null
|
||||
? snapshot.sign.phase === 'depart'
|
||||
? 1 - snapshot.sign.progress
|
||||
: 1
|
||||
: 0;
|
||||
signCameraWeight +=
|
||||
(signTarget - signCameraWeight) * (1 - Math.exp(-deltaSeconds / 0.48));
|
||||
const targetShift =
|
||||
height < 560 && width >= 768
|
||||
? 0.22
|
||||
: wideComposition
|
||||
? THREE.MathUtils.lerp(
|
||||
composition.shift,
|
||||
composition.shift * 0.28,
|
||||
signCameraWeight,
|
||||
)
|
||||
? composition.shift
|
||||
: 0;
|
||||
const targetVerticalShift = wideComposition
|
||||
? 0
|
||||
@@ -558,14 +545,12 @@ export async function createProceduralSceneGeneration(
|
||||
camera.updateProjectionMatrix();
|
||||
}
|
||||
const stage = signStage.update(width, height);
|
||||
sign.compose(
|
||||
camera,
|
||||
width,
|
||||
height,
|
||||
stage.navigationBottom,
|
||||
now,
|
||||
car.group.position,
|
||||
);
|
||||
sign.compose(camera, width, height, stage.dock, now, stage.tilt);
|
||||
const gantry = sign.dockState();
|
||||
if (gantry !== gantryState) {
|
||||
gantryState = gantry;
|
||||
document.documentElement.dataset.gantry = gantry;
|
||||
}
|
||||
if (TEST_BUILD && snapshot.sign !== null) {
|
||||
const presentation = sign.inspect(camera, width, height);
|
||||
if (presentation !== null) {
|
||||
@@ -600,6 +585,7 @@ export async function createProceduralSceneGeneration(
|
||||
dispose() {
|
||||
if (disposed) return;
|
||||
disposed = true;
|
||||
delete document.documentElement.dataset.gantry;
|
||||
// Quality changes reuse the canvas context. Leave texture upload flags at
|
||||
// defaults before the next renderer creates its empty array textures.
|
||||
const gl = renderer.getContext();
|
||||
|
||||
Reference in New Issue
Block a user