Babylonjs react native: animation and shadows

Hi,
I am making an app with babylonjs react native on android with gltf model.
I have two questions:

  1. you can do the animation in the model or programmatically with gsap. Which is better performance?
  2. the shadows: which is better: in the model or programmatically with babylonjs?
    Thanks

For your questions -

  1. I don’t know gsap that well, so I am not sure what performance reduction is possible when using it, but I can only assume you can profile this and have a well tested answer :-). Babylon offers everything you need to do the animations yourself. I would use it, unless gsap offers something that you can’t do with babylon itself.
  2. baking will perform better, of course. but the shadows will not be dynamic. they are fixed. change the light direction, add another object, move any mesh, and the shadows are incorrect. so it all depends on the scene.
1 Like