For AI agents: the complete documentation index is available at /vue-vrm/ja/llms.txt, the full documentation bundle is available at /vue-vrm/ja/llms-full.txt, and this page is available as Markdown at /vue-vrm/ja/api/index.md.
  • 日本語
  • API概要

    VrmCanvasコンポーネントには3種類のAPIがあり、ほかにヘルパー関数も公開しています。

    ページ内容
    Propsモデル、アニメーション、キャンバス、カメラ、ライトの設定です。
    イベント読み込み、アニメーション、カメラとライトの変化、エラーの通知です。
    インスタンスAPIテンプレート参照から呼べるメソッドです。
    ユーティリティコンポーネントを使わずにVRM/VRMAを検証・読み込みする関数です。
    <script setup lang="ts">
      import { ref } from 'vue';
      import { VrmCanvas, type VrmCanvasExposed } from 'vue-vrm';
    
      const modelData = ref<ArrayBuffer>();
      const canvas = ref<VrmCanvasExposed>();
    </script>
    
    <template>
      <VrmCanvas
        ref="canvas"
        :model-data="modelData"
        show-grid
        @model:loaded="() => canvas?.resetCamera()"
      />
    </template>