Coder Social home page Coder Social logo

iepiweidieng / live2d-helper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kooritea/live2d-helper

0.0 0.0 0.0 9.71 MB

Quick display of live2d model (unofficial, experimental) (deprecated in favor of https://github.com/IepIweidieng/CubismWebSamples)

License: GNU General Public License v2.0

JavaScript 0.23% TypeScript 99.77%

live2d-helper's Introduction

Live2d-helper

npm

Live2d-helper2.x.x 主体基本开发完成,现在还缺一些语音功能及一些人性化接口

Live2d-helper1.x.x基本完善,但只能加载 2.x 版本的 live2d 模型,其他版本的模型需要转换

Live2d-helper2.x.x 主要为加载 3.x 版本的模型

Live2d-helper @2.x.x 基于官方 live2d.js 和(SDK4.0.0) 的、更加简单易用的 live2d-helper,通过简单的配置在网页上显示 live2d

不依赖任何其他框架,你只需要一个 canvas 元素和模型资源地址!就可以显示!

如何使用

下载 live2d-helper

npm install live2d-helper

准备 live2d 模型

基本上按照 demo 里面那样子放置资源即可
live2d-helper @2.x.x 使用的是 3.x 版本的模型
3.x 版本的模型的 model 一般的命名方式为 name_3.model3.json
并且有一个"version": 3的字段 其他版本的模型可能不通用!

引入 live2d-helper

<script src="./dist/index.js"></script>
<script>
  new Live2dHelper();
</script>

or

var Live2dHelper = require("live2d-helper");

or

import Live2dHelper from "live2d-helper";

配置基本和 1.x.x 相同,完善之后再写

motionLoadMode

motion 加载方式

  • 'lazy' 触发 motion 时进行加载(default),缺点是首次触发 motion 会有卡顿感
  • 'greedy' 模型加载时立即加载所有 motion,加载完毕后再显示模型,缺点是 motion 多的时候显示模型加载时间较长
  • 'textures_first' 贴图优先,优先显示模型,再加载所有 motion,缺点是加载 motion 时模型会因为 js 的限制卡住不动

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.