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
- 🎮 Interactive Controls: Play, pause, and stop animations
- 🎨 Modern UI: Clean, gradient-based interface
- ⚡ 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 VRM model specified in index.html. To use your own model:
- Place your
.vrmfile in theVRM/directory - Update the
VRM_MODEL_URLvariable inindex.html
- 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)
- Use the playback controls to manage animation
- 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
- 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 to default pose
- 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 - Update the
VRMA_ANIMATION_URLSarray inindex.html - Add corresponding buttons in the HTML
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