import { PhysicsCustomChart, arrivalReplay, collidersFromScales } from "semiotic/physics" function routingLayout(ctx) { const replay = arrivalReplay( ctx.data.map((packet, index) => packetToSpawn(packet, index, ctx)) ) return { initialSpawns: replay.initialSpawns, initialSpawnPacing: replay.initialSpawnPacing, colliders: [ ...collidersFromScales({ plot: ctx.dimensions.plot, xBands }), ...barriers ], sensors: [ { id: "sensor-review", shape: { type: "aabb", x, y, width, height } } ], config: { observation: { sensors: { "sensor-review": { binId: "Review lane", enterType: "physics-proximity-enter", exitType: "physics-proximity-exit" } } } }, backgroundOverlays: <svg>{/* labels, guides, sensor zones */}</svg>, semanticItems: [ { id: "review-lane", label: "Review lane", x, y, shape: "rect", width, height } ] } } <PhysicsCustomChart ref={chartRef} data={packets} layout={routingLayout} layoutConfig={{ bias, launchSpeed }} spawnDatum={packetToSpawn} onObservation={recordSensorEvent} />