{"_id":"react-native-arkit","_rev":"67-b9d93a792d1731e6d73d63757c47e845","name":"react-native-arkit","time":{"modified":"2022-06-26T03:20:47.229Z","created":"2017-07-05T07:44:55.698Z","1.0.0":"2017-07-05T07:44:55.698Z","0.0.5":"2017-07-10T22:53:59.772Z","0.0.6":"2017-07-11T03:26:23.979Z","0.0.7":"2017-07-13T11:01:02.352Z","0.0.8":"2017-07-14T13:36:45.099Z","0.0.9":"2017-07-17T02:52:02.599Z","0.0.10":"2017-07-17T14:38:51.798Z","0.0.11":"2017-07-18T17:45:43.508Z","0.0.14":"2017-07-28T05:01:44.654Z","0.0.15":"2017-07-29T07:57:11.241Z","0.1.0":"2017-08-16T13:05:24.798Z","0.1.1":"2017-08-16T14:01:01.783Z","0.1.2":"2017-09-20T06:30:06.195Z","0.1.3":"2017-09-24T01:56:26.650Z","0.2.0":"2017-09-27T00:32:01.787Z","0.2.1":"2017-09-27T02:46:26.090Z","0.2.2":"2017-09-28T04:42:31.901Z","0.2.3":"2017-09-29T07:14:46.104Z","0.3.0":"2017-10-09T17:54:35.408Z","0.4.0":"2017-10-24T12:09:43.262Z","0.4.1":"2017-10-24T12:34:48.633Z","0.4.2":"2017-10-25T20:38:17.120Z","0.4.3":"2017-11-05T22:18:14.739Z","0.4.4":"2017-11-05T23:53:58.873Z","0.4.5":"2017-11-13T00:08:13.634Z","0.5.0":"2017-11-14T13:46:18.624Z","0.5.1":"2017-11-14T15:50:24.014Z","0.5.2":"2017-11-14T16:07:58.209Z","0.5.3":"2017-11-14T16:42:38.155Z","0.5.4":"2017-11-14T21:27:27.644Z","0.5.5":"2017-11-15T16:58:00.179Z","0.6.0-beta.0":"2017-11-16T15:48:59.548Z","0.6.0":"2017-11-28T09:56:55.945Z","0.6.1-beta.0":"2017-12-04T15:15:11.285Z","0.6.1-beta.1":"2017-12-06T11:13:25.353Z","0.6.2-beta":"2017-12-07T21:58:27.207Z","0.7.0":"2017-12-21T12:39:18.226Z","0.7.1":"2017-12-21T15:45:44.378Z","0.8.0-beta.0":"2018-01-12T15:25:50.038Z","0.8.0-beta.1":"2018-02-06T16:39:00.213Z","0.8.0-beta.2":"2018-02-07T15:25:03.610Z","0.8.0-beta.3":"2018-02-07T15:50:13.103Z","0.8.0-beta.4":"2018-02-07T16:44:01.028Z","0.8.0-beta.5":"2018-02-20T17:00:53.806Z","0.8.0":"2018-02-21T10:08:13.598Z","0.9.0-beta.0":"2018-02-21T10:17:06.117Z","0.9.0-beta.1":"2018-02-21T14:05:59.201Z","0.9.0-beta.2":"2018-02-21T14:16:59.839Z","0.9.0-beta.3":"2018-02-27T14:12:25.559Z","0.9.0-beta.4":"2018-02-28T13:52:38.068Z","0.9.0-beta.5":"2018-02-28T17:43:48.424Z","0.9.0-beta.6":"2018-03-04T22:39:28.182Z","0.9.0-beta.7":"2018-03-04T23:00:35.078Z","0.9.0-rc0":"2018-03-09T14:10:17.637Z","0.9.0-rc1":"2018-03-10T14:06:59.559Z","0.9.0":"2018-03-10T14:36:26.304Z"},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"dist-tags":{"latest":"0.9.0","beta":"0.9.0-rc1"},"description":"React Native binding for iOS ARKit","readme":"# react-native-arkit \n\n⚠️  **This is the readme from the current development. If you want to see the readme from the latest release, see https://github.com/HippoAR/react-native-arkit/releases**\n\n\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          // enable plane detection (defaults to Horizontal)\n          planeDetection={ARKit.ARPlaneDetection.Horizontal}\n\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n\n          // event listener for (horizontal) plane detection\n          onPlaneDetected={anchor => console.log(anchor)}\n\n          // event listener for plane update\n          onPlaneUpdated={anchor => console.log(anchor)}\n\n          // arkit sometimes removes detected planes\n          onPlaneRemoved={anchor => console.log(anchor)}\n\n          // event listeners for all anchors, see [Planes and Anchors](#planes-and-anchors)\n          onAnchorDetected={anchor => console.log(anchor)}\n          onAnchorUpdated={anchor => console.log(anchor)}\n          onAnchorRemoved={anchor => console.log(anchor)}\n\n          // you can detect images and will get an anchor for these images\n          detectionImages={[{ resourceGroupName: 'DetectionImages' }]}\n\n\n          onARKitError={console.log} // if arkit could not be initialized (e.g. missing permissions), you will get notified here\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n\n\n### `<ARKit />`-Component\n\n#### Props\n\n| Prop | Type | Note |\n|---|---|---|\n| `debug` | `Boolean` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `ARKit.ARPlaneDetection.{ Horizontal \\| Vertical \\| HorizontalVertical \\| None }` | ARKit plane detection. Defaults to `Horizontal`. `Vertical` is available with IOS 11.3\n| `lightEstimationEnabled` | `Boolean` | ARKit light estimation (defaults to false).\n| `worldAlignment` | `ARKit.ARWorldAlignment.{ Gravity \\| GravityAndHeading \\| Camera }` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera. Defaults to `ARKit.ARWorldAlignment.Gravity`.  [See](https://developer.apple.com/documentation/arkit/arworldalignment)|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n| `detectionImages` | `Array<DetectionImage>` | An Array of `DetectionImage` (see below), only available on IOS 11.3 |  \n\n##### `DetectionImage`\n\nAn `DetectionImage` is an image or image resource group that should be detected by ARKit.\n\nSee https://developer.apple.com/documentation/arkit/arreferenceimage?language=objc how to add these images.\n\nYou will then receive theses images in `onAnchorDetected/onAnchorUpdated`. See also [Planes and Anchors](#planes-and-anchors) for more details.\n\n`DetectionImage` has these properties\n\n| Prop | Type | Notes\n|---|---|---|\n| `resourceGroupName` | `String` | The name of the resource group |\n\nWe probably will add the option to load images from other sources as well (PRs encouraged).\n\n#### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onAnchorDetected` | `Anchor` | When an anchor (plane or image) is first detected.\n| `onAnchorUpdated` | `Anchor` | When an anchor is updated\n| `onAnchorRemoved` | `Anchor` | When an anchor is removed\n| `onPlaneDetected` | `Anchor` | When a plane anchor is first detected.\n| `onPlaneUpdated` | `Anchor` | When a detected plane is updated\n| `onPlaneRemoved` | `Anchor` | When a detected plane is removed\n\nSee [Planes and Anchors](#planes-and-anchors) for Details about anchors\n\n\n\n#### Planes and Anchors\n\nARKit can detect different anchors in the real world:\n\n- `plane` horizontal and vertical planes\n- `image`, image-anchors [See DetectionImage](#DetectionImage)\n- face with iphone X or similar (not implemented yet)\n\nYou then will receive anchor objects in the `onAnchorDetected`, `onAnchorUpdated`, `onAnchorRemoved` callbacks on your `<ARKit />`-component.\n\nYou can use `onPlaneDetected`, `onPlaneUpdated`, `onPlaneRemoved` to only receive plane-anchors (may be deprecated later).\n\nThe `Anchor` object has the following properties:\n\n| Property | Type | Description\n|---|---|---|\n| `id` | `String` | a unique id identifying the anchor |\n| `type` | `String` | The type of the anchor (plane, image) |\n| `position` | `{ x, y, z }` | the position of the anchor (relative to the origin) |\n| `positionAbsolute` | `{ x, y, z }` | the absolute position of the anchor |\n| `eulerAngles` | `{ x, y, z }` | the rotation of the plane |\n\nIf its a `plane`-anchor, it will have these additional properties:\n\n| Property | Description\n|---|---|\n| `alignment` | `ARKit.ARPlaneAnchorAlignment.Horizontal` or `ARKit.ARPlaneAnchorAlignment.Vertical` <br /> so you can check whether it was a horizontal or vertical plane |\n| `extent` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n| `center` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n\n`image`-Anchor:\n\n| Property | type | Description\n|---|---|---|\n| `image` | `{name}` | an object with the name of the image.\n\n\n\n### Static methods\n\nStatic Methods can directly be used on the `ARKit`-export:\n\n```\nimport { ARKit } from 'react-native-arkit'\n\n//...\nconst result = await ARKit.hitTestSceneObjects(point);\n\n```\n\nAll methods return a *promise* with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n| `isInitialized` | boolean | check whether arkit has been initialized (e.g. by mounting). See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n| `isMounted` | boolean | check whether arkit has been mounted. See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n\n### 3D-Components\n\nThis project allows you to work with 3d elements like with usual react-components.\nWe provide some primitive shapes like cubes, spheres, etc. as well as\na component to load model-files.\n\nYou can also nest components to create new Components. Child-elements will\nbe relative to the parent:\n\n```\nconst BigExclamationMark = ({ position, eulerAngles, color = '#ff0000' }) => (\n  <ARKit.Group opacity={0.5} position={position} eulerAngles={eulerAngles}>\n    <ARKit.Sphere\n      position={{ x: 0, y: 0, z: 0 }}\n      shape={{ radius: 0.06 }}\n      material={{ diffuse: color }}\n    />\n    <ARKit.Cone\n      position={{ x: 0, y: 0.4, z: 0 }}\n      shape={{ topR: 0.1, bottomR: 0.05, height: 0.5 }}\n      material={{ diffuse: color }}\n    />\n  </ARKit.Group>\n)\n\n// somewhere else\n\n<BigExclamationMark\n  eulerAngles={{ x: 0.2 }}\n  position={{ x: 0.2, y: 0.3, z: -0.2 }}\n  color=\"#00ff00\"\n/>\n\n```\n\n\n#### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `id` | String | a unique identifier. Only provide one, if you need to find the node later in hit-testing. |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n\nAdvanced properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts shadows |\n| `constraint` | `ARKit.Constraint.{ BillboardAxisAll \\| BillboardAxisX \\| BillboardAxisY \\| BillboardAxisZ \\| None }` | Constrains the node to always point to the camera |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | `{ ...mapProperties }` (see below) | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | `{ ...mapProperties }` (see below) | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | `{ ...mapProperties }` (see below) | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | `{ ...mapProperties }` (see below) |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\nMap Properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `path` | string | Currently `require` is not supported, so this is an absolute link to a local resource placed for example in .xcassets |\n| `color` | string | Color string, only used if path is not provided |\n| `wrapS` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` | [wrapS](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395384-wraps?language=objc) |\n| `wrapT` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  [wrapT](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395382-wrapt?language=objc) |\n| `wrap` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  Shorthand for setting both wrapS & wrapT |\n| `translation` | `{ x, y, z }` | Translate the UVs, equivalent to applying a translation matrix to SceneKit's `transformContents`  |\n| `rotation` | `{ angle, x, y, z }` | Rotate the UVs, equivalent to applying a rotation matrix to SceneKit's `transformContents` |\n| `scale` | `{ x, y, z }` | Scale the UVs, equivalent to applying a scale matrix to SceneKit's `transformContents`  |\n\n\n#### `<ARKit.Group />`\n\nThis Object has no geometry, but is simply a wrapper for other components.\nIt receives all common properties like position, eulerAngles, scale, opacity, etc.\nbut no shape or material.\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n## FAQ:\n\n#### Which permissions does this use?\n\n- **camera access** (see section iOS Project configuration above). The user is asked for permission, as soon as you mount an `<ARKit />` component or use any of its API. If user denies access, you will get an error in `onARKitError`\n- **location service**: only needed if you use `ARKit.ARWorldAlignment.GravityAndHeading`.\n\n#### Is there an Android / ARCore version?\n\nNot yet, but there has been a proof-of-concept: https://github.com/HippoAR/react-native-arkit/issues/14. We are looking for contributors to help backporting this proof-of-conept to react-native-arkit.\n\n#### I have another question...\n\n[**Join Slack!**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","versions":{"0.0.5":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.0.5","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7"},"peerDependencies":{"react":"^15.5.0"},"gitHead":"544c731f8dfed01489cfb86de6f5a0aca92de9f7","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.0.5","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-iJv6Ff5VOnaSqO1VzM374JHADSbaKh5gsWGeb4DGYrmkyLijrWoUzm2vazAL2F9UmXzO+aBi6QMdjWyErOTu7Q==","shasum":"bd96ee7c5fcbb7567dd77cd27745e0cb97009cbd","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.0.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1C9Q5ZPhROni+SJx01f+0P3f9Fhds66brIQhetLUelAIhAMKyJSLt5pJq8wmRlOStzwUCofhvl/oIwuoPHnwDANiP"}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.0.5.tgz_1499727239650_0.8938538448419422"},"directories":{}},"0.0.6":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.0.6","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7"},"peerDependencies":{"react":"^15.5.0"},"gitHead":"eb54d3a3490def75184a02fca4ca8b7965f23169","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.0.6","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-F7G0soCWsSRKN391duULDIaZ6q2wrqnyL9aL6aSr2L0qtAj2Iu5hpYRyqVCJuqeyF0udcJapNpOG4wdGXM/4rQ==","shasum":"4b61de21ca76b13e6ef220a4c970e6345705c102","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.0.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHCvyo0+KNAaDycIbAZeyJgxUsGPnf8zwwSZKquT+CkCAiEA7ra9V6h9amNleU1orHlQgHAEwxHs1xbDtvJZP3oqlzg="}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.0.6.tgz_1499743583866_0.7014063494279981"},"directories":{}},"0.0.7":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.0.7","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7"},"peerDependencies":{"react":"^15.5.0"},"gitHead":"31999105fdd2cdc7729a435153b404e5461acaaf","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.0.7","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-xt9+dhRCSkTQ7QBlrpn6ombV0euNpU2fbKp1/ZHVqTrxNZcEBkNmfdjozfyZEVWV86lZcG1kCANrMriMzR/xHQ==","shasum":"06c89097b2bcb326054ee3531643a7f20f488402","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.0.7.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDw82UoyPGkYxDmVZHl3+xSgLXZVVDgueIeMpg4u4D9gIhAJprYdgpuB4k7IbRXSDlYuHzK8H+Eovn/p6SskNy7tRF"}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.0.7.tgz_1499943662200_0.2404437712393701"},"directories":{}},"0.0.8":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.0.8","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7"},"peerDependencies":{"react":"^15.5.0"},"gitHead":"edcb3ae1e89d3757e64ef6f9b489f4d7075c64fc","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.0.8","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-1YvLsLMhW2mjn52+3yvbZPwuLv+rOHM11k1pHz7fTwNliXpjXin+8NoIRxYqOxqd7okG8v8d31eGW5Z5cVLctQ==","shasum":"02e522dd0682288610f5d1633ed418b4e2de127b","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.0.8.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmoZnwbBxv9S0+5867NMHGcVwhK4U7nQcN+zrBt7UnegIhAP35nGXrA5z1sIKe11QjfIDqSQNLbNEU3/V8RM+xtFKB"}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.0.8.tgz_1500039404934_0.33895421167835593"},"directories":{}},"0.0.9":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.0.9","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7"},"peerDependencies":{"react":"16.0.0-alpha.12"},"gitHead":"ea7feeaf44653e9f7ff43e9057122468525f92ac","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.0.9","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-3ucitn27n7omIE1pnJtU6ntz3cbDQAQVUfiUkwdiIpH25lInDhVGe8CjhYZPvv7zbAzZzMKT6XGNadmLwKevgw==","shasum":"0c7489f13c4cb055ac4ced39eb6aa47c775d76c7","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.0.9.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAwt91hJwxWANjy6miHLjBU34mZMSwmqIAzDCQoYkMB6AiAnQvl+H0xigLN4bbHyhOR8uu1UTgfF+hNYOxPdB+eHIA=="}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.0.9.tgz_1500259921790_0.93339773430489"},"directories":{}},"0.0.10":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.0.10","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7"},"peerDependencies":{"react":"16.0.0-alpha.12"},"gitHead":"acd2db901de4b7c398f3acabfcd5e5a68e8df29d","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.0.10","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-vyjboELugW3VKoayN21qTU37ZgW7hzRURBkQesSVgJjoVSFkxW2MBulo6zcrtCV1yJfL05DrrX36Llx7wGmIRQ==","shasum":"ae364daf58d696603f76ad11cf3f63236edc7b43","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.0.10.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCB6puNNhLPwDM1FEqHVBC8NN5ei105HyMEB5SCGDgHxQIgHGHyAE26ijvEg2gTeSKQMq6L4ebUfGxJIXoVZM0N+wA="}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.0.10.tgz_1500302331567_0.8362874130252749"},"directories":{}},"0.0.11":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.0.11","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7"},"peerDependencies":{"react":"16.0.0-alpha.12"},"gitHead":"30b943df5504f38c3f79ee9c2a3ec99b6ca90e16","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.0.11","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-13dQfNYZVkKWP4sDQ0dpTZAx1P94pGoLaO4OODk4rayiQ4w3MjsXSUkvnGiBWcgpK2jkqY/RxspS3NcebWxkuA==","shasum":"db80ab151f5e9aef4e30464d6830011c854949c9","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.0.11.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBrI8UHCTt82623AxkS2UOZOFeC7YFL9zMdUU4I8+Z9wIgLHJVjGDrrDSiBZuDkZQSnbq4cSLewOrsxcr7FiFQKkk="}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.0.11.tgz_1500399943142_0.033770409878343344"},"directories":{}},"0.0.14":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.0.14","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7"},"peerDependencies":{"react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"8216f8771160f46ebbebf0581d19ed0064dc6d5e","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.0.14","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-nwj2JZipKx4F5Y6EU/k4kNunIJDmSunulm6ek87RefRWr2vrXAhajlysn+sbFy9OAM9QCUfSXrZhwjGnLcNPZQ==","shasum":"da75db53f13821850d4b547ab2e2abb0575bd09e","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.0.14.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH3yru5YTrwghUrskHMNuKaAuStfFE9HALDDpDI94n61AiEAw8DTNhVRJwMyv8yGzUb09Um98AZkr/d8G829bcj46t8="}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.0.14.tgz_1501218104519_0.9595986441709101"},"directories":{}},"0.0.15":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.0.15","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7"},"peerDependencies":{"react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"9304013c441a9ee6ea0ecbc7ec13402803986467","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.0.15","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-XbDzHhDhHAIdR3kJv3W5q9WexfHtkzc93XW2mqqIivkv92+EovJXdSszEL3uT9CrJ8Ui5Gjmz/kLJExpjN8Ibg==","shasum":"ee9ee7e469f09de5ff9ceebd27c64034a53c4a65","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.0.15.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICRgWlX84ux6NVeXYH60AduZ6lQ9jfdWsX1fZsKu3v00AiAzWSCkHOKtxn8sPOo3qEvZpf2WJbg7K9Gm1B4fm4fpHw=="}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.0.15.tgz_1501315030951_0.2531362217850983"},"directories":{}},"0.1.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.1.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"35308cb90e04d1d320920ed6859377f8cacdf97f","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.1.0","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-To/rgRkPREJbmhlD7A2t4CmkLNVxO5PSA8Xo+ggxHXu3I6ITT2Up3ZAMPaLcHp+eo7gkGiYTa7b/ZUK43ETnlg==","shasum":"661457a2758c48d23819298bc763ee709bb30c98","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8L50/L6EqEHlazQhnlRqKIq3oz0Nj52JN/fj1kHZmtgIgFJvUP6wgYFyrLU8QAMk5nC+zxMwB7KmcWKAU2/7HL+8="}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.1.0.tgz_1502888724609_0.2533499696291983"},"directories":{}},"0.1.1":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.1.1","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"c797e9786e3f173b51ed1973eb539514fa463672","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.1.1","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"hippo","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-AmgAcZmhc2xc7SLEkrreXXDapUbGUP3aFG5oci4+9eI+PQcQln0NSlX25PL/dSgNmHGjm3q/bG3pjpS9RHUB4A==","shasum":"254cf40b2c189e87a544ef21d0fe42b9fbd96ba2","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAML8NH8bH5qG1Awz6Tw+NqQyfRqcYXb07E88ARKVstfAiAIfqrbPMYiFZkqHihNXeuzxXO/95WoYZuwNsWVDjYchA=="}]},"maintainers":[{"name":"hippo","email":"qft.gtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.1.1.tgz_1502892061503_0.1918631826993078"},"directories":{}},"0.1.2":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.1.2","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"f885b23a8a232b1dbf530d6ec498f201f3f1b679","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.1.2","_npmVersion":"5.4.2","_nodeVersion":"8.3.0","_npmUser":{"name":"jacy","email":"jacychen1990@gmail.com"},"dist":{"integrity":"sha512-5hgIlueE/lZNsdcsSZNMBgr1aXdLyrVc2ndmebO+FWRxoY66fKlCE//G0pKt3PYyFc7jp6/R4RH+hcOW16ESTw==","shasum":"5d1a586c4c0c7484b7ac02a580710c67a9b32cb4","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.1.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDitrZsegNrB1QCd2CEf3fprE5lalm6vK+9OL8fYOAgRAiEAtsHoV6bS0MGw+xW7rllAOpnZnBacLy5fwj84Fv/RZNM="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.1.2.tgz_1505889006115_0.4325650467071682"},"directories":{}},"0.1.3":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.1.3","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"d8b99e5d55b27bca81095fc102aff69644b3861f","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.1.3","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"zehaoli","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-55w5rgLKvjQntazkx+tpnIAim7wsw3n2W11JfSJpDM59D4DCKJdWP/ElGHOdazPAnX6CwrHGs8Cx1QRRDVgp0Q==","shasum":"e9c9a8ec0ccdd1e2d3e1b2c2e3b837aa0fa072f7","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.1.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGo3eAA0DBZnT7GvRmoDyF8DhHOyGkppCT45wrTZcfmiAiBFRh4qUiFsZk4Y5CsiKWFq0FOHuhK+se49K4YMBPUJLQ=="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.1.3.tgz_1506218186411_0.05856833001598716"},"directories":{}},"0.2.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.2.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"color":"^2.0.0","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"9b484fd5a6ad88d1efd017e896d73f838524910d","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.2.0","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"zehaoli","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-D7pWSEybQz4r33tVEjSZVqL1IZoJ6YC1HdGwHxPw5V6rQvDXMrsur27dbsLq2MxiFa1JaA8RVGHHqK9kneITRQ==","shasum":"e62b12962db4513949881a8ce518691fadfcb8d1","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDofoxAgPJEojSgN3nkUQS0GfiSYoJ1h12bd/pMgDYR8QIhAPVv+DMgJNyqFz7EUrc4B1TQ5y0LsRLK1Ey4F1bf3rdB"}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.2.0.tgz_1506472321630_0.23589117382653058"},"directories":{}},"0.2.1":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.2.1","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"color":"^2.0.0","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"e0f2a13c465116a710d75b035ddf3a8891d9c59d","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.2.1","_npmVersion":"5.0.2","_nodeVersion":"7.10.0","_npmUser":{"name":"zehaoli","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-oXTcqWxXLAmIFUv2C3HoStY7zUPiZkAY/fNNnaE+g4Dfw3FSy6JjgCYa5K9SBKzVS4xxyIIMK0jFNCEV9qWCyA==","shasum":"28680ebb0ae3c44e15ce2cfd7aed274b9c3a9f59","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.2.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFxez+lSUnVeSn95v+m4q187v59fdEuHFAkaAhPvclu1AiAbOH0DHCEOPtoA6TQfju9Q+gbzjLPhJ1KBx4dM1br2Cg=="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.2.1.tgz_1506480386001_0.5398215397726744"},"directories":{}},"0.2.2":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.2.2","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"color":"^2.0.0","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"3200d1f766f7b2cf81f1b6e7c986ded4da630942","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.2.2","_npmVersion":"5.4.2","_nodeVersion":"7.10.0","_npmUser":{"name":"zehaoli","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-Hd0z3hT4ow60fbSKrRFwl4QZV6OnrdkC+1nqYka0+uAt3OuRzw1tWZ7a/iTYCXn8RrEq4N4oinNYHLg5M28Q9A==","shasum":"d859b53b88db601269116dafaac1d6e7954f3dc5","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.2.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrOnJLyaRwbbmeubyg/L3PElb+0tbs9PUjCKZ56KbANAiBUkXqzmhP+BfTU3TtkxMPTfCQ7mjt2yxyM/KDkxLtMQQ=="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.2.2.tgz_1506573751755_0.5646470293868333"},"directories":{}},"0.2.3":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.2.3","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"lodash":"^4.17.4","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"6bfa61398b955be9d1bc94f49712672d0d3bfbca","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.2.3","_npmVersion":"5.4.2","_nodeVersion":"7.10.0","_npmUser":{"name":"zehaoli","email":"qft.gtr@gmail.com"},"dist":{"integrity":"sha512-P4ZjbUWBcbcYLQFpBkSd/tnGonIHDg1t+FwsVg8U5ECmW2xpDHypX8RX5EPsoNTfnpT1WMN2PeXFQbJ8Xhzzww==","shasum":"6e63efd2dcda0c23e2845a1c5624e229a79dea88","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.2.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFeZZPbcfQ8rm1tC8ZiPjdZXlo/M84R4iaYf7Ylcj9V7AiAPjO828QcDKNnIlL9XSeHcae5BUUoaaDQ/V8xOQD33uw=="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.2.3.tgz_1506669285946_0.8919162761885673"},"directories":{}},"0.3.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.3.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7","react":"16.0.0-alpha.12","react-animation-frame":"^0.3.5"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"48366e0e19a1e69f460cabea8e093f9fa35e33ee","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.3.0","_shasum":"5d0672698fee38f51134f6cdaf25a5b54ecd4cf8","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"shasum":"5d0672698fee38f51134f6cdaf25a5b54ecd4cf8","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.3.0.tgz","integrity":"sha512-n4cg1Xzrx/5Jnue1pTiyP+gLJ4aicJ3tXBRJGdj55w4o24ZjxZoeqYBbOENT2KJI0qJAday8VPM5TFL0qV6RLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUuY1kJD9aWBprhhJhA3ZKr0njN8UUxNJHNL8ad/xtrAiEA6x36aZtxMWTS1GZ1OeIxS033IULVJoJ8HnW97/B+/jg="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.3.0.tgz_1507571673617_0.6051171279978007"},"directories":{}},"0.4.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.4.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"dfabc57f73f83696e76be35385ac17475c75c05b","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.4.0","_shasum":"9cb6cfc4725d9cd90754d57442fdf117e8121b27","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"shasum":"9cb6cfc4725d9cd90754d57442fdf117e8121b27","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.4.0.tgz","integrity":"sha512-RXxvf+0UlkiZ+YOcF7hxe5kWXvmsleAJYWX9IxaZ4mXCw9hZt8q+WNf3WSUl33AfFDm1/30nDjfIh4QcmjW/4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP3lRngOB416gLsZFmGp7Bqucr0KHKHxHbvA/rLYbIyAIhAPLfC33wx67F3li9QzymD61j8OUmufgjEHokChXLEwAb"}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.4.0.tgz_1508846981699_0.5901254122145474"},"directories":{}},"0.4.1":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.4.1","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"2d2c311d29aeeb2cbbd3349d1e617a968bfa0da3","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.4.1","_shasum":"9cce7e7245d456285ad48f2e698d41a2d7a2828a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"shasum":"9cce7e7245d456285ad48f2e698d41a2d7a2828a","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.4.1.tgz","integrity":"sha512-CdRiF63DeN3E7ssuZ9MUhCpV/QYtLNZp1yPagBnTEIKadgWYO5eoh8svgWVuIFJkKkLMr/HqKsRNdN73FFctJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjod3DTPdh7Xt/irgdBcE5/VaPPCQ8KpZ8kmlIX9mFmAiAeB4urwF2NqfysSI7ig8cOgDpFfVg6Ddb96PbjshBtfw=="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.4.1.tgz_1508848486891_0.7802788377739489"},"directories":{}},"0.4.2":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.4.2","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"49f81a78a07ec93da77ade451b30e3a3ec1dfe33","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.4.2","_shasum":"c6d6d846c2bd8ca69a0b49f84cc3604a232cdab9","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"shasum":"c6d6d846c2bd8ca69a0b49f84cc3604a232cdab9","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.4.2.tgz","integrity":"sha512-iFKURmob9w6EbmYVscsoZQ+j6RRBstNu/MZSn4aaNV1I9+kbsYzxpHEqTvn2J8rbmtjoUUaEpFXXz9kDoFi9UA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEqlHYTOggHCASoBqzU4cfe0ILkqEjT1hh9+/RoCVlX1AiBeoGpWzZi0k5WO6x3Hy++MQzkBHH/sxw4SszE5vAlvPw=="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.4.2.tgz_1508963895603_0.9272156418301165"},"directories":{}},"0.4.3":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.4.3","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"79b395f40c814a236aab86c728c3cb282737ad08","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.4.3","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-V7iV0MjmbC/pPyrKmZiXNkwDEBzaqesFPTEv/XLk/Lhmt/9l0ojSEB9ECorkcvBM5GFoFlDRSY6PfgxO8eB0aw==","shasum":"5b619285b89197fade0fc3fd2cf4f20a68c494e5","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.4.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0mQ6bqEi6dcxrglFkX4PTffmobPFisV3DKmg7nLFEmQIgEVZPYksVyP51NABRie1ITh0g0sO2yYkqGzy7BimyFLk="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.4.3.tgz_1509920294564_0.5728587640915066"},"directories":{}},"0.4.4":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.4.4","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"39896c8c03bcfa306ded859cc19a5547b784ff8c","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.4.4","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-ws1JtRJ9oA8wZrrCYBYLOPy8izNnX6hquwqVh5Ayvm7/fz2Uv12H6iF3lHFO8zM9nM6uecV9cgNUN6bfiH47kw==","shasum":"4e06ac5d6ace7bb95fd2dc3fd08e47de1a85f325","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.4.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNnSZjteA2NBUajowToh2RIa3uAh3dbxpL3k2cQxJLNAiBqxZ83GprAOoCX1riVmajjBpTyIvmhx6bvR4aUpEmYGA=="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.4.4.tgz_1509926037304_0.9525947854854167"},"directories":{}},"0.4.5":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.4.5","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7","react":"16.0.0-alpha.12"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1"},"gitHead":"9a2df0d905c37593126e848894c22ec771561c2d","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.4.5","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-zbwMRmtL1Tzl/0ir/2aIFxbEcG1YU2BEyv5jIjnhSKE0pMsiVK/m5RnRJFLfTmHPLzkqZMrlq68pSvfqcnESPg==","shasum":"20e0e68bad8899b56ad9f0e0f17ae75df0d90839","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.4.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGafYqU6ElGs+92j+u7TJh9HJzUwuBE4YmmJpn8us78AiAnMC1+f0hin+nIwSCxY+Ib8AztsAseqmN8xw9/s9buug=="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.4.5.tgz_1510531692048_0.8767479460220784"},"directories":{}},"0.5.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.5.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"9014f92f34e8f3fc21dec5c1b09703376c51931b","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.5.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-jq+1rK2CoQXTeBxsyVqaBrZK+xA1Bk4rzMDPEYmBS/Mh7wAgVJm/xi2/Iho7+XhoPMEjaxxvWE4uSMhoyNI4lw==","shasum":"9fd996e43a71e7396e0c081768d188c7a5ed8874","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.5.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA9mbr61k6jj8ZxRQQaMEwns8gYEc79DqnzefVafQdQMAiBB/WkcLclJ50UndfkxOcwSLgKTeK6jJOrryxNXCHoqFQ=="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.5.0.tgz_1510667177064_0.5386230309959501"},"directories":{}},"0.5.1":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.5.1","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"1a6184b3d91c21101dce30ba69867165d5b0e332","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.5.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-zDqrs7OTP1lpBdGGYOMl/DIzqY+ZICzoPNck6fFykM1pDwTiTG46Imd992I7FrUZMbyRLG+7zxFo9gpBnZjFYg==","shasum":"134362f79b13c2d384d5a22ecb48bf7ae9f8dca9","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.5.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGhxNfiQYmQIOiPaj9tPzFs89crWXV8tPtya+th03S0GAiEApdhs/IAGlQA4bpMDfBABbe+udl9RZzAGV2K5cHG7e+8="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.5.1.tgz_1510674622305_0.3914167867042124"},"directories":{}},"0.5.2":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.5.2","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"31dd93e470a088a6702e9714b8467f0e88d95404","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.5.2","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-mUMKiN69yMr5vSlu1HXobxd0PW4XEAW0dM5s8OXXSEl0hEUuiX2OTNAVE/2Mlysudf4tUzcRh9jz7QrG73mitg==","shasum":"51bcb2b37db0a82346dc16948132ef8a65f57559","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.5.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICIcg1X13rYQpmobpZ05OOMTowxoV+Sf7w5ikHGNMkk8AiANLKJUM4fFwu57Q8DZTGUiPJLTeLoInvkFTtwbYqnx8g=="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.5.2.tgz_1510675677816_0.7674416180234402"},"directories":{}},"0.5.3":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.5.3","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"0dc1a92eb850387cab96950071245dcabaac9cbc","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.5.3","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-j8s02LgRXWqJIVQrLaf4T/3S17eB4Sz12R5cg5LiMHttEPuD/8U+3ZMkp+F7/szvKQsExgeMn+X6pIfreIyQJA==","shasum":"5515c885dc07b58b74be90fbbd1df3ebdc37049b","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.5.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID2xSGypDB8C15Cf01oXkcTNfLFZgcvxXiBARiBWKkseAiEA2wtmBuqEV0wSj0DMEaqEAVKG7bymPnHU3oOYh7/+XcY="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.5.3.tgz_1510677758053_0.6245049682911485"},"directories":{}},"0.5.4":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.5.4","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"390151d57145820826442d5f502494a4c67e9fc2","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.5.4","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-spAX2OPCmYZshHNiVbVIu0PUxSTvJmnZM5bGTg/BTYgiGDoOvKTVx79GWNI2zWu43BwJC70BjuKiPiNOiUysuA==","shasum":"87c70b123228ee9a0807ed7717394eaaea9084c1","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.5.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHFg1f2JsqFk+RjqmD2RNdY/pRMqrEneGZV6tN/UQUfUAiEAhw3RTPNVNIDDN/BrGh1cD1laFvPzlkEjC/v+fm6cTfY="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.5.4.tgz_1510694846217_0.6303532056044787"},"directories":{}},"0.5.5":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.5.5","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"a5289f3955f6577c059a54e25d3228adb5afbe78","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.5.5","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-V4uMx4K5hHH/cJk0n9ntJDeRfqwSKg3Iz3ydi+2MsegP+C6aIa2Azq9EvvNs2vdlC5H7L2I1PrDX7JTZLG35SA==","shasum":"1db5d08e2f12c29bac656bab17ac2b114ee027f9","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.5.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAE+zHsHFsOvYEN2Lrygazxgv87PxPrmVDHzUIl5gFZXAiAQqDbW3+NaTeq1qfC+neWA4LKBJ2ZL9j3JOINB1yjYCw=="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.5.5.tgz_1510765078243_0.7761070432607085"},"directories":{}},"0.6.0-beta.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.6.0-beta.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"785e8dd5a6e4861324a13ee0a3cc2ffd92568824","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.6.0-beta.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-vtvv4Py3/dtqqSyLoy/pUUjb2HWoPFM4K6NSRpmsVw6R4DZR7kfNEGYhAeW1q7AEjM9gi88xva/pGnS3BlM4/g==","shasum":"50ce4094e59c3fb4abc21f4fef5bad293af893d6","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.6.0-beta.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQthuLe+uuflXuiXxor4crrEepzCSVwfpO/Ky6INs9kwIhAMfRi5QuSZ1Wq2QH01fALeenyCpDbRLOCYCcX4ewllL9"}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.6.0-beta.0.tgz_1510847338185_0.5447073804680258"},"directories":{}},"0.6.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.6.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"b18a47abbadf22323dceceec385eed848d7bd368","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.6.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-/O92EV4pBY+/dmIFGbfEBE7sZ3QpDs7fynPWx8wNzBEt6nbbb7GfTr350lVWzcrphEj1EmlmBBhPdVcujI7CZQ==","shasum":"3f7de76fbbbef76e541bde06d9fd3852b72b1779","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.6.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/9TrA6eIY51fWbEOZ8wDMc8NRw12YQV0/HV2I+jpHUAiEA38eOh1hriTMxBrEdJHZmnvT78H6F3Vgr320x6rqiWKo="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.6.0.tgz_1511863014330_0.388014055788517"},"directories":{}},"0.6.1-beta.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.6.1-beta.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"421b5f8cebb07fce6ec3296fff6d372ac47b5881","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.6.1-beta.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-Ykhc5lxwTIiN6mbeE1QnwBAmIaxpkoaoYrZ3YG8bUrPJcpjoekeTo2aPubq1ZFp3yPpJZzktZWuBqZ79wcLRXw==","shasum":"264d01fdea2f2336b7e5591027059a26cb200571","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.6.1-beta.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCad/qfDH/8C9BFe6vTlNf1xV6A5t8jDP0UdFGFp1dGCwIgV6cA084a10BtjJ/TUpjCtgyHGq9qMAEL7VOuwwAsLxM="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.6.1-beta.0.tgz_1512400509817_0.4643251816742122"},"directories":{}},"0.6.1-beta.1":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.6.1-beta.1","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"a1867a1af5ff5f61ae38c5364a77d3046c6adf2d","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.6.1-beta.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-Dgr5Qr+RCNEavX8jTv+mhBLqcroGXMX/GHIfhNDBIOIGmlj0rwv1judWrQLy3xBF3PQVdCNwWl71gcm0xBSlow==","shasum":"537c237f0445db40b46e6a1762a80d3b62223be3","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.6.1-beta.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCND0a8dCuzVlfre9Pn3BSNsENeQAxOr4S5N0H8KZnfyAIhAKwIMGmosaHwDJMprPE6sPrf7FNARAbN526WLS8GxnCz"}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.6.1-beta.1.tgz_1512558803667_0.21322501171380281"},"directories":{}},"0.6.2-beta":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.6.2-beta","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"517e9473fbb31d6b30b2204fc18ce1020b401a7e","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.6.2-beta","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-kFYKZhjf5GTN2B9OOxxJDr811y+9azjEKRG7La5DcUP3eMu4SjIKLiC25CkVQfBTwkYXA8b9J1uPROP3f7liUA==","shasum":"0f1c78284bbad3703493811514ad42c85136908d","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.6.2-beta.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxWc+Xyph4KQV9bQ4v9U2P3VR3JYzW3HdoJzPysni9pwIgedjMud/vnI00NOnSYMPeX1P8NK4jbND3MCyo4JZOLAE="}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.6.2-beta.tgz_1512683905646_0.7771050124429166"},"directories":{}},"0.7.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.7.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"8107a63393baff0176d394b7deba112dbafbe5a9","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.7.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-+GrwbmGQN0f6NVqI6Xo3dkq802lv7F65udOknxoCLXKKiXlRMSt4wu2MEttoUKUGGjCshvIKzE77HT4ClzPhkQ==","shasum":"856cf9c5575c513f759218c07c8889cccaad7943","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.7.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuKGze0IQ0AvvQ9R434+3xuH37FVaTgZh2WJOs1rJWbQIhAOO/nNriKxvmtvL/8JnlqjPVmQU8vdBLtn5mJWx3PtbR"}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.7.0.tgz_1513859956830_0.6309558127541095"},"directories":{}},"0.7.1":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.7.1","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"75fdf78e4630c7ed64cd148b1dc6ac653c689542","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.7.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-p5L4Zol5FsBisk7igcjLooAkX5xR+x/ROet9z+e4VfK11LkUMrtft+LOR984qx/4FPpO+SpV43XBRfAKRz4+hA==","shasum":"fca26e24cb0b7d89b2e1a6375db7c92bd3377422","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.7.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPkj3v/OkSkQ6vaz0UIorNI8ACKlam/MQkiDrKdV1cMAIhAN+J5GY9Tik2rPM1v3SZ66mh+/wHs0Wh9SV5uJa4HsQg"}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.7.1.tgz_1513871142845_0.8838878420647234"},"directories":{}},"0.8.0-beta.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.8.0-beta.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"726ac4ce43fb463abc41cd5423a6871b8afd8156","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.8.0-beta.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-LP9vQhglSSxdLpRExv6SLqD9SGAxzoGAfRjDFewXzb7na/HQkEDJ4MrwIh/9jjlHf5ZknDAG6FG25O1Adypwmw==","shasum":"950738f8bbbe6da113994fa21b95647ae1b7d7e4","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.8.0-beta.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaTu/kO8w4wTziGSgKloShOa6I6Dz9EU+iIWtOkDozeQIhAK55PqyljjUhzCPyjE2Q7O76H3rGUY4nhcHb1qFxcgAT"}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.8.0-beta.0.tgz_1515770748423_0.788533603772521"},"directories":{}},"0.8.0-beta.1":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.8.0-beta.1","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","_PocketSVG":"git+https://github.com/pocketsvg/PocketSVG.git","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"7ffa8e67e73f8cc626b3ce7362ba1e26eb778c2b","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.8.0-beta.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-FLwqaItpl8Tr21DX2IvqXYn6Ipkbr6IgUCJsWRZgIewqve1qjkHsD/P+Yil4rYUNqm1r1jE+HVfYVrPUeillzQ==","shasum":"cf7b87684c6cd4eb0a7ceb73f5d31680fcd7390d","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.8.0-beta.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKKzJSiw4lfH+R3kHLznbGDMWNkCvanb8a/JGSxrcsKgIhAPb9W8uhAoRPOVBWYU/FrL3KotUXzjo2VYOVijNXUYiq"}]},"maintainers":[{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit-0.8.0-beta.1.tgz_1517935138498_0.5859036755282432"},"directories":{}},"0.8.0-beta.2":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.8.0-beta.2","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"readme":"# react-native-arkit\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          planeDetection\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n          onPlaneDetected={console.log} // event listener for plane detection\n          onPlaneUpdate={console.log} // event listener for plane update\n          onPlaneRemoved={console.log} // arkit sometimes removes detected planes\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n### Components\n\n#### `<ARKit />`\n\n##### Props\n\n| Prop | Type | Default | Note |\n|---|---|---|---|\n| `debug` | `Boolean` | `false` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `Boolean` | `false` | ARKit plane detection.\n| `lightEstimationEnabled` | `Boolean` | `false` | ARKit light estimation.\n| `worldAlignment` | `Enumeration` <br /> One of: `ARKit.ARWorldAlignment.Gravity`, `ARKit.ARWorldAlignment.GravityAndHeading`, `ARKit.ARWorldAlignment.Camera` (documentation [here](https://developer.apple.com/documentation/arkit/arworldalignment)) | `ARKit.ARWorldAlignment.Gravity` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera.|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n\n##### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onPlaneDetected` | `Plane` | When a plane is first detected.\n| `onPlaneUpdate` | `Plane` | When a detected plane is updated\n| `onPlaneRemoved` | `Plane` | When a detected plane is updated\n\nThe `Plane` object has the following properties:\n\n| Property | Description\n|---|---|\n| `id` | a unique id identifying the plane |\n| `position` | the position of the plane (relative to the origin) |\n| `positionAbsolute` | the absolute position of the plane |\n| `extent` | the extent of the plane |\n| `eulerAngles` | the rotation of the plane |\n\n\n\n\n##### Static methods\n\nAll methods return a promise with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n\n\n#### 3D objects\n\n##### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts hadows |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material properties\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | { `path`, `color`, `intensity` } | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | { `path`, `color`, `intensity` } | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | { `path`, `color`, `intensity` } | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | { `path`, `color`, `intensity` } |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\n\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"90cca736a0a68365500528e294c72ac92c50cd09","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.8.0-beta.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-kyPJ6+fuGrSQkjklL351RxLsyVu4XdsnH614Us1rLz4PsYiQpVDlxd3A4VU2kB0qZgUAkFmTpQ2lYclVg6vbuQ==","shasum":"4660a6fa7a22bfd4252d2ceb7020dfeef0d1a311","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.8.0-beta.2.tgz","fileCount":104,"unpackedSize":862837,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0YpLGeMY/jB1ccUROwtVxAoMYZk1Uopi0l/tDkRwJUQIhAJb3ERyBs3pytq3wMR3Hqn8t2CeAfV3RIc/7h5qhnuUz"}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.8.0-beta.2_1518017102374_0.15400439095665375"},"_hasShrinkwrap":false},"0.8.0-beta.3":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.8.0-beta.3","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"readme":"# react-native-arkit\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          planeDetection\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n          onPlaneDetected={console.log} // event listener for plane detection\n          onPlaneUpdate={console.log} // event listener for plane update\n          onPlaneRemoved={console.log} // arkit sometimes removes detected planes\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n### Components\n\n#### `<ARKit />`\n\n##### Props\n\n| Prop | Type | Default | Note |\n|---|---|---|---|\n| `debug` | `Boolean` | `false` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `Boolean` | `false` | ARKit plane detection.\n| `lightEstimationEnabled` | `Boolean` | `false` | ARKit light estimation.\n| `worldAlignment` | `Enumeration` <br /> One of: `ARKit.ARWorldAlignment.Gravity`, `ARKit.ARWorldAlignment.GravityAndHeading`, `ARKit.ARWorldAlignment.Camera` (documentation [here](https://developer.apple.com/documentation/arkit/arworldalignment)) | `ARKit.ARWorldAlignment.Gravity` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera.|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n\n##### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onPlaneDetected` | `Plane` | When a plane is first detected.\n| `onPlaneUpdate` | `Plane` | When a detected plane is updated\n| `onPlaneRemoved` | `Plane` | When a detected plane is updated\n\nThe `Plane` object has the following properties:\n\n| Property | Description\n|---|---|\n| `id` | a unique id identifying the plane |\n| `position` | the position of the plane (relative to the origin) |\n| `positionAbsolute` | the absolute position of the plane |\n| `extent` | the extent of the plane |\n| `eulerAngles` | the rotation of the plane |\n\n\n\n\n##### Static methods\n\nAll methods return a promise with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n\n\n#### 3D objects\n\n##### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts hadows |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material properties\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | { `path`, `color`, `intensity` } | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | { `path`, `color`, `intensity` } | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | { `path`, `color`, `intensity` } | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | { `path`, `color`, `intensity` } |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\n\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"e48130fc915786dac07fbf2cade62ee7146386b9","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.8.0-beta.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-fUPaTTo9CPm/DLtGYPokXmC9Brci1NMLO6q6NxST9x/Gzc0KCjfFhnr55GHouwd7LOOWsC4yJmLAJTUxmfglzQ==","shasum":"e1805efc4334eaa3420f7cc8db103ab14fe810fc","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.8.0-beta.3.tgz","fileCount":104,"unpackedSize":862741,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCU/4O1j/FTkFI6sSmH6tTVpDUTHm3dq1OXGOC5NErWCQIgATNlPkK8Nath2Uqg7uCdgbTT6OTy87Y9ioiLLQjqt/Q="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.8.0-beta.3_1518018611825_0.6269020452423466"},"_hasShrinkwrap":false},"0.8.0-beta.4":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.8.0-beta.4","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"readme":"# react-native-arkit\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          planeDetection\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n          onPlaneDetected={console.log} // event listener for plane detection\n          onPlaneUpdate={console.log} // event listener for plane update\n          onPlaneRemoved={console.log} // arkit sometimes removes detected planes\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n### Components\n\n#### `<ARKit />`\n\n##### Props\n\n| Prop | Type | Default | Note |\n|---|---|---|---|\n| `debug` | `Boolean` | `false` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `Boolean` | `false` | ARKit plane detection.\n| `lightEstimationEnabled` | `Boolean` | `false` | ARKit light estimation.\n| `worldAlignment` | `Enumeration` <br /> One of: `ARKit.ARWorldAlignment.Gravity`, `ARKit.ARWorldAlignment.GravityAndHeading`, `ARKit.ARWorldAlignment.Camera` (documentation [here](https://developer.apple.com/documentation/arkit/arworldalignment)) | `ARKit.ARWorldAlignment.Gravity` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera.|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n\n##### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onPlaneDetected` | `Plane` | When a plane is first detected.\n| `onPlaneUpdate` | `Plane` | When a detected plane is updated\n| `onPlaneRemoved` | `Plane` | When a detected plane is updated\n\nThe `Plane` object has the following properties:\n\n| Property | Description\n|---|---|\n| `id` | a unique id identifying the plane |\n| `position` | the position of the plane (relative to the origin) |\n| `positionAbsolute` | the absolute position of the plane |\n| `extent` | the extent of the plane |\n| `eulerAngles` | the rotation of the plane |\n\n\n\n\n##### Static methods\n\nAll methods return a promise with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n\n\n#### 3D objects\n\n##### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts hadows |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material properties\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | { `path`, `color`, `intensity` } | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | { `path`, `color`, `intensity` } | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | { `path`, `color`, `intensity` } | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | { `path`, `color`, `intensity` } |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\n\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"bccde48c9563eaa555aa031fb6f92cdab7e3262e","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.8.0-beta.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-UEjN/yPNnx3JOVaHxEp7c7GGfdOyZecs2CSis8rGuhLsX7KhikZaVJMSfP11l9MXAGtEwoQ3dtuZ3mv1eTEyIA==","shasum":"3debd45763fb90dad7f8f577274718b4328c9f2d","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.8.0-beta.4.tgz","fileCount":104,"unpackedSize":864579,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzR+6Fe5MJ/UynbwzastBMLv+MWZ1Hr3vKglan2OiqhQIgCdGoxXg6eBR0+L36Bb0DCHvo6ZL0uZaLqgVUoNFPKcY="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.8.0-beta.4_1518021839688_0.5168590008687359"},"_hasShrinkwrap":false},"0.8.0-beta.5":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.8.0-beta.5","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"324601d7f15fcd2a4bae624b1075c21665178caf","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.8.0-beta.5","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-7C0hbtWTTsUk6KT6D2o5y3wDQLsJqx+GGe3dZ6tbpogFmThwZIM59MJrjOQSgKTfupgtEtZUD5pXhv8KxxDFcQ==","shasum":"05ef73849f76995523864fd27586f75a8ace07e0","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.8.0-beta.5.tgz","fileCount":104,"unpackedSize":865284,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNadY89dN0H+rvTSvAttLkOyVm5dwreWJ3lbJjMHfZogIgcLZ7rm6d6eMsuMUkjxzBL3ZjSVJzs16vMofIGxCie2k="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.8.0-beta.5_1519146053590_0.5928305377807916"},"_hasShrinkwrap":false},"0.8.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.8.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"gitHead":"ee8084b28a69c272df596c2fadceb24d03cff282","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.8.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-5mEhQbpsg8SYb9ISDvsRFLpY1L1oihcRndfcW+2niEXoQUBKE59oHDI+yfIz8eg1Cnnev990/2AJQEdTwsZtyA==","shasum":"efdd84d2b88460c5cb0fd59f3de332eb6eb28af9","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.8.0.tgz","fileCount":104,"unpackedSize":865141,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD18bx0CB+LI4VpNkjg8Gm5ypUepqikeL9tMSyF+2gbIwIhAM267ppG+KBmS7mlH4MTZy+8PCMOcRnaoIGq/qNAFcie"}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.8.0_1519207693426_0.36067433957892203"},"_hasShrinkwrap":false},"0.9.0-beta.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-beta.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"readme":"# react-native-arkit\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          planeDetection\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n          onPlaneDetected={console.log} // event listener for plane detection\n          onPlaneUpdate={console.log} // event listener for plane update\n          onPlaneRemoved={console.log} // arkit sometimes removes detected planes\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n### Components\n\n#### `<ARKit />`\n\n##### Props\n\n| Prop | Type | Default | Note |\n|---|---|---|---|\n| `debug` | `Boolean` | `false` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `Boolean` | `false` | ARKit plane detection.\n| `lightEstimationEnabled` | `Boolean` | `false` | ARKit light estimation.\n| `worldAlignment` | `Enumeration` <br /> One of: `ARKit.ARWorldAlignment.Gravity`, `ARKit.ARWorldAlignment.GravityAndHeading`, `ARKit.ARWorldAlignment.Camera` (documentation [here](https://developer.apple.com/documentation/arkit/arworldalignment)) | `ARKit.ARWorldAlignment.Gravity` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera.|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n\n##### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onPlaneDetected` | `Plane` | When a plane is first detected.\n| `onPlaneUpdate` | `Plane` | When a detected plane is updated\n| `onPlaneRemoved` | `Plane` | When a detected plane is updated\n\nThe `Plane` object has the following properties:\n\n| Property | Description\n|---|---|\n| `id` | a unique id identifying the plane |\n| `position` | the position of the plane (relative to the origin) |\n| `positionAbsolute` | the absolute position of the plane |\n| `extent` | the extent of the plane |\n| `eulerAngles` | the rotation of the plane |\n\n\n\n\n##### Static methods\n\nAll methods return a promise with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n\n\n#### 3D objects\n\n##### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts hadows |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material properties\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | { `path`, `color`, `intensity` } | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | { `path`, `color`, `intensity` } | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | { `path`, `color`, `intensity` } | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | { `path`, `color`, `intensity` } |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\n\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"4480cc5ea34ab926d08a408ada74c33c72d57613","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-beta.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-48+U1w21iY28YkteQyAjRgTOfc7aqTz5gtMicxxFCf3UpnD4A9+KiujC5mDqXwQJRmW6iQCYVLdEvJXIcedS+Q==","shasum":"274f3fed0aa4b79c5d175b26cc83652f33d9f286","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-beta.0.tgz","fileCount":105,"unpackedSize":866548,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGTY+juL+uikGuYqrJq7S9i3okZGXaSCod9sl8y3Bj0gAiAc7FVK4TNTKdKDQx6luqN7LYJlxZKbrvxTjZ9Uwc6fgg=="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-beta.0_1519208225971_0.11961057246715012"},"_hasShrinkwrap":false},"0.9.0-beta.1":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-beta.1","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"readme":"# react-native-arkit\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          planeDetection\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n          onPlaneDetected={console.log} // event listener for plane detection\n          onPlaneUpdate={console.log} // event listener for plane update\n          onPlaneRemoved={console.log} // arkit sometimes removes detected planes\n          onARKitError={console.log} // if arkit could not be initialized (e.g. missing permissions), you will get notified here\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n### Components\n\n#### `<ARKit />`\n\n##### Props\n\n| Prop | Type | Default | Note |\n|---|---|---|---|\n| `debug` | `Boolean` | `false` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `Boolean` | `false` | ARKit plane detection.\n| `lightEstimationEnabled` | `Boolean` | `false` | ARKit light estimation.\n| `worldAlignment` | `Enumeration` <br /> One of: `ARKit.ARWorldAlignment.Gravity`, `ARKit.ARWorldAlignment.GravityAndHeading`, `ARKit.ARWorldAlignment.Camera` (documentation [here](https://developer.apple.com/documentation/arkit/arworldalignment)) | `ARKit.ARWorldAlignment.Gravity` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera.|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n\n##### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onPlaneDetected` | `Plane` | When a plane is first detected.\n| `onPlaneUpdate` | `Plane` | When a detected plane is updated\n| `onPlaneRemoved` | `Plane` | When a detected plane is updated\n\nThe `Plane` object has the following properties:\n\n| Property | Description\n|---|---|\n| `id` | a unique id identifying the plane |\n| `position` | the position of the plane (relative to the origin) |\n| `positionAbsolute` | the absolute position of the plane |\n| `extent` | the extent of the plane |\n| `eulerAngles` | the rotation of the plane |\n\n\n\n\n##### Static methods\n\nAll methods return a *promise* with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n| `isInitialized` | boolean | check whether arkit has been initialized (e.g. by mounting). See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n| `isMounted` | boolean | check whether arkit has been mounted. See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n\n#### 3D objects\n\n##### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts hadows |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material properties\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | { `path`, `color`, `intensity` } | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | { `path`, `color`, `intensity` } | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | { `path`, `color`, `intensity` } | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | { `path`, `color`, `intensity` } |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\n\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n## FAQ:\n\n#### Which permissions does this use?\n\n- **camera access** (see section iOS Project configuration above). The user is asked for permission, as soon as you mount an `<ARKit />` component or use any of its API. If user denies access, you will get an error in `onARKitError`\n- **location service**: only needed if you use `ARKit.ARWorldAlignment.GravityAndHeading`.\n\n#### Is there an Android / ARCore version?\n\nNot yet, but there has been a proof-of-concept: https://github.com/HippoAR/react-native-arkit/issues/14. We are looking for contributors to help backporting this proof-of-conept to react-native-arkit.\n\n#### I have another question...\n\n[**Join Slack!**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"6cebc9e25da8e5b3c2733c7539a584ae1decbf52","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-beta.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-hm82CB7Ka0BjA50ccLjI5QeWKzRQxkUvKSu7Z0VuKQ26kqqjtsxZba0VK1OoM2aiQkPVd/GhmyIys+DCZ+uGlQ==","shasum":"42eb335b35cfd331e2774c0f5f36e2d92f0e4662","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-beta.1.tgz","fileCount":105,"unpackedSize":868640,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC65pFOC48LrSmtOWdIpxYc4ECupoWBI5Ii1UIewShsNgIgO09C0q2HwAwcaSYkTcWHrDDC1EthBsAnqz8zx/eJ0SM="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-beta.1_1519221958943_0.8123622420611971"},"_hasShrinkwrap":false},"0.9.0-beta.2":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-beta.2","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"readme":"# react-native-arkit\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          planeDetection\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n          onPlaneDetected={console.log} // event listener for plane detection\n          onPlaneUpdate={console.log} // event listener for plane update\n          onPlaneRemoved={console.log} // arkit sometimes removes detected planes\n          onARKitError={console.log} // if arkit could not be initialized (e.g. missing permissions), you will get notified here\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n### Components\n\n#### `<ARKit />`\n\n##### Props\n\n| Prop | Type | Default | Note |\n|---|---|---|---|\n| `debug` | `Boolean` | `false` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `Boolean` | `false` | ARKit plane detection.\n| `lightEstimationEnabled` | `Boolean` | `false` | ARKit light estimation.\n| `worldAlignment` | `Enumeration` <br /> One of: `ARKit.ARWorldAlignment.Gravity`, `ARKit.ARWorldAlignment.GravityAndHeading`, `ARKit.ARWorldAlignment.Camera` (documentation [here](https://developer.apple.com/documentation/arkit/arworldalignment)) | `ARKit.ARWorldAlignment.Gravity` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera.|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n\n##### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onPlaneDetected` | `Plane` | When a plane is first detected.\n| `onPlaneUpdate` | `Plane` | When a detected plane is updated\n| `onPlaneRemoved` | `Plane` | When a detected plane is updated\n\nThe `Plane` object has the following properties:\n\n| Property | Description\n|---|---|\n| `id` | a unique id identifying the plane |\n| `position` | the position of the plane (relative to the origin) |\n| `positionAbsolute` | the absolute position of the plane |\n| `extent` | the extent of the plane |\n| `eulerAngles` | the rotation of the plane |\n\n\n\n\n##### Static methods\n\nAll methods return a *promise* with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n| `isInitialized` | boolean | check whether arkit has been initialized (e.g. by mounting). See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n| `isMounted` | boolean | check whether arkit has been mounted. See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n\n#### 3D objects\n\n##### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts hadows |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | `{ ...mapProperties }` (see below) | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | `{ ...mapProperties }` (see below) | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | `{ ...mapProperties }` (see below) | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | `{ ...mapProperties }` (see below) |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\nMap Properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `path` | string | Currently `require` is not supported, so this is an absolute link to a local resource placed for example in .xcassets |\n| `color` | string | Color string, only used if path is not provided |\n| `wrapS` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` | [wrapS](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395384-wraps?language=objc) |\n| `wrapT` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  [wrapT](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395382-wrapt?language=objc) |\n| `wrap` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  Shorthand for setting both wrapS & wrapT |\n| `translation` | `{ x, y, z }` | Translate the UVs, equivalent to applying a translation matrix to SceneKit's `transformContents`  |\n| `rotation` | `{ angle, x, y, z }` | Rotate the UVs, equivalent to applying a rotation matrix to SceneKit's `transformContents` |\n| `scale` | `{ x, y, z }` | Scale the UVs, equivalent to applying a scale matrix to SceneKit's `transformContents`  |\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n## FAQ:\n\n#### Which permissions does this use?\n\n- **camera access** (see section iOS Project configuration above). The user is asked for permission, as soon as you mount an `<ARKit />` component or use any of its API. If user denies access, you will get an error in `onARKitError`\n- **location service**: only needed if you use `ARKit.ARWorldAlignment.GravityAndHeading`.\n\n#### Is there an Android / ARCore version?\n\nNot yet, but there has been a proof-of-concept: https://github.com/HippoAR/react-native-arkit/issues/14. We are looking for contributors to help backporting this proof-of-conept to react-native-arkit.\n\n#### I have another question...\n\n[**Join Slack!**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"d8a5475303d0e8a439fd1c97a28cb7416fb3e665","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-beta.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-1YkeHjEyE71UojiznC+AVFSTY9Zz+m43uafEvZje7c+E8Zw+YO2B1HL0vzCLUeDmpZ+LHzvR/0zMCemQWpAZAw==","shasum":"0dd1bbaedf84ade9ca8a90d1de0109f251294b80","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-beta.2.tgz","fileCount":105,"unpackedSize":872250,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCz+TWtECwBLqMO656TcRZc35sfR3PVo77KA9xwuPDdpQIgVOe2CGhc7exTLX6oWt3RtYryafGkVx4Z1UXOlfY5TxQ="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-beta.2_1519222619606_0.4705746569152791"},"_hasShrinkwrap":false},"0.9.0-beta.3":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-beta.3","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"readme":"# react-native-arkit\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          // enable plane detection (defaults to Horizontal)\n          planeDetection={ARKit.planeDetection.Horizontal}\n\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n\n          // event listener for (horizontal) plane detection\n          onPlaneDetected={anchor => console.log(anchor)}\n\n          // event listener for plane update\n          onPlaneUpdated={anchor => console.log(anchor)}\n\n          // arkit sometimes removes detected planes\n          onPlaneRemoved={anchor => console.log(anchor)}\n\n          // event listeners for all anchors, see [Planes and Anchors](#planes-and-anchors)\n          onAnchorDetected={anchor => console.log(anchor)}\n          onAnchorUpdated={anchor => console.log(anchor)}\n          onAnchorRemoved={anchor => console.log(anchor)}\n\n          // you can detect images and will get an anchor for these images\n          detectionImages={[{ resourceGroupName: 'DetectionImages' }]}\n\n\n          onARKitError={console.log} // if arkit could not be initialized (e.g. missing permissions), you will get notified here\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n\n\n### `<ARKit />`-Component\n\n#### Props\n\n| Prop | Type | Note |\n|---|---|---|\n| `debug` | `Boolean` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `ARKit.ARPlaneDetection.{ Horizontal \\| Vertical \\| HorizontalVertical \\| None }` | ARKit plane detection. Defaults to `Horizontal`. `Vertical` is available with IOS 11.3\n| `lightEstimationEnabled` | `Boolean` | ARKit light estimation (defaults to false).\n| `worldAlignment` | `ARKit.ARWorldAlignment.{ Gravity \\| GravityAndHeading \\| Camera }` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera. Defaults to `ARKit.ARWorldAlignment.Gravity`.  [See](https://developer.apple.com/documentation/arkit/arworldalignment)|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n| `detectionImages` | `Array<DetectionImage>` | An Array of `DetectionImage` (see below), only available on IOS 11.3 |  \n\n##### `DetectionImage`\n\nAn `DetectionImage` is an image or image resource group that should be detected by ARKit.\n\nSee https://developer.apple.com/documentation/arkit/arreferenceimage?language=objc how to add these images.\n\nYou will then receive theses images in `onAnchorDetected/onAnchorUpdated`. See also [Planes and Anchors](#planes-and-anchors) for more details.\n\n`DetectionImage` has these properties\n\n| Prop | Type | Notes\n|---|---|---|\n| `resourceGroupName` | `String` | The name of the resource group |\n\nWe probably will add the option to load images from other sources as well (PRs encouraged).\n\n#### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onAnchorDetected` | `Anchor` | When an anchor (plane or image) is first detected.\n| `onAnchorUpdated` | `Anchor` | When an anchor is updated\n| `onAnchorRemoved` | `Anchor` | When an anchor is removed\n| `onPlaneDetected` | `Anchor` | When a plane anchor is first detected.\n| `onPlaneUpdated` | `Anchor` | When a detected plane is updated\n| `onPlaneRemoved` | `Anchor` | When a detected plane is removed\n\nSee [Planes and Anchors](#planes-and-anchors) for Details about anchors\n\n\n\n#### Planes and Anchors\n\nARKit can detect different anchors in the real world:\n\n- `plane` horizontal and vertical planes\n- `image`, image-anchors [See DetectionImage](#DetectionImage)\n- face with iphone X or similar (not implemented yet)\n\nYou then will receive anchor objects in the `onAnchorDetected`, `onAnchorUpdated`, `onAnchorRemoved` callbacks on your `<ARKit />`-component.\n\nYou can use `onPlaneDetected`, `onPlaneUpdated`, `onPlaneRemoved` to only receive plane-anchors (may be deprecated later).\n\nThe `Anchor` object has the following properties:\n\n| Property | Type | Description\n|---|---|---|\n| `id` | `String` | a unique id identifying the anchor |\n| `type` | `String` | The type of the anchor (plane, image) |\n| `position` | `{ x, y, z }` | the position of the anchor (relative to the origin) |\n| `positionAbsolute` | `{ x, y, z }` | the absolute position of the anchor |\n| `eulerAngles` | `{ x, y, z }` | the rotation of the plane |\n\nIf its a `plane`-anchor, it will have these additional properties:\n\n| Property | Description\n|---|---|\n| `alignment` | `ARKit.ARPlaneAnchorAlignment.Horizontal` or `ARKit.ARPlaneAnchorAlignment.Vertical` <br /> so you can check whether it was a horizontal or vertical plane |\n| `extent` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n| `center` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n\n`image`-Anchor:\n\n| Property | type | Description\n|---|---|---|\n| `image` | `{name}` | an object with the name of the image.\n\n\n\n### Static methods\n\nStatic Methods can directly be used on the `ARKit`-export:\n\n```\nimport { ARKit } from 'react-native-arkit'\n\n//...\nconst result = await ARKit.hitTestSceneObjects(point);\n\n```\n\nAll methods return a *promise* with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n| `isInitialized` | boolean | check whether arkit has been initialized (e.g. by mounting). See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n| `isMounted` | boolean | check whether arkit has been mounted. See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n\n### 3D-Components\n\n#### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts shadows |\n| `constraint` | `ARKit.Constraint.{ BillboardAxisAll \\| BillboardAxisX \\| BillboardAxisY \\| BillboardAxisZ \\| None }` | Constrains the node to always point to the camera |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | `{ ...mapProperties }` (see below) | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | `{ ...mapProperties }` (see below) | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | `{ ...mapProperties }` (see below) | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | `{ ...mapProperties }` (see below) |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\nMap Properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `path` | string | Currently `require` is not supported, so this is an absolute link to a local resource placed for example in .xcassets |\n| `color` | string | Color string, only used if path is not provided |\n| `wrapS` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` | [wrapS](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395384-wraps?language=objc) |\n| `wrapT` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  [wrapT](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395382-wrapt?language=objc) |\n| `wrap` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  Shorthand for setting both wrapS & wrapT |\n| `translation` | `{ x, y, z }` | Translate the UVs, equivalent to applying a translation matrix to SceneKit's `transformContents`  |\n| `rotation` | `{ angle, x, y, z }` | Rotate the UVs, equivalent to applying a rotation matrix to SceneKit's `transformContents` |\n| `scale` | `{ x, y, z }` | Scale the UVs, equivalent to applying a scale matrix to SceneKit's `transformContents`  |\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n## FAQ:\n\n#### Which permissions does this use?\n\n- **camera access** (see section iOS Project configuration above). The user is asked for permission, as soon as you mount an `<ARKit />` component or use any of its API. If user denies access, you will get an error in `onARKitError`\n- **location service**: only needed if you use `ARKit.ARWorldAlignment.GravityAndHeading`.\n\n#### Is there an Android / ARCore version?\n\nNot yet, but there has been a proof-of-concept: https://github.com/HippoAR/react-native-arkit/issues/14. We are looking for contributors to help backporting this proof-of-conept to react-native-arkit.\n\n#### I have another question...\n\n[**Join Slack!**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"4ac175d5e0d1f73badd42f5d9fdb27897dfb55a5","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-beta.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-Nq6qKB6yonqN5yC2MIHfaBlcewmtFzemwHRlkKSxNegPOSufc8WG2kgAXhEg3ERrxXoDHJjJIKnsuIatqqGB0A==","shasum":"30a894bc12a8288ce64e5b65c835767cf8751f97","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-beta.3.tgz","fileCount":105,"unpackedSize":882557,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBpUKPtbQAv38BQZYtmBTQE+1JF5h0+WQ2SCYemHkN8gIhAMZLPy2IE+RJfhzvkVbb9ZyKJxCdXkzidTnL3EokFsaL"}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-beta.3_1519740743970_0.08123369315627071"},"_hasShrinkwrap":false},"0.9.0-beta.4":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-beta.4","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.5.7"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.0.0-alpha.12","prop-types":"^15.5.8"},"readme":"# react-native-arkit\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          // enable plane detection (defaults to Horizontal)\n          planeDetection={ARKit.planeDetection.Horizontal}\n\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n\n          // event listener for (horizontal) plane detection\n          onPlaneDetected={anchor => console.log(anchor)}\n\n          // event listener for plane update\n          onPlaneUpdated={anchor => console.log(anchor)}\n\n          // arkit sometimes removes detected planes\n          onPlaneRemoved={anchor => console.log(anchor)}\n\n          // event listeners for all anchors, see [Planes and Anchors](#planes-and-anchors)\n          onAnchorDetected={anchor => console.log(anchor)}\n          onAnchorUpdated={anchor => console.log(anchor)}\n          onAnchorRemoved={anchor => console.log(anchor)}\n\n          // you can detect images and will get an anchor for these images\n          detectionImages={[{ resourceGroupName: 'DetectionImages' }]}\n\n\n          onARKitError={console.log} // if arkit could not be initialized (e.g. missing permissions), you will get notified here\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n\n\n### `<ARKit />`-Component\n\n#### Props\n\n| Prop | Type | Note |\n|---|---|---|\n| `debug` | `Boolean` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `ARKit.ARPlaneDetection.{ Horizontal \\| Vertical \\| HorizontalVertical \\| None }` | ARKit plane detection. Defaults to `Horizontal`. `Vertical` is available with IOS 11.3\n| `lightEstimationEnabled` | `Boolean` | ARKit light estimation (defaults to false).\n| `worldAlignment` | `ARKit.ARWorldAlignment.{ Gravity \\| GravityAndHeading \\| Camera }` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera. Defaults to `ARKit.ARWorldAlignment.Gravity`.  [See](https://developer.apple.com/documentation/arkit/arworldalignment)|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n| `detectionImages` | `Array<DetectionImage>` | An Array of `DetectionImage` (see below), only available on IOS 11.3 |  \n\n##### `DetectionImage`\n\nAn `DetectionImage` is an image or image resource group that should be detected by ARKit.\n\nSee https://developer.apple.com/documentation/arkit/arreferenceimage?language=objc how to add these images.\n\nYou will then receive theses images in `onAnchorDetected/onAnchorUpdated`. See also [Planes and Anchors](#planes-and-anchors) for more details.\n\n`DetectionImage` has these properties\n\n| Prop | Type | Notes\n|---|---|---|\n| `resourceGroupName` | `String` | The name of the resource group |\n\nWe probably will add the option to load images from other sources as well (PRs encouraged).\n\n#### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onAnchorDetected` | `Anchor` | When an anchor (plane or image) is first detected.\n| `onAnchorUpdated` | `Anchor` | When an anchor is updated\n| `onAnchorRemoved` | `Anchor` | When an anchor is removed\n| `onPlaneDetected` | `Anchor` | When a plane anchor is first detected.\n| `onPlaneUpdated` | `Anchor` | When a detected plane is updated\n| `onPlaneRemoved` | `Anchor` | When a detected plane is removed\n\nSee [Planes and Anchors](#planes-and-anchors) for Details about anchors\n\n\n\n#### Planes and Anchors\n\nARKit can detect different anchors in the real world:\n\n- `plane` horizontal and vertical planes\n- `image`, image-anchors [See DetectionImage](#DetectionImage)\n- face with iphone X or similar (not implemented yet)\n\nYou then will receive anchor objects in the `onAnchorDetected`, `onAnchorUpdated`, `onAnchorRemoved` callbacks on your `<ARKit />`-component.\n\nYou can use `onPlaneDetected`, `onPlaneUpdated`, `onPlaneRemoved` to only receive plane-anchors (may be deprecated later).\n\nThe `Anchor` object has the following properties:\n\n| Property | Type | Description\n|---|---|---|\n| `id` | `String` | a unique id identifying the anchor |\n| `type` | `String` | The type of the anchor (plane, image) |\n| `position` | `{ x, y, z }` | the position of the anchor (relative to the origin) |\n| `positionAbsolute` | `{ x, y, z }` | the absolute position of the anchor |\n| `eulerAngles` | `{ x, y, z }` | the rotation of the plane |\n\nIf its a `plane`-anchor, it will have these additional properties:\n\n| Property | Description\n|---|---|\n| `alignment` | `ARKit.ARPlaneAnchorAlignment.Horizontal` or `ARKit.ARPlaneAnchorAlignment.Vertical` <br /> so you can check whether it was a horizontal or vertical plane |\n| `extent` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n| `center` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n\n`image`-Anchor:\n\n| Property | type | Description\n|---|---|---|\n| `image` | `{name}` | an object with the name of the image.\n\n\n\n### Static methods\n\nStatic Methods can directly be used on the `ARKit`-export:\n\n```\nimport { ARKit } from 'react-native-arkit'\n\n//...\nconst result = await ARKit.hitTestSceneObjects(point);\n\n```\n\nAll methods return a *promise* with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n| `isInitialized` | boolean | check whether arkit has been initialized (e.g. by mounting). See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n| `isMounted` | boolean | check whether arkit has been mounted. See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n\n### 3D-Components\n\n#### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts shadows |\n| `constraint` | `ARKit.Constraint.{ BillboardAxisAll \\| BillboardAxisX \\| BillboardAxisY \\| BillboardAxisZ \\| None }` | Constrains the node to always point to the camera |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | `{ ...mapProperties }` (see below) | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | `{ ...mapProperties }` (see below) | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | `{ ...mapProperties }` (see below) | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | `{ ...mapProperties }` (see below) |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\nMap Properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `path` | string | Currently `require` is not supported, so this is an absolute link to a local resource placed for example in .xcassets |\n| `color` | string | Color string, only used if path is not provided |\n| `wrapS` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` | [wrapS](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395384-wraps?language=objc) |\n| `wrapT` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  [wrapT](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395382-wrapt?language=objc) |\n| `wrap` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  Shorthand for setting both wrapS & wrapT |\n| `translation` | `{ x, y, z }` | Translate the UVs, equivalent to applying a translation matrix to SceneKit's `transformContents`  |\n| `rotation` | `{ angle, x, y, z }` | Rotate the UVs, equivalent to applying a rotation matrix to SceneKit's `transformContents` |\n| `scale` | `{ x, y, z }` | Scale the UVs, equivalent to applying a scale matrix to SceneKit's `transformContents`  |\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n## FAQ:\n\n#### Which permissions does this use?\n\n- **camera access** (see section iOS Project configuration above). The user is asked for permission, as soon as you mount an `<ARKit />` component or use any of its API. If user denies access, you will get an error in `onARKitError`\n- **location service**: only needed if you use `ARKit.ARWorldAlignment.GravityAndHeading`.\n\n#### Is there an Android / ARCore version?\n\nNot yet, but there has been a proof-of-concept: https://github.com/HippoAR/react-native-arkit/issues/14. We are looking for contributors to help backporting this proof-of-conept to react-native-arkit.\n\n#### I have another question...\n\n[**Join Slack!**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"2700004f052d1bd6ae2dfa04788dded9713dbb68","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-beta.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-R4L3UArmk+Vud08OEQTiDqaMW8yvdOvV1KChu9rxXF7DSH7OmvqdoD7G3H3ILbXh75M0v6GgP9K5yl0tAYnjgw==","shasum":"3a96efbf63828e3550082f71137627590bbe1fd5","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-beta.4.tgz","fileCount":105,"unpackedSize":882697,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDu0zoMiICOCUTltx6oznGmBsRiGdajnly1XRrTuKEISAiBmtKZUV3JeSrnfBhZxHQpOw66FbK2qtRmlBDOYh3qTWw=="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-beta.4_1519825958004_0.5203276177520233"},"_hasShrinkwrap":false},"0.9.0-beta.5":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-beta.5","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.6.0"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.2.0","prop-types":"^15.6.0"},"readme":"# react-native-arkit \n\n⚠️  **This is the readme from the current development. If you want to see the readme from the latest release, see https://github.com/HippoAR/react-native-arkit/releases**\n\n\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          // enable plane detection (defaults to Horizontal)\n          planeDetection={ARKit.ARPlaneDetection.Horizontal}\n\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n\n          // event listener for (horizontal) plane detection\n          onPlaneDetected={anchor => console.log(anchor)}\n\n          // event listener for plane update\n          onPlaneUpdated={anchor => console.log(anchor)}\n\n          // arkit sometimes removes detected planes\n          onPlaneRemoved={anchor => console.log(anchor)}\n\n          // event listeners for all anchors, see [Planes and Anchors](#planes-and-anchors)\n          onAnchorDetected={anchor => console.log(anchor)}\n          onAnchorUpdated={anchor => console.log(anchor)}\n          onAnchorRemoved={anchor => console.log(anchor)}\n\n          // you can detect images and will get an anchor for these images\n          detectionImages={[{ resourceGroupName: 'DetectionImages' }]}\n\n\n          onARKitError={console.log} // if arkit could not be initialized (e.g. missing permissions), you will get notified here\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n\n\n### `<ARKit />`-Component\n\n#### Props\n\n| Prop | Type | Note |\n|---|---|---|\n| `debug` | `Boolean` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `ARKit.ARPlaneDetection.{ Horizontal \\| Vertical \\| HorizontalVertical \\| None }` | ARKit plane detection. Defaults to `Horizontal`. `Vertical` is available with IOS 11.3\n| `lightEstimationEnabled` | `Boolean` | ARKit light estimation (defaults to false).\n| `worldAlignment` | `ARKit.ARWorldAlignment.{ Gravity \\| GravityAndHeading \\| Camera }` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera. Defaults to `ARKit.ARWorldAlignment.Gravity`.  [See](https://developer.apple.com/documentation/arkit/arworldalignment)|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n| `detectionImages` | `Array<DetectionImage>` | An Array of `DetectionImage` (see below), only available on IOS 11.3 |  \n\n##### `DetectionImage`\n\nAn `DetectionImage` is an image or image resource group that should be detected by ARKit.\n\nSee https://developer.apple.com/documentation/arkit/arreferenceimage?language=objc how to add these images.\n\nYou will then receive theses images in `onAnchorDetected/onAnchorUpdated`. See also [Planes and Anchors](#planes-and-anchors) for more details.\n\n`DetectionImage` has these properties\n\n| Prop | Type | Notes\n|---|---|---|\n| `resourceGroupName` | `String` | The name of the resource group |\n\nWe probably will add the option to load images from other sources as well (PRs encouraged).\n\n#### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onAnchorDetected` | `Anchor` | When an anchor (plane or image) is first detected.\n| `onAnchorUpdated` | `Anchor` | When an anchor is updated\n| `onAnchorRemoved` | `Anchor` | When an anchor is removed\n| `onPlaneDetected` | `Anchor` | When a plane anchor is first detected.\n| `onPlaneUpdated` | `Anchor` | When a detected plane is updated\n| `onPlaneRemoved` | `Anchor` | When a detected plane is removed\n\nSee [Planes and Anchors](#planes-and-anchors) for Details about anchors\n\n\n\n#### Planes and Anchors\n\nARKit can detect different anchors in the real world:\n\n- `plane` horizontal and vertical planes\n- `image`, image-anchors [See DetectionImage](#DetectionImage)\n- face with iphone X or similar (not implemented yet)\n\nYou then will receive anchor objects in the `onAnchorDetected`, `onAnchorUpdated`, `onAnchorRemoved` callbacks on your `<ARKit />`-component.\n\nYou can use `onPlaneDetected`, `onPlaneUpdated`, `onPlaneRemoved` to only receive plane-anchors (may be deprecated later).\n\nThe `Anchor` object has the following properties:\n\n| Property | Type | Description\n|---|---|---|\n| `id` | `String` | a unique id identifying the anchor |\n| `type` | `String` | The type of the anchor (plane, image) |\n| `position` | `{ x, y, z }` | the position of the anchor (relative to the origin) |\n| `positionAbsolute` | `{ x, y, z }` | the absolute position of the anchor |\n| `eulerAngles` | `{ x, y, z }` | the rotation of the plane |\n\nIf its a `plane`-anchor, it will have these additional properties:\n\n| Property | Description\n|---|---|\n| `alignment` | `ARKit.ARPlaneAnchorAlignment.Horizontal` or `ARKit.ARPlaneAnchorAlignment.Vertical` <br /> so you can check whether it was a horizontal or vertical plane |\n| `extent` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n| `center` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n\n`image`-Anchor:\n\n| Property | type | Description\n|---|---|---|\n| `image` | `{name}` | an object with the name of the image.\n\n\n\n### Static methods\n\nStatic Methods can directly be used on the `ARKit`-export:\n\n```\nimport { ARKit } from 'react-native-arkit'\n\n//...\nconst result = await ARKit.hitTestSceneObjects(point);\n\n```\n\nAll methods return a *promise* with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n| `isInitialized` | boolean | check whether arkit has been initialized (e.g. by mounting). See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n| `isMounted` | boolean | check whether arkit has been mounted. See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n\n### 3D-Components\n\nThis project allows you to work with 3d elements like with usual react-components.\nWe provide some primitive shapes like cubes, spheres, etc. as well as\na component to load model-files.\n\nYou can also nest components to create new Components. Child-elements will\nbe relative to the parent:\n\n```\nconst BigExclamationMark = ({ position, eulerAngles, color = '#ff0000' }) => (\n  <ARKit.Group opacity={0.5} position={position} eulerAngles={eulerAngles}>\n    <ARKit.Sphere\n      position={{ x: 0, y: 0, z: 0 }}\n      shape={{ radius: 0.06 }}\n      material={{ diffuse: color }}\n    />\n    <ARKit.Cone\n      position={{ x: 0, y: 0.4, z: 0 }}\n      shape={{ topR: 0.1, bottomR: 0.05, height: 0.5 }}\n      material={{ diffuse: color }}\n    />\n  </ARKit.Group>\n)\n\n// somewhere else\n\n<BigExclamationMark\n  eulerAngles={{ x: 0.2 }}\n  position={{ x: 0.2, y: 0.3, z: -0.2 }}\n  color=\"#00ff00\"\n/>\n\n```\n\n\n#### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `id` | String | a unique identifier. Only provide one, if you need to find the node later in hit-testing. |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n\nAdvanced properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts shadows |\n| `constraint` | `ARKit.Constraint.{ BillboardAxisAll \\| BillboardAxisX \\| BillboardAxisY \\| BillboardAxisZ \\| None }` | Constrains the node to always point to the camera |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | `{ ...mapProperties }` (see below) | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | `{ ...mapProperties }` (see below) | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | `{ ...mapProperties }` (see below) | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | `{ ...mapProperties }` (see below) |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\nMap Properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `path` | string | Currently `require` is not supported, so this is an absolute link to a local resource placed for example in .xcassets |\n| `color` | string | Color string, only used if path is not provided |\n| `wrapS` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` | [wrapS](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395384-wraps?language=objc) |\n| `wrapT` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  [wrapT](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395382-wrapt?language=objc) |\n| `wrap` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  Shorthand for setting both wrapS & wrapT |\n| `translation` | `{ x, y, z }` | Translate the UVs, equivalent to applying a translation matrix to SceneKit's `transformContents`  |\n| `rotation` | `{ angle, x, y, z }` | Rotate the UVs, equivalent to applying a rotation matrix to SceneKit's `transformContents` |\n| `scale` | `{ x, y, z }` | Scale the UVs, equivalent to applying a scale matrix to SceneKit's `transformContents`  |\n\n\n#### `<ARKit.Group />`\n\nThis Object has no geometry, but is simply a wrapper for other components.\nIt receives all common properties like position, eulerAngles, scale, opacity, etc.\nbut no shape or material.\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n## FAQ:\n\n#### Which permissions does this use?\n\n- **camera access** (see section iOS Project configuration above). The user is asked for permission, as soon as you mount an `<ARKit />` component or use any of its API. If user denies access, you will get an error in `onARKitError`\n- **location service**: only needed if you use `ARKit.ARWorldAlignment.GravityAndHeading`.\n\n#### Is there an Android / ARCore version?\n\nNot yet, but there has been a proof-of-concept: https://github.com/HippoAR/react-native-arkit/issues/14. We are looking for contributors to help backporting this proof-of-conept to react-native-arkit.\n\n#### I have another question...\n\n[**Join Slack!**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"d40039ff7517acf1133fe96b98cf9dec99ab0501","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-beta.5","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-xEcxvUa2wpiopyh19Y35dPbcSNxST2vOXJ3E2p92Kdxx+qpDkwGzGkGwLfIQ3DGI03BDO4mGLknJw78sB4rGUA==","shasum":"f445841589cc5a5e981092ef79bd5c2c4baaec29","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-beta.5.tgz","fileCount":105,"unpackedSize":887304,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGL8QMd+IiV5vCnZnICgwa43gaPOGrDJcbooRCAMi5UYAiEA9Ht+rLw0KUMwJUy5vKDrDuUVnYK4TGNMzfUkFA620s4="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-beta.5_1519839828220_0.037655372171133905"},"_hasShrinkwrap":false},"0.9.0-beta.6":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-beta.6","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.6.0"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.2.0","prop-types":"^15.6.0"},"readme":"# react-native-arkit \n\n⚠️  **This is the readme from the current development. If you want to see the readme from the latest release, see https://github.com/HippoAR/react-native-arkit/releases**\n\n\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          // enable plane detection (defaults to Horizontal)\n          planeDetection={ARKit.ARPlaneDetection.Horizontal}\n\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n\n          // event listener for (horizontal) plane detection\n          onPlaneDetected={anchor => console.log(anchor)}\n\n          // event listener for plane update\n          onPlaneUpdated={anchor => console.log(anchor)}\n\n          // arkit sometimes removes detected planes\n          onPlaneRemoved={anchor => console.log(anchor)}\n\n          // event listeners for all anchors, see [Planes and Anchors](#planes-and-anchors)\n          onAnchorDetected={anchor => console.log(anchor)}\n          onAnchorUpdated={anchor => console.log(anchor)}\n          onAnchorRemoved={anchor => console.log(anchor)}\n\n          // you can detect images and will get an anchor for these images\n          detectionImages={[{ resourceGroupName: 'DetectionImages' }]}\n\n\n          onARKitError={console.log} // if arkit could not be initialized (e.g. missing permissions), you will get notified here\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n\n\n### `<ARKit />`-Component\n\n#### Props\n\n| Prop | Type | Note |\n|---|---|---|\n| `debug` | `Boolean` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `ARKit.ARPlaneDetection.{ Horizontal \\| Vertical \\| HorizontalVertical \\| None }` | ARKit plane detection. Defaults to `Horizontal`. `Vertical` is available with IOS 11.3\n| `lightEstimationEnabled` | `Boolean` | ARKit light estimation (defaults to false).\n| `worldAlignment` | `ARKit.ARWorldAlignment.{ Gravity \\| GravityAndHeading \\| Camera }` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera. Defaults to `ARKit.ARWorldAlignment.Gravity`.  [See](https://developer.apple.com/documentation/arkit/arworldalignment)|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n| `detectionImages` | `Array<DetectionImage>` | An Array of `DetectionImage` (see below), only available on IOS 11.3 |  \n\n##### `DetectionImage`\n\nAn `DetectionImage` is an image or image resource group that should be detected by ARKit.\n\nSee https://developer.apple.com/documentation/arkit/arreferenceimage?language=objc how to add these images.\n\nYou will then receive theses images in `onAnchorDetected/onAnchorUpdated`. See also [Planes and Anchors](#planes-and-anchors) for more details.\n\n`DetectionImage` has these properties\n\n| Prop | Type | Notes\n|---|---|---|\n| `resourceGroupName` | `String` | The name of the resource group |\n\nWe probably will add the option to load images from other sources as well (PRs encouraged).\n\n#### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onAnchorDetected` | `Anchor` | When an anchor (plane or image) is first detected.\n| `onAnchorUpdated` | `Anchor` | When an anchor is updated\n| `onAnchorRemoved` | `Anchor` | When an anchor is removed\n| `onPlaneDetected` | `Anchor` | When a plane anchor is first detected.\n| `onPlaneUpdated` | `Anchor` | When a detected plane is updated\n| `onPlaneRemoved` | `Anchor` | When a detected plane is removed\n\nSee [Planes and Anchors](#planes-and-anchors) for Details about anchors\n\n\n\n#### Planes and Anchors\n\nARKit can detect different anchors in the real world:\n\n- `plane` horizontal and vertical planes\n- `image`, image-anchors [See DetectionImage](#DetectionImage)\n- face with iphone X or similar (not implemented yet)\n\nYou then will receive anchor objects in the `onAnchorDetected`, `onAnchorUpdated`, `onAnchorRemoved` callbacks on your `<ARKit />`-component.\n\nYou can use `onPlaneDetected`, `onPlaneUpdated`, `onPlaneRemoved` to only receive plane-anchors (may be deprecated later).\n\nThe `Anchor` object has the following properties:\n\n| Property | Type | Description\n|---|---|---|\n| `id` | `String` | a unique id identifying the anchor |\n| `type` | `String` | The type of the anchor (plane, image) |\n| `position` | `{ x, y, z }` | the position of the anchor (relative to the origin) |\n| `positionAbsolute` | `{ x, y, z }` | the absolute position of the anchor |\n| `eulerAngles` | `{ x, y, z }` | the rotation of the plane |\n\nIf its a `plane`-anchor, it will have these additional properties:\n\n| Property | Description\n|---|---|\n| `alignment` | `ARKit.ARPlaneAnchorAlignment.Horizontal` or `ARKit.ARPlaneAnchorAlignment.Vertical` <br /> so you can check whether it was a horizontal or vertical plane |\n| `extent` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n| `center` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n\n`image`-Anchor:\n\n| Property | type | Description\n|---|---|---|\n| `image` | `{name}` | an object with the name of the image.\n\n\n\n### Static methods\n\nStatic Methods can directly be used on the `ARKit`-export:\n\n```\nimport { ARKit } from 'react-native-arkit'\n\n//...\nconst result = await ARKit.hitTestSceneObjects(point);\n\n```\n\nAll methods return a *promise* with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n| `isInitialized` | boolean | check whether arkit has been initialized (e.g. by mounting). See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n| `isMounted` | boolean | check whether arkit has been mounted. See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n\n### 3D-Components\n\nThis project allows you to work with 3d elements like with usual react-components.\nWe provide some primitive shapes like cubes, spheres, etc. as well as\na component to load model-files.\n\nYou can also nest components to create new Components. Child-elements will\nbe relative to the parent:\n\n```\nconst BigExclamationMark = ({ position, eulerAngles, color = '#ff0000' }) => (\n  <ARKit.Group opacity={0.5} position={position} eulerAngles={eulerAngles}>\n    <ARKit.Sphere\n      position={{ x: 0, y: 0, z: 0 }}\n      shape={{ radius: 0.06 }}\n      material={{ diffuse: color }}\n    />\n    <ARKit.Cone\n      position={{ x: 0, y: 0.4, z: 0 }}\n      shape={{ topR: 0.1, bottomR: 0.05, height: 0.5 }}\n      material={{ diffuse: color }}\n    />\n  </ARKit.Group>\n)\n\n// somewhere else\n\n<BigExclamationMark\n  eulerAngles={{ x: 0.2 }}\n  position={{ x: 0.2, y: 0.3, z: -0.2 }}\n  color=\"#00ff00\"\n/>\n\n```\n\n\n#### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `id` | String | a unique identifier. Only provide one, if you need to find the node later in hit-testing. |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n\nAdvanced properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts shadows |\n| `constraint` | `ARKit.Constraint.{ BillboardAxisAll \\| BillboardAxisX \\| BillboardAxisY \\| BillboardAxisZ \\| None }` | Constrains the node to always point to the camera |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | `{ ...mapProperties }` (see below) | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | `{ ...mapProperties }` (see below) | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | `{ ...mapProperties }` (see below) | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | `{ ...mapProperties }` (see below) |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\nMap Properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `path` | string | Currently `require` is not supported, so this is an absolute link to a local resource placed for example in .xcassets |\n| `color` | string | Color string, only used if path is not provided |\n| `wrapS` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` | [wrapS](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395384-wraps?language=objc) |\n| `wrapT` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  [wrapT](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395382-wrapt?language=objc) |\n| `wrap` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  Shorthand for setting both wrapS & wrapT |\n| `translation` | `{ x, y, z }` | Translate the UVs, equivalent to applying a translation matrix to SceneKit's `transformContents`  |\n| `rotation` | `{ angle, x, y, z }` | Rotate the UVs, equivalent to applying a rotation matrix to SceneKit's `transformContents` |\n| `scale` | `{ x, y, z }` | Scale the UVs, equivalent to applying a scale matrix to SceneKit's `transformContents`  |\n\n\n#### `<ARKit.Group />`\n\nThis Object has no geometry, but is simply a wrapper for other components.\nIt receives all common properties like position, eulerAngles, scale, opacity, etc.\nbut no shape or material.\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n## FAQ:\n\n#### Which permissions does this use?\n\n- **camera access** (see section iOS Project configuration above). The user is asked for permission, as soon as you mount an `<ARKit />` component or use any of its API. If user denies access, you will get an error in `onARKitError`\n- **location service**: only needed if you use `ARKit.ARWorldAlignment.GravityAndHeading`.\n\n#### Is there an Android / ARCore version?\n\nNot yet, but there has been a proof-of-concept: https://github.com/HippoAR/react-native-arkit/issues/14. We are looking for contributors to help backporting this proof-of-conept to react-native-arkit.\n\n#### I have another question...\n\n[**Join Slack!**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"fa942c8b4effc89391b1ffc7a7b8dde73c79b200","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-beta.6","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-5FtLLSlhSxUyzta56gKb9Vuglh6XvDkx2U6pQCebXYj/mb67NYyr6saSmwbBUji6pSSU7WsYmL1RXHRJ16kuRg==","shasum":"268df5bef79bf8c116cd4890387d9a80bbf49765","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-beta.6.tgz","fileCount":109,"unpackedSize":893073,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKieW+lib0V9vUD+nAbQcaJJiTRoNcMPuvZ58cU/7UXAIhALde3RFbbbG0Qzu85i/Ne7wXFwpQpyFrYOu0I8+v8K/O"}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-beta.6_1520203167922_0.8810008055475047"},"_hasShrinkwrap":false},"0.9.0-beta.7":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-beta.7","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.6.0"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.2.0","prop-types":"^15.6.0"},"gitHead":"bbafa62fbef5c1264f4180007700dc71294f6c5c","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-beta.7","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-261oeAjIbgajkypWkLbZYeZs3wDokbFyYx0pQ44uwz2VTwwKOsgjB1ZqAUVEYi3ZIHwefYvz7bqXEse7nxuIxA==","shasum":"458a8bbe242b3dddfa4c63de3d4dd2a7614adc6d","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-beta.7.tgz","fileCount":109,"unpackedSize":893068,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFiIEh6hwqhv8TPRkrCT/DiHLii4yyiThe2lVMkyCsXCAiEAonBcOsUFp2tGaFxPohVmUC4wVMQwwXymR2FzYY15AO0="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-beta.7_1520204434988_0.2663229771724862"},"_hasShrinkwrap":false},"0.9.0-rc0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-rc0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.6.0"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.2.0","prop-types":"^15.6.0"},"readme":"# react-native-arkit \n\n⚠️  **This is the readme from the current development. If you want to see the readme from the latest release, see https://github.com/HippoAR/react-native-arkit/releases**\n\n\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          // enable plane detection (defaults to Horizontal)\n          planeDetection={ARKit.ARPlaneDetection.Horizontal}\n\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n\n          // event listener for (horizontal) plane detection\n          onPlaneDetected={anchor => console.log(anchor)}\n\n          // event listener for plane update\n          onPlaneUpdated={anchor => console.log(anchor)}\n\n          // arkit sometimes removes detected planes\n          onPlaneRemoved={anchor => console.log(anchor)}\n\n          // event listeners for all anchors, see [Planes and Anchors](#planes-and-anchors)\n          onAnchorDetected={anchor => console.log(anchor)}\n          onAnchorUpdated={anchor => console.log(anchor)}\n          onAnchorRemoved={anchor => console.log(anchor)}\n\n          // you can detect images and will get an anchor for these images\n          detectionImages={[{ resourceGroupName: 'DetectionImages' }]}\n\n\n          onARKitError={console.log} // if arkit could not be initialized (e.g. missing permissions), you will get notified here\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n\n\n### `<ARKit />`-Component\n\n#### Props\n\n| Prop | Type | Note |\n|---|---|---|\n| `debug` | `Boolean` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `ARKit.ARPlaneDetection.{ Horizontal \\| Vertical \\| HorizontalVertical \\| None }` | ARKit plane detection. Defaults to `Horizontal`. `Vertical` is available with IOS 11.3\n| `lightEstimationEnabled` | `Boolean` | ARKit light estimation (defaults to false).\n| `worldAlignment` | `ARKit.ARWorldAlignment.{ Gravity \\| GravityAndHeading \\| Camera }` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera. Defaults to `ARKit.ARWorldAlignment.Gravity`.  [See](https://developer.apple.com/documentation/arkit/arworldalignment)|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n| `detectionImages` | `Array<DetectionImage>` | An Array of `DetectionImage` (see below), only available on IOS 11.3 |  \n\n##### `DetectionImage`\n\nAn `DetectionImage` is an image or image resource group that should be detected by ARKit.\n\nSee https://developer.apple.com/documentation/arkit/arreferenceimage?language=objc how to add these images.\n\nYou will then receive theses images in `onAnchorDetected/onAnchorUpdated`. See also [Planes and Anchors](#planes-and-anchors) for more details.\n\n`DetectionImage` has these properties\n\n| Prop | Type | Notes\n|---|---|---|\n| `resourceGroupName` | `String` | The name of the resource group |\n\nWe probably will add the option to load images from other sources as well (PRs encouraged).\n\n#### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onAnchorDetected` | `Anchor` | When an anchor (plane or image) is first detected.\n| `onAnchorUpdated` | `Anchor` | When an anchor is updated\n| `onAnchorRemoved` | `Anchor` | When an anchor is removed\n| `onPlaneDetected` | `Anchor` | When a plane anchor is first detected.\n| `onPlaneUpdated` | `Anchor` | When a detected plane is updated\n| `onPlaneRemoved` | `Anchor` | When a detected plane is removed\n\nSee [Planes and Anchors](#planes-and-anchors) for Details about anchors\n\n\n\n#### Planes and Anchors\n\nARKit can detect different anchors in the real world:\n\n- `plane` horizontal and vertical planes\n- `image`, image-anchors [See DetectionImage](#DetectionImage)\n- face with iphone X or similar (not implemented yet)\n\nYou then will receive anchor objects in the `onAnchorDetected`, `onAnchorUpdated`, `onAnchorRemoved` callbacks on your `<ARKit />`-component.\n\nYou can use `onPlaneDetected`, `onPlaneUpdated`, `onPlaneRemoved` to only receive plane-anchors (may be deprecated later).\n\nThe `Anchor` object has the following properties:\n\n| Property | Type | Description\n|---|---|---|\n| `id` | `String` | a unique id identifying the anchor |\n| `type` | `String` | The type of the anchor (plane, image) |\n| `position` | `{ x, y, z }` | the position of the anchor (relative to the origin) |\n| `positionAbsolute` | `{ x, y, z }` | the absolute position of the anchor |\n| `eulerAngles` | `{ x, y, z }` | the rotation of the plane |\n\nIf its a `plane`-anchor, it will have these additional properties:\n\n| Property | Description\n|---|---|\n| `alignment` | `ARKit.ARPlaneAnchorAlignment.Horizontal` or `ARKit.ARPlaneAnchorAlignment.Vertical` <br /> so you can check whether it was a horizontal or vertical plane |\n| `extent` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n| `center` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n\n`image`-Anchor:\n\n| Property | type | Description\n|---|---|---|\n| `image` | `{name}` | an object with the name of the image.\n\n\n\n### Static methods\n\nStatic Methods can directly be used on the `ARKit`-export:\n\n```\nimport { ARKit } from 'react-native-arkit'\n\n//...\nconst result = await ARKit.hitTestSceneObjects(point);\n\n```\n\nAll methods return a *promise* with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n| `isInitialized` | boolean | check whether arkit has been initialized (e.g. by mounting). See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n| `isMounted` | boolean | check whether arkit has been mounted. See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n\n### 3D-Components\n\nThis project allows you to work with 3d elements like with usual react-components.\nWe provide some primitive shapes like cubes, spheres, etc. as well as\na component to load model-files.\n\nYou can also nest components to create new Components. Child-elements will\nbe relative to the parent:\n\n```\nconst BigExclamationMark = ({ position, eulerAngles, color = '#ff0000' }) => (\n  <ARKit.Group opacity={0.5} position={position} eulerAngles={eulerAngles}>\n    <ARKit.Sphere\n      position={{ x: 0, y: 0, z: 0 }}\n      shape={{ radius: 0.06 }}\n      material={{ diffuse: color }}\n    />\n    <ARKit.Cone\n      position={{ x: 0, y: 0.4, z: 0 }}\n      shape={{ topR: 0.1, bottomR: 0.05, height: 0.5 }}\n      material={{ diffuse: color }}\n    />\n  </ARKit.Group>\n)\n\n// somewhere else\n\n<BigExclamationMark\n  eulerAngles={{ x: 0.2 }}\n  position={{ x: 0.2, y: 0.3, z: -0.2 }}\n  color=\"#00ff00\"\n/>\n\n```\n\n\n#### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `id` | String | a unique identifier. Only provide one, if you need to find the node later in hit-testing. |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n\nAdvanced properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts shadows |\n| `constraint` | `ARKit.Constraint.{ BillboardAxisAll \\| BillboardAxisX \\| BillboardAxisY \\| BillboardAxisZ \\| None }` | Constrains the node to always point to the camera |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | `{ ...mapProperties }` (see below) | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | `{ ...mapProperties }` (see below) | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | `{ ...mapProperties }` (see below) | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | `{ ...mapProperties }` (see below) |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\nMap Properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `path` | string | Currently `require` is not supported, so this is an absolute link to a local resource placed for example in .xcassets |\n| `color` | string | Color string, only used if path is not provided |\n| `wrapS` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` | [wrapS](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395384-wraps?language=objc) |\n| `wrapT` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  [wrapT](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395382-wrapt?language=objc) |\n| `wrap` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  Shorthand for setting both wrapS & wrapT |\n| `translation` | `{ x, y, z }` | Translate the UVs, equivalent to applying a translation matrix to SceneKit's `transformContents`  |\n| `rotation` | `{ angle, x, y, z }` | Rotate the UVs, equivalent to applying a rotation matrix to SceneKit's `transformContents` |\n| `scale` | `{ x, y, z }` | Scale the UVs, equivalent to applying a scale matrix to SceneKit's `transformContents`  |\n\n\n#### `<ARKit.Group />`\n\nThis Object has no geometry, but is simply a wrapper for other components.\nIt receives all common properties like position, eulerAngles, scale, opacity, etc.\nbut no shape or material.\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n## FAQ:\n\n#### Which permissions does this use?\n\n- **camera access** (see section iOS Project configuration above). The user is asked for permission, as soon as you mount an `<ARKit />` component or use any of its API. If user denies access, you will get an error in `onARKitError`\n- **location service**: only needed if you use `ARKit.ARWorldAlignment.GravityAndHeading`.\n\n#### Is there an Android / ARCore version?\n\nNot yet, but there has been a proof-of-concept: https://github.com/HippoAR/react-native-arkit/issues/14. We are looking for contributors to help backporting this proof-of-conept to react-native-arkit.\n\n#### I have another question...\n\n[**Join Slack!**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"40b2e8fe41a0ef1f77f908d7cf3ea7f552546dc4","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-rc0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-5oqGkMKC+0YJNwUPKnlMh9H101Mn8VknnoudbG3rkvQ0Uo+sIbOhqpNsVOZcUNf5MjxUeHMzjWo/hBX+D4QSQg==","shasum":"0fad3973f92d71d4a0924d3a41dc03e1d3d4f239","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-rc0.tgz","fileCount":109,"unpackedSize":892942,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB2THZydsCVs5FXsexAXAvBq3Qx/EjSYUuxOYX+So0oBAiEAi9wHsB6KGYNa/AHgnoMzEsaF6rr8QLbef86c1Ggn/Sg="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-rc0_1520604616848_0.39123966962656787"},"_hasShrinkwrap":false},"0.9.0-rc1":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0-rc1","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.6.0"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.2.0","prop-types":"^15.6.0"},"readme":"# react-native-arkit \n\n⚠️  **This is the readme from the current development. If you want to see the readme from the latest release, see https://github.com/HippoAR/react-native-arkit/releases**\n\n\n\n[![npm version](https://img.shields.io/npm/v/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-arkit.svg?style=flat)](https://www.npmjs.com/package/react-native-arkit)\n\nReact Native binding for iOS ARKit.\n\n**Tutorial**: [How to make an ARKit app in 5 minutes using React Native](https://medium.com/@HippoAR/how-to-make-your-own-arkit-app-in-5-minutes-using-react-native-9d7ce109a4c2)\n\n**Sample Project**: https://github.com/HippoAR/ReactNativeARKit\n\n**Note**: ARKit is only supported by devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11. You also need Xcode 9 to build the project.\n\nThere is a Slack group that anyone can join for help / support / general questions.\n\n[**Join Slack**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n## Getting started\n\n`$ yarn add react-native-arkit`\n\nmake sure to use the latest version of yarn (>=1.x.x)\n\n(npm does not work properly at the moment. See https://github.com/HippoAR/react-native-arkit/issues/103)\n\n\n### Mostly automatic installation\n\n`$ react-native link react-native-arkit`\n\n! Currently automatic installation does not work as PocketSVG is missing. Follow the manual installation\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ add `react-native-arkit/ios/RCTARKit.xcodeproj` and `react-native-arkit/ios/PocketSVG/PocketSVG.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRCTARKit.a` `and PocketSVG.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. In Tab `General` ➜ `Embedded Binaries` ➜ `+` ➜ Add `PocketSVG.framework ios`\n5. Run your project (`Cmd+R`)<\n\n\n##### iOS Project configuration\n\nThese steps are mandatory regardless of doing a manual or automatic installation:\n\n1. Give permissions for camera usage. In `Info.plist` add the following:\n\n```\n<key>NSCameraUsageDescription</key>\n<string>Your message to user when the camera is accessed for the first time</string>\n```\n2. ARKit only runs on arm64-ready devices so the default build architecture should be set to arm64: go to `Build settings` ➜ `Build Active Architecture Only` and change the value to `Yes`.\n\n\n\n\n## Usage\n\nA simple sample React Native ARKit App\n\n```javascript\n// index.ios.js\n\nimport React, { Component } from 'react';\nimport { AppRegistry, View } from 'react-native';\nimport { ARKit } from 'react-native-arkit';\n\nexport default class ReactNativeARKit extends Component {\n  render() {\n    return (\n      <View style={{ flex: 1 }}>\n        <ARKit\n          style={{ flex: 1 }}\n          debug\n          // enable plane detection (defaults to Horizontal)\n          planeDetection={ARKit.ARPlaneDetection.Horizontal}\n\n          // enable light estimation (defaults to true)\n          lightEstimationEnabled\n          // get the current lightEstimation (if enabled)\n          // it fires rapidly, so better poll it from outside with\n          // ARKit.getCurrentLightEstimation()\n          onLightEstimation={e => console.log(e.nativeEvent)}\n\n          // event listener for (horizontal) plane detection\n          onPlaneDetected={anchor => console.log(anchor)}\n\n          // event listener for plane update\n          onPlaneUpdated={anchor => console.log(anchor)}\n\n          // arkit sometimes removes detected planes\n          onPlaneRemoved={anchor => console.log(anchor)}\n\n          // event listeners for all anchors, see [Planes and Anchors](#planes-and-anchors)\n          onAnchorDetected={anchor => console.log(anchor)}\n          onAnchorUpdated={anchor => console.log(anchor)}\n          onAnchorRemoved={anchor => console.log(anchor)}\n\n          // you can detect images and will get an anchor for these images\n          detectionImages={[{ resourceGroupName: 'DetectionImages' }]}\n\n\n          onARKitError={console.log} // if arkit could not be initialized (e.g. missing permissions), you will get notified here\n        >\n          <ARKit.Box\n            position={{ x: 0, y: 0, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1, chamfer: 0.01 }}\n          />\n          <ARKit.Sphere\n            position={{ x: 0.2, y: 0, z: 0 }}\n            shape={{ radius: 0.05 }}\n          />\n          <ARKit.Cylinder\n            position={{ x: 0.4, y: 0, z: 0 }}\n            shape={{ radius: 0.05, height: 0.1 }}\n          />\n          <ARKit.Cone\n            position={{ x: 0, y: 0.2, z: 0 }}\n            shape={{ topR: 0, bottomR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Pyramid\n            position={{ x: 0.2, y: 0.15, z: 0 }}\n            shape={{ width: 0.1, height: 0.1, length: 0.1 }}\n          />\n          <ARKit.Tube\n            position={{ x: 0.4, y: 0.2, z: 0 }}\n            shape={{ innerR: 0.03, outerR: 0.05, height: 0.1 }}\n          />\n          <ARKit.Torus\n            position={{ x: 0, y: 0.4, z: 0 }}\n            shape={{ ringR: 0.06, pipeR: 0.02 }}\n          />\n          <ARKit.Capsule\n            position={{ x: 0.2, y: 0.4, z: 0 }}\n            shape={{ capR: 0.02, height: 0.06 }}\n          />\n          <ARKit.Plane\n            position={{ x: 0.4, y: 0.4, z: 0 }}\n            shape={{ width: 0.1, height: 0.1 }}\n          />\n          <ARKit.Text\n            text=\"ARKit is Cool!\"\n            position={{ x: 0.2, y: 0.6, z: 0 }}\n            font={{ size: 0.15, depth: 0.05 }}\n          />\n          <ARKit.Light\n            position={{ x: 1, y: 3, z: 2 }}\n            type={ARKit.LightType.Omni}\n            color=\"white\"\n          />\n          <ARKit.Light\n            position={{ x: 0, y: 1, z: 0 }}\n            type={ARKit.LightType.Spot}\n            eulerAngles={{ x: -Math.PI / 2 }}\n            spotInnerAngle={45}\n            spotOuterAngle={45}\n            color=\"green\"\n          />\n          <ARKit.Model\n            position={{ x: -0.2, y: 0, z: 0, frame: 'local' }}\n            scale={0.01}\n            model={{\n              scale: 1, // this is deprecated, use the scale property that is available on all 3d objects\n              file: 'art.scnassets/ship.scn', // make sure you have the model file in the ios project\n            }}\n          />\n          <ARKit.Shape\n            position={{ x: -1, y: 0, z: 0 }}\n            eulerAngles={{\n              x: Math.PI,\n            }}\n            scale={0.01}\n            shape={{\n              // specify shape by svg! See https://github.com/HippoAR/react-native-arkit/pull/89 for details\n              pathSvg: `\n              <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n                <path d=\"M50,30c9-22 42-24 48,0c5,40-40,40-48,65c-8-25-54-25-48-65c 6-24 39-22 48,0 z\" fill=\"#F00\" stroke=\"#000\"/>\n              </svg>`,\n              pathFlatness: 0.1,\n              // it's also possible to specify a chamfer profile:\n              chamferRadius: 5,\n              chamferProfilePathSvg: `\n                <path d=\"M.6 94.4c.7-7 0-13 6-18.5 1.6-1.4 5.3 1 6-.8l9.6 2.3C25 70.8 20.2 63 21 56c0-1.3 2.3-1 3.5-.7 7.6 1.4 7 15.6 14.7 13.2 1-.2 1.7-1 2-2 2-5-11.3-28.8-3-30.3 2.3-.4 5.7 1.8 6.7 0l8.4 6.5c.3-.4-8-17.3-2.4-21.6 7-5.4 14 5.3 17.7 7.8 1 .8 3 2 3.8 1 6.3-10-6-8.5-3.2-19 2-8.2 18.2-2.3 20.3-3 2.4-.6 1.7-5.6 4.2-6.4\"/>\n              `,\n              extrusion: 10,\n            }}\n          />  \n        </ARKit>\n      </View>\n    );\n  }\n}\n\nAppRegistry.registerComponent('ReactNativeARKit', () => ReactNativeARKit);\n\n```\n\n<img src=\"screenshots/geometries.jpg\" width=\"250\">\n\n\n\n### `<ARKit />`-Component\n\n#### Props\n\n| Prop | Type | Note |\n|---|---|---|\n| `debug` | `Boolean` | Debug mode will show the 3D axis and feature points detected.\n| `planeDetection` | `ARKit.ARPlaneDetection.{ Horizontal \\| Vertical \\| HorizontalVertical \\| None }` | ARKit plane detection. Defaults to `Horizontal`. `Vertical` is available with IOS 11.3\n| `lightEstimationEnabled` | `Boolean` | ARKit light estimation (defaults to false).\n| `worldAlignment` | `ARKit.ARWorldAlignment.{ Gravity \\| GravityAndHeading \\| Camera }` | **ARWorldAlignmentGravity** <br /> The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device. **ARWorldAlignmentGravityAndHeading** <br /> The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device. **ARWorldAlignmentCamera** <br /> The scene coordinate system is locked to match the orientation of the camera. Defaults to `ARKit.ARWorldAlignment.Gravity`.  [See](https://developer.apple.com/documentation/arkit/arworldalignment)|\n| `origin` | `{position, transition}` | Usually `{0,0,0}` is where you launched the app. If you want to have a different origin, you can set it here. E.g. if you set `origin={{position: {0,-1, 0}, transition: {duration: 1}}}` the new origin will be one meter below. If you have any objects already placed, they will get moved down using the given transition. All hit-test functions or similar will report coordinates relative to that new origin as `position`. You can get the original coordinates with `positionAbsolute` in these functions |  \n| `detectionImages` | `Array<DetectionImage>` | An Array of `DetectionImage` (see below), only available on IOS 11.3 |  \n\n##### `DetectionImage`\n\nAn `DetectionImage` is an image or image resource group that should be detected by ARKit.\n\nSee https://developer.apple.com/documentation/arkit/arreferenceimage?language=objc how to add these images.\n\nYou will then receive theses images in `onAnchorDetected/onAnchorUpdated`. See also [Planes and Anchors](#planes-and-anchors) for more details.\n\n`DetectionImage` has these properties\n\n| Prop | Type | Notes\n|---|---|---|\n| `resourceGroupName` | `String` | The name of the resource group |\n\nWe probably will add the option to load images from other sources as well (PRs encouraged).\n\n#### Events\n\n| Event Name | Returns | Notes\n|---|---|---|\n| `onARKitError` | `ARKiterror` | will report whether an error occured while initializing ARKit. A common error is when the user has not allowed camera access. Another error is, if you use `worldAlignment=GravityAndHeading` and location service is turned off |\n| `onLightEstimation` | `{ ambientColorTemperature, ambientIntensity }` | Light estimation on every frame. Called rapidly, better use polling. See `ARKit.getCurrentLightEstimation()`\n| `onFeaturesDetected` | `{ featurePoints}` | Detected Features on every frame (currently also not throttled). Usefull to display custom dots for detected features. You can also poll this information with `ARKit.getCurrentDetectedFeaturePoints()`\n| `onAnchorDetected` | `Anchor` | When an anchor (plane or image) is first detected.\n| `onAnchorUpdated` | `Anchor` | When an anchor is updated\n| `onAnchorRemoved` | `Anchor` | When an anchor is removed\n| `onPlaneDetected` | `Anchor` | When a plane anchor is first detected.\n| `onPlaneUpdated` | `Anchor` | When a detected plane is updated\n| `onPlaneRemoved` | `Anchor` | When a detected plane is removed\n\nSee [Planes and Anchors](#planes-and-anchors) for Details about anchors\n\n\n\n#### Planes and Anchors\n\nARKit can detect different anchors in the real world:\n\n- `plane` horizontal and vertical planes\n- `image`, image-anchors [See DetectionImage](#DetectionImage)\n- face with iphone X or similar (not implemented yet)\n\nYou then will receive anchor objects in the `onAnchorDetected`, `onAnchorUpdated`, `onAnchorRemoved` callbacks on your `<ARKit />`-component.\n\nYou can use `onPlaneDetected`, `onPlaneUpdated`, `onPlaneRemoved` to only receive plane-anchors (may be deprecated later).\n\nThe `Anchor` object has the following properties:\n\n| Property | Type | Description\n|---|---|---|\n| `id` | `String` | a unique id identifying the anchor |\n| `type` | `String` | The type of the anchor (plane, image) |\n| `position` | `{ x, y, z }` | the position of the anchor (relative to the origin) |\n| `positionAbsolute` | `{ x, y, z }` | the absolute position of the anchor |\n| `eulerAngles` | `{ x, y, z }` | the rotation of the plane |\n\nIf its a `plane`-anchor, it will have these additional properties:\n\n| Property | Description\n|---|---|\n| `alignment` | `ARKit.ARPlaneAnchorAlignment.Horizontal` or `ARKit.ARPlaneAnchorAlignment.Vertical` <br /> so you can check whether it was a horizontal or vertical plane |\n| `extent` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n| `center` | see https://developer.apple.com/documentation/arkit/arplaneanchor?language=objc |\n\n`image`-Anchor:\n\n| Property | type | Description\n|---|---|---|\n| `image` | `{name}` | an object with the name of the image.\n\n\n\n### Static methods\n\nStatic Methods can directly be used on the `ARKit`-export:\n\n```\nimport { ARKit } from 'react-native-arkit'\n\n//...\nconst result = await ARKit.hitTestSceneObjects(point);\n\n```\n\nAll methods return a *promise* with the result.\n\n| Method Name | Arguments |  Notes\n|---|---|---|\n| `snapshot` |  |  | Take a screenshot (will save to Photo Library) |\n| `snapshotCamera` |  | Take a screenshot without 3d models (will save to Photo Library) |\n| `getCameraPosition` |  | Get the current position of the `ARCamera` |\n| `getCamera` |  | Get all properties of the `ARCamera` |\n| `getCurrentLightEstimation` |  | Get current light estimation  `{ ambientColorTemperature, ambientIntensity}` |\n| `getCurrentDetectedFeaturePoints` |  | Get current detected feature points (in last current frame)  (array) |\n| `focusScene` |  | Sets the scene's position/rotation to where it was when first rendered (but now relative to your device's current position/rotation) |\n| `hitTestPlanes` | point, type  |  check if a plane has ben hit by point (`{x,y}`) with detection type (any of `ARKit.ARHitTestResultType`). See https://developer.apple.com/documentation/arkit/arhittestresulttype?language=objc for further information |\n| `hitTestSceneObjects` | point |  check if a scene object has ben hit by point (`{x,y}`) |\n| `isInitialized` | boolean | check whether arkit has been initialized (e.g. by mounting). See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n| `isMounted` | boolean | check whether arkit has been mounted. See https://github.com/HippoAR/react-native-arkit/pull/152 for details |\n\n### 3D-Components\n\nThis project allows you to work with 3d elements like with usual react-components.\nWe provide some primitive shapes like cubes, spheres, etc. as well as\na component to load model-files.\n\nYou can also nest components to create new Components. Child-elements will\nbe relative to the parent:\n\n```\nconst BigExclamationMark = ({ position, eulerAngles, color = '#ff0000' }) => (\n  <ARKit.Group opacity={0.5} position={position} eulerAngles={eulerAngles}>\n    <ARKit.Sphere\n      position={{ x: 0, y: 0, z: 0 }}\n      shape={{ radius: 0.06 }}\n      material={{ diffuse: color }}\n    />\n    <ARKit.Cone\n      position={{ x: 0, y: 0.4, z: 0 }}\n      shape={{ topR: 0.1, bottomR: 0.05, height: 0.5 }}\n      material={{ diffuse: color }}\n    />\n  </ARKit.Group>\n)\n\n// somewhere else\n\n<BigExclamationMark\n  eulerAngles={{ x: 0.2 }}\n  position={{ x: 0.2, y: 0.3, z: -0.2 }}\n  color=\"#00ff00\"\n/>\n\n```\n\n\n#### General props\n\nMost 3d object have these common properties\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` | The object's position (y is up) |\n| `scale` | Number | The scale of the object. Defaults to 1 |\n| `eulerAngles` | `{ x, y, z }` | The rotation in eulerAngles |\n| `id` | String | a unique identifier. Only provide one, if you need to find the node later in hit-testing. |\n| `shape` | depends on object | the shape of the object (will probably renamed to geometry in future versions)\n| `material` | `{ diffuse, metalness, roughness, lightingModel, shaders }` | the material of the object |\n| `transition` | `{duration: 1}` | Some property changes can be animated like in css transitions. Currently you can specify the duration (in seconds). |\n\nAdvanced properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `rotation` | TODO | see scenkit documentation |\n| `orientation` | TODO | see scenkit documentation |\n| `renderingOrder` | Number | Order in which object is rendered. Usefull to place elements \"behind\" others, although they are nearer. |\n| `categoryBitMask` | Number / bitmask | control which lights affect this object |\n| `castsShadow` | `boolean` | whether this object casts shadows |\n| `constraint` | `ARKit.Constraint.{ BillboardAxisAll \\| BillboardAxisX \\| BillboardAxisY \\| BillboardAxisZ \\| None }` | Constrains the node to always point to the camera |\n\n*New experimental feature:*\n\nYou can switch properties on mount or onmount by specifying `propsOnMount` and `propsOnUnmount`.\nE.g. you can scale an object on unmount:\n\n```\n<ARKit.Sphere\n  position={{x:0,y:0,z:0}}\n  scale={1}\n  transition={{duration: 1}}\n  propsOnUnmount={{\n    scale: 0\n  }}\n/>\n```\n\n#### Material\n\nMost objects take a material property with these sub-props:\n\n| Prop | Type | Description |\n|---|---|---|\n| `diffuse` | `{ ...mapProperties }` (see below) | [diffuse](https://developer.apple.com/documentation/scenekit/scnmaterial/1462589-diffuse?language=objc)\n| `specular` | `{ ...mapProperties }` (see below) | [specular](https://developer.apple.com/documentation/scenekit/scnmaterial/1462516-specular?language=objc)\n| `displacement` | `{ ...mapProperties }` (see below) | [displacement](https://developer.apple.com/documentation/scenekit/scnmaterial/2867516-displacement?language=objc)\n| `normal` | `{ ...mapProperties }` (see below) |  [normal](https://developer.apple.com/documentation/scenekit/scnmaterial/1462542-normal)\n| `metalness` | number | metalness of the object |\n| `roughness` | number | roughness of the object |\n| `doubleSided` | boolean | render both sides, default is `true` |\n| `litPerPixel` | boolean | calculate lighting per-pixel or vertex [litPerPixel](https://developer.apple.com/documentation/scenekit/scnmaterial/1462580-litperpixel) |\n| `lightingModel` | `ARKit.LightingModel.*` | [LightingModel](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel) |\n| `blendMode` | `ARKit.BlendMode.*` | [BlendMode](https://developer.apple.com/documentation/scenekit/scnmaterial/1462585-blendmode) |\n| `fillMode` | `ARKit.FillMode.*` | [FillMode](https://developer.apple.com/documentation/scenekit/scnmaterial/2867442-fillmode)\n| `shaders` | Object with keys from `ARKit.ShaderModifierEntryPoint.*` and shader strings as values | [Shader modifiers](https://developer.apple.com/documentation/scenekit/scnshadable) |\n| `colorBufferWriteMask` | `ARKit.ColorMask.*` | [color mask](https://developer.apple.com/documentation/scenekit/scncolormask). Set to ARKit.ColorMask.None so that an object is transparent, but receives deferred shadows. |\n\nMap Properties:\n\n| Prop | Type | Description |\n|---|---|---|\n| `path` | string | Currently `require` is not supported, so this is an absolute link to a local resource placed for example in .xcassets |\n| `color` | string | Color string, only used if path is not provided |\n| `wrapS` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` | [wrapS](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395384-wraps?language=objc) |\n| `wrapT` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  [wrapT](https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395382-wrapt?language=objc) |\n| `wrap` | `ARKit.WrapMode.{ Clamp \\| Repeat \\| Mirror }` |  Shorthand for setting both wrapS & wrapT |\n| `translation` | `{ x, y, z }` | Translate the UVs, equivalent to applying a translation matrix to SceneKit's `transformContents`  |\n| `rotation` | `{ angle, x, y, z }` | Rotate the UVs, equivalent to applying a rotation matrix to SceneKit's `transformContents` |\n| `scale` | `{ x, y, z }` | Scale the UVs, equivalent to applying a scale matrix to SceneKit's `transformContents`  |\n\n\n#### `<ARKit.Group />`\n\nThis Object has no geometry, but is simply a wrapper for other components.\nIt receives all common properties like position, eulerAngles, scale, opacity, etc.\nbut no shape or material.\n\n\n\n#### [`<ARKit.Box />`](https://developer.apple.com/documentation/scenekit/scnbox)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length, chamfer }` |\n\nAnd any common object property (position, material, etc.)\n\n#### [`<ARKit.Sphere />`](https://developer.apple.com/documentation/scenekit/scnsphere)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius }` |\n\n\n\n#### [`<ARKit.Cylinder />`](https://developer.apple.com/documentation/scenekit/scncylinder)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ radius, height }` |\n\n#### [`<ARKit.Cone />`](https://developer.apple.com/documentation/scenekit/scncone)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ topR, bottomR, height }` |\n\n#### [`<ARKit.Pyramid />`](https://developer.apple.com/documentation/scenekit/scnpyramid)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height, length }` |\n\n#### [`<ARKit.Tube />`](https://developer.apple.com/documentation/scenekit/scntube)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ innerR, outerR, height }` |\n\n#### [`<ARKit.Torus />`](https://developer.apple.com/documentation/scenekit/scntorus)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ ringR, pipeR }` |\n\n#### [`<ARKit.Capsule />`](https://developer.apple.com/documentation/scenekit/scncapsule)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ capR, height }` |\n\n#### [`<ARKit.Plane />`](https://developer.apple.com/documentation/scenekit/scnplane)\n\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ width, height }` |\n\nNotice: planes are veritcally aligned. If you want a horizontal plane, rotate it around the x-axis.\n\n*Example*:\n\nThis is a horizontal plane that only receives shadows, but is invisible otherwise:\n\n```\n<ARKit.Plane\n    eulerAngles={{ x: Math.PI / 2 }}\n    position={floorPlane.position}\n    renderingOrder={9999}\n    material={{\n      color: '#ffffff',\n      lightingModel: ARKit.LightingModel.Constant,\n      colorBufferWriteMask: ARKit.ColorMask.None,\n    }}\n    shape={{\n      width: 100,\n      height: 100,\n    }}\n  />\n```\n\n\n#### [`<ARKit.Text />`](https://developer.apple.com/documentation/scenekit/scntext)\n\n| Prop | Type |\n|---|---|\n| `text` | `String` |\n| `font` | `{ name, size, depth, chamfer }` |\n\n\n\n#### `<ARKit.Model />`\n\nSceneKit only supports `.scn` and `.dae` formats.\n\n\n| Prop | Type |\n|---|---|\n| `model` | `{ file, node, scale, alpha }` |\n\nObjects currently don't take material property.\n\n#### `<ARKit.Shape />`\n\nCreates a extruded shape by an svg path.\nSee https://github.com/HippoAR/react-native-arkit/pull/89 for details\n\n| Prop | Type |\n|---|---|\n| `shape` | `{ pathSvg, extrusion, pathFlatness, chamferRadius, chamferProfilePathSvg, chamferProfilePathFlatness }` |\n\n\n\n#### [`<ARKit.Light />`](https://developer.apple.com/documentation/scenekit/scnlight)\n\nPlace lights on the scene!\n\nYou might set `autoenablesDefaultLighting={false}` on The `<ARKit />` component to disable default lighting. You can use `lightEstimationEnabled` and `ARKit.getCurrentLightEstimation()` to find values for intensity and temperature. This produces much nicer results then `autoenablesDefaultLighting`.\n\n\n\n| Prop | Type | Description |\n|---|---|---|\n| `position` | `{ x, y, z }` |  |\n| `eulerAngles` | `{ x, y, z }` |  |\n| `type` | any of `ARKit.LightType` | see [here for details](https://developer.apple.com/documentation/scenekit/scnlight.lighttype) |\n| `color` | `string` | the color of the light |\n| `temperature` | `Number` | The color temperature of the light |\n| `intensity` | `Number` | The light intensity |\n| `lightCategoryBitMask` | `Number`/`bitmask` | control which objects are lit by this light |\n| `castsShadow` | `boolean` | whether to cast shadows on object |\n| `shadowMode`| `ARKit.ShadowMode.* | Define the shadowmode. Set to `ARKit.ShadowMode.Deferred` to cast shadows on invisible objects (like an invisible floor plane) |\n\n\n\nMost properties described here are also supported: https://developer.apple.com/documentation/scenekit/scnlight\n\nThis feature is new. If you experience any problem, please report an issue!\n\n\n### HOCs (higher order components)\n\n#### withProjectedPosition()\n\nthis hoc allows you to create 3D components where the position is always relative to the same point on the screen/camera, but sticks to a plane or object.\n\nThink about a 3D cursor that can be moved across your table or a 3D cursor on a wall.\n\nYou can use the hoc like this:\n\n```\nconst Cursor3D = withProjectedPosition()(({positionProjected, projectionResult}) => {\n  if(!projectionResult) {\n    // nothing has been hit, don't render it\n    return null;\n  }\n  return (\n    <ARKit.Sphere\n      position={positionProjected}\n      transition={{duration: 0.1}}\n      shape={{\n        radius: 0.1\n        }}\n    />\n  )\n})\n\n```\n\nIt's recommended that you specify a transition duration (0.1s works nice), as the position gets updated rapidly, but slightly throttled.\n\nNow you can use your 3D cursor like this:\n\n##### Attach to a given detected horizontal plane\n\nGiven you have detected a plane with onPlaneDetected, you can make the cursor stick to that plane:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: \"my-planeId\"\n  }}\n/>\n\n```\n\nIf you don't have the id, but want to place the cursor on a certain plane (e.g. the first or last one), pass a function for plane. This function will get all hit-results and you can return the one you need:\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  plane: (results) => results.length > 0 ? results[0] : null\n  }}\n/>\n\n```\n\nYou can also add a property `onProjectedPosition` to your cursor which will be called with the hit result on every frame\n\nIt uses https://developer.apple.com/documentation/arkit/arframe/2875718-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n##### Attach to a given 3D object\n\nYou can attach the cursor on a 3D object, e.g. a non-horizontal-plane or similar:\n\nGiven there is some 3D object on your scene with `id=\"my-nodeId\"`\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: \"my-nodeId\"\n  }}\n/>\n```\n\nLike with planes, you can select the node with a function.\n\nE.gl you have several \"walls\" with ids \"wall_1\", \"wall_2\", etc.\n\n```\n<Cursor3D projectPosition={{\n  x: windowWidth / 2,\n  y: windowHeight / 2,\n  node: results => results.find(r => r.id.startsWith('wall_')),\n  }}\n/>\n```\n\n\nIt uses https://developer.apple.com/documentation/scenekit/scnscenerenderer/1522929-hittest with some default options. Please file an issue or send a PR if you need more control over the options here!\n\n\n## FAQ:\n\n#### Which permissions does this use?\n\n- **camera access** (see section iOS Project configuration above). The user is asked for permission, as soon as you mount an `<ARKit />` component or use any of its API. If user denies access, you will get an error in `onARKitError`\n- **location service**: only needed if you use `ARKit.ARWorldAlignment.GravityAndHeading`.\n\n#### Is there an Android / ARCore version?\n\nNot yet, but there has been a proof-of-concept: https://github.com/HippoAR/react-native-arkit/issues/14. We are looking for contributors to help backporting this proof-of-conept to react-native-arkit.\n\n#### I have another question...\n\n[**Join Slack!**](https://join.slack.com/t/react-native-ar/shared_invite/enQtMjUzMzg3MjM0MTQ5LWU3Nzg2YjI4MGRjMTM1ZDBlNmIwYTE4YmM0M2U0NmY2YjBiYzQ4YzlkODExMTA0NDkwMzFhYWY4ZDE2M2Q4NGY)\n\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/HippoAR/react-native-arkit/issues/new). Your contributions are always welcome! Submit a pull request and see [`CONTRIBUTING.md`](CONTRIBUTING.md) for guidelines.\n","readmeFilename":"README.md","gitHead":"13e3d96ffd26fa6d9478672ab0242df35a31ea81","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0-rc1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-/BYZmrxwqJ/qQUpZyGISGPVt2sFKByYqq+BOGfm3eZoyNG2qsbndlQ29f0m0+OiXZmHqWXy1AbFWRJbbnGlmXA==","shasum":"828d7eb84e2ab2204fbc945dc7c3fa7cb9d48abb","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0-rc1.tgz","fileCount":112,"unpackedSize":894379,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0dSokhSQJ3lXO8PeM6Q6Ia3B3PNDLjlwHdQMqe4ZuMAiEA3HevpgVDgd5xlQRHx90BWvMxgjjBcfEfCLegDs1cJuU="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0-rc1_1520690819370_0.7304085586813172"},"_hasShrinkwrap":false},"0.9.0":{"name":"react-native-arkit","repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"version":"0.9.0","description":"React Native binding for iOS ARKit","author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"license":"MIT","homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"react-native":">=0.46.0","react":"*","prop-types":"*"},"dependencies":{"@panter/react-animation-frame":"^0.3.7","fast-deep-equal":"^1.0.0","lodash":"^4.17.4","prop-types":"^15.6.0"},"devDependencies":{"babel-eslint":"^7.2.3","babel-preset-react-native":"^2.1.0","eslint":"^4.2.0","eslint-config-airbnb":"^15.0.1","eslint-config-prettier":"^2.1.1","eslint-plugin-flowtype":"^2.33.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-prettier":"^2.1.1","eslint-plugin-react":"^7.0.1","prettier":"^1.3.1","react":"16.2.0","prop-types":"^15.6.0"},"gitHead":"89b3b7a893e2a8ca8965c1bae19caef6dbf07e06","bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"_id":"react-native-arkit@0.9.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"macrozone","email":"macrozone@gmail.com"},"dist":{"integrity":"sha512-1jsSmyd5UeFZ135FKE2uzb0sdexUNKZ45qyq4NpN/vftzQ7CsIYKFh2zxCDSN1I2V0nUu1UmhQSbWJVEc+HLpw==","shasum":"e4e757c6fbeed9f8053a3706dbd703b76350ce92","tarball":"https://registry.npmjs.org/react-native-arkit/-/react-native-arkit-0.9.0.tgz","fileCount":112,"unpackedSize":894375,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICnX4p4TeT8sJsmU4is4RyT3NUYcZTfDTvisumgKA0+0AiBgcEnxdOXzQC8ZVB2sOUNjiNr/hkG3YU8RSeSZyqFP7A=="}]},"maintainers":[{"email":"jacychen1990@gmail.com","name":"jacy"},{"email":"macrozone@gmail.com","name":"macrozone"},{"email":"qft.gtr@gmail.com","name":"zehaoli"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-arkit_0.9.0_1520692586182_0.9487579256101937"},"_hasShrinkwrap":false}},"homepage":"https://github.com/HippoAR/react-native-arkit","keywords":["react-native","react","native","ARKit","AR"],"repository":{"type":"git","url":"git+https://github.com/HippoAR/react-native-arkit.git"},"author":{"name":"Zehao Li","email":"qft.gtr@gmail.com"},"bugs":{"url":"https://github.com/HippoAR/react-native-arkit/issues"},"license":"MIT","readmeFilename":"README.md","users":{"hippo":true}}