npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jspsych/plugin-tobii-calibration

v0.2.1

Published

jsPsych plugin for Tobii eye tracker calibration

Downloads

24

Readme

@jspsych/plugin-tobii-calibration

jsPsych plugin for Tobii eye tracker calibration. Provides a visual calibration procedure with animated points, multiple grid sizes, and real-time feedback.

Installation

npm install @jspsych/plugin-tobii-calibration

Compatibility

This plugin requires jsPsych v8.0.0 or later and the @jspsych/extension-tobii extension.

Usage

import TobiiCalibrationPlugin from '@jspsych/plugin-tobii-calibration';

const trial = {
  type: TobiiCalibrationPlugin,
  calibration_points: 9,
  calibration_mode: 'view',
};

The Tobii extension must be loaded and connected before this plugin runs. See the extension documentation for setup instructions.

Parameters

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | calibration_points | int | 9 | Number of calibration points. Supported values: 5, 9, 13, 15, 19, 25. | | calibration_mode | string | 'view' | Calibration mode. 'view': participant looks at each point for a fixed duration. 'click': participant clicks when ready at each point. | | point_size | int | 20 | Size of calibration points in pixels. | | point_color | string | '#ff0000' | Color of calibration points (CSS color value). | | point_duration | int | 500 | Duration to show each point before data collection begins (ms). Allows the participant to fixate. | | show_progress | boolean | true | Show a progress indicator (e.g., "Point 3 of 9"). | | custom_points | array | null | Array of custom calibration points. Each point is an object with x and y properties (normalized 0-1). Overrides calibration_points when provided. | | instructions | string | 'Look at each point as it appears on the screen. Keep your gaze fixed on each point until it disappears.' | Instructions text shown before calibration begins. | | button_text | string | 'Start Calibration' | Button text shown on the instructions screen before calibration begins. | | background_color | string | '#808080' | Background color of the calibration container. | | button_color | string | '#007bff' | Primary button color. | | button_hover_color | string | '#0056b3' | Primary button hover color. | | retry_button_color | string | '#dc3545' | Retry button color. | | retry_button_hover_color | string | '#c82333' | Retry button hover color. | | success_color | string | '#28a745' | Success message heading color. | | error_color | string | '#dc3545' | Error message heading color. | | max_retries | int | 1 | Maximum number of retry attempts allowed if calibration fails. The participant is shown a retry button on failure. Set to 0 to disable retries. | | zoom_duration | int | 300 | Duration of zoom in/out point animations in ms. | | explosion_duration | int | 400 | Duration of the explosion animation after each point is collected in ms. | | success_display_duration | int | 2000 | Duration to show the success result before auto-advancing in ms. | | instruction_display_duration | int | 3000 | Duration to show instructions before auto-advancing in view mode in ms. Has no effect in click mode. |

Data Generated

In addition to the default data collected by jsPsych plugins, this plugin collects the following data for each trial.

| Name | Type | Description | |------|------|-------------| | calibration_success | boolean | Whether the calibration was successful. | | num_points | int | Number of calibration points used. | | mode | string | Calibration mode used ('view' or 'click'). | | calibration_data | object | Full calibration result data returned by the server, including any quality metrics. | | num_attempts | int | Number of calibration attempts made (including retries). |

Calibration Point Grids

The calibration_points parameter supports these grid sizes:

  • 5: Four corners + center
  • 9: 3x3 grid (recommended default)
  • 13: 3x3 outer grid + 4 diagonal midpoints
  • 15: 5 rows x 3 columns
  • 19: Symmetric 3-5-3-5-3 pattern
  • 25: 5x5 full grid

All standard grids use points spanning from 0.1 to 0.9 in normalized coordinates, keeping a 10% margin from screen edges.

Examples

Basic 9-Point Calibration

const trial = {
  type: TobiiCalibrationPlugin,
  calibration_points: 9,
  calibration_mode: 'view',
};

Click Mode with Custom Styling

const trial = {
  type: TobiiCalibrationPlugin,
  calibration_points: 9,
  calibration_mode: 'click',
  point_color: '#0000ff',
  point_size: 25,
  background_color: '#333333',
  button_text: 'Begin Calibration',
};

Custom Points

const trial = {
  type: TobiiCalibrationPlugin,
  custom_points: [
    { x: 0.15, y: 0.15 },
    { x: 0.5, y: 0.15 },
    { x: 0.85, y: 0.15 },
    { x: 0.15, y: 0.5 },
    { x: 0.5, y: 0.5 },
    { x: 0.85, y: 0.5 },
    { x: 0.15, y: 0.85 },
    { x: 0.5, y: 0.85 },
    { x: 0.85, y: 0.85 },
  ],
};

With Retries Disabled

const trial = {
  type: TobiiCalibrationPlugin,
  calibration_points: 9,
  max_retries: 0,
};

Citation

If you use this plugin in your research, please cite it. See CITATION.cff.