embed-agent-in-react
БесплатноБез исполняемых скриптовНе проверенEmbed a three.ws 3D agent in a React app with the @three-ws/react Agent3D component and drive it through its ref. Use when a React or Next.js page should show…
от nirholas★ 289 звёзд на GitHubОб этом скилле
Embedding agents with @three-ws/react
Agent3D renders the three.ws walk embed in an iframe and exposes an imperative handle for live control. WalkEmbed is an alias.
Install
npm install @three-ws/react
Peer dependencies: react and react-dom 17 or newer. Node 20 or newer to build.
Props
Required: agentId (the three.ws agent id). Optional: avatarId, controls (joystick | keyboard | none, default joystick), background (transparent or a hex like #1b1b1b), environment (for example studio), autoplay, ground (default true), orbit (default true), speed (0.3 to 3), width (default 100%), height (default 600px), baseUrl (self-host, default https://three.ws), onLoad(), onError(err), className, style, title.
Ref handle (Agent3DHandle)
setAvatar(id), setMotion('idle' | 'walk' | 'run'), setEnvironment(env), setSpeed(n), narrate(text) (speech bubble), resetPose(), sendMessage(msg), and the read-only iframe.
Example
import { useRef } from 'react';
import { Agent3D } from '@three-ws/react';
export function Hero({ agentId }) {
const ref = useRef(null);
return (
<Agent3D
ref={ref}
agentId={agentId}
controls="keyboard"
background="transparent"
height={480}
onLoad={() => ref.current?.narrate('Hello, I am live.')}
onError={(err) => console.error(err)}
/>
);
}
Notes
- The component is client-side. In Next.js, mark the file
'use client'. - Wait for
onLoadbefore calling handle methods that expect a ready scene. - The agent id comes from a three.ws agent page. To create an agent, use the three.ws site or its own tooling, this package only embeds.
Установить embed-agent-in-react в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл embed-agent-in-react?
Embed a three.ws 3D agent in a React app with the @three-ws/react Agent3D component and drive it through its ref. Use when a React or Next.js page should show or control a three.ws avatar.
Как установить скилл embed-agent-in-react?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл embed-agent-in-react запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic