From 1995a1e7b891e1270992402b50e41247dedb2a1b Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Mon, 22 Aug 2022 00:48:53 -0700 Subject: [PATCH] Fix the result of the "set" function. (#24511) --- src/core/BufferAttribute.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/BufferAttribute.js b/src/core/BufferAttribute.js index 36387329478e0e..791a26183b7baa 100644 --- a/src/core/BufferAttribute.js +++ b/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;