Explorar o código

Src: Improve retroreflection nomenclature (#34079)

WestLangley hai 14 horas
pai
achega
3fce968195

+ 1 - 1
examples/files.json

@@ -397,7 +397,7 @@
 		"webgpu_materials_envmaps",
 		"webgpu_materials_lightmap",
 		"webgpu_materials_matcap",
-		"webgpu_materials_retroreflective",
+		"webgpu_materials_retroreflection",
 		"webgpu_materials_sss",
 		"webgpu_materials_texture_html",
 		"webgpu_materials_texture_manualmipmap",

BIN=BIN
examples/screenshots/webgpu_materials_retroreflection.jpg


BIN=BIN
examples/screenshots/webgpu_materials_retroreflective.jpg


+ 10 - 9
examples/webgpu_materials_retroreflective.html → examples/webgpu_materials_retroreflection.html

@@ -1,12 +1,13 @@
 <!DOCTYPE html>
 <html lang="en">
 	<head>
-		<title>three.js webgpu - materials - retroreflective</title>
+		<title>three.js webgpu - materials - retroreflection</title>
 		<meta charset="utf-8">
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
-		<meta property="og:title" content="three.js webgpu - materials - retroreflective">
+		<meta property="og:title" content="three.js webgpu - materials - retroreflection">
 		<meta property="og:type" content="website">
-		<meta property="og:url" content="https://threejs.org/examples/webgpu_materials_retroreflective.html">
+		<meta property="og:url" content="https://threejs.org/examples/webgpu_materials_retroreflection.html">
+		<meta property="og:image" content="https://threejs.org/examples/screenshots/webgpu_materials_retroreflection.jpg">
 		<link type="text/css" rel="stylesheet" href="example.css">
 	</head>
 	<body>
@@ -46,8 +47,8 @@
 			let frontLight, bandMaterial;
 
 			const params = {
-				retroreflectivity: true,
-				retroreflective: 1.0,
+				retroreflective: true,
+				retroreflectivity: 1.0,
 				frontLightIntensity: 5.0
 			};
 
@@ -95,8 +96,8 @@
 				controls.update();
 
 				const gui = new GUI();
-				gui.add( params, 'retroreflectivity' ).name( 'retroreflectivity' ).onChange( updateMaterial );
-				gui.add( params, 'retroreflective', 0, 1, 0.01 ).name( 'retroreflective' ).onChange( updateMaterial );
+				gui.add( params, 'retroreflective' ).name( 'retroreflective' ).onChange( updateMaterial );
+				gui.add( params, 'retroreflectivity', 0, 1, 0.01 ).name( 'retroreflectivity' ).onChange( updateMaterial );
 				gui.add( params, 'frontLightIntensity', 0, 30, 0.1 ).name( 'front light intensity' ).onChange( updateMaterial );
 
 				window.addEventListener( 'resize', onWindowResize );
@@ -120,7 +121,7 @@
 					color: 0xf7f0d6,
 					roughness: 0.22,
 					metalness: 0.0,
-					retroreflective: params.retroreflective
+					retroreflectivity: params.retroreflectivity
 				} );
 
 				const base = new THREE.Mesh(
@@ -167,7 +168,7 @@
 
 			function updateMaterial() {
 
-				bandMaterial.retroreflective = params.retroreflectivity ? params.retroreflective : 0;
+				bandMaterial.retroreflectivity = params.retroreflective ? params.retroreflectivity : 0;
 				frontLight.intensity = params.frontLightIntensity;
 
 			}

+ 2 - 2
src/Three.TSL.js

@@ -300,7 +300,7 @@ export const materialPointSize = TSL.materialPointSize;
 export const materialReference = TSL.materialReference;
 export const materialReflectivity = TSL.materialReflectivity;
 export const materialRefractionRatio = TSL.materialRefractionRatio;
-export const materialRetroreflective = TSL.materialRetroreflective;
+export const materialRetroreflectivity = TSL.materialRetroreflectivity;
 export const materialRotation = TSL.materialRotation;
 export const materialRoughness = TSL.materialRoughness;
 export const materialSheen = TSL.materialSheen;
@@ -475,7 +475,7 @@ export const refract = TSL.refract;
 export const refractVector = TSL.refractVector;
 export const refractView = TSL.refractView;
 export const reinhardToneMapping = TSL.reinhardToneMapping;
-export const retroreflective = TSL.retroreflective;
+export const retroreflectivity = TSL.retroreflectivity;
 export const remap = TSL.remap;
 export const remapClamp = TSL.remapClamp;
 export const renderGroup = TSL.renderGroup;

+ 2 - 2
src/materials/Material.js

@@ -683,7 +683,7 @@ class Material extends EventDispatcher {
 		}
 
 		if ( this.dispersion !== undefined ) data.dispersion = this.dispersion;
-		if ( this.retroreflective !== undefined ) data.retroreflective = this.retroreflective;
+		if ( this.retroreflectivity !== undefined ) data.retroreflectivity = this.retroreflectivity;
 
 		if ( this.iridescence !== undefined ) data.iridescence = this.iridescence;
 		if ( this.iridescenceIOR !== undefined ) data.iridescenceIOR = this.iridescenceIOR;
@@ -912,7 +912,7 @@ class Material extends EventDispatcher {
 		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.retroreflective !== undefined ) this.retroreflective = json.retroreflective;
+		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;

+ 7 - 7
src/materials/MeshPhysicalMaterial.js

@@ -356,7 +356,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 		this._clearcoat = 0;
 		this._dispersion = 0;
 		this._iridescence = 0;
-		this._retroreflective = 0;
+		this._retroreflectivity = 0;
 		this._sheen = 0.0;
 		this._transmission = 0;
 
@@ -473,21 +473,21 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 	 * @type {number}
 	 * @default 0
 	 */
-	get retroreflective() {
+	get retroreflectivity() {
 
-		return this._retroreflective;
+		return this._retroreflectivity;
 
 	}
 
-	set retroreflective( value ) {
+	set retroreflectivity( value ) {
 
-		if ( this._retroreflective > 0 !== value > 0 ) {
+		if ( this._retroreflectivity > 0 !== value > 0 ) {
 
 			this.version ++;
 
 		}
 
-		this._retroreflective = value;
+		this._retroreflectivity = value;
 
 	}
 
@@ -576,7 +576,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 		this.iridescenceThicknessRange = [ ...source.iridescenceThicknessRange ];
 		this.iridescenceThicknessMap = source.iridescenceThicknessMap;
 
-		this.retroreflective = source.retroreflective;
+		this.retroreflectivity = source.retroreflectivity;
 
 		this.sheen = source.sheen;
 		this.sheenColor.copy( source.sheenColor );

+ 12 - 12
src/materials/nodes/MeshPhysicalNodeMaterial.js

@@ -1,5 +1,5 @@
-import { clearcoat, clearcoatRoughness, sheen, sheenRoughness, iridescence, iridescenceIOR, iridescenceThickness, specularColor, specularColorBlended, specularF90, diffuseColor, metalness, roughness, anisotropy, alphaT, anisotropyT, anisotropyB, ior, transmission, thickness, attenuationDistance, attenuationColor, dispersion, retroreflective } from '../../nodes/core/PropertyNode.js';
-import { materialClearcoat, materialClearcoatRoughness, materialClearcoatNormal, materialSheen, materialSheenRoughness, materialIridescence, materialIridescenceIOR, materialIridescenceThickness, materialSpecularIntensity, materialSpecularColor, materialAnisotropy, materialIOR, materialTransmission, materialThickness, materialAttenuationDistance, materialAttenuationColor, materialDispersion, materialRetroreflective } from '../../nodes/accessors/MaterialNode.js';
+import { clearcoat, clearcoatRoughness, sheen, sheenRoughness, iridescence, iridescenceIOR, iridescenceThickness, specularColor, specularColorBlended, specularF90, diffuseColor, metalness, roughness, anisotropy, alphaT, anisotropyT, anisotropyB, ior, transmission, thickness, attenuationDistance, attenuationColor, dispersion, retroreflectivity } from '../../nodes/core/PropertyNode.js';
+import { materialClearcoat, materialClearcoatRoughness, materialClearcoatNormal, materialSheen, materialSheenRoughness, materialIridescence, materialIridescenceIOR, materialIridescenceThickness, materialSpecularIntensity, materialSpecularColor, materialAnisotropy, materialIOR, materialTransmission, materialThickness, materialAttenuationDistance, materialAttenuationColor, materialDispersion, materialRetroreflectivity } from '../../nodes/accessors/MaterialNode.js';
 import { float, vec2, vec3, If } from '../../nodes/tsl/TSLBase.js';
 import getRoughness from '../../nodes/functions/material/getRoughness.js';
 import { TBNViewMatrix } from '../../nodes/accessors/AccessorsUtils.js';
@@ -253,16 +253,16 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
 
 		/**
 		 * The retroreflective strength of physical materials is by default inferred from the
-		 * `retroreflective` property. This node property allows to overwrite the default
+		 * `retroreflectivity` property. This node property allows to overwrite the default
 		 * and define the retroreflective strength with a node instead.
 		 *
 		 * If you don't want to overwrite the retroreflective strength but modify the existing
-		 * value instead, use {@link materialRetroreflective}.
+		 * value instead, use {@link materialRetroreflectivity}.
 		 *
 		 * @type {?Node<float>}
 		 * @default null
 		 */
-		this.retroreflectiveNode = null;
+		this.retroreflectivityNode = null;
 
 		/**
 		 * The anisotropy of physical materials is by default inferred from the
@@ -361,9 +361,9 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
 	 * @type {boolean}
 	 * @default true
 	 */
-	get useRetroreflective() {
+	get useRetroreflection() {
 
-		return this.retroreflective > 0 || this.retroreflectiveNode !== null;
+		return this.retroreflectivity > 0 || this.retroreflectivityNode !== null;
 
 	}
 
@@ -388,7 +388,7 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
 	 */
 	setupLightingModel( /*builder*/ ) {
 
-		return new PhysicalLightingModel( this.useClearcoat, this.useSheen, this.useIridescence, this.useAnisotropy, this.useTransmission, this.useDispersion, this.useRetroreflective );
+		return new PhysicalLightingModel( this.useClearcoat, this.useSheen, this.useIridescence, this.useAnisotropy, this.useTransmission, this.useDispersion, this.useRetroreflection );
 
 	}
 
@@ -425,13 +425,13 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
 
 		}
 
-		// RETROREFLECTIVE
+		// RETROREFLECTION
 
-		if ( this.useRetroreflective ) {
+		if ( this.useRetroreflection ) {
 
-			const retroreflectiveNode = this.retroreflectiveNode ? float( this.retroreflectiveNode ) : materialRetroreflective;
+			const retroreflectivityNode = this.retroreflectivityNode ? float( this.retroreflectivityNode ) : materialRetroreflectivity;
 
-			retroreflective.assign( retroreflectiveNode );
+			retroreflectivity.assign( retroreflectivityNode );
 
 		}
 

+ 1 - 1
src/materials/nodes/manager/NodeMaterialObserver.js

@@ -38,7 +38,7 @@ const refreshUniforms = [
 	'normalMap',
 	'normalScale',
 	'opacity',
-	'retroreflective',
+	'retroreflectivity',
 	'roughness',
 	'roughnessMap',
 	'sheen',

+ 2 - 2
src/nodes/accessors/MaterialNode.js

@@ -463,7 +463,7 @@ MaterialNode.LINE_WIDTH = 'linewidth';
 MaterialNode.LINE_DASH_OFFSET = 'dashOffset';
 MaterialNode.POINT_SIZE = 'size';
 MaterialNode.DISPERSION = 'dispersion';
-MaterialNode.RETROREFLECTIVE = 'retroreflective';
+MaterialNode.RETROREFLECTIVITY = 'retroreflectivity';
 MaterialNode.LIGHT_MAP = 'light';
 MaterialNode.AO = 'ao';
 
@@ -771,7 +771,7 @@ export const materialDispersion = /*@__PURE__*/ nodeImmutable( MaterialNode, Mat
  * @tsl
  * @type {Node<float>}
  */
-export const materialRetroreflective = /*@__PURE__*/ nodeImmutable( MaterialNode, MaterialNode.RETROREFLECTIVE );
+export const materialRetroreflectivity = /*@__PURE__*/ nodeImmutable( MaterialNode, MaterialNode.RETROREFLECTIVITY );
 
 /**
  * TSL object that represents the light map of the current material.

+ 2 - 2
src/nodes/core/PropertyNode.js

@@ -404,12 +404,12 @@ export const attenuationColor = /*@__PURE__*/ nodeImmutable( PropertyNode, 'colo
 export const dispersion = /*@__PURE__*/ nodeImmutable( PropertyNode, 'float', 'Dispersion' );
 
 /**
- * TSL object that represents the shader variable `Retroreflective`.
+ * TSL object that represents the shader variable `Retroreflectivity`.
  *
  * @tsl
  * @type {PropertyNode<float>}
  */
-export const retroreflective = /*@__PURE__*/ nodeImmutable( PropertyNode, 'float', 'Retroreflective' );
+export const retroreflectivity = /*@__PURE__*/ nodeImmutable( PropertyNode, 'float', 'Retroreflectivity' );
 
 /**
  * TSL object that represents the shader variable `AmbientOcclusion`.

+ 7 - 7
src/nodes/functions/PhysicalLightingModel.js

@@ -7,7 +7,7 @@ import Schlick_to_F0 from './BSDF/Schlick_to_F0.js';
 import BRDF_Sheen from './BSDF/BRDF_Sheen.js';
 import { LTC_Evaluate, LTC_Uv } from './BSDF/LTC.js';
 import LightingModel from '../core/LightingModel.js';
-import { diffuseColor, diffuseContribution, specularColor, specularColorBlended, specularF90, roughness, metalness, clearcoat, clearcoatRoughness, sheen, sheenRoughness, iridescence, iridescenceIOR, iridescenceThickness, ior, thickness, transmission, attenuationDistance, attenuationColor, dispersion, retroreflective } from '../core/PropertyNode.js';
+import { diffuseColor, diffuseContribution, specularColor, specularColorBlended, specularF90, roughness, metalness, clearcoat, clearcoatRoughness, sheen, sheenRoughness, iridescence, iridescenceIOR, iridescenceThickness, ior, thickness, transmission, attenuationDistance, attenuationColor, dispersion, retroreflectivity } from '../core/PropertyNode.js';
 import { normalView, clearcoatNormalView, normalWorld } from '../accessors/Normal.js';
 import { positionViewDirection, positionView, positionWorld } from '../accessors/Position.js';
 import { Fn, float, vec2, vec3, vec4, mat3, If } from '../tsl/TSLBase.js';
@@ -347,9 +347,9 @@ class PhysicalLightingModel extends LightingModel {
 	 * @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not.
 	 * @param {boolean} [transmission=false] - Whether transmission is supported or not.
 	 * @param {boolean} [dispersion=false] - Whether dispersion is supported or not.
-	 * @param {boolean} [retroreflective=false] - Whether retroreflection is supported or not.
+	 * @param {boolean} [retroreflection=false] - Whether retroreflection is supported or not.
 	 */
-	constructor( clearcoat = false, sheen = false, iridescence = false, anisotropy = false, transmission = false, dispersion = false, retroreflective = false ) {
+	constructor( clearcoat = false, sheen = false, iridescence = false, anisotropy = false, transmission = false, dispersion = false, retroreflection = false ) {
 
 		super();
 
@@ -407,7 +407,7 @@ class PhysicalLightingModel extends LightingModel {
 		 * @type {boolean}
 		 * @default false
 		 */
-		this.retroreflective = retroreflective;
+		this.retroreflection = retroreflection;
 
 		/**
 		 * The clear coat radiance.
@@ -655,7 +655,7 @@ class PhysicalLightingModel extends LightingModel {
 
 		let specularBRDF = BRDF_GGX( { lightDirection, f0: specularColorBlended, f90: 1, roughness, f: this.iridescenceFresnel, USE_IRIDESCENCE: this.iridescence, USE_ANISOTROPY: this.anisotropy } );
 
-		if ( this.retroreflective === true ) {
+		if ( this.retroreflection === true ) {
 
 			// Minimal Retroreflective Microfacet Model:
 			// https://jcgt.org/published/0015/01/04/
@@ -665,8 +665,8 @@ class PhysicalLightingModel extends LightingModel {
 			const retroF = F_Schlick( { f0: specularColor, f90: specularF90, dotVH: dotRetroVH } );
 			const retroSpecularBRDF = BRDF_GGX( { lightDirection, viewDirection: retroViewDirection, f0: specularColorBlended, f90: 1, roughness, f: this.iridescenceFresnel, USE_IRIDESCENCE: this.iridescence, USE_ANISOTROPY: this.anisotropy } );
 
-			F = mix( F, retroF, retroreflective.clamp() );
-			specularBRDF = mix( specularBRDF, retroSpecularBRDF, retroreflective.clamp() );
+			F = mix( F, retroF, retroreflectivity.clamp() );
+			specularBRDF = mix( specularBRDF, retroSpecularBRDF, retroreflectivity.clamp() );
 
 		}
 

+ 2 - 2
src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js

@@ -85,9 +85,9 @@ material.roughness = min( material.roughness, 1.0 );
 
 #endif
 
-#ifdef USE_RETROREFLECTIVE
+#ifdef USE_RETROREFLECTION
 
-	material.retroreflective = retroreflective;
+	material.retroreflectivity = retroreflectivity;
 
 #endif
 

+ 6 - 6
src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js

@@ -16,8 +16,8 @@ struct PhysicalMaterial {
 	vec2 dfg;
 	vec3 multiScatteringCompensation;
 
-	#ifdef USE_RETROREFLECTIVE
-		float retroreflective;
+	#ifdef USE_RETROREFLECTION
+		float retroreflectivity;
 	#endif
 
 	#ifdef USE_CLEARCOAT
@@ -515,14 +515,14 @@ void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geome
 
 	vec3 specularBRDF = BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
 
-	#ifdef USE_RETROREFLECTIVE
+	#ifdef USE_RETROREFLECTION
 
 		// Minimal Retroreflective Microfacet Model:
 		// https://jcgt.org/published/0015/01/04/
 		vec3 retroViewDir = reflect( - geometryViewDir, geometryNormal );
 		vec3 retroSpecularBRDF = BRDF_GGX( directLight.direction, retroViewDir, geometryNormal, material );
 
-		specularBRDF = mix( specularBRDF, retroSpecularBRDF, saturate( material.retroreflective ) );
+		specularBRDF = mix( specularBRDF, retroSpecularBRDF, saturate( material.retroreflectivity ) );
 
 	#endif
 
@@ -533,13 +533,13 @@ void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geome
 	float dotVH = saturate( dot( geometryViewDir, halfDir ) );
 	vec3 F = F_Schlick( material.specularColor, material.specularF90, dotVH );
 
-	#ifdef USE_RETROREFLECTIVE
+	#ifdef USE_RETROREFLECTION
 
 		vec3 retroHalfDir = normalize( directLight.direction + retroViewDir );
 		float dotRetroVH = saturate( dot( retroViewDir, retroHalfDir ) );
 		vec3 retroF = F_Schlick( material.specularColor, material.specularF90, dotRetroVH );
 
-		F = mix( F, retroF, saturate( material.retroreflective ) );
+		F = mix( F, retroF, saturate( material.retroreflectivity ) );
 
 	#endif
 

+ 1 - 1
src/renderers/shaders/ShaderLib.js

@@ -316,7 +316,7 @@ ShaderLib.physical = {
 			clearcoatRoughnessMap: { value: null },
 			clearcoatRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() },
 			dispersion: { value: 0 },
-			retroreflective: { value: 0 },
+			retroreflectivity: { value: 0 },
 			iridescence: { value: 0 },
 			iridescenceMap: { value: null },
 			iridescenceMapTransform: { value: /*@__PURE__*/ new Matrix3() },

+ 2 - 2
src/renderers/shaders/ShaderLib/meshphysical.glsl.js

@@ -99,8 +99,8 @@ uniform float opacity;
 	uniform float dispersion;
 #endif
 
-#ifdef USE_RETROREFLECTIVE
-	uniform float retroreflective;
+#ifdef USE_RETROREFLECTION
+	uniform float retroreflectivity;
 #endif
 
 #ifdef USE_IRIDESCENCE

+ 2 - 2
src/renderers/webgl/WebGLMaterials.js

@@ -483,9 +483,9 @@ function WebGLMaterials( renderer, properties ) {
 
 		}
 
-		if ( material.retroreflective > 0 ) {
+		if ( material.retroreflectivity > 0 ) {
 
-			uniforms.retroreflective.value = material.retroreflective;
+			uniforms.retroreflectivity.value = material.retroreflectivity;
 
 		}
 

+ 1 - 1
src/renderers/webgl/WebGLProgram.js

@@ -709,7 +709,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
 			parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',
 
 			parameters.dispersion ? '#define USE_DISPERSION' : '',
-			parameters.retroreflective ? '#define USE_RETROREFLECTIVE' : '',
+			parameters.retroreflection ? '#define USE_RETROREFLECTION' : '',
 
 			parameters.iridescence ? '#define USE_IRIDESCENCE' : '',
 			parameters.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '',

+ 3 - 3
src/renderers/webgl/WebGLPrograms.js

@@ -140,7 +140,7 @@ function WebGLPrograms( renderer, environments, extensions, capabilities, bindin
 		const HAS_ANISOTROPY = material.anisotropy > 0;
 		const HAS_CLEARCOAT = material.clearcoat > 0;
 		const HAS_DISPERSION = material.dispersion > 0;
-		const HAS_RETROREFLECTIVE = material.retroreflective > 0;
+		const HAS_RETROREFLECTION = material.retroreflectivity > 0;
 		const HAS_IRIDESCENCE = material.iridescence > 0;
 		const HAS_SHEEN = material.sheen > 0;
 		const HAS_TRANSMISSION = material.transmission > 0;
@@ -241,7 +241,7 @@ function WebGLPrograms( renderer, environments, extensions, capabilities, bindin
 			clearcoatRoughnessMap: HAS_CLEARCOAT_ROUGHNESSMAP,
 
 			dispersion: HAS_DISPERSION,
-			retroreflective: HAS_RETROREFLECTIVE,
+			retroreflection: HAS_RETROREFLECTION,
 
 			iridescence: HAS_IRIDESCENCE,
 			iridescenceMap: HAS_IRIDESCENCEMAP,
@@ -534,7 +534,7 @@ function WebGLPrograms( renderer, environments, extensions, capabilities, bindin
 			_programLayers.enable( 18 );
 		if ( parameters.dispersion )
 			_programLayers.enable( 19 );
-		if ( parameters.retroreflective )
+		if ( parameters.retroreflection )
 			_programLayers.enable( 24 );
 		if ( parameters.batchingColor )
 			_programLayers.enable( 20 );

+ 11 - 11
test/unit/src/materials/MeshPhysicalMaterial.tests.js

@@ -37,37 +37,37 @@ export default QUnit.module( 'Materials', () => {
 
 		} );
 
-		QUnit.test( 'retroreflective', ( assert ) => {
+		QUnit.test( 'retroreflectivity', ( assert ) => {
 
 			const object = new MeshPhysicalMaterial();
-			assert.strictEqual( object.retroreflective, 0, 'retroreflective defaults to 0.' );
+			assert.strictEqual( object.retroreflectivity, 0, 'retroreflectivity defaults to 0.' );
 
-			object.retroreflective = 0.75;
-			assert.strictEqual( object.retroreflective, 0.75, 'Can set retroreflective.' );
+			object.retroreflectivity = 0.75;
+			assert.strictEqual( object.retroreflectivity, 0.75, 'Can set retroreflectivity.' );
 
 		} );
 
-		QUnit.test( 'copy copies retroreflective', ( assert ) => {
+		QUnit.test( 'copy copies retroreflectivity', ( assert ) => {
 
-			const source = new MeshPhysicalMaterial( { retroreflective: 0.5 } );
+			const source = new MeshPhysicalMaterial( { retroreflectivity: 0.5 } );
 			const object = new MeshPhysicalMaterial();
 
 			object.copy( source );
 
-			assert.strictEqual( object.retroreflective, 0.5, 'copy() preserves retroreflective.' );
+			assert.strictEqual( object.retroreflectivity, 0.5, 'copy() preserves retroreflectivity.' );
 
 		} );
 
-		QUnit.test( 'fromJSON restores retroreflective', ( assert ) => {
+		QUnit.test( 'fromJSON restores retroreflectivity', ( assert ) => {
 
-			const source = new MeshPhysicalMaterial( { retroreflective: 0.25 } );
+			const source = new MeshPhysicalMaterial( { retroreflectivity: 0.25 } );
 			const json = source.toJSON();
 			const object = new MeshPhysicalMaterial();
 
 			object.fromJSON( json );
 
-			assert.strictEqual( json.retroreflective, 0.25, 'toJSON() serializes retroreflective.' );
-			assert.strictEqual( object.retroreflective, 0.25, 'fromJSON() restores retroreflective.' );
+			assert.strictEqual( json.retroreflectivity, 0.25, 'toJSON() serializes retroreflectivity.' );
+			assert.strictEqual( object.retroreflectivity, 0.25, 'fromJSON() restores retroreflectivity.' );
 
 		} );
 

粤ICP备19079148号