Latest 1.0
Homepage https://github.com/yuao/YUDisplacementTransition
License MIT
Platforms ios 10.0
Dependencies MetalPetal/Swift
Authors

Version
License
Platform

A GPU accelerated transition library which makes use of displacement maps to create distortion effects.

Inspired by hover-effect.

Built with MetalPetal.

Example

example 1example 2

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage

Displacement Map

A displacement map is a image file used to create distortion effects for the transition.

YUDisplacementTransition.Options

displacementIntensity Intensity of the distortion effect.

duration Transition duration.

timingFunction Timing function for the transition. Defaults: CubicEaseOut. More timing functions can be found at AHEasing.

angle The angle applied to the distortion effect, in radian.

YUViewControllerDisplacementTransition

Conforms to UIViewControllerAnimatedTransitioning protocol, can be used in view controller transitions.

YUCGImageDisplacementTransition

Can be used to transition between two CGImages.

YUDisplacementTransition

Can be used to transition between two MTIImages.

Installation

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

pod 'YUDisplacementTransition'

Credits

Robin Dela for the javascript library hover-effect.

Photos from Unsplash.

Live demo by Codrops.

License

YUDisplacementTransition is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "YUDisplacementTransition",
    "version": "1.0",
    "summary": "A GPU accelerated displacement transition library.",
    "description": "A GPU accelerated transition library which makes use of displacement maps to create distortion effects.",
    "homepage": "https://github.com/yuao/YUDisplacementTransition",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "yuao": "[email protected]"
    },
    "source": {
        "git": "https://github.com/yuao/YUDisplacementTransition.git",
        "tag": "1.0"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "YUDisplacementTransition/Classes/**/*",
    "dependencies": {
        "MetalPetal/Swift": []
    },
    "swift_versions": "5.0"
}

Pin It on Pinterest

Share This