Token导航 LogoToken导航TokenDH.com
Vibe Eyes Client logo
开发工具未说明官方级别未说明来源级核验

Vibe Eyes Client

MCP Server

Client library for integrating browser games with Vibe Eyes MCP debug server

工具数

0

提示词数

0

GitHub Stars

2

资源数

0
游戏开发调试工具JavaScript

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

monteslu

提供方

monteslu

最后核验

2026/5/18 02:52

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Vibe Eyes客户端

一个轻量级的客户端库,将浏览器游戏与 Vibe Eyes MCP调试服务器 用于实时调试、可视化和分析。

这使得AI能够实时查看它正在开发的游戏!

特性

  • 自动画布截图捕获和流式传输
  • 控制台日志和带有时间戳的错误收集
  • 全局错误和未处理的promise拒绝处理
  • SVG可视化显示在专用调试窗口中
  • 使用SVG大小测量完成调试统计
  • 对游戏性能的影响最小
  • 强大的错误处理和优雅的连接恢复
  • 多种构建格式(UMD、ESM、IIFE)

1.1.0中的新增功能

  • 断开连接的SVG显示器:调试窗口现在即使未连接到服务器也能工作
  • 连接状态可视化:通过视觉反馈显示实时连接状态
  • 智能窗户定位:调试窗口相对于游戏窗口的位置(右、左、上、下)
  • 响应默认值:调试窗口大小默认为游戏窗口尺寸的75%
  • 改进了错误处理:更好地处理窗口关闭和重新连接情况

安装

npm install vibe-eyes-client

或者直接包含在HTML中:

用法

基本集成

// Initialize with default settings (auto-connects to http://localhost:8869)
// Available globally when using the script tag
// The client will automatically start capturing once connected
initializeVibeEyes();

// Or use the existing client instance directly
window.VibeEyesClient.initialize();

自定义配置

// Initialize with custom settings (when included via script tag)
initializeVibeEyes({
  serverUrl: 'http://your-debug-server:8869',
  captureDelay: 2000,   // Screenshot every 2 seconds
  maxLogs: 50,          // Store more logs
  canvasId: 'my-canvas' // Specific canvas to capture
});

// Or when using as a module
import { initializeVibeEyes } from 'vibe-eyes-client';

initializeVibeEyes({
  serverUrl: 'http://your-debug-server:8869',
  captureDelay: 2000,
  canvasId: 'game-canvas'
});

手动控制

// Get the client instance
const client = window.VibeEyesClient;

// Explicitly stop/restart capturing if needed
client.stopCaptureLoop();
client.startCaptureLoop();

显示SVG可视化

Vibe Eyes MCP服务器发回SVG可视化,您可以在专用调试窗口中显示:

// Get the client from initialization
const client = initializeVibeEyes();

// Enable SVG display - opens a new debug window with SVG and stats
client.enableSvgDisplay();

// You can optionally provide a custom container
client.enableSvgDisplay({
  container: '#my-custom-container' // Optional existing container element
});

// Configure the debug window position and size (all options are optional)
const client = initializeVibeEyes({
  serverUrl: 'http://localhost:8869',
  debugWindow: {
    // All debugWindow properties are optional with sensible defaults
    width: 500,                // Optional: Width in pixels (default: 75% of game window width)
    height: 600,               // Optional: Height in pixels (default: 75% of game window height)
    position: 'right'          // Optional: Position relative to game window (default: 'right')
    // Possible positions: 'right', 'left', 'top', 'bottom', 'detached'
  }
});

// Toggle the display on/off
client.toggleSvgDisplay();

// Disable the display (closes the debug window)
client.disableSvgDisplay();

调试窗口显示:

  • 顶部的SVG可视化
  • 底部有完整的响应统计数据,包括SVG大小
  • 当新数据从服务器到达时实时更新

配置选项

所有配置选项都是可选的,并具有合理的默认值。

客户端初始化选项

选项默认值描述
服务器URL'http://localhost:8869'Vibe Eyes MCP服务器的URL
捕获延迟1000捕获之间的毫秒
maxLogs10最大存储控制台日志
maxErrors10最大存储错误日志数
autoConnecttrue初始化时连接
canvasIdnull要捕获的特定画布的ID(null=自动检测)
debugWindow对象调试窗口的配置(见下文)

SVG显示选项

选项默认值描述
containernullSVG容器的元素或选择器(如果为null,则创建弹出窗口)

调试窗口选项

选项默认值描述
widthnull调试窗口的宽度(像素)(null=游戏窗口宽度的75%)
heightnull调试窗口的高度(以像素为单位)(null=游戏窗口高度的75%)
position“right”相对于游戏窗口的位置:“right”、“left”、“top”、“bottom”或“detached”

构建格式

以下构建格式在 dist/ 目录:

  • vibe-eyes.min.js -针对大多数用例的小型UMD构建
  • vibe-eyes.js -用于调试的未缩小UMD构建
  • vibe-eyes.iife.js -IIFE构建,带有全局变量,可直接用于浏览器
  • vibe-eyes.esm.js -ES模块适用于现代捆扎机和环境

相关项目

许可证

国际协调委员会

目录标签

目录标签

游戏开发调试工具JavaScriptdeveloper-tools本地部署实时调试可视化分析浏览器游戏

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP