GLTF loader extension

Hey there,

Looking at the documentation for the GLTF loader extension, there is a callback for when a material is imported:

But seems like there is no callback for when a mesh is imported.
I would have expected to see something like:

loadMeshPropertiesAsync(
context: string,
node: BABYLON.GLTF2.Loader.INode,
mesh: BABYLON.GLTF2.Loader.IMesh,
primitive: BABYLON.GLTF2.Loader.IMeshPrimitive,
babylonMesh: Mesh
): Nullable<Promise>

Am I missing something?

Thanks!

@bghgary

Welcome to the forums!

There are two undocumented ones that I haven’t exposed because I’m not confident of their function signature. They can still change. Use at your own risk.

2 Likes

@bghgary Thanks for your quick answer!

Looks like _loadMeshPrimitiveAsync is a good fit.
Do you have any example/playground showing its usage?

Thanks!

This is the only usage within the code base.

2 Likes