Code Monkey home page Code Monkey logo

rkpointpin's Introduction

RKPointPin

RKPointPin is a UIView which sticks to an ARView and points at a chosen entity within the scene, with options to hide the pin when near the center of the screen, or perform any custom actions.

Swift Package Manager Swift 5.2

RKPointPin Example

Minimum Requirements

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

Swift Package Manager

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

https://github.com/maxxfrazer/RKPointPin.git

Usage

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

Once you create your RKPointPin, add it to your ARView, and then choose your target Entity.

Doing so may look similar to this:

let rkPin = RKPointPin()
self.arView.addSubview(rkPin)
rkPin.targetEntity = boxEntity

By default the RKPointPin will be visible all the time, but if you want the pin to hide when in the center, set the focusPercentage to a value ranging from 0 to 1. If focusPercentage is set to 1, then the pin will only appear when the targetEntity is outside of the view, as everything from the edges inwards is considered the focus area.

rkpointpin's People

Contributors

maxxfrazer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zxwzxw frank-1992

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.