Skip to main content

XR8.AFrame

A-Frame (https://aframe.io) is a web framework designed for building virtual reality experiences. By adding 8th Wall Web to your A-Frame project, you can now easily build augmented reality experiences for the web.

Components​

ComponentDescription
xrconfigUsed to configure the camera feed
xrwebUsed to configure world tracking
xrfaceUsed to configure face effects
xrlayersUsed to configure sky effects
xrlayersceneUsed to configure sky effects

Functions​

FunctionDescription
xrconfigComponentCreates an A-Frame component for configuring the camera which can be registered with AFRAME.registerComponent(). Generally won't need to be called directly.
xrwebComponentCreates an A-Frame component for World Tracking and/or Image Target tracking which can be registered with AFRAME.registerComponent(). Generally won't need to be called directly.
xrfaceComponentCreates an A-Frame component for Face Effects tracking which can be registered with AFRAME.registerComponent(). Generally won't need to be called directly.
xrlayersComponentCreates an A-Frame component for Layers tracking which can be registered with AFRAME.registerComponent(). Generally won't need to be called directly.
xrlayersceneComponentCreates an A-Frame component for a Layer scene which can be registered with AFRAME.registerComponent(). Generally won't need to be called directly.

Examples​

Example - SLAM enabled (default)​

<a-scene xrconfig xrweb>

Example - SLAM disabled (image tracking only)​

<a-scene xrconfig xrweb="disableWorldTracking: true">

Example - Front camera (image tracking only)​

<a-scene xrconfig="cameraDirection: front" xrweb="disableWorldTracking: true">

Example - Front camera Sky Effects​

<a-scene xrconfig="cameraDirection: front" xrlayers>

Example - Sky + SLAM​

<a-scene xrconfig xrweb xrlayers>
<a-entity xrlayerscene="name: sky; edgeSmoothness:0.6; invertLayerMask: true;">
<!-- Add your Sky Effects content here. -->
</a-entity>
</a-scene>

Example - Face Effects​

<a-scene xrconfig xrface>

Example - Face Effects with Ears​

<a-scene xrconfig xrface="enableEars:true">