All Projects → alexiscn → MTTransitions

alexiscn / MTTransitions

Licence: MIT license
iOS Transitions ports from GL-Transitions.

Programming Languages

Metal
113 projects
swift
15916 projects

Projects that are alternatives of or similar to MTTransitions

Starwars.android
This component implements transition animation to crumble view into tiny pieces.
Stars: ✭ 1,942 (+991.01%)
Mutual labels:  glsl, transition
Pmtech
Lightweight, multi-platform, data-oriented game engine.
Stars: ✭ 478 (+168.54%)
Mutual labels:  metal, glsl
YALCT
Yet Another Live Coding Tool - Powered by Veldrid and elbow grease
Stars: ✭ 25 (-85.96%)
Mutual labels:  metal, glsl
Gl Transitions
The open collection of GL Transitions
Stars: ✭ 877 (+392.7%)
Mutual labels:  glsl, transition
Crossshader
⚔️ A tool for cross compiling shaders. Convert between GLSL, HLSL, Metal Shader Language, or older versions of GLSL.
Stars: ✭ 113 (-36.52%)
Mutual labels:  metal, glsl
Metalfilters
Instagram filters implemented in Metal
Stars: ✭ 272 (+52.81%)
Mutual labels:  metal, glsl
Colormap Shaders
A collection of shaders to draw color maps.
Stars: ✭ 315 (+76.97%)
Mutual labels:  metal, glsl
Ouzel
C++ game engine for Windows, macOS, Linux, iOS, tvOS, Android, and web browsers
Stars: ✭ 607 (+241.01%)
Mutual labels:  metal, glsl
Glsl Optimizer
GLSL optimizer based on Mesa's GLSL compiler. Used to be used in Unity for mobile shader optimization.
Stars: ✭ 1,506 (+746.07%)
Mutual labels:  metal, glsl
Shaderconductor
ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages
Stars: ✭ 1,146 (+543.82%)
Mutual labels:  metal, glsl
Krafix
GLSL cross-compiler based on glslang and SPIRV-Cross
Stars: ✭ 124 (-30.34%)
Mutual labels:  metal, glsl
Yudisplacementtransition
A GPU accelerated transition library makes use of displacement maps to create distortion effects.
Stars: ✭ 121 (-32.02%)
Mutual labels:  metal, transition
Pmfx Shader
Cross platform shader system for HLSL, GLSL, Metal and SPIR-V.
Stars: ✭ 245 (+37.64%)
Mutual labels:  metal, glsl
ModularMusicVisualizer
Project in Hiatus, unmaintained, being rewritten privately. Will Open Source when stuff is ready. Project will be Renamed.
Stars: ✭ 81 (-54.49%)
Mutual labels:  glsl
Signed
Signed is a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.
Stars: ✭ 90 (-49.44%)
Mutual labels:  metal
haxe-shaderfun
lyapunov fat fractals haxe prodecure
Stars: ✭ 14 (-92.13%)
Mutual labels:  glsl
ofxShadertoy
Addon for openFrameworks that sets up and loads Shadertoy (http://www.shadertoy.com) shaders
Stars: ✭ 77 (-56.74%)
Mutual labels:  glsl
sparksl-noise
minimum proof of concept about procedural noise generation in SparkAR's shader language (SparkSL).
Stars: ✭ 16 (-91.01%)
Mutual labels:  glsl
Unity3D-Plane-Clipping
Plane clipping shaders for Unity3D 5. Extends the Standard shader!
Stars: ✭ 84 (-52.81%)
Mutual labels:  glsl
edge detector
HED real-time iOS edge detector.
Stars: ✭ 40 (-77.53%)
Mutual labels:  metal

MTTransitions

Transitions ports from GL-Transitions to Metal.

Features

  • Up to 76 transitions
  • Image Transitions
  • UIView Transitions
  • UIViewController Push Transtions
  • UIViewController Present Transitions
  • Video Merge Transitions
  • Create video from images with transitions
  • Create video from images with transitions and background music

Requirements

  • iOS 10.0 +
  • Xcode 11.0 +
  • Swift 5.0 +

Transitions

Support Following Transitions:

  • MTAngularTransition
  • MTBounceTransition
  • MTBowTieHorizontalTransition
  • MTBowTieVerticalTransition
  • MTBurnTransition
  • MTButterflyWaveScrawlerTransition
  • MTCannabisleafTransition
  • MTCircleCropTransition
  • MTCircleTransition
  • MTCircleOpenTransition
  • MTColorPhaseTransition
  • MTColourDistanceTransition
  • MTCrazyParametricFunTransition
  • MTCrossZoomTransition
  • MTCrossHatchTransition
  • MTCrossWarpTransition
  • MTCubeTransition
  • MTDirectionalTransition
  • MTDirectionalWarpTransition
  • MTDirectionalWipeTransition
  • MTDisplacementTransition
  • MTDoomScreenTransition
  • MTDoorwayTransition
  • MTDreamyTransition
  • MTDreamyZoomTransition
  • MTFadeTransition
  • MTFadeColorTransition
  • MTFadegrayscaleTransition
  • MTFlyeyeTransition
  • MTGlitchDisplaceTransition
  • MTGlitchMemoriesTransition
  • MTGridFlipTransition
  • MTHeartTransition
  • MTHexagonalizeTransition
  • MTInvertedPageCurlTransition
  • MTKaleidoScopeTransition
  • MTLinearBlurTransition
  • MTLumaTransition
  • MTLuminanceMeltTransition
  • MTMorphTransition
  • MTMosaicTransition
  • MTMultiplyBlendTransition
  • MTPerlinTransition
  • MTPinwheelTransition
  • MTPixelizeTransition
  • MTPolarFunctionTransition
  • MTPolkaDotsCurtainTransition
  • MTRadialTransition
  • MTRandomSquaresTransition
  • MTRippleTransition
  • MTRotateScaleFadeTransition
  • MTSimpleZoomTransition
  • MTSquaresWireTransition
  • MTSqueezeTransition
  • MTStereoViewerTransition
  • MTSwapTransition
  • MTSwirlTransition
  • MTTangentMotionBlurTransition
  • MTTVStaticTransition
  • MTUndulatingBurnOutTransition
  • MTWaterDropTransition
  • MTWindTransition
  • MTWindowBlindsTransition
  • MTWindowSliceTransition
  • MTWipeDownTransition
  • MTWipeLeftTransition
  • MTWipeRightTransition
  • MTWipeUpTransition
  • MTZoomInCirclesTransition

Installation

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

pod MTTransitions

Get Started

Each transition requires two input MTIImage. Image should be .oriented(.downMirrored).

import MTTransitions

let transition = MTBounceTransition()
transition.inputImage = <from Image>
transition.destImage = <to Image>

// animate progress from 0.0 to 1.0

imageView.image = transition.outputImage

UIView Transition

let effect = MTPerlinTransition()

MTTransition.transition(with: view, effect: effect, animations: {
    // Do your animation to your view
}) { (_) in
    // Transition completed
}

UIViewController Push Transition

class PushAViewController: UIViewController {

    private let transition = MTViewControllerTransition(transition: MTBurnTransition())
    
    // ...
}

extension PushAViewController: UINavigationControllerDelegate {
    
    func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationController.Operation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        if operation == .push {
            return transition
        }
        return nil
    }
}

