Giter VIP home page Giter VIP logo

arkit-focusnode's Introduction

FocusNode

The root class here uses a class I found in Apple's documentation for ARKit apps that I wanted to have easy to use myself, and thought others would benefit from it too.

Actions Status Version License Platform Swift Package Manager Swift 5.0

FocusNode Example 1

The Example looks identical to the above GIF.

Medium Article V1 of this CocoaPod

It was found inside the downloadable project on the following page: https://developer.apple.com/documentation/arkit/handling_3d_interaction_and_ui_controls_in_augmented_reality

I've added the license from that project to this repository.

For a similar object to place into a RealityKit scene, try the FocusEntity Repository.

Minimum Requirements

  • Swift 5.0
  • iOS 11.3

Installation

Swift Package Manager

Add the URL of this repository to your Xcode 11+ Project and select version 2.0+ https://github.com/maxxfrazer/ARKit-FocusNode.git

CocoaPods

Include this pod in your Podfile like so:

pod 'FocusNode'

Usage

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

V2

Follow steps in V1, and then whatever you have as your sceneView class, for example ARSCNView, add the protocol of ARSmartHitTest to it like the following:

extension ARSCNView: ARSmartHitTest {}

V1

Import FocusNode to your .swift file and add it to your scene as so:

let focusNode = FocusSquare()
sceneView.scene.rootNode.addChildNode(self.focusNode)
focusNode.viewDelegate = sceneView

Check out the Example project or message me on GitHub or twitter if it's unclear.

I DID NOT WRITE A MAJORITY OF THIS CODE MYSELF, MOST OF IT WAS TAKEN DIRECTLY FROM APPLE'S EXAMPLES

arkit-focusnode's People

Contributors

maxxfrazer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.