Skip to content

Commit

Permalink
Refined readme
Browse files Browse the repository at this point in the history
  • Loading branch information
frzi committed Aug 19, 2024
1 parent ca381dd commit 10cc526
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Binary file added Misc/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Misc/readme-title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Doom Wipe transition for SwiftUI
<img src="Misc/readme-title.png" alt="Doom Wipe transition for SwiftUI" width="726px">

![SwiftUI](https://img.shields.io/github/v/release/frzi/swiftui-doomwipe?style=for-the-badge)
[![SwiftUI](https://img.shields.io/badge/SwiftUI-blue.svg?style=for-the-badge&logo=swift&logoColor=black)](https://developer.apple.com/xcode/swiftui)
[![Swift](https://img.shields.io/badge/Swift-5.10-orange.svg?style=for-the-badge&logo=swift)](https://swift.org)
[![Xcode](https://img.shields.io/badge/Xcode-15-blue.svg?style=for-the-badge&logo=Xcode&logoColor=white)](https://developer.apple.com/xcode)
[![MIT](https://img.shields.io/badge/license-MIT-black.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)

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

<img src="Misc/demo.gif" alt="Demonstration">

> [!IMPORTANT]
> This transition utilizes SwiftUI 5's [.layerEffect](https://developer.apple.com/documentation/swiftui/view/layereffect(_:maxsampleoffset:isenabled:)). AppKit/UIKit powered views will *not* work. This includes views like `TextField`.
Expand Down
3 changes: 3 additions & 0 deletions Sources/DoomWipe/DoomWipeShader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
import Metal
import SwiftUI

/// Direction of the wipe effect.
public enum WipeDirection: CGFloat {
/// The content flows downwards.
case down = 1
/// The content flows upwards.
case up = -1
}

Expand Down

0 comments on commit 10cc526

Please sign in to comment.