New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pixi-live2d

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixi-live2d

Display live2D model as a sprite in pixi.js.

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
decreased by-67.8%
Maintainers
1
Weekly downloads
 
Created
Source

pixi-live2d

Display live2D model as a sprite in pixi.js.


Installation | Example | API | License | Donation

Pixi-live2d is a plugin for pixi.js for displaying live2D model as a sprite in pixi.js.

Installation

npm install pixi-live2d

Attention

Because of the SDK policy of Live2D Inc., SDK file has been removed from the package, so you have to download and import it by yourself.

for example in HTML file:

<script src="live2d.min.js"></script>

or just require it

require('live2d.min.js');

Example

import PIXI from 'pixi.js';
import 'pixi-live2d';

const renderer = new PIXI.WebGLRenderer(800, 600);
document.body.appendChild(renderer.view);
const stage = new PIXI.Container();

const live2dSprite = new PIXI.Live2DSprite(modelHaru);
stage.addChild(live2dSprite);

live2dSprite.startRandomMotion('idle');
live2dSprite.on('mousemove', (evt) => {
  const point = evt.data.global;
  live2dSprite.setViewPoint(point.x, point.y);
});

function animate() {
    requestAnimationFrame(animate);
    renderer.render(stage);
}
animate();

You can find a more complex one at example folder, or visit it online.

API

docs/API.md

License

This plugin is distributed under MIT license, and you should agree with the licenses of Live2D and pixi.js.

For more detail, please read LICENSE.txt.

Donation

The plugin is free for charge, if you like it don't forget to buy me a coffee!

ko-fi:
Buy Me a Coffee at ko-fi.com

alipay:

Keywords

FAQs

Package last updated on 14 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc