How fabric-project/satin works
Project type and purpose
• From the file tree and README, this is a Swift Package providing a 3D graphics framework (“Satin”) layered on top of Apple’s Metal API, plus an “Example” Xcode project demonstrating usage.
• Satin consists of two main deliverables:
• A Swift‐based framework (“Sources/Satin”) offering abstractions for meshes, materials, cameras, renderers, compute systems, pipelines, etc.
• A C/C++ core library (“Sources/SatinCore”) for performance‐critical geometry and computational tasks.
• The Example app (under “Example/Example”) is a SwiftUI (and UIKit/AppKit) demo that drives Satin to render scenes, AR content, UI controls, and pipelines in a real application.
File structure
• Top-level:
• .github/workflows: CI build
• Package.swift: Swift Package definition for Satin
• Satin.xcodeproj: local Xcode workspace for development & tests
• Sources/Satin: the Swift framework source
• Sources/SatinCore: the C/C++ core library
• Example: standalone Xcode demo app (with assets, UI, and renderer code)
• Scripts/build_xcframework: packaging script
• Tests: unit tests for both Satin and SatinCore
• Within Sources/Satin: modules by domain (AR, Animation, Buffers, Cameras, Geometry, Compute, Pipelines, Shaders, Utilities, Views, etc.), indicating a modular layered architecture.
• The Example app mirrors the framework’s modules for UI views (“Views/…”), controllers (“UI/…”), and demo renderers (“Renderers/…”), showing how consumers interact with the framework.
README for additional insights
• The README outlines
• The high-level API (Renderer, Context, Scene graph, Camera, Mesh, Material)
• Features: PBR, live coding, compute systems, BVH raycasting, ARKit integration, etc.