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.
package/dist/index.js CHANGED
@@ -4443,15 +4443,17 @@ function PrepWTargetsApp({ params, jsPsych }) {
4443
4443
  reconColors = [];
4444
4444
  sector.pieces.forEach((piece) => {
4445
4445
  if (piece.vertices && piece.vertices.length > 0) {
4446
- const poly = piece.vertices[0].map(([x, y]) => ({ x, y }));
4447
- reconPolys.push(poly);
4448
4446
  const color = getPieceColorFromId(
4449
4447
  piece.blueprintId,
4450
4448
  usePrimitiveColorsReconstructions || false,
4451
4449
  CONFIG.color.piece.validFill,
4452
4450
  primitiveColorIndices || [0, 1, 2, 3, 4]
4453
4451
  );
4454
- reconColors.push(color);
4452
+ piece.vertices.forEach((polyArr) => {
4453
+ const poly = polyArr.map(([x, y]) => ({ x, y }));
4454
+ reconPolys.push(poly);
4455
+ reconColors.push(color);
4456
+ });
4455
4457
  }
4456
4458
  });
4457
4459
  if (reconPolys.length === 0) {