Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

972 B
Raw Blame
import React, { useContext, useState } from "react";
import { SceneContext } from "../context/SceneContext";
import styles from "./AppearancePanel.module.css";
import { ChromePicker } from "react-color";

const AppearancePanel = () => {
  const { characterManager } = useContext(SceneContext);
  const [color, setColor] = useState("#ffffff");

  const handleColorChange = (color) => {
    setColor(color.hex);
    if (characterManager) {
      // This is a simplified example. We'll need to know which trait to color.
      // For now, let's assume we're coloring the 'skin'.
      characterManager.setTraitColor("skin", color.hex);
    }
  };

  return (
    <div className={styles.container}>
      <div className={styles.controlGroup}>
        <label>Skin Color</label>
        <ChromePicker
          color={color}
          onChangeComplete={handleColorChange}
          disableAlpha={true}
        />
      </div>
    </div>
  );
};

export default AppearancePanel;