UIViewController Present Transition

class PresentAViewController: UIViewController {

    // ...
    
    let vc = PresentBViewController()
    vc.modalPresentationStyle = .fullScreen
    vc.transitioningDelegate = self
    present(vc, animated: true, completion: nil)
}

extension PresentAViewController: UIViewControllerTransitioningDelegate {
    
    func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return transtion
    }
    
    func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return transtion
    }
}

Video Transition

MTTransitions also support merging videos with transitions.

  • Support merge multiple video files
  • Support multiple transition effects
  • Support different multiple render size.
  • Support passthrough transition.
// pick one transtion effect
let effect = MTTransition.Effect.wipeLeft
let duration = CMTimeMakeWithSeconds(2.0, preferredTimescale: 1000)
try? videoTransition.merge(clips,
                           effect: effect,
                           transitionDuration: duration) { [weak self] result in

    guard let self = self else { return }
    let playerItem = AVPlayerItem(asset: result.composition)
    playerItem.videoComposition = result.videoComposition
    
    self.player.seek(to: .zero)
    self.player.replaceCurrentItem(with: playerItem)
    self.player.play()
}

Please refer VideoTransitionSampleViewController and MultipleVideoTransitionsViewController for more details.

Create Video From Images

MTMovieMaker support create video from a sequence images with transitions. You can also pass a local audio file url to MTMovieMaker to create background music.

let fileURL = URL(fileURLWithPath: path)
movieMaker = MTMovieMaker(outputURL: fileURL)
do {
    try MTMovieMaker?.createVideo(with: images, effects: effects) { result in
        switch result {
        case .success(let url):
            print(url)
        case .failure(let error):
            print(error)
        }
    }
} catch {
    print(error)
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].