Browse Source

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

Garrett Johnson 3 years ago
parent
commit
1995a1e7b8
1 changed files with 5 additions and 2 deletions
  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;