• Stars
    star
    364
  • Rank 117,101 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 5 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bringing the scanning box from SceneKit to RealityKit

FocusEntity

This package is based on ARKit-FocusNode, but adapted to work in Apple's framework RealityKit.


The Example looks identical to the above GIF, which uses the FocusEntity classic style.

See the documentation for more.

Minimum Requirements

  • Swift 5.2
  • iOS 13.0 (RealityKit)
  • Xcode 11

If you're unfamiliar with using RealityKit, I would also recommend reading my articles on Getting Started with RealityKit.

Installation

Swift Package Manager

Add the URL of this repository to your Xcode 11+ Project.

Go to File > Swift Packages > Add Package Dependency, and paste in this link: https://github.com/maxxfrazer/FocusEntity


Usage

See the Example project for a full working example as can be seen in the GIF above

  1. Install FocusEntity with Swift Package Manager
https://github.com/maxxfrazer/FocusEntity.git
  1. Create an instance of FocusEntity, referencing your ARView:
let focusSquare = FocusEntity(on: self.arView, focus: .classic)

And that's it! The FocusEntity should already be tracking around your AR scene. There are options to turn the entity off or change its properties. Check out the documentation or example project to learn more.


Feel free to send me a tweet if you have any problems using FocusEntity, or open an Issue or PR!

The original code to create this repository has been adapted from one of Apple's examples from 2018, license also included. I have adapted the code to be used and distributed from within a Swift Package, and now further adapted to work with RealityKit.

More Repositories

1

RealityUI

A Swift Package for creating familiar UI Elements and animations in RealityKit. For both Augmented Reality or Virtual Reality scenes.
Swift
489
star
2

ARKit-SCNPath

Create paths for your Augmented Reality environments using just points to represent the centre of the path.
Swift
352
star
3

RealityKit-CardFlip

An example app using Apple's new RealityKit framework
Swift
94
star
4

SceneKit-SCNLine

Draw a tube or thick line in SceneKit
Swift
90
star
5

MultipeerHelper

A light swift wrapper around the iOS MultipeerConnectivity framework. Including an example project using RealityKit's MultipeerConnectivityService.
Swift
85
star
6

RealityGeometries

A collection of additional geometries ready for use in RealityKit 2
Swift
64
star
7

SceneKit-PortalMask

Clean class to create a portal in SceneKit for use in ARKit.
Swift
63
star
8

ARKit-FocusNode

FocusSquare class taken straight from Apple's ARKit examples and packed up for anyone to use with ease.
Swift
51
star
9

SceneKit-Bezier-Animations

Create animations over Bezier curves of any number of points
Swift
48
star
10

RKPointPin

A UIView which points at a RealityKit Entity from screenspace
Swift
43
star
11

SCNShaderModifier-Examples

Basic examples of shaders in SceneKit + ARKit
Swift
35
star
12

ARKit-QRScanner

Functions for scanning QR codes in ARKit
Swift
25
star
13

SCNCustomGeometries-Part2

To accompany Part 2 of my Medium post
Swift
17
star
14

SCNCustomGeometries

Repository to go with my Medium post about making geometries in SceneKit
Swift
12
star
15

ARKit-Marble-Labyrinth

Example of making a marble roll around inside of a marker image
Swift
12
star
16

ARKit-SmartHitTest

I've put a function found in Apple's ARKit examples into a Swift Package & CocoaPod so it's easy to use.
Swift
10
star
17

RealityToolkit

Useful functions for RealityKit projects
Swift
10
star
18

Swift-Graph3D

A class to create a routing graph for positions in 3D coordinate space
Swift
10
star
19

RKProgressBar

A simple RealityKit Entity class for creating a geometry to show progress in the form of a capsule
Swift
9
star
20

Agora-UIKit

Swift
3
star
21

RealityKit-Package-Collection

A collection of the best RealityKit packages.
3
star
22

SceneKit-SCNTextNode

SCNTextNode creates a node with a text geometry that's more easily customisable for ARKit or just SceneKit.
Swift
2
star
23

maxx-bash_profile

My bash profile (and similar) filled with functions I've made and aliases gathered from various places.
Shell
1
star
24

Agora-Token-Swift

Example of how to fetch an Agora RTC Token into a Swift application
Swift
1
star