@m2c2kit/assessment-color-shapes 0.8.16 → 0.8.18

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAkBL,MAAM,eAAe,CAAC;AAUvB;;;;GAIG;AACH,cAAM,WAAY,SAAQ,IAAI;;IAsWb,UAAU;IAsmBzB,OAAO,CAAC,UAAU;CA+EnB;AAaD,OAAO,EAAE,WAAW,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Game, Sprite, Scene, WebColors, Transition, RandomDraws, Shape, Label, Action, Timer, TransitionDirection, Easings } from '@m2c2kit/core';
2
- import { Instructions, CountdownScene, Grid, Button } from '@m2c2kit/addons';
2
+ import { LocalePicker, Instructions, CountdownScene, Grid, Button } from '@m2c2kit/addons';
3
3
 
4
4
  class ColorShapes extends Game {
5
5
  constructor() {
@@ -72,22 +72,17 @@ class ColorShapes extends Game {
72
72
  type: "boolean",
73
73
  description: "After the final trial, should a completion scene be shown? Otherwise, the game will immediately end."
74
74
  },
75
- trials_complete_scene_text: {
76
- default: "You have completed all the color shapes trials",
77
- description: "Text for scene displayed after all trials are complete.",
78
- type: "string"
79
- },
80
- trials_complete_scene_button_text: {
81
- default: "OK",
82
- description: "Button text for scene displayed after all trials are complete.",
83
- type: "string"
84
- },
85
75
  instruction_type: {
86
76
  default: "long",
87
77
  description: "Type of instructions to show, 'short' or 'long'.",
88
78
  type: "string",
89
79
  enum: ["short", "long"]
90
80
  },
81
+ instructions: {
82
+ default: null,
83
+ type: ["object", "null"],
84
+ description: "When non-null, an InstructionsOptions object that will completely override the built-in instructions."
85
+ },
91
86
  show_quit_button: {
92
87
  type: "boolean",
93
88
  default: true,
@@ -97,6 +92,11 @@ class ColorShapes extends Game {
97
92
  type: "boolean",
98
93
  default: false,
99
94
  description: "Should the FPS be shown?"
95
+ },
96
+ show_locale_picker: {
97
+ type: "boolean",
98
+ default: false,
99
+ description: "Should the icon that allows the participant to switch the locale be shown?"
100
100
  }
101
101
  };
102
102
  const colorShapesTrialSchema = {
@@ -217,6 +217,46 @@ class ColorShapes extends Game {
217
217
  description: "Was the quit button pressed?"
218
218
  }
219
219
  };
220
+ const translation = {
221
+ configuration: {
222
+ baseLocale: "en-US"
223
+ },
224
+ "en-US": {
225
+ localeName: "English",
226
+ INSTRUCTIONS_TITLE: "Color Shapes",
227
+ SHORT_INSTRUCTIONS_TEXT_PAGE_1: "Try to remember the color of 3 shapes, because they will soon disappear. When the shapes reappear, answer whether they have the SAME or DIFFERENT colors as they had before",
228
+ INSTRUCTIONS_TEXT_PAGE_1: "Try to remember the color of 3 shapes, because they will soon disappear.",
229
+ INSTRUCTIONS_TEXT_PAGE_2: "Next you will see the same shapes reappear.",
230
+ INSTRUCTIONS_TEXT_PAGE_3: "Answer whether the shapes have the SAME or DIFFERENT colors as they had before.",
231
+ START_BUTTON_TEXT: "START",
232
+ NEXT_BUTTON_TEXT: "Next",
233
+ BACK_BUTTON_TEXT: "Back",
234
+ GET_READY_COUNTDOWN_TEXT: "GET READY!",
235
+ SAME_BUTTON_TEXT: "Same",
236
+ DIFFERENT_BUTTON_TEXT: "Different",
237
+ TRIALS_COMPLETE_SCENE_TEXT: "This activity is complete.",
238
+ TRIALS_COMPLETE_SCENE_BUTTON_TEXT: "OK"
239
+ },
240
+ // cSpell:disable (for VS Code extension, Code Spell Checker)
241
+ "de-DE": {
242
+ localeName: "Deutsch",
243
+ INSTRUCTIONS_TITLE: "Farb-Formen",
244
+ // Short instructions need to be translated.
245
+ // SHORT_INSTRUCTIONS_TEXT_PAGE_1: "",
246
+ INSTRUCTIONS_TEXT_PAGE_1: "Oben und unten sehen Sie Symbolpaare.",
247
+ INSTRUCTIONS_TEXT_PAGE_2: "Ihre Aufgabe wird es sein, auf dasjenige untere Paar zu tippen, welches mit einem der obigen Paare exakt \xFCbereinstimmt.",
248
+ INSTRUCTIONS_TEXT_PAGE_3: "Versuchen Sie bitte, so schnell und korrekt wie m\xF6glich zu sein.",
249
+ START_BUTTON_TEXT: "START",
250
+ NEXT_BUTTON_TEXT: "Weiter",
251
+ BACK_BUTTON_TEXT: "Vorherige",
252
+ GET_READY_COUNTDOWN_TEXT: "BEREIT MACHEN",
253
+ SAME_BUTTON_TEXT: "Gleich",
254
+ DIFFERENT_BUTTON_TEXT: "Unterschiedlich",
255
+ TRIALS_COMPLETE_SCENE_TEXT: "Die Aufgabe ist beendet.",
256
+ TRIALS_COMPLETE_SCENE_BUTTON_TEXT: "OK"
257
+ }
258
+ // cSpell:enable
259
+ };
220
260
  const options = {
221
261
  name: "Color Shapes",
222
262
  /**
@@ -224,8 +264,9 @@ class ColorShapes extends Game {
224
264
  */
225
265
  id: "color-shapes",
226
266
  publishUuid: "394cb010-2ccf-4a87-9d23-cda7fb07a960",
227
- version: "0.8.16 (b3a70752)",
228
- moduleMetadata: { "name": "@m2c2kit/assessment-color-shapes", "version": "0.8.16", "dependencies": { "@m2c2kit/addons": "^0.3.15", "@m2c2kit/core": "^0.3.18" } },
267
+ version: "0.8.18 (33cadc6d)",
268
+ moduleMetadata: { "name": "@m2c2kit/assessment-color-shapes", "version": "0.8.18", "dependencies": { "@m2c2kit/addons": "0.3.19", "@m2c2kit/core": "0.3.20" } },
269
+ translation,
229
270
  shortDescription: "Color Shapes is a visual array change detection task, measuring intra-item feature binding, where participants determine if shapes change color across two sequential presentations of shape stimuli.",
230
271
  longDescription: `Color Shapes is a change detection paradigm used to measure visual short-term memory binding (Parra et al., 2009). Participants are asked to memorize the shapes and colors of three different polygons for 3 seconds. The three polygons are then removed from the screen and re-displayed at different locations, either having the same or different colors. Participants are then asked to decide whether the combination of colors and shapes are the "Same" or "Different" between the study and test phases.`,
231
272
  showFps: defaultParameters.show_fps.default,
@@ -297,69 +338,86 @@ class ColorShapes extends Game {
297
338
  game.cancel();
298
339
  });
299
340
  }
341
+ let localePicker;
342
+ if (game.getParameter("show_locale_picker")) {
343
+ localePicker = new LocalePicker();
344
+ game.addFreeNode(localePicker);
345
+ }
300
346
  let instructionsScenes;
301
- switch (game.getParameter("instruction_type")) {
302
- case "short": {
303
- instructionsScenes = Instructions.create({
304
- instructionScenes: [
305
- {
306
- title: "Color Shapes",
307
- text: `Try to remember the color of ${numberOfShapesShown} shapes, because they will soon disappear. When the shapes reappear, answer whether they have the SAME or DIFFERENT colors as they had before.`,
308
- imageName: "instructions-1",
309
- imageAboveText: false,
310
- imageMarginTop: 32,
311
- textFontSize: 24,
312
- titleFontSize: 30,
313
- textVerticalBias: 0.2,
314
- nextButtonText: "START",
315
- nextButtonBackgroundColor: WebColors.Green,
316
- nextSceneTransition: Transition.none()
317
- }
318
- ]
319
- });
320
- break;
321
- }
322
- case "long": {
323
- instructionsScenes = Instructions.create({
324
- instructionScenes: [
325
- {
326
- title: "Color Shapes",
327
- text: `Try to remember the color of ${numberOfShapesShown} shapes, because they will soon disappear.`,
328
- imageName: "instructions-1",
329
- imageAboveText: false,
330
- imageMarginTop: 32,
331
- textFontSize: 24,
332
- titleFontSize: 30,
333
- textVerticalBias: 0.2
334
- },
335
- {
336
- title: "Color Shapes",
337
- text: "Next you will see the same shapes reappear.",
338
- imageName: "instructions-2",
339
- imageAboveText: false,
340
- imageMarginTop: 32,
341
- textFontSize: 24,
342
- titleFontSize: 30,
343
- textVerticalBias: 0.2
344
- },
345
- {
346
- title: "Color Shapes",
347
- text: "Answer whether the shapes have the SAME or DIFFERENT colors as they had before.",
348
- imageName: "instructions-3",
349
- imageAboveText: false,
350
- imageMarginTop: 32,
351
- textFontSize: 24,
352
- titleFontSize: 30,
353
- textVerticalBias: 0.2,
354
- nextButtonText: "START",
355
- nextButtonBackgroundColor: WebColors.Green
356
- }
357
- ]
358
- });
359
- break;
360
- }
361
- default: {
362
- throw new Error("invalid value for instruction_type");
347
+ const customInstructions = game.getParameter(
348
+ "instructions"
349
+ );
350
+ if (customInstructions) {
351
+ instructionsScenes = Instructions.create(customInstructions);
352
+ } else {
353
+ switch (game.getParameter("instruction_type")) {
354
+ case "short": {
355
+ instructionsScenes = Instructions.create({
356
+ instructionScenes: [
357
+ {
358
+ title: "INSTRUCTIONS_TITLE",
359
+ text: "SHORT_INSTRUCTIONS_TEXT_PAGE_1",
360
+ imageName: "instructions-1",
361
+ imageAboveText: false,
362
+ imageMarginTop: 32,
363
+ textFontSize: 24,
364
+ titleFontSize: 30,
365
+ textVerticalBias: 0.2,
366
+ nextButtonText: "START_BUTTON_TEXT",
367
+ nextButtonBackgroundColor: WebColors.Green,
368
+ nextSceneTransition: Transition.none()
369
+ }
370
+ ]
371
+ });
372
+ break;
373
+ }
374
+ case "long": {
375
+ instructionsScenes = Instructions.create({
376
+ instructionScenes: [
377
+ {
378
+ title: "INSTRUCTIONS_TITLE",
379
+ text: "INSTRUCTIONS_TEXT_PAGE_1",
380
+ imageName: "instructions-1",
381
+ imageAboveText: false,
382
+ imageMarginTop: 32,
383
+ textFontSize: 24,
384
+ titleFontSize: 30,
385
+ textVerticalBias: 0.2,
386
+ nextButtonText: "NEXT_BUTTON_TEXT",
387
+ backButtonText: "BACK_BUTTON_TEXT"
388
+ },
389
+ {
390
+ title: "INSTRUCTIONS_TITLE",
391
+ text: "INSTRUCTIONS_TEXT_PAGE_2",
392
+ imageName: "instructions-2",
393
+ imageAboveText: false,
394
+ imageMarginTop: 32,
395
+ textFontSize: 24,
396
+ titleFontSize: 30,
397
+ textVerticalBias: 0.2,
398
+ nextButtonText: "NEXT_BUTTON_TEXT",
399
+ backButtonText: "BACK_BUTTON_TEXT"
400
+ },
401
+ {
402
+ title: "INSTRUCTIONS_TITLE",
403
+ text: "INSTRUCTIONS_TEXT_PAGE_3",
404
+ imageName: "instructions-3",
405
+ imageAboveText: false,
406
+ imageMarginTop: 32,
407
+ textFontSize: 24,
408
+ titleFontSize: 30,
409
+ textVerticalBias: 0.2,
410
+ nextButtonText: "START_BUTTON_TEXT",
411
+ nextButtonBackgroundColor: WebColors.Green,
412
+ backButtonText: "BACK_BUTTON_TEXT"
413
+ }
414
+ ]
415
+ });
416
+ break;
417
+ }
418
+ default: {
419
+ throw new Error("invalid value for instruction_type");
420
+ }
363
421
  }
364
422
  }
365
423
  instructionsScenes[0].onAppear(() => {
@@ -371,7 +429,7 @@ class ColorShapes extends Game {
371
429
  game.addScenes(instructionsScenes);
372
430
  const countdownScene = new CountdownScene({
373
431
  milliseconds: 3e3,
374
- text: "GET READY!",
432
+ text: "GET_READY_COUNTDOWN_TEXT",
375
433
  zeroDwellMilliseconds: 1e3,
376
434
  transition: Transition.none()
377
435
  });
@@ -516,7 +574,8 @@ class ColorShapes extends Game {
516
574
  const plusLabel = new Label({
517
575
  text: "+",
518
576
  fontSize: 32,
519
- fontColor: WebColors.Black
577
+ fontColor: WebColors.Black,
578
+ localize: false
520
579
  });
521
580
  fixationSceneSquare.addChild(plusLabel);
522
581
  fixationScene.onAppear(() => {
@@ -577,7 +636,7 @@ class ColorShapes extends Game {
577
636
  }),
578
637
  Action.custom({
579
638
  callback: () => {
580
- presentationGrid.removeAllChildren();
639
+ presentationGrid.removeAllGridChildren();
581
640
  }
582
641
  }),
583
642
  Action.wait({
@@ -585,7 +644,7 @@ class ColorShapes extends Game {
585
644
  }),
586
645
  Action.custom({
587
646
  callback: () => {
588
- presentationGrid.removeAllChildren();
647
+ presentationGrid.removeAllGridChildren();
589
648
  game.presentScene(shapeResponseScene);
590
649
  }
591
650
  })
@@ -628,9 +687,9 @@ class ColorShapes extends Game {
628
687
  Timer.startNew("rt");
629
688
  });
630
689
  const sameButton = new Button({
631
- text: "Same",
690
+ text: "SAME_BUTTON_TEXT",
632
691
  position: { x: 100, y: 700 },
633
- size: { width: 125, height: 50 }
692
+ size: { width: 150, height: 50 }
634
693
  });
635
694
  shapeResponseScene.addChild(sameButton);
636
695
  sameButton.onTapDown(() => {
@@ -638,9 +697,9 @@ class ColorShapes extends Game {
638
697
  handleSelection(false);
639
698
  });
640
699
  const differentButton = new Button({
641
- text: "Different",
700
+ text: "DIFFERENT_BUTTON_TEXT",
642
701
  position: { x: 300, y: 700 },
643
- size: { width: 125, height: 50 }
702
+ size: { width: 150, height: 50 }
644
703
  });
645
704
  shapeResponseScene.addChild(differentButton);
646
705
  differentButton.onTapDown(() => {
@@ -650,7 +709,7 @@ class ColorShapes extends Game {
650
709
  const handleSelection = (differentPressed) => {
651
710
  const rt = Timer.elapsed("rt");
652
711
  Timer.remove("rt");
653
- responseGrid.removeAllChildren();
712
+ responseGrid.removeAllGridChildren();
654
713
  game.addTrialData(
655
714
  "trial_end_iso8601_timestamp",
656
715
  (/* @__PURE__ */ new Date()).toISOString()
@@ -704,12 +763,12 @@ class ColorShapes extends Game {
704
763
  const doneScene = new Scene();
705
764
  game.addScene(doneScene);
706
765
  const doneSceneText = new Label({
707
- text: game.getParameter("trials_complete_scene_text"),
766
+ text: "TRIALS_COMPLETE_SCENE_TEXT",
708
767
  position: { x: 200, y: 400 }
709
768
  });
710
769
  doneScene.addChild(doneSceneText);
711
770
  const okButton = new Button({
712
- text: game.getParameter("trials_complete_scene_button_text"),
771
+ text: "TRIALS_COMPLETE_SCENE_BUTTON_TEXT",
713
772
  position: { x: 200, y: 650 }
714
773
  });
715
774
  okButton.isUserInteractionEnabled = true;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import {\n Game,\n Action,\n Scene,\n Shape,\n Label,\n Transition,\n TransitionDirection,\n WebColors,\n RandomDraws,\n GameParameters,\n GameOptions,\n TrialSchema,\n Timer,\n Easings,\n RgbaColor,\n Sprite,\n Constants,\n} from \"@m2c2kit/core\";\nimport { Button, Grid, Instructions, CountdownScene } from \"@m2c2kit/addons\";\n\n/**\n * Color Shapes is a visual array change detection task, measuring intra-item\n * feature binding, where participants determine if shapes change color across\n * two sequential presentations of shape stimuli.\n */\nclass ColorShapes extends Game {\n constructor() {\n /**\n * These are configurable game parameters and their defaults.\n * Each game parameter should have a type, default (this is the default\n * value), and a description.\n */\n const defaultParameters: GameParameters = {\n fixation_duration_ms: {\n default: 500,\n description: \"How long fixation scene is shown, milliseconds.\",\n type: \"number\",\n },\n shape_colors: {\n type: \"array\",\n description: \"Array of colors for shapes.\",\n items: {\n type: \"object\",\n properties: {\n colorName: {\n type: \"string\",\n description: \"Human-friendly name of color.\",\n },\n rgbaColor: {\n type: \"array\",\n description: \"Color as array, [r,g,b,a].\",\n items: {\n type: \"number\",\n },\n },\n },\n },\n default: [\n { colorName: \"black\", rgbaColor: [0, 0, 0, 1] },\n { colorName: \"green\", rgbaColor: [0, 158, 115, 1] },\n { colorName: \"yellow\", rgbaColor: [240, 228, 66, 1] },\n { colorName: \"blue\", rgbaColor: [0, 114, 178, 1] },\n { colorName: \"orange\", rgbaColor: [213, 94, 0, 1] },\n { colorName: \"pink\", rgbaColor: [204, 121, 167, 1] },\n ],\n },\n number_of_shapes_shown: {\n default: 3,\n description: \"How many shapes to show on the grid at one time.\",\n type: \"integer\",\n },\n shapes_presented_duration_ms: {\n default: 2000,\n description: \"How long the shapes are shown, milliseconds.\",\n type: \"number\",\n },\n shapes_removed_duration_ms: {\n default: 1000,\n description:\n \"How long to show a blank square after shapes are removed, milliseconds.\",\n type: \"number\",\n },\n cells_per_side: {\n default: 3,\n description:\n \"How many cell positions for each side of the square grid (e.g., 3 is a 3x3 grid; 4 is a 4x4 grid).\",\n type: \"integer\",\n },\n number_of_different_colors_trials: {\n default: 2,\n type: \"integer\",\n description:\n \"Number of trials where the shapes have different colors. If shapes have different colors in a trial, anywhere from 2 to (number of shapes) will be given different colors.\",\n },\n number_of_trials: {\n default: 4,\n description: \"How many trials to run.\",\n type: \"integer\",\n },\n show_trials_complete_scene: {\n default: true,\n type: \"boolean\",\n description:\n \"After the final trial, should a completion scene be shown? Otherwise, the game will immediately end.\",\n },\n trials_complete_scene_text: {\n default: \"You have completed all the color shapes trials\",\n description: \"Text for scene displayed after all trials are complete.\",\n type: \"string\",\n },\n trials_complete_scene_button_text: {\n default: \"OK\",\n description:\n \"Button text for scene displayed after all trials are complete.\",\n type: \"string\",\n },\n instruction_type: {\n default: \"long\",\n description: \"Type of instructions to show, 'short' or 'long'.\",\n type: \"string\",\n enum: [\"short\", \"long\"],\n },\n show_quit_button: {\n type: \"boolean\",\n default: true,\n description: \"Should the activity quit button be shown?\",\n },\n show_fps: {\n type: \"boolean\",\n default: false,\n description: \"Should the FPS be shown?\",\n },\n };\n\n /**\n * This describes all the data that will be generated by the assessment.\n * At runtime, when a trial completes, the data will be returned to the\n * session with a callback, along with this schema transformed into\n * JSON Schema.\n */\n const colorShapesTrialSchema: TrialSchema = {\n activity_begin_iso8601_timestamp: {\n type: \"string\",\n format: \"date-time\",\n description:\n \"ISO 8601 timestamp at the beginning of the game activity.\",\n },\n trial_begin_iso8601_timestamp: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n description:\n \"ISO 8601 timestamp at the beginning of the trial. Null if trial was skipped.\",\n },\n trial_end_iso8601_timestamp: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n description:\n \"ISO 8601 timestamp at the end of the trial (when user presses 'Same' or 'Different'). Null if trial was skipped.\",\n },\n trial_index: {\n type: [\"integer\", \"null\"],\n description: \"Index of the trial within this assessment, 0-based.\",\n },\n present_shapes: {\n description:\n \"Configuration of shapes shown to the user in the presentation phase. Null if trial was skipped.\",\n type: [\"array\", \"null\"],\n items: {\n type: \"object\",\n properties: {\n shape_index: {\n type: \"integer\",\n description:\n \"Index of the shape within the library of shapes, 0-based\",\n },\n color_name: {\n type: \"string\",\n description: \"Human-friendly name of color.\",\n },\n rgba_color: {\n type: \"array\",\n description: \"Color as array, [r,g,b,a].\",\n items: {\n type: \"number\",\n },\n },\n location: {\n type: \"object\",\n description: \"Location of shape.\",\n properties: {\n row: {\n type: \"number\",\n description: \"Row of the shape, 0-based.\",\n },\n column: {\n type: \"number\",\n description: \"Column of the shape, 0-based.\",\n },\n },\n },\n },\n },\n },\n response_shapes: {\n description:\n \"Configuration of shapes shown to the user in the response phase. Null if trial was skipped.\",\n type: [\"array\", \"null\"],\n items: {\n type: \"object\",\n properties: {\n shape_index: {\n type: \"integer\",\n description:\n \"Index of the shape within the library of shapes, 0-based\",\n },\n color_name: {\n type: \"string\",\n description: \"Human-friendly name of color.\",\n },\n rgba_color: {\n type: \"array\",\n description: \"Color as array, [r,g,b,a].\",\n items: {\n type: \"number\",\n },\n },\n location: {\n type: \"object\",\n description: \"Location of shape.\",\n properties: {\n row: {\n type: \"number\",\n description: \"Row of the shape, 0-based.\",\n },\n column: {\n type: \"number\",\n description: \"Column of the shape, 0-based.\",\n },\n },\n },\n },\n },\n },\n number_of_different_shapes: {\n type: [\"integer\", \"null\"],\n description:\n \"Number of shapes shown with different colors in the response phase.\",\n },\n response_time_duration_ms: {\n type: [\"number\", \"null\"],\n description:\n \"Milliseconds from when the response configuration of shapes is shown until the user taps a response. Null if trial was skipped.\",\n },\n user_response: {\n type: [\"string\", \"null\"],\n enum: [\"same\", \"different\"],\n description:\n \"User's response to whether the shapes are same colors or different.\",\n },\n user_response_correct: {\n type: [\"boolean\", \"null\"],\n description: \"Was the user's response correct?\",\n },\n quit_button_pressed: {\n type: \"boolean\",\n description: \"Was the quit button pressed?\",\n },\n };\n\n const options: GameOptions = {\n name: \"Color Shapes\",\n /**\n * This id must match the property m2c2kit.assessmentId in package.json\n */\n id: \"color-shapes\",\n publishUuid: \"394cb010-2ccf-4a87-9d23-cda7fb07a960\",\n version: \"__PACKAGE_JSON_VERSION__\",\n moduleMetadata: Constants.MODULE_METADATA_PLACEHOLDER,\n shortDescription:\n \"Color Shapes is a visual array change detection \\\ntask, measuring intra-item feature binding, where participants determine \\\nif shapes change color across two sequential presentations of shape \\\nstimuli.\",\n longDescription: `Color Shapes is a change detection paradigm used \\\nto measure visual short-term memory binding (Parra et al., 2009). \\\nParticipants are asked to memorize the shapes and colors of three different \\\npolygons for 3 seconds. The three polygons are then removed from the screen \\\nand re-displayed at different locations, either having the same or different \\\ncolors. Participants are then asked to decide whether the combination of \\\ncolors and shapes are the \"Same\" or \"Different\" between the study and test \\\nphases.`,\n showFps: defaultParameters.show_fps.default,\n width: 400,\n height: 800,\n trialSchema: colorShapesTrialSchema,\n parameters: defaultParameters,\n fonts: [\n {\n fontName: \"roboto\",\n url: \"fonts/roboto/Roboto-Regular.ttf\",\n },\n ],\n images: [\n {\n imageName: \"instructions-1\",\n height: 256,\n width: 256,\n url: \"images/cs-instructions-1.png\",\n },\n {\n imageName: \"instructions-2\",\n height: 256,\n width: 256,\n url: \"images/cs-instructions-2.png\",\n },\n {\n imageName: \"instructions-3\",\n height: 330,\n width: 256,\n url: \"images/cs-instructions-3.png\",\n },\n {\n imageName: \"circle-x\",\n height: 32,\n width: 32,\n // the svg is from evericons and is licensed under CC0 1.0\n // Universal (Public Domain). see https://www.patreon.com/evericons\n url: \"images/circle-x.svg\",\n },\n ],\n };\n\n super(options);\n }\n\n override async initialize() {\n await super.initialize();\n // just for convenience, alias the variable game to \"this\"\n // (even though eslint doesn't like it)\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const game = this;\n\n const SHAPE_SVG_HEIGHT = 96;\n const SQUARE_SIDE_LENGTH = 350;\n const numberOfShapesShown = game.getParameter<number>(\n \"number_of_shapes_shown\",\n );\n const shapeLibrary = this.makeShapes(SHAPE_SVG_HEIGHT);\n\n // ==============================================================\n\n if (game.getParameter<boolean>(\"show_quit_button\")) {\n const quitSprite = new Sprite({\n imageName: \"circle-x\",\n position: { x: 380, y: 20 },\n isUserInteractionEnabled: true,\n });\n game.addFreeNode(quitSprite);\n quitSprite.onTapDown((e) => {\n game.removeAllFreeNodes();\n e.handled = true;\n const blankScene = new Scene();\n game.addScene(blankScene);\n game.presentScene(blankScene);\n game.addTrialData(\"quit_button_pressed\", true);\n game.trialComplete();\n game.cancel();\n });\n }\n\n // ==============================================================\n // SCENES: instructions\n let instructionsScenes: Array<Scene>;\n\n switch (game.getParameter(\"instruction_type\")) {\n case \"short\": {\n instructionsScenes = Instructions.create({\n instructionScenes: [\n {\n title: \"Color Shapes\",\n text: `Try to remember the color of ${numberOfShapesShown} shapes, because they will soon disappear. When the shapes reappear, answer whether they have the SAME or DIFFERENT colors as they had before.`,\n imageName: \"instructions-1\",\n imageAboveText: false,\n imageMarginTop: 32,\n textFontSize: 24,\n titleFontSize: 30,\n textVerticalBias: 0.2,\n nextButtonText: \"START\",\n nextButtonBackgroundColor: WebColors.Green,\n nextSceneTransition: Transition.none(),\n },\n ],\n });\n break;\n }\n case \"long\": {\n instructionsScenes = Instructions.create({\n instructionScenes: [\n {\n title: \"Color Shapes\",\n text: `Try to remember the color of ${numberOfShapesShown} shapes, because they will soon disappear.`,\n imageName: \"instructions-1\",\n imageAboveText: false,\n imageMarginTop: 32,\n textFontSize: 24,\n titleFontSize: 30,\n textVerticalBias: 0.2,\n },\n {\n title: \"Color Shapes\",\n text: \"Next you will see the same shapes reappear.\",\n imageName: \"instructions-2\",\n imageAboveText: false,\n imageMarginTop: 32,\n textFontSize: 24,\n titleFontSize: 30,\n textVerticalBias: 0.2,\n },\n {\n title: \"Color Shapes\",\n text: \"Answer whether the shapes have the SAME or DIFFERENT colors as they had before.\",\n imageName: \"instructions-3\",\n imageAboveText: false,\n imageMarginTop: 32,\n textFontSize: 24,\n titleFontSize: 30,\n textVerticalBias: 0.2,\n nextButtonText: \"START\",\n nextButtonBackgroundColor: WebColors.Green,\n },\n ],\n });\n break;\n }\n default: {\n throw new Error(\"invalid value for instruction_type\");\n }\n }\n instructionsScenes[0].onAppear(() => {\n // in case user quits before starting a trial, record the\n // timestamp\n game.addTrialData(\n \"activity_begin_iso8601_timestamp\",\n this.beginIso8601Timestamp,\n );\n });\n game.addScenes(instructionsScenes);\n\n // ==============================================================\n // SCENE: countdown. Show 3 second countdown.\n const countdownScene = new CountdownScene({\n milliseconds: 3000,\n text: \"GET READY!\",\n zeroDwellMilliseconds: 1000,\n transition: Transition.none(),\n });\n game.addScene(countdownScene);\n\n const gridRows = game.getParameter<number>(\"cells_per_side\");\n const gridColumns = game.getParameter<number>(\"cells_per_side\");\n const numberOfTrials = game.getParameter<number>(\"number_of_trials\");\n const shapeColors =\n game.getParameter<Array<{ colorName: string; rgbaColor: RgbaColor }>>(\n \"shape_colors\",\n );\n\n interface DisplayShape {\n shape: Shape;\n shapeIndex: number;\n color: RgbaColor;\n colorName: string;\n location: {\n row: number;\n column: number;\n };\n }\n\n interface TrialConfiguration {\n presentShapes: Array<DisplayShape>;\n responseShapes: Array<DisplayShape>;\n numberOfShapesWithDifferentColors: number;\n }\n\n const trialConfigurations: Array<TrialConfiguration> = [];\n const rows = game.getParameter<number>(\"cells_per_side\");\n const columns = rows;\n const numberOfDifferentColorsTrials = game.getParameter<number>(\n \"number_of_different_colors_trials\",\n );\n const differentColorsTrialIndexes = RandomDraws.FromRangeWithoutReplacement(\n numberOfDifferentColorsTrials,\n 0,\n numberOfTrials - 1,\n );\n\n for (let i = 0; i < numberOfTrials; i++) {\n const presentShapes = new Array<DisplayShape>();\n const responseShapes = new Array<DisplayShape>();\n const shapesToShowIndexes = RandomDraws.FromRangeWithoutReplacement(\n numberOfShapesShown,\n 0,\n shapeLibrary.length - 1,\n );\n const shapeColorsIndexes = RandomDraws.FromRangeWithoutReplacement(\n numberOfShapesShown,\n 0,\n shapeColors.length - 1,\n );\n\n // do not allow shapes to be in the same row or column\n // or along the diagonal\n const onDiagonal = (\n locations: {\n row: number;\n column: number;\n }[],\n ): boolean => {\n if (\n locations\n .map((c) => c.row === 0 && c.column === 0)\n .some((e) => e === true) &&\n locations\n .map((c) => c.row === 1 && c.column === 1)\n .some((e) => e === true) &&\n locations\n .map((c) => c.row === 2 && c.column === 2)\n .some((e) => e === true)\n ) {\n return true;\n }\n if (\n locations\n .map((c) => c.row === 2 && c.column === 0)\n .some((e) => e === true) &&\n locations\n .map((c) => c.row === 1 && c.column === 1)\n .some((e) => e === true) &&\n locations\n .map((c) => c.row === 0 && c.column === 2)\n .some((e) => e === true)\n ) {\n return true;\n }\n return false;\n };\n\n const inLine = (\n locations: {\n row: number;\n column: number;\n }[],\n ): boolean => {\n const uniqueRows = new Set(locations.map((l) => l.row)).size;\n const uniqueColumns = new Set(locations.map((l) => l.column)).size;\n\n if (uniqueRows !== 1 && uniqueColumns !== 1) {\n return false;\n }\n return true;\n };\n\n // assign present shapes' locations and colors\n let presentLocationsOk = false;\n let presentLocations: {\n row: number;\n column: number;\n }[];\n do {\n presentLocations = RandomDraws.FromGridWithoutReplacement(\n numberOfShapesShown,\n rows,\n columns,\n );\n\n if (!inLine(presentLocations) && !onDiagonal(presentLocations)) {\n presentLocationsOk = true;\n } else {\n presentLocationsOk = false;\n }\n } while (!presentLocationsOk);\n for (let j = 0; j < numberOfShapesShown; j++) {\n const presentShape: DisplayShape = {\n shape: shapeLibrary[shapesToShowIndexes[j]],\n shapeIndex: shapesToShowIndexes[j],\n color: shapeColors[shapeColorsIndexes[j]].rgbaColor,\n colorName: shapeColors[shapeColorsIndexes[j]].colorName,\n location: presentLocations[j],\n };\n presentShapes.push(presentShape);\n }\n\n // assign response shapes' locations\n let responseLocationsOk = false;\n let responseLocations: {\n row: number;\n column: number;\n }[];\n do {\n responseLocations = RandomDraws.FromGridWithoutReplacement(\n numberOfShapesShown,\n rows,\n columns,\n );\n\n if (!inLine(responseLocations) && !onDiagonal(responseLocations)) {\n responseLocationsOk = true;\n } else {\n responseLocationsOk = false;\n }\n } while (!responseLocationsOk);\n for (let j = 0; j < numberOfShapesShown; j++) {\n const responseShape: DisplayShape = {\n shape: presentShapes[j].shape,\n shapeIndex: shapesToShowIndexes[j],\n color: presentShapes[j].color,\n colorName: shapeColors[shapeColorsIndexes[j]].colorName,\n location: responseLocations[j],\n };\n responseShapes.push(responseShape);\n }\n\n let numberOfShapesWithDifferentColors = 0;\n const differentColorTrial = differentColorsTrialIndexes.includes(i);\n\n if (differentColorTrial) {\n const numberOfShapesToChange = RandomDraws.SingleFromRange(\n 2,\n numberOfShapesShown,\n );\n const shapesToChangeIndexes = RandomDraws.FromRangeWithoutReplacement(\n numberOfShapesToChange,\n 0,\n numberOfShapesShown - 1,\n );\n const shapesToChange = shapesToChangeIndexes.map(\n (index) => responseShapes[index],\n );\n numberOfShapesWithDifferentColors = shapesToChange.length;\n\n /**\n * rotate each shape's color to the next one. The last shape\n * gets the first shape's color\n */\n const firstShapeColor = shapesToChange[0].color;\n for (let j = 0; j < numberOfShapesToChange; j++) {\n const shape = shapesToChange[j];\n if (j + 1 < numberOfShapesToChange) {\n shape.color = shapesToChange[j + 1].color;\n } else {\n shape.color = firstShapeColor;\n }\n }\n }\n\n trialConfigurations.push({\n presentShapes: presentShapes,\n responseShapes: responseShapes,\n numberOfShapesWithDifferentColors: numberOfShapesWithDifferentColors,\n });\n }\n\n // ==============================================================\n // SCENE: fixation. Show get ready message, then advance after XXXX\n // milliseconds (as defined in fixation_duration_ms parameter)\n const fixationScene = new Scene();\n game.addScene(fixationScene);\n\n const fixationSceneSquare = new Shape({\n rect: { size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH } },\n fillColor: WebColors.Transparent,\n strokeColor: WebColors.Gray,\n lineWidth: 4,\n position: { x: 200, y: 300 },\n });\n fixationScene.addChild(fixationSceneSquare);\n\n const plusLabel = new Label({\n text: \"+\",\n fontSize: 32,\n fontColor: WebColors.Black,\n });\n fixationSceneSquare.addChild(plusLabel);\n\n fixationScene.onAppear(() => {\n game.addTrialData(\n \"activity_begin_iso8601_timestamp\",\n this.beginIso8601Timestamp,\n );\n game.addTrialData(\n \"trial_begin_iso8601_timestamp\",\n new Date().toISOString(),\n );\n fixationScene.run(\n Action.sequence([\n Action.wait({ duration: game.getParameter(\"fixation_duration_ms\") }),\n Action.custom({\n callback: () => {\n game.presentScene(shapePresentationScene);\n },\n }),\n ]),\n );\n });\n\n // ==============================================================\n // SCENE: Shape Presentation.\n const shapePresentationScene = new Scene();\n game.addScene(shapePresentationScene);\n\n const presentationSceneSquare = new Shape({\n rect: { size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH } },\n fillColor: WebColors.Transparent,\n strokeColor: WebColors.Gray,\n lineWidth: 4,\n position: { x: 200, y: 300 },\n });\n shapePresentationScene.addChild(presentationSceneSquare);\n\n const presentationGrid = new Grid({\n rows: gridRows,\n columns: gridColumns,\n size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH },\n position: { x: 200, y: 300 },\n backgroundColor: WebColors.Transparent,\n gridLineColor: WebColors.Transparent,\n });\n shapePresentationScene.addChild(presentationGrid);\n\n shapePresentationScene.onAppear(() => {\n const trialConfiguration = trialConfigurations[game.trialIndex];\n for (let i = 0; i < trialConfiguration.presentShapes.length; i++) {\n const presentShape = trialConfiguration.presentShapes[i].shape;\n presentShape.fillColor = trialConfiguration.presentShapes[i].color;\n /**\n * Because we are repositioning children of a grid, we need to\n * set its position back to zero, because in the grid, it recalculates\n * the position. If we don't do this, the shapes will be positioned\n * incorrectly if they are positioned a second time.\n */\n presentShape.position = { x: 0, y: 0 };\n presentationGrid.addAtCell(\n presentShape,\n trialConfiguration.presentShapes[i].location.row,\n trialConfiguration.presentShapes[i].location.column,\n );\n }\n shapePresentationScene.run(\n Action.sequence([\n Action.wait({\n duration: game.getParameter(\"shapes_presented_duration_ms\"),\n }),\n Action.custom({\n callback: () => {\n presentationGrid.removeAllChildren();\n },\n }),\n Action.wait({\n duration: game.getParameter(\"shapes_removed_duration_ms\"),\n }),\n Action.custom({\n callback: () => {\n presentationGrid.removeAllChildren();\n game.presentScene(shapeResponseScene);\n },\n }),\n ]),\n );\n });\n\n // ==============================================================\n // SCENE: Shape Response.\n const shapeResponseScene = new Scene();\n game.addScene(shapeResponseScene);\n\n const responseSceneSquare = new Shape({\n rect: { size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH } },\n fillColor: WebColors.Transparent,\n strokeColor: WebColors.Gray,\n lineWidth: 4,\n position: { x: 200, y: 300 },\n });\n shapeResponseScene.addChild(responseSceneSquare);\n\n const responseGrid = new Grid({\n rows: gridRows,\n columns: gridColumns,\n size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH },\n position: { x: 200, y: 300 },\n backgroundColor: WebColors.Transparent,\n gridLineColor: WebColors.Transparent,\n });\n shapeResponseScene.addChild(responseGrid);\n\n shapeResponseScene.onAppear(() => {\n const trialConfiguration = trialConfigurations[game.trialIndex];\n for (let i = 0; i < trialConfiguration.responseShapes.length; i++) {\n const responseShape = trialConfiguration.responseShapes[i].shape;\n responseShape.fillColor = trialConfiguration.responseShapes[i].color;\n /**\n * Because we are repositioning children of a grid, we need to\n * set its position back to zero, because in the grid, it recalculates\n * the position. If we don't do this, the shapes will be positioned\n * incorrectly if they are positioned a second time.\n */\n responseShape.position = { x: 0, y: 0 };\n responseGrid.addAtCell(\n responseShape,\n trialConfiguration.responseShapes[i].location.row,\n trialConfiguration.responseShapes[i].location.column,\n );\n }\n sameButton.isUserInteractionEnabled = true;\n differentButton.isUserInteractionEnabled = true;\n Timer.startNew(\"rt\");\n });\n\n const sameButton = new Button({\n text: \"Same\",\n position: { x: 100, y: 700 },\n size: { width: 125, height: 50 },\n });\n shapeResponseScene.addChild(sameButton);\n sameButton.onTapDown(() => {\n sameButton.isUserInteractionEnabled = false;\n handleSelection(false);\n });\n\n const differentButton = new Button({\n text: \"Different\",\n position: { x: 300, y: 700 },\n size: { width: 125, height: 50 },\n });\n shapeResponseScene.addChild(differentButton);\n differentButton.onTapDown(() => {\n differentButton.isUserInteractionEnabled = false;\n handleSelection(true);\n });\n\n const handleSelection = (differentPressed: boolean) => {\n const rt = Timer.elapsed(\"rt\");\n Timer.remove(\"rt\");\n responseGrid.removeAllChildren();\n\n game.addTrialData(\n \"trial_end_iso8601_timestamp\",\n new Date().toISOString(),\n );\n const trialConfiguration = trialConfigurations[game.trialIndex];\n game.addTrialData(\"response_time_duration_ms\", rt);\n game.addTrialData(\n \"number_of_different_shapes\",\n trialConfiguration.numberOfShapesWithDifferentColors,\n );\n game.addTrialData(\n \"user_response\",\n differentPressed ? \"different\" : \"same\",\n );\n const correctResponse =\n (trialConfiguration.numberOfShapesWithDifferentColors === 0 &&\n !differentPressed) ||\n (trialConfiguration.numberOfShapesWithDifferentColors > 0 &&\n differentPressed);\n game.addTrialData(\"user_response_correct\", correctResponse);\n\n const presentShapes = trialConfiguration.presentShapes.map((p) => {\n return {\n shape_index: p.shapeIndex,\n color_name: p.colorName,\n rgba_color: p.color,\n location: p.location,\n };\n });\n game.addTrialData(\"present_shapes\", presentShapes);\n game.addTrialData(\"quit_button_pressed\", false);\n\n const responseShapes = trialConfiguration.responseShapes.map((p) => {\n return {\n shape_index: p.shapeIndex,\n color_name: p.colorName,\n rgba_color: p.color,\n location: p.location,\n };\n });\n game.addTrialData(\"response_shapes\", responseShapes);\n game.addTrialData(\"trial_index\", game.trialIndex);\n\n game.trialComplete();\n if (game.trialIndex < numberOfTrials) {\n game.presentScene(fixationScene);\n } else {\n game.presentScene(\n doneScene,\n Transition.slide({\n direction: TransitionDirection.Left,\n duration: 500,\n easing: Easings.sinusoidalInOut,\n }),\n );\n }\n };\n\n // ==============================================================\n // SCENE: done. Show done message, with a button to exit.\n const doneScene = new Scene();\n game.addScene(doneScene);\n\n const doneSceneText = new Label({\n text: game.getParameter(\"trials_complete_scene_text\"),\n position: { x: 200, y: 400 },\n });\n doneScene.addChild(doneSceneText);\n\n const okButton = new Button({\n text: game.getParameter(\"trials_complete_scene_button_text\"),\n position: { x: 200, y: 650 },\n });\n okButton.isUserInteractionEnabled = true;\n okButton.onTapDown(() => {\n // don't allow repeat taps of ok button\n okButton.isUserInteractionEnabled = false;\n doneScene.removeAllChildren();\n game.end();\n });\n doneScene.addChild(okButton);\n doneScene.onSetup(() => {\n // no need to have cancel button, because we're done\n game.removeAllFreeNodes();\n });\n }\n\n private makeShapes(svgHeight: number) {\n const shape01 = new Shape({\n path: {\n pathString: shapePathStrings[0],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n const shape02 = new Shape({\n path: {\n pathString: shapePathStrings[1],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n // note: shape03 is purposively smaller (.8 height of other shapes)\n const shape03 = new Shape({\n path: {\n pathString: shapePathStrings[2],\n height: svgHeight * 0.8,\n },\n lineWidth: 0,\n });\n\n const shape04 = new Shape({\n path: {\n pathString: shapePathStrings[3],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n // note: shape05 is purposively smaller (.8 height of other shapes)\n const shape05 = new Shape({\n path: {\n pathString: shapePathStrings[4],\n height: svgHeight * 0.8,\n },\n lineWidth: 0,\n });\n\n const shape06 = new Shape({\n path: {\n pathString: shapePathStrings[5],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n const shape07 = new Shape({\n path: {\n pathString: shapePathStrings[6],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n const shape08 = new Shape({\n path: {\n pathString: shapePathStrings[7],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n const shapes = [\n shape01,\n shape02,\n shape03,\n shape04,\n shape05,\n shape06,\n shape07,\n shape08,\n ];\n return shapes;\n }\n}\n\nconst shapePathStrings = [\n \"M0 89.94v-2L131.95 0h2v88.7c2.34 1.6 4.47 3.11 6.65 4.55 42.77 28.22 85.54 56.42 128.3 84.63v2c-44.65 29.65-89.3 59.29-133.95 88.94h-1v-90.84C89.44 148.72 44.72 119.33 0 89.94Z\",\n \"M162 188c-.33 27-.67 54-1 81-26.87-26.18-53.74-52.35-80-77.94V269H0C0 180.83 0 92.67.04 4.5.04 3 .67 1.5 1 0c24.64 29.1 49.15 58.31 73.96 87.26 28.88 33.7 58.01 67.17 87.04 100.74Z\",\n \"M3 148.86V61.12C41.76 40.75 80.52 20.37 119.28 0h2.91c21.32 20.7 42.64 41.4 63.96 62.11v89.71c-38.44 20.04-76.88 40.09-115.31 60.13h-2.91L3.01 148.86Z\",\n \"M134 0h2c7.26 22.31 14.38 44.67 21.86 66.9 3.91 11.61 5.47 29.91 13.25 33.27C203 113.94 236.86 123.13 270 134v1L136 269h-1c-11.04-33.58-22.08-67.16-33.21-101.03C67.87 156.98 33.93 145.99 0 135v-1L134 0Z\",\n \"M107 0h1l108 108v1c-26.67 35.33-53.33 70.66-80 106h-1c-8.82-35.03-17.64-70.07-27-107.28C98.62 145.01 89.81 180 81.01 215h-1C53.33 179.66 26.67 144.33 0 109v-2L107 0Z\",\n \"M0 1C2.17.67 4.33.05 6.5.04 58.33-.01 110.17 0 162 0v270H2c26.2-22.17 52.41-44.33 78.86-66.71V67.4c-3.85-3.22-7.35-6.2-10.9-9.11C46.64 39.18 23.32 20.09 0 1Z\",\n \"M95 268.99h-1C62.66 238.66 31.33 208.33 0 178V88C26.67 58.67 53.33 29.33 80 0h1c0 29.45 0 58.89-.01 88.38 35.99 29.57 72 59.09 108.01 88.61v1l-94 91Z\",\n \"M13 0h67l135 135v1L81 270c-27-.33-54-.67-81-1 11.73-12.51 23.61-24.87 35.16-37.54 33.14-36.35 66.14-72.82 100.23-110.38C94.4 80.52 53.7 40.26 13 0Z\",\n];\n\nexport { ColorShapes };\n"],"names":[],"mappings":";;;AA0BA,MAAM,oBAAoB,IAAK,CAAA;AAAA,EAC7B,WAAc,GAAA;AAMZ,IAAA,MAAM,iBAAoC,GAAA;AAAA,MACxC,oBAAsB,EAAA;AAAA,QACpB,OAAS,EAAA,GAAA;AAAA,QACT,WAAa,EAAA,iDAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,OACR;AAAA,MACA,YAAc,EAAA;AAAA,QACZ,IAAM,EAAA,OAAA;AAAA,QACN,WAAa,EAAA,6BAAA;AAAA,QACb,KAAO,EAAA;AAAA,UACL,IAAM,EAAA,QAAA;AAAA,UACN,UAAY,EAAA;AAAA,YACV,SAAW,EAAA;AAAA,cACT,IAAM,EAAA,QAAA;AAAA,cACN,WAAa,EAAA,+BAAA;AAAA,aACf;AAAA,YACA,SAAW,EAAA;AA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MAAS,GAAA;AAAA,MACb,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,KACF,CAAA;AACA,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AACF,CAAA;AAEA,MAAM,gBAAmB,GAAA;AAAA,EACvB,kLAAA;AAAA,EACA,sLAAA;AAAA,EACA,wJAAA;AAAA,EACA,4MAAA;AAAA,EACA,uKAAA;AAAA,EACA,+JAAA;AAAA,EACA,uJAAA;AAAA,EACA,qJAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import {\n Game,\n Action,\n Scene,\n Shape,\n Label,\n Transition,\n TransitionDirection,\n WebColors,\n RandomDraws,\n GameParameters,\n GameOptions,\n TrialSchema,\n Timer,\n Easings,\n RgbaColor,\n Sprite,\n Constants,\n Translation,\n} from \"@m2c2kit/core\";\nimport {\n Button,\n Grid,\n Instructions,\n CountdownScene,\n InstructionsOptions,\n LocalePicker,\n} from \"@m2c2kit/addons\";\n\n/**\n * Color Shapes is a visual array change detection task, measuring intra-item\n * feature binding, where participants determine if shapes change color across\n * two sequential presentations of shape stimuli.\n */\nclass ColorShapes extends Game {\n constructor() {\n /**\n * These are configurable game parameters and their defaults.\n * Each game parameter should have a type, default (this is the default\n * value), and a description.\n */\n const defaultParameters: GameParameters = {\n fixation_duration_ms: {\n default: 500,\n description: \"How long fixation scene is shown, milliseconds.\",\n type: \"number\",\n },\n shape_colors: {\n type: \"array\",\n description: \"Array of colors for shapes.\",\n items: {\n type: \"object\",\n properties: {\n colorName: {\n type: \"string\",\n description: \"Human-friendly name of color.\",\n },\n rgbaColor: {\n type: \"array\",\n description: \"Color as array, [r,g,b,a].\",\n items: {\n type: \"number\",\n },\n },\n },\n },\n default: [\n { colorName: \"black\", rgbaColor: [0, 0, 0, 1] },\n { colorName: \"green\", rgbaColor: [0, 158, 115, 1] },\n { colorName: \"yellow\", rgbaColor: [240, 228, 66, 1] },\n { colorName: \"blue\", rgbaColor: [0, 114, 178, 1] },\n { colorName: \"orange\", rgbaColor: [213, 94, 0, 1] },\n { colorName: \"pink\", rgbaColor: [204, 121, 167, 1] },\n ],\n },\n number_of_shapes_shown: {\n default: 3,\n description: \"How many shapes to show on the grid at one time.\",\n type: \"integer\",\n },\n shapes_presented_duration_ms: {\n default: 2000,\n description: \"How long the shapes are shown, milliseconds.\",\n type: \"number\",\n },\n shapes_removed_duration_ms: {\n default: 1000,\n description:\n \"How long to show a blank square after shapes are removed, milliseconds.\",\n type: \"number\",\n },\n cells_per_side: {\n default: 3,\n description:\n \"How many cell positions for each side of the square grid (e.g., 3 is a 3x3 grid; 4 is a 4x4 grid).\",\n type: \"integer\",\n },\n number_of_different_colors_trials: {\n default: 2,\n type: \"integer\",\n description:\n \"Number of trials where the shapes have different colors. If shapes have different colors in a trial, anywhere from 2 to (number of shapes) will be given different colors.\",\n },\n number_of_trials: {\n default: 4,\n description: \"How many trials to run.\",\n type: \"integer\",\n },\n show_trials_complete_scene: {\n default: true,\n type: \"boolean\",\n description:\n \"After the final trial, should a completion scene be shown? Otherwise, the game will immediately end.\",\n },\n instruction_type: {\n default: \"long\",\n description: \"Type of instructions to show, 'short' or 'long'.\",\n type: \"string\",\n enum: [\"short\", \"long\"],\n },\n instructions: {\n default: null,\n type: [\"object\", \"null\"],\n description:\n \"When non-null, an InstructionsOptions object that will completely override the built-in instructions.\",\n },\n show_quit_button: {\n type: \"boolean\",\n default: true,\n description: \"Should the activity quit button be shown?\",\n },\n show_fps: {\n type: \"boolean\",\n default: false,\n description: \"Should the FPS be shown?\",\n },\n show_locale_picker: {\n type: \"boolean\",\n default: false,\n description:\n \"Should the icon that allows the participant to switch the locale be shown?\",\n },\n };\n\n /**\n * This describes all the data that will be generated by the assessment.\n * At runtime, when a trial completes, the data will be returned to the\n * session with a callback, along with this schema transformed into\n * JSON Schema.\n */\n const colorShapesTrialSchema: TrialSchema = {\n activity_begin_iso8601_timestamp: {\n type: \"string\",\n format: \"date-time\",\n description:\n \"ISO 8601 timestamp at the beginning of the game activity.\",\n },\n trial_begin_iso8601_timestamp: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n description:\n \"ISO 8601 timestamp at the beginning of the trial. Null if trial was skipped.\",\n },\n trial_end_iso8601_timestamp: {\n type: [\"string\", \"null\"],\n format: \"date-time\",\n description:\n \"ISO 8601 timestamp at the end of the trial (when user presses 'Same' or 'Different'). Null if trial was skipped.\",\n },\n trial_index: {\n type: [\"integer\", \"null\"],\n description: \"Index of the trial within this assessment, 0-based.\",\n },\n present_shapes: {\n description:\n \"Configuration of shapes shown to the user in the presentation phase. Null if trial was skipped.\",\n type: [\"array\", \"null\"],\n items: {\n type: \"object\",\n properties: {\n shape_index: {\n type: \"integer\",\n description:\n \"Index of the shape within the library of shapes, 0-based\",\n },\n color_name: {\n type: \"string\",\n description: \"Human-friendly name of color.\",\n },\n rgba_color: {\n type: \"array\",\n description: \"Color as array, [r,g,b,a].\",\n items: {\n type: \"number\",\n },\n },\n location: {\n type: \"object\",\n description: \"Location of shape.\",\n properties: {\n row: {\n type: \"number\",\n description: \"Row of the shape, 0-based.\",\n },\n column: {\n type: \"number\",\n description: \"Column of the shape, 0-based.\",\n },\n },\n },\n },\n },\n },\n response_shapes: {\n description:\n \"Configuration of shapes shown to the user in the response phase. Null if trial was skipped.\",\n type: [\"array\", \"null\"],\n items: {\n type: \"object\",\n properties: {\n shape_index: {\n type: \"integer\",\n description:\n \"Index of the shape within the library of shapes, 0-based\",\n },\n color_name: {\n type: \"string\",\n description: \"Human-friendly name of color.\",\n },\n rgba_color: {\n type: \"array\",\n description: \"Color as array, [r,g,b,a].\",\n items: {\n type: \"number\",\n },\n },\n location: {\n type: \"object\",\n description: \"Location of shape.\",\n properties: {\n row: {\n type: \"number\",\n description: \"Row of the shape, 0-based.\",\n },\n column: {\n type: \"number\",\n description: \"Column of the shape, 0-based.\",\n },\n },\n },\n },\n },\n },\n number_of_different_shapes: {\n type: [\"integer\", \"null\"],\n description:\n \"Number of shapes shown with different colors in the response phase.\",\n },\n response_time_duration_ms: {\n type: [\"number\", \"null\"],\n description:\n \"Milliseconds from when the response configuration of shapes is shown until the user taps a response. Null if trial was skipped.\",\n },\n user_response: {\n type: [\"string\", \"null\"],\n enum: [\"same\", \"different\"],\n description:\n \"User's response to whether the shapes are same colors or different.\",\n },\n user_response_correct: {\n type: [\"boolean\", \"null\"],\n description: \"Was the user's response correct?\",\n },\n quit_button_pressed: {\n type: \"boolean\",\n description: \"Was the quit button pressed?\",\n },\n };\n\n const translation: Translation = {\n configuration: {\n baseLocale: \"en-US\",\n },\n \"en-US\": {\n localeName: \"English\",\n INSTRUCTIONS_TITLE: \"Color Shapes\",\n SHORT_INSTRUCTIONS_TEXT_PAGE_1:\n \"Try to remember the color of 3 shapes, because they will soon disappear. When the shapes reappear, answer whether they have the SAME or DIFFERENT colors as they had before\",\n INSTRUCTIONS_TEXT_PAGE_1:\n \"Try to remember the color of 3 shapes, because they will soon disappear.\",\n INSTRUCTIONS_TEXT_PAGE_2: \"Next you will see the same shapes reappear.\",\n INSTRUCTIONS_TEXT_PAGE_3:\n \"Answer whether the shapes have the SAME or DIFFERENT colors as they had before.\",\n START_BUTTON_TEXT: \"START\",\n NEXT_BUTTON_TEXT: \"Next\",\n BACK_BUTTON_TEXT: \"Back\",\n GET_READY_COUNTDOWN_TEXT: \"GET READY!\",\n SAME_BUTTON_TEXT: \"Same\",\n DIFFERENT_BUTTON_TEXT: \"Different\",\n TRIALS_COMPLETE_SCENE_TEXT: \"This activity is complete.\",\n TRIALS_COMPLETE_SCENE_BUTTON_TEXT: \"OK\",\n },\n // cSpell:disable (for VS Code extension, Code Spell Checker)\n \"de-DE\": {\n localeName: \"Deutsch\",\n INSTRUCTIONS_TITLE: \"Farb-Formen\",\n // Short instructions need to be translated.\n // SHORT_INSTRUCTIONS_TEXT_PAGE_1: \"\",\n INSTRUCTIONS_TEXT_PAGE_1: \"Oben und unten sehen Sie Symbolpaare.\",\n INSTRUCTIONS_TEXT_PAGE_2:\n \"Ihre Aufgabe wird es sein, auf dasjenige untere Paar zu tippen, welches mit einem der obigen Paare exakt übereinstimmt.\",\n INSTRUCTIONS_TEXT_PAGE_3:\n \"Versuchen Sie bitte, so schnell und korrekt wie möglich zu sein.\",\n START_BUTTON_TEXT: \"START\",\n NEXT_BUTTON_TEXT: \"Weiter\",\n BACK_BUTTON_TEXT: \"Vorherige\",\n GET_READY_COUNTDOWN_TEXT: \"BEREIT MACHEN\",\n SAME_BUTTON_TEXT: \"Gleich\",\n DIFFERENT_BUTTON_TEXT: \"Unterschiedlich\",\n TRIALS_COMPLETE_SCENE_TEXT: \"Die Aufgabe ist beendet.\",\n TRIALS_COMPLETE_SCENE_BUTTON_TEXT: \"OK\",\n },\n // cSpell:enable\n };\n\n const options: GameOptions = {\n name: \"Color Shapes\",\n /**\n * This id must match the property m2c2kit.assessmentId in package.json\n */\n id: \"color-shapes\",\n publishUuid: \"394cb010-2ccf-4a87-9d23-cda7fb07a960\",\n version: \"__PACKAGE_JSON_VERSION__\",\n moduleMetadata: Constants.MODULE_METADATA_PLACEHOLDER,\n translation: translation,\n shortDescription:\n \"Color Shapes is a visual array change detection \\\ntask, measuring intra-item feature binding, where participants determine \\\nif shapes change color across two sequential presentations of shape \\\nstimuli.\",\n longDescription: `Color Shapes is a change detection paradigm used \\\nto measure visual short-term memory binding (Parra et al., 2009). \\\nParticipants are asked to memorize the shapes and colors of three different \\\npolygons for 3 seconds. The three polygons are then removed from the screen \\\nand re-displayed at different locations, either having the same or different \\\ncolors. Participants are then asked to decide whether the combination of \\\ncolors and shapes are the \"Same\" or \"Different\" between the study and test \\\nphases.`,\n showFps: defaultParameters.show_fps.default,\n width: 400,\n height: 800,\n trialSchema: colorShapesTrialSchema,\n parameters: defaultParameters,\n fonts: [\n {\n fontName: \"roboto\",\n url: \"fonts/roboto/Roboto-Regular.ttf\",\n },\n ],\n images: [\n {\n imageName: \"instructions-1\",\n height: 256,\n width: 256,\n url: \"images/cs-instructions-1.png\",\n },\n {\n imageName: \"instructions-2\",\n height: 256,\n width: 256,\n url: \"images/cs-instructions-2.png\",\n },\n {\n imageName: \"instructions-3\",\n height: 330,\n width: 256,\n url: \"images/cs-instructions-3.png\",\n },\n {\n imageName: \"circle-x\",\n height: 32,\n width: 32,\n // the svg is from evericons and is licensed under CC0 1.0\n // Universal (Public Domain). see https://www.patreon.com/evericons\n url: \"images/circle-x.svg\",\n },\n ],\n };\n\n super(options);\n }\n\n override async initialize() {\n await super.initialize();\n // just for convenience, alias the variable game to \"this\"\n // (even though eslint doesn't like it)\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const game = this;\n\n const SHAPE_SVG_HEIGHT = 96;\n const SQUARE_SIDE_LENGTH = 350;\n const numberOfShapesShown = game.getParameter<number>(\n \"number_of_shapes_shown\",\n );\n const shapeLibrary = this.makeShapes(SHAPE_SVG_HEIGHT);\n\n // ==============================================================\n\n if (game.getParameter<boolean>(\"show_quit_button\")) {\n const quitSprite = new Sprite({\n imageName: \"circle-x\",\n position: { x: 380, y: 20 },\n isUserInteractionEnabled: true,\n });\n game.addFreeNode(quitSprite);\n quitSprite.onTapDown((e) => {\n game.removeAllFreeNodes();\n e.handled = true;\n const blankScene = new Scene();\n game.addScene(blankScene);\n game.presentScene(blankScene);\n game.addTrialData(\"quit_button_pressed\", true);\n game.trialComplete();\n game.cancel();\n });\n }\n\n let localePicker: LocalePicker;\n if (game.getParameter<boolean>(\"show_locale_picker\")) {\n localePicker = new LocalePicker();\n game.addFreeNode(localePicker);\n }\n\n // ==============================================================\n // SCENES: instructions\n let instructionsScenes: Array<Scene>;\n\n const customInstructions = game.getParameter<InstructionsOptions | null>(\n \"instructions\",\n );\n if (customInstructions) {\n instructionsScenes = Instructions.create(customInstructions);\n } else {\n switch (game.getParameter(\"instruction_type\")) {\n case \"short\": {\n instructionsScenes = Instructions.create({\n instructionScenes: [\n {\n title: \"INSTRUCTIONS_TITLE\",\n text: \"SHORT_INSTRUCTIONS_TEXT_PAGE_1\",\n imageName: \"instructions-1\",\n imageAboveText: false,\n imageMarginTop: 32,\n textFontSize: 24,\n titleFontSize: 30,\n textVerticalBias: 0.2,\n nextButtonText: \"START_BUTTON_TEXT\",\n nextButtonBackgroundColor: WebColors.Green,\n nextSceneTransition: Transition.none(),\n },\n ],\n });\n break;\n }\n case \"long\": {\n instructionsScenes = Instructions.create({\n instructionScenes: [\n {\n title: \"INSTRUCTIONS_TITLE\",\n text: \"INSTRUCTIONS_TEXT_PAGE_1\",\n imageName: \"instructions-1\",\n imageAboveText: false,\n imageMarginTop: 32,\n textFontSize: 24,\n titleFontSize: 30,\n textVerticalBias: 0.2,\n nextButtonText: \"NEXT_BUTTON_TEXT\",\n backButtonText: \"BACK_BUTTON_TEXT\",\n },\n {\n title: \"INSTRUCTIONS_TITLE\",\n text: \"INSTRUCTIONS_TEXT_PAGE_2\",\n imageName: \"instructions-2\",\n imageAboveText: false,\n imageMarginTop: 32,\n textFontSize: 24,\n titleFontSize: 30,\n textVerticalBias: 0.2,\n nextButtonText: \"NEXT_BUTTON_TEXT\",\n backButtonText: \"BACK_BUTTON_TEXT\",\n },\n {\n title: \"INSTRUCTIONS_TITLE\",\n text: \"INSTRUCTIONS_TEXT_PAGE_3\",\n imageName: \"instructions-3\",\n imageAboveText: false,\n imageMarginTop: 32,\n textFontSize: 24,\n titleFontSize: 30,\n textVerticalBias: 0.2,\n nextButtonText: \"START_BUTTON_TEXT\",\n nextButtonBackgroundColor: WebColors.Green,\n backButtonText: \"BACK_BUTTON_TEXT\",\n },\n ],\n });\n break;\n }\n default: {\n throw new Error(\"invalid value for instruction_type\");\n }\n }\n }\n instructionsScenes[0].onAppear(() => {\n // in case user quits before starting a trial, record the\n // timestamp\n game.addTrialData(\n \"activity_begin_iso8601_timestamp\",\n this.beginIso8601Timestamp,\n );\n });\n game.addScenes(instructionsScenes);\n\n // ==============================================================\n // SCENE: countdown. Show 3 second countdown.\n const countdownScene = new CountdownScene({\n milliseconds: 3000,\n text: \"GET_READY_COUNTDOWN_TEXT\",\n zeroDwellMilliseconds: 1000,\n transition: Transition.none(),\n });\n game.addScene(countdownScene);\n\n const gridRows = game.getParameter<number>(\"cells_per_side\");\n const gridColumns = game.getParameter<number>(\"cells_per_side\");\n const numberOfTrials = game.getParameter<number>(\"number_of_trials\");\n const shapeColors =\n game.getParameter<Array<{ colorName: string; rgbaColor: RgbaColor }>>(\n \"shape_colors\",\n );\n\n interface DisplayShape {\n shape: Shape;\n shapeIndex: number;\n color: RgbaColor;\n colorName: string;\n location: {\n row: number;\n column: number;\n };\n }\n\n interface TrialConfiguration {\n presentShapes: Array<DisplayShape>;\n responseShapes: Array<DisplayShape>;\n numberOfShapesWithDifferentColors: number;\n }\n\n const trialConfigurations: Array<TrialConfiguration> = [];\n const rows = game.getParameter<number>(\"cells_per_side\");\n const columns = rows;\n const numberOfDifferentColorsTrials = game.getParameter<number>(\n \"number_of_different_colors_trials\",\n );\n const differentColorsTrialIndexes = RandomDraws.FromRangeWithoutReplacement(\n numberOfDifferentColorsTrials,\n 0,\n numberOfTrials - 1,\n );\n\n for (let i = 0; i < numberOfTrials; i++) {\n const presentShapes = new Array<DisplayShape>();\n const responseShapes = new Array<DisplayShape>();\n const shapesToShowIndexes = RandomDraws.FromRangeWithoutReplacement(\n numberOfShapesShown,\n 0,\n shapeLibrary.length - 1,\n );\n const shapeColorsIndexes = RandomDraws.FromRangeWithoutReplacement(\n numberOfShapesShown,\n 0,\n shapeColors.length - 1,\n );\n\n // do not allow shapes to be in the same row or column\n // or along the diagonal\n const onDiagonal = (\n locations: {\n row: number;\n column: number;\n }[],\n ): boolean => {\n if (\n locations\n .map((c) => c.row === 0 && c.column === 0)\n .some((e) => e === true) &&\n locations\n .map((c) => c.row === 1 && c.column === 1)\n .some((e) => e === true) &&\n locations\n .map((c) => c.row === 2 && c.column === 2)\n .some((e) => e === true)\n ) {\n return true;\n }\n if (\n locations\n .map((c) => c.row === 2 && c.column === 0)\n .some((e) => e === true) &&\n locations\n .map((c) => c.row === 1 && c.column === 1)\n .some((e) => e === true) &&\n locations\n .map((c) => c.row === 0 && c.column === 2)\n .some((e) => e === true)\n ) {\n return true;\n }\n return false;\n };\n\n const inLine = (\n locations: {\n row: number;\n column: number;\n }[],\n ): boolean => {\n const uniqueRows = new Set(locations.map((l) => l.row)).size;\n const uniqueColumns = new Set(locations.map((l) => l.column)).size;\n\n if (uniqueRows !== 1 && uniqueColumns !== 1) {\n return false;\n }\n return true;\n };\n\n // assign present shapes' locations and colors\n let presentLocationsOk = false;\n let presentLocations: {\n row: number;\n column: number;\n }[];\n do {\n presentLocations = RandomDraws.FromGridWithoutReplacement(\n numberOfShapesShown,\n rows,\n columns,\n );\n\n if (!inLine(presentLocations) && !onDiagonal(presentLocations)) {\n presentLocationsOk = true;\n } else {\n presentLocationsOk = false;\n }\n } while (!presentLocationsOk);\n for (let j = 0; j < numberOfShapesShown; j++) {\n const presentShape: DisplayShape = {\n shape: shapeLibrary[shapesToShowIndexes[j]],\n shapeIndex: shapesToShowIndexes[j],\n color: shapeColors[shapeColorsIndexes[j]].rgbaColor,\n colorName: shapeColors[shapeColorsIndexes[j]].colorName,\n location: presentLocations[j],\n };\n presentShapes.push(presentShape);\n }\n\n // assign response shapes' locations\n let responseLocationsOk = false;\n let responseLocations: {\n row: number;\n column: number;\n }[];\n do {\n responseLocations = RandomDraws.FromGridWithoutReplacement(\n numberOfShapesShown,\n rows,\n columns,\n );\n\n if (!inLine(responseLocations) && !onDiagonal(responseLocations)) {\n responseLocationsOk = true;\n } else {\n responseLocationsOk = false;\n }\n } while (!responseLocationsOk);\n for (let j = 0; j < numberOfShapesShown; j++) {\n const responseShape: DisplayShape = {\n shape: presentShapes[j].shape,\n shapeIndex: shapesToShowIndexes[j],\n color: presentShapes[j].color,\n colorName: shapeColors[shapeColorsIndexes[j]].colorName,\n location: responseLocations[j],\n };\n responseShapes.push(responseShape);\n }\n\n let numberOfShapesWithDifferentColors = 0;\n const differentColorTrial = differentColorsTrialIndexes.includes(i);\n\n if (differentColorTrial) {\n const numberOfShapesToChange = RandomDraws.SingleFromRange(\n 2,\n numberOfShapesShown,\n );\n const shapesToChangeIndexes = RandomDraws.FromRangeWithoutReplacement(\n numberOfShapesToChange,\n 0,\n numberOfShapesShown - 1,\n );\n const shapesToChange = shapesToChangeIndexes.map(\n (index) => responseShapes[index],\n );\n numberOfShapesWithDifferentColors = shapesToChange.length;\n\n /**\n * rotate each shape's color to the next one. The last shape\n * gets the first shape's color\n */\n const firstShapeColor = shapesToChange[0].color;\n for (let j = 0; j < numberOfShapesToChange; j++) {\n const shape = shapesToChange[j];\n if (j + 1 < numberOfShapesToChange) {\n shape.color = shapesToChange[j + 1].color;\n } else {\n shape.color = firstShapeColor;\n }\n }\n }\n\n trialConfigurations.push({\n presentShapes: presentShapes,\n responseShapes: responseShapes,\n numberOfShapesWithDifferentColors: numberOfShapesWithDifferentColors,\n });\n }\n\n // ==============================================================\n // SCENE: fixation. Show get ready message, then advance after XXXX\n // milliseconds (as defined in fixation_duration_ms parameter)\n const fixationScene = new Scene();\n game.addScene(fixationScene);\n\n const fixationSceneSquare = new Shape({\n rect: { size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH } },\n fillColor: WebColors.Transparent,\n strokeColor: WebColors.Gray,\n lineWidth: 4,\n position: { x: 200, y: 300 },\n });\n fixationScene.addChild(fixationSceneSquare);\n\n const plusLabel = new Label({\n text: \"+\",\n fontSize: 32,\n fontColor: WebColors.Black,\n localize: false,\n });\n fixationSceneSquare.addChild(plusLabel);\n\n fixationScene.onAppear(() => {\n game.addTrialData(\n \"activity_begin_iso8601_timestamp\",\n this.beginIso8601Timestamp,\n );\n game.addTrialData(\n \"trial_begin_iso8601_timestamp\",\n new Date().toISOString(),\n );\n fixationScene.run(\n Action.sequence([\n Action.wait({ duration: game.getParameter(\"fixation_duration_ms\") }),\n Action.custom({\n callback: () => {\n game.presentScene(shapePresentationScene);\n },\n }),\n ]),\n );\n });\n\n // ==============================================================\n // SCENE: Shape Presentation.\n const shapePresentationScene = new Scene();\n game.addScene(shapePresentationScene);\n\n const presentationSceneSquare = new Shape({\n rect: { size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH } },\n fillColor: WebColors.Transparent,\n strokeColor: WebColors.Gray,\n lineWidth: 4,\n position: { x: 200, y: 300 },\n });\n shapePresentationScene.addChild(presentationSceneSquare);\n\n const presentationGrid = new Grid({\n rows: gridRows,\n columns: gridColumns,\n size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH },\n position: { x: 200, y: 300 },\n backgroundColor: WebColors.Transparent,\n gridLineColor: WebColors.Transparent,\n });\n shapePresentationScene.addChild(presentationGrid);\n\n shapePresentationScene.onAppear(() => {\n const trialConfiguration = trialConfigurations[game.trialIndex];\n for (let i = 0; i < trialConfiguration.presentShapes.length; i++) {\n const presentShape = trialConfiguration.presentShapes[i].shape;\n presentShape.fillColor = trialConfiguration.presentShapes[i].color;\n /**\n * Because we are repositioning children of a grid, we need to\n * set its position back to zero, because in the grid, it recalculates\n * the position. If we don't do this, the shapes will be positioned\n * incorrectly if they are positioned a second time.\n */\n presentShape.position = { x: 0, y: 0 };\n presentationGrid.addAtCell(\n presentShape,\n trialConfiguration.presentShapes[i].location.row,\n trialConfiguration.presentShapes[i].location.column,\n );\n }\n shapePresentationScene.run(\n Action.sequence([\n Action.wait({\n duration: game.getParameter(\"shapes_presented_duration_ms\"),\n }),\n Action.custom({\n callback: () => {\n presentationGrid.removeAllGridChildren();\n },\n }),\n Action.wait({\n duration: game.getParameter(\"shapes_removed_duration_ms\"),\n }),\n Action.custom({\n callback: () => {\n presentationGrid.removeAllGridChildren();\n game.presentScene(shapeResponseScene);\n },\n }),\n ]),\n );\n });\n\n // ==============================================================\n // SCENE: Shape Response.\n const shapeResponseScene = new Scene();\n game.addScene(shapeResponseScene);\n\n const responseSceneSquare = new Shape({\n rect: { size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH } },\n fillColor: WebColors.Transparent,\n strokeColor: WebColors.Gray,\n lineWidth: 4,\n position: { x: 200, y: 300 },\n });\n shapeResponseScene.addChild(responseSceneSquare);\n\n const responseGrid = new Grid({\n rows: gridRows,\n columns: gridColumns,\n size: { width: SQUARE_SIDE_LENGTH, height: SQUARE_SIDE_LENGTH },\n position: { x: 200, y: 300 },\n backgroundColor: WebColors.Transparent,\n gridLineColor: WebColors.Transparent,\n });\n shapeResponseScene.addChild(responseGrid);\n\n shapeResponseScene.onAppear(() => {\n const trialConfiguration = trialConfigurations[game.trialIndex];\n for (let i = 0; i < trialConfiguration.responseShapes.length; i++) {\n const responseShape = trialConfiguration.responseShapes[i].shape;\n responseShape.fillColor = trialConfiguration.responseShapes[i].color;\n /**\n * Because we are repositioning children of a grid, we need to\n * set its position back to zero, because in the grid, it recalculates\n * the position. If we don't do this, the shapes will be positioned\n * incorrectly if they are positioned a second time.\n */\n responseShape.position = { x: 0, y: 0 };\n responseGrid.addAtCell(\n responseShape,\n trialConfiguration.responseShapes[i].location.row,\n trialConfiguration.responseShapes[i].location.column,\n );\n }\n sameButton.isUserInteractionEnabled = true;\n differentButton.isUserInteractionEnabled = true;\n Timer.startNew(\"rt\");\n });\n\n const sameButton = new Button({\n text: \"SAME_BUTTON_TEXT\",\n position: { x: 100, y: 700 },\n size: { width: 150, height: 50 },\n });\n shapeResponseScene.addChild(sameButton);\n sameButton.onTapDown(() => {\n sameButton.isUserInteractionEnabled = false;\n handleSelection(false);\n });\n\n const differentButton = new Button({\n text: \"DIFFERENT_BUTTON_TEXT\",\n position: { x: 300, y: 700 },\n size: { width: 150, height: 50 },\n });\n shapeResponseScene.addChild(differentButton);\n differentButton.onTapDown(() => {\n differentButton.isUserInteractionEnabled = false;\n handleSelection(true);\n });\n\n const handleSelection = (differentPressed: boolean) => {\n const rt = Timer.elapsed(\"rt\");\n Timer.remove(\"rt\");\n responseGrid.removeAllGridChildren();\n\n game.addTrialData(\n \"trial_end_iso8601_timestamp\",\n new Date().toISOString(),\n );\n const trialConfiguration = trialConfigurations[game.trialIndex];\n game.addTrialData(\"response_time_duration_ms\", rt);\n game.addTrialData(\n \"number_of_different_shapes\",\n trialConfiguration.numberOfShapesWithDifferentColors,\n );\n game.addTrialData(\n \"user_response\",\n differentPressed ? \"different\" : \"same\",\n );\n const correctResponse =\n (trialConfiguration.numberOfShapesWithDifferentColors === 0 &&\n !differentPressed) ||\n (trialConfiguration.numberOfShapesWithDifferentColors > 0 &&\n differentPressed);\n game.addTrialData(\"user_response_correct\", correctResponse);\n\n const presentShapes = trialConfiguration.presentShapes.map((p) => {\n return {\n shape_index: p.shapeIndex,\n color_name: p.colorName,\n rgba_color: p.color,\n location: p.location,\n };\n });\n game.addTrialData(\"present_shapes\", presentShapes);\n game.addTrialData(\"quit_button_pressed\", false);\n\n const responseShapes = trialConfiguration.responseShapes.map((p) => {\n return {\n shape_index: p.shapeIndex,\n color_name: p.colorName,\n rgba_color: p.color,\n location: p.location,\n };\n });\n game.addTrialData(\"response_shapes\", responseShapes);\n game.addTrialData(\"trial_index\", game.trialIndex);\n\n game.trialComplete();\n if (game.trialIndex < numberOfTrials) {\n game.presentScene(fixationScene);\n } else {\n game.presentScene(\n doneScene,\n Transition.slide({\n direction: TransitionDirection.Left,\n duration: 500,\n easing: Easings.sinusoidalInOut,\n }),\n );\n }\n };\n\n // ==============================================================\n // SCENE: done. Show done message, with a button to exit.\n const doneScene = new Scene();\n game.addScene(doneScene);\n\n const doneSceneText = new Label({\n text: \"TRIALS_COMPLETE_SCENE_TEXT\",\n position: { x: 200, y: 400 },\n });\n doneScene.addChild(doneSceneText);\n\n const okButton = new Button({\n text: \"TRIALS_COMPLETE_SCENE_BUTTON_TEXT\",\n position: { x: 200, y: 650 },\n });\n okButton.isUserInteractionEnabled = true;\n okButton.onTapDown(() => {\n // don't allow repeat taps of ok button\n okButton.isUserInteractionEnabled = false;\n doneScene.removeAllChildren();\n game.end();\n });\n doneScene.addChild(okButton);\n doneScene.onSetup(() => {\n // no need to have cancel button, because we're done\n game.removeAllFreeNodes();\n });\n }\n\n private makeShapes(svgHeight: number) {\n const shape01 = new Shape({\n path: {\n pathString: shapePathStrings[0],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n const shape02 = new Shape({\n path: {\n pathString: shapePathStrings[1],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n // note: shape03 is purposively smaller (.8 height of other shapes)\n const shape03 = new Shape({\n path: {\n pathString: shapePathStrings[2],\n height: svgHeight * 0.8,\n },\n lineWidth: 0,\n });\n\n const shape04 = new Shape({\n path: {\n pathString: shapePathStrings[3],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n // note: shape05 is purposively smaller (.8 height of other shapes)\n const shape05 = new Shape({\n path: {\n pathString: shapePathStrings[4],\n height: svgHeight * 0.8,\n },\n lineWidth: 0,\n });\n\n const shape06 = new Shape({\n path: {\n pathString: shapePathStrings[5],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n const shape07 = new Shape({\n path: {\n pathString: shapePathStrings[6],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n const shape08 = new Shape({\n path: {\n pathString: shapePathStrings[7],\n height: svgHeight,\n },\n lineWidth: 0,\n });\n\n const shapes = [\n shape01,\n shape02,\n shape03,\n shape04,\n shape05,\n shape06,\n shape07,\n shape08,\n ];\n return shapes;\n }\n}\n\nconst shapePathStrings = [\n \"M0 89.94v-2L131.95 0h2v88.7c2.34 1.6 4.47 3.11 6.65 4.55 42.77 28.22 85.54 56.42 128.3 84.63v2c-44.65 29.65-89.3 59.29-133.95 88.94h-1v-90.84C89.44 148.72 44.72 119.33 0 89.94Z\",\n \"M162 188c-.33 27-.67 54-1 81-26.87-26.18-53.74-52.35-80-77.94V269H0C0 180.83 0 92.67.04 4.5.04 3 .67 1.5 1 0c24.64 29.1 49.15 58.31 73.96 87.26 28.88 33.7 58.01 67.17 87.04 100.74Z\",\n \"M3 148.86V61.12C41.76 40.75 80.52 20.37 119.28 0h2.91c21.32 20.7 42.64 41.4 63.96 62.11v89.71c-38.44 20.04-76.88 40.09-115.31 60.13h-2.91L3.01 148.86Z\",\n \"M134 0h2c7.26 22.31 14.38 44.67 21.86 66.9 3.91 11.61 5.47 29.91 13.25 33.27C203 113.94 236.86 123.13 270 134v1L136 269h-1c-11.04-33.58-22.08-67.16-33.21-101.03C67.87 156.98 33.93 145.99 0 135v-1L134 0Z\",\n \"M107 0h1l108 108v1c-26.67 35.33-53.33 70.66-80 106h-1c-8.82-35.03-17.64-70.07-27-107.28C98.62 145.01 89.81 180 81.01 215h-1C53.33 179.66 26.67 144.33 0 109v-2L107 0Z\",\n \"M0 1C2.17.67 4.33.05 6.5.04 58.33-.01 110.17 0 162 0v270H2c26.2-22.17 52.41-44.33 78.86-66.71V67.4c-3.85-3.22-7.35-6.2-10.9-9.11C46.64 39.18 23.32 20.09 0 1Z\",\n \"M95 268.99h-1C62.66 238.66 31.33 208.33 0 178V88C26.67 58.67 53.33 29.33 80 0h1c0 29.45 0 58.89-.01 88.38 35.99 29.57 72 59.09 108.01 88.61v1l-94 91Z\",\n \"M13 0h67l135 135v1L81 270c-27-.33-54-.67-81-1 11.73-12.51 23.61-24.87 35.16-37.54 33.14-36.35 66.14-72.82 100.23-110.38C94.4 80.52 53.7 40.26 13 0Z\",\n];\n\nexport { ColorShapes };\n"],"names":[],"mappings":";;;AAkCA,MAAM,oBAAoB,IAAK,CAAA;AAAA,EAC7B,WAAc,GAAA;AAMZ,IAAA,MAAM,iBAAoC,GAAA;AAAA,MACxC,oBAAsB,EAAA;AAAA,QACpB,OAAS,EAAA,GAAA;AAAA,QACT,WAAa,EAAA,iDAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,OACR;AAAA,MACA,YAAc,EAAA;AAAA,QACZ,IAAM,EAAA,OAAA;AAAA,QACN,WAAa,EAAA,6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AI,KAAM,CAAA;AAAA,MACxB,IAAM,EAAA;AAAA,QACJ,UAAA,EAAY,iBAAiB,CAAC,CAAA;AAAA,QAC9B,MAAQ,EAAA,SAAA;AAAA,OACV;AAAA,MACA,SAAW,EAAA,CAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAM,MAAA,OAAA,GAAU,IAAI,KAAM,CAAA;AAAA,MACxB,IAAM,EAAA;AAAA,QACJ,UAAA,EAAY,iBAAiB,CAAC,CAAA;AAAA,QAC9B,MAAQ,EAAA,SAAA;AAAA,OACV;AAAA,MACA,SAAW,EAAA,CAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAM,MAAA,OAAA,GAAU,IAAI,KAAM,CAAA;AAAA,MACxB,IAAM,EAAA;AAAA,QACJ,UAAA,EAAY,iBAAiB,CAAC,CAAA;AAAA,QAC9B,MAAQ,EAAA,SAAA;AAAA,OACV;AAAA,MACA,SAAW,EAAA,CAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAA,MAAM,MAAS,GAAA;AAAA,MACb,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,KACF,CAAA;AACA,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AACF,CAAA;AAEA,MAAM,gBAAmB,GAAA;AAAA,EACvB,kLAAA;AAAA,EACA,sLAAA;AAAA,EACA,wJAAA;AAAA,EACA,4MAAA;AAAA,EACA,uKAAA;AAAA,EACA,+JAAA;AAAA,EACA,uJAAA;AAAA,EACA,qJAAA;AACF,CAAA;;;;"}
package/dist/index.min.js CHANGED
@@ -1 +1 @@
1
- import{Game as ie,Sprite as le,Scene as v,WebColors as i,Transition as V,RandomDraws as f,Shape as c,Label as J,Action as h,Timer as j,TransitionDirection as pe,Easings as ce}from"@m2c2kit/core";import{Instructions as X,CountdownScene as he,Grid as ee,Button as H}from"@m2c2kit/addons";class de extends ie{constructor(){const e={fixation_duration_ms:{default:500,description:"How long fixation scene is shown, milliseconds.",type:"number"},shape_colors:{type:"array",description:"Array of colors for shapes.",items:{type:"object",properties:{colorName:{type:"string",description:"Human-friendly name of color."},rgbaColor:{type:"array",description:"Color as array, [r,g,b,a].",items:{type:"number"}}}},default:[{colorName:"black",rgbaColor:[0,0,0,1]},{colorName:"green",rgbaColor:[0,158,115,1]},{colorName:"yellow",rgbaColor:[240,228,66,1]},{colorName:"blue",rgbaColor:[0,114,178,1]},{colorName:"orange",rgbaColor:[213,94,0,1]},{colorName:"pink",rgbaColor:[204,121,167,1]}]},number_of_shapes_shown:{default:3,description:"How many shapes to show on the grid at one time.",type:"integer"},shapes_presented_duration_ms:{default:2e3,description:"How long the shapes are shown, milliseconds.",type:"number"},shapes_removed_duration_ms:{default:1e3,description:"How long to show a blank square after shapes are removed, milliseconds.",type:"number"},cells_per_side:{default:3,description:"How many cell positions for each side of the square grid (e.g., 3 is a 3x3 grid; 4 is a 4x4 grid).",type:"integer"},number_of_different_colors_trials:{default:2,type:"integer",description:"Number of trials where the shapes have different colors. If shapes have different colors in a trial, anywhere from 2 to (number of shapes) will be given different colors."},number_of_trials:{default:4,description:"How many trials to run.",type:"integer"},show_trials_complete_scene:{default:!0,type:"boolean",description:"After the final trial, should a completion scene be shown? Otherwise, the game will immediately end."},trials_complete_scene_text:{default:"You have completed all the color shapes trials",description:"Text for scene displayed after all trials are complete.",type:"string"},trials_complete_scene_button_text:{default:"OK",description:"Button text for scene displayed after all trials are complete.",type:"string"},instruction_type:{default:"long",description:"Type of instructions to show, 'short' or 'long'.",type:"string",enum:["short","long"]},show_quit_button:{type:"boolean",default:!0,description:"Should the activity quit button be shown?"},show_fps:{type:"boolean",default:!1,description:"Should the FPS be shown?"}},S={activity_begin_iso8601_timestamp:{type:"string",format:"date-time",description:"ISO 8601 timestamp at the beginning of the game activity."},trial_begin_iso8601_timestamp:{type:["string","null"],format:"date-time",description:"ISO 8601 timestamp at the beginning of the trial. Null if trial was skipped."},trial_end_iso8601_timestamp:{type:["string","null"],format:"date-time",description:"ISO 8601 timestamp at the end of the trial (when user presses 'Same' or 'Different'). Null if trial was skipped."},trial_index:{type:["integer","null"],description:"Index of the trial within this assessment, 0-based."},present_shapes:{description:"Configuration of shapes shown to the user in the presentation phase. Null if trial was skipped.",type:["array","null"],items:{type:"object",properties:{shape_index:{type:"integer",description:"Index of the shape within the library of shapes, 0-based"},color_name:{type:"string",description:"Human-friendly name of color."},rgba_color:{type:"array",description:"Color as array, [r,g,b,a].",items:{type:"number"}},location:{type:"object",description:"Location of shape.",properties:{row:{type:"number",description:"Row of the shape, 0-based."},column:{type:"number",description:"Column of the shape, 0-based."}}}}}},response_shapes:{description:"Configuration of shapes shown to the user in the response phase. Null if trial was skipped.",type:["array","null"],items:{type:"object",properties:{shape_index:{type:"integer",description:"Index of the shape within the library of shapes, 0-based"},color_name:{type:"string",description:"Human-friendly name of color."},rgba_color:{type:"array",description:"Color as array, [r,g,b,a].",items:{type:"number"}},location:{type:"object",description:"Location of shape.",properties:{row:{type:"number",description:"Row of the shape, 0-based."},column:{type:"number",description:"Column of the shape, 0-based."}}}}}},number_of_different_shapes:{type:["integer","null"],description:"Number of shapes shown with different colors in the response phase."},response_time_duration_ms:{type:["number","null"],description:"Milliseconds from when the response configuration of shapes is shown until the user taps a response. Null if trial was skipped."},user_response:{type:["string","null"],enum:["same","different"],description:"User's response to whether the shapes are same colors or different."},user_response_correct:{type:["boolean","null"],description:"Was the user's response correct?"},quit_button_pressed:{type:"boolean",description:"Was the quit button pressed?"}},a={name:"Color Shapes",id:"color-shapes",publishUuid:"394cb010-2ccf-4a87-9d23-cda7fb07a960",version:"0.8.16 (b3a70752)",moduleMetadata:{name:"@m2c2kit/assessment-color-shapes",version:"0.8.16",dependencies:{"@m2c2kit/addons":"^0.3.15","@m2c2kit/core":"^0.3.18"}},shortDescription:"Color Shapes is a visual array change detection task, measuring intra-item feature binding, where participants determine if shapes change color across two sequential presentations of shape stimuli.",longDescription:'Color Shapes is a change detection paradigm used to measure visual short-term memory binding (Parra et al., 2009). Participants are asked to memorize the shapes and colors of three different polygons for 3 seconds. The three polygons are then removed from the screen and re-displayed at different locations, either having the same or different colors. Participants are then asked to decide whether the combination of colors and shapes are the "Same" or "Different" between the study and test phases.',showFps:e.show_fps.default,width:400,height:800,trialSchema:S,parameters:e,fonts:[{fontName:"roboto",url:"fonts/roboto/Roboto-Regular.ttf"}],images:[{imageName:"instructions-1",height:256,width:256,url:"images/cs-instructions-1.png"},{imageName:"instructions-2",height:256,width:256,url:"images/cs-instructions-2.png"},{imageName:"instructions-3",height:330,width:256,url:"images/cs-instructions-3.png"},{imageName:"circle-x",height:32,width:32,url:"images/circle-x.svg"}]};super(a)}async initialize(){await super.initialize();const e=this,S=96,a=350,l=e.getParameter("number_of_shapes_shown"),I=this.makeShapes(S);if(e.getParameter("show_quit_button")){const s=new le({imageName:"circle-x",position:{x:380,y:20},isUserInteractionEnabled:!0});e.addFreeNode(s),s.onTapDown(n=>{e.removeAllFreeNodes(),n.handled=!0;const r=new v;e.addScene(r),e.presentScene(r),e.addTrialData("quit_button_pressed",!0),e.trialComplete(),e.cancel()})}let g;switch(e.getParameter("instruction_type")){case"short":{g=X.create({instructionScenes:[{title:"Color Shapes",text:`Try to remember the color of ${l} shapes, because they will soon disappear. When the shapes reappear, answer whether they have the SAME or DIFFERENT colors as they had before.`,imageName:"instructions-1",imageAboveText:!1,imageMarginTop:32,textFontSize:24,titleFontSize:30,textVerticalBias:.2,nextButtonText:"START",nextButtonBackgroundColor:i.Green,nextSceneTransition:V.none()}]});break}case"long":{g=X.create({instructionScenes:[{title:"Color Shapes",text:`Try to remember the color of ${l} shapes, because they will soon disappear.`,imageName:"instructions-1",imageAboveText:!1,imageMarginTop:32,textFontSize:24,titleFontSize:30,textVerticalBias:.2},{title:"Color Shapes",text:"Next you will see the same shapes reappear.",imageName:"instructions-2",imageAboveText:!1,imageMarginTop:32,textFontSize:24,titleFontSize:30,textVerticalBias:.2},{title:"Color Shapes",text:"Answer whether the shapes have the SAME or DIFFERENT colors as they had before.",imageName:"instructions-3",imageAboveText:!1,imageMarginTop:32,textFontSize:24,titleFontSize:30,textVerticalBias:.2,nextButtonText:"START",nextButtonBackgroundColor:i.Green}]});break}default:throw new Error("invalid value for instruction_type")}g[0].onAppear(()=>{e.addTrialData("activity_begin_iso8601_timestamp",this.beginIso8601Timestamp)}),e.addScenes(g);const O=new he({milliseconds:3e3,text:"GET READY!",zeroDwellMilliseconds:1e3,transition:V.none()});e.addScene(O);const N=e.getParameter("cells_per_side"),D=e.getParameter("cells_per_side"),k=e.getParameter("number_of_trials"),A=e.getParameter("shape_colors"),R=[],M=e.getParameter("cells_per_side"),Z=M,te=e.getParameter("number_of_different_colors_trials"),oe=f.FromRangeWithoutReplacement(te,0,k-1);for(let s=0;s<k;s++){const n=new Array,r=new Array,C=f.FromRangeWithoutReplacement(l,0,I.length-1),x=f.FromRangeWithoutReplacement(l,0,A.length-1),L=o=>!!(o.map(t=>t.row===0&&t.column===0).some(t=>t===!0)&&o.map(t=>t.row===1&&t.column===1).some(t=>t===!0)&&o.map(t=>t.row===2&&t.column===2).some(t=>t===!0)||o.map(t=>t.row===2&&t.column===0).some(t=>t===!0)&&o.map(t=>t.row===1&&t.column===1).some(t=>t===!0)&&o.map(t=>t.row===0&&t.column===2).some(t=>t===!0)),p=o=>{const t=new Set(o.map(T=>T.row)).size,b=new Set(o.map(T=>T.column)).size;return!(t!==1&&b!==1)};let G=!1,P;do P=f.FromGridWithoutReplacement(l,M,Z),!p(P)&&!L(P)?G=!0:G=!1;while(!G);for(let o=0;o<l;o++){const t={shape:I[C[o]],shapeIndex:C[o],color:A[x[o]].rgbaColor,colorName:A[x[o]].colorName,location:P[o]};n.push(t)}let U=!1,q;do q=f.FromGridWithoutReplacement(l,M,Z),!p(q)&&!L(q)?U=!0:U=!1;while(!U);for(let o=0;o<l;o++){const t={shape:n[o].shape,shapeIndex:C[o],color:n[o].color,colorName:A[x[o]].colorName,location:q[o]};r.push(t)}let K=0;if(oe.includes(s)){const o=f.SingleFromRange(2,l),b=f.FromRangeWithoutReplacement(o,0,l-1).map(u=>r[u]);K=b.length;const T=b[0].color;for(let u=0;u<o;u++){const Q=b[u];u+1<o?Q.color=b[u+1].color:Q.color=T}}R.push({presentShapes:n,responseShapes:r,numberOfShapesWithDifferentColors:K})}const y=new v;e.addScene(y);const Y=new c({rect:{size:{width:a,height:a}},fillColor:i.Transparent,strokeColor:i.Gray,lineWidth:4,position:{x:200,y:300}});y.addChild(Y);const se=new J({text:"+",fontSize:32,fontColor:i.Black});Y.addChild(se),y.onAppear(()=>{e.addTrialData("activity_begin_iso8601_timestamp",this.beginIso8601Timestamp),e.addTrialData("trial_begin_iso8601_timestamp",new Date().toISOString()),y.run(h.sequence([h.wait({duration:e.getParameter("fixation_duration_ms")}),h.custom({callback:()=>{e.presentScene(_)}})]))});const _=new v;e.addScene(_);const ne=new c({rect:{size:{width:a,height:a}},fillColor:i.Transparent,strokeColor:i.Gray,lineWidth:4,position:{x:200,y:300}});_.addChild(ne);const W=new ee({rows:N,columns:D,size:{width:a,height:a},position:{x:200,y:300},backgroundColor:i.Transparent,gridLineColor:i.Transparent});_.addChild(W),_.onAppear(()=>{const s=R[e.trialIndex];for(let n=0;n<s.presentShapes.length;n++){const r=s.presentShapes[n].shape;r.fillColor=s.presentShapes[n].color,r.position={x:0,y:0},W.addAtCell(r,s.presentShapes[n].location.row,s.presentShapes[n].location.column)}_.run(h.sequence([h.wait({duration:e.getParameter("shapes_presented_duration_ms")}),h.custom({callback:()=>{W.removeAllChildren()}}),h.wait({duration:e.getParameter("shapes_removed_duration_ms")}),h.custom({callback:()=>{W.removeAllChildren(),e.presentScene(m)}})]))});const m=new v;e.addScene(m);const re=new c({rect:{size:{width:a,height:a}},fillColor:i.Transparent,strokeColor:i.Gray,lineWidth:4,position:{x:200,y:300}});m.addChild(re);const B=new ee({rows:N,columns:D,size:{width:a,height:a},position:{x:200,y:300},backgroundColor:i.Transparent,gridLineColor:i.Transparent});m.addChild(B),m.onAppear(()=>{const s=R[e.trialIndex];for(let n=0;n<s.responseShapes.length;n++){const r=s.responseShapes[n].shape;r.fillColor=s.responseShapes[n].color,r.position={x:0,y:0},B.addAtCell(r,s.responseShapes[n].location.row,s.responseShapes[n].location.column)}F.isUserInteractionEnabled=!0,z.isUserInteractionEnabled=!0,j.startNew("rt")});const F=new H({text:"Same",position:{x:100,y:700},size:{width:125,height:50}});m.addChild(F),F.onTapDown(()=>{F.isUserInteractionEnabled=!1,$(!1)});const z=new H({text:"Different",position:{x:300,y:700},size:{width:125,height:50}});m.addChild(z),z.onTapDown(()=>{z.isUserInteractionEnabled=!1,$(!0)});const $=s=>{const n=j.elapsed("rt");j.remove("rt"),B.removeAllChildren(),e.addTrialData("trial_end_iso8601_timestamp",new Date().toISOString());const r=R[e.trialIndex];e.addTrialData("response_time_duration_ms",n),e.addTrialData("number_of_different_shapes",r.numberOfShapesWithDifferentColors),e.addTrialData("user_response",s?"different":"same");const C=r.numberOfShapesWithDifferentColors===0&&!s||r.numberOfShapesWithDifferentColors>0&&s;e.addTrialData("user_response_correct",C);const x=r.presentShapes.map(p=>({shape_index:p.shapeIndex,color_name:p.colorName,rgba_color:p.color,location:p.location}));e.addTrialData("present_shapes",x),e.addTrialData("quit_button_pressed",!1);const L=r.responseShapes.map(p=>({shape_index:p.shapeIndex,color_name:p.colorName,rgba_color:p.color,location:p.location}));e.addTrialData("response_shapes",L),e.addTrialData("trial_index",e.trialIndex),e.trialComplete(),e.trialIndex<k?e.presentScene(y):e.presentScene(w,V.slide({direction:pe.Left,duration:500,easing:ce.sinusoidalInOut}))},w=new v;e.addScene(w);const ae=new J({text:e.getParameter("trials_complete_scene_text"),position:{x:200,y:400}});w.addChild(ae);const E=new H({text:e.getParameter("trials_complete_scene_button_text"),position:{x:200,y:650}});E.isUserInteractionEnabled=!0,E.onTapDown(()=>{E.isUserInteractionEnabled=!1,w.removeAllChildren(),e.end()}),w.addChild(E),w.onSetup(()=>{e.removeAllFreeNodes()})}makeShapes(e){const S=new c({path:{pathString:d[0],height:e},lineWidth:0}),a=new c({path:{pathString:d[1],height:e},lineWidth:0}),l=new c({path:{pathString:d[2],height:e*.8},lineWidth:0}),I=new c({path:{pathString:d[3],height:e},lineWidth:0}),g=new c({path:{pathString:d[4],height:e*.8},lineWidth:0}),O=new c({path:{pathString:d[5],height:e},lineWidth:0}),N=new c({path:{pathString:d[6],height:e},lineWidth:0}),D=new c({path:{pathString:d[7],height:e},lineWidth:0});return[S,a,l,I,g,O,N,D]}}const d=["M0 89.94v-2L131.95 0h2v88.7c2.34 1.6 4.47 3.11 6.65 4.55 42.77 28.22 85.54 56.42 128.3 84.63v2c-44.65 29.65-89.3 59.29-133.95 88.94h-1v-90.84C89.44 148.72 44.72 119.33 0 89.94Z","M162 188c-.33 27-.67 54-1 81-26.87-26.18-53.74-52.35-80-77.94V269H0C0 180.83 0 92.67.04 4.5.04 3 .67 1.5 1 0c24.64 29.1 49.15 58.31 73.96 87.26 28.88 33.7 58.01 67.17 87.04 100.74Z","M3 148.86V61.12C41.76 40.75 80.52 20.37 119.28 0h2.91c21.32 20.7 42.64 41.4 63.96 62.11v89.71c-38.44 20.04-76.88 40.09-115.31 60.13h-2.91L3.01 148.86Z","M134 0h2c7.26 22.31 14.38 44.67 21.86 66.9 3.91 11.61 5.47 29.91 13.25 33.27C203 113.94 236.86 123.13 270 134v1L136 269h-1c-11.04-33.58-22.08-67.16-33.21-101.03C67.87 156.98 33.93 145.99 0 135v-1L134 0Z","M107 0h1l108 108v1c-26.67 35.33-53.33 70.66-80 106h-1c-8.82-35.03-17.64-70.07-27-107.28C98.62 145.01 89.81 180 81.01 215h-1C53.33 179.66 26.67 144.33 0 109v-2L107 0Z","M0 1C2.17.67 4.33.05 6.5.04 58.33-.01 110.17 0 162 0v270H2c26.2-22.17 52.41-44.33 78.86-66.71V67.4c-3.85-3.22-7.35-6.2-10.9-9.11C46.64 39.18 23.32 20.09 0 1Z","M95 268.99h-1C62.66 238.66 31.33 208.33 0 178V88C26.67 58.67 53.33 29.33 80 0h1c0 29.45 0 58.89-.01 88.38 35.99 29.57 72 59.09 108.01 88.61v1l-94 91Z","M13 0h67l135 135v1L81 270c-27-.33-54-.67-81-1 11.73-12.51 23.61-24.87 35.16-37.54 33.14-36.35 66.14-72.82 100.23-110.38C94.4 80.52 53.7 40.26 13 0Z"];export{de as ColorShapes};
1
+ import{Game as pe,Sprite as ce,Scene as y,WebColors as i,Transition as j,RandomDraws as _,Shape as c,Label as te,Action as h,Timer as H,TransitionDirection as he,Easings as de}from"@m2c2kit/core";import{LocalePicker as me,Instructions as V,CountdownScene as ue,Grid as oe,Button as Z}from"@m2c2kit/addons";class Te extends pe{constructor(){const e={fixation_duration_ms:{default:500,description:"How long fixation scene is shown, milliseconds.",type:"number"},shape_colors:{type:"array",description:"Array of colors for shapes.",items:{type:"object",properties:{colorName:{type:"string",description:"Human-friendly name of color."},rgbaColor:{type:"array",description:"Color as array, [r,g,b,a].",items:{type:"number"}}}},default:[{colorName:"black",rgbaColor:[0,0,0,1]},{colorName:"green",rgbaColor:[0,158,115,1]},{colorName:"yellow",rgbaColor:[240,228,66,1]},{colorName:"blue",rgbaColor:[0,114,178,1]},{colorName:"orange",rgbaColor:[213,94,0,1]},{colorName:"pink",rgbaColor:[204,121,167,1]}]},number_of_shapes_shown:{default:3,description:"How many shapes to show on the grid at one time.",type:"integer"},shapes_presented_duration_ms:{default:2e3,description:"How long the shapes are shown, milliseconds.",type:"number"},shapes_removed_duration_ms:{default:1e3,description:"How long to show a blank square after shapes are removed, milliseconds.",type:"number"},cells_per_side:{default:3,description:"How many cell positions for each side of the square grid (e.g., 3 is a 3x3 grid; 4 is a 4x4 grid).",type:"integer"},number_of_different_colors_trials:{default:2,type:"integer",description:"Number of trials where the shapes have different colors. If shapes have different colors in a trial, anywhere from 2 to (number of shapes) will be given different colors."},number_of_trials:{default:4,description:"How many trials to run.",type:"integer"},show_trials_complete_scene:{default:!0,type:"boolean",description:"After the final trial, should a completion scene be shown? Otherwise, the game will immediately end."},instruction_type:{default:"long",description:"Type of instructions to show, 'short' or 'long'.",type:"string",enum:["short","long"]},instructions:{default:null,type:["object","null"],description:"When non-null, an InstructionsOptions object that will completely override the built-in instructions."},show_quit_button:{type:"boolean",default:!0,description:"Should the activity quit button be shown?"},show_fps:{type:"boolean",default:!1,description:"Should the FPS be shown?"},show_locale_picker:{type:"boolean",default:!1,description:"Should the icon that allows the participant to switch the locale be shown?"}},w={activity_begin_iso8601_timestamp:{type:"string",format:"date-time",description:"ISO 8601 timestamp at the beginning of the game activity."},trial_begin_iso8601_timestamp:{type:["string","null"],format:"date-time",description:"ISO 8601 timestamp at the beginning of the trial. Null if trial was skipped."},trial_end_iso8601_timestamp:{type:["string","null"],format:"date-time",description:"ISO 8601 timestamp at the end of the trial (when user presses 'Same' or 'Different'). Null if trial was skipped."},trial_index:{type:["integer","null"],description:"Index of the trial within this assessment, 0-based."},present_shapes:{description:"Configuration of shapes shown to the user in the presentation phase. Null if trial was skipped.",type:["array","null"],items:{type:"object",properties:{shape_index:{type:"integer",description:"Index of the shape within the library of shapes, 0-based"},color_name:{type:"string",description:"Human-friendly name of color."},rgba_color:{type:"array",description:"Color as array, [r,g,b,a].",items:{type:"number"}},location:{type:"object",description:"Location of shape.",properties:{row:{type:"number",description:"Row of the shape, 0-based."},column:{type:"number",description:"Column of the shape, 0-based."}}}}}},response_shapes:{description:"Configuration of shapes shown to the user in the response phase. Null if trial was skipped.",type:["array","null"],items:{type:"object",properties:{shape_index:{type:"integer",description:"Index of the shape within the library of shapes, 0-based"},color_name:{type:"string",description:"Human-friendly name of color."},rgba_color:{type:"array",description:"Color as array, [r,g,b,a].",items:{type:"number"}},location:{type:"object",description:"Location of shape.",properties:{row:{type:"number",description:"Row of the shape, 0-based."},column:{type:"number",description:"Column of the shape, 0-based."}}}}}},number_of_different_shapes:{type:["integer","null"],description:"Number of shapes shown with different colors in the response phase."},response_time_duration_ms:{type:["number","null"],description:"Milliseconds from when the response configuration of shapes is shown until the user taps a response. Null if trial was skipped."},user_response:{type:["string","null"],enum:["same","different"],description:"User's response to whether the shapes are same colors or different."},user_response_correct:{type:["boolean","null"],description:"Was the user's response correct?"},quit_button_pressed:{type:"boolean",description:"Was the quit button pressed?"}},l={name:"Color Shapes",id:"color-shapes",publishUuid:"394cb010-2ccf-4a87-9d23-cda7fb07a960",version:"0.8.18 (33cadc6d)",moduleMetadata:{name:"@m2c2kit/assessment-color-shapes",version:"0.8.18",dependencies:{"@m2c2kit/addons":"0.3.19","@m2c2kit/core":"0.3.20"}},translation:{configuration:{baseLocale:"en-US"},"en-US":{localeName:"English",INSTRUCTIONS_TITLE:"Color Shapes",SHORT_INSTRUCTIONS_TEXT_PAGE_1:"Try to remember the color of 3 shapes, because they will soon disappear. When the shapes reappear, answer whether they have the SAME or DIFFERENT colors as they had before",INSTRUCTIONS_TEXT_PAGE_1:"Try to remember the color of 3 shapes, because they will soon disappear.",INSTRUCTIONS_TEXT_PAGE_2:"Next you will see the same shapes reappear.",INSTRUCTIONS_TEXT_PAGE_3:"Answer whether the shapes have the SAME or DIFFERENT colors as they had before.",START_BUTTON_TEXT:"START",NEXT_BUTTON_TEXT:"Next",BACK_BUTTON_TEXT:"Back",GET_READY_COUNTDOWN_TEXT:"GET READY!",SAME_BUTTON_TEXT:"Same",DIFFERENT_BUTTON_TEXT:"Different",TRIALS_COMPLETE_SCENE_TEXT:"This activity is complete.",TRIALS_COMPLETE_SCENE_BUTTON_TEXT:"OK"},"de-DE":{localeName:"Deutsch",INSTRUCTIONS_TITLE:"Farb-Formen",INSTRUCTIONS_TEXT_PAGE_1:"Oben und unten sehen Sie Symbolpaare.",INSTRUCTIONS_TEXT_PAGE_2:"Ihre Aufgabe wird es sein, auf dasjenige untere Paar zu tippen, welches mit einem der obigen Paare exakt \xFCbereinstimmt.",INSTRUCTIONS_TEXT_PAGE_3:"Versuchen Sie bitte, so schnell und korrekt wie m\xF6glich zu sein.",START_BUTTON_TEXT:"START",NEXT_BUTTON_TEXT:"Weiter",BACK_BUTTON_TEXT:"Vorherige",GET_READY_COUNTDOWN_TEXT:"BEREIT MACHEN",SAME_BUTTON_TEXT:"Gleich",DIFFERENT_BUTTON_TEXT:"Unterschiedlich",TRIALS_COMPLETE_SCENE_TEXT:"Die Aufgabe ist beendet.",TRIALS_COMPLETE_SCENE_BUTTON_TEXT:"OK"}},shortDescription:"Color Shapes is a visual array change detection task, measuring intra-item feature binding, where participants determine if shapes change color across two sequential presentations of shape stimuli.",longDescription:'Color Shapes is a change detection paradigm used to measure visual short-term memory binding (Parra et al., 2009). Participants are asked to memorize the shapes and colors of three different polygons for 3 seconds. The three polygons are then removed from the screen and re-displayed at different locations, either having the same or different colors. Participants are then asked to decide whether the combination of colors and shapes are the "Same" or "Different" between the study and test phases.',showFps:e.show_fps.default,width:400,height:800,trialSchema:w,parameters:e,fonts:[{fontName:"roboto",url:"fonts/roboto/Roboto-Regular.ttf"}],images:[{imageName:"instructions-1",height:256,width:256,url:"images/cs-instructions-1.png"},{imageName:"instructions-2",height:256,width:256,url:"images/cs-instructions-2.png"},{imageName:"instructions-3",height:330,width:256,url:"images/cs-instructions-3.png"},{imageName:"circle-x",height:32,width:32,url:"images/circle-x.svg"}]};super(l)}async initialize(){await super.initialize();const e=this,w=96,a=350,l=e.getParameter("number_of_shapes_shown"),I=this.makeShapes(w);if(e.getParameter("show_quit_button")){const n=new ce({imageName:"circle-x",position:{x:380,y:20},isUserInteractionEnabled:!0});e.addFreeNode(n),n.onTapDown(s=>{e.removeAllFreeNodes(),s.handled=!0;const r=new y;e.addScene(r),e.presentScene(r),e.addTrialData("quit_button_pressed",!0),e.trialComplete(),e.cancel()})}let x;e.getParameter("show_locale_picker")&&(x=new me,e.addFreeNode(x));let m;const O=e.getParameter("instructions");if(O)m=V.create(O);else switch(e.getParameter("instruction_type")){case"short":{m=V.create({instructionScenes:[{title:"INSTRUCTIONS_TITLE",text:"SHORT_INSTRUCTIONS_TEXT_PAGE_1",imageName:"instructions-1",imageAboveText:!1,imageMarginTop:32,textFontSize:24,titleFontSize:30,textVerticalBias:.2,nextButtonText:"START_BUTTON_TEXT",nextButtonBackgroundColor:i.Green,nextSceneTransition:j.none()}]});break}case"long":{m=V.create({instructionScenes:[{title:"INSTRUCTIONS_TITLE",text:"INSTRUCTIONS_TEXT_PAGE_1",imageName:"instructions-1",imageAboveText:!1,imageMarginTop:32,textFontSize:24,titleFontSize:30,textVerticalBias:.2,nextButtonText:"NEXT_BUTTON_TEXT",backButtonText:"BACK_BUTTON_TEXT"},{title:"INSTRUCTIONS_TITLE",text:"INSTRUCTIONS_TEXT_PAGE_2",imageName:"instructions-2",imageAboveText:!1,imageMarginTop:32,textFontSize:24,titleFontSize:30,textVerticalBias:.2,nextButtonText:"NEXT_BUTTON_TEXT",backButtonText:"BACK_BUTTON_TEXT"},{title:"INSTRUCTIONS_TITLE",text:"INSTRUCTIONS_TEXT_PAGE_3",imageName:"instructions-3",imageAboveText:!1,imageMarginTop:32,textFontSize:24,titleFontSize:30,textVerticalBias:.2,nextButtonText:"START_BUTTON_TEXT",nextButtonBackgroundColor:i.Green,backButtonText:"BACK_BUTTON_TEXT"}]});break}default:throw new Error("invalid value for instruction_type")}m[0].onAppear(()=>{e.addTrialData("activity_begin_iso8601_timestamp",this.beginIso8601Timestamp)}),e.addScenes(m);const L=new ue({milliseconds:3e3,text:"GET_READY_COUNTDOWN_TEXT",zeroDwellMilliseconds:1e3,transition:j.none()});e.addScene(L);const F=e.getParameter("cells_per_side"),K=e.getParameter("cells_per_side"),G=e.getParameter("number_of_trials"),A=e.getParameter("shape_colors"),R=[],W=e.getParameter("cells_per_side"),Y=W,ne=e.getParameter("number_of_different_colors_trials"),se=_.FromRangeWithoutReplacement(ne,0,G-1);for(let n=0;n<G;n++){const s=new Array,r=new Array,C=_.FromRangeWithoutReplacement(l,0,I.length-1),E=_.FromRangeWithoutReplacement(l,0,A.length-1),X=o=>!!(o.map(t=>t.row===0&&t.column===0).some(t=>t===!0)&&o.map(t=>t.row===1&&t.column===1).some(t=>t===!0)&&o.map(t=>t.row===2&&t.column===2).some(t=>t===!0)||o.map(t=>t.row===2&&t.column===0).some(t=>t===!0)&&o.map(t=>t.row===1&&t.column===1).some(t=>t===!0)&&o.map(t=>t.row===0&&t.column===2).some(t=>t===!0)),p=o=>{const t=new Set(o.map(N=>N.row)).size,g=new Set(o.map(N=>N.column)).size;return!(t!==1&&g!==1)};let z=!1,P;do P=_.FromGridWithoutReplacement(l,W,Y),!p(P)&&!X(P)?z=!0:z=!1;while(!z);for(let o=0;o<l;o++){const t={shape:I[C[o]],shapeIndex:C[o],color:A[E[o]].rgbaColor,colorName:A[E[o]].colorName,location:P[o]};s.push(t)}let q=!1,v;do v=_.FromGridWithoutReplacement(l,W,Y),!p(v)&&!X(v)?q=!0:q=!1;while(!q);for(let o=0;o<l;o++){const t={shape:s[o].shape,shapeIndex:C[o],color:s[o].color,colorName:A[E[o]].colorName,location:v[o]};r.push(t)}let $=0;if(se.includes(n)){const o=_.SingleFromRange(2,l),g=_.FromRangeWithoutReplacement(o,0,l-1).map(T=>r[T]);$=g.length;const N=g[0].color;for(let T=0;T<o;T++){const ee=g[T];T+1<o?ee.color=g[T+1].color:ee.color=N}}R.push({presentShapes:s,responseShapes:r,numberOfShapesWithDifferentColors:$})}const b=new y;e.addScene(b);const Q=new c({rect:{size:{width:a,height:a}},fillColor:i.Transparent,strokeColor:i.Gray,lineWidth:4,position:{x:200,y:300}});b.addChild(Q);const re=new te({text:"+",fontSize:32,fontColor:i.Black,localize:!1});Q.addChild(re),b.onAppear(()=>{e.addTrialData("activity_begin_iso8601_timestamp",this.beginIso8601Timestamp),e.addTrialData("trial_begin_iso8601_timestamp",new Date().toISOString()),b.run(h.sequence([h.wait({duration:e.getParameter("fixation_duration_ms")}),h.custom({callback:()=>{e.presentScene(f)}})]))});const f=new y;e.addScene(f);const ae=new c({rect:{size:{width:a,height:a}},fillColor:i.Transparent,strokeColor:i.Gray,lineWidth:4,position:{x:200,y:300}});f.addChild(ae);const U=new oe({rows:F,columns:K,size:{width:a,height:a},position:{x:200,y:300},backgroundColor:i.Transparent,gridLineColor:i.Transparent});f.addChild(U),f.onAppear(()=>{const n=R[e.trialIndex];for(let s=0;s<n.presentShapes.length;s++){const r=n.presentShapes[s].shape;r.fillColor=n.presentShapes[s].color,r.position={x:0,y:0},U.addAtCell(r,n.presentShapes[s].location.row,n.presentShapes[s].location.column)}f.run(h.sequence([h.wait({duration:e.getParameter("shapes_presented_duration_ms")}),h.custom({callback:()=>{U.removeAllGridChildren()}}),h.wait({duration:e.getParameter("shapes_removed_duration_ms")}),h.custom({callback:()=>{U.removeAllGridChildren(),e.presentScene(u)}})]))});const u=new y;e.addScene(u);const ie=new c({rect:{size:{width:a,height:a}},fillColor:i.Transparent,strokeColor:i.Gray,lineWidth:4,position:{x:200,y:300}});u.addChild(ie);const M=new oe({rows:F,columns:K,size:{width:a,height:a},position:{x:200,y:300},backgroundColor:i.Transparent,gridLineColor:i.Transparent});u.addChild(M),u.onAppear(()=>{const n=R[e.trialIndex];for(let s=0;s<n.responseShapes.length;s++){const r=n.responseShapes[s].shape;r.fillColor=n.responseShapes[s].color,r.position={x:0,y:0},M.addAtCell(r,n.responseShapes[s].location.row,n.responseShapes[s].location.column)}B.isUserInteractionEnabled=!0,D.isUserInteractionEnabled=!0,H.startNew("rt")});const B=new Z({text:"SAME_BUTTON_TEXT",position:{x:100,y:700},size:{width:150,height:50}});u.addChild(B),B.onTapDown(()=>{B.isUserInteractionEnabled=!1,J(!1)});const D=new Z({text:"DIFFERENT_BUTTON_TEXT",position:{x:300,y:700},size:{width:150,height:50}});u.addChild(D),D.onTapDown(()=>{D.isUserInteractionEnabled=!1,J(!0)});const J=n=>{const s=H.elapsed("rt");H.remove("rt"),M.removeAllGridChildren(),e.addTrialData("trial_end_iso8601_timestamp",new Date().toISOString());const r=R[e.trialIndex];e.addTrialData("response_time_duration_ms",s),e.addTrialData("number_of_different_shapes",r.numberOfShapesWithDifferentColors),e.addTrialData("user_response",n?"different":"same");const C=r.numberOfShapesWithDifferentColors===0&&!n||r.numberOfShapesWithDifferentColors>0&&n;e.addTrialData("user_response_correct",C);const E=r.presentShapes.map(p=>({shape_index:p.shapeIndex,color_name:p.colorName,rgba_color:p.color,location:p.location}));e.addTrialData("present_shapes",E),e.addTrialData("quit_button_pressed",!1);const X=r.responseShapes.map(p=>({shape_index:p.shapeIndex,color_name:p.colorName,rgba_color:p.color,location:p.location}));e.addTrialData("response_shapes",X),e.addTrialData("trial_index",e.trialIndex),e.trialComplete(),e.trialIndex<G?e.presentScene(b):e.presentScene(S,j.slide({direction:he.Left,duration:500,easing:de.sinusoidalInOut}))},S=new y;e.addScene(S);const le=new te({text:"TRIALS_COMPLETE_SCENE_TEXT",position:{x:200,y:400}});S.addChild(le);const k=new Z({text:"TRIALS_COMPLETE_SCENE_BUTTON_TEXT",position:{x:200,y:650}});k.isUserInteractionEnabled=!0,k.onTapDown(()=>{k.isUserInteractionEnabled=!1,S.removeAllChildren(),e.end()}),S.addChild(k),S.onSetup(()=>{e.removeAllFreeNodes()})}makeShapes(e){const w=new c({path:{pathString:d[0],height:e},lineWidth:0}),a=new c({path:{pathString:d[1],height:e},lineWidth:0}),l=new c({path:{pathString:d[2],height:e*.8},lineWidth:0}),I=new c({path:{pathString:d[3],height:e},lineWidth:0}),x=new c({path:{pathString:d[4],height:e*.8},lineWidth:0}),m=new c({path:{pathString:d[5],height:e},lineWidth:0}),O=new c({path:{pathString:d[6],height:e},lineWidth:0}),L=new c({path:{pathString:d[7],height:e},lineWidth:0});return[w,a,l,I,x,m,O,L]}}const d=["M0 89.94v-2L131.95 0h2v88.7c2.34 1.6 4.47 3.11 6.65 4.55 42.77 28.22 85.54 56.42 128.3 84.63v2c-44.65 29.65-89.3 59.29-133.95 88.94h-1v-90.84C89.44 148.72 44.72 119.33 0 89.94Z","M162 188c-.33 27-.67 54-1 81-26.87-26.18-53.74-52.35-80-77.94V269H0C0 180.83 0 92.67.04 4.5.04 3 .67 1.5 1 0c24.64 29.1 49.15 58.31 73.96 87.26 28.88 33.7 58.01 67.17 87.04 100.74Z","M3 148.86V61.12C41.76 40.75 80.52 20.37 119.28 0h2.91c21.32 20.7 42.64 41.4 63.96 62.11v89.71c-38.44 20.04-76.88 40.09-115.31 60.13h-2.91L3.01 148.86Z","M134 0h2c7.26 22.31 14.38 44.67 21.86 66.9 3.91 11.61 5.47 29.91 13.25 33.27C203 113.94 236.86 123.13 270 134v1L136 269h-1c-11.04-33.58-22.08-67.16-33.21-101.03C67.87 156.98 33.93 145.99 0 135v-1L134 0Z","M107 0h1l108 108v1c-26.67 35.33-53.33 70.66-80 106h-1c-8.82-35.03-17.64-70.07-27-107.28C98.62 145.01 89.81 180 81.01 215h-1C53.33 179.66 26.67 144.33 0 109v-2L107 0Z","M0 1C2.17.67 4.33.05 6.5.04 58.33-.01 110.17 0 162 0v270H2c26.2-22.17 52.41-44.33 78.86-66.71V67.4c-3.85-3.22-7.35-6.2-10.9-9.11C46.64 39.18 23.32 20.09 0 1Z","M95 268.99h-1C62.66 238.66 31.33 208.33 0 178V88C26.67 58.67 53.33 29.33 80 0h1c0 29.45 0 58.89-.01 88.38 35.99 29.57 72 59.09 108.01 88.61v1l-94 91Z","M13 0h67l135 135v1L81 270c-27-.33-54-.67-81-1 11.73-12.51 23.61-24.87 35.16-37.54 33.14-36.35 66.14-72.82 100.23-110.38C94.4 80.52 53.7 40.26 13 0Z"];export{Te as ColorShapes};
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@m2c2kit/assessment-color-shapes",
3
- "version": "0.8.16",
3
+ "version": "0.8.18",
4
4
  "m2c2kit": {
5
5
  "assessmentId": "color-shapes"
6
6
  },
7
7
  "description": "A visual array change detection task, measuring intra-item feature binding, where participants determine if shapes change color across two sequential presentations of shape stimuli",
8
8
  "scripts": {
9
- "build": "npm run clean && tsc && rollup -c",
10
- "clean": "rimraf build dist .rollup.cache tsconfig.tsbuildinfo"
9
+ "build": "npm run clean && tsc && rollup -c && npm run schemas",
10
+ "serve": "concurrently \"rollup -c rollup.config.runner.mjs --watch --configServe\" \"tsc --project tsconfig.runner.json --watch\" --names rollup,typescript --prefix-colors auto,red",
11
+ "schemas": "schema-util list --schema=all --files=src/index.ts --format=json-schema --title=\"Color Shapes version __VERSION__\" > schemas.json",
12
+ "clean": "rimraf build dist .rollup.cache tsconfig.tsbuildinfo tsconfig.runner.tsbuildinfo"
11
13
  },
12
14
  "main": "./dist/index.js",
13
15
  "module": "./dist/index.js",
@@ -20,10 +22,9 @@
20
22
  }
21
23
  },
22
24
  "files": [
23
- "dist",
24
- "!*.d.ts.map",
25
- "assets",
26
- "metadata.json"
25
+ "dist/**",
26
+ "assets/**",
27
+ "schemas.json"
27
28
  ],
28
29
  "license": "MIT",
29
30
  "author": {
@@ -37,18 +38,19 @@
37
38
  },
38
39
  "homepage": "https://m2c2-project.github.io/m2c2kit",
39
40
  "dependencies": {
40
- "@m2c2kit/addons": "^0.3.15",
41
- "@m2c2kit/core": "^0.3.18"
41
+ "@m2c2kit/addons": "0.3.19",
42
+ "@m2c2kit/core": "0.3.20"
42
43
  },
43
44
  "devDependencies": {
44
- "@m2c2kit/build-helpers": "^0.3.14",
45
+ "@m2c2kit/build-helpers": "0.3.17",
46
+ "@m2c2kit/session": "0.3.3",
45
47
  "@rollup/plugin-node-resolve": "15.2.3",
46
48
  "@rollup/plugin-replace": "5.0.7",
47
- "rimraf": "5.0.7",
48
- "rollup": "4.18.0",
49
+ "rimraf": "6.0.1",
50
+ "rollup": "4.20.0",
49
51
  "rollup-plugin-copy": "3.5.0",
50
52
  "rollup-plugin-esbuild": "6.1.1",
51
- "typescript": "5.4.5"
53
+ "typescript": "5.5.4"
52
54
  },
53
55
  "engines": {
54
56
  "node": ">=18"
package/schemas.json ADDED
@@ -0,0 +1,372 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "title": "Color Shapes version 0.8.18, 33cadc6d",
4
+ "type": "object",
5
+ "description": "All game schemas",
6
+ "properties": {
7
+ "GameParameters": {
8
+ "type": "object",
9
+ "description": "Game parameters schema",
10
+ "properties": {
11
+ "fixation_duration_ms": {
12
+ "default": 500,
13
+ "description": "How long fixation scene is shown, milliseconds.",
14
+ "type": "number"
15
+ },
16
+ "shape_colors": {
17
+ "type": "array",
18
+ "description": "Array of colors for shapes.",
19
+ "items": {
20
+ "type": "object",
21
+ "properties": {
22
+ "colorName": {
23
+ "type": "string",
24
+ "description": "Human-friendly name of color."
25
+ },
26
+ "rgbaColor": {
27
+ "type": "array",
28
+ "description": "Color as array, [r,g,b,a].",
29
+ "items": {
30
+ "type": "number"
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "default": [
36
+ {
37
+ "colorName": "black",
38
+ "rgbaColor": [
39
+ 0,
40
+ 0,
41
+ 0,
42
+ 1
43
+ ]
44
+ },
45
+ {
46
+ "colorName": "green",
47
+ "rgbaColor": [
48
+ 0,
49
+ 158,
50
+ 115,
51
+ 1
52
+ ]
53
+ },
54
+ {
55
+ "colorName": "yellow",
56
+ "rgbaColor": [
57
+ 240,
58
+ 228,
59
+ 66,
60
+ 1
61
+ ]
62
+ },
63
+ {
64
+ "colorName": "blue",
65
+ "rgbaColor": [
66
+ 0,
67
+ 114,
68
+ 178,
69
+ 1
70
+ ]
71
+ },
72
+ {
73
+ "colorName": "orange",
74
+ "rgbaColor": [
75
+ 213,
76
+ 94,
77
+ 0,
78
+ 1
79
+ ]
80
+ },
81
+ {
82
+ "colorName": "pink",
83
+ "rgbaColor": [
84
+ 204,
85
+ 121,
86
+ 167,
87
+ 1
88
+ ]
89
+ }
90
+ ]
91
+ },
92
+ "number_of_shapes_shown": {
93
+ "default": 3,
94
+ "description": "How many shapes to show on the grid at one time.",
95
+ "type": "integer"
96
+ },
97
+ "shapes_presented_duration_ms": {
98
+ "default": 2000,
99
+ "description": "How long the shapes are shown, milliseconds.",
100
+ "type": "number"
101
+ },
102
+ "shapes_removed_duration_ms": {
103
+ "default": 1000,
104
+ "description": "How long to show a blank square after shapes are removed, milliseconds.",
105
+ "type": "number"
106
+ },
107
+ "cells_per_side": {
108
+ "default": 3,
109
+ "description": "How many cell positions for each side of the square grid (e.g., 3 is a 3x3 grid; 4 is a 4x4 grid).",
110
+ "type": "integer"
111
+ },
112
+ "number_of_different_colors_trials": {
113
+ "default": 2,
114
+ "type": "integer",
115
+ "description": "Number of trials where the shapes have different colors. If shapes have different colors in a trial, anywhere from 2 to (number of shapes) will be given different colors."
116
+ },
117
+ "number_of_trials": {
118
+ "default": 4,
119
+ "description": "How many trials to run.",
120
+ "type": "integer"
121
+ },
122
+ "show_trials_complete_scene": {
123
+ "default": true,
124
+ "type": "boolean",
125
+ "description": "After the final trial, should a completion scene be shown? Otherwise, the game will immediately end."
126
+ },
127
+ "instruction_type": {
128
+ "default": "long",
129
+ "description": "Type of instructions to show, 'short' or 'long'.",
130
+ "type": "string",
131
+ "enum": [
132
+ "short",
133
+ "long"
134
+ ]
135
+ },
136
+ "instructions": {
137
+ "default": null,
138
+ "type": [
139
+ "object",
140
+ "null"
141
+ ],
142
+ "description": "When non-null, an InstructionsOptions object that will completely override the built-in instructions."
143
+ },
144
+ "show_quit_button": {
145
+ "type": "boolean",
146
+ "default": true,
147
+ "description": "Should the activity quit button be shown?"
148
+ },
149
+ "show_fps": {
150
+ "type": "boolean",
151
+ "default": false,
152
+ "description": "Should the FPS be shown?"
153
+ },
154
+ "show_locale_picker": {
155
+ "type": "boolean",
156
+ "default": false,
157
+ "description": "Should the icon that allows the participant to switch the locale be shown?"
158
+ }
159
+ }
160
+ },
161
+ "TrialSchema": {
162
+ "type": "object",
163
+ "description": "Trial data schema",
164
+ "properties": {
165
+ "study_id": {
166
+ "type": [
167
+ "string",
168
+ "null"
169
+ ],
170
+ "description": "The short human-readable text ID of the study (protocol, experiment, or other aggregate) that contains the administration of this activity."
171
+ },
172
+ "study_uuid": {
173
+ "type": [
174
+ "string",
175
+ "null"
176
+ ],
177
+ "format": "uuid",
178
+ "description": "Unique identifier of the study (protocol, experiment, or other aggregate) that contains the administration of this activity."
179
+ },
180
+ "document_uuid": {
181
+ "type": "string",
182
+ "format": "uuid",
183
+ "description": "Unique identifier for this data document."
184
+ },
185
+ "session_uuid": {
186
+ "type": "string",
187
+ "format": "uuid",
188
+ "description": "Unique identifier for all activities in this administration of the session. This identifier changes each time a new session starts."
189
+ },
190
+ "activity_uuid": {
191
+ "type": "string",
192
+ "format": "uuid",
193
+ "description": "Unique identifier for all trials in this administration of the activity. This identifier changes each time the activity starts."
194
+ },
195
+ "activity_id": {
196
+ "type": "string",
197
+ "description": "Human-readable identifier of the activity."
198
+ },
199
+ "activity_publish_uuid": {
200
+ "type": "string",
201
+ "format": "uuid",
202
+ "description": "Persistent unique identifier of the activity. This identifier never changes. It can be used to identify the activity across different studies and sessions."
203
+ },
204
+ "activity_version": {
205
+ "type": "string",
206
+ "description": "Version of the activity."
207
+ },
208
+ "device_timezone": {
209
+ "type": "string",
210
+ "description": "Timezone of the device. Calculated from Intl.DateTimeFormat().resolvedOptions().timeZone."
211
+ },
212
+ "device_timezone_offset_minutes": {
213
+ "type": "integer",
214
+ "description": "Difference in minutes between UTC and device timezone. Calculated from Date.getTimezoneOffset()."
215
+ },
216
+ "locale": {
217
+ "type": [
218
+ "string",
219
+ "null"
220
+ ],
221
+ "description": "Locale of the trial. null if the activity does not support localization."
222
+ },
223
+ "activity_begin_iso8601_timestamp": {
224
+ "type": "string",
225
+ "format": "date-time",
226
+ "description": "ISO 8601 timestamp at the beginning of the game activity."
227
+ },
228
+ "trial_begin_iso8601_timestamp": {
229
+ "type": [
230
+ "string",
231
+ "null"
232
+ ],
233
+ "format": "date-time",
234
+ "description": "ISO 8601 timestamp at the beginning of the trial. Null if trial was skipped."
235
+ },
236
+ "trial_end_iso8601_timestamp": {
237
+ "type": [
238
+ "string",
239
+ "null"
240
+ ],
241
+ "format": "date-time",
242
+ "description": "ISO 8601 timestamp at the end of the trial (when user presses 'Same' or 'Different'). Null if trial was skipped."
243
+ },
244
+ "trial_index": {
245
+ "type": [
246
+ "integer",
247
+ "null"
248
+ ],
249
+ "description": "Index of the trial within this assessment, 0-based."
250
+ },
251
+ "present_shapes": {
252
+ "description": "Configuration of shapes shown to the user in the presentation phase. Null if trial was skipped.",
253
+ "type": [
254
+ "array",
255
+ "null"
256
+ ],
257
+ "items": {
258
+ "type": "object",
259
+ "properties": {
260
+ "shape_index": {
261
+ "type": "integer",
262
+ "description": "Index of the shape within the library of shapes, 0-based"
263
+ },
264
+ "color_name": {
265
+ "type": "string",
266
+ "description": "Human-friendly name of color."
267
+ },
268
+ "rgba_color": {
269
+ "type": "array",
270
+ "description": "Color as array, [r,g,b,a].",
271
+ "items": {
272
+ "type": "number"
273
+ }
274
+ },
275
+ "location": {
276
+ "type": "object",
277
+ "description": "Location of shape.",
278
+ "properties": {
279
+ "row": {
280
+ "type": "number",
281
+ "description": "Row of the shape, 0-based."
282
+ },
283
+ "column": {
284
+ "type": "number",
285
+ "description": "Column of the shape, 0-based."
286
+ }
287
+ }
288
+ }
289
+ }
290
+ }
291
+ },
292
+ "response_shapes": {
293
+ "description": "Configuration of shapes shown to the user in the response phase. Null if trial was skipped.",
294
+ "type": [
295
+ "array",
296
+ "null"
297
+ ],
298
+ "items": {
299
+ "type": "object",
300
+ "properties": {
301
+ "shape_index": {
302
+ "type": "integer",
303
+ "description": "Index of the shape within the library of shapes, 0-based"
304
+ },
305
+ "color_name": {
306
+ "type": "string",
307
+ "description": "Human-friendly name of color."
308
+ },
309
+ "rgba_color": {
310
+ "type": "array",
311
+ "description": "Color as array, [r,g,b,a].",
312
+ "items": {
313
+ "type": "number"
314
+ }
315
+ },
316
+ "location": {
317
+ "type": "object",
318
+ "description": "Location of shape.",
319
+ "properties": {
320
+ "row": {
321
+ "type": "number",
322
+ "description": "Row of the shape, 0-based."
323
+ },
324
+ "column": {
325
+ "type": "number",
326
+ "description": "Column of the shape, 0-based."
327
+ }
328
+ }
329
+ }
330
+ }
331
+ }
332
+ },
333
+ "number_of_different_shapes": {
334
+ "type": [
335
+ "integer",
336
+ "null"
337
+ ],
338
+ "description": "Number of shapes shown with different colors in the response phase."
339
+ },
340
+ "response_time_duration_ms": {
341
+ "type": [
342
+ "number",
343
+ "null"
344
+ ],
345
+ "description": "Milliseconds from when the response configuration of shapes is shown until the user taps a response. Null if trial was skipped."
346
+ },
347
+ "user_response": {
348
+ "type": [
349
+ "string",
350
+ "null"
351
+ ],
352
+ "enum": [
353
+ "same",
354
+ "different"
355
+ ],
356
+ "description": "User's response to whether the shapes are same colors or different."
357
+ },
358
+ "user_response_correct": {
359
+ "type": [
360
+ "boolean",
361
+ "null"
362
+ ],
363
+ "description": "Was the user's response correct?"
364
+ },
365
+ "quit_button_pressed": {
366
+ "type": "boolean",
367
+ "description": "Was the quit button pressed?"
368
+ }
369
+ }
370
+ }
371
+ }
372
+ }