Commit Graph

290 Commits

Author SHA1 Message Date
Becky Gilbert
37d8f9f4ad replace all instances of jsPsych.init with initJsPsych/jsPsych.run in HTML files 2021-09-16 10:15:12 -07:00
bjoluc
6a8596fb76 Merge branch 'main' into modularization 2021-09-14 20:36:05 +02: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
5e6c5d2352 expand reconstruction demo, make rdk demo only open in new tab 2021-08-30 13:04:14 -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
Becky Gilbert
e917fabb55 fix typo 2021-05-20 10:41:59 -07:00
Josh de Leeuw
a991b7b997 move webgazer files 2021-04-09 12:03:02 -04:00
Josh de Leeuw
3ce8aea220 improve timing in webgazer and utilize in jspsych 2021-04-09 10:52:09 -04:00
Josh de Leeuw
221b7df052 get threaded ridge regression working, update docs, example, improve extension code 2021-04-08 15:22:58 -04:00
Josh de Leeuw
3de308ec42 update DOM tracking for webgazer, shift to setInterval method for sampling data 2021-04-07 18:15:51 -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
4b5c90fdf1 tweak example and comments 2021-02-20 15:10:04 -08:00
Becky Gilbert
96bdaceefc add save-trial-parameters example #823 2021-02-20 14:57:29 -08:00
Becky Gilbert
c803baec86 remove unused blindspot_start_prompt param, minor edits to text for clarity 2021-02-20 11:53:59 -08:00
Becky Gilbert
4c9bd25f5c remove unused CSS 2021-02-19 18:22:36 -08:00
Becky Gilbert
0675af8fff remove unused CSS 2021-02-19 18:22:12 -08:00
Becky Gilbert
91fc6205fc switch to css_classes parameter for stim font sizes 2021-02-19 18:21:40 -08:00
Becky Gilbert
0820abd2c0 remove unused plugin file 2021-02-19 18:20:58 -08:00
Becky Gilbert
c033d31643 add/fix preload trials in examples 2021-02-19 18:20:26 -08:00
Josh de Leeuw
2e50b1319e
Merge pull request #1442 from GEJ1/master
virtual-chinrest plugin, with resizing ability
2021-02-19 17:26:33 -05:00
Josh de Leeuw
0ed04b412a break when incompatible parameters 2021-02-19 17:17:52 -05:00
Josh de Leeuw
25ee508ea1 add test stimulus at the end of the trial 2021-02-19 16:53:42 -05:00
Becky Gilbert
2f3e6170f7 add freesort column_spread_factor parameter to control compression/expansion of image columns along x-axis 2021-02-19 12:07:44 -08:00
Becky Gilbert
42e4908dd1 Merge branch 'master' into freesort 2021-02-19 10:39:36 -08:00
Becky Gilbert
82cbd46a44 fix image position in example 2021-02-18 16:45:11 -08:00
Becky Gilbert
bb7b3f0570
Merge pull request #1228 from kurokida/freesort
for using the free-sort plugin with a touch device.
2021-02-18 16:40:28 -08:00
Becky Gilbert
51017c50d9 Merge branch 'master' into feature-key-code-update 2021-02-18 15:16:34 -08:00
Josh de Leeuw
4b1e05f448 fix example #1538 2021-02-18 17:37:28 -05:00
Josh de Leeuw
3152d16468 Merge branch 'master' into pr/pjkohler/1442 2021-02-18 16:58:00 -05:00
Becky Gilbert
2c28278ad5 change direct key comparisons to use jsPsych.pluginAPI.compareKeys to allow for case sensitive or insensitive comparison #396 2021-02-18 12:52:10 -08:00
Josh de Leeuw
2da7e6ccaa more refactoring 2021-02-18 10:39:08 -05:00
Becky Gilbert
4fbfe94e4c change key_press to response in docs and examples 2021-02-17 16:24:27 -08:00
Becky Gilbert
85e3d6d5bb change button_pressed to response in example 2021-02-17 16:23:59 -08:00
Josh de Leeuw
bc33117135 refactor 2021-02-17 17:35:23 -05:00
Becky Gilbert
95099d1a46 add preload trial 2021-02-17 11:10:34 -08:00
Josh de Leeuw
d0a9a7c6c1 update webgazer image example 2021-02-16 09:34:33 -05:00
Josh de Leeuw
9a2c22a8b5 change validation instructions in demo 2021-02-16 09:24:52 -05:00
Josh de Leeuw
c70af691e4 add webgazer back in 2021-02-15 21:53:49 -05:00
Josh de Leeuw
e5a8a77ef3 Merge branch 'master' into feature-plugin-extensions 2021-02-15 21:44:45 -05:00
GEJ1
a9bbc9664a I remove: all the jQuery code, the mouse_adjustment option because use the jQuery slider. 2021-02-15 15:47:25 -03:00
Josh de Leeuw
7f5870d55e update RT docs 2021-02-13 08:56:57 -05:00
Becky Gilbert
f1ee56973a switch to preloading via preload plugin in example files 2021-02-11 12:12:53 -08:00
Becky Gilbert
c8298e226f merge master into preload plugin branch and fix merge conflict 2021-02-09 10:57:46 -08:00
Josh de Leeuw
b10c69eb21
Merge branch 'master' into feature-key-code-update 2021-02-08 22:00:09 -05:00
Becky Gilbert
89833f2048 update case-sensitive example 2021-02-08 17:20:24 -08:00
Becky Gilbert
ce2e4ddc74 change key prompt to lowercase 2021-02-08 17:04:24 -08:00
Becky Gilbert
3e919acfc5 add webgazer example with image (for testing) 2021-02-05 16:38:08 -08: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
Becky Gilbert
711504887f add case_sensitive_responses option to jsPsych.init, add tests and example #396 2021-02-04 17:31:51 -08:00