<!-- NEW3 — TEST 3 · THE RIVER'S JOURNEY · part 115 -->
dientMap.toJSON( meta ).uuid;

		}

		if ( this.transmission !== undefined ) data.transmission = this.transmission;
		if ( this.transmissionMap && this.transmissionMap.isTexture ) data.transmissionMap = this.transmissionMap.toJSON( meta ).uuid;
		if ( this.thickness !== undefined ) data.thickness = this.thickness;
		if ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid;
		if ( this.attenuationDistance !== undefined ) data.attenuationDistance = this.attenuationDistance;
		if ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex();

		if ( this.size !== undefined ) data.size = this.size;
		if ( this.sizeAttenuation !== undefined ) data.sizeAttenuation = this.sizeAttenuation;

		if ( Array.isArray( this.clippingPlanes ) && this.clippingPlanes.length > 0 ) {

			data.clippingPlanes = this.clippingPlanes.map( plane => plane.toJSON() );

		}

		// rotation (SpriteMaterial)
		if ( this.rotation !== undefined ) data.rotation = this.rotation;

		// depthPacking (MeshDepthMaterial)
		if ( this.depthPacking !== undefined ) data.depthPacking = this.depthPacking;

		if ( this.linewidth !== undefined ) data.linewidth = this.linewidth;
		if ( this.linecap !== undefined ) data.linecap = this.linecap;
		if ( this.linejoin !== undefined ) data.linejoin = this.linejoin;
		if ( this.dashSize !== undefined ) data.dashSize = this.dashSize;
		if ( this.gapSize !== undefined ) data.gapSize = this.gapSize;
		if ( this.scale !== undefined ) data.scale = this.scale;

		if ( this.wireframe !== undefined ) data.wireframe = this.wireframe;
		if ( this.wireframeLinewidth !== undefined ) data.wireframeLinewidth = this.wireframeLinewidth;
		if ( this.wireframeLinecap !== undefined ) data.wireframeLinecap = this.wireframeLinecap;
		if ( this.wireframeLinejoin !== undefined ) data.wireframeLinejoin = this.wireframeLinejoin;

		if ( this.flatShading !== undefined ) data.flatShading = this.flatShading;

		if ( this.fog !== undefined ) data.fog = this.fog;

		if ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData;

		// TODO: Copied from Object3D.toJSON

		function extractFromCache( cache ) {

			const values = [];

			for ( const key in cache ) {

				const data = cache[ key ];
				delete data.metadata;
				values.push( data );

			}

			return values;

		}

		if ( isRootObject ) {

			const textures = extractFromCache( meta.textures );
			const images = extractFromCache( meta.images );

			if ( textures.length > 0 ) data.textures = textures;
			if ( images.length > 0 ) data.images = images;

		}

		return data;

	}

	/**
	 * Deserializes the material from the given JSON.
	 *
	 * @param {Object} json - The JSON holding the serialized material.
	 * @param {Object<string,Texture>} textures - A dictionary holding textures referenced by the material.
	 * @return {Material} A reference to this material.
	 */
	fromJSON( json, textures ) {

		if ( json.uuid !== undefined ) this.uuid = json.uuid;
		if ( json.name !== undefined ) this.name = json.name;
		if ( json.color !== undefined && this.color !== undefined ) this.color.setHex( json.color );
		if ( json.roughness !== undefined ) this.roughness = json.roughness;
		if ( json.metalness !== undefined ) this.metalness = json.metalness;
		if ( json.sheen !== undefined ) this.sheen = json.sheen;
		if ( json.sheenColor !== undefined ) this.sheenColor = new Color().setHex( json.sheenColor );
		if ( json.sheenRoughness !== undefined ) this.sheenRoughness = json.sheenRoughness;
		if ( json.emissive !== undefined && this.emissive !== undefined ) this.emissive.setHex( json.emissive );
		if ( json.specular !== undefined && this.specular !== undefined ) this.specular.setHex( json.specular );
		if ( json.specularIntensity !== undefined ) this.specularIntensity = json.specularIntensity;
		if ( json.specularColor !== undefined && this.specularColor !== undefined ) this.specularColor.setHex( json.specularColor );
		if ( json.shininess !== undefined ) this.shininess = json.shininess;
		if ( json.clearcoat !== undefined ) this.clearcoat = json.clearcoat;
		if ( json.clearcoatRoughness !== undefined ) this.clearcoatRoughness = json.clearcoatRoughness;
		if ( json.dispersion !== undefined ) this.dispersion = json.dispersion;
		if ( json.retroreflectivity !== undefined ) this.retroreflectivity = json.retroreflectivity;
		if ( json.iridescence !== undefined ) this.iridescence = json.iridescence;
		if ( json.iridescenceIOR !== undefined ) this.iridescenceIOR = json.iridescenceIOR;
		if ( json.iridescenceThicknessRange !== undefined ) this.iridescenceThicknessRange = json.iridescenceThicknessRange;
		if ( json.transmission !== undefined ) this.transmission = json.transmission;
		if ( json.thickness !== undefined ) this.thickness = json.thickness;
		if ( json.attenuationDistance !== undefined ) this.attenuationDistance = json.attenuationDistance;
		i