Parcourir la source

Editor: Update material when receiveShadow changes.

Mr.doob il y a 10 ans
Parent
commit
104a2bc1cf
1 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 8 1
      editor/js/Sidebar.Object3D.js

+ 8 - 1
editor/js/Sidebar.Object3D.js

@@ -463,7 +463,14 @@ Sidebar.Object3D = function ( editor ) {
 
 			if ( object.receiveShadow !== undefined ) {
 
-				object.receiveShadow = objectReceiveShadow.getValue();
+				var value = objectReceiveShadow.getValue();
+
+				if ( value !== object.receiveShadow ) {
+
+					object.receiveShadow = value;
+					object.material.needsUpdate = true;
+
+				}
 
 			}