Recent Releases of @kurokida/jspsych-psychophysics

@kurokida/jspsych-psychophysics - V4.0.0 Compatible with jsPsych version 8

New Features

  • Added event handlers for screen touch (touchstart/end/move/cancel). Refer to touch_drawing.html.
  • Support for multi buttons which is same functionality as button grid of html-button-response.
  • Added upper_prompt and lower_prompt parameters.

Changes

  • Accessing the canvas, context, and center positions using jsPsych.getCurrentTrial() is no longer possible. Use the following method instead. Considering window.devicePixelRatio is probably unnecessary if you use the PIXI mode.

javascript const canvas = document.getElementById("myCanvas"); const context = canvas.getContext("2d"); const centerX = canvas.width / 2 / window.devicePixelRatio; const centerY = canvas.height / 2 / window.devicePixelRatio;

  • stim_array can not be used. Use jsPsych.getCurrentTrial().stimuli[n].instance instead. See changeimagesizebykeypress.html
  • The numeric has been discontinued. See https://jspsychophysics.hes.kyushu-u.ac.jp/gabor/

Issues

Following the demo programs have issues, but no solution has been found yet. Some of them are likely related to https://github.com/jspsych/jsPsych/discussions/3513.

- JavaScript
Published by kurokida about 1 year ago

@kurokida/jspsych-psychophysics - V3.7.0 verified accuracy

This version was used to verify accuracy. According to my observation, presentation times should be specified in terms of frames not milliseconds, and the use of Firefox should be avoided for experiments with brief presentation times of less than 50 ms/3 frames.

Changes

Add new properties "pixiangle" and "pixirotation" to the text object

New demo program

piximentalrotation.html This uses PixiJS library to rotate the stimulus charactor.

- JavaScript
Published by kurokida almost 2 years ago

@kurokida/jspsych-psychophysics - NPM package

Thanks to @bjoluc, the jspsych-psychophysics plugin supports the NPM package from this version.

New demo

changeimagesizebykeypress.html changeimagesizebykeypress2.html

Changes

The default method to calculate the gaussian filter is the 'numeric' library, but you can select the 'ml-matrix' library instead. The 'math' library is no longer supported since this version. See the help of the method at https://jspsychophysics.hes.kyushu-u.ac.jp/objectProperties/#obj_type-gabor.

- JavaScript
Published by kurokida about 3 years ago

@kurokida/jspsych-psychophysics - Version 3.5.0

Compatible with jsPsych 7.3.1

New features related to Pixi.js

New features related to Canvas

  • The remain_canvas property. If this is true, the main canvas remains for the next trial. This is useful to present complex stimuli using multiple psychophysics objects. Note that this property doesn’t work in the Pixi mode.

- JavaScript
Published by kurokida over 3 years ago

@kurokida/jspsych-psychophysics - Compatible with jsPsych 7.3.0

This release is compatible with jsPsych 7.3.0, and includes the jsPsych library.

- JavaScript
Published by kurokida over 3 years ago

@kurokida/jspsych-psychophysics - Simulation modes are supported

New features

The plugin supports simulation modes

See the following demos - simulation-data-only-mode.html - simulation-visual-mode.html

Changes

The response property has a proper value when a button is clicked as a response. See help on data generated.

Compatibility with jsPsych

The plugin includes jsPsych version 7.2.1.

- JavaScript
Published by kurokida about 4 years ago

@kurokida/jspsych-psychophysics - PixiJS is supported

New features

Starting with version 3.2.0, the psychophysics plugin can present visual stimuli using PixiJS functionality. See this page in detail.

Bug fixes

Visual stimuli are properly presented on very large resolution displays.

- JavaScript
Published by kurokida about 4 years ago

@kurokida/jspsych-psychophysics - Version 3.1.0

New properties

The image width/height can be specified in pixels. See https://jspsychophysics.hes.kyushu-u.ac.jp/objectProperties/#obj_type-image

The contrastPreMultiplicator property is added. See https://jspsychophysics.hes.kyushu-u.ac.jp/objectProperties/#obj_type-gabor and CreateProceduralGabor.

- JavaScript
Published by kurokida over 4 years ago

@kurokida/jspsych-psychophysics - Compatible with jsPsych V7.

This release is now compatible with jsPsych V7.

This release includes jsPsych 7.1.2.

Note for users of previous versions.

At first, please see Migrating an experiment to v7.x

  • Write const jsPsych = initJsPsych({}) at the begging of the script.
  • Write type: jsPsychPsychophysics in a trial object.
  • Pass the trial object as an argument as follows jsPsych.run([instruction, trial])

- JavaScript
Published by kurokida over 4 years ago

@kurokida/jspsych-psychophysics - Support for retina display

In higher resolution displays, such as retina displays, stimuli are now presented more clearly. See https://github.com/jspsych/jsPsych/discussions/2097

