The CameraInfoModule
class provides access to details about the device camera.
//==============================================================================
// The following example demonstrates how to hide an object when capturing a
// photo or recording a video.
//
// Project setup:
// - Insert a plane
//==============================================================================
// Load in the required modules
const CameraInfo = require('CameraInfo');
const Scene = require('Scene');
// Locate the plane in the Scene
const plane = Scene.root.find('plane0');
//==============================================================================
// Hide the plane when capturing a photo or recording a video
//==============================================================================
// Store references to the photo capture and video recording boolean signals
const isCapturingPhoto = CameraInfo.isCapturingPhoto;
const isRecordingVideo = CameraInfo.isRecordingVideo;
// Create a boolean signal that returns true if either boolean signal are true
const hidePlane = isCapturingPhoto.or(isRecordingVideo);
// Bind the hidePlane signal to the hidden property of the plane
plane.hidden = hidePlane;
Property | Description |
---|---|
captureDevicePosition
|
Specifies a |
effectSafeAreaInsets
|
Specifies an |
isCapturingPhoto
|
Specifies a |
isRecordingVideo
|
Specifies a |
previewScreenScale
|
Specifies a |
previewSize
|
Specifies a |
This module exposes no methods.
This module exposes no classes.
Enum | Description |
---|---|
CameraPosition |
The CameraPosition enum describes the direction the camera is facing. |