Explorar el Código

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

Garrett Johnson hace 3 años
padre
commit
1995a1e7b8
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  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;