Import an animated GLB into Babylon.js
Load a skinned character and switch its named clips in Babylon.js. Run the finished Vite starter or drop the single GLB into your own scene with ImportMeshAsync and AnimationGroup. Once Orbit plays, swap in your own Mixamo or Studio character.
Orbit sample robot
Babylon.js 9 + Vite starter · Idle and Wave · MIT
Download the Babylon.js projectOr justorbit.glbRun the finished project
- Unzip
almighty-orbit-babylonjs.zipand runnpm install. - Optional: run
npm run verifyto confirm the GLB binary, skeleton joints, and clip names offline. - Run
npm run devand open the local Vite URL. Click Idle or Wave (or press1,2, andSpace) and drag to orbit.
The starter project and orbit.glb are MIT licensed, so you can reuse them in your own Babylon.js games and tools. Built and verified with @babylonjs/core 9.32.1, @babylonjs/loaders 9.32.1, and Vite 8.4.1.
Load and switch clips in your own scene
- Install
@babylonjs/coreand@babylonjs/loaders, and import@babylonjs/loaders/glTFonce so the glTF/GLB loader registers itself. - Place
orbit.glbinpublic/models/and load it withImportMeshAsync("/models/orbit.glb", scene). - Stop the default auto-playing
result.animationGroups, then callstart(true)on whichever clip name you want (for example"Idle"or"Wave").
Babylon.js automatically starts the first AnimationGroup on glTF import unless you stop it first. If your character looks dark or tiny, frame an ArcRotateCamera from result.meshes[0].getHierarchyBoundingVectors(true) and add a HemisphericLight.
JavaScript · Babylon.js 9
import { ImportMeshAsync } from "@babylonjs/core/Loading/sceneLoader";
import "@babylonjs/loaders/glTF";
const result = await ImportMeshAsync("/models/orbit.glb", scene);
for (const group of result.animationGroups) group.stop();
const wave = result.animationGroups.find((g) => g.name === "Wave");
wave?.start(true);Verified with @babylonjs/core 9.32.1 and @babylonjs/loaders 9.32.1. Idle (2.5 seconds) moves the chest and Wave (2.4 seconds) swings the right arm.
Merge your own Mixamo character into one GLB
Download the character as FBX Binary, With Skin, then download each animation for that same character as FBX Binary, Without Skin. Name each file after the AnimationGroup name you want in Babylon.js (for example Run.fbx). Drop the character and clips together into our browser converter, preview each clip, and download one GLB. Need a smaller bundle for web delivery? Compress it with Draco and WebP in the GLB compressor without losing its skeleton or clips.