toJSON_static static method

dynamic toJSON_static(
  1. dynamic clip
)

Implementation

static toJSON_static(clip) {
  var tracks = [], clipTracks = clip.tracks;

  var json = {
    'name': clip.name,
    'duration': clip.duration,
    'tracks': tracks,
    'uuid': clip.uuid,
    'blendMode': clip.blendMode
  };

  for (var i = 0, n = clipTracks.length; i != n; ++i) {
    tracks.add(KeyframeTrack.toJSON(clipTracks[i]));
  }

  return json;
}