Swiftpack.co - Reality-Dev/RealityKit-Fade as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Reality-Dev.
Reality-Dev/RealityKit-Fade 1.0.04
This package enables easy, convenient fading in and fading out in RealityKit.
⭐️ 1
🕓 3 weeks ago
iOS
.package(url: "https://github.com/Reality-Dev/RealityKit-Fade.git", from: "1.0.04")

RKFade

This package enables easy, convenient fading in and fading out in RealityKit.

Be sure to call FadeSystem.register() (Not FadeSystem.registerSystem()) before you use the fade component or any fade methods (preferrably register it when your app starts, as seen in the example project's AppDelegate), or the fading will not work.

SimpleMaterial will not work - Materials must be PhysicallyBased, Custom, or Unlit. You can use this to see what kinds of materials your entity uses:

            myEntity.modifyMaterials({
                print($0)
                return $0
            })

Requirements

  • iOS 15.0 or higher
  • Swift 5.2
  • Xcode 11

Installation

Swift Package Manager

Add the URL of this repository to your Xcode 11+ Project under: File > Add Packages https://github.com/Reality-Dev/RealityKit-Fade

Usage

  • Add import RKFade to the top of your swift file to start.
  • Create an entity that uses PhysicallyBasedMaterial, CustomMaterial, or UnlitMaterial.
    • Materials on entities loaded from usdz files are PhysicallyBasedMaterials.
  • Call .fadeIn() or .fadeOut() on the entity, optionally passing in a fade duration.

GitHub

link
Stars: 1
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics