All Projects → tuarua → Ar Ane

tuarua / Ar Ane

Licence: apache-2.0
ARKit Adobe Air Native Extension for iOS11

Programming Languages

actionscript
884 projects

Projects that are alternatives of or similar to Ar Ane

Partfolio
Rosberry Portfolio app made with Apple ARKit
Stars: ✭ 29 (-17.14%)
Mutual labels:  augmented-reality, arkit
Jeelizar
JavaScript object detection lightweight library for augmented reality (WebXR demos included). It uses convolutional neural networks running on the GPU with WebGL.
Stars: ✭ 296 (+745.71%)
Mutual labels:  augmented-reality, arkit
Realityui
A Swift Package for creating familiar UI Elements and animations in a RealityKit rendered Augmented Reality or Virtual Reality scene.
Stars: ✭ 275 (+685.71%)
Mutual labels:  augmented-reality, arkit
Svrf Ios Sdk
iOS SDK for the Svrf API and ARKit Face Filters
Stars: ✭ 24 (-31.43%)
Mutual labels:  augmented-reality, arkit
Arpaint
Draw with bare fingers in the air using ARKit
Stars: ✭ 672 (+1820%)
Mutual labels:  augmented-reality, arkit
ARKitImageDetectionTutorial
ARKitImageDetectionTutorial code for Medium article.
Stars: ✭ 42 (+20%)
Mutual labels:  augmented-reality, arkit
Argithubcommits
Show your GitHub commit records in 3D with ARKit and SceneKit. 用 ARKit 展示你的 GitHub 提交图
Stars: ✭ 280 (+700%)
Mutual labels:  augmented-reality, arkit
ARKit-Sample-ObjC
ARKit sample application is written in Objective C with features of Add, Remove, Scale, Move, Snapshot for single and multiple objects with plane/surface detection, reset session and AR support checking.
Stars: ✭ 72 (+105.71%)
Mutual labels:  augmented-reality, arkit
Arkit Corelocation
Combines the high accuracy of AR with the scale of GPS data.
Stars: ✭ 5,045 (+14314.29%)
Mutual labels:  augmented-reality, arkit
Arkit By Example
Apple ARKit example app
Stars: ✭ 458 (+1208.57%)
Mutual labels:  augmented-reality, arkit
Simple-ARKit-Game
No description or website provided.
Stars: ✭ 13 (-62.86%)
Mutual labels:  augmented-reality, arkit
Arshooter
A demo Augmented Reality shooter made with ARKit in Swift (iOS 11)
Stars: ✭ 794 (+2168.57%)
Mutual labels:  augmented-reality, arkit
stardust-SDK
Stardust SDK and sample app for Unity
Stars: ✭ 23 (-34.29%)
Mutual labels:  augmented-reality, arkit
Arkitnavigationdemo
ARKit Demo Application
Stars: ✭ 268 (+665.71%)
Mutual labels:  augmented-reality, arkit
augmented-card
Example project for ARKit Image Tracking blog post
Stars: ✭ 26 (-25.71%)
Mutual labels:  augmented-reality, arkit
Gesture Recognition 101 Coreml Arkit
Simple project to recognize hands in realtime. 👋 Serves as an Example for building your own object recognizer.
Stars: ✭ 278 (+694.29%)
Mutual labels:  augmented-reality, arkit
ReactNativeARKit
A sample project to demonstrate how to use react-native-arkit
Stars: ✭ 62 (+77.14%)
Mutual labels:  augmented-reality, arkit
navigatAR
Finding your way through buildings and campuses through the power of augmented reality
Stars: ✭ 47 (+34.29%)
Mutual labels:  augmented-reality, arkit
Arkit Scnpath
Create paths for your Augmented Reality environments using just points to represent the centre of the path.
Stars: ✭ 312 (+791.43%)
Mutual labels:  augmented-reality, arkit
Archarts
Lovely Augmented Reality Charts for iOS - Built with ARKit
Stars: ✭ 679 (+1840%)
Mutual labels:  augmented-reality, arkit

