I'm new to react-native and need some help with Animate.
Goal: to animate Image, so that it looks like its slowly breathing.(getting a little larger then smaller, then back again, constantly, like someone breathing in and out)
My images are stored in an array, inside newOrder() method:
newOrder(timeAsProp) {
const hour = timeAsProp.slice(0, 2);
let returnValue = [];
const yud = <Image key="yud" source={require('./img/yud.png')} style={Style.image} />;
const hey1 = <Image key="hey1" source={require('./img/hey1.png')} style={Style.image} />;
const vav = <Image key="vav" source={require('./img/vav.png')} style={Style.image} />;
const hey2 = <Image key="hey2" source={require('./img/hey2.png')} style={Style.image} />;
return (
<View style={Style.displayContainer}>{returnValue}</View>
);
called in the render method, like this:
{this.newOrder(parsedTime)}
its four seperate images, which are rendered and displayed together on one line. it looks like this:
letters being rendered to one word:
its important that the Image as a whole, should be breathing together in unison, and not each image on its own. heres a screen pic so you see what the image looks like, if that will help you understand the best method to make it look alive:
edit: something that would add to the animation i think, would be two things: 1)size getting larger and smaller 2)actual color patch on the letters slightly moving, maybe closer and further, like zooming in and out or something like that. i think those two together would make the breathing 3d.
so im interested in hearing peoples opinions how to do this... thnks!