Sky Effects
If you want Sky Effects:
- Add the
xrlayerscomponent to youra-scene - Add the
xrlayerscenecomponent to ana-entityand add content you want to be in the sky under thata-entity.
<a-scene xrconfig xrlayers>
<a-entity xrlayerscene="name: sky; edgeSmoothness:0.6; invertLayerMask: true;">
<!-- Add your Sky Effects content here. -->
</a-entity>
</a-scene>
xrlayers Attributes
None
Notes:
xrlayersandxrfacecannot be used at the same time.xrlayersandxrwebcan be used at the same time. You must usexrconfigwhen doing so.- Best practice is to always use
xrconfig; however, if you usexrlayerswithoutxrfaceorxrweborxrconfig, thenxrconfigwill be added automatically. When that happens all attributes which were set onxrwebwill be passed along toxrconfig.
- Best practice is to always use
xrlayerscene Attributes
| Component | Type | Default | Description |
|---|---|---|---|
| name | String | '' | The layer name. Should correspond to a layer from XR8.LayersController. Only supported layer at this time is sky. |
| invertLayerMask | Boolean | false | If true, content you place in your scene will occlude non-sky areas. If false, content you place in your scene will occlude sky areas. |
| edgeSmoothness | Number | 0 | Amount to smooth the edges of the layer. Valid values between 0-1. |
xrlayersceneComponent()
XR8.AFrame.xrlayersceneComponent()
Creates an A-Frame component which can be registered with AFRAME.registerComponent(). This,
however, generally won't need to be called directly. On 8th Wall Web script load, this component
will be registered automatically if it is detected that A-Frame has loaded (i.e if window.AFRAME
exists).
window.AFRAME.registerComponent('xrlayersceneComponent', XR8.AFrame.xrlayersceneComponent())
xrlayersComponent()
XR8.AFrame.xrlayersComponent()
Creates an A-Frame component which can be registered with AFRAME.registerComponent(). This,
however, generally won't need to be called directly. On 8th Wall Web script load, this component
will be registered automatically if it is detected that A-Frame has loaded (i.e if window.AFRAME
exists).
window.AFRAME.registerComponent('xrlayers', XR8.AFrame.xrlayersComponent())