Giter Site home page Giter Site logo

titanium-arkit's Introduction

ARKit in Axway Titanium SDK

Use the iOS 11+ ARKit framework in the Axway Titanium SDK.

Thoughts

Supporting ARKit does not simply mean to write some public methods that people can use to "support ARKit in their app". It means to write API's for SceneKit, SpriteKit, ARKit and all bindings around those frameworks. The current implementation starts by creating new scene-views where objects can be placed in.

That's why it is not clear, yet, what kind of API's should be supported and which one don't. I would recommend everyone to open a new issue and leave his/her thoughts regarding their ARKit use-case with Titanium, so the explicit implementation can be scoped.

Until then, it does not make sense to port ARKit example to Titanium, since they will always be limited to the exact example-usage, without the possibility of customizations.

Requirements

  • Titanium SDK 6.2.0 and later
  • Xcode 9 and later
  • iOS 11 and later
  • Basic knowledge of computer-graphics and vector-/matrix-operations 😚
  • Creativity!

Documentation

isSupported()

Whether the current device supports this ARKit.

SceneView

A ARKit scene-view. Create with createSceneView(args).

Methods

run(args)

Runs the session with the provided configuration. Optional parameters:

  • planeDetection (Number): Type of planes to detect in the scene.
    • PLANE_DETECTION_NONE
    • PLANE_DETECTION_HORIZONTAL
  • worldAlignment (Number): Determines how the coordinate system should be aligned with the world.
    • WORLD_ALIGNMENT_CAMERA
    • WORLD_ALIGNMENT_GRAVITY
    • WORLD_ALIGNMENT_GRAVITY_AND_HEADING
  • lightEstimationEnabled (Boolean): Enable or disable light estimation.
  • providesAudioData (Boolean): Determines whether to capture and provide audio data.
pause()

Pauses the session.

addAnchor(args)

Adds an anchor to the session. Has to be a 4x4 matrix represented by a multi-dimensional array, e.g.

sceneView.addAnchor([[1, 2, 3, 4], [5, 6, 7, 8], [9, 0, 1, 2], [3, 4, 5, 6]]);
removeAnchor(args)

Removes an anchor from the session. Has to be a 4x4 matrix like in addAnchor.

Properties

automaticallyUpdatesLightning

Determines whether the view will update the scene’s lighting.

showStatistics

Determines whether the receiver should display statistics info like FPS.

Author

Hans Knöchel (@hansemannnn / Web)

License

MIT

titanium-arkit's People

Contributors

hansemannn 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

Watchers

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

titanium-arkit's Issues

Textures are not displayed

HI,

I have encountered a problem which has not been mentioned, the textures of my objects are not displayed.

I tried using the same .scn file in a xcode project and it works fine. But when I use it in titanium the object is displayed but without the textures. The texture files are in the same folder as my .scn file.

iPhone 6S
ti.arkit v 1.0.0
Titanium SDK 7.0.1 GA
Xcode 9.2

Thanks for your help !
Kilyan

missing libtitanium-arkit-master.a

i try to use your module, but i get error message as show as below:

[ERROR] : Module titanium-arkit-master version 1.0.0 is missing library file: /Users/dinghengduan/Documents/Appcelerator_Studio_Workspace/test arkit/modules/iphone/titanium-arkit-master/1.0.0/libtitanium-arkit-master.a

Is there a file missing in your module?

sceneView view doesn't open / appear.

Tried this in an Alloy Project -- brand new project. 6.2.0.GA -- installed to iOS11 on an iPhone 7.

var ARKit = require('ti.arkit');

var sceneView = ARKit.createSceneView({
  scene: 'Titanium.scnassets/ti-logo.scn' // Create your Scene Assets in Xcode and place them in app/platform/ios (Alloy) or platform/ios (Classic)
});


$.index.addEventListener('open', function() {
console.log("OPENED")
  sceneView.run();
});

$.index.add(sceneView);
$.index.open();```

Permissions are all set in TiApp.xml.

App loads with black screen (the index.xml) -- nothing else happens. "OPENED" appears in the console, no other errors that indicate an issue.

Feature Suggestion: Placing 3D-Objects in AR-Scene

I guess the most basic use-case would be an app, which displays and manipulates 3D-Objects (e.g. DAE) in a SceneView based on ARKit plane-detection.

APIs should include:

  • creating and controlling an ARSCNView-Proxy
  • loading 3D-Files via SCNSceneSource or SCNScene
  • accessing and controlling specific SCNNode
  • positioning with SCNVector3
  • animating Nodes with SCNMorpher

Thank you,
Hendrik.

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.