Improve FAQ & video rendering, tighten homepage and CSS
This commit is contained in:
parent
05a1f316e1
commit
c69bb0d614
48 changed files with 4689 additions and 1077 deletions
50
video/src/config.ts
Normal file
50
video/src/config.ts
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
export const APP_URL = process.env.APP_URL ?? 'http://host.docker.internal:3001';
|
||||
export const DASHBOARD_PATH = '/dashboard';
|
||||
|
||||
export const AUTH_STATE_PATH = 'auth.json';
|
||||
export const OUTPUT_DIR = 'output';
|
||||
|
||||
const aspect = process.env.ASPECT ?? '16x9';
|
||||
export const VIEWPORT =
|
||||
aspect === '9x16' ? { width: 1080, height: 1920 } : { width: 1920, height: 1080 };
|
||||
|
||||
export const PROMPT_TEXT =
|
||||
process.env.PROMPT_TEXT ?? 'Near Kings Cross, EPC C+, under £600k';
|
||||
|
||||
// Filter the AI stub will "return". Keys must match real feature names from
|
||||
// /api/features. Pulled from the running server's schema.
|
||||
export const STUBBED_FILTERS: Record<string, [number, number] | string[]> = {
|
||||
'Estimated current price': [0, 600000],
|
||||
'Number of bedrooms & living rooms': [4, 6],
|
||||
'Property type': ['Detached', 'Semi-Detached', 'Terraced'],
|
||||
'Distance to nearest train or tube station (km)': [0, 1.0],
|
||||
};
|
||||
|
||||
// Slider we'll drag in scene 3. Must be a numeric (range) feature, and must
|
||||
// already be in STUBBED_FILTERS so the card is mounted by the time we drag.
|
||||
export const DRAG_FILTER_NAME =
|
||||
process.env.DRAG_FILTER_NAME ?? 'Estimated current price';
|
||||
// Fraction of the track to drag the right thumb to (0..1 from the left).
|
||||
export const DRAG_TO_FRACTION = 0.55;
|
||||
|
||||
// London-ish view used for the cold open.
|
||||
export const COLD_OPEN_VIEW = '#lat=51.535&lon=-0.105&zoom=11';
|
||||
|
||||
// Hard cap on the trimmed output. Scene-time overhead (CDP roundtrips,
|
||||
// boundingBox calls, layout settling) varies run-to-run, so we trim to a
|
||||
// deterministic length even if total scene wall time exceeds it.
|
||||
export const MAX_DURATION_S = Number(process.env.MAX_DURATION_S ?? 15);
|
||||
|
||||
// Slow down all interactions and animations by this factor while recording,
|
||||
// then speed the output back up by the same factor in ffmpeg. The visible
|
||||
// animation speed in the final video is unchanged, but each visual frame had
|
||||
// N× more wall time to render → fewer dropped frames, smoother motion.
|
||||
//
|
||||
// 1 = no slow-down (choppy on software GL)
|
||||
// 2 = double recording length, ~2× more unique frames in output (recommended)
|
||||
// 3-4 = even smoother, slower to produce; diminishing returns past 4
|
||||
export const RECORD_SCALE = Math.max(1, Number(process.env.RECORD_SCALE ?? 3));
|
||||
|
||||
// Target fps of the FINAL output. We force ffmpeg to interpolate up to this
|
||||
// rate so the speed-up doesn't leave gaps.
|
||||
export const OUTPUT_FPS = Number(process.env.OUTPUT_FPS ?? 60);
|
||||
Loading…
Add table
Add a link
Reference in a new issue