Skip to content

Conversation

@vickyliin
Copy link
Contributor

Description

KeyframeTrack's type definition only allows Arrays to pass in for times & values parameters,
but as I need to pass Float32Array, I found they might actually support any record in number key type.

convertArray: function ( array, type, forceClone ) {
if ( ! array || // let 'undefined' and 'null' pass
! forceClone && array.constructor === type ) return array;
if ( typeof type.BYTES_PER_ELEMENT === 'number' ) {
return new type( array ); // create typed array
}
return Array.prototype.slice.call( array ); // create Array
},

@mrdoob mrdoob added this to the r125 milestone Jan 4, 2021
@mrdoob mrdoob merged commit 25f1fc9 into mrdoob:dev Jan 4, 2021
@mrdoob
Copy link
Owner

mrdoob commented Jan 4, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants