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