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.
@@ -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.id
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
- "small-triangle": [P(0, 0), P(0.5, 0.5)],
20145
+ "smalltriangle": [P(0, 0), P(0.5, 0.5)],
20147
20146
  "parallelogram": [P(0, 0), P(0.5, 0)],
20148
- "large-triangle": [P(0, 0), P(0.5, -0.5)],
20149
- "med-triangle": [P(0, 0), P(0.5, 0)],
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:small",
20163
- kind: "small-triangle",
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:med",
20177
- kind: "med-triangle",
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:large",
20184
- kind: "large-triangle",
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: []