Skip to content

Commit

Permalink
fix function, add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Nov 24, 2022
1 parent c273f38 commit 2067567
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/uniforms/utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// reduce the set of textures to just those with a unique source while retaining
// the order of the textures.
export function reduceTexturesToUniqueSources( textures ) {

const sourceSet = new Set();
Expand All @@ -7,6 +9,7 @@ export function reduceTexturesToUniqueSources( textures ) {
const tex = textures[ i ];
if ( ! sourceSet.has( tex.source ) ) {

sourceSet.add( tex.source );
result.push( tex );

}
Expand Down

0 comments on commit 2067567

Please sign in to comment.