Code Monkey home page Code Monkey logo

sharingan-loader's Introduction

Sharingan Loader for iOS

Animated sharingan loader for iOS projects. This is a fun project created using SwiftUI with love for the Uchiha clan. More types of eyes to come with tons of customizations...
Feel free to create an issue for suggestions or feature requests.

platform  GitHub license  Repository size  GitHub stars  GitHub forks  GitHub follow

The mangekyou sharingan is awakened after 4x `animationDuration`.

Sharingan Mangekyou Sharingan

What's New ?

  • [v0.2.0] Sharingan loader with Mangekyou transformation.
  • [v0.1.3] Sharingan loader with 3 tomoe.

Languages / Frameworks Used

  • SwiftUI
  • Swift

The project is built supporting iOS 14 and above.

How to use?

First add the project using Swift Package Manager like this -

dependencies: [
    .package(url: "https://github.com/Fury-2K/Sharingan-Loader.git", from: "0.1.3")
]

In the codebase you can do the following to use the loader -

  1. Add import SharinganLoader
  2. Use the following code to embed the loader.
SharinganLoader(diameter: 150,
              animationDuration: 1, 
              backgroundDarkness: 0.2, 
              isVisible: $showingLoader,
              shouldTransformToMangekyou: true)

The initializer is like - 
SharinganLoader(diameter: CGFloat,
              animationDuration: Double,
              backgroundDarkness: Double,
              isVisible: Binding<Bool>,
              shouldTransformToMangekyou: Bool)

This has the following properties to help customize -

/// Diameter of the sharingan eye.
var diameter: CGFloat

/// Time taken for the eye to complete 1 full rotation.
var animationDuration: Double

/// Black background intensity. 
/// Range => 0 to 1
var backgroundDarkness: Double

/// Binding var to toggle loader visibility.
@Binding var isVisible: Bool

/// Toggle to allow mangekyou sharingan awakening.
var shouldTransformToMangekyou: Bool
  • diameter- Diameter aka width and height for the sharingan eye. This has a default value of 100.
  • animationDuration- As the name suggests, is used for animation duration for the loader view. This is set to a default value of 1 seconds.
  • backgroundDarkness- This is the intensity of darkness behind the loader. 0 being the lowest and 1 being the highest. This has a default value of 0.2.
  • isVisible- This is the binding boolean which shows the loading indicator view if set to true and vic versa.
  • shouldTransformToMangekyou- This sets if the mangekyou sharingan will awaken or not.

Looking to contribute?

  • Feel free to add other loaders related to the anime.
  • Raise the PR. I will be happy to review and merge it :)

Having trouble?

  • If you are having trouble with this project or if you find any bugs, do open a new issue and describe the problem.
  • Alternatively, you can drop me a mail @ [email protected].

Follow if you like it, ⭐️ if you love it.

Credits

© Manas Aggarwal | 2021

sharingan-loader's People

Contributors

fury-2k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sharingan-loader's Issues

Mangekyou Sharingan

Thanks for such an awesome HUD!
It works and looks great 👍

Is it possible to add the Mangekyou Sharingan feature? For example, for some long-term tasks like file downloading this simple sharingan may transform to the Mangekyou Sharingan!

Just imagine like user with really poor network connection is waiting while its favourite Naruto episode is downloading, it's pity. But suddenly Mangekyou Sharingan appears and now user is cheered up 😉

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.