From a8db691e574ea17135ec78612448620e9cedfd0d Mon Sep 17 00:00:00 2001 From: Joe Pea Date: Wed, 20 Mar 2024 19:13:44 -0700 Subject: [PATCH] AnimationClip: default constructor parameters This makes AnimationClip easier to use without providing initial tracks, f.e. ```js const clip = new AnimationClip(); // ...any time later... clip.tracks.push(...keyframeTracks) clip.resetDuration() ``` --- src/animation/AnimationClip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animation/AnimationClip.js b/src/animation/AnimationClip.js index 20d1da29c633d4..1aa5f346aa297f 100644 --- a/src/animation/AnimationClip.js +++ b/src/animation/AnimationClip.js @@ -11,7 +11,7 @@ import { NormalAnimationBlendMode } from '../constants.js'; class AnimationClip { - constructor( name, duration = - 1, tracks, blendMode = NormalAnimationBlendMode ) { + constructor( name = '', duration = - 1, tracks = [], blendMode = NormalAnimationBlendMode ) { this.name = name; this.tracks = tracks;