jspsych-tangram 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21321,15 +21321,17 @@ var TangramPrepWTargetsPlugin = (function (jspsych) {
21321
21321
  reconColors = [];
21322
21322
  sector.pieces.forEach((piece) => {
21323
21323
  if (piece.vertices && piece.vertices.length > 0) {
21324
- const poly = piece.vertices[0].map(([x, y]) => ({ x, y }));
21325
- reconPolys.push(poly);
21326
21324
  const color = getPieceColorFromId(
21327
21325
  piece.blueprintId,
21328
21326
  usePrimitiveColorsReconstructions || false,
21329
21327
  CONFIG.color.piece.validFill,
21330
21328
  primitiveColorIndices || [0, 1, 2, 3, 4]
21331
21329
  );
21332
- reconColors.push(color);
21330
+ piece.vertices.forEach((polyArr) => {
21331
+ const poly = polyArr.map(([x, y]) => ({ x, y }));
21332
+ reconPolys.push(poly);
21333
+ reconColors.push(color);
21334
+ });
21333
21335
  }
21334
21336
  });
21335
21337
  if (reconPolys.length === 0) {