Skip to content

empiricaly/random-dot-kinematogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random Dot Kinematogram

This package contains a React component for a Random Dot Kinematogram (RDK) build with the P5 library.

In RDKs, a certain percentage of dots are designated as “signal” to move in one coherent direction, and the remaining percentage of dots are designated as “noise” to move in random directions.

Usage

Simply add the <RDK> component to your React tree.

import RDK from "@empirica/random-dot-kinematogram";

//...

<RDK coherence={0.5} direction="right" />;

RDK expects 2 props:

  • direction: "right" or "left" for the direction the signal
  • coherence: a value between 0 (incoherent) and 1 (coherent) for the noise

Credits

This package is based on the work of @josephbb. Thank you @josephbb for allowing us to share your work with the community.

About

React component of a Random Dot Kinematogram

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published