Explorar o código

colorTexture is optional, account for this (#28417)

Co-authored-by: aardgoose <[email protected]>
aardgoose hai 1 ano
pai
achega
0dee424c03
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      examples/jsm/renderers/common/RenderObject.js

+ 6 - 1
examples/jsm/renderers/common/RenderObject.js

@@ -225,7 +225,12 @@ export default class RenderObject {
 		if ( object.isBatchedMesh ) {
 
 			cacheKey += object._matricesTexture.uuid + ',';
-			cacheKey += object._colorsTexture.uuid + ',';
+
+			if ( object._colorsTexture !== null ) {
+
+				cacheKey += object._colorsTexture.uuid + ',';
+
+			}
 
 		}