Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 onLoad before 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), без исполняемых скриптов.

Похожие скиллы

Сравнить embed-agent-in-react с