Skip to main content
Built by Best ROI Media · First-Party IntegrationMITWave 1 · LiveBestRoiMedia/game-senses

webeyes

Headless Playwright visual runner and GPU smoke tester for WebGL game builds.

Playwright-based visual QA runner that serves Unity WebGL or HTML5 builds locally, executes scripted input plans on real GPU rendering, and outputs screenshots, contact sheets, and frame heuristics.

View on GitHub ↗
Quick clonegit clone https://github.com/BestRoiMedia/game-senses.git
GitHub repositoryBestRoiMedia/game-senses
Module path_tools/webeyes/
LicenseMIT
Release waveWave 1
LanguagesJavaScript (Node.js)

Why we built it

Editor play mode does not catch compressed WebGL asset failures, shader compile errors, or pointer-lock freezes in shipped browser builds. We built webeyes so AI agents and CI can boot the actual shipped WebGL player, run deterministic input steps, and inspect real rendered frames.

Architecture & how it works

webeyes.mjs starts an embedded HTTP server with proper Brotli, gzip, and .unityweb Content-Encoding headers and hooks window.unityInstance on index.html. It launches Chromium via Playwright with ANGLE/Metal GPU flags, executes a JSON plan of wait, shot, send (SendMessage), click, key, mouse, and eval steps, and computes per-shot luminance, clipping, black-frame, and flat-tile heuristics alongside a contact sheet and JSON report.

Key capabilities

  • Zero-config local static server supporting .br, .gz, and .unityweb compression headers
  • Automatic window.unityInstance hooking for Unity SendMessage automation
  • Scripted input plans with timed key holds, relative mouse moves, JS eval, and loops
  • Per-screenshot image heuristics detecting ALL_BLACK, BLOWN_OUT, and FLAT_TILES
  • Captures console logs, WebGL errors, and structured [eyes] telemetry lines

Usage example

Inspect a built Unity WebGL folder with a step planJavaScript (Node.js)
node webeyes/webeyes.mjs --build ./Builds/WebGL --plan ./tools/eyes_plan.json --out ./Builds/eyes
Outputs numbered PNGs, index.html contact sheet, console.log, and report.json.