live2d-openfs

1.3.2 • Public • Published

vueLive2d 看板娘

1. npm i 'live2d-openfs'
2. import live2d from 'live2d-openfs'

使用方法(vue)

<template>
  <!-- 看板娘 -->
  <div>
    <!-- 可尝试一个页面上多个模型: -->
    {/* <live2d
      :model="[1, 53]"
      :direction="direction"
      :width="width"
      :height="height"
      customId="vue-live2d-mian-2"
    ></live2d> */}
    <live2d
      :style="style"
      :model="['bilibili-live/33', 'closet-default-v2&spring-2018-upper&spring-2018-lower&cba-hat']"
      :direction="direction"
      :size="size"
    />
  </div>
</template>

<script setup lang="ts">
import live2d from 'live2d-openfs'
import { ref } from 'vue'

{/* 位置 */}
const direction = ref('right')
{/* 位置css */}
const style = ref('position: fixed; bottom: 20px; right: 20px;z-index: 900')
{/* 宽高 */}
// const width = ref(400)
// const height = ref(400)
{/* 大小 */}
const size = ref(250)

</script>

Readme

Keywords

Package Sidebar

Install

npm i live2d-openfs

Homepage

songjf.com

Weekly Downloads

4

Version

1.3.2

License

MIT

Unpacked Size

212 kB

Total Files

6

Last publish

Collaborators

  • jingfengsong