This plug-in allows using glTF models as configurable assets in XML3D scenes.
xml3d-gltf-plugin.js after including the xml3d.js library:
Now, including glTF assets into your scene is as easy as:
glTF models in XML3D are not static but can be configured. This requires addressing the primitive to configure.
In this example, we override the material of
<model src="resources/CesiumMilkTruck/glTF/CesiumMilkTruck.gltf"> <assetmesh name="Geometry-mesh002Node0" material="#mat"></assetmesh> </model>
This feature is still experimental. Since primitives in glTF have no identifier, we use the glTF mesh id plus the index of the primitive in the primitive array.
In the example above, the mesh's id is
Geometry-mesh002Node and the primitive has an index of
- Map skeleton animations to Xflow
- Cameras and Lights
- Shader support (currently, shader parameters are mapped to XML3D shading models)
MIT License (MIT)