player README

The project's README from github.com/livliv-dev/player. As one markdown file: README.md.

LivLiv Player

Anime characters that breathe, blink and talk, right on your web page.
A small WebGL2 player. A few lines of code, and 23 characters to start with.

livliv-dev%2Fplayer | Trendshift
npm License: Apache-2.0

English · 中文 · 日本語 · Tiếng Việt

Featured characters breathing, blinking, turning their heads and talking

▶ Try it in your browser

Quick start

npm i @livliv-dev/player
import { Player } from '@livliv-dev/player'

const player = new Player(document.querySelector('canvas'))
await player.load('https://livliv-dev.github.io/player/characters/v05.livliv')   // Lilith
player.act('nod')

That's it, she's on your page. A couple more tricks:

// talk: the mouth moves with the sound
import { createSpeech } from '@livliv-dev/player/voice'
const speech = createSpeech(player)
button.onclick = () => { speech.unlock(); speech.say('/hello.mp3') }

// copy your face from the webcam (needs @mediapipe/tasks-vision)
import { startFaceTracking } from '@livliv-dev/player/tracking'
await startFaceTracking(player)

VRM and PNGTuber characters go through BodyPlayer, same API. Expressions, actions, feel settings, recorded poses and the rest are in API.md; the .livliv format is in FORMAT.md.

Meet the cast

23 characters, free to use with credit. Click one to play it in the demo; the id under it downloads its .livliv.

Lilith
Lilith
v05
Nana
Nana
d03
Mira
Mira
v03
Stella
Stella
v07
Aster
Aster
v01
Sena
Sena
k01
Aoi
Aoi
char06
Usa
Usa
v06
Hana
Hana
s01
Yui
Yui
d01
Nana
Nana (refined)
d03ft
Sora
Sora
char07
Elio
Elio
k02
Leo
Leo
d02
Kai
Kai
v04
Max
Max
w01
Kujira
Kujira
p01
Kujira Q
Kujira Q
p02
Pen
Pen
p03
Tsubaki
Tsubaki
f05
full body
Neve
Neve
f06
full body
Juno
Juno
f07
full body
Viola
Viola
f08
full body

Load one by URL, https://livliv-dev.github.io/player/characters/<id>.livliv (served with CORS), or copy its folder from characters/ next to your page. index.json lists them all. Each has a cover.webp to show while it loads (the poster option), and full-body characters pick their shot with player.view.fit: 'frame', 'knee' or 'whole'.

Want your own? Bring a PNGTuber (two pictures) or a VRM, or make one from a single picture on livliv.ai and download its .livliv.

What's new

0.6: long hair swings and rests on the body, blinks close cleanly, and feel settings change live with setTuning(). VRM files from Blender play too. Pages written for 0.5 just work. Everything is in the changelog and the releases.

Made by LivLiv

We want the art of creating characters to belong to everyone.

We're open-sourcing our AI tools for character creation, the player and its playback protocol, and a stage where your characters can meet an audience. Made something with it? Show us on Discord or X.

The fine print: character licence, AI, Live2D, embedding, developing

The characters' licence

Most featured characters were made by LivLiv: use them free with credit ("Characters: LivLiv (livliv.ai)"), commercially too if you are an individual. Don't sell them or merchandise made from them, and don't train AI models on them. They are not covered by the Apache License; the terms are in characters/LICENSE.md. Kujira, Kujira Q and Pen come from other people's work, with their own terms in characters/CREDITS.md. The npm package is the player alone: copy the characters you use next to your page, with their licence.

Made with AI

Making a character on livliv.ai uses AI, and the featured characters were made there too. Kujira, Kujira Q and Pen adapt other people's characters, and refined Nana (d03ft) has swinging parts and head-turn keyforms added with LivLiv's own tools. When you show a character made with LivLiv in public, say that AI was used to make it, and don't present it as hand-drawn or hand-rigged. A package's meta.author and meta.license record who made it and on what terms: keep them and follow them.

