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