A web-based VRM (Virtual Reality Model) viewer with VRMA (VRM Animation) support built using Three.js and the three-vrm library.
- ๐ฑ Responsive Design: Works on desktop and mobile devices
- ๐ญ VRM Model Support: Load and display VRM 1.0 models
- ๐ฌ VRMA Animation: Play custom VRMA animation files
- ๐ Drag & Drop: Load your own
.vrm/.vrmafiles by dropping them onto the page or using the file picker - ๐ฎ Interactive Controls: Play, pause, and stop animations with smooth crossfades between clips
- ๐ฆด Pose Editing: Rotate every humanoid bone (including fingers) with sliders, or click a bone handle in the 3D view and drag the rotation gizmo directly
- ๐ Facial Expressions: Control every expression the model defines (emotions, visemes, blinking, custom clips) with weight sliders
- ๐ Gaze Control: Aim the eyes with yaw/pitch sliders, or let them follow your mouse cursor
- ๐๏ธ Collapsible UI: Tabbed control panel (Animation / Pose / Face) that can be hidden entirely with the โฐ toggle
- โก Fast Performance: Optimized rendering and animations
Open index.html in a web browser to see the demo. The viewer includes:
- A sample VRM model (sample.vrm)
- Eleven VRMA animation examples:
- Angry: Angry emotion animation
- Blush: Blushing emotion animation
- Clapping: Clapping hands animation
- Goodbye: Waving goodbye animation
- Jump: Jumping action animation
- LookAround: Looking around animation
- Relax: Relaxed pose animation
- Sad: Sad emotion animation
- Sleepy: Sleepy emotion animation
- Surprised: Surprised emotion animation
- Thinking: Thinking pose animation
vrm_viewer/
โโโ index.html # Main viewer application
โโโ VRM/
โ โโโ sample.vrm # Sample VRM model
โโโ VRMA/
โ โโโ Angry.vrma # Angry emotion animation
โ โโโ Blush.vrma # Blushing emotion animation
โ โโโ Clapping.vrma # Clapping hands animation
โ โโโ Goodbye.vrma # Waving goodbye animation
โ โโโ Jump.vrma # Jumping action animation
โ โโโ LookAround.vrma # Looking around animation
โ โโโ Relax.vrma # Relaxed pose animation
โ โโโ Sad.vrma # Sad emotion animation
โ โโโ Sleepy.vrma # Sleepy emotion animation
โ โโโ Surprised.vrma # Surprised emotion animation
โ โโโ Thinking.vrma # Thinking pose animation
โโโ README.md # This file
โโโ README-jp.md # Japanese documentation
- Fork or upload this repository to GitHub
- Enable GitHub Pages:
- Go to your repository's Settings
- Scroll down to "Pages" section
- Under "Source", select "Deploy from a branch"
- Choose "main" branch and "/ (root)" folder
- Click "Save"
- Access your demo at
https://YOUR-USERNAME.github.io/YOUR-REPOSITORY-NAME/
- Clone or download this repository
- Start a local web server (required for loading files):
# Using Python python -m http.server 8000 # Using Node.js npx serve . # Using PHP php -S localhost:8000
- Open your browser and navigate to
http://localhost:8000 - Load the VRM model (automatically loads on page load)
- Select animations using the VRMA buttons
- Control playback with Play, Pause, and Stop buttons
The viewer automatically loads the bundled sample.vrm on startup. To use your own model, either:
- Drag and drop a
.vrmfile anywhere onto the page, or - Click "Open .vrm / .vrmaโฆ" and pick a
.vrmfile
The new model replaces the current one immediately; any previously loaded VRMA buttons stay available and can be re-selected to build a clip against the new model.
- Wait for the VRM model to load completely
- Click any of the VRMA animation buttons to select an animation (Angry, Blush, Clapping, Goodbye, Jump, LookAround, Relax, Sad, Sleepy, Surprised, or Thinking) โ or drag and drop your own
.vrmafile / use the file picker to add it as a new button - Use the playback controls to manage animation; switching to a new clip while one is already playing crossfades smoothly instead of snapping to the default pose
Switch to the Pose tab to sculpt the model's pose by hand:
- Every humanoid bone has X/Y/Z rotation sliders (in degrees); finger and other detail bones are tucked into a collapsible section
- With 3D Bone Handles enabled, click a sphere on the model to select that bone, then drag the rotation gizmo directly in the viewport โ the sliders and gizmo stay in sync both ways
- Reset Pose returns every bone to the rest pose
- Opening the Pose tab while an animation is playing freezes the current frame so you can edit from it; pressing Play later hands the skeleton back to the animation (edits are not blended)
Switch to the Face tab to control the model's face:
- Expression sliders (0โ1 weight) are generated from whatever the loaded model defines: emotion presets, mouth visemes, blinking, and any custom expressions
- Look At yaw/pitch sliders aim the eyes manually, or enable Follow Mouse to have the gaze track your cursor (works even while an animation plays)
- Reset Face zeroes all expressions and re-centers the gaze
- Like the Pose tab, opening it mid-animation freezes the current facial state for editing
- Rotate: Left-click and drag to rotate the camera around the model
- Pan: Right-click and drag to move the camera horizontally/vertically
- Zoom: Scroll with mouse wheel to zoom in/out
- โฐ Toggle: Show or hide the whole control panel (animations, pose edits, and gaze tracking keep running while it's hidden)
- Animation / Pose / Face Tabs: Switch between playback, bone posing, and facial controls
- VRMA Animation Buttons: Select and load different animations
- Play: Start or resume animation playback
- Pause: Pause/unpause the current animation
- Stop: Stop animation and reset pose, expressions, and gaze to default
- Three.js - 3D graphics library
- @pixiv/three-vrm - VRM model support
- @pixiv/three-vrm-animation - VRMA animation support
- Format: VRMA (VRM Animation) files in glTF binary format
- Humanoid Bones: Compatible with VRM 1.0 humanoid specification
- Frame Rate: 60 FPS with linear interpolation
- Duration: Variable (4-12 seconds for included animations)
- โ Chrome 80+
- โ Firefox 75+
- โ Safari 14+
- โ Edge 80+
- Create or obtain VRMA animation files
- Place them in the
VRMA/directory - Add a
{ name, url }entry to theVRMA_ANIMATIONSarray inindex.htmlโ its button is generated automatically, no HTML changes needed
The interface uses CSS custom properties for easy theming. Key variables:
- Background colors and gradients
- Button styling and hover effects
- Control panel appearance
- Responsive breakpoints
This project is for demonstration purposes. Please ensure you have appropriate rights for any VRM models and animations you use.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request