How to change materials while rendering for animation effect

i have a spline application from which I got the nodes and materias via their export code. it useSpline:

the spline app can be found here:

when clicking on play it animates by switching states and changing the material of the inside sphere from "“type: ashima, movement: 50” to “type: ashima, movement: 20” in the displace attribute. i want to create this animation via react-three-fiber and drei too, but don’t know how to change the materials properties while rendering. the basic export is here:

Can anyone help me please?