浏览代码

WebGLAttributes use get/set method for GLBufferAttibute

raub 7 年之前
父节点
当前提交
00deed9a63
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/renderers/webgl/WebGLAttributes.js

+ 3 - 3
src/renderers/webgl/WebGLAttributes.js

@@ -125,7 +125,7 @@ function WebGLAttributes( gl ) {
 
 		if ( attribute.isGLBufferAttribute ) {
 
-			var cached = buffers[ attribute.uuid ];
+			var cached = buffers.get( attribute );
 
 			if ( cached && cached.version >= attribute.version ) {
 
@@ -133,12 +133,12 @@ function WebGLAttributes( gl ) {
 
 			}
 
-			buffers[ attribute.uuid ] = {
+			buffers.set( attribute, {
 				buffer: attribute.buffer,
 				type: attribute.type,
 				bytesPerElement: attribute.elementSize,
 				version: attribute.version
-			};
+			} );
 
 			return;