/** * Lamp COVERAGE for `helix vehicle validate` (docs/vehicles.md §4): does every lens the model carries actually light, * and does each light function cover the whole car? * * WHY THIS EXISTS. Round 8's Ferrari F40 shipped with every lamp node present, each with its own emissive material, * and was accepted by the node-level lamp checks (`LAMP_*` in validate.ts) — yet the car had a front indicator pair only. * The rear amber lenses were painted into the body, so on hazards nothing at the back of the car changed. Nothing in * the contract says WHICH nodes a function lights; what lights a lens is a `specialty.componentBuild.materials` row * whose `slot` matches a mesh name, a material name or a named ancestor (the engine's `componentPresentation.ts` * indexes exactly those aliases). So this judges the LIT GEOMETRY — the nodes the rows resolve to — never node names: * * 1. every indicator side must light something that reaches BOTH the front and the rear quarter of the car * (front-only is the F40); a car that really has no rear indicators must say so and why * (`lights.noRearIndicators`), because nothing else separates "the real car has none" from "the author did not * model them"; * 2. every lens-like mesh node (an emissive material, or a lamp/lens/indicator/repeater name) must be reached by a * row — an unlit lens of a declared function is dead geometry, and the error names it; * 3. each lamp function the model has must have the rows its function needs (low+high beam, fog, tail+brake, reverse). * * Pure: the package JSON, the parsed glTF and the node facts walked by validate.ts. No I/O. */ import type { Gltf, NodeFacts, VehicleIssue } from './validate'; type Json = Record; /** `lights.noRearIndicators` is a free-text reason; anything shorter than this is not a reason. */ export declare const MIN_NO_REAR_INDICATORS_REASON_CHARS = 20; export interface LampRow { slot: string; signal: string | undefined; index: number; } /** Each emissive-driving row of `specialty.componentBuild.materials`, with the signal that drives it. */ export declare function lampRows(pkg: Json | undefined): LampRow[]; type Side = 'left' | 'right' | 'both' | undefined; /** Which side an indicator row serves: by its signal name (`signal_L`, `indicatorRight`, `hazards`), else undefined. */ export declare function indicatorSide(signal: string | undefined): Side; export interface LampCoverageInput { pkg: Json | undefined; gltf: Gltf; facts: Map; /** Node identity (`headlamps`, `indicator_l`, …) → node indices, as the lamp checks already resolve them. */ indicesFor: (name: string) => number[]; } /** The reason a package gives for a car with no rear indicators, if it gives one. */ export declare function noRearIndicatorsReason(pkg: Json | undefined): { declared: boolean; reason: string; }; export declare function checkLampCoverage(input: LampCoverageInput): VehicleIssue[]; export {};