Uses camera feed together with device sensors and various trackers to provide an AR experience for the user.
Extends
Members
active :boolean
- Inherited From:
Camera activity state.
Type:
- boolean
activeFreezeFrame :boolean
Does the camera have an active freeze frame.
Type:
- boolean
freezeFrames :Array.<ArCamera#FreezeFrame>
List of available freeze frames.
Type:
- Array.<ArCamera#FreezeFrame>
frozen :boolean
Is the camera frozen.
Type:
- boolean
name :string
- Inherited From:
Camera name.
Type:
- string
pointCloudVisible :boolean
Is the point cloud visualized.
Type:
- boolean
pose :ControllableCameraPose
Camera pose. Updates automatically.
Type:
Methods
(async) activate()
- Inherited From:
Activates the camera.
(async) disableHmdMode()
- Inherited From:
Switches to regular rendering mode for handheld devices.
(async) downloadFreezeFrame(name) → {ArCamera#FreezeFrame}
Downloads a previously saved freezeFrame from the server and creates a freezeFrame Object
Parameters:
Name | Type | Description |
---|---|---|
name |
freezeFrame's name |
Returns:
- Type
- ArCamera#FreezeFrame
(async) enableHmdMode()
- Inherited From:
Switches to stereoscopic rendering mode for use in HMDs.
(async) freeze()
Freezes arCamera feed and the scene.
(async) getColorsAtWorldPositions(positions, radiusnullable) → {Array.<ColorRgb>}
- Inherited From:
Get average camera colors at given world positions within a radius.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
positions |
Array.<Vector3d> | a list of 3d world space coordinates. |
||
radius |
number |
<nullable> |
10
|
radius in pixels to average colors around a position. |
Returns:
list of colors at the positions
- Type
- Array.<ColorRgb>
(async) getPoseInViewingDirection(distance, projectToFloornullable) → {Vector3d}
- Inherited From:
Calculates a point in the 3d space in front of the camera at a specified distance and returns its pose assigning the camera’s orientation.
The distance is measured horizontally starting from the camera position and is not related to the camera orientation (angle).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
distance |
number | distance from camera |
||
projectToFloor |
boolean |
<nullable> |
false
|
if true, projects the resulting point onto the xz plane |
Returns:
resulting position
- Type
- Vector3d
(async) hidePointCloud()
Hide visualization of the point cloud.
(async) removeFreezeFrame(freezeFrame)
Removes the given freeze frame. Unfreezes camera if the frozen frame was currently active.
Parameters:
Name | Type | Description |
---|---|---|
freezeFrame |
ArCamera#FreezeFrame |
(async) saveFreezeFrame() → {ArCamera#FreezeFrame}
Freezes the arCamera feed and saves the current feed frame and arCamera pose as a new freezeFrame
Returns:
- Type
- ArCamera#FreezeFrame
(async) showFreezeFrame(freezeFrame)
Freezes the arCamera feed and displays the given freezeFrame
Parameters:
Name | Type | Description |
---|---|---|
freezeFrame |
ArCamera#FreezeFrame |
(async) showPointCloud()
Show visualization of the point cloud.
(async) unfreeze()
Unfreezes arCamera feed and the scene.
Type Definitions
FreezeFrame
Properties:
Name | Type | Description |
---|---|---|
name |
string | |
thumbnailUrl |
string | |
imageUrl |
string |
Definition of a freeze frame. A freeze frame consists of the camera picture + tracking information. Scene nodes
can still be moved on a loaded freeze frame in difference to a screenshot.
Type:
- Object