electron-texture-bridge

Bidirectional GPU texture sharing between Electron and VJ software via Spout / Syphon Metal.
日本語
A napi-rs native addon for bidirectional GPU texture sharing with Electron. Send textures from Electron's offscreen rendering (useSharedTexture) to VJ software, or receive textures from external Syphon/Spout servers into your Electron app. Works with Resolume Arena, VDMX, OBS, TouchDesigner, and other Syphon/Spout-compatible applications.
Install
npm i @napolab/texture-bridge-renderer
# or
pnpm add @napolab/texture-bridge-renderer
That one package pulls in the whole chain — prebuilt native binaries included. You normally depend on just it.
| Use case | Package | What it gives you |
|---|
| High-level (recommended) | @napolab/texture-bridge-renderer | createTextureBridge() — window + paint + sender + preview, all wired |
| Low-level (manual paint loop) | @napolab/texture-bridge-core | TextureSender + sendTextureFromPaintEvent() |
| Native binding | @napolab/texture-bridge | Raw napi-rs classes (TextureSender, TextureReceiver) |
| Prebuilt binary | @napolab/texture-bridge-darwin-arm64, etc. | Platform .node, resolved automatically via optionalDependencies |
Dependency direction: texture-bridge-renderer → texture-bridge-core → texture-bridge → texture-bridge-<platform>.
Building from source, full prerequisites, packaging, and integration walkthroughs: docs/INSTALLATION.md.
AI Agent Skills
This repo ships agent skills that teach coding agents the real API surface of this library.
They exist because models asked to integrate texture-bridge without them consistently invent plausible-looking APIs that do not exist (publishSharedTexture, subscribeFrames, options objects that were never defined). Each skill was written test-first against those observed failures and verified to make an agent produce the actual API.
Claude Code (plugin)
/plugin marketplace add naporin0624/electron-texture-bridge
/plugin install texture-bridge
Any other agent (Skills CLI)
Works with Codex, GitHub Copilot, Amp, Cursor, Antigravity, and others via skills.sh. Install one skill per command — passing several at once only installs the first:
npx skills add naporin0624/electron-texture-bridge@setting-up-texture-bridge
npx skills add naporin0624/electron-texture-bridge@choosing-texture-bridge-api
npx skills add naporin0624/electron-texture-bridge@migrating-to-forward-frames
npx skills add naporin0624/electron-texture-bridge@receiving-shared-textures
npx skills add naporin0624/electron-texture-bridge@managing-frame-forward-lifecycle
npx skills add naporin0624/electron-texture-bridge@delivering-imported-textures
npx skills add naporin0624/electron-texture-bridge@handling-texture-bridge-failures
npx skills add naporin0624/electron-texture-bridge@diagnosing-dead-frame-forwards
Add -g to install globally instead of into the current project.
Omitting the @skill-name suffix installs every skill in the repository, including this project's own internal development-rule skills (ci, smart-commit, and others) that are not about texture-bridge at all. Name the skills you want.
What each skill covers
Skills activate automatically from conversation context — there are no commands to learn.