Adobe AIR + ARKit

ARKit Adobe Air Native Extension for iOS 11.0+ This ANE provides bindings for the ARKit API

ASDocs Documentation


Much time, skill and effort has gone into this. Help support the project

paypal


Prerequisites

You will need:

The ANE + Dependencies

Change directory into the example folder eg

cd /MyMac/dev/AIR/AR-ANE/example

Run the "air-tools" command (You will need AIR-Tools installed)

air-tools install

NEW This tool now:

  1. Downloads the AdMobANE and dependencies.
  2. Applies all required Android Manifest, InfoAdditons and Entitlements to your app.xml. See air package.json

N.B. You must use a Mac to build an iOS app using this ANE. Windows is NOT supported.

iOS: Packaging Frameworks Dependencies

The iOS ANEs are written in Swift. We need to package the Swift libraries (along with a couple of dynamic frameworks) with our AIR app

https://raw.githubusercontent.com/wiki/tuarua/Firebase-ANE/images/frameworks-package.png


Getting Started

Firstly, familiarise yourself with the concepts of Apple's ARKit. This ANE is at its core a binding for the ARKit APIs.

Usage

arkit = ARANE.arkit;
if (!arkit.isSupported) {
    trace("ARKIT is NOT Supported on this device");
    return;
}

arkit.view3D.showsStatistics = false;
arkit.view3D.automaticallyUpdatesLighting = true;
arkit.view3D.antialiasingMode = AntialiasingMode.multisampling4X;
arkit.view3D.init();
var config:WorldTrackingConfiguration = new WorldTrackingConfiguration();
if (arkit.iosVersion >= 11.3) {
    config.planeDetection = [PlaneDetection.horizontal, PlaneDetection.vertical];
} else {
    config.planeDetection = [PlaneDetection.horizontal];
}
arkit.view3D.session.run(config, [RunOptions.resetTracking, RunOptions.removeExistingAnchors]);

Geometries

The following geometries based on their SCNKit equivalents are available: Box, Sphere, Capsule, Cone, Cylinder, Plane, Pyramid, Torus, Tube

var cone:Cone = new Cone(0, 0.05, 0.1);
var node:Node = new Node(cone);
arkit.view3D.scene.rootNode.addChildNode(node);

Materials

Materials can be supplied as:
ARGB uint
BitmapData
String path to image file

box.firstMaterial.diffuse.contents = ColorARGB.RED;

sphere.firstMaterial.diffuse.contents = "materials/globe.png";

//supply 6 materials for 6 sides of box
box.materials = new <Material>[redMat, greenMat, blueMat, yellowMat, brownMat, whiteMat];

Physics

var box:Box = new Box(0.1, 0.1, 0.1);
box.firstMaterial.diffuse.contents = ColorARGB.ORANGE;
var boxNode:Node = new Node(box);
var boxShape:PhysicsShape = new PhysicsShape(box);
var physicsBody:PhysicsBody = new PhysicsBody(PhysicsBodyType.dynamic, boxShape);
physicsBody.allowsResting = true;

boxNode.physicsBody = physicsBody;
boxNode.position = new Vector3D(0, 0.5, 0);

arkit.view3D.scene.rootNode.addChildNode(boxNode);

Detecting Planes

arkit = ARANE.arkit;
if (arkit.iosVersion >= 11.3) {
    config.planeDetection = [PlaneDetection.horizontal, PlaneDetection.vertical];
} else {
    config.planeDetection = [PlaneDetection.horizontal];
}
arkit.addEventListener(PlaneDetectedEvent.ON_PLANE_DETECTED, onPlaneDetected);

private function onPlaneDetected(event:PlaneDetectedEvent):void {
    var planeAnchor:PlaneAnchor = event.anchor;
    var node:Node = event.node;
    
    var plane:Box = new Box(planeAnchor.extent.x, planeAnchor.extent.z, 0);
    var gridTexture:String = "materials/grid.png";
    plane.firstMaterial.diffuse.contents = gridTexture;
    
    var planeNode:Node = new Node(plane);
    planeNode.position = new Vector3D(planeAnchor.center.x, 0, planeAnchor.center.z)
    var boxShape:PhysicsShape = new PhysicsShape(plane);
    planeNode.physicsBody = new PhysicsBody(PhysicsBodyType.static, boxShape);
    planeNode.eulerAngles = new Vector3D(-Math.PI / 2, 0, 0);
    node.addChildNode(planeNode);
}

