1.3.2 • Published 12 months ago

live2d-openfs v1.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

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

12 months ago

1.3.1

12 months ago