[RFC] Should BufferAttribute.array be TypedArray instead of ArrayLike? #35
Labels
bug
Something isn't working
current release
issues to do with the current release of Three
request for comments
Discussion about changes to the library
Problem description:
Documented as BufferAttributes only being able to be given a TypedArray, but when you call
attribute.array
the return type isArrayLike
instead of a version of TypedArray – https://threejs.org/docs/#api/en/core/BufferAttributethis becomes a problem in code like
estimateBytesUsed
inBufferGeometryUtils
:Suggested solution:
Could we use a generic to detect the type of TypedArray passed to the Attribute so that type is returned when we call
attribute.array
?The text was updated successfully, but these errors were encountered: