src/components/material.js
function (oldData) {
    var data = this.data;
    if (!this.shader || data.shader !== oldData.shader) {
      this.updateShader(data.shader);
    }
    this.shader.update(this.data);
    this.updateMaterial(oldData);
  }
function (oldData) {
    var data = this.data;
    if (!this.shader || data.shader !== oldData.shader) {
      this.updateShader(data.shader);
    }
    this.shader.update(this.data);
    this.updateMaterial(oldData);
  }
function ( oldData ) { var data = this . data ; if ( ! this . shader || data . shader !== oldData . shader ) { this . updateShader ( data . shader ) ; } this . shader . update ( this . data ) ; this . updateMaterial ( oldData ) ; }
Update or create material.

@param {object|null} oldData
Update or create material .