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