瀏覽代碼

check if cachedAttribute is undefined

Gregg Tavares 5 年之前
父節點
當前提交
f53774aa80
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/renderers/webgl/WebGLBindingStates.js

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

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