소스 검색

Fix BufferAttribute accessors

Tristan VALCKE 9 년 전
부모
커밋
9757d97f67
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/core/BufferAttribute.js

+ 6 - 0
src/core/BufferAttribute.js

@@ -32,6 +32,12 @@ function BufferAttribute( array, itemSize, normalized ) {
 
 }
 
+Object.defineProperty( BufferAttribute.prototype, "needsUpdate", {
+
+	set: function(value) { if ( value === true ) this.version ++; }
+
+});
+
 Object.assign( BufferAttribute.prototype, {
 
 	constructor: BufferAttribute,

粤ICP备19079148号