Closed PlopTheReal closed 2 years ago
I can't reproduce the issue. I've drag'n'dropped the asset into the three.js
editor and the 'extras' data are applied to userData
. E.g. the values from the node Cube01
in the glTF are:
"extras": {
"material": {
"type": "Wood",
"density": 0.6
},
"date": 2022
},
And later in Object3D.userData
it looks like so:
{
"name": "Cube01",
"material": {
"type": "Wood",
"density": 0.6
},
"date": 2022
}
Thanks for the quick reply. Also I didn't knew about that editor, pretty cool for testing thanks! Yes I can see it also there. I'll continue investigating what could be wrong on my end.
Ok I can see them now... forgive me I've certainly messed up in some ways with the models... At least I've heard about this player, thanks!
When loading a DRACO compressed GLTF it seems the
extras
field doesn't populates theuserData
. I've tried without DRACO compression and it works ok. For a given mesh within the GLTF (DRACO compressed):Resulting userData after loading the GLTF :
GLTF made with babylon.js glTF exporter for 3dsmax 2022 v20220210.4
Platform:
Device: [Desktop,]
OS: [Windows]
Browser: [Chrome, 100.0.4896.127]
Three.js version: 0.138.3
EDIT: added two GLTF with extras Cube_no_draco.zip Cube_draco.zip