Skip to content

Commit

Permalink
BatchedMesh: don't keep srcAttribute type and directly create BufferA…
Browse files Browse the repository at this point in the history
…ttribute, omit usage (mrdoob#27978)

as sugested mrdoob#27973 (comment)
  • Loading branch information
marwie committed Mar 24, 2024
1 parent e65b6e3 commit 817521b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/objects/BatchedMesh.js
Expand Up @@ -195,8 +195,7 @@ class BatchedMesh extends Mesh {
const { array, itemSize, normalized } = srcAttribute;

const dstArray = new array.constructor( maxVertexCount * itemSize );
const dstAttribute = new srcAttribute.constructor( dstArray, itemSize, normalized );
dstAttribute.setUsage( srcAttribute.usage );
const dstAttribute = new BufferAttribute( dstArray, itemSize, normalized );

geometry.setAttribute( attributeName, dstAttribute );

Expand Down

0 comments on commit 817521b

Please sign in to comment.