Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intout Submission. (Mert Tecimen) #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Intout
Copy link

@Intout Intout commented Sep 8, 2022

That was an another fun challenge, here is a short description for my solution:

I have added a fuse scene before the actual fire animation, to achieve that:

  • Created random CGPoints in array with fixed start and end points
  • Created a fuse view and added three circles in it. There is a main circle with a contrasting circle in it; Two other are mimics the trail of the main circle with different scaling and synchronized easInOut animation.
  • Motion of the Fuse View according to randomly generated path achieved with a recursive function. Rotates the Fuse by calculating slope of the line it will go through then Fuse Views coordinate are animated to end CGPoint of the line then recursive function increments the index of the CGPoints array until the last one.

When Fuse View reaches to end point of the path, Fuse View disappears and Fire animation will appear. To achieve fire animation:

  • Created custom reusable flame shape with curved lines and animated its top middle point with AnimationPairs Time publisher and onReceive method.
  • Three reusable views arranged via rotation and positioning to achieve a similar view to requested animation.
Screen.Recording.2022-09-08.at.19.44.16.mov

@Intout Intout changed the title My Submission. (Mert Tecimen) Intout Submission. (Mert Tecimen) Sep 8, 2022
@amosgyamfi
Copy link
Collaborator

Very creative solution. Nice job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants