Issue with animations

Hey,

we upgraded our application to 1.35 and we now facing some issues with our animations. In Cesium 1.26

we can identify animation by there names (Attachment: Animation_Cesium-1.26.png). Apparently, in Cesium

1.35 the animations name is changed with an index number (Attachment: Animation_Cesium-1.35.png).

Could somebody please tell me, if i’am doing something wrong ?! Is it a bug ?

Thanks in advance

Jerry

Hi Jerry,

cesium now transforms gltf 1.0 to gltf 2.0 on load. You can find the source code here https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/ThirdParty/GltfPipeline/updateVersion.js

And Gltf 2.0 now uses Arrays instead of Objects.

I think you can access the gltf 1.0 names in the objects like this: animations[0].name.

So you can just iterate over the array to find the correct animation.

Best regards,

Jannes

Hey Jannes,

thanks for your answer.

the problem is, that the code within the attachements i have posted is located in ModelAnimationCollection.prototype.add.

Therefore i cannot simply modify the access to the names without modifing Cesium with every new release :\

best regards

jerry

Hi Jerry,

ah ok, i thought i was some custom code you wrote yourself. Maybe its just a bug in cesium?

Do you maybe have a sandcastle code example so someone can check?

Best regards, Jannes

Hey Jerry, this is definitely a bug related to the 1.0 to 2.0 transition. I opened a PR here: https://github.com/AnalyticalGraphicsInc/cesium/pull/5815. Let me know if that fixes it for you.

Hey Sean,

it work perfectly, thank you :slight_smile: