2.0.0 • Published 2 years ago
babylon-vrm-loader v2.0.0
babylon-vrm-loader

VRM porting to babylon.js.
This loader is used as VirtualCast web VRM/VCI/glb viewer.
Supported version table
| babylon.js version | babylon-vrm-loader version |
|---|---|
| ~4.1.0 | <1.5.0 |
| ~4.2.0 | ^1.5.0 |
| ^5.19.0 | ^2.0.0 |
| ^6.0.0 | will be ^3.0.0 |
Features
- Supports
.vrmv0.x file loading- with
extensions.VRMglTF Extension - TODO VRM v1.0 file loading
- with
- Supports
.vcifile loading - Supports MToonMaterial
- Get bone(TransformNode) from Unity Humanoid bone mapping name
- BlendShape morphing
- SpringBone
- Supports VCI features(partial support)
VCAST_vci_material_unity- TODO:
VCAST_vci_meta - TODO:
VCAST_vci_embedded_script - TODO:
VCAST_vci_audios - TODO:
VCAST_vci_colliders - TODO:
VCAST_vci_rigidbody - TODO:
VCAST_vci_joints - TODO:
VCAST_vci_item
Usage
on browser
example is here.
on Babylon.js Playgound
example is here.
with npm/yarn
$ npm install --save @babylonjs/core @babylonjs/loaders babylon-vrm-loader
# or
$ yarn add @babylonjs/core @babylonjs/loaders babylon-vrm-loaderimport * as BABYLON from '@babylonjs/core'
// has side-effect
// ref. https://webpack.js.org/guides/tree-shaking#mark-the-file-as-side-effect-free
import 'babylon-vrm-loader'
// vrmFile is File object retrieved by <input type="file">.
const scene = await BABYLON.SceneLoader.LoadAsync('file:', vrmFile, engine);
const vrmManager = scene.metadata.vrmManagers[0];
// Update secondary animation
scene.onBeforeRenderObservable.add(() => {
vrmManager.update(scene.getEngine().getDeltaTime());
});
// Model Transformation
vrmManager.rootMesh.translate(new BABYLON.Vector3(1, 0, 0), 1);
// Work with HumanoidBone
vrmManager.humanoidBone.leftUpperArm.addRotation(0, 1, 0);
// Work with BlendShape(MorphTarget)
vrmManager.morphing('Joy', 1.0);Contributing
See CONTRIBUTING.md.
Build
$ yarn buildDebugging MToonMaterial
$ yarn debugYou can see inspector on http://localhost:8080/
Related Links
- BabylonJS/Babylon.js: Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
- vrm-c/UniVRM: Unity package that can import and export VRM format
- virtual-cast/babylon-mtoon-material: Unity MToon Shader WebGL porting to babylon.js.
Licenses
see LICENSE.
This project uses babylon.js with Apache License, Version 2.0.
1.7.1
2 years ago
1.7.0
2 years ago
2.0.0
2 years ago
2.0.0-alpha.3
3 years ago
2.0.0-alpha.2
3 years ago
2.0.0-alpha.1
3 years ago
1.6.0
4 years ago
1.5.1
4 years ago
1.5.0
4 years ago
1.4.13
5 years ago
1.4.12
6 years ago
1.4.8
6 years ago
1.4.7
6 years ago
1.4.6
6 years ago
1.4.5
6 years ago
1.4.4
6 years ago
1.4.3
6 years ago
1.4.2
6 years ago
1.4.1
6 years ago
1.4.0
6 years ago
1.3.4
6 years ago
1.3.3
6 years ago
1.3.2
6 years ago
1.3.1
6 years ago
1.3.0
6 years ago
1.2.3
6 years ago
1.2.2
6 years ago
1.2.1
6 years ago
1.2.0
6 years ago
1.1.0
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago