For AI agents: the complete documentation index is available at /vue-vrm/zh/llms.txt, the full documentation bundle is available at /vue-vrm/zh/llms-full.txt, and this page is available as Markdown at /vue-vrm/zh/examples/index.md.
  • 简体中文
  • 示例

    Warning

    除非你拥有模型及其全部素材的著作权,否则请不要从公开 URL 或打包进应用的文件中直接加载实体文件。请改用下面的某种方式。

    vue-vrm 只接受 ArrayBuffer(请参阅为什么只接受 ArrayBuffer)。这些示例展示了如何从服务器分发模型文件,使其不会以公开 URL 的形式出现在代码中。两个示例都运行在 Cloudflare Workers 上。

    示例模型来源难度
    Cloudflare R2 + Workers放在 R2 存储桶中的你自己的文件简单
    VRoid Hub API在 VRoid Hub 上公开的模型(通过 OAuth)进阶

    两种情况下,应用端的处理都相同:获取字节数据并传给 model-data。

    const response = await fetch(endpoint);
    modelData.value = await response.arrayBuffer();

    完整实现见 logue/v.logue.dev: