MCPcopy Create free account
hub / github.com/ecto/muni / setPathData

Function setPathData

depot/console/src/lib/pathStore.ts:46–58  ·  view source on GitHub ↗
(
  state: number,
  waypoints: DecodedPathWaypoint[],
  currentWaypoint: number,
  distanceToGoal: number,
)

Source from the content-addressed store, hash-verified

44 * Store new path data. Called from WebRTC onmessage handler.
45 */
46export function setPathData(
47 state: number,
48 waypoints: DecodedPathWaypoint[],
49 currentWaypoint: number,
50 distanceToGoal: number,
51): void {
52 globalStore.state = state;
53 globalStore.waypoints = waypoints;
54 globalStore.currentWaypoint = currentWaypoint;
55 globalStore.distanceToGoal = distanceToGoal;
56 globalStore.version++;
57 globalStore.timestamp = performance.now();
58}
59
60/**
61 * Read current path data. Called from useFrame.

Callers 1

useRoverConnectionRtcFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected