// Keyboard/pointer input. Replaces worker's bare `inputKey(code)` global with a small `Input`
// namespace so the surface reads better and has room to grow (pointer, gamepad) without new globals.

export const Input = {
  /**
   * Is a key currently held? `code` is a KeyboardEvent.code-style string, e.g. 'ArrowRight',
   * 'KeyW', 'Space'. Poll this inside setLoop for frame-independent movement.
   */
  key(code: string): boolean {
    return _creatorUtils.inputKey(code)
  },
}
