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.
@@ -3960,15 +3960,17 @@ function PrepWTargetsApp({ params, jsPsych }) {
3960
3960
  reconColors = [];
3961
3961
  sector.pieces.forEach((piece) => {
3962
3962
  if (piece.vertices && piece.vertices.length > 0) {
3963
- const poly = piece.vertices[0].map(([x, y]) => ({ x, y }));
3964
- reconPolys.push(poly);
3965
3963
  const color = getPieceColorFromId(
3966
3964
  piece.blueprintId,
3967
3965
  usePrimitiveColorsReconstructions || false,
3968
3966
  CONFIG.color.piece.validFill,
3969
3967
  primitiveColorIndices || [0, 1, 2, 3, 4]
3970
3968
  );
3971
- reconColors.push(color);
3969
+ piece.vertices.forEach((polyArr) => {
3970
+ const poly = polyArr.map(([x, y]) => ({ x, y }));
3971
+ reconPolys.push(poly);
3972
+ reconColors.push(color);
3973
+ });
3972
3974
  }
3973
3975
  });
3974
3976
  if (reconPolys.length === 0) {