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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
import { useMemo, useEffect } from 'react'
import * as THREE from 'three'
export const SHADED_COLOR = new THREE.Color(0xb8b8b8)
export interface AssetMaterials {
wireframeMaterial: THREE.MeshBasicMaterial
shadedMaterial: THREE.MeshStandardMaterial
wireframeOverlayMaterial: THREE.MeshBasicMaterial
}
export function useAssetMaterials(): AssetMaterials {
const materials = useMemo<AssetMaterials>(
() => ({
wireframeMaterial: new THREE.MeshBasicMaterial({
color: 0x000000,
wireframe: true,
toneMapped: false,
fog: false,
}),
shadedMaterial: new THREE.MeshStandardMaterial({
color: SHADED_COLOR,
roughness: 0.75,
metalness: 0,
}),
wireframeOverlayMaterial: new THREE.MeshBasicMaterial({
color: 0x000000,
wireframe: true,
toneMapped: false,
fog: false,
}),
}),
[],
)
useEffect(() => {
return () => {
materials.wireframeMaterial.dispose()
materials.shadedMaterial.dispose()
materials.wireframeOverlayMaterial.dispose()
}
}, [materials])
return materials
}