Rupert  Beatty

Rupert Beatty

1673130780

A Customizable SpriteKit Particles animation on The Border Of A View

ParticlesLoadingView

Description

With ParticlesLoadingView you can create your own amazing SpriteKit particles animations with the Xcode's built-in Particle Emitter Editor that looks like the following picture. Go ahead and create your own particles animation by doing File ➡️ New File ➡️ iOS Resource ➡️ SpriteKit Particle File.

Usage

To see it in action, run the example project, clone the repo, and run pod install from the Example directory first. The example project shows how to set up ParticlesLoadingView in a few different ways.

The easiest way to add a particles animation around the border of any UIView subclass is to use the extension method as follows:


let view = ... // Your UIView subclass here
view.addParticlesAnimation(effect: ParticleEffect.Fire) // Use a built-in effect
view.addParticlesAnimation(emitter: emitter) // Use your own SKEmitterNode

You can also use the already provided ParticlesLoadingView class to create an animation. Instantiate it by code or in Storyboard and select a built-in ParticleEffect or set the scene.emitterNode to your custom SKEmitterNode object.

var loadingView: ParticlesLoadingView = {
    let view = ParticlesLoadingView(frame: 0, y: 0, width: 75, height: 75))
    view.particleEffect = .Spark
    view.duration = 1.5
    view.layer.cornerRadius = 15.0
    return view
}()

// OR provide your own SKEmitterNode

let emitter = NSKeyedUnarchiver.unarchiveObjectWithFile(NSBundle.mainBundle().pathForResource("Spark", ofType: "sks")!) as? SKEmitterNode
if let emitter = emitter { 
    loadingView.scene.emitterNode = emitter
       loadingView.startAnimating()
}

Customizations

/// Duration in seconds of the animation to complete a tour on the border of the view.
public var duration = 2.0
    
/// The size of each particle image. This value is used to calculate the inner padding of the view path so that the emitted particles are visible.
public var particlesSize: CGFloat = 5.0
    
/// The emitter of particles that is animated along the border of the view.
public var emitterNode: SKEmitterNode? = nil

You can provide your own particle emitter node by designing an animation with the particle emitter editor and creating a SKEmitterNode. If you want to customize it further than that, the project is documented so go ahead and 🍴 it.

If you think a feature should be included in this project, submit a PR or open a new issue.

Installation

ParticlesLoadingView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ParticlesLoadingView"

You can also use Carthage if you prefer. Add this line to your Cartfile.

github "BalestraPatrick/ParticlesLoadingView"

Requirements

iOS 9.0 and Swift 3 are required.

If you are using Swift 4, please use the swift4 branch.

If you are using Swift 2.3, please use the swift2.3 branch.

Download Details:

Author: BalestraPatrick
Source Code: https://github.com/BalestraPatrick/ParticlesLoadingView 
License: MIT license

#swift #ios #animation 

What is GEEK

Buddha Community

A Customizable SpriteKit Particles animation on The Border Of A View
Rupert  Beatty

Rupert Beatty

1673130780

A Customizable SpriteKit Particles animation on The Border Of A View

ParticlesLoadingView

Description

With ParticlesLoadingView you can create your own amazing SpriteKit particles animations with the Xcode's built-in Particle Emitter Editor that looks like the following picture. Go ahead and create your own particles animation by doing File ➡️ New File ➡️ iOS Resource ➡️ SpriteKit Particle File.

Usage

To see it in action, run the example project, clone the repo, and run pod install from the Example directory first. The example project shows how to set up ParticlesLoadingView in a few different ways.

The easiest way to add a particles animation around the border of any UIView subclass is to use the extension method as follows:


let view = ... // Your UIView subclass here
view.addParticlesAnimation(effect: ParticleEffect.Fire) // Use a built-in effect
view.addParticlesAnimation(emitter: emitter) // Use your own SKEmitterNode

You can also use the already provided ParticlesLoadingView class to create an animation. Instantiate it by code or in Storyboard and select a built-in ParticleEffect or set the scene.emitterNode to your custom SKEmitterNode object.

var loadingView: ParticlesLoadingView = {
    let view = ParticlesLoadingView(frame: 0, y: 0, width: 75, height: 75))
    view.particleEffect = .Spark
    view.duration = 1.5
    view.layer.cornerRadius = 15.0
    return view
}()

// OR provide your own SKEmitterNode

let emitter = NSKeyedUnarchiver.unarchiveObjectWithFile(NSBundle.mainBundle().pathForResource("Spark", ofType: "sks")!) as? SKEmitterNode
if let emitter = emitter { 
    loadingView.scene.emitterNode = emitter
       loadingView.startAnimating()
}

