Generated: 2026-06-19T05:40:48+00:00
Source app: /Applications/RealityComposerPro.app
Reality Composer Pro: 3.0 build 75.0.14.500.1
ShaderGraph framework: ShaderGraph source 159000000000001
| import Foundation | |
| import SwiftUI | |
| import UIKit | |
| extension UIBlurEffect { | |
| public static func variableBlurEffect(radius: Double, imageMask: UIImage) -> UIBlurEffect? { | |
| let methodType = (@convention(c) (AnyClass, Selector, Double, UIImage) -> UIBlurEffect).self | |
| let selectorName = ["imageMask:", "effectWithVariableBlurRadius:"].reversed().joined() | |
| let selector = NSSelectorFromString(selectorName) |
| // Used to detect specific issue with JSON decoding | |
| func decodeOrReport(data: Data) { | |
| do { | |
| let _ = try JSONDecoder().decode(WidgetResponse.self, from: data) | |
| print("\n\n👍ALL GOOD\n\n") | |
| } catch DecodingError.keyNotFound( let key, let context) { | |
| print("\n\n⛔️FAILED TO DECODE\n\n") | |
| print("could not find key \(key) in JSON: \(context.debugDescription)") | |
| } catch DecodingError.valueNotFound( let type, let context) { | |
| print("\n\n⛔️FAILED TO DECODE\n\n") |
| // | |
| // View+WindowGeometryPreferences.swift | |
| // | |
| // Created by Drew Olbrich on 1/30/24. | |
| // Copyright © 2024 Lunar Skydiving LLC. All rights reserved. | |
| // | |
| // MIT License | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal |
| // | |
| // SIMD+LookAt.swift | |
| // | |
| // Created by Drew Olbrich on 11/10/23. | |
| // Copyright © 2023 Lunar Skydiving LLC. All rights reserved. | |
| // | |
| // MIT License | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal |
| import SWBShared2 | |
| import Metal | |
| import AppKit | |
| import CoreImage | |
| import CoreGraphics | |
| import QuartzCore | |
| @globalActor | |
| public struct CALayerToMetalRendererActor { |
| /// Create an ``ImmersiveSpaceState`` in your view, wrap it with `@State` and modify your view content with ``immersiveSpaceHelper()``. | |
| /// Example: | |
| /// ```swift | |
| /// struct MyView: View { | |
| /// @State | |
| /// var immersiveSpaceState = ImmersiveSpaceState(id: "my-immersive-space-id") | |
| /// | |
| /// var body: some View { | |
| /// Toggle("Show/Hide Immersive Space", isOn: $immersiveSpaceState.show) | |
| /// .immersiveSpaceHelper($immersiveSpaceState) |
| extension View { | |
| func minimumPadding(edges: Edge.Set = .all, _ length: CGFloat = 8) -> some View { | |
| GeometryReader { geo in | |
| padding(.bottom, edges.contains(.bottom) ? max(length, geo.safeAreaInsets.bottom) : 0) | |
| .padding(.top, edges.contains(.top) ? max(length, geo.safeAreaInsets.top) : 0) | |
| .padding(.leading, edges.contains(.leading) ? max(length, geo.safeAreaInsets.leading) : 0) | |
| .padding(.trailing, edges.contains(.trailing) ? max(length, geo.safeAreaInsets.trailing) : 0) | |
| .ignoresSafeArea(edges: edges) | |
| } | |
| } |