jspsych-tangram 0.0.3 → 0.0.4
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/construct/index.browser.js +15 -16
- package/dist/construct/index.browser.js.map +1 -1
- package/dist/construct/index.browser.min.js +13 -13
- package/dist/construct/index.browser.min.js.map +1 -1
- package/dist/construct/index.cjs +15 -16
- package/dist/construct/index.cjs.map +1 -1
- package/dist/construct/index.js +15 -16
- package/dist/construct/index.js.map +1 -1
- package/dist/index.cjs +17 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -16
- package/dist/index.js.map +1 -1
- package/dist/prep/index.browser.js +12 -11
- package/dist/prep/index.browser.js.map +1 -1
- package/dist/prep/index.browser.min.js +1 -1
- package/dist/prep/index.browser.min.js.map +1 -1
- package/dist/prep/index.cjs +12 -11
- package/dist/prep/index.cjs.map +1 -1
- package/dist/prep/index.js +12 -11
- package/dist/prep/index.js.map +1 -1
- package/package.json +1 -1
- package/src/core/domain/primitives.ts +9 -10
- package/src/core/domain/types.ts +4 -3
- package/src/core/io/InteractionTracker.ts +1 -1
- package/src/core/io/quickstash.ts +3 -29
- package/src/core/types/plugin-interfaces.ts +1 -1
- package/src/plugins/tangram-construct/ConstructionApp.tsx +6 -7
- package/src/plugins/tangram-prep/PrepApp.tsx +1 -0
- package/tangram-construct.min.js +13 -13
- package/tangram-prep.min.js +1 -1
- package/src/core/io/stims.ts +0 -107
|
@@ -19637,8 +19637,7 @@ var TangramPrepPlugin = (function (jspsych) {
|
|
|
19637
19637
|
}
|
|
19638
19638
|
const sectorTangramMap = this.controller.state.cfg.sectors.map((s) => ({
|
|
19639
19639
|
sectorId: s.id,
|
|
19640
|
-
tangramId: s.
|
|
19641
|
-
// In our system, sector ID == tangram ID
|
|
19640
|
+
tangramId: s.tangramId
|
|
19642
19641
|
}));
|
|
19643
19642
|
const blueprintOrder = {
|
|
19644
19643
|
primitives: this.controller.state.primitives.map((bp) => bp.id),
|
|
@@ -20143,10 +20142,10 @@ var TangramPrepPlugin = (function (jspsych) {
|
|
|
20143
20142
|
return pts;
|
|
20144
20143
|
}
|
|
20145
20144
|
const FIRST_EDGES_UNITS = {
|
|
20146
|
-
"
|
|
20145
|
+
"smalltriangle": [P(0, 0), P(0.5, 0.5)],
|
|
20147
20146
|
"parallelogram": [P(0, 0), P(0.5, 0)],
|
|
20148
|
-
"
|
|
20149
|
-
"
|
|
20147
|
+
"largetriangle": [P(0, 0), P(0.5, -0.5)],
|
|
20148
|
+
"medtriangle": [P(0, 0), P(0.5, 0)],
|
|
20150
20149
|
"square": [P(0, 0), P(0.5, 0)]
|
|
20151
20150
|
};
|
|
20152
20151
|
const PRIMITIVE_BLUEPRINTS_CACHE = (() => {
|
|
@@ -20159,8 +20158,8 @@ var TangramPrepPlugin = (function (jspsych) {
|
|
|
20159
20158
|
color: "#f43f5e"
|
|
20160
20159
|
},
|
|
20161
20160
|
{
|
|
20162
|
-
id: "prim:
|
|
20163
|
-
kind: "
|
|
20161
|
+
id: "prim:smalltriangle",
|
|
20162
|
+
kind: "smalltriangle",
|
|
20164
20163
|
sideLens: [HALFDIAGONAL, HALFDIAGONAL, HALFUNIT, HALFUNIT, HALFUNIT, HALFUNIT],
|
|
20165
20164
|
angles: [180, 45, 180, 90, 180, 45],
|
|
20166
20165
|
color: "#f59e0b"
|
|
@@ -20173,15 +20172,15 @@ var TangramPrepPlugin = (function (jspsych) {
|
|
|
20173
20172
|
color: "#10b981"
|
|
20174
20173
|
},
|
|
20175
20174
|
{
|
|
20176
|
-
id: "prim:
|
|
20177
|
-
kind: "
|
|
20175
|
+
id: "prim:medtriangle",
|
|
20176
|
+
kind: "medtriangle",
|
|
20178
20177
|
sideLens: [HALFUNIT, HALFUNIT, HALFUNIT, HALFUNIT, HALFDIAGONAL, HALFDIAGONAL, HALFDIAGONAL, HALFDIAGONAL],
|
|
20179
20178
|
angles: [180, 180, 180, 45, 180, 90, 180, 45],
|
|
20180
20179
|
color: "#3b82f6"
|
|
20181
20180
|
},
|
|
20182
20181
|
{
|
|
20183
|
-
id: "prim:
|
|
20184
|
-
kind: "
|
|
20182
|
+
id: "prim:largetriangle",
|
|
20183
|
+
kind: "largetriangle",
|
|
20185
20184
|
sideLens: [
|
|
20186
20185
|
HALFDIAGONAL,
|
|
20187
20186
|
HALFDIAGONAL,
|
|
@@ -20264,6 +20263,8 @@ var TangramPrepPlugin = (function (jspsych) {
|
|
|
20264
20263
|
} = params;
|
|
20265
20264
|
const prepSectors = Array.from({ length: numQuickstashSlots }, (_, i) => ({
|
|
20266
20265
|
id: `prep-sector-${i}`,
|
|
20266
|
+
tangramId: `prep-sector-${i}`,
|
|
20267
|
+
// dummy value since prep mode doesn't have tangrams
|
|
20267
20268
|
silhouette: {
|
|
20268
20269
|
id: `prep-silhouette-${i}`,
|
|
20269
20270
|
mask: []
|