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

Merge pull request #20056 from greggman/check-cached-attribute

WebGLBindingStates: check if cachedAttribute is undefined
Mr.doob 5 жил өмнө
parent
commit
0dc43355d7

+ 2 - 0
src/renderers/webgl/WebGLBindingStates.js

@@ -175,6 +175,8 @@
 			const cachedAttribute = cachedAttributes[ key ];
 			const cachedAttribute = cachedAttributes[ key ];
 			const geometryAttribute = geometryAttributes[ key ];
 			const geometryAttribute = geometryAttributes[ key ];
 
 
+			if ( cachedAttribute === undefined ) return true;
+
 			if ( cachedAttribute.attribute !== geometryAttribute ) return true;
 			if ( cachedAttribute.attribute !== geometryAttribute ) return true;
 
 
 			if ( cachedAttribute.data !== geometryAttribute.data ) return true;
 			if ( cachedAttribute.data !== geometryAttribute.data ) return true;

粤ICP备19079148号