The player itself only plays. It calls no AI service and reads only the files you point it at. Face tracking runs Google's MediaPipe in the browser, and camera images stay on the device; API.md has the networking details.

Not Live2D

LivLiv Player and the .livliv format are LivLiv's own work. They use no Live2D software or Cubism SDK and don't read .moc3 or .cmo3 files. "Live2D" is a trademark of Live2D Inc.; LivLiv is not affiliated with it.

Embed without code

<iframe src="https://livliv.ai/live/k01" width="480" height="640" allow="camera; microphone"
  style="border:0;background:transparent"></iframe>

The /live/<id> page has a transparent background and works as an OBS Browser Source too.

Develop

git clone https://github.com/livliv-dev/player
cd player
npm install
npm run check          # types
npm run build          # dist/: the entries (ES modules), chunks/ and types/
npm test               # unit and fuzz tests (Node 22.18 or newer, no browser)
npm run test:browser   # every featured character in headless Chromium; once: npx playwright-core install chromium-headless-shell
npm run test:engines   # a sample on Firefox and WebKit; once: npx playwright-core install firefox webkit

Then serve the folder and open /example/demo.html (?model=../characters/<id>/ picks a character); /example/png.html and /example/vrm.html show a PNGTuber and a VRM. src/runtime/ is the renderer and motion code livliv.ai runs. See CONTRIBUTING.md; security reports go to SECURITY.md.

Browser support

WebGL2 and ES2023: Chrome / Edge 97+, Firefox 104+, Safari 15.4+. Tested on current desktop browsers, not yet on phones.

License

The code is under the Apache License 2.0 (see also NOTICE). The featured characters have their own licence, characters/LICENSE.md. You may keep the LivLiv name and logo in your own versions, as long as they don't claim to be the official one.

Thanks

Thanks to 上善无形, ZipZipPipe and 贱兔死顺盖, whose characters Kujira, Kujira Q and Pen are based on: see characters/CREDITS.md.

Lilith Nana Mira
That's the tour. Go make something cute.

player (livliv-dev/player)

webgl2
Searching Database…

What is this?A lightweight 2.5D character player for the web. It puts an animated character on a page, a stream overlay or an app, with lip sync and webcam face tracking.
Is it a library I add to my site, or a finished app?It is a library: an npm package with the player alone, which you call from your own page. A ready /live/ page also exists for embedding without code.
How do I get it running?Clone the repo, run 'npm install && npm run build', serve the folder with any static server, and open /example/demo.html to try expressions, actions, microphone and camera.
Do I need anything special?Only a browser with WebGL2 and ES2023 (Chrome/Edge 97+, Firefox 104+, Safari 15.4+). The core has no dependencies and is about 30 KB gzipped; MediaPipe for face tracking loads only when you need it.
Any catches?It has been tested on current desktop browsers only, not yet on phones. Also, the featured characters have their own licence, separate from Apache 2.0, so they cannot be sold or used commercially.
Does it send my camera or voice anywhere?No. The player calls no AI service and reads only the files you point it at. Face tracking runs Google's MediaPipe in the browser, and camera images stay on the device.
What is the difference between LivLiv, VRM and PNGTuber characters?All three play through the same API. A PNGTuber needs two pictures (mouth closed and open), a VRM comes from VRoid Studio or any tool exporting VRM 0.x or 1.0, and a LivLiv model is made from one picture on livliv.ai.
Does it support full-body characters?Yes. Full-body characters are drawn head to feet and stand on the ground, swaying and crouching with their feet in place. You pick the shot with view.fit; four featured characters (f05 to f08) are full-body.
Why did the authors open-source it?They want the art of creating characters to belong to everyone, so they released their AI character-creation tools, the player and its playback protocol, and a stage where characters can meet an audience.
Was AI used to make the characters?Yes. The featured characters and characters made on livliv.ai were made with AI, so the README asks you to say so and not present them as hand-drawn or hand-rigged.
Creator
livliv-dev
Size
26.1 MB
Stars
1.6K
Age
29d
Commits · 90 Days