diff --git a/README.md b/README.md index 7989832c..ca613021 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,62 @@ - + -jsPsych is a JavaScript library for creating behavioral experiments that run in a web browser. It provides a framework for defining experiments using a set of flexible plugins that create different kinds of events, and collect different kinds of data. By assembling these plugins together, it is possible to create a wide range of online experiments. +jsPsych is a JavaScript framework for creating behavioral experiments that run in a web browser. -jsPsych experiments are created using the languages of the Web: HTML, CSS, and JavaScript. JavaScript is the programming language used by web browsers. It provides the most control and flexibility for creating web-based experiments, and allows for easy integration with other JavaScript libraries and server-side tools. Don't have JavaScript experience? Don't worry! jsPsych was designed to make creating online experiments as easy as possible for people without web development experience. +Experiments in jsPsych are created using [plugins](https://www.jspsych.org/overview/plugins). +Each plugin defines different kinds of events, like showing an image on the screen, and collects different kinds of data, like recording which key was pressed at which time. +By assembling different plugins together into [a timeline](https://www.jspsych.org/overview/timeline), it is possible to create a wide range of online experiments. ## What can I do with jsPsych? -jsPsych comes with a number of plugins that you can use create tasks and collect data. Some plugins do general things, like present a stimulus (text, image, audio, video) and record a key press or button response along with a response time. Other plugins do more specific things, like show a set of instructions pages, run a drag-and-drop image sorting task, present a Random-Dot Kinematogram, or calibrate the WebGazer eye-tracking extension. See the documentation website for a [list of all plugins](https://www.jspsych.org/plugins/list-of-plugins/), and to see what each plugin can do. +jsPsych comes with a number of plugins that you can use create tasks and collect data. +Some plugins do general things, like present a stimulus (text, image, audio, video) and record a key press or button response along with a response time. +Other plugins do more specific things, like show a set of instructions pages, run a drag-and-drop image sorting task, or calibrate the WebGazer eye-tracking extension. +See the [list of all plugins](https://www.jspsych.org/plugins/list-of-plugins/) to see what each plugin can do. -Often people can create their experiment by combining these plugins together. But if that's not possible for your experiment, you can also modify a plugin file or [create your own plugin](https://www.jspsych.org/overview/plugins/#creating-a-new-plugin). This gives you the flexibility to do exactly what you want, while still taking advantage of jsPsych's general experiment-building framework. +Often people can create their experiment by combining these plugins together. +But if that's not possible for your experiment, you can also modify a plugin file or [create your own plugin](https://www.jspsych.org/developers/plugin-development). +This gives you the flexibility to do exactly what you want, while still taking advantage of jsPsych's general experiment-building framework. +The plugin template is *extremely* flexible. If a task is possible to do in a web browser, you can almost certainly implement it as a plugin. -Getting started ---------------- +## Getting started -New to jsPsych? A good place to start is the basic [Hello World tutorial](https://www.jspsych.org/tutorials/hello-world/) on the jsPsych website. The [Reaction Time Task tutorial](https://www.jspsych.org/tutorials/rt-task/) is a great next step, since it covers many core topics and features. +jsPsych can be loaded into a project in a variety of ways, including via CDNs and through NPM. +You can learn more about setting up a project by following the [hello world tutorial](https://www.jspsych.org/tutorials/hello-world/) on the jsPsych website. -There are also a number of [video tutorials](https://www.jspsych.org/tutorials/video-tutorials), including [Session 1 of the Moving Online Workshop](https://www.youtube.com/watch?v=BuhfsIFRFe8), which provides an overview of jsPsych suitable for brand new users. +Once you've got a project set up, the [reaction time task tutorial](https://www.jspsych.org/tutorials/rt-task/) is a great next step, since it covers many core topics and features. -Examples ----------- +There are also a number of [video tutorials](https://www.jspsych.org/tutorials/video-tutorials) available on the website. -Several example experiments and plugin demonstrations are available in the `/examples` folder. After you've downloaded the [latest release](https://github.com/jspsych/jsPsych/releases), double-click on an example HTML file to run it in your web browser, and open it with a programming-friendly text editor to see how it works. +## Examples -Documentation -------------- +Several example experiments and plugin demonstrations are available in the `/examples` folder. +After you've downloaded the [latest release](https://github.com/jspsych/jsPsych/releases), double-click on an example HTML file to run it in your web browser, and open it with a programming-friendly text editor to see how it works. -Documentation is available at [jspsych.org](https://www.jspsych.org/). +## Documentation -Need help? ----------- +Documentation is available at [https://www.jspsych.org](https://www.jspsych.org/). -For questions about using the library, please use the GitHub [Discussions forum](https://github.com/jspsych/jsPsych/discussions). +## Getting help -Contributing ------------- +For questions about using the library, please use the GitHub [discussions forum](https://github.com/jspsych/jsPsych/discussions). +You can also browse through the history of Q&A on the forum to find related questions. -Contributions to the code are welcome. Please use the [Issue tracker system](https://github.com/jspsych/jsPsych/issues) to report bugs or discuss suggestions for new features and improvements. If you would like to contribute code, [submit a Pull request](https://help.github.com/articles/using-pull-requests). See the [Contributing to jsPsych](https://www.jspsych.org/about/contributing/) documentation page for more information. +## Contributing -Citation --------- +We :heart: contributions! +See the [contributing to jsPsych](https://www.jspsych.org/developers/contributing/) documentation page for more information about how you can help. + +## Citation If you use this library in academic work, please cite the [paper that describes jsPsych](http://link.springer.com/article/10.3758%2Fs13428-014-0458-y): de Leeuw, J.R. (2015). jsPsych: A JavaScript library for creating behavioral experiments in a Web browser. *Behavior Research Methods*, _47_(1), 1-12. doi:10.3758/s13428-014-0458-y -Response times --------------- +## Contributors -Wondering if jsPsych can be used for research that depends on accurate response time measurement? For most purposes, the answer is yes. Response time measurements in jsPsych (and JavaScript in general) are comparable to those taken in standard lab software like Psychophysics Toolbox and E-Prime. Response times measured in JavaScript tend to be a little bit longer (10-40ms), but have similar variance. See the following references for extensive work on this topic. +jsPsych is open source project with [numerous contributors](https://github.com/jspsych/jsPsych/graphs/contributors). +The project is currently managed by the core team of Josh de Leeuw ([@jodeleeuw](https://github.com/jodeleeuw)), Becky Gilbert ([@becky-gilbert](https://github.com/becky-gilbert)), and Björn Luchterhandt ([@bjoluc](https://github.com/bjoluc)). -* [de Leeuw, J. R., & Motz, B. A. (2016). Psychophysics in a Web browser? Comparing response times collected with JavaScript and Psychophysics Toolbox in a visual search task. *Behavior Research Methods*, *48*(1), 1-12.](http://link.springer.com/article/10.3758%2Fs13428-015-0567-2) -* [Hilbig, B. E. (2016). Reaction time effects in lab- versus web-based research: Experimental evidence. *Behavior Research Methods*, *48*(4), 1718-1724.](http://dx.doi.org/10.3758/s13428-015-0678-9) -* [Pinet, S., Zielinski, C., Mathôt, S. et al. (2017). Measuring sequences of keystrokes with jsPsych: Reliability of response times and interkeystroke intervals. *Behavior Research Methods*, *49*(3), 1163-1176.](http://link.springer.com/article/10.3758/s13428-016-0776-3) -* [Reimers, S., & Stewart, N. (2015). Presentation and response time accuracy in Adobe Flash and HTML5/JavaScript Web experiments. *Behavior Research Methods*, *47*(2), 309-327.](http://link.springer.com/article/10.3758%2Fs13428-014-0471-1) +jsPsych was created by [Josh de Leeuw](http://www.twitter.com/joshdeleeuw). - -Credits -------- - -jsPsych was created by Josh de Leeuw ([@jodeleeuw](https://github.com/jodeleeuw)). - -We're grateful for the many [contributors](https://github.com/jspsych/jsPsych/blob/master/contributors.md) to the library, and for the generous support from a [Mozilla Open Source Support (MOSS)](https://www.mozilla.org/en-US/moss/) award. Thank you! \ No newline at end of file +We're also grateful for the generous support from a [Mozilla Open Source Support award](https://www.mozilla.org/en-US/moss/), which funded development of the library from 2020-2021. \ No newline at end of file diff --git a/code-of-conduct.md b/code-of-conduct.md index 5d95e686..76a4d6c7 100644 --- a/code-of-conduct.md +++ b/code-of-conduct.md @@ -33,7 +33,7 @@ Although we strive to make jsPsych as open and collaborative as possible, it’s Such leadership occasionally requires decisions that are in the best interest of the project but may not be understood by or beneficial to everyone. These decisions are important because they keep the project on track, and enable it to move forward faster than if we required complete consensus. Any major decisions taken by the project leader should be mindful of the challenges they may present for others. We expect the project leader to communicate major decisions/changes early on, and to provide their reasoning. ### Contributions -We invite anyone to contribute to any aspect of the project. You can find more information about contributing here: https://www.jspsych.org/about/contributing/ +We invite anyone to contribute to any aspect of the project. You can find more information about contributing here: https://www.jspsych.org/developers/contributing.md/ Because changes to the jsPsych library can have a huge potential for impact on all users, any proposed changes to the library have to be considered very carefully. For this reason, it is always a good idea to check with the project leader about whether your proposed contribution would likely be merged into the jsPsych library. Keep in mind that, even if your work isn’t suitable for merging into the jsPsych library, you can still use it in your own projects and share it publicly with others, e.g. via a separate GitHub repository. diff --git a/docs/about/about.md b/docs/about/about.md index 61bf260b..d72bf25d 100644 --- a/docs/about/about.md +++ b/docs/about/about.md @@ -1,18 +1,11 @@ # About jsPsych -jsPsych was created by [Josh de Leeuw](http://www.twitter.com/joshdeleeuw). There have been [many other contributors](https://github.com/jodeleeuw/jsPsych/blob/master/contributors.md) to the library; thanks to all of them! +jsPsych is open source project with [numerous contributors](https://github.com/jspsych/jsPsych/graphs/contributors). The project is currently managed by the core team of Josh de Leeuw ([@jodeleeuw](https://github.com/jodeleeuw)), Becky Gilbert ([@becky-gilbert](https://github.com/becky-gilbert)), and Björn Luchterhandt ([@bjoluc](https://github.com/bjoluc)). + +jsPsych was created by [Josh de Leeuw :fontawesome-brands-twitter:](http://www.twitter.com/joshdeleeuw). ### Citation -If you use jsPsych for academic work please cite the following paper. +If you use jsPsych please cite the following paper. -de Leeuw, J. R. (2015). jsPsych: A JavaScript library for creating behavioral experiments in a web browser. _Behavior Research Methods_, _47_(1), 1-12. doi:10.3758/s13428-014-0458-y. - -### Response times - -Wondering if jsPsych can be used for research that depends on accurate response time measurement? For most purposes, the answer is yes. Response time measurements in jsPsych (and JavaScript in general) are comparable to those taken in standard lab software like Psychophysics Toolbox and E-Prime. Response times measured in JavaScript tend to be a little bit longer (10-40ms), but have similar variance. See the following references for extensive work on this topic. - -* [de Leeuw, J. R., & Motz, B. A. (2016). Psychophysics in a Web browser? Comparing response times collected with JavaScript and Psychophysics Toolbox in a visual search task. *Behavior Research Methods*, *48*(1), 1-12.](http://link.springer.com/article/10.3758%2Fs13428-015-0567-2) -* [Hilbig, B. E. (2016). Reaction time effects in lab- versus web-based research: Experimental evidence. *Behavior Research Methods*, *48*(4), 1718-1724.](http://dx.doi.org/10.3758/s13428-015-0678-9) -* [Pinet, S., Zielinski, C., Mathôt, S. et al. (in press). Measuring sequences of keystrokes with jsPsych: Reliability of response times and interkeystroke intervals. *Behavior Research Methods*.](http://link.springer.com/article/10.3758/s13428-016-0776-3) -* [Reimers, S., & Stewart, N. (2015). Presentation and response time accuracy in Adobe Flash and HTML5/JavaScript Web experiments. *Behavior Research Methods*, *47*(2), 309-327.](http://link.springer.com/article/10.3758%2Fs13428-014-0471-1) +de Leeuw, J. R. (2015). jsPsych: A JavaScript library for creating behavioral experiments in a web browser. _Behavior Research Methods_, _47_(1), 1-12. [doi:10.3758/s13428-014-0458-y](https://doi.org/10.3758/s13428-014-0458-y). diff --git a/docs/about/contributing.md b/docs/about/contributing.md deleted file mode 100644 index bb1e8307..00000000 --- a/docs/about/contributing.md +++ /dev/null @@ -1,43 +0,0 @@ -# Contributing to jsPsych - -Contributions to jsPsych are welcome! All of the code is managed through the GitHub repository. - -## Steps for modifying the code - -#### Discuss the proposed change - -If you have a specific modification in mind -- for instance, a new feature or bug fix -- please open a [new issue via GitHub](https://github.com/jspsych/jsPsych/issues/new). Describe the proposed change and what functionality it adds to the library and/or what problem it solves. If you are interested in adding a new plugin to the library, it helps if you post an example of the plugin in use and describe the different use cases of the plugin (for more guidance, see the "Writing new plugins" section below). - -If you are thinking about proposing a change but not at the point where you have a specific modification to the code base in mind, then it might be helpful to discuss the issue first on [GitHub Discussions](https://github.com/jspsych/jsPsych/discussions). Discussion posts can be useful for sharing code and getting feedback before requesting a change to the library. - -#### Fork the library and modify the code - -To make changes to the code, you should fork the jsPsych library via GitHub and make modifications on your fork. You may find it useful to make modifications on branches, so that you can keep your proposed changes separate from any other unrelated changes you might want to make on your fork. - -#### Submit a pull request - -Once your modification is complete, submit a pull request to merge your changes into the `master` branch of the main repository. Pull requests will be reviewed by the project team. - -## Writing new plugins - -New plugins are welcome additions to the library. Plugins can be distributed independently of the main library or added to the GitHub repository via a pull request, following the process described above. If you want to add your plugin to the main library then there are a few guidelines to follow. - -#### Make the plugin as general as possible - -Plugins are most useful when they are flexible. Avoid fixing the value of parameters that could be variables. This is especially important for any text that displays on the screen in order to facilitate use in multiple languages. - -#### Use the jsPsych.pluginAPI module when appropriate - -The [pluginAPI module](../core_library/jspsych-pluginAPI.md) contains functions relevant to plugin development. Avoid duplicating the functions defined within the library in your plugin, and instead use the pluginAPI whenever possible. If you have a suggestion for improving pluginAPI methods, then go ahead and submit a pull request to modify it directly. - -#### Document your plugin - -When submitting a pull request to add your plugin, make sure to include a documentation page in the same style as the other docs pages. Documentation files exist in the `docs` directory. - -#### Include an example file - -Write a short example HTML file to include in the `examples` directory. This should demonstrate the basic use cases of the plugin as clearly as possible. - -#### Include a testing file - -Automated code testing for jsPsych is implemented with [Jest](https://facebook.github.io/jest/). To run the tests, install Node and npm. Run `npm install` in the root jsPsych directory. Then run `npm test`. Plugins should have a testing file that validates the behavior of all the plugin parameters. See the `/tests/plugins` directory for examples. diff --git a/docs/about/license.md b/docs/about/license.md index 3db30785..cc2d1022 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,25 +1,7 @@ # License -jsPsych is licensed under the MIT license. +jsPsych is [licensed](https://github.com/jspsych/jsPsych/blob/main/license.txt) under the MIT license. ->The MIT License (MIT) -> ->Copyright (c) 2019 Joshua R. de Leeuw -> ->Permission is hereby granted, free of charge, to any person obtaining a copy ->of this software and associated documentation files (the "Software"), to deal ->in the Software without restriction, including without limitation the rights ->to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ->copies of the Software, and to permit persons to whom the Software is ->furnished to do so, subject to the following conditions: -> ->The above copyright notice and this permission notice shall be included in all ->copies or substantial portions of the Software. -> ->THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ->IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ->FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ->AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ->LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ->OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ->SOFTWARE. +``` +--8<-- "license.txt" +``` \ No newline at end of file diff --git a/docs/about/support.md b/docs/about/support.md deleted file mode 100644 index 9a284e51..00000000 --- a/docs/about/support.md +++ /dev/null @@ -1,7 +0,0 @@ -# Support - -For questions about jsPsych the preferred method of support is via [GitHub Discussions](https://github.com/jspsych/jsPsych/discussions). Questions are most likely to be answered when they include a reproducible example of the problem. If you can make your code available online and link to the experiment, that will make the question easier to answer. - -If you have identified a problem with jsPsych, such as a bug in the code or an error in the documentation, please [open a new issue](https://github.com/jspsych/jsPsych/issues/new) on the GitHub site. And if you have a suggestion for fixing the problem, feel free to propose a modification by following the steps in the [Contribuitng to jsPsych](contributing.md) page. - -Inquiries for paid consultation to develop experiments using jsPsych or to create new custom jsPsych features can be sent to [josh.deleeuw@gmail.com](mailto:josh.deleeuw@gmail.com). diff --git a/docs/demos/eye-tracking-with-webgazer.html b/docs/demos/eye-tracking-with-webgazer.html index e6e8b294..682b21e7 100644 --- a/docs/demos/eye-tracking-with-webgazer.html +++ b/docs/demos/eye-tracking-with-webgazer.html @@ -1,19 +1,19 @@
- - - - - - - - - - + + + + + + + + + + @@ -12,14 +12,16 @@ - - - + + + + @@ -12,14 +12,16 @@ - - - + + + + @@ -12,14 +12,16 @@ - - - + + + + @@ -12,14 +12,16 @@ - - - + + + + @@ -12,14 +12,16 @@ - - - + + + + @@ -12,14 +12,16 @@ - - - + + + + @@ -12,14 +12,16 @@ - - - + + + + @@ -12,14 +12,16 @@ - - - + + + + @@ -12,14 +12,16 @@ - - - + + + + @@ -12,14 +12,16 @@ - - - - + + + + + @@ -13,14 +12,16 @@ - - - - + + + + + @@ -13,14 +13,16 @@ - - - - + + + + @@ -13,14 +12,16 @@ - - - - + + + + @@ -13,14 +12,16 @@ - - - - + + + + @@ -13,14 +12,16 @@ - - - - + + + + + @@ -13,14 +13,16 @@ - - - + + + @@ -12,14 +11,16 @@ - - - - + + + + @@ -13,14 +12,16 @@ - - - - + + + + @@ -13,14 +12,16 @@ - - - - + + + + @@ -13,14 +12,16 @@ - - - - + + + + @@ -13,14 +12,16 @@ - - - - + + + + + @@ -13,19 +13,21 @@ - - - - + + + + + @@ -13,19 +13,21 @@ - - - - + + + + + @@ -13,19 +13,21 @@ - - - - + + + + + @@ -13,19 +13,21 @@ - - - - + + + + + @@ -13,19 +13,21 @@ - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + @@ -13,14 +12,16 @@ - - - + + + + @@ -14,14 +13,16 @@ - - - - + + + + @@ -13,14 +12,16 @@ - - - + + + @@ -13,19 +13,21 @@ - - - - + + + + + @@ -13,19 +13,21 @@ - - - - + + + + + @@ -13,19 +13,21 @@ - - - - - + + + + + + @@ -14,14 +14,21 @@ - - - + + + + - + @@ -14,19 +14,21 @@ - - - + + + + - + @@ -14,19 +14,21 @@ - - - + + + + - - - -