Explorar el Código

ObjectLoader: material can be undefined.

Mr.doob hace 10 años
padre
commit
22de744d50
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      src/loaders/ObjectLoader.js

+ 2 - 0
src/loaders/ObjectLoader.js

@@ -461,6 +461,8 @@ THREE.ObjectLoader.prototype = {
 
 			var getMaterial = function ( name ) {
 
+				if ( name === undefined ) return undefined;
+
 				if ( materials[ name ] === undefined ) {
 
 					console.warn( 'THREE.ObjectLoader: Undefined material', name );