Customizations

/// Duration in seconds of the animation to complete a tour on the border of the view.
public var duration = 2.0
    
/// The size of each particle image. This value is used to calculate the inner padding of the view path so that the emitted particles are visible.
public var particlesSize: CGFloat = 5.0
    
/// The emitter of particles that is animated along the border of the view.
public var emitterNode: SKEmitterNode? = nil

You can provide your own particle emitter node by designing an animation with the particle emitter editor and creating a SKEmitterNode. If you want to customize it further than that, the project is documented so go ahead and 🍴 it.

If you think a feature should be included in this project, submit a PR or open a new issue.

Installation

ParticlesLoadingView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ParticlesLoadingView"

You can also use Carthage if you prefer. Add this line to your Cartfile.

github "BalestraPatrick/ParticlesLoadingView"

Requirements

iOS 9.0 and Swift 3 are required.

If you are using Swift 4, please use the swift4 branch.

If you are using Swift 2.3, please use the swift2.3 branch.

Download Details:

Author: BalestraPatrick
Source Code: https://github.com/BalestraPatrick/ParticlesLoadingView 
License: MIT license

#swift #ios #animation 

Monotone: An Unsplash Application for IOS

Monotone

Monotone is a Modern Mobile Application, integrated with powerful Unsplash API provided by Unsplash. It implemented almost all features including viewing, searching, collecting photos. And other features, such as profile, license, FAQ are supported as well.

This is an un-official application, exploring the feasibility of some conceptions is the goal of this project. Written in Swift, triggered by RxSwift, draw responsive constraints using SnapKit.

If you like this project or inspired by any ideas of this project, please star it without any hesitation. (ヽ(✿゚▽゚)ノ)

Overview

screen-record-1.gif screen-record-2.gif



 

Development Progress

Features

  •  Write Interfaces Programmatically
  •  Dark Mode Support
  •  Animation Effects
  •  Localization
  •  Powered by Unsplash API
  •  More...

Tasks

Currently supported tasks:

PositionModulePageStyle & LayoutPowered by DataAnimation EffectsLocalization
MainLoginSign Up & Sign In
PhotoList (Search & Topic)
View
Camera Settings
Collect (Add & Remove)
Share to SNS⬜️
Save to Album
Side MenuProfileDetails
MenuMy Photos
Hiring⬜️
Licenses
Help⬜️
Made with Unsplash⬜️
Tab BarStoreHome⬜️
Details⬜️
WallpaperList (Adapt Screen Size)⬜️
CollectionList
ExploreList (Photo & Collection)⬜️



 

Getting Started

This application uses Cocoapods to manage dependencies. Please refer to Cocoapods Offical Website to install & configure(If you already installed Cocoapods, skip this).

Prerequisites

