Przeglądaj źródła

Material: Clean up. (#23438)

linbingquan 3 lat temu
rodzic
commit
9dceefefa1
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      src/materials/Material.js

+ 3 - 3
src/materials/Material.js

@@ -160,9 +160,9 @@ class Material extends EventDispatcher {
 
 	toJSON( meta ) {
 
-		const isRoot = ( meta === undefined || typeof meta === 'string' );
+		const isRootObject = ( meta === undefined || typeof meta === 'string' );
 
-		if ( isRoot ) {
+		if ( isRootObject ) {
 
 			meta = {
 				textures: {},
@@ -370,7 +370,7 @@ class Material extends EventDispatcher {
 
 		}
 
-		if ( isRoot ) {
+		if ( isRootObject ) {
 
 			const textures = extractFromCache( meta.textures );
 			const images = extractFromCache( meta.images );