How to animate an alpha transition for Sceneform node?

146 Views Asked by At

I need to apply an alpha transition effect to my Sceneform node. I tried left-to-right effect with ObjectAnimator. It works fine but in the case of alpha transition it's not working fine.

Here's what I have tried so far:

ObjectAnimator anim = ObjectAnimator.ofFloat(modelInnerNode2, "alpha", 1f, 0f);
anim.setDuration(1000);
anim.setInterpolator(new AccelerateInterpolator());
anim.setAutoCancel(true);
anim.setRepeatCount(ObjectAnimator.INFINITE);
anim.setRepeatMode(ObjectAnimator.RESTART);
anim.start();
0

There are 0 best solutions below