Freeze Frames

At the current state of technology, it is extremely impractical to faithfully scan and store real-world environments. Therefore, capturing and restoring of an Augmented Reality experience is practically impossible. ViewAR SDK offers a compromise in the form of Freeze Frames.

AR Camera supports freezing and unfreezing of the Camera View. While frozen, Camera feed and Pose do not get updated, so that the image may easily be saved. Freeze Frames may be switched between while preserving the spatial relations between scene objects as expected. They can also be uploaded to the cloud storage and shared between users of the app.

A Freeze Frame is an Object consisting of:

  • Camera Image
  • Tracking information
freezeFrame = {
    name: "freezeFrame-1",
    thumbnailUrl: "",
    imageUrl: "",

Freeze & unfreeze the View

const camera = cameras.arCamera;
await camera.freeze(); // Freeze the AR Camera
await camera.unfreeze(); // Unfreeze the AR Camera

Save a Freeze Frame

The following method freezes the arCamera feed, then saves and returns a saved Freeze Frame, to finally unfreeze the Camera.

const camera = cameras.arCamera;
await camera.saveFreezeFrame();

List of saved Freeze Frames

All saved Freeze Frames are saved in a freezeFrames Array and may be accessed with:

const camera = cameras.arCamera;
await camera.freezeFrames;

Load a Freeze Frame

A saved Freeze Frame may be loaded to the Scene in a form of a freezeFrame Object. In such a case the Scene Nodes (Containers and Model Instances) may still be moved and interacted with, however, the Camera Pose cannot be altered.

const camera = cameras.arCamera; 
await camera.downloadFreezeFrame("freezeFrame-1");

ViewAR API References - Complete list of the ViewAR API References ViewAR JavaScript API Playground - ViewAR API interactive tutorial