toJSON2 function

dynamic toJSON2(
  1. dynamic shapes,
  2. Map<String, dynamic>? options,
  3. dynamic data
)

Implementation

toJSON2(shapes, Map<String, dynamic>? options, data) {
  if (shapes != null) {
    data["shapes"] = [];

    for (var i = 0, l = shapes.length; i < l; i++) {
      var shape = shapes[i];

      data["shapes"].add(shape.uuid);
    }
  }

  if (options != null && options["extrudePath"] != null) {
    data["options"]["extrudePath"] = options["extrudePath"].toJSON();
  }

  return data;
}