Commit Graph

7 Commits

Author SHA1 Message Date
Josh de Leeuw
2cea5640f7 use string as seed 2022-03-11 12:31:47 -05:00
Josh de Leeuw
83b1ba291f add setSeed to randomization 2021-12-07 11:03:48 -05:00
Josh de Leeuw
522aa2cdbf
Adding a simulation mode (#2287)
Implements simulation mode in the core library, supporting API features, and plugin support in most plugins.
2021-11-23 15:12:30 -05:00
bjoluc
9d8e39aaae Modernize factorial function 2021-09-15 11:23:26 +02:00
Josh de Leeuw
8e58f6e160 cleanup of issues IDed in review 2021-08-23 15:01:21 -04:00
Josh de Leeuw
9b2fc7e68b reimplement factorial() method, add tests, replace var with let/const 2021-08-23 11:41:50 -04:00
bjoluc
8cfbba526a Use classes to avoid global state
Instead of a global `jsPsych` object, there is a `JsPsych` class now
which can be instantiated with the parameters that were previously
accepted by `jsPsych.init`. Upon instantiation, the `JsPsych` class also
instantiates classes for stateful modules (`jsPsych.data` and
`jsPsych.pluginAPI`) and passes relevant `JsPsych` instance information
to them. Plugins are expected to be classes now that are instantiated
for each trial and receive the `JsPsych` instance as their only
constructor argument.
2021-07-12 18:15:37 +02:00