瀏覽代碼

Fix the result of the "set" function. (#24511)

Garrett Johnson 3 年之前
父節點
當前提交
1995a1e7b8
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/core/BufferAttribute.js

+ 5 - 2
src/core/BufferAttribute.js

@@ -311,9 +311,12 @@ class BufferAttribute {
 
 	set( value, offset = 0 ) {
 
-		if ( this.normalized ) value = normalize( value, this.array );
+		const array = this.array;
+		const normalized = this.normalized;
+
+		if ( normalized ) value = value.map( v => normalize( v, array ) );
 
-		this.array.set( value, offset );
+		array.set( value, offset );
 
 		return this;