fromMaterial( material ) {

		if ( material.isNodeMaterial ) return material;

		let nodeMaterial = null;

		const nodeMaterialClass = this.getMaterialNodeClass( material.type );

		if ( nodeMaterialClass !== null ) {

			nodeMaterial = new nodeMaterialClass();

			for ( const key in material ) {

				nodeMaterial[ key ] = material[ key ];

			}

		}

		return nodeMaterial;

	}
Returns a matching node material instance for the given material object.

This method also assigns/copies the properties of the given material object
to the node material. This is done to make sure the current material
configuration carries over to the node version.

@param {Material} material - A material.
@return {NodeMaterial} The corresponding node material.