Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/no-comment/glorifier
Give your views a shiny spotlight effect
https://github.com/no-comment/glorifier
swift swiftui
Last synced: 5 days ago
JSON representation
Give your views a shiny spotlight effect
- Host: GitHub
- URL: https://github.com/no-comment/glorifier
- Owner: no-comment
- License: mit
- Created: 2022-11-21T20:29:22.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-23T10:29:43.000Z (about 2 years ago)
- Last Synced: 2024-11-23T13:35:52.813Z (about 1 month ago)
- Topics: swift, swiftui
- Language: Swift
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
## Preview
Glorifier allows you to add a certain *bedazzle* to your view by giving them a shiny spotlight effect:![glorifier preview](https://user-images.githubusercontent.com/31541782/203437388-4eb916f8-fe48-4b3d-ab6b-b8d229c1a4cf.gif)
## Installation
### Swift Package Manager
Add `https://github.com/no-comment/Glorifier.git` to your [Package Dependencies](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).## Usage
Just use the `.glorified()` modifier as you would use any other:
```swift
MyView()
.glorified()
```There are five parameters to further customize the effect:
| **Parameter** | **Type** | **Default Value** | **Description** |
| ------------------- | -------- | ----------------- | ---------------------------------------------------- |
| `duration` | `Double` | `15` | Duration of a cycle in seconds |
| `rotationIntensity` | `Double` | `10` | Intensity of the 3D rotation effect |
| `shadowColor` | `Color` | `.gray` | Color of the shadow |
| `shadowOffset` | `Double` | `15` | Offset of the shadow |
| `lightIntensity` | `Double` | `0.2` | Intensity of the light effect (between `0` and `1`) |