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
|
@@ -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
|
-
|
|
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) {
|