Slide 1

Slide 1 text

Creating an
 Augmented Reality App 
 Using React and ViewAR

Slide 2

Slide 2 text

Disclaimer I’m part of the team

Slide 3

Slide 3 text

Augmented reality (AR) is an interactive experience of a real-world environment where the objects that reside in the real-world are "augmented" by computer-generated perceptual information, sometimes across multiple sensory modalities, including visual, auditory, haptic, somatosensory, and olfactory. Augment Reality (AR)

Slide 4

Slide 4 text

Augmented reality (AR) is an interactive experience of a real-world environment where the objects that reside in the real-world are "augmented" by computer-generated perceptual information, sometimes across multiple sensory modalities, including visual, auditory, haptic, somatosensory, and olfactory. Augment Reality (AR) Augmented reality is way to extend the real-world with virtual experiences.

Slide 5

Slide 5 text

Where do we start?

Slide 6

Slide 6 text

Announced in 2017/2018 Swift/ObjectivC Java/Kotlin ARKit/ARCore

Slide 7

Slide 7 text

• ReactNative ARKit • ReactNative ARCore • Expo • Viro • ViewAR What about JavaScript? • AR.js • 8thWall Mobile Apps Browser

Slide 8

Slide 8 text

Architecture

Slide 9

Slide 9 text

• Camera

Slide 10

Slide 10 text

• 3D Layer

Slide 11

Slide 11 text

• WebView

Slide 12

Slide 12 text

• Camera • 3D Layer • WebView

Slide 13

Slide 13 text

• Camera (viewar-api) • 3D Layer (viewar-api) • WebView (react)

Slide 14

Slide 14 text

• iOS • Android • Windows • Hololens • Web (Emscripten) ViewAR C++ Core

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Let’s get started

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

npm install -g viewar-cli mkdir my-app cd my-app viewar init

Slide 19

Slide 19 text

npm start npm start:mock vs

Slide 20

Slide 20 text

Camera

Slide 21

Slide 21 text

Tracking

Slide 22

Slide 22 text

Model

Slide 23

Slide 23 text

1.8 meters arCamera.getPoseInViewingDirection(1800, true/false); 1.8 meters false true

Slide 24

Slide 24 text

{ position: { x: 0, y: 0, z: 0 }, orientation: { w: 1, x: 0, y: 0, z: 0 }, scale: { x: 1, y: 1, z: 1 } }

Slide 25

Slide 25 text

Hello World UI

Slide 26

Slide 26 text

Material Selector

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

{ "Fabric": { "name": "Fabric", "values": [ { "key": "123", "imageUrl": "https://api.viewar.com/resources/DownloadImage/display:1/id:366 }, { "key": "152", "imageUrl": "https://api.viewar.com/resources/DownloadImage/display:1/id:366 }, ], "value": { "key": "123", "imageUrl": "https://api.viewar.com/resources/DownloadImage/display:1/id:36662 } }, "Wood": { … } }

Slide 29

Slide 29 text

Material Selector

Slide 30

Slide 30 text

Sync UI Updates

Slide 31

Slide 31 text

Improved UX

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

Intro Screen

Slide 34

Slide 34 text

Tracking Hint

Slide 35

Slide 35 text

Demo

Slide 36

Slide 36 text

Indoor Navigation const positions = [ { x: 12, y: 20, z: 0 }, { x: 88, y: 132, z: 0 }, { x: 30, y: 40, z: 0 } ]; guide.followPath(positions);

Slide 37

Slide 37 text

Object Recognition & Instructions async function onTrackingChanges(evt) { if (!evt.tracked) return false; api.sceneManager.scene.children[0]. animations.Lan.start({loop:true}) } viewarApi.tracker.on( "trackingTargetStatusChanged", onTrackingChanges ); await viewarApi.tracker.activate();

Slide 38

Slide 38 text

Synchronisation const callClient = await createCallClient(viewarApi); await callClient.connect(); await callClient.join({ sessionId: "1234", username: "[email protected]", password: "abc" }); callClient.clientsUpdate.subscribe (({ clients }) => { callClient.call({ id: clients[0].id }); });

Slide 39

Slide 39 text

The End @nikgraf