2
0
Эх сурвалжийг харах

MeshPhysicalMaterial: Update version for certain transmission changes. (#22379)

Michael Herzog 4 жил өмнө
parent
commit
fcf526d01d

+ 21 - 0
src/materials/MeshPhysicalMaterial.js

@@ -34,6 +34,8 @@ import * as MathUtils from '../math/MathUtils.js';
 
 class MeshPhysicalMaterial extends MeshStandardMaterial {
 
+	#transmission = 0;
+
 	constructor( parameters ) {
 
 		super();
@@ -88,6 +90,25 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 
 	}
 
+	get transmission() {
+
+		return this.#transmission;
+
+	}
+
+	set transmission( value ) {
+
+		if ( this.#transmission > 0 !== value > 0 ) {
+
+			this.version ++;
+
+		}
+
+		this.#transmission = value;
+
+	}
+
+
 	copy( source ) {
 
 		super.copy( source );