MCPcopy
hub / github.com/ifandelse/machina.js / Vehicle

Interface Vehicle

examples/traffic-intersection/src/renderer.ts:72–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70type Direction = "north" | "south" | "east" | "west";
71
72interface Vehicle {
73 direction: Direction;
74 // Position along the road axis (0 = top/left of canvas, CANVAS_SIZE = bottom/right)
75 pos: number;
76 speed: number;
77 maxSpeed: number;
78 // Color for the car body
79 color: string;
80 // Slight randomization prevents lockstep movement
81 accelJitter: number;
82}
83
84const VEHICLE_COLORS = ["#4a90d9", "#e84393", "#f0a500", "#7ed321", "#9b59b6", "#e67e22"];
85

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected