Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

496 B
Raw Blame
export type ServeSimTouchType = 'begin' | 'move' | 'end'

export type ServeSimTouchFrame = {
  type: ServeSimTouchType
  x: number
  y: number
  edge?: number
}

export const SERVE_SIM_TOUCH_MESSAGE_TAG = 0x03

export function encodeServeSimTouchFrame(touch: ServeSimTouchFrame): Uint8Array<ArrayBuffer> {
  const json = new TextEncoder().encode(JSON.stringify(touch))
  const frame = new Uint8Array(1 + json.length)
  frame[0] = SERVE_SIM_TOUCH_MESSAGE_TAG
  frame.set(json, 1)
  return frame
}