AR Components


ARView

The base AR scene container. Renders a live camera feed with an AR overlay. All other AR components can be composed inside an ARView.

PropTypeDefaultDescription
renderAR?RenderARFnRenderer from createViroARView()
showInstructionsbooleantrueShow a surface-detection instruction banner
instructionTextstring'Move your phone to detect surfaces'Custom instruction text
showReticlebooleanfalseShow a reticle at the centre of the view
onReady?() => voidCalled when AR initialisation completes
accessibilityLabel?string'AR View'Accessibility label
testID?stringTest identifier
import { ARView } from '@objectifthunes/limestone-sdk';
import { createViroARView } from '@objectifthunes/limestone-sdk/viro';

<ARView
  renderAR={createViroARView()}
  showInstructions
  showReticle
  onReady={() => console.log('AR ready')}
/>

ARTryOn

Overlays a virtual product on the user’s face, head, wrist, or hand for virtual try-on experiences.

PropTypeDefaultDescription
renderTryOn?RenderTryOnFnRenderer from createViroARTryOn()
modelUristringURI of the GLTF/GLB model to overlay
target'face' | 'head' | 'wrist' | 'hand''face'Body target for the overlay
showGuidebooleantrueShow a positioning guide overlay
guideTextstringCustom guide instruction text
onTracking?(isTracking: boolean) => voidCalled when tracking state changes
accessibilityLabel?string'AR Try-On'Accessibility label
testID?stringTest identifier
import { ARTryOn } from '@objectifthunes/limestone-sdk';
import { createViroARTryOn } from '@objectifthunes/limestone-sdk/viro';

<ARTryOn
  renderTryOn={createViroARTryOn()}
  modelUri="https://example.com/sunglasses.glb"
  target="face"
  showGuide
/>

ARPlacement

Lets the user detect a flat surface and place a 3D model on it with a tap.

PropTypeDefaultDescription
renderPlacement?RenderPlacementFnRenderer from createViroARPlacement()
modelUristringURI of the model to place
showSurfaceIndicatorbooleantrueShow a surface-detection grid
confirmPlacementbooleanfalseRequire a confirmation tap before finalising
onPlaced?(position: ARPosition) => voidCalled with world coordinates when the model is placed
accessibilityLabel?string'AR Placement'Accessibility label
testID?stringTest identifier
import { ARPlacement } from '@objectifthunes/limestone-sdk';
import { createViroARPlacement } from '@objectifthunes/limestone-sdk/viro';

<ARPlacement
  renderPlacement={createViroARPlacement()}
  modelUri="https://example.com/sofa.glb"
  showSurfaceIndicator
  confirmPlacement
  onPlaced={(pos) => console.log('Placed at', pos)}
/>

ARMeasure

Point-and-tap measurement tool that calculates real-world distances between two points.

PropTypeDefaultDescription
renderMeasure?RenderMeasureFnRenderer from createViroARMeasure()
unit'cm' | 'm' | 'in' | 'ft''cm'Unit for displayed measurements
onMeasurement?(value: number, unit: string) => voidCalled each time a measurement is computed
accessibilityLabel?string'AR Measure'Accessibility label
testID?stringTest identifier
import { ARMeasure } from '@objectifthunes/limestone-sdk';
import { createViroARMeasure } from '@objectifthunes/limestone-sdk/viro';

<ARMeasure
  renderMeasure={createViroARMeasure()}
  unit="cm"
  onMeasurement={(value, unit) => console.log(`${value} ${unit}`)}
/>

ARAnnotation

Attaches floating text labels to real-world surfaces or objects detected in the scene.

PropTypeDefaultDescription
renderAnnotation?RenderAnnotationFnRenderer from createViroARAnnotation()
annotationsARAnnotationItem[][]Each item: { id, position, label, description? }
onAnnotationPress?(annotation: ARAnnotationItem) => voidCalled when the user taps an annotation
showLabelsbooleantrueToggle label visibility
accessibilityLabel?string'AR Annotations'Accessibility label
testID?stringTest identifier
import { ARAnnotation } from '@objectifthunes/limestone-sdk';
import { createViroARAnnotation } from '@objectifthunes/limestone-sdk/viro';

