For AI agents: the complete documentation index is available at /vue-vrm/llms.txt, the full documentation bundle is available at /vue-vrm/llms-full.txt, and this page is available as Markdown at /vue-vrm/api/index.md.

API Overview

The VrmCanvas component has three kinds of API, and the package also exports helper functions:

PageContent
PropsOptions for the model, animation, canvas, camera, and lights.
EventsNotifications for loading, animation, camera and light changes, and errors.
Instance APIMethods available through a template ref.
UtilitiesFunctions for validating and loading VRM / VRMA buffers without the component.
<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>