- JavaScript
Published by kurokida almost 5 years ago

@kurokida/jspsych-psychophysics - Bug fix concerning the compatibility with the fullscreen plugin.

Fixed the canvas to be fullscreen when using the fullscreen plugin. With this change, the canvas_offsetX and canvas_offsetY properties have been added.

- JavaScript
Published by kurokida almost 5 years ago

@kurokida/jspsych-psychophysics - Bug fix concerning the text_stimulus class

Bug Fix

Fixed the problem the text content is not vertically aligned when the line feed (\n) is used.

- JavaScript
Published by kurokida about 5 years ago

@kurokida/jspsych-psychophysics - Masking and filtering images

New feature

You can apply masking/filtering to image files.

This version is compatible with jsPsych 6.3.0. Note that the way to preload image and audio files has been changed.

- JavaScript
Published by kurokida about 5 years ago

@kurokida/jspsych-psychophysics - v2.0 is released.

The code has been rewritten based on the object-oriented programming.

The stepFunc has been deprecated. Please use the raf_func instead.

The code 'jsPsych.currentTrial().stimuli' must be changed to the code jsPsych.currentTrial().stim_array

jsPsych v6.2.0 is supported.

- JavaScript
Published by kurokida over 5 years ago

@kurokida/jspsych-psychophysics - v1.4.2 is released

Bug fix

Fixed a bug which occured when the use_webaudio property was false.

New feature

Added the trialendsafter_audio property.

- JavaScript
Published by kurokida over 5 years ago

@kurokida/jspsych-psychophysics - Change attributes

Bug fix

Fixed a bug that causes when the stimuli is not specified.

New feature

You can change the attributes of the object dynamically. See the demos/change_attributes.html.

- JavaScript
Published by kurokida over 5 years ago

@kurokida/jspsych-psychophysics - v1.4 is released

New Features

Button response

Participants’ responses can be captured using buttons in addition to the mouse and keyboard. Set the response_type property as 'button'.

Event handlers

You can specify the mouse/keyboard event handler. For example, you can make a program in which a participant change the luminance of a stimulus pressing the ArrowUp/ArrowDown key, and finish the trial pressing the space key.

clear_canvas property

If true (default), the canvas is cleared every frame. There are not many cases where this should be false, but if you want to draw the trajectory of the mouse, for example, you need to set it false.

- JavaScript
Published by kurokida over 5 years ago

@kurokida/jspsych-psychophysics - Bug is fixed.

This release fixed the issue discussed at https://github.com/jspsych/jsPsych/discussions/1031

The problem had been occurred when the stimulus was used over and over in a same trial.

- JavaScript
Published by kurokida over 5 years ago

@kurokida/jspsych-psychophysics - The origin can be changed to the center of the window

Changes

The origin of the coordinate is the top left of the canvas, but the origin can be changed to the center of the window using the origin_center property. Please see the demos/origin_center.html

- JavaScript
Published by kurokida almost 6 years ago

@kurokida/jspsych-psychophysics - Bug is fixed.

The keyboard Listener is canceled properly.

jsPsych.pluginAPI.cancelKeyboardResponse(keyboardListener);

Below v1.0, it is not canceled properly due to the scope of the keyboardListener variable.

- JavaScript
Published by kurokida almost 6 years ago

@kurokida/jspsych-psychophysics - v1.0 is released

To specify timing information in terms of frames not of milliseconds, the show_start(end)_frame property is added. To enable the properties, the is_frame property should be also specified as true.

Note that the display duration do not necessarily correspond to the intended value. For examples, see Bridges et al. (2020).

About how to use the show_start(end)_frame property, see the demonstration files. - movingCircles_frames.html - twoImagesWithSOAinFrames.html

- JavaScript
Published by kurokida about 6 years ago

@kurokida/jspsych-psychophysics - v0.4 is released

New demos

demos/drawpartof_image.html

This file demonstrates how to use the drawFunc with an image. The image is preloaded automatically. In this demo, the part of the image is presented, and moved from left to right.

demos/drawtwoimages_repeatedly.html

This file demonstrates how to present two images repeatedly until a participant responds to them. This demonstration can be applied to the study on like change blindness.

Changes

The drawFunc can be used in an image object.

Bug Fixes

The line_width property works properly. Thanks for the pull request, @kohske

- JavaScript
Published by kurokida about 6 years ago

@kurokida/jspsych-psychophysics -

The code is refined than v0.2, and is compatible with jsPsych v6.1.0.

- JavaScript
Published by kurokida over 6 years ago

@kurokida/jspsych-psychophysics -

This version is compatible with jsPsych v6.1.0.

- JavaScript
Published by kurokida over 6 years ago

@kurokida/jspsych-psychophysics - The first release

This version is compatible with jsPsych v6.0.5, and was used when evaluating the display duration and SOA.

- JavaScript
Published by kurokida over 6 years ago