Monotone is trigged by Unsplash API . The very first thing must be done is applying a pair of OAuth key to run it.

  1. Visit Unsplash, sign up then sign in.(If you already have an account, skip this).
  2. Visit Unsplash Application Registration Platform agree with terms and create a new application, the application name and description can be anything.
  3. After the application was created,it will redirect to the application details page automatically (Also can be found from https://unsplash.com/oauth/applications). At Redirect URI & Permissions - Redirect URI section, input monotone://unsplash, make sure all authentication options are checked, just like the image shown below.

  1. After the work is finished, check ”Access Key“ and ”Secret Key“ on this page, they will be used soon.

Installation

  1. Execute the following commands in the terminal:
# Clone to a local folder
git clone https://github.com/Neko3000/Monotone.git

# Direct to Project folder
cd Monotone

# Install Pods
pod install
  1. Under Monotone folder, duplicate config_debug.json file,and rename it to config.json(This file is ignored by .gitignore);
  2. Open config.json ,input your ”Access Key“ and ”Secret Key“,they will be copyed to APP folder when running.(For more information, please refer to the content in Project->Build Phases->Run Script and APPCredential.swift );
  3. Done,command + R。

     

Dependencies

ProjectDescription
RxSwiftFramework for Reactive Async Programming.
ActionBased on RxSwift,encapsulate actions for calling。
DataSourcesBased on RxSwift,extend logic interaction of tableview and collectionview。
AlamofireHTTP network library.
SwiftyJSONHandle JSON format data effectively.
ObjectMapperMap data between models and JSON.
KingfisherNetwork image cache libray with many functions.
SnapKitMake constraints effectively.
......

For more information,please check Podfile

Project Structure

The basic structure of this project.

Monotone 
├── Monotone
│   ├── /Vars  #Global Variables
│   ├── /Enums  #Enums (Includes some dummy data)
│   ├── /Application
│   │   ├── AppCredential  #Authentication Credential
│   │   ...
│   │   └── UserManager  #User Managment
│   ├── /Utils  #Utils
│   │   ├── /BlurHash  #Photo Hash
│   │   ├── ColorPalette  #Global Colors
│   │   ├── AnimatorTrigger  #Animation Effects
│   │   └── MessageCenter  #Message Notification
│   │── /Extension  #Extensions
│   │── /Services  #Services
│   │   ├── /Authentication  #Requests of Authentication
│   │   └── /Network  #Requesets of Data
│   │── /Components  #View Classes
│   │── /ViewModels  #View Models
│   │── /ViewControllers  #View Controllers
│   │── /Models  #Data Models
│   │── /Coordinators  #Segues
│   └── /Resource  #Resource
└── Pods


Designing

The interface you are seeing are all designed by Addie Design Co. They shared this document, everyone can free download it and use it. Those design elements and their level of completion are astonishing. This application would not be here without this design document.

Thanks again to Addie Design Co and this beautiful design document.



 

About Unsplash

Unsplash is a website dedicated to sharing high-quality stock photography under the Unsplash license. All photos uploaded by photographers will be organized and archived by editors.

And this website is one of my favorites, admired for its artistic, the spirit of sharing.
You will find my home page here. (Not updated frequently since 2020)



 

Contributing

Limited by data Unsplash API provides, some parts of this application only finished their styles and layouts(Almost in store, explore, etc). If the API provides more detailed data on these parts in the future, we will add new features as soon as possible.

Meanwhile, focusing on the current application, we will improve it continuously.

How to Participate in

If you are an experienced mobile application developer and want to improve this application. You are welcomed to participate in this open-source project. Practice your ideas, improve even refactor this application.

Follow standard steps:

  1. Fork this repo;
  2. Create your new Branch (git checkout -b feature/AmazingFeature);
  3. Add Commit (git commit -m 'Add some AmazingFeature');
  4. Push to remote Branch (git push origin feature/AmazingFeature);
  5. Open a Pull Request.

For anyone, open an issue if you find any problems. PRs are welcome.


Author: Neko3000
Source code: https://github.com/Neko3000/Monotone
License: MIT license

#swift 

James Daneil

1580992154

Learn Character Design in After Effects 2D Animation Course

With the help of this course, you can learn to create and animate characters who express with body language in After Effects. Our personal purpose is to help anyone interested in Animation to start practicing with little projects, simple Characters, and most of all, explore the expressiveness of their Body Language and Character Acting. Many people seldom to start learning 2D animation because they are convinced that you need to know how to draw. While drawing skills can help you to improve, that is not the essential skill to do animation. For animation you need to understand the most basic principles in animation, like timing, anticipation, pose to pose. This course is divided into 3 parts theory, rigging and animation which will help you learn how to design characters, character animation and body language expressions. Enroll now and Learn to create 2D Animation in After Effects.

#2d animation #character animation #character rigging #learn animation #animation courses

Carmelo  Hauck

Carmelo Hauck

1625663340

Animations in Flutter - 3. Cloning Animation

In this video tutorial, we are going to build a simple animation using flutter. In this animation, two circle containers overlap each other, the animation will separate these circles and make it look like a single container is cloning itself.

Source code: https://github.com/Flutter-Zone/Cloning-Animation

Let’s start our animation app. :)

#flutter #animations in flutte #cloning animation #animations

Harsha  Shirali

Harsha Shirali

1669174554

Replace Elements in Python NumPy Array with Example

In this article, we will learn how to replace elements in Python NumPy Array. To replace elements in Python NumPy Array, We can follow the following examples.

Example 1 : Replace Elements Equal to Some Value

The following code shows how to replace all elements in the NumPy array equal to 8 with a new value of 20:

#replace all elements equal to 8 with 20
my_array[my_array == 8] = 20

#view updated array
print(my_array)

[ 4  5  5  7 20 20  9 12]

Example 2: Replace Elements Based on One Condition

The following code shows how to replace all elements in the NumPy array greater than 8 with a new value of 20:

#replace all elements greater than 8 with 20
my_array[my_array > 8] = 20

#view updated array
print(my_array)

[ 4  5  5  7  8  8 20 20]

Example 3: Replace Elements Based on Multiple Conditions

The following code shows how to replace all elements in the NumPy array greater than 8 or less than 6 with a new value of 20:

#replace all elements greater than 8 or less than 6 with a new value of 20
my_array[(my_array > 8) | (my_array < 6)] = 20

#view updated array
print(my_array)

[20 20 20  7  8  8 20 20]

#python