Back to Aframe

A Cubemap

docs/primitives/a-cubemap.md

1.7.11.0 KB
Original Source

The cubemap primitive is used to create a CubeTexture environment map from 6 square images.

This can then be used as an envMap in the material component, or on a probe light.

Example

html
<a-scene>
  <a-assets>
    <!-- Cubemap asset -->
    <a-cubemap id="reflection">
      
      
      
      
      
      
    </a-cubemap>
  </a-assets>

  <!-- Sphere with reflection. -->
  <a-sphere position="0 1 -2"
            material="envMap:#reflection; metalness:1.0; roughness:0.0">
  </a-sphere>
</a-scene>

Attributes

No attributes. The cubemap is configured by creating 6 child elements beneath it.