Skip to content

Commit

Permalink
Fix the result of the "set" function. (#24511)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson authored Aug 22, 2022
1 parent 9bb4782 commit 1995a1e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/BufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1995a1e

Please sign in to comment.