validate() {
    var elements = this.querySelectorAll('[src]');
    var i;
    var srcs = [];
    if (elements.length === 6) {
      for (i = 0; i < elements.length; i++) {
        if (elements[i].tagName === 'IMG') {
          srcs.push(elements[i]);
        } else {
          srcs.push(elements[i].getAttribute('src'));
        }
      }
      return srcs;
    }
    // Else if there are not six elements, throw a warning.
    warn('<a-cubemap> did not contain exactly six elements each with a ' + '`src` attribute.');
  }
Checks for exactly six elements with [src].
When <img>s are used they will be prefetched.

@returns {Array<string|Element>|undefined} six URLs or <img> elements if valid, else undefined.