RealityKit Utilities

Skills

SIMD

Combine

RealityKit

Swift

ARKit

An open-source Swift package that simplifies RealityKit development with reusable utilities and convenience APIs for working with 3D entities, components, and resources.

#OpenSource #RealityKit #Swift #SIMD

RealityKit Utilities

RealityKit Utilities is an open-source Swift package I developed to simplify common workflows when building 3D, augmented reality, and spatial computing experiences with Apple's RealityKit and ARKit frameworks.

While working with RealityKit, I encountered recurring tasks that required repetitive boilerplate or custom implementations. I created this package to consolidate those solutions into a lightweight, reusable toolkit that makes RealityKit development more efficient, expressive, and maintainable.

Key Features

The package provides a collection of focused utilities and convenience APIs covering several areas of RealityKit development:

  • Entity Management: Traverse, search, and manipulate entity hierarchies, making it easier to work with complex 3D scenes and entity-component relationships.

  • Components & Registration: Read and modify RealityKit components, with utilities for safely registering custom component types.

  • Transforms & Spatial Math: Simplify operations involving world-space transforms, coordinate systems, and SIMD types when positioning and manipulating 3D objects.

  • Materials & Opacity: Manage material transparency and work with custom materials through convenient, reusable APIs.

  • AR Raycasting: Perform more resilient raycasts for detecting real-world surfaces and positioning virtual content in augmented reality experiences.

  • AR Session Integration: Expose AR session events through Combine publishers, enabling reactive event handling and cleaner integration with application state.

  • Screen-Space Projection: Project 3D entity bounds into 2D screen coordinates for use in UI positioning, interaction, and spatial calculations.

  • Visibility Calculations: Determine whether an entity is visible on screen and measure how much of its projected bounds falls within the viewport.

Why I Built It

RealityKit provides a powerful foundation for spatial computing, but many everyday development tasks benefit from additional abstractions and helper APIs.

Rather than repeatedly implementing the same functionality across projects, I wanted a centralized collection of utilities that could be reused and extended over time.

The package focuses on reducing boilerplate, improving code readability, and making common 3D and AR operations easier to implement without hiding the underlying RealityKit APIs.

Cross-Platform & Open Source

Built with Swift and distributed through Swift Package Manager, RealityKit Utilities is designed for Apple's spatial computing ecosystem, including iOS, macOS, tvOS, and visionOS, wherever the underlying frameworks support the functionality.

The project is publicly available as an open-source resource for developers working with RealityKit and ARKit. Contributions and improvements are welcome.

Technologies: Swift · RealityKit · ARKit · Combine · SIMD · Swift Package Manager

Explore the source code on GitHub

Create a free website with Framer, the website builder loved by startups, designers and agencies.