Commit Graph

21 Commits

Author SHA1 Message Date
jade
2f859b8887 fix to use evaluateTimelineVariable 2024-11-20 01:51:41 -05:00
Becky Gilbert
db754538b7
Convert plugins to classes and update examples (#2078)
* modularize plugins: edit index.ts and example files (WIP)

* continue modularizing plugins: edit index.ts and example files (WIP)

* continue modularizing plugins: edit index.ts and example files (WIP)

* continue modularizing plugins and example files, make info static in plugin classes

* add preload flag to plugin info, fix a few parameterType values

* change preload flags in plugin info from audio/image/video strings to boolean

* convert more plugins and example files

* convert more plugins/examples, sync with webgazer branch plugins/examples (not working on this branch)

* remove preload flag from info, change to ParameterType, change to "ALL_KEYS"/"NO_KEYS", change KEY type to KEYS for array params

* remove descriptions from plugin info, fix some ALL_KEYS/NO_KEYS errors

* remove descriptions and add pretty names to plugin info

* remove/edit comments re ALL_KEYS/NO_KEYS and TS errors

* fix some preload plugin errors and convert example file (plugin still not working due to getAutoPreloadList)

* convert RDK plugin and example file

* convert preload plugin and example, add JsPsych getTimelineDescription method for auto-preloading (still not working for audio due to getAudioBuffer

* fix jsPsych getTimelineDescription method so that it does recursive search

* add image and video preloading to plugin examples

* Merge branch 'modularization' into modularization-plugins

* add tests for reconstruction

* fix timeline array getter method: add private timelineDescription var, set to timeline array in run(), rename getTimelineDescription to getTimeline

* changes in response to PR review: fix JsDoc comments, fix array: true in param info, change HTML string param types, add JsDoc author/file/see docs for all plugin classes, switch to @ts-expect-error. Thanks @bjoluc!

* fix JsDoc comments for plugin classes and preload trials parameter

* change preload type to boolean in ParameterInfo interface, and add `preload: false` to virtual-chinrest item_path image parameter

* All my tests except for preload plugin (will do that tomorrow)

* minor fixes to reconstruction tests

* Update preload plugin tests

* Finish test conversion

* switch to arrow functions to fix this keyword errors in plugins, add audio preloading into plugin example files, fix typos

* convert non-plugin example files (WIP, not tested)

* Fix allow_held_keys -> allow_held_key parameter in virtual-chinrest plugin

* Fix `keyboardListener` type in serial-reaction-time plugin

* type fixes for RDK, simplifying `correctOrNot()` function

* fixed ["ALL_KEYS"] => "ALL_KEYS" for iat plugins and tests

* Build jspsych packages before everything else

Dependent builds were previously failing due to missing type definitions

* Remove console.log from html-keyboard-response tests

I think I accidentially committed it.

* fix the delayed start to animation bug (#1885)

* round all RTs to nearest int (#2108)

* fixes and tests #1900 - IAT parameter problems

* finish converting/testing example files, add init settings, add audio preloading, fix errors

* fix progress-bar timeline to demo an example where auto-updating the progress bar works well

* Revert "round all RTs to nearest int (#2108)"

This reverts commit f53145d2e3.

* change how delayed timeline variables are implemented

* use static for generate_stimulus method so that it can be called on the vsl-grid-scene class

* fix external-html plugin and example (switch to arrow function for proper this context, fix incorrect parameter name)

* remove outdated TO DO comments

Co-authored-by: bjoluc <mail@bjoluc.de>
Co-authored-by: Josh de Leeuw <josh.deleeuw@gmail.com>
2021-09-08 09:44:53 -04:00
Josh de Leeuw
b3b9f5fd5e
Create modular versions of extensions (#2053)
Extensions are now passed to the `JsPsych` constructor via an `extensions` option.
Along the way, the webgazer plugins and plugin-html-button-response have been modularized as well.

Co-authored-by: bjoluc <mail@bjoluc.de>
Co-authored-by: Becky Gilbert <beckyannegilbert@gmail.com>
2021-08-20 11:15:33 +02:00
Josh de Leeuw
a991b7b997 move webgazer files 2021-04-09 12:03:02 -04:00
Josh de Leeuw
d330c4ad7d separate camera init from experiment init; dot size options 2021-03-01 10:16:42 -05:00
Becky Gilbert
85e3d6d5bb change button_pressed to response in example 2021-02-17 16:23:59 -08:00
Josh de Leeuw
9a2c22a8b5 change validation instructions in demo 2021-02-16 09:24:52 -05:00
Josh de Leeuw
af95ebe7c1 create targets parameter for webgazer ext 2021-02-05 14:16:03 -05:00
Josh de Leeuw
c6fe79549c update demo experiment with data saving 2021-02-05 13:31:26 -05:00
Josh de Leeuw
d8ee2d2b02 update example for webgazer, fix bug in validate 2021-02-04 17:41:45 -05:00
Josh de Leeuw
00cca0e52b move instructions out of validation plugin 2021-02-04 17:34:38 -05:00
Josh de Leeuw
ad051b0e36 add new calibration pattern 2021-01-22 10:12:02 -05:00
Josh de Leeuw
9225d27f0d improving validation plugin options 2021-01-21 18:19:28 -05:00
Josh de Leeuw
399cccdd27 add center-offset-pixels mode 2021-01-19 16:04:54 -05:00
Josh de Leeuw
b78efaac73 adding a validation accuracy metric 2021-01-14 15:33:41 -05:00
Josh de Leeuw
42f54f0fb3 tweaking calibration and validation scripts 2021-01-13 09:47:11 -05:00
Josh de Leeuw
b146037af3 calibration + validation sort of working... 2021-01-12 17:52:41 -05:00
Josh de Leeuw
562e993f9c adding a calibration routine, but it's not great 2021-01-02 17:20:21 -05:00
Josh de Leeuw
0ac9fc0d5a add event hooks in jspsych.js 2021-01-02 13:55:50 -05:00
Josh de Leeuw
26a70adc05 filling out extension code 2021-01-02 13:44:28 -05:00
Josh de Leeuw
9c22731413 begin working on webgazer extensions 2021-01-01 21:26:03 -05:00