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.

624 B
Raw Blame
// Locates files that ship beside the code: SQL migrations and the built
// dashboard. From source they live in the repo tree; from the npm bundle
// (dist/*.js) they sit next to the entry points.
import { existsSync } from 'node:fs';
import { dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';

const here = dirname(fileURLToPath(import.meta.url));

export function assetDir(bundled: string, source: string): string {
  for (const dir of [here, join(here, '..')]) {
    const next = join(dir, bundled);
    if (existsSync(next)) return next;
  }
  return resolve(here, '../..', source);
}