Skip to content

Commit 02c38a9

Browse files
authored
BatchedMesh: don't keep srcAttribute type and directly create BufferAttribute, omit usage (mrdoob#27978)
as sugested mrdoob#27973 (comment)
1 parent 97aa17d commit 02c38a9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/objects/BatchedMesh.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ class BatchedMesh extends Mesh {
195195
const { array, itemSize, normalized } = srcAttribute;
196196

197197
const dstArray = new array.constructor( maxVertexCount * itemSize );
198-
const dstAttribute = new srcAttribute.constructor( dstArray, itemSize, normalized );
199-
dstAttribute.setUsage( srcAttribute.usage );
198+
const dstAttribute = new BufferAttribute( dstArray, itemSize, normalized );
200199

201200
geometry.setAttribute( attributeName, dstAttribute );
202201

0 commit comments

Comments
 (0)