<ARAnnotation
  renderAnnotation={createViroARAnnotation()}
  annotations={[
    { id: 'pipe', position: [0.5, 1.2, -1.0], label: 'Water pipe', description: 'Main supply line' },
  ]}
  showLabels
  onAnnotationPress={(a) => console.log('Tapped', a.label)}
/>

ARWorldObject

Anchors one or more 3D objects to GPS coordinates in the real world, visible through the camera.

PropTypeDefaultDescription
renderWorld?RenderWorldFnRenderer from createViroARWorldObject()
objectsARWorldItem[][]Each item: { id, coordinate, modelUri, label? }
maxDistancenumber500Maximum distance in metres to render objects
showDistanceLabelsbooleanfalseShow metres-away labels below each object
accessibilityLabel?string'AR World Objects'Accessibility label
testID?stringTest identifier
import { ARWorldObject } from '@objectifthunes/limestone-sdk';
import { createViroARWorldObject } from '@objectifthunes/limestone-sdk/viro';

<ARWorldObject
  renderWorld={createViroARWorldObject()}
  objects={[
    { id: 'shop', coordinate: { latitude: 48.8566, longitude: 2.3522 }, modelUri: 'https://example.com/pin.glb', label: 'Coffee shop' },
  ]}
  maxDistance={200}
  showDistanceLabels
/>

ARNavigation

Turn-by-turn AR navigation overlay with floating waypoints and directional arrows.

PropTypeDefaultDescription
renderNavigation?RenderNavigationFnRenderer from createViroARNavigation()
waypointsARWaypoint[][]Each waypoint: { id, coordinate, label? }
distanceRemainingnumber0Distance remaining in metres
etaSecondsnumber0Estimated seconds to destination
arrivedbooleanfalseShow an arrival overlay when true
accessibilityLabel?string'AR Navigation'Accessibility label
testID?stringTest identifier
import { ARNavigation } from '@objectifthunes/limestone-sdk';
import { createViroARNavigation } from '@objectifthunes/limestone-sdk/viro';

<ARNavigation
  renderNavigation={createViroARNavigation()}
  waypoints={[
    { id: 'turn1', coordinate: { latitude: 48.8570, longitude: 2.3530 }, label: 'Turn left' },
    { id: 'dest', coordinate: { latitude: 48.8580, longitude: 2.3550 }, label: 'Destination' },
  ]}
  distanceRemaining={320}
  etaSeconds={240}
/>

ARBodyMeasure

Guides the user through a body-scanning flow and extracts clothing/fit measurements.

PropTypeDefaultDescription
renderBodyMeasure?RenderBodyMeasureFnRenderer from createViroARBodyMeasure()
currentStep'front' | 'side' | 'arms-out''front'Active scanning step
measurementsBodyMeasurements{}Partial measurements computed so far
showGuidebooleantrueShow a silhouette guide overlay
onStepComplete?(step: string, partial: BodyMeasurements) => voidCalled when a scanning step finishes
onComplete?(measurements: BodyMeasurements) => voidCalled when all steps are finished
accessibilityLabel?string'AR Body Measure'Accessibility label
testID?stringTest identifier
import { ARBodyMeasure } from '@objectifthunes/limestone-sdk';
import { createViroARBodyMeasure } from '@objectifthunes/limestone-sdk/viro';

<ARBodyMeasure
  renderBodyMeasure={createViroARBodyMeasure()}
  currentStep="front"
  showGuide
  onComplete={(m) => console.log('Measurements:', m)}
/>

Using the dev adapter

All eight AR components work without @reactvision/react-viro installed. Switch the import to ./dev for Expo Go, simulators, and CI:

import {
  createViroARView,
  createViroARTryOn,
  createViroARPlacement,
  createViroARMeasure,
  createViroARAnnotation,
  createViroARWorldObject,
  createViroARNavigation,
  createViroARBodyMeasure,
} from '@objectifthunes/limestone-sdk/dev';

The factory names are identical. No other code changes required.