• This repository has been archived on 20/Mar/2019
  • Stars
    star
    201
  • Rank 194,491 (Top 4 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created almost 11 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OpenGL based transition for iOS.

YUGLTransition

Build Status

OpenGL based transition for iOS. Based on GPUImage.

This repository is no longer maintained.

Issue reports and pull requests will not be attended.

Overview

The YUGLTransition is a library that lets you create GPU-based transition to UIView and UIViewController.

It uses GPUImage for the rendering part.

There're some ready-to-use transition effects, like ripple, swap, doorway, flash, flyeye, etc. And it allows you to create your own custom transitions by providing your custom transition filter.

Transitions

Preset

There're six preset transition filters currently. YUGLCrossDissolveTransitionFilter YUGLFlashTransitionFilter YUGLFlyeyeTransitionFilter YUGLRippleTransitionFilter YUGLSwapTransitionFilter YUGLDoorwayTransitionFilter

Most of the preset filters are ported from glsl-transtion (A javascript library that uses WebGL Shaders to perform transition). You can see demos of the transitions here.

Custom

You can create your own transition filter by subclassing GPUImageFilter, providing your transition shaders and confirming to the YUGLTransitionFilter protocol which only have one property: progress. All the preset filters are great examples.

Pull requests for new transition filters are welcome.

Performance

Performance varies with devices and the filter you choose (the custom shader you write).

For instance, iPhone 4 is capable of performing a full-screen transition with flash transition filter, but it's hard for it to perform the transition with swap filter.

In general, iPhone 4s is capable of playing with all the transition filters currently in this project.

Note: The performance of a transition on a real device usually improves, compared to that on the simulator.

Usage

YUGLViewTransition

Use YUGLViewTransition to create view transition.

[YUGLViewTransition transitionWithView:self.imageView
                              duration:1.0
                      transitionFilter:[[YUGLFlashTransitionFilter alloc] init]
                        timingFunction:nil
                              reversed:NO
                            animations:^{
                                self.imageView.image = nextImage;
                            } completion:^(BOOL finished) {
                                NSLog(@"transition completed.");
                            }];

view : The UIView object where the transition take place.

duration : Transition duration.

transitionFilter : A GPUImageOutput<GPUImageInput,YUGLTransitionFilter> (basically a GPUImageFilter) object which is used for rendering the transition.

timingFunction : A YUMediaTimingFunction object that controls the transition animation curve. Just like CAMediaTimingFunction.

reversed : Indicates whether the reverse version of the transition should be used.

animations : A block object containing the changes to commit to the view.

completion : A block object to be executed when the transition ends.

YUGLViewControllerTransition

Use YUGLViewControllerTransition to create transitions between view controllers.

YUGLViewControllerTransition is just a class that confirms the UIViewControllerAnimatedTransitioning protocol. You can use this class in the view controller transition process. See more about UIViewControllerAnimatedTransitioning from Apple.

Requirements

  • Automatic Reference Counting (ARC)
  • iOS 7.0+
  • Xcode 5.0+
  • Demo project requires cocoapods: pod install

Contributing

If you find a bug and know exactly how to fix it, please open a pull request. If you can't make the change yourself, please open an issue after making sure that one isn't already logged.

More Repositories

1

YUCIHighPassSkinSmoothing

An implementation of High Pass Skin Smoothing using Apple's Core Image Framework
Objective-C
1,232
star
2

Vivid

Filters and Utilities for Core Image
Objective-C
478
star
3

WUEmoticonsKeyboard

Customizable emotion icons keyboard for iOS.
Objective-C
339
star
4

YUDisplacementTransition

A GPU accelerated transition library makes use of displacement maps to create distortion effects.
Swift
136
star
5

YUGPUImageHighPassSkinSmoothing

An implementation of High Pass Skin Smoothing using GPUImage
Objective-C
136
star
6

MetalLibraryArchive

Extract Metal functions from .metallib files.
Swift
114
star
7

WUTextSuggestion

A text suggestion toolkit for iOS.
Objective-C
81
star
8

WAAccountStore

A universal and extensible account system
Objective-C
53
star
9

HexagonalBokehBlur

An implementation note for "Hexagonal Bokeh Blur Filter" in MetalPetal.
49
star
10

Accelerated-CLAHE

Accelerated Contrast Limited Adaptive Histogram Equalization
40
star
11

YUCIImageView

An image view for rendering CIImage with Metal/OpenGL/CoreGraphics. Available on iOS and OS X.
Objective-C
37
star
12

YUGPUImageCVPixelBufferInput

CVPixelBuffer input for GPUImage, iOS
Objective-C
31
star
13

TDWatchInterfaceMenu

Add menu item with a block as it's action handler to `WKInterfaceController`
Objective-C
31
star
14

UIControl-Sound

A simple UIControl category for adding sounds to UI controls such as UIButton, UISwitch, UISegmentedControl, UITextField, etc.
Objective-C
30
star
15

IdentityCLUTImageGenerator

Generate 2D identity color lookup table images.
Swift
18
star
16

MetalLibraryExplorer

Parse and disassemble .metallib files in browser
JavaScript
18
star
17

MDSOfferView

A view that imitates the download/offer button in the App Store app.
Objective-C
16
star
18

NSTimer-WeakTarget

A NSTimer category which adds the support of weak target for NSTimer.
Objective-C
15
star
19

Motivate-Desktop

Motivate Desktop for WordsMotivate.me
C#
12
star
20

LogDispatcher.Swift

A more powerful println(_:)
Swift
11
star
21

ColorLookupTable2Cube

Convert color lookup table images to Adobe Cube LUT files (.cube)
Swift
10
star
22

YUSCNSceneCIRenderExtension

Render a SCNScene to CIImages.
Objective-C
6
star
23

WAKeyValuePersistenceStore

A file based Key-Value persistence store for iOS and OS X.
Objective-C
6
star
24

AudioAlignment

Estimation of audio alignment relative to a given reference.
Swift
4
star
25

ThinPlateSplineTransform

TPS for Apple platforms.
Swift
3
star
26

AudioPrism

AudioPrism implements the `AnalyserNode` functionality defined in the Web Audio API.
Swift
3
star
27

llvm-wasm

Workflows that complie LLVM to WebAssembly using emscripten
2
star
28

BRAVIATVRemoteGuide

2
star
29

TuriObjectDetectionDataAnnotator

An Object Detection Data Annotator for Turi Create
Swift
2
star
30

UserDefaultsBacked

Swift
2
star