Turn one illustration into an animated 2D mesh avatar with a coding agent and a local editor
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Turn one illustration into an animated 2D avatar. Create and adjust it in Mesh Avatar Studio, then embed it in your app with the mesh-avatar runtime." />
<title>Mesh Avatar Studio — Your illustration, in motion</title>
<link rel="canonical" href="https://shinshin86.github.io/mesh-avatar-studio/" />
<link rel="alternate" hreflang="en" href="https://shinshin86.github.io/mesh-avatar-studio/" />
<link rel="alternate" hreflang="ja" href="https://shinshin86.github.io/mesh-avatar-studio/ja/" />
<link rel="alternate" hreflang="x-default" href="https://shinshin86.github.io/mesh-avatar-studio/" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Mesh Avatar Studio" />
<meta property="og:title" content="Mesh Avatar Studio — Your illustration, in motion" />
<meta property="og:description" content="Create an animated 2D avatar from one illustration, adjust it in a local editor, and embed it in your app with mesh-avatar." />
<meta property="og:url" content="https://shinshin86.github.io/mesh-avatar-studio/" />
<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="ja_JP" />
<meta property="og:image" content="__SOCIAL_IMAGE__" />
<meta property="og:image:width" content="1440" />
<meta property="og:image:height" content="900" />
<meta property="og:image:alt" content="Mesh Avatar Studio showing the Miko sample, editing handles, and a live avatar preview." />
<meta name="twitter:card" content="summary_large_image" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<script type="module" src="/src/main.ts"></script>
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<header class="site-header shell">
<a class="brand" href="./" aria-label="Mesh Avatar Studio home">
<svg class="brand-mark" viewBox="0 0 32 32" aria-hidden="true" fill="none">
<path d="M5 7 16 3l11 4v18l-11 4-11-4V7Z M5 7l11 10L27 7M5 25l11-8 11 8M16 3v26" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" />
</svg>
<span>Mesh Avatar Studio</span>
</a>
<nav class="primary-nav" aria-label="Main navigation">
<a class="header-link" href="#make">Make an avatar</a>
<a class="header-link" href="#live">Use it live</a>
<a class="header-link" href="#embed">Embed</a>
<a class="header-link" href="./play/">Player</a>
<a class="header-link" href="https://github.com/shinshin86/mesh-avatar-studio">GitHub <span aria-hidden="true">↗</span></a>
</nav>
<a class="header-link language-switch" href="./ja/" lang="ja" hreflang="ja">日本語</a>
</header>
<main id="main" class="shell">
<section class="hero" aria-labelledby="hero-title">
<div class="hero-copy">
<p class="eyebrow">Your illustration, in motion</p>
<h1 id="hero-title">Mesh Avatar<br />Studio</h1>
<p class="hero-pitch">Turn one illustration into an animated avatar.</p>
<p class="hero-description">Create and adjust it in Studio, then bring it to your app with the <span class="package-name">mesh-avatar</span> runtime.</p>
<div class="hero-actions">
<a class="button primary" href="https://github.com/shinshin86/mesh-avatar-studio">Get started on GitHub <span aria-hidden="true">↗</span></a>
<a class="button secondary" href="./play/">Try it in your browser</a>
<a class="button secondary" href="https://www.npmjs.com/package/mesh-avatar">Runtime on npm <span aria-hidden="true">↗</span></a>
</div>
<p class="hero-note">A local editor. An avatar you can embed.</p>
</div>
<figure class="demo">
<div class="demo-panel">
<div class="demo-heading">
<span class="demo-title">Live preview</span>
<span class="demo-character">Miko</span>
</div>
<div class="avatar-stage" aria-busy="true">
<canvas id="avatar" role="img" aria-label="Miko, an animated 2D avatar. Use the controls below to change her expression or try talking." width="960" height="960"></canvas>
<p id="avatar-status" class="avatar-status" role="status">Enable JavaScript to try the interactive preview.</p>
</div>
<div class="demo-controls">
<fieldset id="avatar-controls" disabled aria-describedby="demo-hint">
<legend class="sr-only">Avatar controls</legend>
<div id="expressions" class="expression-chips" role="group" aria-label="Expression"></div>
<div class="talk-row">
<p id="demo-hint">Move your pointer and she turns to face it.</p>
<button id="talk" class="talk-toggle" type="button" aria-pressed="false" aria-describedby="talk-hint"><span class="talk-indicator" aria-hidden="true"></span>Talk</button>
</div>
</fieldset>
<p id="talk-hint" class="demo-note">Try talking — this demo has no audio.</p>
</div>
</div>
<figcaption>Running here with <a href="https://www.npmjs.com/package/mesh-avatar">mesh-avatar</a>. <button type="button" class="view-code" data-open-dialog="code-dialog" aria-haspopup="dialog"><svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5.5 4 2 8l3.5 4M10.5 4 14 8l-3.5 4" /></svg>View the code</button></figcaption>
</figure>
</section>
<section id="features" class="content-section" aria-labelledby="features-title">
<div class="section-heading">
<p class="eyebrow">What it does</p>
<h2 id="features-title">Blink, speak, and follow a pose.</h2>
<p>Build the avatar in Studio. Use the same motion and expressions in your own app with the runtime.</p>
</div>
<div class="feature-grid">
<article class="feature-card">
<h3>Blink and breathe</h3>
<p>Automatic blinking, breathing, and idle motion keep the avatar moving between interactions.</p>
</article>
<article class="feature-card">
<h3>Lip sync</h3>
<p>Drive the mouth from voice levels, or preview vowel shapes and kana text in the editor.</p>
</article>
<article class="feature-card">
<h3>Head turns and tilts</h3>
<p>Control the head and gaze with pose parameters. Review the movement in the editor’s live preview.</p>
</article>
<article class="feature-card">
<h3>Hair and accessory sway</h3>
<p>Physics adds follow-through to hair strands and pendulum movement to accessories such as tassels.</p>
</article>
<article class="feature-card">
<h3>Expressions and drawings</h3>
<p>Switch smiles, surprise, and winks. Add drawn eyes and mouths for blinking and speech.</p>
</article>
<article class="feature-card">
<h3>Lighting presets</h3>
<p>Position a light over the avatar, adjust its shading, and save setups to switch between in the Live page.</p>
</article>
</div>
</section>
<section id="make" class="content-section" aria-labelledby="make-title">
<div class="section-heading">
<p class="eyebrow">Make it in Studio</p>
<h2 id="make-title">From your illustration to an avatar file.</h2>
<p>A coding agent prepares the rig and layers. You review the result and adjust the parts in a local editor.</p>
</div>
<ol class="steps">
<li class="step-card">
<div class="step-copy">
<span class="step-number" aria-hidden="true">01</span>
<h3>Give your agent an illustration</h3>
<p>Open Claude Code or Codex in the repository and ask it to follow the <a href="https://github.com/shinshin86/mesh-avatar-studio/blob/main/docs/agent-guide.md">agent guide</a>. A front-facing PNG with a transparent background works best.</p>
</div>
<figure class="screenshot">
<a class="screenshot-link" aria-label="View the editor overview screenshot at full size"><img data-screenshot="overview" width="1440" height="900" loading="lazy" decoding="async" alt="The Studio editor with the Miko illustration, rig handles, and an animated preview." /></a>
<figcaption>Open the project your agent prepares.</figcaption>
</figure>
</li>
<li class="step-card">
<div class="step-copy">
<span class="step-number" aria-hidden="true">02</span>
<h3>Review the motion</h3>
<p>Open the project in Studio. Use <strong>Pose test</strong> to turn the head and close the eyes, then choose a mouth style in <strong>Lip sync</strong>. Open <strong>Fine-tune</strong> to adjust it or try an audio file.</p>
</div>
<figure class="screenshot">
<a class="screenshot-link" aria-label="View the lip sync screenshot at full size"><img data-screenshot="lipSync" width="1440" height="900" loading="lazy" decoding="async" alt="The editor’s Lip sync tab with five mouth styles, Expressive selected and the avatar’s mouth open in the preview." /></a>
<figcaption>Check poses and speech before exporting.</figcaption>
</figure>
</li>
<li class="step-card">
<div class="step-copy">
<span class="step-number" aria-hidden="true">03</span>
<h3>Adjust by dragging handles</h3>
<p>Select a part and move its dots on the image. The preview follows your edits. If an outline changes the cut-out layers, choose <strong>Save and rebuild layers</strong>.</p>
</div>
<figure class="screenshot">
<a class="screenshot-link" aria-label="View the editing handles screenshot at full size"><img data-screenshot="handles" width="1440" height="900" loading="lazy" decoding="async" alt="A zoomed eye outline with editable points selected on the illustration." /></a>
<figcaption>Place the rig where it belongs on your drawing.</figcaption>
</figure>
</li>
<li class="step-card">
<div class="step-copy">
<span class="step-number" aria-hidden="true">04</span>
<h3>Add drawn variants for richer expressions</h3>
<p>Request drawn eyes and mouths from <strong>Drawn variants</strong> to give blinks, lip sync, and smiles more character. When it looks right, choose <strong>Export .mavatar</strong> to pack the rig, built layers, and drawings into one file.</p>
</div>
<figure class="screenshot">
<a class="screenshot-link" aria-label="View the drawn variants screenshot at full size"><img data-screenshot="variants" width="1440" height="900" loading="lazy" decoding="async" alt="The Drawn variants panel with a request for mouth drawings ready to copy to a coding agent." /></a>
<figcaption>Add drawn variants before exporting the avatar.</figcaption>
</figure>
</li>
</ol>
<p class="section-note">Start locally with <code>npm install</code> and <code>npm run dev</code>. <a href="https://github.com/shinshin86/mesh-avatar-studio#try-the-sample">Follow the setup guide <span aria-hidden="true">↗</span></a></p>
</section>
<section id="live" class="content-section" aria-labelledby="live-title">
<div class="section-heading">
<p class="eyebrow">Use it live</p>
<h2 id="live-title">Move with your face. Bring it to your stream.</h2>
<p>Studio’s Live page sends your avatar’s motion to a separate stream view that you can add to OBS.</p>
</div>
<div class="live-grid">
<article class="live-card">
<div class="live-copy">
<h3>Track your face or use your voice</h3>
<p>Start the camera and calibrate, then adjust mirroring, sensitivity, and smoothing. The camera is optional: microphone lip sync can drive the mouth while idle motion continues.</p>
</div>
<figure class="screenshot">
<a class="screenshot-link" aria-label="View the Live controls screenshot at full size"><img data-screenshot="live" width="1440" height="900" loading="lazy" decoding="async" alt="The Live page with face tracking, microphone, expression, background, and lighting controls beside Miko." /></a>
<figcaption>Camera video and microphone audio stay on your machine.</figcaption>
</figure>
</article>
<article class="live-card">
<div class="live-copy">
<h3>Add an OBS Browser Source</h3>
<p>Choose a background, copy the OBS URL, and add it as a Browser Source. Use transparency in OBS or a green background for chroma key in other capture software.</p>
</div>
<figure class="screenshot">
<a class="screenshot-link" aria-label="View the stream screenshot at full size"><img data-screenshot="stream" width="1440" height="900" loading="lazy" decoding="async" alt="The stream view showing Miko against a solid green chroma key background without editor controls." /></a>
<figcaption>A separate view for capture, with only the avatar.</figcaption>
</figure>
</article>
</div>
<p class="section-note">Both views use the local development server. Keep the Live page open in its own window while streaming. Without any setup, the <a href="./play/">Player</a> moves a .mavatar file with your camera and microphone in the browser, for OBS Window Capture. <a href="https://github.com/shinshin86/mesh-avatar-studio/blob/main/docs/reference.md#live-and-streaming">Streaming guide <span aria-hidden="true">↗</span></a></p>
</section>
<section id="embed-html" class="content-section" aria-labelledby="embed-html-title">
<div class="section-heading">
<p class="eyebrow">Embed</p>
<h2 id="embed-html-title">Embed with HTML</h2>
<p>Paste these two lines into your page to show Miko. To use your own avatar, set the src attribute to an exported .mavatar file.</p>
</div>
<div class="code-card">
<div class="code-heading"><h3>mesh-avatar-element <span>HTML</span></h3><button type="button" class="copy-button" data-copy="element-code" aria-describedby="element-feedback" disabled>Copy</button></div>
<pre tabindex="0" aria-label="Avatar embed HTML"><code id="element-code" data-lang="html"><script type="module" src="https://cdn.jsdelivr.net/npm/mesh-avatar-element@0/dist/standalone.js"></script>
<mesh-avatar></mesh-avatar></code></pre>
<p id="element-feedback" class="copy-feedback" role="status"></p>
</div>
<p class="section-note"><a href="./embed/">Try the interactive demo</a> · <a href="https://github.com/shinshin86/mesh-avatar-studio/tree/main/packages/element">Sizing, lip sync and more <span aria-hidden="true">↗</span></a></p>
</section>
<section id="embed" class="content-section" aria-labelledby="embed-title">
<div class="section-heading">
<p class="eyebrow">Embed with mesh-avatar</p>
<h2 id="embed-title">An avatar in your app’s canvas.</h2>
<p>Load the file you exported from Studio. The runtime starts animating it, and your app controls its pose, expressions, and voice level.</p>
</div>
<div class="embed-grid">
<div class="embed-details">
<ul class="runtime-facts" aria-label="Runtime requirements and format">
<li>WebGL</li><li>ES modules</li><li>TypeScript types</li><li>No React dependency</li>
</ul>
<div class="code-card">
<div class="code-heading"><h3>Install the runtime</h3><button type="button" class="copy-button" data-copy="install-code" aria-describedby="install-feedback" disabled>Copy</button></div>
<pre tabindex="0" aria-label="Install command"><code id="install-code" data-lang="shell">npm install mesh-avatar</code></pre>
<p id="install-feedback" class="copy-feedback" role="status"></p>
</div>
<p>Place your <code>.mavatar</code> file in your app’s public assets. Add the canvas to your HTML and run the JavaScript from your app’s module entry.</p>
<p>Idle motion and blinking start automatically. For speech, your app plays the audio and sends its loudness to the runtime.</p>
<a class="text-link" href="https://github.com/shinshin86/mesh-avatar-studio/tree/main/packages/runtime#drive-the-avatar">Runtime API and examples <span aria-hidden="true">↗</span></a>
</div>
<div class="embed-code">
<div class="code-card">
<div class="code-heading"><h3>Add a canvas <span>HTML</span></h3><button type="button" class="copy-button" data-copy="canvas-code" aria-describedby="canvas-feedback" disabled>Copy</button></div>
<pre tabindex="0" aria-label="Canvas HTML"><code id="canvas-code" data-lang="html"><canvas id="avatar" width="720" height="960"></canvas></code></pre>
<p id="canvas-feedback" class="copy-feedback" role="status"></p>
</div>
<div class="code-card">
<div class="code-heading"><h3>Load and control it <span>JavaScript</span></h3><button type="button" class="copy-button" data-copy="avatar-code" aria-describedby="avatar-feedback" disabled>Copy</button></div>
<pre tabindex="0" aria-label="JavaScript runtime example"><code id="avatar-code" data-lang="js">import { loadMeshAvatar } from 'mesh-avatar';
const canvas = document.querySelector('#avatar');
const avatar = await loadMeshAvatar(
canvas, '/avatars/character.mavatar'
);
// Pick an expression or set a pose.
avatar.setExpression('smile');
avatar.setParameters({ angleX: 10, gazeX: 0.25 });
// While your app plays audio, send its loudness (0–1).
avatar.setSpeaking(true);
avatar.setVoiceLevel(0.6);
// When the line finishes, return to idle.
avatar.setVoiceLevel(0);
avatar.setSpeaking(false);
avatar.setExpression('neutral');
avatar.setParameters({});
// Call avatar.destroy() when removing the canvas.</code></pre>
<p id="avatar-feedback" class="copy-feedback" role="status"></p>
</div>
</div>
</div>
</section>
</main>
<footer class="site-footer shell">
<div class="footer-top">
<div><p class="footer-brand">Mesh Avatar Studio</p><p>Create in Studio. Embed with mesh-avatar.</p></div>
<nav class="footer-links" aria-label="Project resources">
<a href="https://github.com/shinshin86/mesh-avatar-studio">GitHub</a>
<a href="https://www.npmjs.com/package/mesh-avatar">npm</a>
<a href="https://github.com/shinshin86/mesh-avatar-studio/blob/main/docs/format.md">Avatar format</a>
<a href="https://github.com/shinshin86/mesh-avatar-studio/blob/main/docs/agent-guide.md">Agent guide</a>
</nav>
</div>
<div class="license-notes">
<p>Code: <a href="https://github.com/shinshin86/mesh-avatar-studio/blob/main/LICENSE">MIT License</a>. Avatar artwork is licensed separately.</p>
<p>Miko © Yuki Shindo (AITuber OnAir). Used under the <a href="https://miko.aituberonair.com/#terms">Miko Character Usage Guidelines</a>.</p>
<p>This is not an official AITuber OnAir product.</p>
</div>
</footer>
<dialog id="code-dialog" class="code-dialog" aria-labelledby="code-dialog-title">
<div class="code-card">
<div class="code-heading">
<h2 id="code-dialog-title">How this preview works <span>JavaScript</span></h2>
<div class="code-actions">
<button type="button" class="copy-button" data-copy="demo-code" aria-describedby="demo-feedback" disabled>Copy</button>
<button type="button" class="dialog-close" data-close-dialog aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
</div>
<pre tabindex="0" aria-label="JavaScript for this preview"><code id="demo-code" data-lang="js">import { loadMeshAvatar } from 'mesh-avatar';
const canvas = document.querySelector('#avatar');
const avatar = await loadMeshAvatar(canvas, 'miko.mavatar', { padTop: -0.04 });
// Expression buttons switch the face.
for (const button of document.querySelectorAll('[data-expression]')) {
button.addEventListener('click', () => {
avatar.setExpression(button.dataset.expression);
});
}
// Talk toggles speaking; this demo sends a silent loudness curve instead of audio.
let speaking = false;
document.querySelector('#talk').addEventListener('click', () => {
speaking = !speaking;
avatar.setSpeaking(speaking);
if (!speaking) avatar.setVoiceLevel(0);
});
// Turn the head and eyes toward the pointer (x and y run from -1 to 1).
const hero = document.querySelector('.hero');
hero.addEventListener('pointermove', (event) => {
const rect = hero.getBoundingClientRect();
const x = (event.clientX - rect.left) / rect.width * 2 - 1;
const y = 1 - (event.clientY - rect.top) / rect.height * 2;
avatar.setParameters({ angleX: x * 12, angleY: y * 8, gazeX: x * 0.7, gazeY: y * 0.55 });
});
hero.addEventListener('pointerleave', () => avatar.setParameters({}));
// While talking, send a loudness value (0–1) every frame.
function frame(time) {
if (speaking) avatar.setVoiceLevel(Math.abs(Math.sin(time / 90)));
requestAnimationFrame(frame);
}
requestAnimationFrame(frame);</code></pre>
<p id="demo-feedback" class="copy-feedback" role="status"></p>
<p class="dialog-note">Simplified from this page’s script. <a href="https://github.com/shinshin86/mesh-avatar-studio/blob/main/site/src/main.ts">Full source on GitHub <span aria-hidden="true">↗</span></a></p>
</div>
</dialog>
</body>
</html>