Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxxfrazer/FocusEntity
Bringing the scanning box from SceneKit to RealityKit
https://github.com/maxxfrazer/FocusEntity
arkit arkit3 augmented-reality ios13 realitykit swift swiftpackage swiftpm
Last synced: 10 days ago
JSON representation
Bringing the scanning box from SceneKit to RealityKit
- Host: GitHub
- URL: https://github.com/maxxfrazer/FocusEntity
- Owner: maxxfrazer
- License: mit
- Created: 2019-08-26T19:14:36.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-22T09:35:40.000Z (9 months ago)
- Last Synced: 2024-10-11T22:51:11.014Z (about 1 month ago)
- Topics: arkit, arkit3, augmented-reality, ios13, realitykit, swift, swiftpackage, swiftpm
- Language: Swift
- Homepage: https://maxxfrazer.github.io/FocusEntity/documentation/focusentity/
- Size: 7.14 MB
- Stars: 368
- Watchers: 10
- Forks: 53
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-RealityKit - FocusEntity - FocusEntity lets you see exactly where the centre of the view will sit in the AR space (Projects / Community)
- awesome-AR - FocusEntity - Scanning box from SceneKit to RealityKit
README
# FocusEntity
This package is based on [ARKit-FocusNode](https://github.com/maxxfrazer/ARKit-FocusNode), but adapted to work in Apple's framework RealityKit.
[The Example](./FocusEntity-Example) looks identical to the above GIF, which uses the FocusEntity classic style.
See the [documentation](https://maxxfrazer.github.io/FocusEntity/documentation/focusentity/) for more.
## Minimum Requirements
- Swift 5.2
- iOS 13.0 (RealityKit)
- Xcode 11If you're unfamiliar with using RealityKit, I would also recommend reading my articles on [Getting Started with RealityKit](https://medium.com/@maxxfrazer/getting-started-with-realitykit-3b401d6f6f).
## 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`---
## UsageSee the [Example project](./FocusEntity-Example) 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
```2. Create an instance of FocusEntity, referencing your ARView:
```swift
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](https://maxxfrazer.github.io/FocusEntity/documentation/focusentity/) or [example project](FocusEntity-Example) to learn more.---
Feel free to [send me a tweet](https://twitter.com/maxxfrazer) 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](LICENSE.origin). I have adapted the code to be used and distributed from within a Swift Package, and now further adapted to work with [RealityKit](https://developer.apple.com/documentation/realitykit).