receiving-shared-textures
Installation
SKILL.md
Receiving Shared Textures
Overview
Every shared-texture producer in @napolab/texture-bridge — bridge.forwardFrames, forwardSharedTexture, createSharedTextureReceiver — delivers to a renderer through the same consuming pair:
import {
installSharedTextureReceiver,
consumeSharedTexture,
} from "@napolab/texture-bridge-renderer/client"; // the /client subpath — not the package root
installSharedTextureReceiver() — once at startup, before any consume call. It binds Electron's single sharedTexture.setSharedTextureReceiver slot to a pool so multiple consumers coexist. Idempotent. Never call sharedTexture.setSharedTextureReceiver yourself alongside it.
Window Setup
The consuming code must run where electron is resolvable — a preload script, with: