Skip to content

dingeral/live2d-api

 
 

Repository files navigation

Live2D_API

jsdelivr 引入

<!-- 顺序切换模型材质 -->
<script src="https://gcore.jsdelivr.net/gh/dingeral/live2d-api@latest/jsdelivr/sequential/autoload.min.js"></script>
<!-- 随机切换模型材质 -->
<script src="https://gcore.jsdelivr.net/gh/dingeral/live2d-api@latest/jsdelivr/random/autoload.min.js"></script>

<!-- 看板娘位置靠左 -->
<link
  rel="stylesheet"
  href="https://gcore.jsdelivr.net/gh/dingeral/live2d-api@latest/css/left.min.css"
/>
<!-- 看板娘位置靠右 -->
<link
  rel="stylesheet"
  href="https://gcore.jsdelivr.net/gh/dingeral/live2d-api@latest/css/right.min.css"
/>

v0.01

自建 live2d API

v0.02

简化按钮

~/jsdelivr/random/autoload.js

      tools: [
        "hitokoto",
        "asteroids",
        "switch-model",
        "switch-texture",
        "photo",
        "info",
        "quit",
      ],

-->

      tools: [
        "hitokoto",
        "switch-model",
        "switch-texture",
        "quit",
      ],

v0.03

优化大小

~css/

#live2d {
  cursor: grab;
  height: 280px;
  position: relative;
  width: 280px;
}

v0.04

更换 cdngcore.jsdelivr.net

v0.05

引入模型,优化顺序

Languages

  • JavaScript 66.0%
  • CSS 26.6%
  • HTML 5.0%
  • Shell 2.4%