Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@ai-zen/live2d-vue

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-zen/live2d-vue

live2d-vue is an npm package for integrating Live2D views into Vue projects.

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
8
-38.46%
Maintainers
1
Weekly downloads
 
Created
Source

live2d-vue

live2d-vue is an npm package for integrating Live2D views into Vue projects.

Installation

Install using npm:

npm install @ai-zen/live2d-vue

or using yarn:

yarn add @ai-zen/live2d-vue

Usage

Import the Live2D component in your Vue component and set its width and height using CSS styles:

<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:

<!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 NameDescriptionParameters
mountedTriggered when the component is mounteddelegate: LAppDelegate, manager: LAppLive2DManager
modelStateChangeTriggered if the state of the model changes during the loading processmodel: LAppModel, state: LoadStep, oldValue: LoadStep

Instance Properties

This component exposes the following properties as-is: LAppDelegate, LAppLive2DManager

FAQs

Package last updated on 20 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts