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:
https://codesandbox.io/p/devbox/branchly-purple-copy-yhrdkq?file=%2Findex.html

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:
https://codesandbox.io/p/devbox/branchly-purple-copy-yhrdkq?file=%2Findex.html

Can anyone help me please?