Camera Tracking

arkit = ARANE.arkit;
arkit.addEventListener(CameraTrackingEvent.ON_STATE_CHANGE, onCameraTrackingStateChange);

private function onCameraTrackingStateChange(event:CameraTrackingEvent):void {
    switch (event.state) {
        case TrackingState.notAvailable:
            break;
        case TrackingState.normal:
            break;
        case TrackingState.limited:
            switch (event.reason) {
                case TrackingStateReason.excessiveMotion:
                    break;
                case TrackingStateReason.initializing:
                    break;
                case TrackingStateReason.insufficientFeatures:
                    break;
                case TrackingStateReason.relocalizing:
                    break;
            }
            break;
    }
}

Detecting Touches

arkit = ARANE.arkit;
arkit.addEventListener(TapEvent.ON_SCENE3D_TAP, onSceneTapped);
private function onSceneTapped(event:TapEvent):void {
    if (event.location) {
        // look for planes
        var arHitTestResult:ARHitTestResult = arkit.view3D.hitTest3D(event.location, [HitTestResultType.existingPlaneUsingExtent]);
        if (arHitTestResult) {
            // plane tapped
        }
        
        var hitTestResult:HitTestResult = arkit.view3D.hitTest(event.location, new HitTestOptions());
        trace("hitTestResult", hitTestResult);
        if (hitTestResult) {
            // node tapped on
        }
    }
}

Running on Simulator

ARKit won't run on the simulator

Running on Device

The example project can be run on the device from IntelliJ using AIR 32.

Issues

The Issues section is for bugs and API requests only.
Use the supplied template or the ticket will be closed.
Paid Premium support is available.

Contributing

If you have knowledge of ARKit contributions are welcome. This includes adding documentation, sample code and Scenekit models.
Likewise, sponsorship or donations will go a long way to pushing the ANE further along.

Prerequisites

You will need:

  • a Mac. Windows is not supported
  • an iOS device with an A9 or later processor
  • IntelliJ IDEA / Flash Builder
  • AIR 33.0.2.338+
  • Xcode 11.3
  • wget on macOS via brew install wget

Task List

  • Planes
    • [x] Horizontal Plane Detection
    • [x] Vertical Plane Detection (iOS 11.3)
    • [x] Plane Updates
    • [x] Plane Removal
    • [x] Apple Sample 'Focus Square'
  • Geometry
    • [x] Box
    • [x] Capsule
    • [x] Cone
    • [x] Cylinder
    • [x] Plane
    • [x] Pyramid
    • [x] Shape (from SVG)
    • [x] Sphere
    • [x] Models
      • [x] from .scn
      • [x] from .dae
    • [ ] Text
    • [x] Torus
    • [x] Tube
  • Lighting
  • Materials
    • [x] Colour
    • [x] Image
    • [x] BitmapData
  • Physics
    • [x] Body
    • [x] Collision Events
    • [ ] Vehicle
  • Animation
  • Camera
    • [x] Tracking
    • [x] Autofocus (iOS 11.3)
  • Touch
    • [x] Tap
    • [x] Swipe
    • [x] Pinch
    • [x] Long Press
  • Permissions
    • [x] Camera
  • Hit Test
    • [x] Planes
    • [x] Nodes
  • Image Detection
    • [x] AR Reference images (iOS 11.3)
  • Object Detection
    • [x] AR Reference object (iOS 12.0)

References

  • [https://developer.apple.com/documentation/arkit]
  • [https://github.com/eh3rrera/ARKitSceneKitExample]
  • [https://github.com/rosberry/pARtfolio]
  • [https://www.appcoda.com/arkit-physics-scenekit/]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].