Draw Lines, circles and points in the react native like animation - react-native

const array_data = [{x:12,y:13,duration:1,type:"point"},{x:14,y:16,duration:3,type:"point"},{x:20,y:20,duration:3,type:"point"},{x:55,y:55,duration:1,type:"point"},{x:55,y:55,duration:1,type:"circle"}]
I want to draw these points like animation. So that as it will start start draw from
array_data[0] and draw till last length of the array. Also signify what it has to draw like point, line ,circle, eclipse. I tried with redraw library and animated view library but not able to get how can i achieve this animation.
Let me know if anybody have a good idea to get this in react native. Thanks for your time and give some good suggestions.

Related

How to make an interactive ImageMap in React Native?

I am trying to create some sort of map, which is actually a large image, that needs to have specific spots where you can touch to see more info. So far I've found react-native-image-mapper which seems to work for the image map but I haven't been able to figure out how to make the pan effect to drag and move around the image inside the View.
Can anyone please help me out or point me in the right direction?
Thanks in advance!

React Native - changing graphic of an animation whilst animating

My developer is running into a problem, that he says is impossible to do in React Native and I just don't believe him. Can this be done:
I have an animation of a ball moving along a linear scale
As this ball moves along the scale, when it passes certain values, the image of the ball is meant to change (ie from values 1-4 = Image1, 5-7 Image2 etc)
The change in the image should not affect the "flow" of the moving graphic
Is this possible?
What my developer has done is to calculate the length of time it takes the ball to reach each "change" value (5 in the above example) and change the image at these times, using a TimeOut to load the new image. The result is almost OK, but has a "jittery" effect and therefore doesn't look how I want it to look.
Are there any other possibilities with React Native?
Thanks.
Best regards,
A

custom circle , polygon, drawing line from one place to another in react native

I have google Map. in react native Now I want to draw circle on any location I want with 2km radius and I also want to draw line from on location to another location. is possible. if yes please tell me how.

How to do that blur at the end of horizontal flatlist?

I'm building weather app and want to do this blur at the end of View of hour forecast, I've tried to use linear gradient, but I wasn't able to figure out, how to do that.
Thanks in advice :)
There is showed that blur, that I want to achieve. https://imgur.com/a/LZ4Rv6b
I've tried react-native-linear-gradient, but I didn't figure out, making that with this library.
I'm using react-native-svg to create such effect in my app.
Just use the LinearGradient to create a view with gradient fill of your blue with different stopOpacity values

how to create a bubbles game UI in android

I want to create a bubbles like game in android and I'm not sure how to draw the graphics.
Should I use canvas ? Every bubble should be a bitmap or maybe an image view ?
Another thing, I want to be able to rotate / scale the bubbles.
I've tried with bitmaps and canvas but wasn't able to rotate the bubbles.
Image view for every bubble looks like a mess to me.
Your help is appreciated.
Thanks
If you want to make a game, I would suggest using a Canvas, and put the Canvas over most, or all, of your layout. Creating anything but the most basic game using the regular UI structures would be a nightmare.
It sounds like you've gotten to the point where you can load the bubble images and draw them to the canvas, which is good. As for rotating the bubbles, use this:
Matrix rotator = new Matrix();
rotator.postRotate(90);
canvas.drawBitmap(bitmap, rotator, paint);
That was from an answer to this SO question, which was more specifically about rotating bitmaps on a Canvas.
For more information on making games in Android, this book was pretty helpful for me.
Hope that helps!