# @ai-zen/live2d-vue

> Live2D-Vue is a vue component lib for integrating Live2D views into Vue projects.

Latest version **1.2.3** (published 2024-07-08) · 0 weekly downloads

## Install

```sh
npm install @ai-zen/live2d-vue
pnpm add @ai-zen/live2d-vue
yarn add @ai-zen/live2d-vue
bun add @ai-zen/live2d-vue
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2024-07-08 |
| First published | 2023-10-11 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 940.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | lzqcn |

## Links

- npm: https://www.npmjs.com/package/@ai-zen/live2d-vue
- Repository: https://github.com/ai-zen/live2d-vue-workspace
- Issues: https://github.com/ai-zen/live2d-vue-workspace/issues
- npm.io page: https://npm.io/package/@ai-zen/live2d-vue

## Dependencies (2)

- [@ai-zen/event-bus](https://npm.io/package/@ai-zen/event-bus.md) ^1.1.0
- [@ai-zen/async-queue](https://npm.io/package/@ai-zen/async-queue.md) ^1.0.3

## Recent versions

- 1.2.3 (latest) — 2024-07-08
- 1.2.2 — 2024-07-07
- 1.2.1 — 2024-07-07
- 1.2.0 — 2024-07-07
- 1.1.2 — 2024-06-30
- 1.1.1 — 2024-05-25
- 1.1.0 — 2024-05-20
- 1.0.12 — 2023-11-01
- 1.0.11 — 2023-10-29
- 1.0.10 — 2023-10-25
- 1.0.9 — 2023-10-25
- 1.0.8 — 2023-10-25
- 1.0.7 — 2023-10-25
- 1.0.6 — 2023-10-25
- 1.0.5 — 2023-10-25
- … 5 more at https://npm.io/package/@ai-zen/live2d-vue/versions

## README

# live2d-vue

Live2D-Vue is a vue component lib for integrating Live2D views into Vue projects.

## Installation

Install using npm:

```shell
npm install @ai-zen/live2d-vue
```

or using yarn:

```shell
yarn add @ai-zen/live2d-vue
```

## Usage

Import the Live2D component in your Vue component and set its width and height using CSS styles:

```vue
<template>
  <Live2D
    class="live2d"
    modelDir="/models/Hiyori"
    modelName="Hiyori.model3.json"
  />
</template>

<script setup lang="ts">
import { Live2D } from "@ai-zen/live2d-vue";
</script>

<style scoped>
.live2d {
  width: 800px;
  height: 800px;
}
</style>
```

In addition, you need to manually include `live2dcubismcore.min.js`:

```html
<!doctype html>
<html lang="en">
  <head>
    <!-- Include the live2dcubismcore.min.js provided by the Live2D SDK in your website's HTML page -->
    <script src="/live2dcubismcore.min.js"></script>
  </head>
</html>
```

## API

### Props

This component does not expose any props.

### Events

| Event Name       | Description                                                            | Parameters                                                   |
| ---------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------ |
| ready            | Triggered when Live2D initialized.                                     |                                                              |
| modelStateChange | Triggered if the state of the model changes during the loading process | `model`: LAppModel, `state`: LoadStep, `prevState`: LoadStep |

### Instance Properties

This component exposes:

- LAppDelegate
- LAppLive2DManager
- delegateRef
- managerRef
- isReady

---
_Source: https://npm.io/package/@ai-zen/live2d-vue · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
