static toJSON(track){const trackType=track.constructor;let json;// derived classes can define a static toJSON method
if(trackType.toJSON!==this.toJSON){json=trackType.toJSON(track);}else{// by default, we assume the data can be serialized as-is
json={'name':track.name,'times':convertArray(track.times,Array),'values':convertArray(track.values,Array)};const interpolation=track.getInterpolation();if(interpolation!==track.DefaultInterpolation){json.interpolation=interpolation;}}json.type=track.ValueTypeName;// mandatory
return json;}
Interpolant that evaluates to the sample value at the position preceding
the parameter.