toJSONStatic static method

dynamic toJSONStatic(
  1. dynamic clip
)

Implementation

static toJSONStatic(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;
}