Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.42 KB

File metadata and controls

37 lines (28 loc) · 1.42 KB

Doom Wipe transition for SwiftUI

SwiftUI SwiftUI Swift MIT

A transition for your SwiftUI views that simulates the 1993 classic DOOM screen wipe (the melting effect, you know the one!)

Demonstration

Important

This transition utilizes SwiftUI 5's .layerEffect. AppKit/UIKit powered views will not work. This includes views like TextField.

How to use

Use it like any other transition:

import DoomWipe

MyView()
	.transition(.doomWipe)

Additionally, you can initialize a Shader with custom parameters to setup your own transitions. Or to apply the .layerEffect wherever.

import DoomWipe

let doomWipe = DoomWipeShader(
	dimensions: viewDimensions,
	animationPosition: time,
	direction: .down
)
let shader: Shader = doomWipe.shader

License

MIT License.