React Native · iOS · LiDAR

Scan a real object.
Get a true-scale 3D model.

A React Native wrapper for Apple's Object Capture. Guided capture, on-device reconstruction, and a USDZ whose dimensions match a tape measure.

yarn add react-native-object-capture

Measured, not guessed

Reconstruction bakes real-world scale into the model, and the library reports it. A tissue box, scanned on an iPhone 16 Pro Max:

Tape measure22 × 11 × 12.5 cm
Model, from onDimensions23.5 × 12.7 × 13.8 cm

The extra height is tissue poking out of the top.

How it works

  1. Detect. Frame the object and fit the bounding box.
  2. Capture. Walk around it in guided passes. Three at different heights is Apple's recommendation.
  3. Reconstruct. Photogrammetry runs on device. No upload, no account.
  4. Use it. A USDZ, plus its width, height and depth in metres.

Requirements

Expo works too, via the bundled config plugin. Check support at runtime with ObjectCaptureSession.isDeviceSupported().

Quick start

import {
  ObjectCaptureView,
  ObjectCaptureSession,
  PhotogrammetrySession,
} from 'react-native-object-capture';

// 1. Scan
<ObjectCaptureView imagesDirectory="Images/" checkpointDirectory="Snapshots/" style={{ flex: 1 }} />

await ObjectCaptureSession.startDetection();
await ObjectCaptureSession.startCapturing();

// 2. Reconstruct on device, and get the true size
PhotogrammetrySession.addDimensionsListener(({ width, height, depth }) =>
  console.log(`${width} × ${height} × ${depth} m`));

await ObjectCaptureSession.finishSession();
await PhotogrammetrySession.startReconstruction({
  imagesDirectory: 'Images/',
  checkpointDirectory: 'Snapshots/',
  outputPath: 'Outputs/model.usdz',
});

Full guide and API reference in the README →