code: function getMaterialData (data) {
    var newData = {
      color: new THREE.Color(data.color),
      emissive: new THREE.Color(data.emissive),
      emissiveIntensity: data.emissiveIntensity,
      fog: data.fog,
      metalness: data.metalness,
      roughness: data.roughness,
      wireframe: data.wireframe,
      wireframeLinewidth: data.wireframeLinewidth
    };
  
    if (data.normalMap) { newData.normalScale = data.normalScale; }
  
    if (data.ambientOcclusionMap) { newData.aoMapIntensity = data.ambientOcclusionMapIntensity; }
  
    if (data.displacementMap) {
      newData.displacementScale = data.displacementScale;
      newData.displacementBias = data.displacementBias;
    }
  
    return newData;
  }
docs: Builds and normalize material data, normalizing stuff along the way.
  
  @param {object} data - Material data.
  @returns {object} data - Processed material data.