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/package.json
CHANGED
|
@@ -261,17 +261,19 @@ function PrepWTargetsApp({ params, jsPsych }: { params: StartPrepWTargetsTrialPa
|
|
|
261
261
|
|
|
262
262
|
sector.pieces.forEach(piece => {
|
|
263
263
|
if (piece.vertices && piece.vertices.length > 0) {
|
|
264
|
-
// Vertices are already in anchor coordinates - use directly!
|
|
265
|
-
const poly = piece.vertices[0].map(([x, y]) => ({ x, y }));
|
|
266
|
-
reconPolys!.push(poly);
|
|
267
|
-
|
|
268
264
|
const color = getPieceColorFromId(
|
|
269
265
|
piece.blueprintId,
|
|
270
266
|
usePrimitiveColorsReconstructions || false,
|
|
271
267
|
CONFIG.color.piece.validFill,
|
|
272
268
|
primitiveColorIndices || [0, 1, 2, 3, 4]
|
|
273
269
|
);
|
|
274
|
-
|
|
270
|
+
|
|
271
|
+
// Handle both primitive (single poly) and composite (multiple polys) pieces
|
|
272
|
+
piece.vertices.forEach(polyArr => {
|
|
273
|
+
const poly = polyArr.map(([x, y]) => ({ x, y }));
|
|
274
|
+
reconPolys!.push(poly);
|
|
275
|
+
reconColors!.push(color);
|
|
276
|
+
});
|
|
275
277
|
}
|
|
276
278
|
});
|
|
277
279
|
|