# live2d-vue **Repository Path**: hec9527/live2d-vue ## Basic Information - **Project Name**: live2d-vue - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-26 - **Last Updated**: 2021-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 关于live2d-vue二三事 1. live2d-vue 参考资料 [EYHN](https://github.com/EYHN/hexo-helper-live2d) [Jad](https://github.com/journey-ad/live2d_src) [A Panda](https://blog.imalan.cn/archives/95/) 2. 在这基础上加上一些魔法 live2d-vue 就完成了 ## 食用方法 ``` yarn add live2d-vue ``` ``` import live2d from 'live2d-vue' Vue.use(live2d) ``` ``` ``` # API ## live2d 人物 #### `:width` 宽度 > 默认 280 #### `:height` 高度 > 默认 250 #### `:canvasID` 标签ID > 默认 '' #### `:modelPath` 模型JSON路径 #### `:canvasStyle` canvas样式 > 默认 {'position': 'relative','z-index': 99} ## dialogue 对话框 #### `:dialogueID` 标签ID > 默认 uuid() #### `:dialogueStyle` 标签样式 >默认 undefined #### `customDialogue` 栗子 >默认 undefined ``` export default { "mouseover": [{ "selector": [".live2d"], "message": ["干嘛呢你,快把手拿开", "鼠…鼠标放错地方了!", "别过来,变态!"] }, { "selector": ["#home"], "message": ["想看我的主页么?"] }, { "selector": ["#change"], "message": ["喜欢换装play?"] }, { "selector": ["#save"], "message": ["保持微笑就好"] }, { "selector": ["#about"], "message": ["想知道我的一切?"] },{ "selector": ["#hide"], "message": ["哼! 你会后悔的!!"] }], "click": [ { "selector": [".live2d"], "message": ["是…是不小心碰到了吧", "萝莉控是什么呀", "你看到我的小熊了吗?", "再摸的话我可要报警了!⌇●﹏●⌇", "110吗,这里有个变态一直在摸我(ó﹏ò。)", "我要生气哟(ー`´ー)"] } ] } ``` ## live2dTools 标签 #### `:width` 展示的宽度 >默认 28 #### `:minWidth` 最小展示宽度 >默认 18 #### `:position` 位置 'left' 'right' >默认 'left' #### `:customDialogue` >默认 undefined 同上 dialogue 标签 #### `:dialogueRightLevelPosition` >默认 10 对话框在右边水平位置 #### `:toolsID` 标签ID >单个标签 默认 '' 多个标签 必填 #### `:backgroundColor` 标签背景 >默认 #FFFFFF #### `:toolsStyle` 标签样式 >默认 undefined #### `:tabMsg` 标签描述 >默认 undefined ## 关于模型 [模型参考](https://github.com/LingHanChuJian/live2d-vue/tree/master/model) 如何制作 [live2d模型](https://imjad.cn/archives/lab/add-dynamic-poster-girl-with-live2d-to-your-blog-02) ![药水制作师](https://raw.githubusercontent.com/LingHanChuJian/live2d-vue/master/public/live2d.png) ![药水制作师](https://raw.githubusercontent.com/LingHanChuJian/live2d-vue/master/public/live2d-1.png) ![药水制作师](https://raw.githubusercontent.com/LingHanChuJian/live2d-vue/master/public/live2d-2.png)