function ensureMaterialArray (material) {
  if (!material) {
    return [];
  } else if (Array.isArray(material)) {
    return material;
  } else if (material.materials) {
    return material.materials;
  } else {
    return [material];
  }
}
@param  {Array<THREE.Material>|THREE.Material} material
@return {Array<THREE.Material>}