Coder Social home page Coder Social logo

fisherkai / live2d_ai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alpacabi/live2d_ai

0.0 0.0 0.0 116 KB

基于live2d.js实现的动画小人ai,拥有聊天功能,还有图片识别功能,可以嵌入到网页里

License: Do What The F*ck You Want To Public License

JavaScript 63.84% CSS 29.32% HTML 6.84%

live2d_ai's Introduction

项目简介

本项目是我git服务器Alpaca Bi的代码库右下角小人的源代码,基于live2d.js开发,我单独把她抽离了出来,你们可以嵌入到你们自己的网站里,演示demo地址如下:https://live2d.alpaca.run

安装与使用方法

关于聊天功能和图片识别功能

如果你不想加入聊天功能和图片识别功能,只是想单纯的加入个小人,可以跳过此步骤直接看下面安装教程,如果想,请往下看,巴拉巴拉巴拉巴拉(有空再更新)

安装过程

  1. 直接把本项目下载下来
  2. 下载完成后,复制assets文件夹,到你的项目跟目录下
  3. 之后嵌入如下代码在你的index.html的body标签里面,放在最后body标签最后
<input placeholder="和她聊天" id="talk"/>
<form id="uploadForm">
    <input type="file" name="file"/>
</form>
<div class="waifu">
    <div class="waifu-tips"></div>
    <canvas id="live2d" width="320" height="280" class="live2d"></canvas>
</div>
<script src="assets/waifu-tips.js"></script>
<script src="assets/live2d.js"></script>
<script type="text/javascript">initModel("assets/")</script>
  1. 当然了也别忘记在你的index.html的head标签里,加入以下代码
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
    <link rel="stylesheet" type="text/css" href="assets/waifu.css"/>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>

自定义交互功能

她可以监听到你的鼠标移动到或者点击某个元素,并给出相应的反应,实现这个功能你可以去assets/waifu-tips.json文件里配置,很简单的你一看demo源码就秒懂了

live2d_ai's People

Contributors

alpacabi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.