Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/animation/AnimationUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { Quaternion } from '../math/Quaternion.js';
import { AdditiveAnimationBlendMode } from '../constants.js';

// same as Array.prototype.slice, but also works on typed arrays
function arraySlice( array, from, to ) {
function arraySlice( array, from, to = array.length ) {

if ( isTypedArray( array ) ) {

// in ios9 array.subarray(from, undefined) will return empty array
// but array.subarray(from) or array.subarray(from, len) is correct
return new array.constructor( array.subarray( from, to !== undefined ? to : array.length ) );
return new array.constructor( array.subarray( from, to ) );

}

Expand Down