Skip to content

Latest commit

 

History

History
82 lines (50 loc) · 2.93 KB

DOCUMENTATION.md

File metadata and controls

82 lines (50 loc) · 2.93 KB

React ARKit Documentation


ARScene

Parent object that represents object represents a three-dimensional scene and its contents. All the ARNodes must be wrapped around by an ARScene.

Props

Prop Type Default Description
debugEnabled Boolean false Debug modes show useful information such as the feature points.
run Boolean true Whether the session is running. Session can be paused by setting this property to false.

Instance methods

Method Name Arguments Notes
onPlaneDetected Object
{ alignment<string>, center:{x,y,z}, extent: {x,y,z},node:{x,y,z}, target <number> }
Returns the details when a new plane is detected
onPlaneUpdated Object
{ alignment<string>, center:{x,y,z}, extent: {x,y,z},node:{x,y,z}, target <number> }
Returns the details when a detected plane is updated

ARNode

A structural element of in the 3D coordinate space, representing a position and transform in based on the parent node\scene. Can also represent custom 3d models as well as basic geometric shapes.

Props

Prop Type Default Description
geoposition Object Required Position of the object in 3D space.
e.g {x: 0.1, y: 0.1, z: -0.1}
color String #FF0000 Color of the object in HEX.
modelAssetPath String None Path to the custom asset. See details.

ARBoxNode

A structural element with box geometry. Very similar to ARNode but with custom size/geometry.

Props

Prop Type Default Description
size Object Required Geometry of the box node.
{}
geoposition Object Required Position of the object in 3D space.
e.g {x: 0.1, y: 0.1, z: -0.1}
color String #FF0000 Color of the object in HEX.

ARSpherenode

A structural element with sphere geometry. Very similar to ARNode but with custom size/geometry.

Props

Prop Type Default Description
size Object Required Geometry of the box node.
{radius: 0.2}
geoposition Object Required Position of the object in 3D space.
e.g {x: 0.1, y: 0.1, z: -0.1}
color String #FF0000 Color of the object in HEX.

ARTextNode

A structural element with Box geometry. Very similar to ARNode but with custom size/geometry.

Props

Prop Type Default Description
size Object Required Geometry of text.
{fontSize: 0.2, depth: 0.2}
text String Required Text to be displayed
geoposition Object Required Position of the object in 3D space.
e.g {x: 0.1, y: 0.1, z: -0.1}
color String #FF0000 Color of the object in HEX.